Routing decision updating method, system and device based on CPU operating frequency

By using a routing decision update method based on CPU operating frequency in mobile edge computing, combined with delay-aware and energy-aware models, optimizing microservice instance deployment and request routing solves the problems of high energy consumption and slow response in MEC scenarios, and achieves More efficient resource utilization and response.

CN118316860BActive Publication Date: 2024-08-30湖北省楚天云有限公司 +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410723761.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-08-30
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

In mobile edge computing (MEC) scenarios, it is difficult for existing technologies to achieve more flexible and responsive network services while minimizing energy consumption, especially when large-scale user requests occur due to the complexity and resources of the service call graph. Excessive use leads to the problem of high energy consumption.

Method used

Through the routing decision update method based on CPU working frequency, combined with the delay-aware reward scaling near-end policy optimization model and the energy-aware adaptive frequency scaling model, the deployment of microservice instances and request routing decisions are optimized, and the CPU working frequency is dynamically adjusted to optimize system performance. Consumption.

Benefits of technology

It improves the efficiency of network data processing and request response, reduces the overall energy consumption of the system, and achieves more efficient resource utilization and more flexible service response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118316860B
    Figure CN118316860B
Patent Text Reader

Abstract

The present invention discloses a routing decision updating method, system and device based on CPU operating frequency, the method comprising: determining a multi-edge node network and a set of pending user requests; obtaining the deployment status of service instances and request routing decisions through a delay-aware reward scaling proximal policy optimization model according to the multi-edge node network and the set of pending user requests; obtaining the CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capacity and the deployment status of the service instance; and updating the request routing decision according to the CPU operating frequency decision. The present invention derives the optimal static deployment and routing decision of microservices in the network through a delay-aware reward scaling proximal policy optimization model, and dynamically adjusts the CPU operating frequency through an energy-aware adaptive frequency scaling model to optimize system energy consumption, thereby improving the efficiency of network data processing and request response, and reducing the overall energy consumption of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile edge computing technology, and in particular to a routing decision updating method, system and device based on CPU operating frequency. Background Art

[0002] In recent years, with the explosive growth of network computing, traditional virtualized network functions (VNFs) are no longer sufficient to meet the growing needs of users. The microservice architecture, due to its high modularity and independence, has brought new opportunities for providing high-quality network services. Compared with VNF, microservices decompose large monolithic applications into multiple independent service instances, which can collaborate with each other while running independently. Due to its excellent reliability and scalability, it has been widely used in mobile edge computing (MEC) scenarios. The independence and dynamic adjustment characteristics of microservice instances enable it to effectively adjust the number of instances according to service requirements, thereby playing a significant role in reducing network energy consumption.

[0003] In an MEC network environment, user requests usually require the collaborative processing of multiple microservice instances of different types. These instances are not only frequently reused, but also need to communicate with each other frequently, establishing strong dependencies. When faced with large-scale user requests, communication between instances becomes more complicated, resulting in a sharp increase in the size of the service call graph. The overall performance of microservice applications depends largely on the fine deployment of microservice instances and the intelligent routing of user requests.

[0004] However, most current studies treat the deployment of microservice instances and the routing of user requests as two independent issues, ignoring the inherent coupling between them. Some studies focus only on the deployment of service instances, ignoring the critical impact of request routing on system performance; on the contrary, some studies delve into request routing or scheduling issues, but ignore the challenges of instance deployment. Although separating these two issues can simplify the research, this approach can often only obtain local optimal solutions and may increase the risk of service failure and energy consumption. In addition, the pursuit of extreme network service latency often results in excessive use of resources and large energy consumption. Therefore, how to achieve more flexible and responsive MEC services while minimizing energy consumption to meet the needs of mobile network users has become an urgent problem to be solved.

[0005] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of the present invention is to provide a routing decision update method, system and device based on CPU operating frequency, aiming to solve the technical problem of how to achieve more flexible and responsive MEC services while minimizing energy consumption to meet the needs of mobile network users.

[0007] To achieve the above object, the present invention provides a routing decision updating method based on CPU operating frequency, the routing decision updating method based on CPU operating frequency comprising:

[0008] Determine a multi-edge node network and a set of pending user requests;

[0009] Obtaining the deployment status of service instances and request routing decisions through a delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests;

[0010] Obtaining a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment of the service instance;

[0011] The request routing decision is updated according to the CPU operating frequency decision.

[0012] Optionally, before the step of obtaining the deployment status of the service instance and the request routing decision through the delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests, the step further includes:

[0013] The routing strategy is obtained through the routing decision formula according to the edge computing network;

[0014] Determine the residence delay of each user request in the user request set at the microservice on the server in the routing path by using the residence delay formula according to the routing strategy;

[0015] Determine the propagation delay corresponding to each user request according to the routing path by using a propagation delay formula;

[0016] based on The queuing model establishes the objective function of minimizing request delay;

[0017] Determine a total response delay corresponding to the user request according to the routing strategy, the residence delay and the propagation delay;

[0018] According to the total response delay corresponding to the user request, the initial delay-aware reward scaling proximal strategy model is optimized by the minimization request delay objective function to obtain the total delay corresponding to the user request set;

[0019] When the total delay is less than a preset total delay threshold, the optimized initial delay-aware reward scaling proximal strategy model is used as the delay-aware reward scaling proximal strategy optimization model.

[0020] Optionally, the routing decision formula is:

[0021]

[0022]

[0023] 1

[0024] In the formula, For routing strategy, For edge computing networks, is the set of edge nodes, L is the network connection link between edge nodes, For currently deployed microservices The number of servers for the instance; For deployment on the server Microservices on Number of instances, For currently deployed microservices Number of instances, For slave server arrive The communication delay, is the weight coefficient.

[0025] Optionally, the dwell delay formula is:

[0026]

[0027]

[0028]

[0029] In the formula, For request In the routing path Medium Server Microservices on The dwell time delay at For edge nodes Microservices The service intensity of For edge nodes Microservices The total request arrival rate at It is the basic processing capability of the edge node server. is the total number of edge nodes, The probability of getting a request for all instances of microservice m on server v.

[0030] Optionally, the propagation delay formula is:

[0031]

[0032]

[0033]

[0034] In the formula, Request for user A collection of routing paths, For routing path The propagation delay under Request for user In the routing path Edge Node Microservice examples in deal with.

[0035] Optionally, the step of obtaining a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment status of the service instance includes:

[0036] Update the current CPU core processing capability to obtain updated CPU core processing capability;

[0037] Determining a processing capability difference weight according to the current CPU core processing capability and the CPU core processing capability through an energy-aware adaptive frequency scaling model;

[0038] The deployment of the service instance is updated according to the processing capability difference weight and the energy consumption minimization optimization function formula to determine the CPU operating frequency decision.

[0039] Optionally, the energy consumption minimization optimization function formula is:

[0040]

[0041]

[0042]

[0043]

[0044]

[0045] In the formula, is the total energy consumption of the edge network, To meet user requests The maximum response delay required, For edge nodes The current CPU operating frequency decision, 1 is the external frequency, 2 is the multiplier, 3 is the overclocking, For CPU at a certain operating frequency And computing resource utilization The following microservice instances are deployed on edge nodes Process user requests on the CPU cores in The energy consumption generated when For edge nodes The static energy consumption, For Server Resource utilization, For edge nodes The power consumption coefficient determined by the physical parameters in For edge nodes The number of cores.

[0046] In addition, to achieve the above purpose, the present invention also proposes a routing decision updating system based on CPU operating frequency, the routing decision updating system based on CPU operating frequency comprising:

[0047] A determination module, used to determine a multi-edge node network and a set of user requests to be processed;

[0048] A computing module, configured to obtain a deployment status of a service instance and a request routing decision through a delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests;

[0049] The calculation module is further used to obtain a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment status of the service instance;

[0050] An updating module is used to update the request routing decision according to the CPU operating frequency decision.

[0051] In addition, to achieve the above-mentioned purpose, the present invention also proposes a routing decision update device based on CPU operating frequency, the device comprising: a memory, a processor, and a routing decision update program based on CPU operating frequency stored in the memory and executable on the processor, the routing decision update program based on CPU operating frequency being configured to implement the steps of the routing decision update method based on CPU operating frequency as described above.

[0052] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a routing decision update program based on the CPU operating frequency is stored. When the routing decision update program based on the CPU operating frequency is executed by a processor, the steps of the routing decision update method based on the CPU operating frequency as described above are implemented.

[0053] The present invention first determines a multi-edge node network and a set of pending user requests, then obtains the deployment status of the service instance and the request routing decision through a delay-aware reward scaling proximal policy optimization model based on the multi-edge node network and the set of pending user requests, then obtains the CPU operating frequency decision through an energy-aware adaptive frequency scaling model based on the current CPU core processing power and the deployment status of the service instance, and finally updates the request routing decision based on the CPU operating frequency decision. The present invention derives the optimal static deployment and routing decision of microservices in the network through a delay-aware reward scaling proximal policy optimization model, and dynamically adjusts the CPU operating frequency through an energy-aware adaptive frequency scaling model to optimize system energy consumption, thereby improving the efficiency of network data processing and request response, and reducing the overall energy consumption of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a structural diagram of a routing decision updating device based on CPU operating frequency in a hardware operating environment involved in an embodiment of the present invention;

[0055] Figure 2 It is a flow chart of the first embodiment of the routing decision updating method based on CPU operating frequency of the present invention;

[0056] Figure 3 A schematic diagram of a mobile edge computing network structure of a first embodiment of a routing decision updating method based on CPU operating frequency of the present invention;

[0057] Figure 4 A schematic diagram of the microservice and its deployment on the server of the first embodiment of the routing decision update method based on the CPU operating frequency of the present invention;

[0058] Figure 5 A schematic diagram of user request traffic in one day according to the first embodiment of the routing decision updating method based on CPU operating frequency of the present invention;

[0059] Figure 6 It is a schematic diagram of the architecture of the delay-aware reward scaling proximal strategy optimization algorithm of the first embodiment of the routing decision update method based on CPU operating frequency of the present invention;

[0060] Figure 7 A schematic diagram of the architecture of an energy-aware adaptive frequency scaling algorithm of the first embodiment of the routing decision updating method based on CPU operating frequency of the present invention;

[0061] Figure 8 It is a structural block diagram of the first embodiment of the routing decision updating system based on CPU operating frequency of the present invention.

[0062] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0063] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0064] Reference Figure 1 , Figure 1 The schematic diagram of the structure of a routing decision updating device based on CPU operating frequency in a hardware operating environment involved in an embodiment of the present invention is shown.

[0065] like Figure 1 As shown, the routing decision update device based on the CPU operating frequency may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage system independent of the aforementioned processor 1001.

[0066] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the routing decision updating device based on the CPU operating frequency, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.

[0067] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a routing decision update program based on the CPU operating frequency.

[0068] exist Figure 1 In the routing decision update device based on CPU operating frequency shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the routing decision update device based on CPU operating frequency of the present invention can be set in the routing decision update device based on CPU operating frequency, and the routing decision update device based on CPU operating frequency calls the routing decision update program based on CPU operating frequency stored in the memory 1005 through the processor 1001, and executes the routing decision update method based on CPU operating frequency provided by the embodiment of the present invention.

[0069] The embodiment of the present invention provides a routing decision updating method based on CPU operating frequency, referring to Figure 2 , Figure 2 It is a flowchart diagram of the first embodiment of the routing decision updating method based on CPU operating frequency of the present invention.

[0070] In this embodiment, the routing decision updating method based on CPU operating frequency includes the following steps:

[0071] Step S10: Determine a multi-edge node network and a set of user requests to be processed.

[0072] It is easy to understand that the execution subject of this embodiment can be a routing decision update system based on CPU operating frequency with functions such as data processing, network communication and program running, or it can be other computer devices with similar functions, etc., and this embodiment is not limited.

[0073] It should be noted that the edge architecture (i.e., a multi-edge node network) includes multiple edge nodes. Each edge node consists of a base station responsible for communicating with surrounding nodes and an edge server. Multiple microservices are deployed on the server of the edge node. The combination of different microservices constitutes a microservice chain with different functions. Each microservice has multiple instances, and each type of user request corresponds to a microservice chain.

[0074] The pending user request set is the requests sent by the user through the third-party terminal that need to be processed.

[0075] Step S20: Obtaining the deployment status of service instances and request routing decisions through a delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of user requests to be processed.

[0076] It should also be understood that after the training of the delay-aware reward scaling proximal policy optimization model is completed, the multi-edge node network and the set of pending user requests can be input into the delay-aware reward scaling proximal policy optimization model, and then the deployment status of the service instance and the request routing decision can be output, wherein the deployment status of the service instance includes determining the specific number of each microservice instance deployed on the server of the edge node and the deployment location of each microservice instance on the server of the edge node, and the request routing decision includes the specific routing path of each user request between the servers of the edge node.

[0077] In this embodiment, a delay-aware reward scaling proximal strategy optimization model needs to be pre-built before it is put into use. The following is a method for building the delay-aware reward scaling proximal strategy optimization model:

[0078] In the specific implementation, a mobile edge network architecture is provided, which covers a large edge node composed of several base stations and several edge servers. Figure 3 As shown, Figure 3 This is a schematic diagram of the mobile edge computing network structure of the first embodiment of the routing decision update method based on the CPU operating frequency of the present invention. The base station plays the role of data forwarding in this architecture, while the edge server is mainly responsible for processing user requests and completing request routing. The base stations are connected to each other wirelessly and together form a connectivity graph to achieve effective data transmission. Each base station is connected to multiple edge servers, and the edge servers connected to it together form a small edge cloud network. In such a small edge cloud network, the server forwards data through the base station and communicates with servers in other small edge networks. The communication delay between servers in the same small edge network is very small and can be almost ignored.

[0079] The core of microservice architecture is to decompose traditional large-scale applications into multiple independent modules with specific functions, which work together to complete user requests. In order to ensure the high quality of services, each microservice is designed with multiple instances, so that user requests can choose between these instances to meet their own needs. These various microservice instances are combined into a linear service chain in a certain order, and each service chain corresponds to a specific user request. When the user's request reaches the system, the switches and servers in the system will work together to process and route these requests in sequence according to the order of the microservices on the service chain to meet the user's needs.

[0080] The specific process is as follows: When a user request arrives at the edge node, the system will first select an instance with a lower estimated latency for the request based on the current state of the first microservice instance, and route the request to the selected instance. After the first microservice function is processed, the server where it is located will select the next microservice instance for the request based on a specific routing algorithm. This process will be carried out in sequence until each microservice in the chain has been executed, and the final processing result will be returned to the user.

[0081] As an application of this embodiment, based on the edge node network architecture constructed above, a joint optimization of the microservice deployment strategy and the request routing strategy is performed. This optimization process includes determining the specific number of each microservice instance deployed on the edge node server and the specific deployment location on the edge node server. In addition, the request routing strategy includes designing the specific routing path of each user request between the edge node servers.

[0082] It is understandable that based on this network architecture, a latency model can be established with computing resources, request routing, and service capabilities as constraints. Each microservice has multiple instances (or images), and the deployment strategy of the microservice instances includes determining the specific number of each microservice instance and the deployment location on the edge node server. To further explain this, see Figure 4 , Figure 4 This is a schematic diagram of the microservice and its deployment on the server of the first embodiment of the routing decision update method based on the CPU operating frequency of the present invention. This figure is a schematic diagram of the deployment of the microservice on the server and the request routing. The routing strategy for user requests involves designing a specific routing path for requests between servers. By jointly optimizing the deployment of microservice instances and request routing, the coupling relationship between the two can be fully utilized, that is, the deployment of instances is used as a prerequisite for the request routing strategy, and the delay obtained after request routing is used as a criterion for evaluating the pros and cons of the deployment strategy. The algorithm will optimize the above two problems at the same time, and the ultimate goal is to achieve the optimal microservice deployment and request routing solution, so as to improve processing efficiency and service quality when processing user requests in high-concurrency and massive scenarios.

[0083] In addition, if Figure 5 As shown, Figure 5This is a schematic diagram of user request traffic in a day of the first embodiment of the routing decision update method based on the CPU operating frequency of the present invention. In the MEC network, there is a strong correlation between the number and demand of user requests and time, and the types and numbers of requests processed by edge nodes vary greatly at different times. For example, online payment and meal ordering service requests increase significantly at lunch time, while user requests in commercial areas decrease significantly after night. Therefore, the optimization method of the network architecture not only considers the availability and efficiency of the service, but also focuses on reducing energy consumption to achieve more economical and environmentally friendly network services. Through this method, the present invention aims to provide users with efficient, reliable and energy-saving mobile edge computing services to meet the dual needs of service performance and energy efficiency in modern network environments.

[0084] As an embodiment, the proposed mobile edge network architecture is modeled, specifically including: defining a network To express Figure 3 The mobile edge network structure shown in FIG. 1 defines a user request set R to represent user requests in the network.

[0085] In this network middle, represents the set of edge nodes, represents edge nodes with different geographical locations. Each edge node includes a base station and an edge server responsible for communicating with adjacent nodes. The task of the edge server is to provide the necessary computing resources for deploying microservice instances and processing user requests. The number of CPU cores indicated determines the edge node The computing resource limit of a single CPU core is defined as It is worth noting that the processing power of the CPU core increases with the CPU operating frequency. The number of microservice instances on each core can be increased by ensuring that the workload of one service instance does not affect other service instances. This approach also helps monitor and manage the computing resource utilization of edge nodes. Therefore, it is stipulated that a CPU core can only support a single microservice instance.

[0086] In addition, due to the location differences between edge nodes, there is a significant communication delay between them. Network communication delay is a key factor affecting the overall user request response delay. Considering the geographical location and diversified needs of user requests, such as the increase in online payment services in business centers and the increase in short video services in waiting areas of railway stations, user requests follow the principle of accessing the nearest edge node. The coverage of edge nodes It is defined as 200~400 meters to meet the hotspot service requests of users in different regions. The network connection link between two edge nodes is Indicates, for example, Represents an edge node and The communication delay between nodes is 2 milliseconds. For edge nodes, the intra-node communication delay of user requests is significantly smaller than the inter-node communication delay and can be considered negligible. .

[0087] It should also be noted that microservices represent business requirements that are decomposed into fine-grained services, each dedicated to a single user service. The set of delay-sensitive microservice types in edge scenarios is denoted as ,in Represents the number of microservice types. Requests may originate from various edge devices, including IoT devices, smartphones, and PCs. For simplicity, user requests are modeled as request chains, and the set of user requests is recorded as ,in Indicates the number of user request types in the network. It contains multiple types of microservices, and the microservice instances process them in a fixed logical order. Edge scenarios process user requests The required microservices collection ,in Indicates the length of the user request. The same type of microservices are allowed to exist in the same user request. User request The set of routing paths forwarded by the server is recorded as ,in Indicates user request The number of routing paths that the request follows The order of the microservices included in the path , indicating the The set of edge nodes passed by the request routing path, where Indicates user request By path Upper edge node Microservices in deal with.

[0088] The user request arrival rate reflects the intensity of the request. In order to simulate the actual network environment more realistically, this patent assumes that the user request arrival rate conforms to the Poisson distribution. Reaching the edge node The rate of the service area is recorded as , which is also the arrival rate of user requests In addition, in order to meet the needs of balancing requests that are sensitive to latency and to facilitate the evaluation of the effectiveness of the deployed routing scheme, the maximum tolerable latency of each user request is defined as .

[0089] In this embodiment, the microservice instance deployment and request routing strategy is obtained by using the DA-RSPPO algorithm (i.e., the delay-aware reward scaling proximal policy optimization model) based on the proximal policy optimization algorithm (PPO) in deep reinforcement learning theory, which specifically includes: in the training phase, the initial delay-aware reward scaling proximal policy model is trained. The DA-RSPPO algorithm includes a network and a The model then calculates the deployment action to be performed in the current state, calculates the routing strategy, arrival rate and total delay after deployment, and obtains the reward value of this step to evaluate the performance of the action after sparseness of the reward shaping function. The reward is used as feedback to the model to constrain the model to find the deployment routing behavior that maximizes the objective function.

[0090] Furthermore, a processing method for training the initial delay-aware reward scaling proximal strategy model can be to obtain a routing strategy according to the edge computing network through a routing decision formula; determine the residence delay of each user request in the user request set at the microservice on the server in the routing path through a residence delay formula according to the routing strategy; determine the propagation delay corresponding to each user request through a propagation delay formula according to the routing path; based on The queuing model establishes the objective function formula for minimizing request delay; the total response delay corresponding to the user request is determined based on the routing strategy, residence delay and propagation delay; according to the total response delay corresponding to the user request, the initial delay-aware reward scaling proximal strategy model is optimized by minimizing the request delay objective function formula to obtain the total delay corresponding to the user request set ; When the total delay is less than the preset total delay threshold, the optimized initial delay-aware reward scaling proximal strategy model is used as the delay-aware reward scaling proximal strategy optimization model.

[0091] In the specific implementation, the overall framework of the DA-RSPPO algorithm is as follows: Figure 6 As shown, Figure 6 This is a schematic diagram of the architecture of the delay-aware reward scaling proximal strategy optimization algorithm of the first embodiment of the routing decision update method based on CPU operating frequency of the present invention. The specific training process is shown in Algorithm 1, and its input is a multi-edge node network , user request set and hyperparameters; the output is the deployment of the service instance and request routing decisions ,definition Representing microservices At the edge node The number of instances deployed, Routing strategy, service instance deployment and request routing decisions They are and In Algorithm 1, Represents a collection of user requests The sum of the number of instances required for all types of microservices in Representing microservices The number of instances required, Representing microservices The request arrival rate, Indicates The total delay after the tth operation step in the training round is completed, and Indicates The total delay after the last action step in the round of training, , Is a positive weight factor. The process of the Delay-Aware Reward Scaling Proximal Policy Optimization algorithm (DA-RSPPO) is as follows:

[0092] Algorithm 1: Delay-Aware Reward Scaling Proximal Policy Optimization Algorithm (DA-RSPPO)

[0093] Input: Edge computing network , user request set , maximum number of training sets , Total steps per episode , learning experience , learning experience sample size , Update times , Strategy evaluation frequency , Discount Factor , GAE parameters , Clipping parameters and latency threshold .

[0094] Output: Service instance deployment status and request routing decisions .

[0095] 1. Initialize the experience buffer , network and network ;

[0096] 2. Calculate the number of instances required for each microservice and user request collection The sum of the number of instances required for all types of microservices in ;

[0097] 3. Deploy the initial solution of microservice instances;

[0098] 4.for do

[0099] 5. Initial state ;

[0100] 6.

[0101] 7.

[0102] 8. ;

[0103] 9. Deploy actions through probabilistic sampling ;

[0104] 10. Update routing strategy, reach rate and total delay;

[0105] 11. Calculate the reward value and get a new state ;

[0106] 12. Experience Buffer Storage

[0107] 13.

[0108] 14. Input and arrive network get and The values ​​of the current and next states;

[0109] 15. ;

[0110] 16. ;

[0111] 17. for do

[0112] 18. Randomization from the Experience Buffer , Select Batch size;

[0113] 19. Input arrive network To get the current action probability ;

[0114] 20. ;

[0115] 21. Calculation Network loss ;

[0116] 22. Input arrive network Obtained (S);

[0117] 23. Calculation Network loss ;

[0118] 24. Experience with Sampling and renew and network;

[0119] 25. end for

[0120] 26. end if

[0121] 27. end for

[0122] 28.

[0123] 29. Initial State ;

[0124] 30.

[0125] 31. Select the action with the highest probability as the deployment action ;

[0126] 32. Get new status and rewards ;

[0127] 33. end for

[0128] 34. Calculate total delay ;

[0129] 35.

[0130] 36. Preservation Strategy ;

[0131] 37. According to Compute service instance deployment and request routing decisions

[0132] 38. break;

[0133] 39. end if

[0134] 40. end for

[0135] 41.return ,

[0136] In Algorithm 1, the experience storage module is executed first , and Initialization of the network. Then, calculate the user request The total number of instances required for all microservice types included in , and perform the initial deployment of microservice instances. The initial deployment solution prioritizes the deployment of high-demand microservices based on the global reach of microservices, and deploys the instances on servers that are closer, in the hope of reducing the overall latency.

[0137] Algorithm 1 continuously optimizes the deployment and request routing strategies of microservices through multiple rounds of training. Specifically, first obtain the initial state of this round of iteration , then, set the invalid action mask in each round of multi-step training , this setting can quickly eliminate invalid actions and increase the convergence speed and stability of the algorithm. The network samples the action probability and obtains the deployment action and new state of the microservice instance , and calculate the routing strategy, request arrival rate and total response delay respectively.

[0138] Furthermore, a processing method for training the initial delay-aware reward scaling proximal strategy model can be to obtain a routing strategy according to the edge computing network through a routing decision formula; determine the residence delay of each user request in the user request set at the microservice on the server in the routing path through a residence delay formula according to the routing strategy; determine the propagation delay corresponding to each user request through a propagation delay formula according to the routing path; based on The queuing model establishes the objective function formula for minimizing request delay; the total response delay corresponding to the user request is determined based on the routing strategy, residence delay and propagation delay; according to the total response delay corresponding to the user request, the initial delay-aware reward scaling proximal strategy model is optimized by minimizing the request delay objective function formula to obtain the total delay corresponding to the user request set ; When the total delay is less than the preset total delay threshold, the optimized initial delay-aware reward scaling proximal strategy model is used as the delay-aware reward scaling proximal strategy optimization model.

[0139] The routing decision formula is:

[0140]

[0141]

[0142]

[0143] In the formula, is the routing strategy, indicating the server Microservices on Routing to routing path The probability of the next microservice being routed to the server Microservices on The probability of For edge computing networks, is the set of edge nodes, L is the network connection link between edge nodes, For currently deployed microservices The number of servers for the instance; For deployment on the server Microservices on Number of instances, For currently deployed microservices Number of instances, For slave server arrive The communication delay, is the weight coefficient, For constraints.

[0144] It should also be understood that the number of instances required for each microservice is pre-calculated in Algorithm 1 ,because Changes will occur during the training process, so it is necessary to make the and Consistent.

[0145] The dwell delay formula is:

[0146]

[0147]

[0148]

[0149] In the formula, For request In the routing path Medium Server Microservices on The dwell time delay at For edge nodes Microservices The service intensity of For edge nodes Microservices The total request arrival rate at It is the basic processing capability of the edge node server. is the total number of edge nodes, The probability of getting a request for all instances of microservice m on server v.

[0150] in:

[0151]

[0152]

[0153]

[0154] In the formula, For Server Microservices on The service busyness, For Server Microservices on The probability that no instance gets the request.

[0155] The propagation delay formula is:

[0156]

[0157]

[0158]

[0159] In the formula, Request for user A collection of routing paths, For routing path The propagation delay under Request for user In the routing path Edge Node Microservice examples in deal with.

[0160] The total response delay corresponding to the user request is determined based on the routing strategy, residence delay and propagation delay, where Indicates user request All routing paths The expected response delay, The calculation formula is as follows:

[0161]

[0162] User Request Total response delay The calculation formula is as follows:

[0163]

[0164] The calculation process meets the following constraints:

[0165] Since edge nodes have limited computing resources, all microservices cannot be deployed without limit. Therefore, there are the following computing capacity constraints:

[0166]

[0167] in Representing microservices At the edge node The number of instances deployed, Represents an edge node The number of cores.

[0168] Since edge nodes can only route user requests to those microservices deployed nodes, and each microservice in each user request The total number of requests must be fully served, so there are the following request routing constraints:

[0169]

[0170]

[0171] in Indicates that at the edge node Complete microservices Then route the user request flow to the edge node Microservices probability.

[0172] To maintain the stability of the edge network, it is required to be deployed on the edge nodes The arrival rate of each microservice on the network cannot exceed the service capacity, so there are the following service capacity constraints:

[0173]

[0174] Therefore, based on The queuing model constructs the objective function formula of minimizing request delay based on the above constraints

[0175] The objective function formula for minimizing request delay is as follows:

[0176]

[0177]

[0178] Based on the above calculation process and constraints, we can get The reward value is calculated by comparing the delay changes before and after the continuous action. , especially when the last microservice instance is deployed, the reduction in total latency of this round compared to the previous round will be considered and used as part of the reward for the last step action, in order to motivate the algorithm to reduce the total latency of user requests after the overall deployment. This method improves the effective control of the action space and the optimization of microservice deployment.

[0179] It is also necessary to explain that there are three important components in the interactive environment defined in reinforcement learning, namely the state space S, the action space A and the reward space R.

[0180] Define the state space S in reinforcement learning:

[0181] The state perceived by the reinforcement learning model mainly includes the normalized distance between the deployed microservice instance nodes, the currently deployed microservice instance information, the remaining computing resources of the node, and the CPU operating frequency of the node, which are specifically expressed as:

[0182]

[0183] in represents the normalized transmission delay matrix between the currently deployed instance node and the communicable nodes, Indicates whether the current node has deployed the same microservice instance, and the remaining computing resources (CPU core number) of each node. express.

[0184] Define the action space A in reinforcement learning:

[0185] In this model, the behavior of the agent is defined as determining the deployment location of a specific microservice instance on multiple edge nodes. These edge nodes have different computing resources and communication delay characteristics, so a trade-off must be made between the selection of deployment locations and the allocation of the number of instances. Considering that high concurrent user requests and the complexity of edge nodes in actual scenarios may lead to a larger action space, thereby affecting the deployment efficiency, the present invention innovatively proposes a method for deploying microservice instances one by one, which effectively reduces the size of the action space and improves the deployment efficiency of the algorithm. The action space of a microservice instance is defined as the set of edge nodes available for selection. It is expressed as follows:

[0186]

[0187] in represents the number of nodes in the multi-edge network, represents the action selection probability.

[0188] Define the reward space R in reinforcement learning:

[0189] The RL algorithm designed based on the Markov decision process (MDP) requires an immediate reward after each action is executed to evaluate the action taken by the agent in the current environment. However, deploying all microservice instances at once as an action of the agent will inevitably make the action space become huge, and even cause "action space explosion". Therefore, it is more reasonable to regard the agent deploying one microservice instance each time as an action. However, this will lead to another inconsistency, that is, the total delay of user requests can only be calculated through routing planning after all microservice instances are deployed. , and then calculate the reward value, which means that it is impossible to accurately evaluate the quality of each action before completing the deployment of all microservices.

[0190] In summary, the new sparse reward calculation function can quantitatively evaluate the benefits of each microservice instance deployment action to achieve real-time rewards for latency reduction. The reward is calculated by comparing the latency changes before and after consecutive actions. In particular, when the last microservice instance is deployed, the reduction in total latency in this round compared to the previous round is considered and used as part of the reward for the last step to incentivize the algorithm to reduce the total latency of user requests after the overall deployment. This method improves the effective control of the action space and the optimization of microservice deployment. The reward function is expressed as:

[0191]

[0192] in, Indicates The reward for the step action, Indicates The total delay after the last step of the training round is completed, Represents a collection of user requests The sum of the number of instances required for all types of microservices in , is a positive weight coefficient.

[0193] After acquiring learning experience, the algorithm will store it in the experience buffer When the experience buffer When the number of samples in reaches a certain number, the following steps are performed:

[0194] 1. From Calculate the value of the current state and the next state in the network and ;

[0195] 2. Calculate the time series difference error (TD error) and generalized advantage estimate (GAE);

[0196] 3. Update through multiple iterations and The parameters of the network to minimize the loss;

[0197] Finally, when the training round reaches the set value, the algorithm performs strategy evaluation. Initialization state And in each round of multi-step training, the action with the highest probability is selected as the deployment action , get the new state With reward value . Calculate the delay If the total delay of the request flow is less than the preset threshold, the algorithm is considered to have reached convergence, the training ends, and the microservice instance deployment and routing strategy are saved. , otherwise it will continue to iterate.

[0198] It should also be understood that To obtain the i-th round based on the above calculation process and constraints result.

[0199] In this embodiment, it should be noted that When it is less than the preset total delay threshold, it is determined that the optimization training of the current initial delay-aware reward scaling proximal strategy model is completed, and the optimized initial delay-aware reward scaling proximal strategy model is used as the delay-aware reward scaling proximal strategy optimization model.

[0200] Step S30: obtaining a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment status of the service instance.

[0201] It should also be noted that based on the dynamic voltage and frequency scaling theory (DVFS), a solver-based EA-AFS algorithm (i.e., energy-aware adaptive frequency scaling model) is provided to optimize the overall energy consumption of the network. The method is as follows: after the DA-RSPPO algorithm obtains the deployment decision, in order to ensure the service quality and stability of the edge network, the EA-AFS algorithm is used to dynamically adjust the CPU operating frequency in each edge node, thereby saving energy consumption and reducing network operation and maintenance costs while ensuring the stability of edge network services. The overall process of the EA-AFS algorithm is as follows: Figure 7 As shown, Figure 7 This is a schematic diagram of the architecture of the energy-aware adaptive frequency scaling algorithm of the first embodiment of the routing decision update method based on the CPU operating frequency of the present invention, as shown in Algorithm 2, whose input is the edge network , user request set , service instance deployment status and request routing decisions And the current CPU core processing power , the output is the CPU operating frequency level and routing decisions The Energy Aware Adaptive Frequency Scaling (EA-AFS) algorithm process is as follows:

[0202] Algorithm 2: Energy-Aware Adaptive Frequency Scaling (EA-AFS)

[0203] Input: Edge computing network , User request collection , Service instance deployment status and request routing decisions , Current CPU core processing power .

[0204] Output: CPU operating frequency level and routing decisions .

[0205] 1. Get user request collection , the deployment status D of the microservice instance and the routing decision P;

[0206] 2. Solve the relaxation solution in the energy-minimizing optimization function to obtain the optimal CPU operating frequency set for edge nodes ;

[0207] 3.

[0208] 4. ;

[0209] 5. end for

[0210] 6. Update the CPU processing capacity of each node ;

[0211] 7. Calculate the difference weight from the original processing capacity

[0212] 8. Based on difference weight And constraints, update routing strategy ,get ;

[0213]

[0214] In Algorithm 2, first, we obtain the current user request set And the microservice instance deployment and routing strategy obtained in Algorithm 1 Then, according to the formula of minimizing energy consumption optimization function, its expression is as follows:

[0215]

[0216]

[0217] in, is the total energy consumption of the edge network, To meet user requests The maximum response delay required, For edge nodes The current CPU operating frequency decision, 1 represents the external frequency, 2 represents the multiplier, and 3 represents overclocking.

[0218] The calculation formula is as follows:

[0219]

[0220] in It is an edge node Dynamic processing energy consumption refers to the CPU operating at a certain frequency And computing resource utilization In this case, microservice instances are deployed on edge nodes. Process user requests on the CPU cores in The energy consumption generated when For edge nodes The static energy consumption represents the no-load energy consumption of the CPU core when it is not involved in request processing, and includes the power consumption when the CPU core is not deployed with a microservice instance.

[0221] The calculation formula is as follows:

[0222]

[0223] in, For Server Resource utilization, Represents an edge node The power consumption factor is determined by fixed physical parameters such as medium voltage and current.

[0224] The calculation formula is as follows:

[0225]

[0226] based on The calculation formula uses the solver to solve the relaxed solution in the formula to obtain the optimal CPU operating frequency level set of the edge node It is worth noting that in the energy consumption optimization function is an integer decision variable. To reduce the computational difficulty, Relax to a linear variable from 1 to 2. Further, traverse the set ,right Round off each element in to obtain the integer CPU operating frequency level of each node. In a queuing network, if the service intensity , will cause an infinitely long queue, and the CPU operating frequency level CPU processing power Therefore, in order to ensure the service quality and stability of the edge network, it is necessary to adaptively adjust the routing decision in Algorithm 1. First, according to the resource utilization calculation formula in the energy consumption optimization model Update the CPU processing capacity of each node And calculate the difference weight with the original processing capacity Then, according to the difference weight and the constraints in the request latency model, update The routing strategy in the final CPU operating frequency level is obtained and routing decisions .

[0227] In this embodiment, after the energy-aware adaptive frequency scaling model training is completed, in actual applications, the current CPU core processing capacity is updated to obtain the updated CPU core processing capacity; the processing capacity difference weight is determined based on the current CPU core processing capacity and the CPU core processing capacity through the energy-aware adaptive frequency scaling model; the deployment of the service instance is updated based on the processing capacity difference weight and the minimization energy consumption optimization function formula to determine the CPU operating frequency decision.

[0228] In this embodiment, a multi-edge node network and a set of pending user requests are first determined, and then the deployment status of the service instance and the request routing decision are obtained through the delay-aware reward scaling proximal policy optimization model based on the multi-edge node network and the set of pending user requests. Then, the CPU operating frequency decision is obtained through the energy-aware adaptive frequency scaling model based on the current CPU core processing power and the deployment status of the service instance, and finally the request routing decision is updated according to the CPU operating frequency decision. This embodiment derives the optimal static deployment and routing decision of microservices in the network through the delay-aware reward scaling proximal policy optimization model, and dynamically adjusts the CPU operating frequency through the energy-aware adaptive frequency scaling model to optimize the system energy consumption, thereby improving the efficiency of network data processing and request response, and reducing the overall energy consumption of the system.

[0229] Reference Figure 8 , Figure 8 It is a structural block diagram of the first embodiment of the routing decision updating system based on CPU operating frequency of the present invention.

[0230] like Figure 8 As shown, the routing decision updating system based on CPU operating frequency proposed in the embodiment of the present invention includes:

[0231] A determination module 8001 is used to determine a multi-edge node network and a set of user requests to be processed;

[0232] A computing module 8002 is used to obtain a deployment status of a service instance and a request routing decision through a delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests;

[0233] The calculation module 8002 is further used to obtain a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment status of the service instance;

[0234] The updating module 8003 is used to update the request routing decision according to the CPU operating frequency decision.

[0235] In this embodiment, a multi-edge node network and a set of pending user requests are first determined, and then the deployment status of the service instance and the request routing decision are obtained through the delay-aware reward scaling proximal policy optimization model based on the multi-edge node network and the set of pending user requests. Then, the CPU operating frequency decision is obtained through the energy-aware adaptive frequency scaling model based on the current CPU core processing power and the deployment status of the service instance, and finally the request routing decision is updated according to the CPU operating frequency decision. This embodiment derives the optimal static deployment and routing decision of microservices in the network through the delay-aware reward scaling proximal policy optimization model, and dynamically adjusts the CPU operating frequency through the energy-aware adaptive frequency scaling model to optimize the system energy consumption, thereby improving the efficiency of network data processing and request response, and reducing the overall energy consumption of the system.

[0236] Other embodiments or specific implementations of the routing decision updating system based on CPU operating frequency of the present invention can refer to the above-mentioned method embodiments, which will not be described in detail here.

[0237] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0238] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0239] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0240] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A routing decision updating method based on CPU operating frequency, characterized in that: The routing decision updating method based on CPU operating frequency comprises the following steps: Determine a multi-edge node network and a set of pending user requests; Obtaining the deployment status of service instances and request routing decisions through a delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests; Obtaining a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment of the service instance; updating the request routing decision according to the CPU operating frequency decision; Wherein, before the step of obtaining the deployment status of the service instance and the request routing decision through the delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests, it also includes: The routing strategy is obtained through the routing decision formula according to the edge computing network; Determine the residence delay of each user request in the user request set at the microservice on the server in the routing path by using the residence delay formula according to the routing strategy; Determine the propagation delay corresponding to each user request according to the routing path by using a propagation delay formula; based on The queuing model establishes the objective function formula for minimizing request delay; Determine a total response delay corresponding to the user request according to the routing strategy, the residence delay and the propagation delay; According to the total response delay corresponding to the user request, the initial delay-aware reward scaling proximal strategy model is optimized by the request delay minimization objective function formula to obtain the total delay corresponding to the user request set; When the total delay is less than a preset total delay threshold, using the optimized initial delay-aware reward scaling proximal strategy model as the delay-aware reward scaling proximal strategy optimization model; The routing decision formula is: 1 In the formula, For routing strategy, For edge computing networks, is the set of edge nodes, L is the network connection link between edge nodes, For currently deployed microservices The number of servers for the instance; For deployment on the server Microservices on Number of instances, For currently deployed microservices Number of instances, For slave server arrive The communication delay, is the weight coefficient.

2. The method according to claim 1, characterized in that The dwell delay formula is: In the formula, For request In the routing path Medium Server Microservices on The dwell time delay at For edge nodes Microservices The service intensity of For edge nodes Microservices The total request arrival rate at It is the basic processing capability of the edge node server. is the total number of edge nodes, The probability of getting a request for all instances of microservice m on server v.

3. The method according to claim 2, characterized in that The propagation delay formula is: In the formula, Request for user A collection of routing paths, For routing path The propagation delay under Request for user In the routing path Edge Node Microservice examples in deal with.

4. The method according to claim 3, characterized in that The step of obtaining a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment status of the service instance includes: Update the current CPU core processing capability to obtain updated CPU core processing capability; Determining a processing capability difference weight according to the current CPU core processing capability and the CPU core processing capability through an energy-aware adaptive frequency scaling model; The deployment of the service instance is updated according to the processing capability difference weight and the energy consumption minimization optimization function formula to determine the CPU operating frequency decision.

5. The method according to claim 4, characterized in that The energy consumption minimization optimization function is: In the formula, is the total energy consumption of the edge network, To meet user requests The maximum response delay required, For edge nodes The current CPU operating frequency decision, 1 is the external frequency, 2 is the multiplier, 3 is the overclocking, For CPU at a certain operating frequency and computing resource utilization The following microservice instances are deployed on edge nodes Process user requests on the CPU cores in The energy consumption generated when For edge nodes The static energy consumption, For Server Resource utilization, For edge nodes The power consumption coefficient determined by the physical parameters in For edge nodes The number of cores.

6. A routing decision updating system based on CPU operating frequency, characterized in that: The routing decision updating system based on CPU operating frequency includes: A determination module, used to determine a multi-edge node network and a set of user requests to be processed; A computing module, configured to obtain a deployment status of a service instance and a request routing decision through a delay-aware reward scaling proximal strategy optimization model according to the multi-edge node network and the set of pending user requests; The calculation module is further used to obtain a CPU operating frequency decision through an energy-aware adaptive frequency scaling model according to the current CPU core processing capability and the deployment status of the service instance; An updating module, used for updating the request routing decision according to the CPU operating frequency decision; The routing decision updating system based on CPU operating frequency is a step for implementing the routing decision updating method based on CPU operating frequency described in claim 1.

7. A routing decision updating device based on CPU operating frequency, characterized in that: The device includes: a memory, a processor, and a routing decision update program based on the CPU operating frequency stored in the memory and executable on the processor, wherein the routing decision update program based on the CPU operating frequency is configured to implement the steps of the routing decision update method based on the CPU operating frequency as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for reducing network-on-chip power consumption, CPU chip and server

    CN112394807A

  • Universal heterogeneous fusion computing network resource intelligent adaptation network architecture and method

    CN115665227A

  • Communication system, node operation control method, node operation control device, node operation control processing program

    JP2008181409A

  • System for Accelerated Network Route Update

    US20150319086A1

  • Dynamic power routing to hardware accelerators

    US20160299553A1