Micro-service deployment method, system, medium and equipment for cloud-side cross-network-segment communication

By constructing a communication topology and multi-objective optimization function for cloud-edge collaborative microservice deployment, and combining deep reinforcement learning, the problems of high latency and resource imbalance in cross-network segment communication between cloud and edge are solved, improving system response speed and resource utilization efficiency, and adapting to heterogeneous resources and dynamic load environments.

CN121284093APending Publication Date: 2026-01-06HUBEI THINGO TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511191350.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

High communication latency, uneven deployment resources, and low scheduling efficiency in cross-network segment communication between cloud and edge, especially in cloud-edge collaborative computing environments, affect system performance and resource utilization efficiency.

Method used

By constructing a communication topology for cloud-edge collaborative microservice deployment, and designing a multi-objective optimization function that combines cross-network segment communication latency overhead and resource load balancing, we can intelligently adjust deployment strategies and optimize microservice deployment schemes by adopting deep reinforcement learning and hierarchical reward mechanisms.

Benefits of technology

It improves system response speed, optimizes resource utilization, adapts to heterogeneous resources and dynamic load environments, and supports efficient scheduling of large-scale nodes and instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121284093A_ABST
    Figure CN121284093A_ABST
Patent Text Reader

Abstract

The invention provides a micro-service deployment method, system, medium and device for cloud-side cross-network segment communication, and relates to the technical field of micro-service deployment, the method comprises the following steps: obtaining a micro-service instance set and a cloud-side deployment node set, and constructing a communication topology for cloud-side collaborative micro-service deployment; designing a multi-objective optimization function by combining cross-network-segment communication delay overhead and resource load balancing; defining a state space based on node resources, cross-network segment communication delay overhead and a current deployment condition, and taking a mapping relationship between a micro-service instance and a deployment node as an action space; designing a reward function according to three conditions of uncompleted deployment, completed deployment and failed deployment in micro-service deployment; and according to the defined state space, the action space and the final reward function, performing strategy training based on experience playback and a target network until convergence and outputting an optimal micro-service deployment scheme of cloud side cross-network segment communication. The scheme provided by the invention is suitable for micro-service deployment of a cloud edge cooperative computing scene and a diversified micro-service architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microservice deployment technology, and in particular to a method, system, medium, and device for deploying microservices across cloud and edge network segments. Background Technology

[0002] User-facing applications typically have very strict requirements for Quality of Service (QoS), and service providers often need to frequently fix bugs and update features. Therefore, the design of such systems is gradually shifting from monolithic architectures to microservice architectures. In a microservice architecture, complex user services are decomposed into multiple loosely coupled microservices, each of which can be implemented and updated independently. This independence improves the application's scalability, portability, and availability.

[0003] The processing power of edge computing nodes is insufficient to support the operation of the entire application, and traditional monolithic architecture services are typically deployed entirely in cloud computing centers. Microservice architecture, however, offers the opportunity to deploy some microservices on edge nodes closer to end users. Deploying microservice systems in a cloud-edge collaborative environment can leverage edge nodes to reduce access latency and protect data privacy and security, while also utilizing the computing power of cloud nodes. Currently, many internet companies are exploring ways to deploy microservice systems in cloud-edge collaborative environments. Some microservices requiring high computing power and ample memory are generally better suited for deployment on resource-rich cloud nodes, thus reducing the risk of task interruptions or performance degradation due to insufficient resources. On the other hand, some microservices with high latency requirements and relatively low resource demands are better suited to run on edge nodes. For example, in intelligent transportation systems, deploying microservices for real-time traffic flow monitoring and road condition analysis on edge nodes can significantly reduce data processing latency, thereby enabling rapid traffic signal control and scheduling decisions. The high communication latency, uneven deployment resources, and low scheduling efficiency of microservice systems deployed across network segments in a cloud-edge collaborative computing environment can be addressed by rationally utilizing the sensitivity of microservices to computing resources to select deployment locations. This helps to maximize resource utilization efficiency in a cloud-edge collaborative environment while improving the overall performance and service quality of the system. Summary of the Invention

[0004] The purpose of this invention is to address the problems of high communication latency, uneven deployment resources, and low scheduling efficiency in cloud-edge cross-network segment communication. A microservice deployment method for cloud-edge cross-network segment communication is proposed, comprising the following steps: S1. Obtain the set of microservice instances and the set of cloud-edge deployment nodes, and construct the communication topology for cloud-edge collaborative microservice deployment; S2. Based on the communication topology of cloud-edge collaborative microservice deployment, design a multi-objective optimization function that combines cross-network segment communication latency overhead and resource load balancing; S3. Based on the communication topology of cloud-edge collaborative microservice deployment, define the state space based on node resources, cross-network segment communication latency overhead, and current deployment status, and use the mapping relationship between microservice instances and deployment nodes as the action space. S4. Design reward functions for the three scenarios of incomplete deployment, complete deployment, and failed deployment in microservice deployment, and construct the final reward function; S5. Based on the defined state space, action space, and final reward function, perform policy training using experience replay and the target network until convergence and output the optimal cloud-edge cross-network segment communication microservice deployment scheme.

[0005] Furthermore, S1 specifically refers to: S11. Obtain the collection of microservice instances , example CPU resource requirements and memory resource requirements And record the call dependencies between instances; where Indicates the first The first type of microservice One example, Indicates the number of microservices. Indicates the number of instances. Representation of instances Required number of CPU cores Representation of instances Required memory capacity; Get the set of cloud-edge deployment nodes and record nodes Number of CPU cores available and available memory capacity and its associated cloud-edge network identifier ,in Indicates the number of nodes. Indicates the first One computing node, Represents a node CPU resource limit, Represents a node The upper limit of memory resources, Represents a node Is it a cloud computing network or an edge network? S12. Construct the microservice call topology matrix. The microservice call topology matrix is ​​defined as follows:

[0006]

[0007] Where W represents the microservice call topology matrix, express and The calling relationship, This represents the p-th microservice. This represents the q-th microservice; Construct the delay matrix between nodes, and define the delay matrix between network segments as follows:

[0008] in, This represents the average communication delay between the m-th node and the n-th node; Configure the mapping relationship between microservice instances and cloud-edge deployment nodes, defined as follows:

[0009] in, Represents a microservice instance With deployment nodes The mapping relationship.

[0010] S13. Based on the set of microservice instances, the set of cloud-edge deployment nodes, the microservice call topology matrix, the latency matrix between nodes, and the mapping relationship between microservice instances and cloud-edge deployment nodes, construct the communication topology for cloud-edge collaborative microservice deployment.

[0011] Furthermore, the cross-segment communication delay overhead is calculated according to the following formula:

[0012] in, This represents the total communication latency overhead incurred by all instances due to cross-network segment calls. Indicates the number of microservices. This represents the number of instances of the p-th microservice. This represents the number of instances of the q-th microservice. This represents the deployment status of the a-th instance of the p-th microservice on the x-th node. This indicates the deployment status of the b-th instance of the q-th microservice on the z-th node. This represents the call relationship between the p-th microservice and the q-th microservice. This represents the average communication delay between the m-th node and the n-th node.

[0013] Furthermore, resource load balancing is expressed by the following formula:

[0014]

[0015] in, This represents the variance of CPU resource utilization of a node. Indicates the number of nodes. Represents a microservice instance With deployment nodes The mapping relationship, Representation of instances Required number of CPU cores Represents a node CPU resource limit, This represents the average CPU utilization of all nodes. This represents the variance of node memory utilization. Representation of instances Required memory capacity Represents a node The upper limit of memory resources, This represents the average memory utilization across all nodes.

[0016] Furthermore, the multi-objective optimization function is expressed as:

[0017] Where F represents the multi-objective optimization function, , express The weight parameters, This represents the total communication latency overhead incurred by all instances due to cross-network segment calls. express The weight parameters, This represents the variance of CPU resource utilization of a node. express The weight parameters, This represents the variance of the node's memory utilization. Define multi-objective optimization constraints:

[0018] in, Let S represent the a-th microservice and S represent the set of microservices. Indicates deployment at The nth microservice instance on the platform, microservices All instances, Represents a microservice instance and nodes The binary mapping variable (1 represents an instance) At the node (Up, otherwise 0). Represents a microservice instance Required number of CPU cores Represents a node CPU resource limit, Let N represent the m-th node, and N represent the set of cloud-edge deployed nodes. Represents a microservice instance Required memory capacity Represents the node The upper limit of memory resources.

[0019] Furthermore, reward functions are designed for three scenarios in microservice deployment: incomplete deployment, complete deployment, and deployment failure, resulting in the final reward function as follows:

[0020] in, Represents the final reward function. This indicates the positive benefits of the current deployment action on the microservice topology. This indicates a fixed reward for deployment failure. As a weighting factor, This represents the total communication latency overhead incurred by all instances due to cross-network segment calls. This represents the variance of CPU resource utilization of a node. This represents the variance of the node's memory utilization.

[0021] Furthermore, step S5 specifically includes: S51. Construct and initialize network Target network and experience replay pool ; s represents state, a represents action, and They represent Parameters of the network and the target network; S52, In state S, the agent presses... The "greedy" strategy selects an action that grants an immediate reward after interacting with the environment. With the new state and the quadruple Store in the experience replay pool.

[0022] S53, When the experience replay pool When the sample size in the pool reaches a preset threshold, batch sampling is performed from the experience replay pool, based on the target. The target value of network computing:

[0023] in, Represents the goals of the current deployment decision. value, This represents the maximum expected benefit of all possible subsequent actions a' under the next system state S' after the current deployment action is executed; Indicate target Network output, Indicates the discount factor; S54. Calculate the minimum mean square error:

[0024] in, This represents the expectation of the sampled data in the experience replay pool; It is the current Network output; S55, according to a fixed cycle Sync to The process continues until the strategy converges, and the optimal deployment plan is output after training. .

[0025] This invention also proposes a microservice deployment system for cloud-edge cross-network segment communication, comprising: The communication topology construction module is used to obtain the set of microservice instances and the set of cloud-edge deployment nodes, and to construct the communication topology for cloud-edge collaborative microservice deployment. The multi-objective optimization function design module is used to design multi-objective optimization functions based on the communication topology of cloud-edge collaborative microservice deployment, combining cross-network segment communication latency overhead and resource load balancing. The state space and action space definition module is used to define the state space based on the communication topology of cloud-edge collaborative microservice deployment, node resources, cross-network segment communication latency overhead, and current deployment status, and the action space is defined by the mapping relationship between microservice instances and deployment nodes. The reward function design module is used to design reward functions for three scenarios in microservice deployment: deployment incomplete, deployment complete, and deployment failed, and to form the final reward function. The microservice deployment scheme output module is used to train policies based on experience replay and the target network according to the defined state space, action space and final reward function, until convergence and outputting the optimal cloud-edge cross-network segment microservice deployment scheme.

[0026] The present invention also proposes an electronic device, including a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program including computer-readable instructions, and the processor is configured to invoke the computer-readable instructions to execute the above-described microservice deployment method for cloud-edge cross-network segment communication.

[0027] The beneficial effects of the technical solution provided by this invention are: This invention improves system response speed by modeling call dependency topology and communication latency, prioritizing the deployment of high-frequency service instances within the same network segment. It optimizes the variance of node CPU and memory resource utilization to prevent local node overload and resource waste, thereby improving system stability and resource utilization efficiency and achieving resource load balancing. Employing deep reinforcement learning for dynamic deployment, combined with a tiered reward mechanism, it intelligently adjusts deployment strategies based on real-time cluster status and service topology, adapting to heterogeneous resources and dynamic load environments. This invention is suitable for cloud-edge collaborative computing scenarios and diverse microservice architectures, supporting efficient scheduling of large-scale nodes and instances. Attached Figure Description

[0028] Figure 1 This is a flowchart of a microservice deployment method for cloud-edge cross-network segment communication according to an embodiment of the present invention; Figure 2 This is a diagram illustrating a cross-network segment service call example; Figure 3 This is a schematic diagram of the microservice deployment model; Figure 4 The request-response latency distribution of the method of this invention and other methods on two microservice benchmark systems, Bookinfo and OnlineBoutique, respectively; Figure 5 This is a block diagram of an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0030] The flowchart of the microservice deployment method for cloud-edge cross-network segment communication in this embodiment of the invention is as follows: Figure 1 Specifically, it includes the following steps: S1. Obtain the set of microservice instances and the set of cloud-edge deployment nodes, and construct the communication topology for cloud-edge collaborative microservice deployment.

[0031] Specifically: S11. Obtain the collection of microservices , This represents the k-th microservice. This indicates the number of microservices. A single microservice requires multiple instances to be deployed; this is the set of microservice instances. , example CPU resource requirements and memory resource requirements It also records the call dependencies between instances. Indicates the first The first type of microservice One example, Indicates the number of instances. Representation of instances Required number of CPU cores Representation of instances Required memory capacity; Microservices need to be deployed on compute nodes, each with different resource thresholds (such as CPU and memory limits) and belonging to different network domains (such as cloud nodes and edge nodes). Obtain the set of cloud-edge deployment nodes. and record nodes Number of CPU cores available and available memory capacity and its associated cloud-edge network identifier ,in Indicates the number of nodes. Indicates the first One computing node, Represents a node CPU resource limit, Represents a node The upper limit of memory resources, Represents a node Is it a cloud computing network or an edge network? S12. Construct a microservice call topology matrix. Microservices have call dependencies (e.g., "order service" calls "payment service"). When service instances are deployed on different nodes, cross-node calls will introduce network latency. The service call topology matrix and latency matrix serve as core tools for quantifying the strength of service dependencies and latency costs, respectively. The microservice call topology matrix is ​​defined as follows:

[0032]

[0033] Where W represents the microservice call topology matrix, express and The calling relationship, This represents the p-th microservice. This represents the q-th microservice.

[0034] Construct the delay matrix between nodes, and define the delay matrix between network segments as follows:

[0035] in, This represents the average communication latency between the m-th node and the n-th node. Communication latency is lowest within the same node (microseconds, negligible); nodes within the same network segment use local routing, resulting in low latency (1-10 milliseconds); communication across network segments requires multiple forwarding layers, significantly increasing latency (tens to hundreds of milliseconds).

[0036] Configure the mapping relationship between microservice instances and cloud-edge deployment nodes, and use a 0 / 1 binary variable to identify this deployment relationship, defined as:

[0037] in, Represents a microservice instance With deployment nodes The mapping relationship.

[0038] S13. Based on the set of microservice instances, the set of cloud-edge deployment nodes, the microservice call topology matrix, the latency matrix between nodes, and the mapping relationship between microservice instances and cloud-edge deployment nodes, construct the communication topology for cloud-edge collaborative microservice deployment.

[0039] S2. Based on the communication topology of cloud-edge collaborative microservice deployment, design a multi-objective optimization function that combines cross-network segment communication latency overhead and resource load balancing.

[0040] The optimization objective is to minimize cross-network segment communication overhead. In a cloud-edge collaborative computing environment, cross-network segment communication between microservices not only introduces additional network communication latency but may also lead to network link congestion and request processing queuing, significantly impacting the overall system response time and service quality. Therefore, this invention combines the network location information of cloud-edge collaborative computing nodes with the calling relationships between microservices during the microservice deployment optimization process to evaluate the cross-network segment communication overhead in the current microservice system deployment state. The cross-network segment communication latency overhead is calculated using the following formula:

[0041] in, This represents the total communication latency overhead incurred by all instances due to cross-network segment calls. Indicates the number of microservices. This represents the number of instances of the p-th microservice. This represents the number of instances of the q-th microservice. This represents the deployment status of the a-th instance of the p-th microservice on the x-th node. This indicates the deployment status of the b-th instance of the q-th microservice on the z-th node. This represents the call relationship between the p-th microservice and the q-th microservice. This represents the average communication delay between the m-th node and the n-th node. This indicates that all service pairs are iterated over. and This indicates traversing microservices. and microservices All copies.

[0042] To optimize node resource load balancing, this invention sets a target for resource balancing. To avoid increased processing latency due to resource contention between computing nodes, the resource load of each computing node should be reasonably balanced to improve overall system stability. Therefore, this invention introduces the resource utilization rate of computing nodes to quantify the actual usage of node resources, defining the computing nodes... CPU resource utilization variance and memory utilization variance:

[0043]

[0044] in, This represents the variance of CPU resource utilization of a node. The smaller the value, the more evenly CPU resources are distributed across the nodes; Indicates the number of nodes. Represents a microservice instance With deployment nodes The mapping relationship, Representation of instances Required number of CPU cores Represents a node CPU resource limit, This represents the average CPU utilization of all nodes. This represents the variance of node memory utilization. The smaller the value, the more evenly memory resources are distributed across the nodes. Representation of instances Required memory capacity Represents a node The upper limit of memory resources, This represents the average memory utilization of all nodes. Represents a node Total CPU utilization of all instances Represents a node Total memory utilization of all instances.

[0045] In actual deployment, it is necessary to balance the relationship between communication latency and resource utilization. By weighting and fusing the three sub-objectives, the multi-objective optimization function is expressed as:

[0046] Where F represents the multi-objective optimization function, , express The weight parameters, This represents the total communication latency overhead incurred by all instances due to cross-network segment calls. express The weight parameters, This represents the variance of CPU resource utilization of a node. express The weight parameters, This represents the variance of the node's memory utilization.

[0047] Define multi-objective optimization constraints:

[0048] in, Let S represent the a-th microservice and S represent the set of microservices. Indicates deployment at The nth microservice instance on the platform, This indicates the microservice All instances, Represents a microservice instance and nodes The binary mapping variable (1 represents an instance) At the node (Up, otherwise 0). Represents a microservice instance Required number of CPU cores Represents a node CPU resource limit, Let N represent the m-th node, and N represent the set of cloud-edge deployed nodes. Represents a microservice instance Required memory capacity Represents the node The upper limit of memory resources. Indicates deployment at All microservice instances on The total CPU requirement of the node cannot exceed the node's CPU requirement. CPU resource limit ; Indicates deployment at All microservice instances on The total memory requirements of the nodes cannot exceed the node's memory requirements. Maximum memory resources .

[0049] S3. Before making a decision, the agent needs to collect "current environment information". Based on the communication topology of the cloud-edge collaborative microservice deployment, and considering node resources, cross-network segment communication latency overhead, and current deployment status, the state space is defined as follows: ,in, Represents a node CPU limit Represents a node Maximum memory limit Indicates network communication latency attribute, This indicates the current deployment status of the microservice instance.

[0050] The mapping relationship between microservice instances and deployment nodes is defined as action space A, which encompasses all microservice instances. With deployment nodes Possible values ​​for "mapping relationship". A single action of an agent determines only the deployment location of a microservice instance, and its action space size is... ,in Indicates the number of nodes. This represents the total number of all microservice instances in the microservice system.

[0051] S4. After the agent performs an action, the environment guides it to learn the optimal strategy through feedback reward r. The final reward function r consists of three levels of sub-rewards, better adapting to the "cloud-edge" cross-network segment deployment scenario. Reward functions are designed for three cases in microservice deployment: deployment incomplete (i.e., still in the process of deployment), deployment completed, and deployment failed, forming the final reward function as follows:

[0052] in, Represents the final reward function. This indicates the positive benefits of the current deployment action on the microservice topology, and is used to measure the contribution of the action to the overall system structure optimization. This indicates a fixed reward for deployment failure. When a deployment action is deemed illegal due to a violation of node resource constraints, the system will provide a fixed negative reward. . As a weighting factor, it is used to balance communication overhead and resource utilization variance. The weight can be flexibly adjusted according to the system's optimization objectives, thereby improving the adaptability and generalization ability of the deployment strategy. This represents the total communication latency overhead incurred by all instances due to cross-network segment calls. This represents the variance of CPU resource utilization of a node. This represents the variance of the node's memory utilization.

[0053] S5. Based on the defined state space, action space, and final reward function, perform policy training using experience replay and the target network until convergence and output the optimal cloud-edge cross-network segment communication microservice deployment scheme.

[0054] Specifically: S51. Construct and initialize network Target network and experience replay pool ; s represents state, a represents action, and They represent Set the parameters for the target network and the learning rate. Discount Factor Hyperparameters, etc.

[0055] S52. Iterative interaction between the agent and the environment and experience storage: In state S, the agent... The -greedy strategy selects actions by increasing the exploration rate during the initial training phase and decreasing it during the later training phase. This achieves a dynamic balance between "exploring potential optimal strategies" and "converging to a stable optimal strategy." The agent then selects actions accordingly. The action selection for the -greedy strategy is expressed by the following formula:

[0056]

[0057] in, Indicates from action space Randomly select an action; Indicates the current exploration probability; This represents the initial exploration probability. This represents the lowest exploration probability in the later stages of training. It is a coefficient that controls the rate at which the exploration probability decays, used to dynamically adjust the exploration intensity. This indicates the current number of training steps; Represents the output of the Q network, and represents the state. In performing the action Expected cumulative rewards in the future; This represents the maximum value of the cumulative expectation in the future.

[0058] Agents receive immediate rewards after interacting with their environment. With the new state and the quadruple Store in the experience replay pool.

[0059] S53, When the experience replay pool When the sample size in the pool reaches a preset threshold, batch sampling is performed from the experience replay pool, based on the target. The target value of network computing:

[0060] in, Represents the goals of the current deployment decision. value, This represents the maximum expected benefit of all possible subsequent actions a' under the next system state S' after the current deployment action is executed; Indicate target Network output, This represents the discount factor.

[0061] S54. Calculate the minimum mean square error:

[0062] in, This represents the expectation of the sampled data in the experience replay pool; It is the current The network output; by minimizing the objective value With the present The mean square error of the value is used to achieve the current Network parameters Iterative optimization.

[0063] S55, according to a fixed cycle Sync to The process continues until the strategy converges, and the optimal deployment plan is output after training. .

[0064] The present invention will be described in detail below with reference to examples. Figure 2 , Figure 2 This diagram illustrates a cross-network segment service call example, showcasing two typical service call paradigms in cloud-edge collaboration. In the left-hand architecture, the two network segments on the edge are directly connected via a 200Mbps high-bandwidth, 10ms low-latency link, allowing the document service and payment service to interact directly, fully utilizing the network performance within the edge. However, in real-world scenarios, reading and writing documents consume significant amounts of memory and I / O, and edge nodes have limited resource capacity. Therefore, document services are typically placed in the cloud middleware layer, as shown in the right-hand architecture. In this scenario, service calls require a "edge-cloud-edge" path, introducing bandwidth constraints and latency losses from the cloud-edge link into the communication process. This invention addresses this issue by constructing a call dependency topology and communication latency model: on one hand, it identifies high-frequency service instances and prioritizes their deployment within the same network segment (such as within the edge or in near-field network segments in cloud-edge collaboration), systematically reducing cross-network segment communication latency and improving system response speed; on the other hand, it optimizes the variance of node CPU and memory resource utilization, dynamically balancing resource load to achieve a dual-dimensional improvement in stability and resource efficiency.

[0065] In this invention example, the number of microservices is set. The limit is 10, with 3 instances deployed for each microservice and 8 compute nodes deployed for each microservice.

[0066] A deep reinforcement learning network was built using Python 3.6.6 and TensorFlow 1.15.0, with parameters shown in Table 1. The learning rate... Controls the magnitude of each model parameter update; discount factor Control the weight of future rewards; the maximum storage capacity of the experience pool. It stores past "state-action-reward-next state" data, randomly sampling during training to avoid data correlation; the hidden layer has 512, representing the structural parameters of the neural network. During the training of the ϵ-greedy policy, every 1000 steps... Sync to The optimal deployment plan is output after training for 2 million steps until the strategy converges. .

[0067] Table 1 Model Parameter Configuration

[0068] like Figure 3 As shown, Figure 3 This is a schematic diagram of a microservice deployment model. This invention is implemented on a Kubernetes-based cloud-edge collaborative cluster, which consists of four cloud servers (denoted as nodes). ~ Each CPU has 16 cores and 64GB of memory, and 6 edge devices (referred to as nodes). ~ Each node consists of a 4-core CPU and 16GB of memory. Nodes are divided into cloud network segments and edge network segments, and the communication latency between nodes is [not specified]. It changes dynamically between 3ms and 50ms.

[0069] This invention validates the system performance of the deployed method in a cross-network segment communication scenario on two microservice benchmark systems: Bookinfo and Online Boutique. The Bookinfo system, consisting of six microservices, simulates an online book display platform where users can browse book information, view detailed descriptions, read user reviews, and view ratings. The Online Boutique system, consisting of eleven microservices, simulates an online store, involving complex business logic such as user login, product browsing, shopping cart management, and order processing. It is suitable for evaluating the performance and interaction of different microservices in multi-language and multi-platform environments.

[0070] like Figure 4 As shown, Figure 4The data shows the request response latency distribution of the method of this invention and other methods on two microservice benchmark systems, Bookinfo and Online Boutique. From the request response time distribution, the present invention demonstrates stable performance advantages in both microservice systems. Specifically, in the Bookinfo system, the average response time of DRDQL is similar to that of RSDQL, but it is reduced by 15.6%, 29.6%, and 26.2% compared to the Kubernetes default strategy, MB_DDPG, and RMS_DDPG strategies, respectively. In the Online Boutique system, the response time of DRDQL is significantly better than all other methods, reducing the response time by 12.8%, 41.8%, 45.9%, and 50.1% compared to the Kubernetes default strategy, MB_DDPG, RMS_DDPG, and RSDQL strategies, respectively.

[0071] In one exemplary embodiment, a microservice deployment system for cloud-edge cross-network segment communication is included, comprising: The communication topology construction module is used to obtain the set of microservice instances and the set of cloud-edge deployment nodes, and to construct the communication topology for cloud-edge collaborative microservice deployment. The multi-objective optimization function design module is used to design multi-objective optimization functions based on the communication topology of cloud-edge collaborative microservice deployment, combining cross-network segment communication latency overhead and resource load balancing. The state space and action space definition module is used to define the state space based on the communication topology of cloud-edge collaborative microservice deployment, node resources, cross-network segment communication latency overhead, and current deployment status, and the action space is defined by the mapping relationship between microservice instances and deployment nodes. The reward function design module is used to design reward functions for three scenarios in microservice deployment: deployment incomplete, deployment complete, and deployment failed, and to form the final reward function. The microservice deployment scheme output module is used to train policies based on experience replay and the target network according to the defined state space, action space and final reward function, until convergence and outputting the optimal cloud-edge cross-network segment microservice deployment scheme.

[0072] In one exemplary embodiment, a computer-readable storage medium is included, which stores a computer program that, when executed by a processor, implements the aforementioned microservice deployment method for cloud-edge cross-network segment communication.

[0073] Please see Figure 5 In one exemplary embodiment, the device further includes an electronic device including at least one processor, at least one memory, and at least one communication bus.

[0074] The memory stores a computer program, which includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the aforementioned microservice deployment method for cloud-edge cross-network segment communication.

[0075] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for microservice deployment of cloud-edge cross-network segment communication, characterized in that, The method comprises the following steps: S1, obtaining a microservice instance set and a cloud-edge deployment node set, and constructing a communication topology of cloud-edge collaborative microservice deployment; S2, according to the communication topology of cloud-edge collaborative microservice deployment, combining cross-network segment communication delay overhead and resource load balancing to design a multi-objective optimization function; S3, according to the communication topology of cloud-edge collaborative microservice deployment, defining a state space based on node resources, cross-network segment communication delay overhead and current deployment situation, and taking a mapping relationship between a microservice instance and a deployment node as an action space; S4, designing a reward function for each of three cases of deployment not completed, deployment completed and deployment failed in microservice deployment, and constructing a final reward function; S5, according to the defined state space, action space and final reward function, performing policy training based on experience replay and a target network until convergence and outputting an optimal cloud-edge cross-network segment communication microservice deployment scheme. 2.The cloud-edge cross-network segment communication micro-service deployment method of claim 1, wherein, S1 specifically comprises: S11、acquiring a microservice instance set , instances with CPU resource requirements and memory resource requirements , and recording the calling dependency relationship between instances; wherein represents the first instance of the first microservice, represents the first instance of the first microservice, represents the first instance of the first microservice, represents the number of microservices, represents the number of instances, represents the number of instances required CPU cores, represents the memory capacity required by the instance . Acquiring a set of cloud-edge deployment nodes , and recording the number of available CPU cores and the available memory capacity of the nodes , and the identification of the cloud-edge network to which the nodes belong , wherein represents the number of nodes, represents the th computing node, represents the upper limit of the CPU resources of the node , represents the upper limit of the memory resources of the node , represents whether the node belongs to a cloud computing network or an edge network; S12, constructing a microservice call topology matrix, which is defined as: wherein W represents a microservice call topology matrix, represents and a call relationship, represents the pth microservice, represents the qth microservice; constructing a delay matrix between nodes, defining a delay matrix between network segments as: wherein, denotes the average communication delay between the mth node and the nth node; setting a mapping relationship between a microservice instance and a cloud-edge deployment node, which is defined as: wherein, represents a microservice instance and a deployment node mapping relationship; S13, constructing a communication topology of cloud-edge collaborative microservice deployment according to the microservice instance set, the cloud-edge deployment node set, the microservice call topology matrix, the delay matrix between nodes and the mapping relationship between the microservice instance and the cloud-edge deployment node.

3. The microservice deployment method of claim 2, wherein, The cross-network segment communication delay overhead is calculated according to the following formula: wherein, represents the total communication delay overhead generated by all instances due to cross-segment calls, represents the number of microservices, represents the number of instances of the pth microservice, represents the number of instances of the qth microservice, represents the deployment of the ath instance of the pth microservice on the xth node, represents the deployment of the bth instance of the qth microservice on the zth node, represents the calling relationship between the pth microservice and the qth microservice, represents the average communication delay between the mth node and the nth node.

4. The micro-service deployment method of claim 2, wherein, The resource load balancing is represented by the following formula: wherein, represents the variance of CPU resource utilization of a node, represents the number of nodes, represents a microservice instance and a deployment node mapping relationship, represents the instance required CPU core number, represents the CPU resource upper limit of a node , represents the average CPU utilization of all nodes, represents the variance of memory utilization of a node, represents the memory capacity required by the instance , represents the memory resource upper limit of a node , represents the average memory utilization of all nodes.

5. The microservice deployment method of cloud-edge cross-network segment communication according to claim 1, characterized in that, The multi-objective optimization function is represented as: wherein F represents a multi-objective optimization function, , represents a weight parameter of , represents a total communication delay overhead generated by all instances due to cross-segment calls, represents a weight parameter of , represents a CPU resource utilization variance of a node, represents a weight parameter of , represents a memory utilization variance of a node; The multi-objective optimization constraint condition is defined as: wherein, denotes the a-th microservice, S denotes the set of microservices, denotes the n-th microservice instance deployed on , denotes all instances of the microservice , denotes a binary mapping variable of microservice instance and node , denotes the number of CPU cores required by microservice instance , denotes the CPU resource upper limit of node , denotes the m-th node, N denotes the set of cloud-edge deployment nodes, denotes the memory capacity required by microservice instance , denotes the memory resource upper limit of node . 6.The cloud-edge cross-network segment communication micro-service deployment method of claim 1, wherein, The reward function is designed for each of the three cases of deployment not completed, deployment completed and deployment failed in microservice deployment, and the final reward function is constructed as follows: where, represents the final reward function, represents the positive gain of the current deployment action on the microservice topology, represents the fixed reward of deployment failure, is a weight factor, represents the total communication delay overhead generated by all instances due to cross-subnet calls, represents the CPU resource utilization variance of the node, represents the memory utilization variance of the node.

7. The microservice deployment method of cloud-edge cross-network segment communication according to claim 1, characterized in that, Step S5 specifically comprises: S51, construct and initialize network , target network , and experience replay pool ; s represents a state, a represents an action, and respectively represent parameters of the network and the target network; S52、State S, the agent selects an action according to the greedy policy, interacts with the environment, and obtains an immediate reward with the new state and stores the quadruple into the experience replay pool; S53, When the experience replay pool When the sample size in the pool reaches a preset threshold, batch sampling is performed from the experience replay pool, based on the target. The target value of network computing: wherein, a goal representing a current deployment decision a value, represents the maximum expected return of all possible subsequent actions a' under the next system state S' condition after performing the current deployment action; represents the goal an output of the network, represents a discount factor; S54, calculating a minimum mean square error: wherein, represents the expectation over sampled data in the experience replay pool; is the output of the current network; S55、according to a fixed period synchronize to , until the policy converges, output the optimal deployment scheme after training . 8.A micro-service deployment system for cloud-edge cross-network segment communication, characterized in that, It comprises: A communication topology construction module for obtaining a microservice instance set and a cloud-edge deployment node set, and constructing a communication topology of cloud-edge collaborative microservice deployment; A multi-objective optimization function design module for combining cross-network segment communication delay overhead and resource load balancing to design a multi-objective optimization function according to the communication topology of cloud-edge collaborative microservice deployment; A state space and action space definition module for defining a state space based on node resources, cross-network segment communication delay overhead and current deployment situation according to the communication topology of cloud-edge collaborative microservice deployment, and taking a mapping relationship between a microservice instance and a deployment node as an action space; A reward function design module for designing a reward function for each of three cases of deployment not completed, deployment completed and deployment failed in microservice deployment, and constructing a final reward function; A microservice deployment scheme output module for performing policy training based on experience replay and a target network according to the defined state space, action space and final reward function until convergence and outputting an optimal cloud-edge cross-network segment communication microservice deployment scheme. 9.A computer readable storage medium, storing a computer program, and the computer program comprises the following steps: The computer program is executed by a processor to implement the method of any one of claims 1-7.

10. An electronic device, comprising: A computer program product comprising a processor and a memory, said processor being interconnected with said memory, wherein said memory is configured to store a computer program comprising computer readable instructions, said processor being configured to invoke said computer readable instructions to perform the method according to any one of claims 1-7.