Micro-service deployment and request routing method and system based on edge network

By optimizing microservice deployment and request routing in edge networks, constructing a candidate node set using network centrality and energy consumption metrics, and optimizing the objective function using queuing theory, the problem of low efficiency in microservice deployment and routing planning is solved, achieving a balance between latency and energy consumption, and improving the service efficiency and user experience of edge networks.

CN120935186AInactive Publication Date: 2025-11-11湖北省楚天云有限公司 +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511472446.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2025-11-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing technologies, microservice deployment and request routing are inefficient in edge networks, failing to effectively reduce service latency and energy consumption.

Method used

By acquiring the edge network topology, ranking values ​​are calculated based on the network centrality and energy consumption metrics of service nodes. A node exploration matrix and candidate node set are constructed to optimize routing paths. An energy consumption-latency optimization objective function is constructed by combining the M/M/C queuing theory to balance service latency and energy consumption.

Benefits of technology

It improves the efficiency of microservice deployment and routing planning, reduces service response latency and network energy consumption, enhances network energy efficiency, and optimizes computing resource utilization and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935186A_ABST
    Figure CN120935186A_ABST
Patent Text Reader

Abstract

The invention provides a micro-service deployment and request routing method and system based on an edge network, and is used for the technical field of edge computing, and the method comprises the steps: obtaining an edge network topological structure, and receiving a user micro-service request to form a request set; for any micro-service request in the request set, based on network centrality measurement and energy consumption measurement of the service nodes, calculating a sorting value of each service node in the network topology structure, according to the sorting value, selecting the service nodes in sequence to form a node exploration matrix, and obtaining a first column of service nodes in the node exploration matrix to construct a candidate node set; and constructing a routing path according to the candidate node set and the micro-service request sequence, and outputting the routing path when the average time delay of the routing path is within a predetermined tolerable range. According to the scheme, the micro-service deployment and route planning efficiency can be improved, and the response delay and network energy consumption of the micro-service can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of edge computing technology, and in particular relates to a method and system for microservice deployment and request routing based on edge networks. Background Technology

[0002] Microservices, as an emerging service paradigm, decouple traditional monolithic applications into multiple small functional modules that operate independently yet collaboratively. For large-scale internet applications, this decoupled architecture greatly facilitates later maintenance and development and has been widely deployed. Since most applications are latency-sensitive, microservices can be deployed closer to the network edge, closer to users, effectively reducing service latency. Edge computing can meet the stringent quality of service requirements and frequent data communication between IoT devices, but most internet applications are computationally intensive and energy-intensive, posing significant challenges to edge servers with scarce computing resources and limited energy supplies. Therefore, efficient service orchestration is necessary to reduce service latency and energy consumption during resource-constrained edge service periods.

[0003] However, high latency inevitably consumes more energy, and low energy consumption will inevitably increase service latency, posing a significant challenge to microservice orchestration. Currently, in published patents (publication number CN 114338504 A), reinforcement learning is used to jointly optimize microservice deployment and request routing. This approach can reduce network latency and energy consumption to a certain extent, but this simple single-instance modeling is inefficient in terms of service deployment and routing planning when facing massive IoT device requests and large-scale microservices. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method and system for microservice deployment and request routing based on edge networks, which is used to solve the problem of low efficiency in current microservice deployment and routing planning.

[0005] In a first aspect of the present invention, a method for microservice deployment and request routing based on an edge network is provided, comprising: Obtain the edge network topology and receive user microservice requests to form a request set; For any microservice request in the request set, based on the network centrality metric and energy consumption metric of the service node, calculate the ranking value of each service node in the network topology, select service nodes in sequence according to the ranking value to form a node exploration matrix, and obtain the first column of service nodes in the node exploration matrix to construct a candidate node set; Based on the candidate node set and the order of microservice requests, a routing path is constructed. If the average latency of the routing path is within a predetermined tolerable range, the routing path is output.

[0006] In a second aspect of the present invention, a microservice deployment and request routing system based on an edge network is provided, comprising: The request receiving module is used to obtain the edge network topology and receive user microservice requests to form a request set. The service deployment module is used to calculate the ranking value of each service node in the network topology based on the network centrality and energy consumption metrics of the service nodes for any microservice request in the request set. Based on the ranking value, the service nodes are selected in sequence to form a node exploration matrix, and the first column of the service nodes in the node exploration matrix is ​​obtained to construct a candidate node set. The request routing module is used to construct routing paths based on the candidate node set and the order of microservice requests. When the average latency of the routing path is within a predetermined tolerable range, the routing path is output.

[0007] In a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect of the present invention.

[0008] In a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method provided in the first aspect of the present invention.

[0009] In this embodiment of the invention, based on the joint optimization of microservice instance deployment strategy and request routing strategy, the service node ranking value is incorporated into the ranking value to construct a candidate node set, and the corresponding routing path is constructed according to the request order. This can improve the efficiency of microservice deployment and routing planning, reduce service response latency and network energy consumption, and improve network energy efficiency. By introducing network centrality and energy consumption metrics of nodes, energy consumption in microservice orchestration can be avoided, improving the reusability of service nodes and reducing energy consumption. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating a microservice deployment and request routing method based on an edge network, as provided in one embodiment of the present invention. Figure 2This is a schematic diagram of microservice deployment provided in one embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a microservice deployment and request routing system based on an edge network, provided as an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0012] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0013] It should be understood that the terms "comprising" and other similar expressions in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, or apparatus that includes a series of steps or units and is not limited to the listed steps or units. Furthermore, "first" and "second" are used to distinguish different objects and are not intended to describe a specific order.

[0014] Please see Figure 1 The present invention provides a flowchart illustrating a microservice deployment and request routing method based on an edge network, comprising: S101. Obtain the edge network topology and receive user microservice requests to form a request set; The edge network topology is a network topology composed of service nodes. The topology contains the connection relationships between the service nodes, which are composed of edge servers or Internet of Things computing devices.

[0015] A service node consists of a server and a base station. The base station is responsible for data transmission between service nodes, while the server is responsible for processing requests. The service nodes are interconnected, forming a topology that enables efficient data transmission. Furthermore, data transmission within the same service node requires very little latency, which can be ignored.

[0016] As can be understood, a microservice architecture decomposes a monolithic application into multiple independent modules with specific functions. These modules collaborate to complete requests. Each microservice has multiple instances in the network, and these microservice instances form a service chain in a specific order, with each service chain corresponding to a particular request. When a request arrives at the network, it is first sent to multiple input queues, and then forwarded to edge servers with the corresponding microservice instances deployed for further processing to meet the user's needs.

[0017] S102. For any microservice request in the request set, calculate the ranking value of each service node in the network topology based on the network centrality metric and energy consumption metric of the service node, select service nodes in sequence according to the ranking value to form a node exploration matrix, and obtain the first column of service nodes in the node exploration matrix to construct a candidate node set. The ranking value is calculated based on the network centrality and energy consumption metrics of a node, and is used to characterize the reusability of service nodes, thereby reducing the number of online nodes and thus reducing node energy consumption. This embodiment introduces a node ranking strategy to measure its reusability.

[0018] Among them, the network centrality metric of the service node is calculated based on the normalized values ​​of the betweenness centrality, proximity centrality and Katz centrality of the node; Based on the online and deployment status of the service nodes, set the energy consumption metric value for the service nodes; Calculate the ranking value of the service node according to the formula:

[0019] In the formula, Indicates the sorting value. This represents the network centrality metric of a service node. This represents the energy consumption metric of the service node.

[0020] For a request r, it is necessary to determine the optimal set of server nodes to deploy the required microservice instances. For this purpose, a sorting value can be defined. : ; For a network topology, by defining an index To identify the most critical nodes in the network and improve the reusability of microservice instances, three centrality metrics, dependent on the shortest path length between all node pairs, are used to determine this. The values ​​of are determined by betweenness, closeness, and Katz centrality. Using the three selected metrics, all nodes are computed. The centrality value will be obtained by normalizing the centrality value between 0 and 1, which is the result of... .

[0021] Regarding the request r To minimize energy consumption, edge servers need to be identified by either creating a new microservice instance or using an existing one. This should be done by introducing energy consumption metrics to determine the edge server that experiences the least increase in energy consumption, based on node online status and microservice deployment status. There are three different scenarios and values: whether the service node is online and whether the microservice instance is deployed.

[0022] For example, when the edge service node v If a microservice instance is already online and deployed, and there are sufficient resources to deploy a new microservice instance, then... ; When edge service nodes v If a microservice instance is online but not yet deployed, and has sufficient resources to deploy the required microservice instance, then... ; When edge service nodes v Offline mode is required to deploy microservice instances. .

[0023] The specific value can also be adjusted according to the actual situation, such as the energy consumption ratio of the edge server or the size of the specific microservice type being used.

[0024] Sure and After obtaining the value, the request is received at the edge network. r At that time, for each microservice in the request compute nodes sort value .

[0025] The node exploration matrix is ​​a matrix formed by candidate nodes that can be used for microservice deployment. It represents the search space of candidate nodes, and the number of rows in the matrix corresponds to the number of request chains. r The length of the matrix is ​​such that the number of columns is a finite number of service nodes.

[0026] For a given request r Calculate the node for each microservice in the request. sort value Subsequently, there is a tendency to deploy microservices on the nodes with the highest ranking values. Therefore, a set of candidate nodes needs to be selected for deployment. To select this candidate node set, a node exploration matrix is ​​defined. This matrix represents the search space of the candidate node set, with the number of rows... For a given request chain rLength, number of columns K Represents a finite number of nodes, sorted by value. Sort in descending order, with each row representing a group of candidate nodes used to deploy the corresponding microservice.

[0027] The candidate node set refers to the set of candidate nodes used to deploy microservices, for a given request. r ,use S r To represent the candidate node set, and After obtaining the node exploration matrix, suitable nodes need to be selected according to a certain strategy to form a candidate node set. However, since the nodes in each row of the node exploration matrix are selected based on the corresponding requests... r The obtained sorting values ​​are sorted in descending order. Therefore, the first candidate node in each row is the best choice. The candidate node set is formed by selecting the first node from each row of the node exploration matrix. S r .

[0028] For example, for microservice request r1, the microservice instance is deployed as follows: Figure 2 As shown, the request order of microservice request r1 is 1-2-4-5-6. The dashed lines represent the service chain (or possible routing path) corresponding to microservice request r1, represented in instance order, while the service nodes... v1, v2, v3, v4, v5, v6, v7 Deploying microservice instances as follows Figure 2 .

[0029] S103. Construct a routing path based on the candidate node set and the order of microservice requests. Output the routing path when the average latency of the routing path is within a predetermined tolerable range.

[0030] The microservice request order refers to the order in which request instances are requested within a microservice request. Microservice instances are arranged in a chain-like structure to form a service chain, with each service chain corresponding to a specific request. The routing path is based on the microservice request order, starting from the candidate node set. S r Select the path formed by the service nodes. If the average latency of the route path is within the set tolerable latency range, it can be output as the route path.

[0031] This embodiment avoids energy consumption issues in microservice orchestration, simplifies microservice deployment and request routing processes, improves service deployment and request routing efficiency, and reduces network latency and service energy consumption. Service latency is optimized while meeting constraints on computing resources, request routing, and service capabilities. Furthermore, it considers the interdependencies between different microservices, effectively reducing system processing latency and energy consumption by effectively resolving communication dependencies between microservices, thereby enhancing the user experience.

[0032] By jointly optimizing the deployment of microservice instances and request routing, the coupling between the two can be fully utilized. Instance deployment is a prerequisite for request routing strategies, while the latency obtained after request routing is used as the criterion for evaluating routing paths. This achieves an optimal microservice orchestration scheme, improving processing efficiency and service quality when handling high-concurrency, high-volume requests.

[0033] In one embodiment, when the average latency of the routing path exceeds a predetermined tolerable range, the candidate node set is updated.

[0034] The routing path may exceed the user's maximum tolerable latency constraint. If the path calculated by the routing algorithm consistently fails to meet the constraint, the candidate node set needs to be updated. S r Then, for the updated candidate node set S r Find a new path.

[0035] Preferably, the set of updated candidate nodes includes: Get the service node with the largest sort value in the candidate node set and the row of the service node in the node exploration matrix, and select the next node in the corresponding row to replace the service node with the largest sort value; Alternatively, obtain the service node with the most remaining resources in the candidate node set and the row of the service node in the node exploration matrix, and select the next node in the corresponding row to replace the service node with the most remaining resources.

[0036] From the current candidate node set S r Select a node and explore the matrix using that node. The next node with the highest ranking in the row is replaced. Since different candidate node sets will have different quality results, an appropriate selection can reduce energy consumption under latency constraints, or reduce latency with little impact on energy consumption. Therefore, two different candidate node selection mechanisms are proposed to determine the next candidate node set: the highest node ranking and the one with the most remaining resources.

[0037] The highest node ranking, i.e., using the sorting value. From the current candidate node set S r Select and replace nodes. This method selects the current set of candidate nodes. S r Sort values The largest node, then explore the node matrix. The corresponding row is replaced with the next node of the selected node. This method relaxes the energy consumption requirements in an attempt to achieve lower latency.

[0038] The node with the most remaining resources is selected from the edge server nodes with the most remaining resources in the node exploration matrix. The corresponding row is replaced with the next node of the selected node. This exhausts servers with low remaining resources, thereby improving CPU utilization, further improving power efficiency, and reducing energy consumption.

[0039] Preferably, a heuristic algorithm is used to iteratively try two different candidate node sets. S r In order to find a solution that simultaneously satisfies latency and resource constraints.

[0040] For example, the pseudocode for updating the candidate node set is as follows: for request r in R do The algorithm is called to calculate the routing path and routing delay. if routing latency exceeds the maximum tolerable latency then when the iteration count has not exceeded do set strategy = 0 if strategy == 0 then Select the current candidate node set S r Sort values Largest node Find the node in the node exploration matrix M r corresponding row Replace with the next node of this node. set strategy = 1 else Select the node with the most remaining resources. Find the node in the node exploration matrix M r corresponding row Replace with the next node of this node. set strategy = 0 end if end when end if end for return S r In this embodiment, by updating the candidate node set in two different ways, the latency and energy consumption requirements of the service nodes can be effectively balanced, and the optimal candidate node set and routing path can be obtained while simultaneously satisfying the latency and energy consumption constraints.

[0041] In one embodiment, a routing weight ratio is set; microservice traffic is controlled to flow into the next node of the routing path at each service node according to the routing weight ratio, and the remaining microservice traffic flows into the other service nodes in the routing path that deploy the corresponding microservices, and the traffic flowing into the other service nodes is proportional to the number of microservice instances.

[0042] A microservice request is processed by microservice instances in a fixed logical order. To reduce queuing time and the possibility of congestion, user traffic can be split and a weight coefficient σ can be defined. The route to the next microservice in the request chain r flows into the candidate node set in proportion to the weight σ. S r The traffic is routed to the next node in the list of microservice instances, while the remaining traffic flows to service nodes outside the next node. The traffic of the remaining service nodes is proportional to the number of microservice instances. The traffic can be routed proportionally according to the number of deployed microservice instances, thereby ensuring that the large amount of traffic caused by concurrent requests does not exceed the server's service capacity.

[0043] Here is a sample of pseudocode for proportionally dividing a routing path: Input: Network topology G, request r, candidate node set S r Weighting coefficient σ Output: Routing path Rod(r) Average path delay

[0044] Initialize the weight of the main path node: main_wheight = σ Based on the microservice order and candidate node set in request r S r Obtain the main routing path rod 1 For request r Mr. in Mr. do for v in V expect main path node do The number of compute nodes MR is in V The percentage of all MRs in (main path nodes) The remaining weight 1-σ is allocated according to the proportion. end for end for Calculate the remaining routing paths rod 2 , ...,rod |Rod(r)|

[0045] according to Rod(r) And weight calculation

[0046] Return Rod(r) ,

[0047] In this embodiment, by setting the routing weight ratio, the traffic flowing into the next node can be controlled, which can prevent microservice requests from exceeding the service capacity of the service node and prevent individual servers from running under overload.

[0048] In one embodiment, based on M / M / C Queuing theory is used to construct an energy consumption-delay optimization objective function and set constraints on the objective function; based on the objective function, the routing path is evaluated and the optimal routing path is selected.

[0049] M / M / C Queuing theory is a commonly used queuing model to describe the performance of a single-server, multi-queue system. Based on... Queuing theory is used to construct the objective function of the energy consumption-delay model and set corresponding constraints. The advantages and disadvantages of deployment and routing schemes are evaluated by calculating the service latency of requests and network energy consumption.

[0050] Service nodes have limited computing resources and cannot deploy all microservices without restriction. Therefore, the computing capacity constraint is:

[0051] In the formula, microservices At the service node The number of instances deployed, Indicates service node The core number.

[0052] Service nodes can only route requests to those where microservices are deployed. The nodes, and each microservice in each request. The total requests must be fully served, therefore the request routing constraint is:

[0053]

[0054] In the formula, Indicates at the service node Complete microservices The request is then routed to the service node. Microservices The probability of.

[0055] To maintain the stability of the edge network, it is required to deploy on the service node. For each microservice, the reach rate cannot exceed the service capacity; therefore, the service capacity constraint is:

[0056] In the formula, Indicates service node Microservice Examples Total request delivery rate at the location This indicates the basic processing capacity of the service node server. The calculation is expressed as follows:

[0057] In the formula, This indicates the number of service nodes.

[0058] exist In a queuing system, according to The formula for the queuing latency of a request at a microservice within a service node is:

[0059] In the formula, Indicates a request At the service node Microservices Queuing delay at the instance Indicates at the service node Microservices Total request fulfillment rate at the instance Indicates at the service node Microservices The service intensity at the location is to ensure the quality of network services. The size should be less than 1.

[0060] Based on the convolution formula of the distribution function and little The formula easily yields the dwell time delay. for:

[0061] In order to correctly analyze the request Service delay In addition to the request Dwell time delay Since requests involve routing decisions across multiple service nodes, the propagation latency between nodes needs to be considered. Definition Indicates a request The set of routing paths, where Indicates a request Number of route paths. The requested route path follows... The order of the microservices included, where For the request It contains a set of microservices. The path of the request route Includes the service nodes traversed along this path, where Indicates a request In the path Served Node microservices in Processing. Propagation delay along this path. for:

[0062] Due to the use of routing decisions To optimize the service latency of requests, Total service delay It is expressed as follows:

[0063] The energy consumption of edge networks is divided into standby energy consumption and processing energy consumption: When the server is powered on, its energy consumption is a base energy consumption. This energy consumption is independent of the number of requests. Furthermore, the serving node communicates with surrounding nodes through the base station port. Therefore, the propagation energy consumption between nodes is defined as follows: Watts. In summary, the total power consumption in standby mode can be expressed as:

[0064] In the formula, e∈E This is the communication port between the two nodes.

[0065] The main power-consuming component of a server is the CPU, and the server's processing power consumption is based on its CPU utilization rate. The total power consumption of the server can be calculated using the following formula: ; ; ; In the formula, This indicates the server's CPU utilization. and These represent power consumption when CPU utilization is 0% and 100%, respectively. Therefore, the total energy consumption of the edge network can be expressed as:

[0066] In summary, the overall optimization objective can be expressed using the weighted average method as follows: Min ;

[0067] In the formula, and These are weighting coefficients used to control whether the overall optimization objective leans towards achieving the lowest latency or minimizing total energy consumption. By adjusting the values ​​of these coefficients, the optimization process can be tuned to achieve an effective balance between low latency and low energy consumption.

[0068] This embodiment establishes an energy consumption-latency model and objective function based on the M / M / C queuing theory. It evaluates the merits of deployment and routing schemes by calculating the service latency and network energy consumption of requests. Therefore, it is possible to balance and optimize the service latency and network energy consumption of microservice requests.

[0069] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0070] Figure 3 This invention provides a schematic diagram of a microservice deployment and request routing system based on an edge network, comprising: The request receiving module 310 is used to obtain the edge network topology and receive user microservice requests to form a request set. The service deployment module 320 is used to calculate the ranking value of each service node in the network topology based on the network centrality metric and energy consumption metric of the service node for any microservice request in the request set, select service nodes in sequence according to the ranking value to form a node exploration matrix, and obtain the first column of service nodes in the node exploration matrix to construct a candidate node set. The calculation of the ranking value of each service node in the edge network topology based on the network centrality metric and energy consumption metric of the service node includes: Calculate the network centrality metric of the service node based on the normalized values ​​of the betweenness centrality, proximity centrality and Katz centrality of the node. Based on the online and deployment status of the service nodes, set the energy consumption metric value for the service nodes; Calculate the ranking value of the service node according to the formula:

[0071] In the formula, Indicates the sorting value. This represents the network centrality metric of a service node. This represents the energy consumption metric of the service node.

[0072] The request routing module 330 is used to construct a routing path based on the candidate node set and the order of microservice requests. When the average latency of the routing path is within a predetermined tolerable range, the routing path is output.

[0073] Optionally, the request routing module 330 further includes: The node update module is used to update the candidate node set when the average latency of the routing path exceeds a predetermined tolerable range.

[0074] Preferably, the set of updated candidate nodes includes: Get the service node with the largest sort value in the candidate node set and the row of the service node in the node exploration matrix, and select the next node in the corresponding row to replace the service node with the largest sort value; Alternatively, obtain the service node with the most remaining resources in the candidate node set and the row of the service node in the node exploration matrix, and select the next node in the corresponding row to replace the service node with the most remaining resources.

[0075] In one embodiment, the step of constructing a routing path based on the candidate node set and microservice order, wherein the average latency of the routing path is within a predetermined tolerable range, further includes: Set the route weight ratio; The microservice traffic is controlled to flow into the next node of the routing path at each service node according to the routing weight ratio, and the remaining microservice traffic flows into the other service nodes in the routing path that deploy the corresponding microservices, and the traffic flowing into the other service nodes is proportional to the number of microservice instances in the node.

[0076] In one embodiment, the request routing module 330 further includes: Path evaluation module, used for... M / M / C Queuing theory is used to construct an energy consumption-delay optimization objective function and set constraints on the objective function; based on the objective function, the routing path is evaluated and the optimal routing path is selected.

[0077] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0078] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device is used for microservice deployment and request routing in an edge network. Figure 4 As shown, the electronic device 4 in this embodiment includes a memory 410, a processor 420, and a system bus 430. The memory 410 includes an executable program 4101 stored thereon. As those skilled in the art will understand, Figure 4The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0079] The following is combined with Figure 4 A detailed introduction to each component of the electronic device: The memory 410 can be used to store software programs and modules. The processor 420 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 410. The memory 410 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as cached data), etc. In addition, the memory 410 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0080] An executable program 4101 containing an interface generation method is stored in memory 410. This executable program 4101 can be divided into one or more modules / units, which are stored in memory 410 and executed by processor 420 to implement microservice orchestration, etc. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, describing the execution process of the executable program 4101 in the electronic device 4. For example, the executable program 4101 can be divided into functional modules such as a request receiving module, a service deployment module, and a request routing module.

[0081] The processor 420 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 410, and by calling data stored in the memory 410, it performs various functions and processes data, thereby monitoring the overall status of the electronic device. Optionally, the processor 420 may include one or more processing units; preferably, the processor 420 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, application programs, etc., and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 420.

[0082] The system bus 430 is used to connect various functional components inside the computer, transmitting data, address, and control information. Its type can be, for example, a PCI bus, an ISA bus, or a CAN bus. Instructions from the processor 420 are transmitted to the memory 410 via the bus, and the memory 410 sends data back to the processor 420. The system bus 430 is responsible for data and instruction exchange between the processor 420 and the memory 410. Of course, the system bus 430 can also connect to other devices, such as network interfaces and display devices.

[0083] In this embodiment of the invention, the executable program executed by the processor 420 included in the electronic device includes: Obtain the edge network topology and receive user microservice requests to form a request set; For any microservice request in the request set, based on the network centrality metric and energy consumption metric of the service node, calculate the ranking value of each service node in the network topology, select service nodes in sequence according to the ranking value to form a node exploration matrix, and obtain the first column of service nodes in the node exploration matrix to construct a candidate node set; Based on the candidate node set and the order of microservice requests, a routing path is constructed. If the average latency of the routing path is within a predetermined tolerable range, the routing path is output.

[0084] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0085] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0086] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A microservice deployment and request routing method based on edge networks, characterized in that, include: Obtain the edge network topology and receive user microservice requests to form a request set; For any microservice request in the request set, based on the network centrality metric and energy consumption metric of the service node, calculate the ranking value of each service node in the network topology, select service nodes in sequence according to the ranking value to form a node exploration matrix, and obtain the first column of service nodes in the node exploration matrix to construct a candidate node set; Based on the candidate node set and the order of microservice requests, a routing path is constructed. If the average latency of the routing path is within a predetermined tolerable range, the routing path is output.

2. The method according to claim 1, characterized in that, The calculation of the ranking value of each service node in the edge network topology based on the network centrality metric and energy consumption metric of the service node includes: Calculate the network centrality metric of the service node based on the normalized values ​​of the betweenness centrality, proximity centrality and Katz centrality of the node. Based on the online and deployment status of the service nodes, set the energy consumption metric value for the service nodes; Calculate the ranking value of the service node according to the formula: In the formula, Indicates the sorting value. This represents the network centrality metric of a service node. This represents the energy consumption metric of the service node.

3. The method according to claim 1, characterized in that, If the average delay of the routing path is within a predetermined tolerable range, the output routing path further includes: If the average latency of the routing path exceeds the predetermined tolerable range, the candidate node set is updated.

4. The method according to claim 3, characterized in that, The set of candidate nodes for update includes: Get the service node with the largest sort value in the candidate node set and the row of the service node in the node exploration matrix, and select the next node in the corresponding row to replace the service node with the largest sort value; Alternatively, obtain the service node with the most remaining resources in the candidate node set and the row of the service node in the node exploration matrix, and select the next node in the corresponding row to replace the service node with the most remaining resources.

5. The method according to claim 1, characterized in that, The step of constructing a routing path based on the candidate node set and the order of microservice requests, and outputting the routing path when the average latency of the routing path is within a predetermined tolerable range, further includes: Set the route weight ratio; The microservice traffic is controlled to flow into the next node of the routing path at each service node according to the routing weight ratio, and the remaining microservice traffic flows into the other service nodes in the routing path that deploy the corresponding microservices, and the traffic flowing into the other service nodes is proportional to the number of microservice instances in the node.

6. The method according to claim 1, characterized in that, The step of constructing a routing path based on the candidate node set and the order of microservice requests, and outputting the routing path when the average latency of the routing path is within a predetermined tolerable range, further includes: based on M / M / C Based on queuing theory, we construct an optimization objective function for energy consumption and time delay, and set constraints for the optimization objective function. The routing path is evaluated based on the optimization objective function, and the optimal routing path is selected.

7. A microservice deployment and request routing system based on edge networks, characterized in that, include: The request receiving module is used to obtain the edge network topology and receive user microservice requests to form a request set. The service deployment module is used to calculate the ranking value of each service node in the network topology based on the network centrality and energy consumption metrics of the service nodes for any microservice request in the request set. Based on the ranking value, the service nodes are selected in sequence to form a node exploration matrix, and the first column of the service nodes in the node exploration matrix is ​​obtained to construct a candidate node set. The request routing module is used to construct routing paths based on the candidate node set and the order of microservice requests. When the average latency of the routing path is within a predetermined tolerable range, the routing path is output.

8. The system according to claim 7, characterized in that, The calculation of the ranking value of each service node in the edge network topology based on the network centrality metric and energy consumption metric of the service node includes: Calculate the network centrality metric of the service node based on the normalized values ​​of the betweenness centrality, proximity centrality and Katz centrality of the node. Based on the online and deployment status of the service nodes, set the energy consumption metric value for the service nodes; Calculate the ranking value of the service node according to the formula: In the formula, Indicates the sorting value. This represents the network centrality metric of a service node. This represents the energy consumption metric of the service node.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a microservice deployment and request routing method based on an edge network as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed, it implements the steps of a microservice deployment and request routing method based on an edge network as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Micro-service deployment and routing method based on network edge system

    CN114338504A

  • Micro-service deployment and request routing method and system based on edge network, and medium

    CN117527590A

  • Dynamic micro-service migration and route redirection method and system based on topology awareness

    CN119676150A

  • Disintermediated attestation in a MEC service mesh framework

    US20220116445A1

  • Microservice deployment in distributed computing environments

    WO2025146359A1