IoT-MEC-oriented service placement and resource allocation joint optimization decision-making method

By combining the KKT method and deep reinforcement learning in the IoT-MEC environment, the joint placement and resource allocation of CS and ComS are optimized, solving the problem of low efficiency in service placement and resource allocation in the existing technology, and achieving more efficient service processing and response speed.

CN119012278APending Publication Date: 2024-11-22YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410961293.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In existing technologies, the IoT-MEC environment only considers the placement of individual caching and computing services, resulting in low task processing efficiency and failing to effectively resolve the complex dependencies between service placement and resource allocation.

Method used

This paper adopts a method combining KKT and deep reinforcement learning. By generating a joint optimization problem, considering the execution dependency between CS and ComS, it optimizes service placement and resource allocation. The service placement decision model is trained using deep reinforcement learning algorithm to generate the optimal resource allocation scheme.

Benefits of technology

It improves service processing efficiency, enabling it to adapt to the dynamic characteristics of the IoT-MEC environment more quickly and effectively, generate optimal service placement and resource allocation strategies, and improve system performance and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119012278A_ABST
    Figure CN119012278A_ABST
Patent Text Reader

Abstract

The invention discloses a service placement and resource allocation joint optimization decision-making method oriented to IoT-MEC. The method comprises the following steps: acquiring calculation requirements of heterogeneous applications appi initiated by all equipment in an IoT-MEC environment; wherein each heterogeneous application is composed of ki CSs and a ComS; when conventional service placement and resource allocation conditions are obtained, the average processing time delay of all heterogeneous applications appi is obtained, and a joint optimization problem is generated based on a minimum task average processing time delay target; solving a joint optimization problem by using a KKT method and deep reinforcement learning according to calculation requirements, outputting a service placement strategy, and solving an optimal resource allocation scheme; compared with the prior art, the dynamic characteristics of the IoT-MEC environment can be quickly adapted, and by means of the real-time decision of the strategy gradient algorithm and the accuracy of the KKT condition, the generated solution can obtain the optimal result more quickly and more effectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and in particular relates to a joint optimization decision method for service placement and resource allocation for IoT-MEC. Background Art

[0002] In recent years, with the continuous development and popularization of mobile communication technology, the number of Internet of Things (IoT) devices has increased dramatically and has been widely integrated into various systems such as smart homes, industrial automation, and health monitoring systems. This integration enables IoT devices to connect to the Internet and exchange data in real time, which brings about a huge demand for data processing and analysis. As the number of IoT devices increases, the computing demand for IoT services has also increased significantly.

[0003] However, this growth also brings challenges. The traditional cloud computing paradigm faces limitations in handling this data, mainly because data processing and storage are usually carried out in remote data centers, which may not only cause data processing delays, but also affect service quality due to network congestion or load constraints of data centers. This delay and service quality issue becomes more prominent in application scenarios that require fast response.

[0004] To solve these problems, Mobile Edge Computing (MEC) has been proposed as a solution. MEC is a new computing paradigm that transfers the processing power and storage resources of cloud computing from the central data center to the edge of the network, close to the data source or user. Such a transfer can effectively reduce the burden on end-user devices and networks, while significantly reducing the problems associated with high-latency communications.

[0005] The integration of MEC in IoT systems (referred to as IoT-MEC) has been shown to be an effective strategy to overcome the limitations of centralized mobile network traffic aggregation in cloud computing architectures. In IoT-MEC applications, data processing tasks are offloaded from resource-limited IoT devices to edge nodes, which are usually located in the network near the user or data source, providing faster response time and lower latency. This integration improves the efficiency and responsiveness of services while reducing the burden on the network core and central cloud. In the field of IoT-MEC, the service placement problem is a core and complex issue that directly affects the overall performance, response time, resource utilization, and user experience quality of the system. Service placement refers to determining which services should be deployed on which edge servers in an edge computing environment in order to maximize service efficiency and minimize latency and cost.

[0006] Service types include Cache Service (CS) and Computing Service (ComS). CS can provide data for ComS. In a typical application scenario, ComS may need to frequently access certain data, which may be time-consuming or costly to obtain from the main storage. In order to improve the performance and efficiency of ComS, this data can be stored in the cache. When ComS needs to access data, it first checks whether there is a copy of the data in the cache. If so, it directly obtains it from the cache, thereby avoiding the cost and delay of obtaining data from the main storage.

[0007] By using CS, the performance and response speed of ComS can be significantly improved, especially for data that needs to be accessed frequently. At the same time, CS can also reduce the pressure on primary storage and improve the throughput and performance of the entire system. Therefore, CS plays a very important role in cloud computing and provides ComS with an efficient data access method.

[0008] However, in the prior art, when placing the CS and the ComS, only the placement of the individual CS and the ComS is considered, resulting in a problem of low task processing efficiency. Summary of the invention

[0009] In view of this, the purpose of the present invention is to provide a joint optimization decision method for service placement and resource allocation for IoT-MEC, so as to solve the above technical problems.

[0010] In order to achieve the above object, the present invention provides the following technical solutions:

[0011] A joint optimization decision method for service placement and resource allocation for IoT-MEC, including:

[0012] Get heterogeneous application apps initiated by all devices in the IoT-MEC environment i The computing requirements of each heterogeneous application are k i It consists of a CS and a ComS;

[0013] When obtaining general service placement and resource allocation, all heterogeneous applications i The average processing delay of each task is calculated, and a joint optimization problem is generated based on the goal of minimizing the average processing delay of each task.

[0014] According to computing requirements, the KKT method and deep reinforcement learning are used to solve the joint optimization problem, output the service placement strategy, and obtain the optimal resource allocation solution.

[0015] Furthermore, obtain heterogeneous application apps initiated by all devices in the IoT-MEC environment iThe computing requirements include:

[0016] Get m heterogeneous applications initiated by all devices in the IoT-MEC environment Among them, 1≤i≤m, each heterogeneous application consists of k i It consists of a CS and a ComS. The CS is used to cache the data required to execute the ComS. The ComS is used to receive all the data cached by the CS and then start to execute the calculation.

[0017] Determine the computing requirements of each heterogeneous application based on the computing resources and storage resources required when CS and ComS are deployed in each heterogeneous application.

[0018] Furthermore, when obtaining regular service placement and resource allocation, all heterogeneous applications app i The average processing delay of each task is calculated, and based on the goal of minimizing the average processing delay of each task, a joint optimization problem is generated, including:

[0019] When obtaining regular service placement and regular resource allocation, heterogeneous application apps that are serviced according to the m / m / l queue sorting i The average length of stay W i , calculate the heterogeneous applications app requested in unit time slot t i Total delay The calculation formula is:

[0020]

[0021] Among them, λ i Access heterogeneous applications app per unit time slot t i The number of requests meets the expected value of the Poisson distribution;

[0022] According to the total delay When calculating the general resource allocation, all heterogeneous applications app i The average processing delay T exe ; The calculation formula is:

[0023]

[0024] Where m is the total number of heterogeneous applications in the current IoT-MEC environment;

[0025] Based on the goal of minimizing the average task response time, a joint optimization problem is generated:

[0026]

[0027] in, T exeTo solve the optimization problem of minimizing the average task processing delay, p* represents the optimal service placement strategy, and n* represents the optimal resource allocation strategy in the MEC environment.

[0028] Furthermore, when obtaining regular resource allocation, heterogeneous application apps that are serviced are sorted according to the m / m / 1 queue. i The average length of stay W i ,include:

[0029] Get heterogeneous application apps i The transmission delay from the kth CS to the ComS with dependency The calculation formula is:

[0030]

[0031] Among them, e i,k Indicates that the app i The size of the response data sent by the kth CS to ComS, h i To place the app i The edge server of ComS service, Indicates application app i The edge server of the kth CS service, The bandwidth between the edge servers that place services CS and ComS, Represents the judgment function, if h i and For different edge servers, Otherwise it is 0;

[0032] According to the transmission delay Calculate heterogeneous application app i The transmission delay from all CSs to the dependent ComS The calculation formula is:

[0033]

[0034] According to the transmission delay Calculate the heterogeneous applications app within the unit time slot t i The service rate μ i ; The calculation formula is:

[0035]

[0036] Among them, c i To execute heterogeneous applications i Calculate the expected number of CPU cycles required, n i Assign edge servers to heterogeneous applications i computing resources;

[0037] According to the service rate μ i , calculate the heterogeneous application apps that are serviced according to the m / m / 1 queue sorting i The average length of stay W i ; The calculation formula is:

[0038]

[0039] Among them, λ i Access heterogeneous applications app per unit time slot t i The number of requests satisfies the expected value of the Poisson distribution.

[0040] Furthermore, based on computing requirements, the KKT method and deep reinforcement learning are used to solve the joint optimization problem, output the service placement strategy, and obtain the optimal resource allocation solution, including:

[0041] Based on the goal of simplifying the complexity of the joint optimization problem, the joint optimization problem is decomposed into a resource allocation optimization problem and a service placement optimization problem;

[0042] Model the service placement optimization problem as a Markov decision process and identify the three decision elements in the Markov decision process: state space, action space, and reward function;

[0043] Based on the deep reinforcement learning algorithm, the service placement decision model is trained and generated according to the three decision-making factors;

[0044] Output service placement strategy based on computing requirements and service placement decision model;

[0045] Get all heterogeneous application apps that meet the m / m / 1 queue stability i The service placement strategy generates the objective function:

[0046]

[0047] in, is the total number of ComS placed on the edge server h, is the expected number of q-th ComS requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the qth ComS placed on edge server h, Allocate computing resources of the qth ComS to edge server h, is the transmission delay of the qth ComS placed on the edge server h, heterogeneous application app i If the service placement strategy is known, is a constant;

[0048] Determine whether the objective function is a convex function;

[0049] If the objective function is convex, obtain the Lagrangian function:

[0050]

[0051] Among them, n h represents the resource allocation strategy of edge server h to ComS deployed on h, β represents the Lagrange multiplier, is the maximum computing resource on the edge server h;

[0052] Based on the KKT method, the KKT conditions are generated according to the joint optimization problem:

[0053]

[0054] Among them, F(n h ) is the total processing delay of various tasks completed by edge server h in each unit time slot t, and d() represents the derivative operation;

[0055] According to the Lagrangian function and KKT conditions, the optimal resource allocation solution is obtained:

[0056]

[0057] in, is the optimal allocation scheme for allocating the computing resources of the q′th ComS on the edge server h, 0≤ is the expected number of q′th ComS service requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the q′th ComS service placed on edge server h, Calculate the service transmission delay for the q′th ComS placed on the edge server h.

[0058] Determine the three elements of decision making in the Markov decision process: state space, action space, and reward function, including:

[0059] The state space is s t ∈s, represents the current state observed from the edge computing system, Among them, s represents the state set, s t represents the state at time slot t, Indicates the status of the cache service. Indicates the status of the computing service;

[0060] The action space is A t, represents the service placement decision that the nodes of the edge computing system need to make based on the current state at each time slot t. in, represents a placement operation on CS, Represents a placement operation on ComS;

[0061] The reward function is R t , represented in the state space S t After taking action in, the node of the edge computing system will receive a reward R from the edge computing system t :

[0062]

[0063] Wherein, formula (I) indicates that the service is successfully placed, T exe For heterogeneous applications in service i The average processing delay, T ini is the service initialization delay of all services, ε is the reward coefficient set to avoid the decision model only minimizing the service initialization delay and ignoring the average processing delay, ε∈(0,1); Formula (II) represents the service placement strategy that does not meet the resource constraints, ψ is the penalty for the service placement strategy that does not meet the resource constraints, ψ<<-(T exe +εT ini ); Formula (III) represents that the service placement strategy satisfies the resource constraints, but there are application tasks that cannot be completed in the unit time slot t, and η is a constant coefficient greater than 1;

[0064]

[0065] Among them, T ini For all heterogeneous applications app deployed on the edge server h i The initialization delay of the corresponding service, Q h is the number of all services placed on the edge server h, The service initialization delay for the qth service deployed on edge server h;

[0066]

[0067] Among them, s h,q is the service instance size of the qth service on edge server h, R h is the bandwidth between the edge server h and the cloud server.

[0068] Based on the deep reinforcement learning algorithm, the service placement decision model is trained and generated according to the three decision-making elements, including the following steps:

[0069] Step 1: Initialize the policy network and value network. The policy network is used to generate execution actions in a given state, and the value network is used to evaluate the expected returns of different states.

[0070] Step 2: Use the execution actions generated by the policy network to execute actions in the current IoT-MEC environment, and collect the status, action, reward, new status and end flag during the execution process to form trajectory data;

[0071] Step 3: According to the trajectory data, based on the output of the value network and the actual reward obtained, the advantage function is calculated, and the policy network is updated through the advantage function; the PPO algorithm is used in the updating process;

[0072] Step 4: Obtain the error between the minimum actual reward and the predicted reward contained in the trajectory data, and update the value network;

[0073] Step 5: Repeat steps 2 to 4 until the preset number of training rounds is reached or the policy network reaches the preset performance standard, and then terminate the training and output the service placement decision model.

[0074] Get all heterogeneous application apps that meet the m / m / 1 queue stability i The service placement strategy generates the objective function, and the conditions for the stability of the m / m / 1 queue include:

[0075] Get the prerequisites for satisfying the stability of the m / m / 1 queue:

[0076]

[0077] in, is the utilization rate of the qth service placed on edge server h, is the service rate of the qth service placed on edge server h, for The lower limit of

[0078] Get the computing resource conditions that satisfy the stability of the m / m / 1 queue:

[0079]

[0080] in, It means that edge server h can allocate at least computing resources.

[0081] Determine whether the objective function is a convex function, including:

[0082] When all heterogeneous applications i After the service placement strategy is determined, is a constant, and the equivalent transformation objective function α is the equivalent objective function α′:

[0083]

[0084] According to the equivalent objective function, it is determined that the edge server h completes the heterogeneous application app within the unit time slot i The processing delay of all tasks is The calculation formula is:

[0085]

[0086] According to the processing delay The total processing delay F(n h ), the calculation formula is:

[0087]

[0088] Based on minimizing F(n h ) goal, for F(n h ) to perform first-order partial derivatives and second-order partial derivatives, and the calculation formula is:

[0089]

[0090] Among them, if according to It can be proved that Then the objective function is determined to be a convex function.

[0091] The beneficial effects of the present invention are:

[0092] The present invention proposes a joint optimization decision method for service placement and resource allocation for IoT-MEC. Different from the existing work that mainly studies the placement of CS and ComS separately, the present invention considers the execution dependency between CS and ComS when placing services, which undoubtedly increases the complexity of the problem and improves the service processing efficiency;

[0093] In a complex IoT-MEC environment, ComS execution may require multiple types of cached data. In this application, multiple CSs in each application provide the required cached data for ComS execution, which improves service processing efficiency;

[0094] This application adopts a solution that combines the policy gradient algorithm - DRL and KKT optimization. Compared with existing algorithms, it can quickly adapt to the dynamic characteristics of the IoT-MEC environment, and with the help of DRL's real-time decision-making and the accuracy of KKT conditions, the generated solution can achieve the best results faster and more effectively.

[0095] Other advantages, objectives and features of the present invention will be described in the following description and will be apparent to those skilled in the art to some extent, or they may be taught from the practice of the present invention. The purposes and other advantages of the present invention may be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0096] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0098] Figure 1 This is a method flow chart of a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0099] Figure 2 It is a detailed technical solution flow chart of a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0100] Figure 3 A schematic diagram of the execution dependency relationship between CS and ComS in a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0101] Figure 4 A schematic diagram of a deep reinforcement learning training process in a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0102] Figure 5 It is a schematic diagram of the convergence of different hyperparameter settings in a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0103] Figure 6 A schematic diagram of average processing delays under different computing power environments in a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0104] Figure 7 A schematic diagram of average processing delay under different storage capacity environments in a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention;

[0105] Figure 8This is a schematic diagram of service initialization delay of different algorithms in a joint optimization decision method for service placement and resource allocation for IoT-MEC in an embodiment of the present invention. DETAILED DESCRIPTION

[0106] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0107] See also Figure 1 The present invention proposes a joint optimization decision method for service placement and resource allocation for IoT-MEC, including:

[0108] S1. Obtain heterogeneous application apps initiated by all devices in the IoT-MEC environment i The computing requirements of each heterogeneous application are k i It consists of a CS and a ComS;

[0109] Specifically,

[0110] Get m heterogeneous applications initiated by all devices in the IoT-MEC environment Among them, 1≤i≤m, each heterogeneous application consists of k i It consists of a CS and a ComS. The CS is used to cache the data required to execute the ComS. The ComS is used to start the calculation after receiving all the data cached by the CS.

[0111] Determine the computing requirements of each heterogeneous application based on the computing resources and storage resources required when deploying CS and ComS in each heterogeneous application;

[0112] S2. When obtaining regular service placement and resource allocation, all heterogeneous application apps i The average processing delay of each task is calculated, and a joint optimization problem is generated based on the goal of minimizing the average processing delay of each task.

[0113] Specifically,

[0114] When obtaining general service placement and resource allocation, all heterogeneous applications i The average processing delay of each task is calculated, and based on the goal of minimizing the average processing delay of each task, a joint optimization problem is generated, including:

[0115] When obtaining regular service placement and regular resource allocation, heterogeneous application apps that are serviced are sorted according to the m / m / 1 queue. i The average length of stay W i , calculate the heterogeneous applications app requested in unit time slot t i Total delay The calculation formula is:

[0116]

[0117] Among them, λ i Access heterogeneous applications app per unit time slot t i The number of requests meets the expected value of the Poisson distribution;

[0118] According to the total delay When calculating the general resource allocation, all heterogeneous applications app i The average processing delay T exe ; The calculation formula is:

[0119]

[0120] Where m is the total number of heterogeneous applications in the current IoT-MEC environment;

[0121] Based on the goal of minimizing the average task response time, a joint optimization problem is generated:

[0122]

[0123] in, T exe To minimize the average task processing delay, p* represents the optimal service placement strategy, and n* represents the optimal resource allocation strategy in the MEC environment;

[0124] When obtaining regular resource allocation, heterogeneous application apps that are serviced are sorted according to the m / m / 1 queue. i The average length of stay W i ,include:

[0125] Get heterogeneous application apps i The transmission delay from the kth CS to the ComS with dependency The calculation formula is:

[0126]

[0127] Among them, e i,k Indicates that the app i The size of the response data sent by the kth CS to ComS, h i To place the app i The edge server of ComS service, Indicates application app i The edge server of the kth CS service, The bandwidth between the edge servers that place services CS and ComS, Represents the judgment function, if h i and For different edge servers, Otherwise it is 0;

[0128] According to the transmission delay Calculate heterogeneous application app i The transmission delay from all CSs to the dependent ComS The calculation formula is:

[0129]

[0130] According to the transmission delay Calculate the heterogeneous applications app within the unit time slot t i The service rate μ i ; The calculation formula is:

[0131]

[0132] Among them, c i To execute heterogeneous applications i Calculate the expected number of CPU cycles required, n i Assign edge servers to heterogeneous applications i computing resources;

[0133] According to the service rate μ i , calculate the heterogeneous application apps that are serviced according to the m / m / 1 queue sorting i The average length of stay W i ; The calculation formula is:

[0134]

[0135] Among them, λ i Access heterogeneous applications app per unit time slot t i The number of requests meets the expected value of the Poisson distribution;

[0136] S3. Based on computing requirements, use the KKT method and deep reinforcement learning to solve the joint optimization problem, output the service placement strategy, and obtain the optimal resource allocation solution;

[0137] Specifically,

[0138] According to computing requirements, the KKT method and deep reinforcement learning are used to solve the joint optimization problem, output the service placement strategy, and obtain the optimal resource allocation solution, including:

[0139] Based on the goal of simplifying the complexity of the joint optimization problem, the joint optimization problem is decomposed into a resource allocation optimization problem and a service placement optimization problem;

[0140] Model the service placement optimization problem as a Markov decision process and identify the three decision elements in the Markov decision process: state space, action space, and reward function;

[0141] Based on the deep reinforcement learning algorithm, the service placement decision model is trained and generated according to the three decision-making factors;

[0142] Output service placement strategy based on computing requirements and service placement decision model;

[0143] Get all heterogeneous application apps that meet the m / m / 1 queue stability i The service placement strategy generates the objective function:

[0144]

[0145] in, is the total number of ComS placed on the edge server h, is the expected number of q-th ComS requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the qth ComS placed on edge server h, Allocate computing resources of the qth ComS to edge server h, is the transmission delay of the qth ComS placed on the edge server h, heterogeneous application app i If the service placement strategy is known, is a constant;

[0146] Determine whether the objective function is a convex function;

[0147] If the objective function is convex, obtain the Lagrangian function:

[0148]

[0149] Among them, n h represents the resource allocation strategy of edge server h to ComS deployed on h, β represents the Lagrange multiplier, is the maximum computing resource on the edge server h;

[0150] Based on the KKT method, the KKT conditions are generated according to the joint optimization problem:

[0151]

[0152] Among them, F(n h ) is the total processing delay of various tasks completed by edge server h in each unit time slot t, and d() represents the derivative operation;

[0153] According to the Lagrangian function and KKT conditions, the optimal resource allocation solution is obtained:

[0154]

[0155] in, is the optimal allocation scheme for allocating the computing resources of the q′th ComS on the edge server h, is the expected number of q′th ComS service requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the q′th ComS service placed on edge server h, Calculate the transmission delay of the service for the q′th ComS placed on the edge server h;

[0156] Determine the three elements of decision making in the Markov decision process: state space, action space, and reward function, including:

[0157] The state space is S t ∈S, represents the current state observed from the edge computing system, Among them, s represents the state set, S t represents the state at time slot t, Indicates the status of the cache service. Indicates the status of the computing service;

[0158] The action space is A t , represents the service placement decision that the nodes of the edge computing system need to make based on the current state at each time slot t. in, represents a placement operation on CS, Represents a placement operation on ComS;

[0159] The reward function is R t , represented in the state space S t After taking action in, the node of the edge computing system will receive a reward R from the edge computing system t :

[0160]

[0161] Wherein, formula (I) indicates that the service is successfully placed, T exe For heterogeneous applications in service i The average processing delay, T iniis the service initialization delay of all services, ε is the reward coefficient set to avoid the decision model only minimizing the service initialization delay and ignoring the average processing delay, ε∈(0,1); Formula (II) represents the service placement strategy that does not meet the resource constraints, ψ is the penalty for the service placement strategy that does not meet the resource constraints, ψ<<-(T exe +εT ini ); Formula (III) represents that the service placement strategy satisfies the resource constraints, but there are application tasks that cannot be completed in the unit time slot t, and η is a constant coefficient greater than 1;

[0162]

[0163] Among them, T ini For all heterogeneous applications app deployed on the edge server h i The initialization delay of the corresponding service, Q h is the number of all services placed on the edge server h, The service initialization delay for the qth service deployed on edge server h;

[0164]

[0165] Among them, s h,q is the service instance size of the qth service on edge server h, R h is the bandwidth between the edge server h and the cloud server;

[0166] Based on the deep reinforcement learning algorithm, the service placement decision model is trained and generated according to the three decision-making elements, including the following steps:

[0167] Step 1: Initialize the policy network and value network. The policy network is used to generate execution actions in a given state, and the value network is used to evaluate the expected returns of different states.

[0168] Step 2: Use the execution actions generated by the policy network to execute actions in the current IoT-MEC environment, and collect the status, action, reward, new status and end flag during the execution process to form trajectory data;

[0169] Step 3: According to the trajectory data, based on the output of the value network and the actual reward obtained, the advantage function is calculated, and the policy network is updated through the advantage function; the PPO algorithm is used in the updating process;

[0170] Step 4: Obtain the error between the minimum actual reward and the predicted reward contained in the trajectory data, and update the value network;

[0171] Step 5: Repeat steps 2 to 4 until the preset number of training rounds is reached or the policy network reaches the preset performance standard, and then terminate the training and output the service placement decision model;

[0172] Get all heterogeneous application apps that meet the m / m / 1 queue stability i The service placement strategy generates the objective function, and the conditions for the stability of the m / m / 1 queue include:

[0173] Get the prerequisites for satisfying the stability of the m / m / 1 queue:

[0174]

[0175] in, is the utilization rate of the qth service placed on edge server h, is the service rate of the qth service placed on edge server h, for The lower limit of

[0176] Get the computing resource conditions that satisfy the stability of the m / m / 1 queue:

[0177]

[0178] in, It means that edge server h can allocate at least computing resources;

[0179] Determine whether the objective function is a convex function, including:

[0180] When all heterogeneous applications i After the service placement strategy is determined, is a constant, and the equivalent transformation objective function α is the equivalent objective function α′:

[0181]

[0182] According to the equivalent objective function, it is determined that the edge server h completes the heterogeneous application app within the unit time slot i The processing delay of all tasks is The calculation formula is:

[0183]

[0184] According to the processing delay The total processing delay F(n h ), the calculation formula is:

[0185]

[0186] Based on minimizing F(n h ) goal, for F(n h ) to perform first-order partial derivatives and second-order partial derivatives, and the calculation formula is:

[0187]

[0188] Among them, if according to It can be proved that Then the objective function is determined to be a convex function;

[0189] The working principle of the above technical solution is as follows: The present invention proposes a joint optimization solution for service placement and resource allocation in IoT-MEC environment; the core goal of this solution is to minimize the average response time of tasks, that is, to minimize the average processing delay of tasks, thereby improving the overall efficiency of the system and user experience; to achieve this goal, we need to take the following steps:

[0190] 1) Model the IoT-MEC environment in detail to ensure that all system components and resource constraints are accurately represented; 2) Based on the modeling, design a solution, including algorithms and computational frameworks, to handle the joint optimization problem of service placement and resource allocation;

[0191] The technical solution of the present invention is based on specific application scenarios and optimization goals, and models the system by using appropriate mathematical models; this modeling process includes quantification of various evaluation indicators and constraints; then, combining convex optimization technology and deep reinforcement learning algorithm, the present invention solves the joint optimization problem of service placement and resource allocation; Figure 2 The overall technical solution of this study is presented; the following is a detailed technical implementation plan:

[0192] 1. IoT-MEC Modeling

[0193] a. System Model

[0194] Assume that there are m applications (denoted as app1, app2, ..., app m ); the storage space and computing resources required to accommodate these applications are often heterogeneous;

[0195] Each heterogeneous application consists of a i The application program app consists of a CS and a ComS, where the CS is responsible for caching the data required to execute the ComS. The ComS receives all the data cached by the CS before it can start execution. i It can be defined as:

[0196]

[0197] like Figure 3 As shown, app i The execution dependency can be represented as a simple directed graph; in this case, deploying ComS requires storage space and computing resources to execute tasks, while deploying CS requires more storage resources and only basic computing resources to maintain operations, so when considering resource allocation, we only allocate computing resources to ComS;

[0198] In the IoT-MEC environment, there are H heterogeneous edge servers (denoted as ES1, ES2, ..., ES h , ..., ES H ) Place heterogeneous applications; In addition, when placing services, they need to be migrated from cloud servers to edge servers;

[0199] To describe our model more clearly, we discretize time into a set of equally spaced time slots T = 1, 2, ..., T , The interval of each time slot is denoted by t, t∈T, and we use a binary variable To indicate app i The service placement decision of the kth service in time slot t is This means that the service is not placed in ES h On; if This means that the service is placed on ES h Assume that for each time slot, IoT devices generate various types of task requests, and the execution of these requests requires the placement of corresponding services on edge nodes; Assume that after M time slots, there is a need to redeploy services due to production needs or application updates; At this time, decisions must be made about the deployment plan and the corresponding resource allocation decisions based on the arrival of the next stage of tasks;

[0200] In each time slot t∈T, we will request the service app i The arrival of a task is described as the arrival rate λ i Poisson process; this λ i represents the request app arriving at the edge node during time slot T i In addition, we set the service app i The CPU cycles required for the task being served follow the expected value of c i exponential distribution of

[0201] In addition, it is not feasible to deploy all services on a single edge server due to the limited storage capacity of each edge server. Furthermore, considering the limited computing power of each edge server, an inappropriate placement strategy may not meet the computing requirements of different heterogeneous applications. Therefore, in order to meet the computing needs, it is necessary to make wise service placement decisions and design resource allocation schemes.

[0202] In addition, we set ES h The maximum storage space and computing resources on and Then we have:

[0203]

[0204] Where Q h Indicates ES h The number of all services placed on Indicates ES h The qth service placed on the Indicates ES h The computing resources allocated to the qth computing type service;

[0205] b. Service initialization delay

[0206] For each service placed on a server, we instantiate a virtual machine for it and allocate appropriate computing resources to serve requests; the edge node deploys the service on the edge server under the guidance of the service placement decision. Note that the deployment of a specific service requires downloading its related data and software from the cloud, which consumes a certain amount of time; in terms of the service initialization delay of the qth service deployed on server h, its service initialization delay can be expressed as:

[0207]

[0208] where s h,q (Mbit) indicates the size of the environment context of the service, R h (Mbps) represents the bandwidth between server h and the cloud server; the service initialization delay of all services can be expressed as:

[0209]

[0210] c. Task execution delay

[0211] As mentioned earlier, heterogeneous applications in IoT-MEC environments consist of a different number of services, and the execution of components in each application depends on data requested from all relevant CSs;

[0212] For the average stay delay, we set the access time per unit time t to heterogeneous types of applications app i The number of requests follows the expected value of λ i Poisson distribution, and in app i The CPU cycles required to execute the computing service in the expected value is c i exponential distribution; we instantiate a VM for each placed service, so the tasks requesting the compute service placed in each VM can be viewed as an m / m / 1 queue, from which we can calculate the requested application app i The average length of stay can be expressed as:

[0213]

[0214] where μ i Indicates the number of apps used per unit time i The service rate can be expressed as:

[0215]

[0216] where c i (cpu cycles) represents the computational requirements required to perform the task, n i (cpu cycles / second) represents the computing resources allocated to the task by the edge server. Indicates the application app on the server i The average processing time of ComS, Indicates application app i All CS to app i The transmission time of ComS, that is, the transmission delay of transmitted data, can be expressed as:

[0217]

[0218] where e i,k Indicates that the application i The size of the response data sent by the kth CS to ComS, h i Indicates placement of application app i ComS service server, App i The server of the kth CS service, and is the bandwidth between the servers where CS and ComS are placed, Represents the judgment function. If h i and represents the same server, then On the contrary, In addition, since each ComS involves multiple CSs transmitting data to it, the application i The total transmission delay can be expressed as:

[0219]

[0220] 2. Problem description

[0221] In unit time, IoT service app i The number of access requests is subject to λ i Poisson distribution, which means that the number of app i The average number of visits is λ i , so the app is requested per unit time i The total delay of a task can be expressed as:

[0222]

[0223] Then for any task in IoT-MEC, the average processing delay can be expressed as:

[0224]

[0225] In this paper, our goal is to minimize the average processing time of tasks; to achieve this goal, we adopt a comprehensive optimization method that uses DRL and KKT to solve the joint service placement and resource allocation optimization problem; mathematically, the problem of minimizing the average processing time of tasks can be formulated as follows:

[0226]

[0227] 3. Algorithm design

[0228] In IoT-MEC environments, it is crucial to address service placement and resource allocation challenges; initially, our investigation focused on the complex interrelationship between these two aspects; the service placement problem mainly deals with the optimal distribution of services across edge servers, emphasizing their effective localization; the resource allocation problem focuses on the reasonable allocation of computing resources; crucially, the interaction between these aspects is crucial: service placement profoundly affects resource allocation, as services require specific resources such as computing and storage on their respective nodes; in addition, optimal resource allocation schemes are also developed to improve system performance given the current service placement settings; in fact, these two processes are interdependent and require coordinated decisions; effective service placement must consider the wise use of limited computing resources across different servers, and the optimal resource allocation scheme should be coordinated with the service placement strategy to achieve the optimization goal;

[0229] For the joint optimization problem in IoT-MEC environment, the interaction of service placement and resource allocation is crucial, which together determine the average execution delay of tasks; handling service placement and resource allocation simultaneously is a challenge; in this paper, we design a solution based on KKT method and policy gradient algorithm (a DRL algorithm Proximal Policy Optimization, PPO), which games the rewards obtained from the joint service placement and resource allocation decisions of each service to obtain the global service placement and resource allocation decision of IoT-MEC environment, aiming to minimize the average processing delay of applications and minimize the service initialization delay; in order to better clarify the reward function of DRL algorithm in the subsequent discussion, we first give the resource allocation algorithm we designed;

[0230] a) Optimal resource allocation plan

[0231] Before finding the best resource allocation, we need to introduce such a concept: the premise of queue stability is that the utilization rate ρ < 1, ρ is usually expressed as:

[0232]

[0233] The lower limit It can be obtained from the following formula:

[0234]

[0235] The value must be at least equal to the lower limit to ensure queue stability. To ensure queue stability, the following equation must be satisfied:

[0236]

[0237] This at least ensures that the allocated computing resources can be greater than or equal to its lower limit; the following speculations are based on ρ < 1;

[0238] Assuming that we have obtained the service placement decision based on the current situation, for each ComS, we instantiate a virtual machine (VM) and allocate available resources to the VM to specifically process the ComS placed on the VM; the goal of resource allocation is to minimize the average execution latency of the ComS on the server, and the objective function can be expressed as follows:

[0239]

[0240] in, is the total number of ComS placed on the edge server h, is the expected number of q-th ComS requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the qth ComS placed on edge server h, Allocate computing resources of the qth ComS to edge server h, is the transmission delay of the qth ComS placed on the edge server h, heterogeneous application app i If the service placement strategy is known, is a constant;

[0241] After generating the service placement decision, All except are constants; since is a constant. To facilitate the solution, the objective function can be equivalent to:

[0242]

[0243] Server h completes request app in unit time i The execution delay of all tasks can be expressed as a function

[0244]

[0245] The total execution delay of various tasks completed by server h per unit time can be expressed as the function F(n h ):

[0246]

[0247] Our goal is to find F(n h ) minimum value; we can find F(n h ) for any The first and second partial derivatives of :

[0248]

[0249] We can prove that according to ρ<1 Then the objective function is a convex function, and we can find the minimum value through the KKT method; first establish the Lagrangian function:

[0250]

[0251] We can list the KKT conditions:

[0252]

[0253] According to the Lagrangian function and KKT conditions, we can obtain the optimal resource allocation solution:

[0254]

[0255] b) Service placement strategy

[0256] After conducting the above analysis, we conclude that given the service placement decision and the environment in which the service arrives, the optimal resource allocation for each edge server can be determined; subsequently, in order to solve the service placement problem, we propose a service placement algorithm based on deep reinforcement learning;

[0257] In order to design a service placement algorithm that leverages deep reinforcement learning, we must first model the problem as a Markov decision process (MDP); in computer science, a standard MDP is represented as a tuple<S,A,p,R,γ> , including five key elements: S represents the state set, A represents the action set, P represents the transition probability function, R represents the reward function, and γ represents the discount factor; this tuple concisely encapsulates the core components that define the dynamics and characteristics of MDP, providing a formal and comprehensive framework for computational modeling and analysis;

[0258] In a dynamic environment, the agent must first observe the current state and then decide on the best action; after the environment accepts the chosen action, a reward is issued, marking the end of an interaction cycle; this process is repeated continuously, and the agent's goal is to optimize its behavior by maximizing the cumulative rewards of continuous interaction with the environment; the ultimate goal is to learn and execute actions that lead to the most favorable results, consistent with the goal of obtaining the highest cumulative reward;

[0259] Therefore, the service placement optimization problem is modeled as an MDP; given that the IoT-MEC environment proposed in this study is model-free, no transition probabilities are required; therefore, the MDP is conceptualized into three components: the state space S, the action space A, and the reward function R t In order to customize the model for edge computing scenarios, the reinforcement learning components are specifically designed as follows;

[0260] State space: S t ∈S contains the current information observed from the edge computing system, which affects the reward obtained from the environment after taking an action; in our model, we consider each state to contain two parts, namely the cache service and the computing service; some information can be expressed as:

[0261]

[0262] These include the average storage resources, computing resources required for caching and computing services, and the arrival of services in the current time slot; Action space: At each time slot t, the edge node needs to make a service placement decision based on the current state, which can be expressed as:

[0263]

[0264] in represents a placement operation on CS, represents a put operation on ComS,

[0265] Reward function: After taking action in state St, the edge node will receive a reward Rt from the edge computing system; in our model, our main goal is to minimize the average processing delay of the service, and we want to make the service initialization delay as short as possible, so we set the reward function as:

[0266]

[0267] Case (I) indicates that the service is successfully placed, we take -(T exe +εT ini ), since the service initialization delay is often much larger than the average execution delay of any application, we multiply it by a coefficient ε∈(0,1) to weaken its impact and avoid our model only seeking to minimize the service initialization delay at the expense of our main goal; Case (ID) shows that the service placement strategy cannot meet the resource constraints, while case (III) shows that the service placement meets the resource constraints, but there are applications that cannot be completed in the unit time slot, so we multiply it by a coefficient η greater than 1; We model the IoT-MEC environment as an MDP and solve the service placement strategy through deep reinforcement learning;

[0268] 4. Train the service placement decision model based on deep reinforcement learning algorithm

[0269] Based on the deep reinforcement learning model constructed above, combined with the optimal resource allocation solution we designed, we train the service placement decision model; the training process is as follows: Figure 4 ;

[0270] At the beginning of training, the policy network and value network are initialized; the policy network is used to generate actions to be performed in a given state, while the value network is used to estimate the expected return of a certain state; the current policy network is used to perform actions in the environment, and a series of data on states, actions, rewards, new states, and end markers are collected; the trajectory composed of these data is used for subsequent learning and optimization; the collected data is used to calculate the advantage function, which measures how much better the execution of an action is compared to the average level; the calculation of the advantage function is usually based on the output of the value network and the actual reward obtained; the policy network is updated using the advantage function; the key to the DRL algorithm we use is that it avoids destructive large updates during training (i.e., avoiding too drastic policy changes) by limiting the difference between the policies before and after the update; this is usually achieved by clipping the policy ratio (i.e., the probability ratio between the new policy and the old policy) to ensure that the policy update step is not too large; at the same time, the value network is updated to more accurately estimate the value of the state; the update of the value network is usually based on minimizing the error between the actual return and the predicted return; the above steps are repeated until the policy network converges to a better policy or reaches a preset number of training rounds or performance standards;

[0271] Figure 5 The convergence of the decision model under different hyperparameter settings is shown. After the decision model training converges, we can use the converged decision model to determine the service placement decision. In order to verify the effectiveness of the decision model we use, we compare the average execution latency of different methods in different environments. Figure 6 As shown in , we show the average processing latency of tasks in different computing power environments; Figure 7 As shown in , we show the performance of service placement strategies in environments with different storage capabilities on the average processing latency of tasks; Figure 8 As shown in the figure, we show the service initialization delay of the service placement strategy output by different algorithms; In summary, the algorithm we proposed is the best in terms of the average processing delay of tasks in each environment compared with the comparison algorithm, while also taking into account the performance of service initialization delay, which shows the effectiveness of our algorithm in different scenarios;

[0272] The beneficial effects of the above technical solution are as follows: Different from the prior art which mainly focuses on considering the placement of CS and ComS separately, the present application incorporates the execution dependency between CS and ComS when planning the service placement. This consideration undoubtedly increases the complexity of the problem, but it also has the potential to significantly improve the efficiency of task processing. Through this method, the interaction between different types of services can be more accurately simulated, thereby optimizing the overall system performance and ensuring efficient collaboration during data processing and transmission. This in-depth consideration of execution dependency is a key step in promoting the Internet of Things and mobile edge computing environments to move towards higher performance and responsiveness;

[0273] In real scenarios, the execution of ComS often requires data cached by multiple CSs, which may involve multiple types of cached data. Different from other existing technical studies that often only focus on the dependency between a CS and a ComS requested by a single application, this application breaks through this limitation and fully considers that multiple CSs in each application provide the cached data required for ComS execution. This meticulous consideration ensures that the solution can better meet the actual needs in complex environments and improve the performance and efficiency of the system.

[0274] At the same time, this application proposes an IoT-MEC service placement and resource allocation solution that combines deep reinforcement learning DRL and KKT optimization. Compared with existing algorithms, the method of this application has significant advantages;

[0275] First, this application can quickly adapt to the dynamic characteristics of the IoT-MEC environment and effectively handle real-time changing scenarios;

[0276] Secondly, with the help of DRL real-time decision-making and the accuracy of KKT conditions, this application can obtain the optimal results more quickly and efficiently;

[0277] By combining these two methods, the present application not only improves the performance but also enhances the robustness to environmental changes, thereby providing a more reliable and sustainable solution for the optimization and implementation of IoT-MEC systems.

[0278] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.

Claims

1. A joint optimization decision method for service placement and resource allocation for IoT-MEC, characterized in that: include: Get heterogeneous application apps initiated by all devices in the IoT-MEC environment i The computing requirements of each heterogeneous application are k i It consists of a CS and a ComS; When obtaining general service placement and resource allocation, all heterogeneous applications i The average processing delay of each task is calculated, and a joint optimization problem is generated based on the goal of minimizing the average processing delay of each task. According to computing requirements, the KKT method and deep reinforcement learning are used to solve the joint optimization problem, output the service placement strategy, and obtain the optimal resource allocation solution.

2. According to claim 1, a joint optimization decision method for service placement and resource allocation for IoT-MEC is characterized in that: Get heterogeneous application apps initiated by all devices in the IoT-MEC environment i The computing requirements include: Get m heterogeneous applications initiated by all devices in the IoT-MEC environment Among them, 1≤i≤m, each heterogeneous application consists of k i It consists of a CS and a ComS. The CS is used to cache the data required to execute the ComS. The ComS is used to start the calculation after receiving all the data cached by the CS. Determine the computing requirements of each heterogeneous application based on the computing resources and storage resources required when CS and ComS are deployed in each heterogeneous application.

3. According to claim 1, a joint optimization decision method for service placement and resource allocation for IoT-MEC is characterized in that: When obtaining general service placement and resource allocation, all heterogeneous applications i The average processing delay of each task is calculated, and based on the goal of minimizing the average processing delay of each task, a joint optimization problem is generated, including: When obtaining regular service placement and regular resource allocation, heterogeneous application apps that are serviced are sorted according to the m / m / 1 queue. i The average length of stay W i , calculate the heterogeneous applications app requested in unit time slot t i Total delay The calculation formula is: Among them, λ i Access heterogeneous applications app per unit time slot t i The number of requests meets the expected value of the Poisson distribution; According to the total delay When calculating the general resource allocation, all heterogeneous applications app i The average processing delay T exe ; The calculation formula is: Where m is the total number of heterogeneous applications in the current IoT-MEC environment; Based on the goal of minimizing the average task response time, a joint optimization problem is generated: in, T exe To solve the optimization problem of minimizing the average task processing delay, p* represents the optimal service placement strategy, and n* represents the optimal resource allocation strategy in the MEC environment.

4. According to claim 3, a joint optimization decision method for service placement and resource allocation for IoT-MEC is characterized in that: When obtaining regular resource allocation, heterogeneous application apps that are serviced are sorted according to the m / m / 1 queue. i The average length of stay W i ,include: Get heterogeneous application apps i The transmission delay from the kth CS to the ComS with dependency The calculation formula is: Among them, e i,k Indicates that the app i The size of the response data sent by the kth CS to ComS, h i To place the app i The edge server of ComS service, Indicates application app i The edge server of the kth CS service, The bandwidth between the edge servers that place services CS and ComS, Represents the judgment function, if h i and For different edge servers, Otherwise it is 0; According to the transmission delay Calculate heterogeneous application app i The transmission delay from all CSs to the dependent ComS The calculation formula is: According to the transmission delay Calculate the heterogeneous application app within the unit time slot t i The service rate μ i ; The calculation formula is: Among them, c i To execute heterogeneous applications i The expected value of the CPU cycles required for ComS calculation, n i Assign edge servers to heterogeneous applications i The computing resources of ComS; According to the service rate μ i , calculate the heterogeneous application apps that are serviced according to the m / m / 1 queue sorting i The average length of stay Wi is calculated as follows: Among them, λ i Access heterogeneous applications app per unit time slot t i The number of requests satisfies the expected value of the Poisson distribution.

5. According to claim 1, a joint optimization decision method for service placement and resource allocation for IoT-MEC is characterized in that: According to computing requirements, the KKT method and deep reinforcement learning are used to solve the joint optimization problem, output the service placement strategy, and obtain the optimal resource allocation solution, including: Based on the goal of simplifying the complexity of the joint optimization problem, the joint optimization problem is decomposed into a resource allocation optimization problem and a service placement optimization problem; Model the service placement optimization problem as a Markov decision process and identify the three decision elements in the Markov decision process: state space, action space, and reward function; Based on the deep reinforcement learning algorithm, the service placement decision model is trained and generated according to the three decision-making factors; Output service placement strategy based on computing requirements and service placement decision model; Get all heterogeneous application apps that meet the m / m1 queue stability requirements i The service placement strategy generates the objective function: in, is the total number of ComS placed on the edge server h, is the expected number of q-th ComS requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the qth ComS placed on edge server h, Allocate computing resources of the qth ComS to edge server h, is the transmission delay of the qth ComS placed on the edge server h, heterogeneous application app i If the service placement strategy is known, is a constant; Determine whether the objective function is a convex function; If the objective function is convex, obtain the Lagrangian function: Among them, n h represents the resource allocation strategy of edge server h to ComS deployed on h, β represents the Lagrange multiplier, is the maximum computing resource on the edge server h; Based on the KKT method, the KKT conditions are generated according to the joint optimization problem: Among them, F(n h ) is the total processing delay of various tasks completed by edge server h in each unit time slot t, and d0 represents the derivative operation; According to the Lagrangian function and KKT conditions, the optimal resource allocation solution is obtained: in, is the optimal allocation scheme for allocating the computing resources of the q′th ComS on the edge server h, is the expected number of q′th ComS service requests placed on the edge server h per unit time slot t, Calculate the expected value of required cpu cycles for the q′th ComS service placed on edge server h, Calculate the service transmission delay for the q′th ComS placed on the edge server h.

6. The method for joint optimization decision of service placement and resource allocation for IoT-MEC according to claim 5, characterized in that: Determine the three elements of decision making in the Markov decision process: state space, action space, and reward function, including: The state space is S t ∈S, represents the current state observed from the edge computing system, Among them, S represents the state set, S t represents the state at time slot t, Indicates the status of the cache service. Indicates the status of the computing service; The action space is A t , represents the service placement decision that the nodes of the edge computing system need to make based on the current state at each time slot t. in, represents a placement operation on CS, Represents a placement operation on ComS; The reward function is R t , represented in the state space S t After taking action in, the node of the edge computing system will receive a reward R from the edge computing system t : Wherein, formula (I) indicates that the service is successfully placed, T exe For heterogeneous applications in service i The average processing delay, T ini is the service initialization delay of all services, ε is the reward coefficient set to avoid the decision model only minimizing the service initialization delay and ignoring the average processing delay, ε∈(0,1); Formula (II) represents the service placement strategy that does not meet the resource constraints, ψ is the penalty for the service placement strategy that does not meet the resource constraints, ψ<<-(T exe +εT ini ); Formula (III) represents that the service placement strategy satisfies the resource constraints, but there are application tasks that cannot be completed in the unit time slot t, and η is a constant coefficient greater than 1; Among them, T ini For all heterogeneous applications app deployed on the edge server h i The initialization delay of the corresponding service, Q h is the number of all services placed on the edge server h, The service initialization delay for the qth service deployed on edge server h; Among them, s h,q is the service instance size of the qth service on edge server h, R h is the bandwidth between the edge server h and the cloud server.

7. The method for joint optimization decision of service placement and resource allocation for IoT-MEC according to claim 5, characterized in that: Based on the deep reinforcement learning algorithm, the service placement decision model is trained and generated according to the three decision-making elements, including the following steps: Step 1: Initialize the policy network and value network. The policy network is used to generate execution actions in a given state, and the value network is used to evaluate the expected returns of different states. Step 2: Use the execution actions generated by the policy network to execute actions in the current IoT-MEC environment, and collect the status, action, reward, new status and end flag during the execution process to form trajectory data; Step 3: According to the trajectory data, based on the output of the value network and the actual reward obtained, the advantage function is calculated, and the policy network is updated through the advantage function; the PPO algorithm is used in the updating process; Step 4: Obtain the error between the minimum actual reward and the predicted reward contained in the trajectory data, and update the value network; Step 5: Repeat steps 2 to 4 until the preset number of training rounds is reached or the policy network reaches the preset performance standard, and then terminate the training and output the service placement decision model.

8. The method for joint optimization decision of service placement and resource allocation for IoT-MEC according to claim 5, characterized in that: Get all heterogeneous application apps that meet the m / m / 1 queue stability i The service placement strategy generates the objective function, and the conditions for the stability of the m / m / 1 queue include: Get the prerequisites for satisfying the stability of the m / m / 1 queue: in, is the utilization rate of the qth service placed on edge server h, is the service rate of the qth service placed on edge server h, for The lower limit of Get the computing resource conditions that satisfy the stability of the m / m / 1 queue: in, It means that edge server h can allocate at least computing resources.

9. The method for joint optimization decision of service placement and resource allocation for IoT-MEC according to claim 5, characterized in that: Determine whether the objective function is a convex function, including: When all heterogeneous applications i After the service placement strategy is determined, is a constant, and the equivalent transformation objective function α is the equivalent objective function α′: According to the equivalent objective function, it is determined that the edge server h completes the heterogeneous application app within the unit time slot i The processing delay of all tasks is The calculation formula is: According to the processing delay The total processing delay F(n h ), the calculation formula is: Based on minimizing F(n h ) goal, for F(n h ) to perform first-order partial derivatives and second-order partial derivatives, and the calculation formula is: Among them, if according to It can be proved that Then the objective function is determined to be a convex function.