Resource management method and system for edge node
By setting namespace and resource quotas on edge nodes, the target edge node group is generated, and resource scheduling is performed based on user parameters, regional parameters and resource types, the problem of edge node resource management relying on manual operations, and the stability of edge applications is achieved and automated scheduling reduce operation and maintenance costs.
Patent Information
- Application Number
- CN202411274965.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, resource management of edge nodes relies on manual operations, resulting in unstable resource scheduling. As the number of edge nodes and applications increases, the risks are extremely high, making it difficult to achieve intelligent scheduling.
By setting namespace and resource quotas on edge nodes, a target edge node group is generated, and resource scheduling is performed based on user parameters, regional parameters and resource types, automated group allocation and management scheduling is realized, and operation and maintenance costs are reduced.
It improves the stability of edge application scheduling, reduces operation and maintenance costs, and realizes intelligent management and automated scheduling of edge node resources.
Smart Images

Figure CN119248478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a resource management method and system for edge nodes. Background Art
[0002] With the development of big data and artificial intelligence, edge cloud has become an important bridge between the physical world and the digital world. Edge cloud extends computing from the cloud center to the edge of the network, providing intelligent services to users nearby. It is a distributed open platform that integrates core capabilities of network, computing, storage and applications.
[0003] At present, resource management of edge nodes is often still done through manual operations, and intelligent scheduling cannot be achieved.
[0004] However, as the number of edge nodes and applications increases, the risk of manual operation is extremely high, which will lead to unstable scheduling of edge applications. Summary of the invention
[0005] The embodiments of the present invention provide a resource management method and system for edge nodes, which can improve the stability of edge application scheduling.
[0006] In a first aspect, an embodiment of the present invention provides a resource management method for an edge node, the method comprising:
[0007] At least one namespace is set for at least one user, wherein one user corresponds to one namespace, and each user can set a target resource type in the corresponding namespace;
[0008] Setting a resource quota for each namespace, wherein the resource quota includes at least one of a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group limit;
[0009] Setting a group for at least one edge node to generate a grouped target edge node group, wherein each of the target edge node groups includes at least one target edge node;
[0010] Based on the at least one namespace and the resource quota, scheduling the target resource corresponding to the target resource type to the target edge node for resource management;
[0011] Preferably,
[0012] The step of setting a group for at least one edge node and generating a grouped target edge node group includes:
[0013] Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, wherein M is used to reflect the number of the edge nodes, and M>0;
[0014] Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M;
[0015] Determining a first user parameter, a first region parameter, and a first target resource type parameter for each of the edge node groups;
[0016] Matching the M edge nodes with the N edge node groups to generate grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group has the same at least one of the first user parameter, the first regional parameter, and the first target resource type parameter as the matched target edge node;
[0017] Preferably,
[0018] The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes:
[0019] Determine a second user parameter, a second region parameter, and a second target resource type parameter of the target resource;
[0020] Based on the first user parameter, the first regional parameter, the first target resource type parameter and the second user parameter, the second regional parameter, and the second target resource type parameter, the target resource is scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value;
[0021] Preferably,
[0022] After setting the resource quota for each namespace, the method further includes:
[0023] Setting attribute parameters for the multiple containers contained in each of the namespaces, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter;
[0024] The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes:
[0025] Based on the at least one namespace, the resource quota and the attribute parameter, scheduling the target resource corresponding to the target resource type to the target edge node for resource management;
[0026] In a second aspect, an embodiment of the present invention provides a resource management system for an edge node, the system comprising: a namespace creation module: used to set at least one namespace for at least one user, wherein one user corresponds to one namespace, and each of the users can set a target resource type in the corresponding namespace;
[0027] Namespace quota module: used to set resource quota for each namespace created by the namespace creation module, wherein the resource quota includes at least one of: a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group number limit;
[0028] An edge node grouping configuration module, used to set a group for at least one edge node and generate a grouped target edge node group, wherein each of the target edge node groups includes at least one target edge node;
[0029] an edge application deployment module, configured to dispatch the target resource corresponding to the target resource type to the target edge node configured by the edge node grouping configuration module for resource management based on the at least one namespace created by the namespace creation module and the resource quota set by the namespace quota module;
[0030] Preferably,
[0031] The edge node grouping configuration module is further used to execute:
[0032] Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, wherein M is used to reflect the number of the edge nodes, and M>0;
[0033] Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M;
[0034] Determining a first user parameter, a first region parameter, and a first target resource type parameter for each of the edge node groups;
[0035] Matching the M edge nodes with the N edge node groups to generate grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group has the same at least one of the first user parameter, the first regional parameter, and the first target resource type parameter as the matched target edge node;
[0036] Preferably,
[0037] The edge application deployment module is further used to execute:
[0038] Determine a second user parameter, a second region parameter, and a second target resource type parameter of the target resource;
[0039] Based on the first user parameter, the first regional parameter, the first target resource type parameter, the second user parameter, the second regional parameter, and the second target resource type parameter, the target resource is scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value;
[0040] Preferably,
[0041] After the namespace quota module, it further includes: an attribute parameter quota module;
[0042] The attribute parameter quota module is used to perform:
[0043] Setting attribute parameters for the multiple containers contained in each of the namespaces, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter;
[0044] The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes:
[0045] Based on the at least one namespace, the resource quota and the attribute parameter, scheduling the target resource corresponding to the target resource type to the target edge node for resource management;
[0046] In a third aspect, an embodiment of the present invention provides a resource management system for an edge node, including: at least one memory and at least one processor;
[0047] The at least one memory is used to store a machine-readable program;
[0048] The at least one processor is configured to call the machine-readable program to execute any one of the methods described in the first aspect;
[0049] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes any one of the methods described in the first aspect.
[0050] An embodiment of the present invention provides a resource management method for edge nodes, which is used to quickly realize the automated grouping allocation and management scheduling of edge nodes. By using a namespace, the resources in the edge cloud cluster are divided into different logical areas to provide independent resource management and access control for different teams or departments. In addition, the number of available resources in the namespace is limited by the namespace quota. The edge nodes are then grouped to group edge nodes with the same characteristics into a group, organize the edge nodes in the form of node groups, deploy them according to node groups, and meet the differentiated deployment requirements between different node groups, so as to realize the automatic scheduling of applications under the namespace to the edge nodes of the corresponding group. Through the above process, the complexity of edge application lifecycle management can be reduced, and the operation and maintenance costs can be effectively reduced, thereby improving the stability of edge node application scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is a flow chart of a resource management method for an edge node provided by an embodiment of the present invention;
[0053] Figure 2 is a flow chart of another resource management method for edge nodes provided by an embodiment of the present invention;
[0054] Figure 3 is a schematic diagram of a resource management system for an edge node provided by an embodiment of the present invention;
[0055] Figure 4 It is a schematic diagram of another resource management system for edge nodes provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in 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.
[0057] like Figure 1As shown, an embodiment of the present invention provides a resource management method for an edge node, which may include the following steps:
[0058] Step 101: at least one namespace is set for at least one user, wherein one user corresponds to one namespace, and each user can set a target resource type in the corresponding namespace;
[0059] Step 102: Setting a resource quota for each namespace, wherein the resource quota includes at least one of a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group limit;
[0060] Step 103: grouping at least one edge node to generate a grouped target edge node group, wherein each target edge node group includes at least one target edge node;
[0061] Step 104: Based on at least one namespace and resource quota, the target resource corresponding to the target resource type is scheduled to the target edge node for resource management.
[0062] In an embodiment of the present invention, a resource management method for edge nodes is provided to quickly realize automated grouping allocation and management scheduling of edge nodes. By using namespaces, the resources in the edge cloud cluster are divided into different logical areas to provide independent resource management and access control for different teams or departments. In addition, the number of available resources in the namespace is limited by namespace quotas. The edge nodes are then grouped to group edge nodes with the same characteristics into a group, organize the edge nodes in the form of node groups, deploy them according to node groups, and meet the differentiated deployment requirements between different node groups, so as to realize the automatic scheduling of applications under the namespace to the edge nodes of the corresponding group. Through the above process, the complexity of edge application lifecycle management can be reduced, and the operation and maintenance costs can be effectively reduced, thereby improving the stability of edge node application scheduling.
[0063] In order to group the edge nodes, in one embodiment of the present invention, the step 103 in the above embodiment of setting a group for at least one edge node to generate a grouped target edge node group includes:
[0064] Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, wherein M is used to reflect the number of the edge nodes, and M>0;
[0065] Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M;
[0066] Determining a first user parameter, a first region parameter, and a first target resource type parameter for each of the edge node groups;
[0067] The M edge nodes are matched with the N edge node groups to generate grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group is identical to at least one of the first user parameter, the first regional parameter, and the first target resource type parameter of the matched target edge node.
[0068] In an embodiment of the present invention, in an edge cloud cluster, edge nodes can be grouped according to different users, different regions or different target resource types to which edge nodes belong through an edge node grouping configuration module, so that edge nodes can be organized in the form of node groups, and the same node can only belong to one node group at the same time. Edge node grouping can select nodes by specifying the node name or the node label through the matchLabels field. After a node is included in a group, the label of namespace_name:podnodeselector will be added.
[0069] For example, assuming that edge node 1 and edge node 3 can be deployed for applications of user team1, and edge node 2 and edge node 4 can be deployed for applications of user team2, edge node 1 and edge node 3 can be divided into node group A and marked with team1, and edge node 2 and edge node 4 can be divided into node group B and marked with team2. User team1 and user team2 in the above process are the first user parameters, and the target resource type can be any one of Pod, ConfigMap, and Secret.
[0070] In order to implement edge application deployment, in one embodiment of the present invention, the step 104 in the above embodiment, based on the at least one namespace and the resource quota, scheduling the target resource corresponding to the target resource type to the target edge node for resource management includes:
[0071] Determine a second user parameter, a second region parameter, and a second target resource type parameter of the target resource;
[0072] Based on the first user parameter, the first regional parameter, the first target resource type parameter and the second user parameter, the second regional parameter, and the second target resource type parameter, the target resource is scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value.
[0073] In an embodiment of the present invention, the edge application deployment module can be used to package edge application resources and deploy them according to node groups to meet the differentiated deployment requirements between different node groups. It mainly includes the resource templates required by edge applications and the requirements for different edge node groups. For the edge application body, the edge application body version required for each group will be generated according to the edge application body template and differentiated configuration coverage, and they will be deployed to the specified groups separately by adjusting the nodeSelector. For other resources that the edge application depends on, such as ConfigMap and Service, only one corresponding resource will be created in the cluster through the template. The edge application will perform lifecycle management on the created resources. When the edge application is deleted, all created resources will be deleted.
[0074] For example, edge node group A can set the template to include edge nodes, pointed users, etc. When edge node group A needs to deploy an application, the template will include edge node 1 and edge node 3, and will also include user team 1. User team 1 can create specific target resource types in the namespace, such as ConfigMap, and edge node group A can call the Pod resources created by user team1. The user team1 included in the above edge node group A is the first user parameter, and the user team1 in the namespace is the second user parameter. When both the first user parameter and the second user parameter point to user team1, node group A can automatically schedule the target resource ConfigMap set by user team1.
[0075] In order to set the default computing resources of the containers contained in the namespace, in one embodiment of the present invention, after setting the resource quota for each namespace in step 102 in the above embodiment, the method further includes:
[0076] Setting attribute parameters for the multiple containers contained in each of the namespaces, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter;
[0077] The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes:
[0078] Based on the at least one namespace, the resource quota, and the attribute parameter, the target resource corresponding to the target resource type is scheduled to the target edge node for resource management.
[0079] In an embodiment of the present invention, by default, all containers in the edge cloud cluster have no CPU and memory restrictions, which may lead to a situation where a container application leaks memory and exhausts resources, affecting other applications. LimitRange can be used to add a resource limit to the namespace, including minimum computing resources and maximum computing resources, to limit the minimum and maximum computing resources of each Pod or container in the namespace, limit the ratio between the computing resource request and limit of each Pod or container in the namespace, limit the minimum and maximum storage space that can be declared for each storage volume in the namespace, and automatically inject it into the container when the container group is running.
[0080] like Figure 2 To more clearly illustrate the technical solution and advantages of the present invention, a resource management method for an edge node is described in detail below in accordance with an embodiment of the present invention. Specifically, the method may include the following steps:
[0081] Step 201: at least one namespace is set for at least one user, wherein one user corresponds to one namespace, and each user can set a target resource type in the corresponding namespace;
[0082] Specifically, you can create different namespaces for each user through the console, Kubernetes API, or kubectl command-line tool.
[0083] For example, you can use the namespace module to create a namespace team1 for user team1, and then user team1 can create specific types of resources under namespace team1, such as Pod, ConfigMap, and Secret.
[0084] Step 202: Setting a resource quota for each namespace, wherein the resource quota includes at least one of a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group limit;
[0085] Specifically, in edge cloud clusters, resource quotas can be used to limit the number of available resources in a namespace, such as limiting the CPU and memory resources of a container, the number of container groups running in a namespace, and limiting specific types of resources that can be created in a namespace, such as Pod, ConfigMap, and Secret. Then, through mechanisms such as resource quota ResourceQuota and attribute parameter LimitRange, resources such as CPU and memory can be automatically allocated to the namespace.
[0086] For example, the namespace quota module can automatically set a resource quota ResourceQuota for the user team1 namespace. After setting the resource quota ResourceQuota for the namespace, the upper limit of resources used by the team1 namespace can be limited to ensure the reasonable allocation and use of resources.
[0087] Step 203: setting attribute parameters for multiple containers included in each namespace, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter;
[0088] Step 204: Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, where M is used to reflect the number of edge nodes, and M>0;
[0089] Step 205: Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M;
[0090] Step 206: Determine a first user parameter, a first region parameter, and a first target resource type parameter of each edge node group;
[0091] Step 207: Match the M edge nodes with the N edge node groups to generate grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group has at least one of the same first user parameter, first region parameter, and first target resource type parameter as the matched target edge node;
[0092] Step 208: Determine a second user parameter, a second region parameter, and a second target resource type parameter of the target resource;
[0093] Step 209: Based on at least one namespace, resource quota, a first user parameter, a first regional parameter, a first target resource type parameter and a second user parameter, a second regional parameter, and a second target resource type parameter, the target resources are scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value.
[0094] like Figure 3 As shown, an embodiment of the present invention provides a resource management system for edge nodes, the system comprising:
[0095] The namespace creation module 301 is used to set at least one namespace for at least one user, wherein one user corresponds to one namespace, and each user can set a target resource type in the corresponding namespace;
[0096] Namespace quota module 302: used to set resource quota for each namespace created by the namespace creation module, wherein the resource quota includes at least one of: a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group number limit;
[0097] The edge node grouping configuration module 303 is used to set a group for at least one edge node and generate a grouped target edge node group, wherein each of the target edge node groups includes at least one target edge node;
[0098] The edge application deployment module 304 is used to schedule the target resources corresponding to the target resource type to the target edge node configured by the edge node grouping configuration module for resource management based on the at least one namespace created by the namespace creation module and the resource quota set by the namespace quota module.
[0099] based on Figure 3 In the resource management system of an edge node shown in the figure, the edge node grouping configuration module 303 in the above embodiment is further used to execute:
[0100] Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, wherein M is used to reflect the number of the edge nodes, and M>0;
[0101] Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M;
[0102] Determining a first user parameter, a first region parameter, and a first target resource type parameter for each of the edge node groups;
[0103] The M edge nodes are matched with the N edge node groups to generate grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group is identical to at least one of the first user parameter, the first regional parameter, and the first target resource type parameter of the matched target edge node.
[0104] based on Figure 3 In the resource management system of an edge node shown in the figure, the edge application deployment module 304 in the above embodiment is also used to execute:
[0105] Determine a second user parameter, a second region parameter, and a second target resource type parameter of the target resource;
[0106] Based on the first user parameter, the first regional parameter, the first target resource type parameter and the second user parameter, the second regional parameter, and the second target resource type parameter, the target resource is scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value.
[0107] based on Figure 3 A resource management system for edge nodes is shown, such as Figure 4 As shown, in one embodiment of the present invention, it further includes: an attribute parameter quota module 305;
[0108] The attribute parameter quota module 305 is used to perform:
[0109] Setting attribute parameters for the multiple containers contained in each of the namespaces, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter;
[0110] The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes:
[0111] Based on the at least one namespace, the resource quota, and the attribute parameter, the target resource corresponding to the target resource type is scheduled to the target edge node for resource management.
[0112] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a report merging device. In other embodiments of the present invention, a report merging device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0113] The information interaction, execution process and other contents between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.
[0114] An embodiment of the present invention further provides a resource management system for an edge node, comprising: at least one memory and at least one processor;
[0115] at least one memory for storing a machine-readable program;
[0116] At least one processor is used to call a machine-readable program to execute a resource management method for an edge node in any embodiment of the present invention.
[0117] An embodiment of the present invention further provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes a resource management method for an edge node in any embodiment of the present invention.
[0118] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.
[0119] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0120] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0121] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0122] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0123] Each embodiment of the present invention has at least the following beneficial effects:
[0124] 1. In an embodiment of the present invention, a resource management method for edge nodes is provided to quickly realize automated grouping allocation and management scheduling of edge nodes. By using namespaces, the resources in the edge cloud cluster are divided into different logical areas to provide independent resource management and access control for different teams or departments. In addition, the number of available resources in the namespace is limited by namespace quotas. The edge nodes are then grouped to group edge nodes with the same characteristics into a group, organize the edge nodes in the form of node groups, deploy them according to node groups, and meet the differentiated deployment requirements between different node groups, so as to realize automatic scheduling of applications under the namespace to the edge nodes of the corresponding group. Through the above process, the complexity of edge application lifecycle management can be reduced, and the operation and maintenance costs can be effectively reduced, thereby improving the stability of edge node application scheduling;
[0125] 2. In an embodiment of the present invention, in an edge cloud cluster, the edge node grouping configuration module can be used to group edge nodes according to the different users, regions or target resource types to which the edge nodes belong, so that the edge nodes are organized in the form of node groups, and the same node can only belong to one node group at a time. The edge node grouping can select nodes by specifying the node name or the node label through the matchLabels field. After a node is included in a group, the namespace_name:podnodeselector label will be added;
[0126] 3. In an embodiment of the present invention, the edge application deployment module can be used to package edge application resources, deploy them according to node groups, and meet the differentiated deployment requirements between different node groups. It mainly includes the resource templates required by edge applications and the requirements for different edge node groups. For the edge application body, the edge application body version required for each group will be generated according to the edge application body template and differentiated configuration overlays, and they will be deployed to the specified groups separately by adjusting the nodeSelector. For other resources that the edge application depends on, such as ConfigMap and Service, only one corresponding resource will be created in the cluster through the template. The edge application will perform lifecycle management on the created resources. When the edge application is deleted, all created resources will be deleted.
[0127] It should be noted that not all steps and modules in the above-mentioned processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0128] In the above embodiments, the hardware unit can be realized by mechanical means or electrical means. For example, a hardware unit can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operation. The hardware unit can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete the corresponding operation. Concrete implementation (mechanical means or dedicated permanent circuits or temporarily set circuits) can be determined based on cost and time considerations.
[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A resource management method for edge nodes, characterized in that: The method includes: At least one namespace is set for at least one user, wherein one user corresponds to one namespace, and each user can set a target resource type in the corresponding namespace; Setting a resource quota for each namespace, wherein the resource quota includes at least one of a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group limit; Setting a group for at least one edge node to generate a grouped target edge node group, wherein each of the target edge node groups includes at least one target edge node; Based on the at least one namespace and the resource quota, the target resource corresponding to the target resource type is scheduled to the target edge node for resource management.
2. The method according to claim 1, characterized in that The step of setting a group for at least one edge node and generating a grouped target edge node group includes: Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, wherein M is used to reflect the number of the edge nodes, and M>0; Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M; Determining a first user parameter, a first region parameter, and a first target resource type parameter for each of the edge node groups; The M edge nodes are matched with the N edge node groups to generate the grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group is identical to at least one of the first user parameter, the first regional parameter, and the first target resource type parameter of the matched target edge node.
3. The method according to claim 2, characterized in that The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes: Determining a second user parameter, a second region parameter, and a second target resource type parameter of the target resource; Based on the first user parameter, the first regional parameter, the first target resource type parameter and the second user parameter, the second regional parameter, and the second target resource type parameter, the target resource is scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value.
4. The method according to claim 1, characterized in that After setting the resource quota for each namespace, the method further includes: Setting attribute parameters for the multiple containers contained in each of the namespaces, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter; The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes: Based on the at least one namespace, the resource quota, and the attribute parameter, the target resource corresponding to the target resource type is scheduled to the target edge node for resource management.
5. The resource management system of the edge node is characterized in that: The system includes: A namespace creation module is used to set at least one namespace for at least one user, wherein one user corresponds to one namespace, and each user can set a target resource type in the corresponding namespace; Namespace quota module: used to set resource quota for each namespace created by the namespace creation module, wherein the resource quota includes at least one of: a total CPU limit, a total memory limit, a total storage limit, a total storage volume limit, and a container group number limit; An edge node grouping configuration module, used to set a group for at least one edge node and generate a grouped target edge node group, wherein each of the target edge node groups includes at least one target edge node; The edge application deployment module is used to schedule the target resources corresponding to the target resource type to the target edge node configured by the edge node grouping configuration module for resource management based on the at least one namespace created by the namespace creation module and the resource quota set by the namespace quota module.
6. The system according to claim 5, characterized in that The edge node grouping configuration module is further used to execute: Determine a first user parameter, a first region parameter, and a first target resource type parameter corresponding to M edge nodes, wherein M is used to reflect the number of the edge nodes, and M>0; Set N edge node groups, where N is used to reflect the number of edge node groups, N>0, N≤M; Determining a first user parameter, a first region parameter, and a first target resource type parameter for each of the edge node groups; The M edge nodes are matched with the N edge node groups to generate grouped target edge node groups, wherein each target edge node group includes at least one target edge node, and each target edge node group is identical to at least one of the first user parameter, the first regional parameter, and the first target resource type parameter of the matched target edge node.
7. The system according to claim 6, characterized in that The edge application deployment module is further used to execute: Determining a second user parameter, a second region parameter, and a second target resource type parameter of the target resource; Based on the first user parameter, the first regional parameter, the first target resource type parameter and the second user parameter, the second regional parameter, and the second target resource type parameter, the target resource is scheduled to the target edge node for resource management, wherein the first user parameter and the second user parameter have the same value, the first regional parameter and the second regional parameter have the same value, and the first target resource type parameter and the second target resource type parameter have the same value.
8. The system according to claim 5, characterized in that After the namespace quota module, it further includes: an attribute parameter quota module; The attribute parameter quota module is used to perform: Setting attribute parameters for the multiple containers contained in each of the namespaces, wherein the attribute parameters include a minimum computing resource parameter and a maximum computing resource parameter; The step of scheduling the target resource corresponding to the target resource type to the target edge node for resource management based on the at least one namespace and the resource quota includes: Based on the at least one namespace, the resource quota, and the attribute parameter, the target resource corresponding to the target resource type is scheduled to the target edge node for resource management.
9. A resource management system for edge nodes, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 4.
10. A computer readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to perform any one of the methods of claims 1 to 4.
