Load balancing method and system based on OpenEuler edge calculation
By introducing the registration center, microservice gateway and computing power estimation model into the OpenEuler edge computing environment, the resource utilization information of edge nodes is collected and utilized, which solves the problem of resource utilization not being considered in the traditional microservice exploration strategy and realizes It achieves balanced use of resources and improvement of request success rate in edge computing scenarios.
Patent Information
- Application Number
- CN202410791006.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-15
AI Technical Summary
In edge computing scenarios, traditional microservice detection strategies fail to effectively consider the utilization of NPU, GPU, DPU and other resources. As a result, business algorithm requests may be forwarded to nodes with insufficient computing power, causing request failures and uneven use of edge device resources. .
The load balancing method based on OpenEuler is adopted, and the registration center, microservice gateway and computing power estimation model are introduced into the microservice framework to collect the NPU, GPU, DPU utilization and power information of the nodes, and the computing power estimation model is used to predict the calculation. power requirements, and match nodes that meet the requirements for request forwarding to optimize the use of resources.
It effectively avoids forwarding business algorithm requests to nodes with insufficient computing power, improves the request success rate, and reduces power consumption by optimizing resource usage, achieving balanced utilization of resources in edge computing scenarios.
Smart Images

Figure CN118784572A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of load balancing, and in particular to a load balancing method and system based on OpenEuler edge computing. Background Art
[0002] Edge computing is a concept of decentralized computing networks that provide applications with infrastructure such as processing and storage capabilities, network connectivity, and data transmission. Edge computing can process and interact between the device side, edge cloud, and core cloud to reduce the latency of data transmission and processing. OpenEuler can adapt to various edge computing scenarios, including the Internet of Things, 5G, and Internet of Vehicles. It can be customized and expanded according to actual needs to meet the needs of different fields.
[0003] Microservices are a paradigm of service architecture that improves the maintainability, scalability, and reliability of applications by splitting them into a set of smaller, loosely coupled services. Edge computing and microservices can be used to build a distributed service architecture, deploying applications on edge devices or edge servers to improve system performance and responsiveness, thereby meeting the needs for low-latency and high-bandwidth networks. Microservices can span multiple edge devices and cloud services to handle different tasks, achieving more flexible scalability and extensibility. Microservices are interdependent, and if one of the services is abnormal, it may cause the entire application to crash. Therefore, service health checks are very important in microservice architectures. The health check method obtains the health status of the service by accessing interfaces such as / health or / status. These interfaces can return information such as the service's CPU usage, memory usage, request processing time, or the service's status code. By performing regular and comprehensive health checks on services, problems can be discovered and solved in a timely manner to ensure the stability and availability of applications.
[0004] With the rapid development of artificial intelligence, a large number of AI algorithms provide services in the form of microservices. Based on the characteristics of AI algorithms' own demand for computing resources such as NPU, GPU, and DPU, traditional microservice discovery strategies do not meet business needs. At the same time, in edge computing scenarios, edge devices are often resource-constrained and have strict requirements on power consumption. How to use edge cluster resources in a balanced manner is an important issue in edge computing scenarios. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention proposes a load balancing solution based on OpenEuler edge computing.
[0006] The first aspect of the present invention proposes a load balancing method based on OpenEuler edge computing.
[0007] The method comprises:
[0008] Step S1: Start a microservice framework in the OpenEuler operating system environment, where the microservice framework is deployed on any edge node;
[0009] The microservice framework includes a registration center, a microservice gateway and a computing power estimation model;
[0010] Step S2: The microservices on any edge node and other edge nodes respectively register with the registration center in the microservice framework;
[0011] Step S3: The microservice gateway receives the computing task from the intelligent terminal, and obtains the online identification information and computing power parameter information of the registered microservice based on the deployed microservice framework;
[0012] Step S4: The microservice gateway loads the computing power estimation model, uses the computing power estimation model to predict the computing power demand based on the computing task, matches the corresponding registered microservice, and forwards the computing task to the corresponding registered microservice.
[0013] According to the method of the first aspect of the present invention, in step S2, each microservice located on any edge node registers a microservice with the registration center in the microservice framework, and each microservice located on other edge nodes registers a microservice with the registration center through the microservice gateway in the microservice framework.
[0014] According to the method of the first aspect of the present invention, in step S3, the microservice gateway receives a computing task from a smart terminal, uses a microservice activity detection mechanism to send heartbeat renewal information to the registration center, and receives heartbeat renewal response information from the registration center, wherein the heartbeat renewal response information includes the online identification information and the computing power parameter information of the registered microservice.
[0015] According to the method of the first aspect of the present invention, in step S3, the computing power parameter information of the registered microservice includes the NPU utilization, DPU utilization, GPU utilization and battery life information of the edge computing node where the registered microservice is located.
[0016] According to the method of the first aspect of the present invention, in step S4, the computing power estimation model is used to predict the computing power demand based on the computing task, the computing power resource status of the edge computing node where each registered microservice is located is obtained according to the computing power parameter information, and the registered microservices that match the computing power demand and whose online representation information is confirmed to be online are determined.
[0017] The second aspect of the present invention proposes a load balancing system based on OpenEuler edge computing. The system includes a registration center, a microservice gateway and a computing power estimation model; the registration center, the microservice gateway and the computing power estimation model constitute a microservice framework; wherein:
[0018] Start the microservice framework in the OpenEuler operating system environment and deploy the microservice framework on any edge node;
[0019] The microservices on any edge node and other edge nodes respectively register microservices with the registration center in the microservice framework;
[0020] The microservice gateway receives computing tasks from the intelligent terminal, and obtains online identification information and computing power parameter information of registered microservices based on the deployed microservice framework;
[0021] The microservice gateway loads the computing power estimation model, uses the computing power estimation model to predict computing power requirements based on the computing task, matches the corresponding registered microservice, and forwards the computing task to the corresponding registered microservice.
[0022] According to the system of the second aspect of the present invention, the microservice gateway receives computing tasks from smart terminals, uses the microservice detection mechanism to send heartbeat renewal information to the registration center, and receives heartbeat renewal response information from the registration center, wherein the heartbeat renewal response information includes the online identification information and the computing power parameter information of the registered microservice; the computing power parameter information of the registered microservice includes the NPU utilization, DPU utilization, GPU utilization and battery life information of the edge computing node where the registered microservice is located.
[0023] According to the system of the second aspect of the present invention, the computing power estimation model is used to predict the computing power demand based on the computing task, the computing power resource status of the edge computing node where each registered microservice is located is obtained according to the computing power parameter information, and the registered microservices that match the computing power demand and whose online representation information is confirmed to be online are determined.
[0024] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the load balancing method based on OpenEuler edge computing described in the first aspect of the present disclosure are implemented.
[0025] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the load balancing method based on OpenEuler edge computing described in the first aspect of the present disclosure are implemented.
[0026] In summary, the technical solution proposed by the present invention addresses the defect that the microservice liveness detection strategy does not consider the utilization of NPU, GPU, DPU and other resources, and can avoid forwarding business algorithm requests to nodes with insufficient computing power and avoid business request failures. At the same time, the request forwarding strategy also uses the remaining power of the device as a parameter to optimize the balanced use of cluster resources in edge computing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 It is a flow chart of a load balancing method based on OpenEuler edge computing according to an embodiment of the present invention.
[0029] Figure 2 The figure is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0031] To prevent business algorithm requests from being forwarded to nodes with insufficient computing power, two problems need to be solved. How to know the computing power resource status of the node? The solution is for the microservice detection module to collect the utilization rate of the device NPU, GPU, and DPU. How to estimate the computing power demand based on the algorithm request parameters? A computing power estimation model can be trained through statistical training. This model can estimate the computing power demand based on the input parameters.
[0032] The present invention optimizes and transforms the live detection strategy and request forwarding module of the microservice framework. The transformation method includes: (1) Service health check heartbeat renewal collects the utilization rate of the device NPU, GPU, DPU, and the device power information and reports it to the registration center. (2) The microservice gateway module loads the computing power estimation model. When the microservice gateway receives a business algorithm request, it calculates the computing power requirement based on the business algorithm request parameters and the computing power estimation model, and then queries the registration center. The registration center selects a set of nodes that meet the computing power requirements (sorted from large to small by remaining power) and returns it to the microservice gateway. The microservice gateway selects the first node by default to forward the request, thereby achieving both node and computing power adaptation and balanced use of cluster resources.
[0033] The above method adopts a relatively simple strategy for power consumption control, that is, when computing power conditions are met, the node with the largest remaining power is selected for forwarding. If the business algorithm requests and request timelines in the system are known in advance, the optimal forwarding strategy can be obtained by finding the optimal solution algorithm.
[0034] The first aspect of the present invention proposes a load balancing method based on OpenEuler edge computing.
[0035] The method comprises:
[0036] Step S1: Start a microservice framework in the OpenEuler operating system environment, where the microservice framework is deployed on any edge node;
[0037] The microservice framework includes a registration center, a microservice gateway and a computing power estimation model;
[0038] Step S2: The microservices on any edge node and other edge nodes respectively register with the registration center in the microservice framework;
[0039] Step S3: The microservice gateway receives the computing task from the intelligent terminal, and obtains the online identification information and computing power parameter information of the registered microservice based on the deployed microservice framework;
[0040] Step S4: The microservice gateway loads the computing power estimation model, uses the computing power estimation model to predict the computing power demand based on the computing task, matches the corresponding registered microservice, and forwards the computing task to the corresponding registered microservice.
[0041] According to the method of the first aspect of the present invention, in step S2, each microservice located on any edge node registers a microservice with the registration center in the microservice framework, and each microservice located on other edge nodes registers a microservice with the registration center through the microservice gateway in the microservice framework.
[0042] According to the method of the first aspect of the present invention, in step S3, the microservice gateway receives a computing task from a smart terminal, uses a microservice activity detection mechanism to send heartbeat renewal information to the registration center, and receives heartbeat renewal response information from the registration center, wherein the heartbeat renewal response information includes the online identification information and the computing power parameter information of the registered microservice.
[0043] According to the method of the first aspect of the present invention, in step S3, the computing power parameter information of the registered microservice includes the NPU utilization, DPU utilization, GPU utilization and battery life information of the edge computing node where the registered microservice is located.
[0044] According to the method of the first aspect of the present invention, in step S4, the computing power estimation model is used to predict the computing power demand based on the computing task, the computing power resource status of the edge computing node where each registered microservice is located is obtained according to the computing power parameter information, and the registered microservices that match the computing power demand and whose online representation information is confirmed to be online are determined.
[0045] In some embodiments, Figure 1 As shown, first the microservice framework is started, and the microservice gateway will load the computing power estimation model. When the service in the node is started, it will register with the microservice registration center. The external node service can register with the registration center through the microservice gateway. At the same time, the microservice liveness detection mechanism will periodically send heartbeat renewal information to the registration center. The heartbeat renewal needs to include information such as node NPU, DPU, and GPU utilization.
[0046] In some embodiments, when an external terminal device initiates an algorithm request, the gateway calculates the computing power requirement based on the business algorithm request parameters and the computing power estimation model, and then queries the registration center. The registration center selects a list of computing power services that meet the requirements (sorted from large to small by the remaining power of the node where the service is located) and returns it to the microservice gateway. The microservice gateway selects the first node by default to forward the request.
[0047] In some embodiments, if there are calls between services (RPC method), the computing power estimation model needs to be loaded when the service is started. When an external service request is initiated, the process is similar to that of a terminal device initiating an algorithm request. The difference is that the service itself needs to calculate the computing power requirement based on the request parameters and the computing power estimation model.
[0048] In some embodiments, the model training process includes:
[0049] (1) Dataset preparation. A set of algorithm input parameters can produce a set of computing power usage outputs. Randomly adjusting the algorithm input can produce different outputs. In this way, each set of input and output constitutes the original training data set. If the parameter has a range, the parameter value requirement must include the minimum and maximum values.
[0050] (2) Training model selection. The algorithm can be abstracted as a model that receives a set of parameter inputs and outputs the utilization rate (floating point number) of NPU, CPU, GPU, etc. Gradient boosting models such as GBDT and XGBOOST can support the training of such models. At the same time, the gradient boosting model can process high-dimensional data, has good modeling capabilities for nonlinear relationships, and has strong generalization capabilities.
[0051] (3) Training. Randomly extract 80% of the data from the data set in step (1) as the training set, and the remaining 20% as the validation set. Use the training set to train the model using the gradient boosting model algorithm in step (2).
[0052] (4) Evaluation and optimization. Use the validation set to verify the model trained in step (3) and evaluate the model effect. You can also tune the model parameters, such as learning_rate (learning rate), max_depth (maximum depth of the tree), n_estimators (number of decision trees), etc.
[0053] In some embodiments, the matching strategy includes: if multiple nodes that meet the computing power are matched, they can be selected based on the last request response delay. For example, the last request response delay of each node is sorted from small to large, and the smallest one is selected. This selection is based on two points. A small delay means that the network delay to the node is small and the node load is not high.
[0054] The second aspect of the present invention proposes a load balancing system based on OpenEuler edge computing. The system includes a registration center, a microservice gateway and a computing power estimation model; the registration center, the microservice gateway and the computing power estimation model constitute a microservice framework; wherein:
[0055] Start the microservice framework in the OpenEuler operating system environment and deploy the microservice framework on any edge node;
[0056] The microservices on any edge node and other edge nodes respectively register microservices with the registration center in the microservice framework;
[0057] The microservice gateway receives computing tasks from the intelligent terminal, and obtains online identification information and computing power parameter information of registered microservices based on the deployed microservice framework;
[0058] The microservice gateway loads the computing power estimation model, uses the computing power estimation model to predict computing power requirements based on the computing task, matches the corresponding registered microservice, and forwards the computing task to the corresponding registered microservice.
[0059] According to the system of the second aspect of the present invention, the microservice gateway receives computing tasks from smart terminals, uses the microservice detection mechanism to send heartbeat renewal information to the registration center, and receives heartbeat renewal response information from the registration center, wherein the heartbeat renewal response information includes the online identification information and the computing power parameter information of the registered microservice; the computing power parameter information of the registered microservice includes the NPU utilization, DPU utilization, GPU utilization and battery life information of the edge computing node where the registered microservice is located.
[0060] According to the system of the second aspect of the present invention, the computing power estimation model is used to predict the computing power demand based on the computing task, the computing power resource status of the edge computing node where each registered microservice is located is obtained according to the computing power parameter information, and the registered microservices that match the computing power demand and whose online representation information is confirmed to be online are determined.
[0061] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the load balancing method based on OpenEuler edge computing described in the first aspect of the present disclosure are implemented.
[0062] Figure 2 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 2 As shown, the electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc.
[0063] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a structural diagram of the part related to the technical solution of the present disclosure, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0064] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the load balancing method based on OpenEuler edge computing described in the first aspect of the present disclosure are implemented.
[0065] In summary, the technical solution proposed by the present invention addresses the defect that the microservice liveness detection strategy does not consider the utilization of NPU, GPU, DPU and other resources, and can avoid forwarding business algorithm requests to nodes with insufficient computing power and avoid business request failures. At the same time, the request forwarding strategy also uses the remaining power of the device as a parameter to optimize the balanced use of cluster resources in edge computing scenarios.
[0066] Please note that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above-mentioned embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent in this application shall be based on the attached claims.
Claims
1. A load balancing method based on OpenEuler edge computing, characterized in that: The method comprises: Step S1: Start a microservice framework in the OpenEuler operating system environment, where the microservice framework is deployed on any edge node; The microservice framework includes a registration center, a microservice gateway and a computing power estimation model; Step S2: The microservices on any edge node and other edge nodes respectively register with the registration center in the microservice framework; Step S3: The microservice gateway receives the computing task from the intelligent terminal, and obtains the online identification information and computing power parameter information of the registered microservice based on the deployed microservice framework; Step S4: The microservice gateway loads the computing power estimation model, uses the computing power estimation model to predict the computing power demand based on the computing task, matches the corresponding registered microservice, and forwards the computing task to the corresponding registered microservice.
2. A load balancing method based on OpenEuler edge computing according to claim 1, characterized in that: In step S2, each microservice located on any edge node registers microservices with the registration center in the microservice framework, and each microservice located on other edge nodes registers microservices with the registration center through the microservice gateway in the microservice framework.
3. A load balancing method based on OpenEuler edge computing according to claim 2, characterized in that: In step S3, the microservice gateway receives computing tasks from smart terminals, uses the microservice detection mechanism to send heartbeat renewal information to the registration center, and receives heartbeat renewal response information from the registration center, wherein the heartbeat renewal response information includes the online identification information and the computing power parameter information of the registered microservice.
4. A load balancing method based on OpenEuler edge computing according to claim 3, characterized in that: In step S3, the computing power parameter information of the registered microservice includes the NPU utilization, DPU utilization, GPU utilization and battery life information of the edge computing node where the registered microservice is located.
5. A load balancing method based on OpenEuler edge computing according to claim 4, characterized in that: In step S4, the computing power estimation model is used to predict the computing power demand based on the computing task, the computing power resource status of the edge computing node where each registered microservice is located is obtained according to the computing power parameter information, and the registered microservices that match the computing power demand and whose online representation information is confirmed to be online are determined.
6. A load balancing system based on OpenEuler edge computing, characterized in that: The system includes a registration center, a microservice gateway and a computing power estimation model; the registration center, the microservice gateway and the computing power estimation model constitute a microservice framework; wherein: Start the microservice framework in the OpenEuler operating system environment and deploy the microservice framework on any edge node; The microservices on any edge node and other edge nodes respectively register microservices with the registration center in the microservice framework; The microservice gateway receives computing tasks from the intelligent terminal, and obtains online identification information and computing power parameter information of registered microservices based on the deployed microservice framework; The microservice gateway loads the computing power estimation model, uses the computing power estimation model to predict computing power requirements based on the computing task, matches the corresponding registered microservice, and forwards the computing task to the corresponding registered microservice.
7. A load balancing system based on OpenEuler edge computing according to claim 6, characterized in that: The microservice gateway receives computing tasks from smart terminals, uses a microservice live detection mechanism to send heartbeat renewal information to the registration center, and receives heartbeat renewal response information from the registration center, wherein the heartbeat renewal response information includes the online identification information and the computing power parameter information of the registered microservice; The computing power parameter information of the registered microservice includes the NPU utilization, DPU utilization, GPU utilization and battery life information of the edge computing node where the registered microservice is located.
8. A load balancing system based on OpenEuler edge computing according to claim 7, characterized in that: The computing power estimation model is used to predict the computing power demand based on the computing task, and the computing power resource status of the edge computing node where each registered microservice is located is obtained according to the computing power parameter information, and the registered microservices that match the computing power demand and whose online representation information is confirmed to be online are determined.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the load balancing method based on OpenEuler edge computing described in any one of claims 1-5 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps in the load balancing method based on OpenEuler edge computing described in any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Unmanned aerial vehicle group collaborative operation system
CN119690113A
A UAV swarm collaborative operation system
CN119690113B
Service node discovery method, device and equipment under edge computing power network and medium
CN121262270A
Service node discovery method and device under edge computing network, equipment and medium
CN121262270B
