Resource allocation method and device based on edge computing, medium, equipment and product

By optimizing resource allocation in edge computing, and using preset node selection strategies to maximize physical resource consumption and minimize node fragmentation rate and energy consumption, the problems of unbalanced resource utilization and low utilization rate are solved, and more efficient resource management is achieved.

CN120378384AActive Publication Date: 2025-07-25BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510887741.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-07-25
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

In edge computing, the resource allocation method in the prior art is highly random, resulting in uneven resource utilization and low utilization rate.

Method used

By determining the target edge cluster and node resource information when requesting a resource, the preset node selection strategy is used to maximize physical resource consumption, minimize node fragmentation rate and minimize node energy consumption, and optimize resource allocation.

Benefits of technology

Optimize resource allocation, reduce resource waste, improve resource utilization and reduce system energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378384A_ABST
    Figure CN120378384A_ABST
Patent Text Reader

Abstract

A resource allocation method and apparatus based on edge computing, a medium, a device and a product, relating to the field of edge computing, the method comprising: after determining a plurality of candidate nodes, determining a target node for allocating a target resource in the plurality of candidate nodes based on a preset node selection strategy. The node selection strategy can perform node selection by taking the maximum consumption of the preset physical resources in the nodes as the target, so that the nodes with fewer residual resources can be preferentially selected in the node selection process, and the resource waste is reduced; besides, the node selection strategy can also perform node selection by taking the minimum node fragmentation rate as a target, so that in the node selection process, nodes with relatively concentrated resource allocation can be preferentially selected, resource fragments are reduced, and the resource utilization rate is improved; besides, the node selection strategy can perform node selection by taking the minimum node energy consumption as a target, so that the node with relatively low energy consumption can be preferentially selected in the node selection process, and the overall energy consumption of the system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of edge computing technology, and specifically, to a resource allocation method, apparatus, medium, device, and product based on edge computing. Background Art

[0002] The edge computing architecture generally includes a central cluster and an edge cluster. When requesting resources from the cluster, resources are generally preferentially selected from the edge cluster for allocation to reduce data transmission latency and improve response speed.

[0003] However, in the related art, resources are usually randomly selected in the edge cluster, which has certain limitations. Summary of the Invention

[0004] This content part is provided to briefly introduce the concepts, which will be described in detail in the following detailed implementation part. This content part is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a resource allocation method based on edge computing. The resource allocation method based on edge computing includes: Responding to a resource application request, determining resource requirement information for the resource application request, where the resource requirement information is used to indicate a target edge cluster required and a target resource required, and the target resource includes a target resource specification and a target specification quantity; Obtaining node resource information for the target edge cluster, and determining, according to the node resource information and the target resource, a plurality of candidate nodes for allocating the target resource in the target edge cluster, where the node resource information is at least used to indicate resource allocation information of each node in the target edge cluster; Based on a preset node selection strategy, determining a target node for allocating the target resource among the plurality of candidate nodes, and obtaining the target resource from the target node for resource allocation, where the node selection strategy selects nodes with the goal of maximizing at least one of preset physical resource consumption in the nodes, minimizing the node fragmentation rate, and minimizing the node energy consumption.

[0006] In a second aspect, the present disclosure provides a resource allocation apparatus based on edge computing. The resource allocation apparatus based on edge computing includes: A first determination module, configured to respond to a resource application request and determine resource requirement information for the resource application request, where the resource requirement information is used to indicate a target edge cluster required and a target resource required, and the target resource includes a target resource specification and a target specification quantity; A second determination module, configured to obtain node resource information for the target edge cluster, and determine, according to the node resource information and the target resources, a plurality of candidate nodes in the target edge cluster for allocating the target resources, where the node resource information is at least used to indicate the resource allocation information of each node in the target edge cluster; A first processing module, configured to determine a target node for allocating the target resources from the plurality of candidate nodes based on a preset node selection strategy, and obtain the target resources from the target node for resource allocation, where the node selection strategy aims to maximize at least one of the preset physical resource consumption in the node, minimize the node fragmentation rate, and minimize the node energy consumption for node selection.

[0007] In a third aspect, the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processing device, the steps of the method in the first aspect are implemented.

[0008] In a fourth aspect, the present disclosure provides an electronic device, including: A storage device, on which a computer program is stored; A processing device, configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.

[0009] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method in the first aspect are implemented.

[0010] Through the above technical solutions, after determining a plurality of candidate nodes based on a resource application request, a target node for allocating target resources can be determined from the plurality of candidate nodes based on a preset node selection strategy. Since the node selection strategy can aim to maximize the preset physical resource consumption in the node, it is possible to preferentially select nodes with less remaining resources during the node selection process, thereby reducing resource waste; in addition, the node selection strategy can also aim to minimize the node fragmentation rate, so that during the node selection process, nodes with more concentrated resource allocation can be preferentially selected to reduce resource fragmentation and improve resource utilization; furthermore, since the node selection strategy can also aim to minimize the node energy consumption, it is possible to preferentially select nodes with lower energy consumption during the node selection process, thereby reducing the overall energy consumption of the system.

[0011] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale. In the drawings: Figure 1 A schematic diagram of a Kubernetes cluster in the related art is shown; Figure 2 A flowchart of a resource allocation method based on edge computing according to an exemplary embodiment of the present disclosure; Figure 3 A schematic block diagram of a resource application process based on edge computing according to an exemplary embodiment of the present disclosure; Figure 4 A schematic block diagram of a resource release process based on edge computing according to an exemplary embodiment of the present disclosure; Figure 5 A schematic diagram of the conversion between different resource information in resource allocation information according to an exemplary embodiment of the present disclosure; Figure 6 A structural block diagram of a resource allocation device based on edge computing according to an exemplary embodiment of the present disclosure; Figure 7 A schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Description of the Embodiments

[0013] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0014] It should be understood that the various steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0015] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0016] It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0017] It should be noted that the modification of "one" and "multiple" mentioned in this disclosure is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0018] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0019] It can be understood that before using the technical solutions disclosed in the embodiments of this disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0020] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium that performs the operations of the technical solutions of this disclosure according to the prompt message.

[0021] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not constitute a limitation on the implementation manner of this disclosure. Other manners that meet relevant laws and regulations can also be applied to the implementation manner of this disclosure.

[0023] At the same time, it can be understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.

[0024] It should be understood that Kubernetes (a container orchestration system) is an industrial-level container orchestration and scheduling platform for managing various different underlying containers. A complete Kubernetes cluster typically includes at least one master node (primary node) and multiple node nodes (worker nodes), as Figure 1 shown.

[0025] However, with the sharp increase in the number of Internet intelligent terminal devices and the advent of the 5G and Internet of Things eras, the traditional model of centralized storage and computing in cloud computing centers has gradually been unable to meet the requirements of terminal devices for timeliness, capacity, and computing power. To address this challenge, the edge computing architecture has emerged, that is, sinking the capabilities of cloud computing to the edge side and device side of users to form multiple edge clusters, and uniformly delivering, operating, and managing multiple edge clusters through a central cluster.

[0026] However, currently, when allocating resources to multiple edge clusters, a random allocation method is usually adopted, resulting in problems such as uneven resource utilization and low resource utilization rate.

[0027] Exemplarily, if the edge computing architecture includes a central cluster and 10 edge clusters, and each edge cluster consists of multiple nodes. Then, when the central cluster receives a resource application request, it can first determine the target edge cluster from multiple edge clusters, and then select candidate nodes from multiple nodes in the target edge cluster that can meet the resources required by the resource application request. If there are multiple candidate nodes, one or more candidate nodes can be arbitrarily selected from them to deploy tasks.

[0028] Based on this resource allocation method, some nodes undertake too many tasks, while some nodes are relatively idle, resulting in problems such as uneven resource utilization and low resource utilization rate.

[0029] In view of this, the present disclosure provides a resource allocation method, apparatus, medium, device, and product based on edge computing to solve the above technical problems.

[0030] The following further explains the embodiments of the present disclosure with reference to the accompanying drawings.

[0031] Figure 2 is a flowchart of a resource allocation method based on edge computing shown according to an exemplary embodiment of the present disclosure. Referring to Figure 2 , the resource allocation method based on edge computing may include the following steps: S201: In response to a resource application request, determine the resource requirement information for the resource application request. The resource requirement information is used to indicate the target edge cluster required and the target resources required. The target resources include the target resource specification and the target specification quantity.

[0032] It should be understood that the resource specification refers to a set of standardized hardware resource configurations defined in a computing environment to meet the requirements of different applications and services. It usually can include physical resources such as CPU (Central Processing Unit), memory, network bandwidth, hard disk, and network card. According to the performance requirements of the application, the needs of the user, and the overall architecture design of the system, different resource specifications can generally be set. For example, the resource specification can be: 4-core CPU, 8GB memory, 50GB storage; or it can be: 8-core CPU, 16GB memory, 100GB storage. Of course, there can also be various other different combinations, and the embodiments of the present disclosure do not impose any restrictions on this.

[0033] S202: Obtain the node resource information for the target edge cluster, and determine multiple candidate nodes for allocating the target resources in the target edge cluster according to the node resource information and the target resources, where the node resource information is at least used to indicate the resource allocation information of each node in the target edge cluster.

[0034] Exemplarily, the resource allocation information can include the unallocated resource specification information of each node, where the resource specification information includes the specification type and the specification quantity of the resource specification. Thus, after obtaining the node resource information of the target edge cluster, it can be first determined whether the unallocated specification quantity for the target resource specification in the target edge cluster is greater than the target specification quantity. If the unallocated specification quantity is less than the target specification quantity, the resource application request is not put into the waiting queue, but instead a failure result is immediately returned to inform the resource requester that its resource requirements cannot be met; if the unallocated specification quantity is greater than or equal to the target specification quantity, for each node, it can be determined whether the unallocated specification quantity of the node for the target resource specification is greater than the target specification quantity. If the unallocated specification quantity of the node for the target resource specification is greater than or equal to the target specification quantity, then this node can be used as a candidate node; if the unallocated specification quantity of each node in the target edge cluster for the target resource specification is less than the target specification quantity, multiple nodes can be arbitrarily selected from the target edge cluster so that the sum of the unallocated specification quantities of these nodes for the target resource specification is greater than or equal to the target specification quantity, and these nodes are used as candidate nodes.

[0035] S103: Based on a preset node selection strategy, determine the target node for allocating the target resources among the multiple candidate nodes, and obtain the target resources from the target node for resource allocation, where the node selection strategy selects nodes with the goal of maximizing at least one of the preset physical resource consumption in the nodes, minimizing the node fragmentation rate, and minimizing the node energy consumption.

[0036] It should be understood that the preset node selection strategy can be any selection strategy that can meet the above-mentioned goals, which can be determined according to actual conditions, and the embodiments of the present disclosure do not impose any restrictions on this. In a possible manner, the preset node selection strategy may include at least one of a first node selection strategy, a second node selection strategy, a third node selection strategy, and a fourth node selection strategy; wherein the first node selection strategy is used to select a candidate node whose resource load ratio reaches a preset resource load ratio from multiple candidate nodes when the target resource specification meets the preset resource specification; the second node selection strategy is used to select a candidate node whose preset physical resources can meet the target resource from multiple candidate nodes; the third node selection strategy is used to select a candidate node that has not allocated resources to a target user from the multiple candidate nodes, and the target user is a user who initiates a resource application request; the fourth node selection strategy is used to select a candidate node with the least number of virtual machines created from multiple candidate nodes.

[0037] Among them, the resource load ratio is an indicator for measuring the usage of node resources, which is obtained by calculating the ratio of the currently allocated resources of the node to the total resources of the node. In this embodiment, by selecting a candidate node whose resource load ratio reaches the preset resource load ratio from multiple candidate nodes as the target node when the target resource specification meets the preset resource specification, on the one hand, the possibility of resource fragmentation can be reduced; on the other hand, resource utilization can be improved. For example, the preset resource specification can be a resource specification with fewer required resources, such as: 2-core CPU, 4GB memory, 20GB storage, etc. In this way, tasks with small required resource specifications can be scheduled to nodes with higher resource loads, and tasks with large required resource specifications can be scheduled to nodes with lower resource loads, so as to improve the stability of the task processing process.

[0038] It should be understood that the physical resources in the node generally refer to the CPU (Central Processing Unit), memory, network bandwidth, hard disk, and network card, etc. Therefore, the preset physical resource can be any one of them, and the embodiments of the present disclosure do not impose any restrictions on this. In view of the fact that when allocating resources, resources such as memory, network bandwidth, hard disk, and network card can be intervened by means such as resource overselling, and the CPU usually does not support overselling due to its determinism and irreplaceability, therefore, the preset physical resource in this embodiment can refer to the CPU. By selecting a candidate node whose CPU can meet the required CPU as the target node from multiple candidate nodes, the task can have sufficiently powerful computing power to execute, thereby improving the task execution effect.

[0039] In addition, by selecting, from multiple candidate nodes, the candidate nodes that have not allocated resources to the target user as the target nodes, the resources required by the target user can be distributed in a decentralized manner, thereby reducing the risk that the resources required by the target user cannot be used due to the failure of a single node, and ensuring the continuity and stability of the service. In addition, by selecting, from multiple candidate nodes, the candidate node with the smallest number of created virtual machines as the target node, on the one hand, resource competition in the node can be reduced, the performance and stability of a single virtual machine can be improved, and on the other hand, resource waste can be reduced and the overall resource utilization rate can be improved.

[0040] Through the above technical solution, after determining multiple candidate nodes based on a resource application request, a target node for allocating target resources can be determined from the multiple candidate nodes based on a preset node selection strategy. Since the node selection strategy can select nodes with the goal of maximizing the consumption of preset physical resources in the nodes, during the node selection process, nodes with less remaining resources can be preferentially selected, thereby reducing resource waste; in addition, the node selection strategy can also select nodes with the goal of minimizing the node fragmentation rate, so that during the node selection process, nodes with relatively concentrated resource allocation can be preferentially selected to reduce resource fragmentation and improve resource utilization; furthermore, since the node selection strategy can also select nodes with the goal of minimizing the node energy consumption, during the node selection process, nodes with lower energy consumption can be preferentially selected, thereby reducing the overall energy consumption of the system.

[0041] To facilitate understanding of the edge-computing-based resource allocation method provided by the present disclosure, the possible implementation manners in the present disclosure will be described below.

[0042] In a possible manner, determining a target node for allocating target resources from multiple candidate nodes based on a preset node selection strategy may include: Determining the selection weight of each candidate node according to the preset node selection strategy; and determining the target node for allocating the target resources according to the selection weight of each candidate node.

[0043] It should be understood that there may be one or more preset node selection strategies. When there is one preset node selection strategy, selection can be performed among multiple candidate nodes based on this preset node strategy, and one, multiple, or any one of the selected candidate nodes can be used as the target node. When there are multiple preset node selection strategies, selection can be performed among multiple candidate nodes for each preset node strategy, and the selected candidate nodes are assigned a first weight value, and the unselected candidate nodes are assigned a second weight value. Finally, the sum of the weight values of each node is calculated, and one, multiple, or any one with the largest sum of weight values is used as the target node.

[0044] That is to say, among possible ways, there can be multiple preset node selection strategies. Accordingly, determining the selection weight of each candidate node according to the preset node selection strategy may include: Respectively according to each preset node selection strategy, perform node selection among multiple candidate nodes, assign a first weight value to the selected candidate nodes, and assign a second weight value to the unselected candidate nodes, where the first weight value is greater than the second weight value; for each candidate node, use the sum of the weight values of the candidate node under all node selection strategies as the selection weight of the candidate node.

[0045] In this embodiment, the first weight value and the second weight value can be determined according to the actual situation, and the embodiments of the present disclosure do not impose any restrictions on this. Exemplarily, the first weight value can be 10, and the second weight value can be 0. Thus, when performing node selection according to each preset node selection strategy, a weight of 10 can be assigned to the selected candidate nodes, and a weight of 0 can be assigned to the unselected candidate nodes. Finally, by counting the sum of the weights of each candidate node, the selection weight of the candidate node is obtained.

[0046] Exemplarily, continuing to refer to the above example, the preset node selection strategies can include a first node selection strategy, a second node selection strategy, a third node selection strategy, and a fourth node selection strategy. The candidate nodes can include candidate node a, candidate node b, and candidate node c.

[0047] When selecting candidate nodes based on the first node selection strategy, if candidate node a and candidate node c are hit, a weight value of 10 can be assigned to candidate node a and candidate node c, and a weight value of 0 can be assigned to candidate node b; When selecting candidate nodes based on the second node selection strategy, if candidate node a is hit, a weight value of 10 can be assigned to candidate node a, and a weight value of 0 can be assigned to candidate node b and candidate node c; When selecting candidate nodes based on the third node selection strategy, if candidate node a and candidate node b are hit, a weight value of 10 can be assigned to candidate node a and candidate node b, and a weight value of 0 can be assigned to candidate node c; When selecting candidate nodes based on the fourth node selection strategy, if candidate node c is hit, a weight value of 10 can be assigned to candidate node c, and a weight value of 0 can be assigned to candidate node a and candidate node b; Finally, by counting the sum of the weights of each candidate node, the selection weight of each candidate node is obtained, that is: the selection weight of candidate node a is 30, the selection weight of candidate node b is 10, and the selection weight of candidate node c is 20.

[0048] In possible ways, the resource allocation information may include unallocated resource specification information, pre-allocated resource specification information, and allocated resource specification information. The resource specification information may include the specification type and the specification quantity of the resource specification. Accordingly, the resource allocation method based on edge computing may further include: After determining the target node, based on the target resources, reduce the specification quantity of the specification type corresponding to the target resource specification in the unallocated resource specification information and increase the specification quantity of the specification type corresponding to the target resource specification in the pre-allocated resource specification information; according to the increased specification quantity in the pre-allocated resource specification information and the specification type corresponding to the increased specification quantity, create resource placeholders with the corresponding quantity and the corresponding specification type in the target node; Accordingly, obtaining the target resources from the target node for resource allocation may include: Allocate the resources corresponding to the resource placeholders in the target node; Accordingly, the resource allocation method based on edge computing may further include: According to the resource placeholders created in the target node, reduce the specification quantity of the specification type corresponding to the target resource specification in the pre-allocated resource specification information and increase the specification quantity of the specification type corresponding to the target resource specification in the allocated resource specification information.

[0049] Exemplarily, the resource allocation information of the target node may be as shown in Table 1: Table 1 Resource Allocation Information of the Target Node

[0050] Among them, the specification type a is: 4-core CPU, 8GB memory, 50GB storage; the specification type b is: 8-core CPU, 16GB memory, 100GB storage. available represents the unallocated specification quantity, reserved represents the pre-allocated specification quantity, allocated represents the allocated specification quantity, and total represents the total specification quantity.

[0051] If the target resource specifications are: 4-core CPU, 8GB of memory, and 50GB of storage, and the target specification quantity is 2, it indicates that the user needs 2 resources of specification type a. Thus, in order to successfully allocate the resources requested by the user, 2 resources of specification type a can be transferred from available to reserved first to pre-occupy the 2 resources of specification type a. That is to say, the available of specification type a can be changed to 13, and the reserved of specification type a can be changed to 2. After that, a resource placeholder request can be sent to the target node to create 2 resource placeholders of specification type a in the target node. Finally, in order to make the resource allocation information of the target node accurately reflect the resource allocation situation of the target node, 2 resources of specification type a can be transferred from reserved to allocated. That is to say, the reserved of specification type a can be changed to 0, and the allocated of specification type a can be changed to 7.

[0052] It should be understood that in the related art, after the edge cluster allocates resources, generally, the edge cluster reports the resource information, and then the central cluster updates the central inventory resources based on the reported resource information. However, due to the delay in inventory update, and in the scenario of high-frequency resource requests, multiple requests may operate based on the inventory information that has not been updated in time, resulting in the problem of resource over-selling. In the embodiments of the present disclosure, the required resources can be first converted into reserved resources, then the resources can be allocated to the target node, and finally the reserved resources can be converted into allocated resources, thereby realizing the phased and refined control of resource allocation, enabling the real-time synchronization and accurate update of the central inventory and the edge inventory status during the resource allocation process, thereby improving the strong consistency of the central inventory resources and the edge inventory resources and reducing the probability of resource over-selling problems. In addition, since the resource allocation information represents the information related to the resource specifications, when modifying the resource allocation information, simple addition or subtraction operations can be performed on the original record. Compared with recording the allocation situation of each physical resource in the resource allocation information, on the one hand, the amount of data modification and the amount of calculation can be reduced, and on the other hand, the modification efficiency of the resource allocation information can be improved. Especially in the scenario of high concurrency, the overall throughput and response speed of the system can be improved.

[0053] In a possible way, the node resource information can be stored in the inventory module of the central cluster. Correspondingly, the resource allocation method based on edge computing may further include: Determine the first resource information of the target node through the target node, and send the first resource information to the inventory module, where the first resource information is used to indicate the number of first resource placeholders corresponding to the specification type of the target resource specification in the target node. The inventory module is used to determine the first reconciliation result according to the first resource allocation information and the first resource information of the target node, and output a first alarm message when the first reconciliation result indicates that the number of first resource placeholders is inconsistent with the allocated specification quantity for the specification type corresponding to the target resource specification in the resource allocation information. The first alarm message can be used to prompt that the resource inventory information in the target node is inconsistent with the resource inventory in the inventory module for the target node.

[0054] Exemplarily, continuing to refer to the above example, after creating 2 resource placeholders of specification type a in the target node, the target node can count the number of resource placeholders corresponding to specification type a, that is: 7 resource placeholders of specification type a, and can actively report the 7 resource placeholders of specification type a to the inventory module. After receiving the information reported by the target node, the inventory module can perform a check based on the reported information and the stored resource allocation information for the target node. If the allocated quantity for specification type a in the resource allocation information of the target node is 7, it is considered that the resource inventory in the target node is consistent with the resource inventory in the inventory module for the target node; if the allocated quantity for specification type a in the resource allocation information of the target node is not 7, it is considered that the resource inventory in the target node is inconsistent with the resource inventory in the inventory module for the target node, and an alarm message can be generated to prompt the manager that the resource inventory information in the target node is inconsistent with the resource inventory in the inventory module for the target node, so that the manager can handle it in time.

[0055] Through the above method, when a new resource placeholder is added to the target node, an active reporting operation can be initiated to the inventory module, so that the inventory module can perform resource inventory verification in a timely manner, further improving the strong consistency between the central inventory resources and the edge inventory resources, and reducing the probability of resource over-selling problems. In addition, since only the number of resource placeholders corresponding to the newly added specification type is reported during the active reporting, on the one hand, the data transmission volume can be reduced, and on the other hand, the data verification volume of the inventory module can be reduced, improving the verification efficiency.

[0056] In a possible way, the resource allocation information may include unallocated resource specification information, pre-allocated resource specification information, and allocated resource specification information. The resource specification information may include the specification type and specification quantity of the resource specification. Correspondingly, the resource allocation method based on edge computing may further include: In response to a resource release request, determine resource release information for the resource release request, where the resource release information is used to indicate the node to be released, the specification type to be released, and the quantity of the specification to be released; according to the specification type to be released and the quantity of the specification to be released, remove resource placeholders corresponding to the corresponding quantity and the corresponding specification type from the node to be released, and reduce the quantity of the corresponding specification type in the allocated resource specification information and increase the quantity of the corresponding specification type in the unallocated resource specification information.

[0057] Exemplarily, the resource allocation information of the node to be released may be as shown in Table 2: Table 2 Resource Allocation Information of the Node to be Released

[0058] Among them, specification type a is: 4-core CPU, 8GB memory, 50GB storage; specification type b is: 8-core CPU, 16GB memory, 100GB storage. available represents the quantity of unallocated specifications, reserved represents the quantity of pre-allocated specifications, allocated represents the quantity of allocated specifications, and total represents the total quantity of specifications.

[0059] If the specification type to be released is specification type b and the quantity of the specification to be released is 1, thus, 1 resource placeholder corresponding to specification type b can be removed from the node to be released first; after the resource placeholder is successfully removed, 1 resource of specification type b can be transferred from allocated to available. That is to say, the allocated of specification type b can be changed to 3, and the available of specification type b can be changed to 7.

[0060] Through the above method, after releasing the resources of the target node, the allocated resources can be timely converted into unallocated resources, so as to realize the real-time synchronization and accurate update of the central inventory and the edge inventory status, improve the strong consistency of the central inventory resources and the edge inventory resources, and reduce the probability of resource over-selling problems. In addition, since the resource allocation information represents information related to resource specifications, when modifying the resource allocation information, simple addition or subtraction operations can be performed on the original record. Compared with recording the allocation situation of each physical resource in the resource allocation information, on the one hand, the amount of data modification and the amount of calculation can be reduced, and on the other hand, the modification efficiency of the resource allocation information can be improved. Especially in a high-concurrency scenario, the overall throughput and response speed of the system can be improved.

[0061] In a possible way, the node resource information can be stored in the inventory module of the central cluster. Correspondingly, the resource allocation method based on edge computing may further include: Determine the second resource information of the node to be released through the node to be released, and send the second resource information to the inventory module, where the second resource information is used to indicate the quantity of the second resource placeholders corresponding to the specification types to be released in the node to be released, and the inventory module is used to determine the second reconciliation result based on the second resource allocation information and the second resource information of the node to be released, and output a second alarm message when the second reconciliation result indicates that the quantity of the second resource placeholders is inconsistent with the allocated specification quantity for the specification type to be released in the second resource allocation information, where the second alarm message can be used to prompt that the resource inventory information in the target node is inconsistent with the resource inventory in the inventory module for the target node.

[0062] Exemplarily, continuing to refer to the above example, after removing 1 resource placeholder corresponding to specification type b from the node to be released, the target node can count the quantity of resource placeholders corresponding to specification type b, that is: 3 resource placeholders of specification type b, and can actively report the 3 resource placeholders of specification type b to the inventory module. After receiving the information reported by the node to be released, the inventory module can perform a check based on the reported information and the stored resource allocation information for the node to be released. If the allocated quantity for specification type b in the resource allocation information of the node to be released is 3, it is considered that the resource inventory in the node to be released is consistent with the resource inventory in the inventory module for the node to be released; if the allocated quantity for specification type a in the resource allocation information of the node to be released is not 3, it is considered that the resource inventory in the node to be released is inconsistent with the resource inventory in the inventory module for the node to be released, and an alarm message can be generated to prompt the manager that the resource inventory information in the target node is inconsistent with the resource inventory in the inventory module for the target node, so that the manager can handle it in time.

[0063] Through the above method, when removing a resource placeholder from the target node, an active reporting operation can be initiated to the inventory module, so that the inventory module can perform resource inventory verification in a timely manner, further improving the strong consistency between the central inventory resources and the edge inventory resources, and reducing the probability of resource over-selling problems. In addition, since only the quantity of resource placeholders corresponding to the removed specification type is reported during active reporting, on the one hand, the data transmission volume can be reduced, and on the other hand, the data verification volume of the inventory module can be reduced, improving the verification efficiency.

[0064] In a possible way, in order to further improve the strong consistency between the central inventory resources and the edge inventory resources and reduce the probability of resource over-selling problems, the inventory module can also periodically poll the quantity of resource placeholders of each node, perform verification with the stored resource allocation information, and generate an alarm message for alarm when they are inconsistent.

[0065] It should be understood that in the edge computing scenario, the volume of resource application requests is huge. For the same node, there are multiple requests that need its resources simultaneously. If the traditional method is adopted, that is, adding locks to each node, it will lead to low efficiency in processing resource application requests, fierce lock competition, and thus affect the overall performance. Therefore, in order to achieve efficient and accurate resource allocation in a high-concurrency scenario, avoid resource allocation conflicts caused by multiple requests operating simultaneously, and improve the request processing efficiency, among possible ways, a version number can also be introduced into the resource allocation information of each node, and after updating the resource allocation information, the version number is incremented, so as to increase the independence and sequentiality of each operation.

[0066] For example, if there are multiple requests simultaneously requesting the resource allocation of node A. When reading the resource allocation information of node A based on one of the requests and obtaining the version number as 1, resource allocation calculations and other operations can be performed based on this version number. After the operation is completed, when preparing to update the resource allocation information, it can first be checked whether the version number of the current resource allocation information is still 1. If the version number remains unchanged, it means that after reading the resource allocation information of node A, no other requests have updated the resource allocation information of node A. At this time, the updated information and the version number 2 can be written; on the contrary, if the version number has changed, it means that after reading the resource allocation information of node A, other requests have already updated the resource allocation information of node A. At this time, the latest resource allocation information of node A and the corresponding version number can be read again, and then the operation can be performed again. Thus, efficient and accurate resource allocation in a high-concurrency scenario is achieved, and the problem of resource allocation conflicts caused by multiple requests operating simultaneously is avoided.

[0067] To facilitate further understanding of the resource allocation method based on edge computing provided by the embodiments of the present disclosure, the following is combined with the attached Figure 3 , the attached Figure 4 and the attached Figure 5 to further illustrate the solution: First, the edge computing architecture in the embodiments of the present disclosure is described. The edge computing architecture in the embodiments of the present disclosure can be as Figure 3 or Figure 4 shown, including a central cluster and multiple edge clusters. Among them, the central cluster can include: A cloud platform, a unified interaction platform and interface for users. Users can apply for resources and release resources through the cloud platform; A scheduling engine, which is used to schedule resource application tasks and resource release tasks. When the scheduling task is a resource application task, a resource application operation can be initiated to the inventory module; when the scheduling task is a resource release task, a resource release operation can be initiated to the inventory module; The inventory module is a KV inventory model based on Node, where KEY is the unique identifier of Node. In the Value of Node, three types of resource information and total resources of inventory can be defined. The three types of resource information can be unallocated resources, reserved resources and allocated resources, and the conversion between the three types of resource information can be as follows: Figure 5 shown.

[0068] In this embodiment, each edge cluster may be composed of multiple Nodes, and the edge cluster may also be a set of KV storage models, where KEY is a unique identifier of the edge cluster.

[0069] Next, the resource allocation process of the present disclosure is described. Figure 3 As shown, the following steps may be included: Step 1: When a user initiates a resource application request through the cloud platform, the cloud platform can forward the resource application request to the scheduling engine; Step 2: After receiving the resource application request, the scheduling engine first parses the resource application request to obtain the required target edge cluster and the required first resource; then obtains the node resource information for the target edge cluster from the inventory module; then, the target node can be determined based on the first resource, the node resource information and the preset node selection strategy; finally, a resource application request for the target node can be initiated to the inventory module; Step 3: After receiving the resource application request for the target node, the inventory module transfers the corresponding quantity and type of resources from the unallocated resources of the target node to the reserved resources of the target node. If the transfer fails, it will retry. If the transfer is successful, it will feedback the message of successful transfer to the scheduling engine. Step 4: After receiving the message of successful transfer, the scheduling engine can immediately initiate a resource occupation request to the edge cluster; Step 5: After receiving the resource placeholder request, the edge cluster can create a resource placeholder of the corresponding quantity and type at the target node, and after successful creation, on the one hand, it can feedback the message of successful creation of the resource placeholder to the scheduling engine, so that the scheduling engine can initiate a request for resource allocation to the inventory module, so that the inventory module can transfer the corresponding quantity and type of resources from the reserved resources of the target node to the allocated resources; on the other hand, it can count the number of resource placeholders of the corresponding type and actively initiate a reporting operation to the inventory module, so that the inventory module can quickly perform inventory verification; Finally, the resource release process of the present disclosure is described. Figure 4 As shown, the following steps may be included: Step 1: When the user initiates a resource release request through the cloud platform, the cloud platform can forward the resource release request to the scheduling engine; Step 2: After receiving the resource release request, the scheduling engine first parses the resource release request to obtain the nodes to be released and the second resources to be released, and then, based on the nodes to be released and the second resources to be released, sends a request to remove the resource placeholder to the edge cluster; Step 3: After receiving the request to remove the resource placeholder, the edge cluster removes the corresponding number and type of resource placeholders from the nodes to be released. After the removal is successful, on the one hand, it feeds back a message indicating that the resource placeholder has been successfully removed to the scheduling engine, so that the scheduling engine can send a request to release the allocated resources to the inventory module, so that the inventory module can transfer the corresponding number and type of resources from the allocated resources of the nodes to be released to the unallocated resources; on the other hand, it can count the number of resource placeholders of the corresponding type and actively send a reporting operation to the inventory module to enable the inventory module to perform inventory verification.

[0070] Based on the same concept, an embodiment of the present disclosure further provides a resource allocation device based on edge computing, as Figure 6 shown. The resource allocation device 600 based on edge computing may include: A first determination module 601, configured to determine resource requirement information for the resource application request in response to the resource application request. The resource requirement information is used to indicate the target edge cluster required and the target resources required. The target resources include a target resource specification and a target specification quantity; A second determination module 602, configured to obtain node resource information for the target edge cluster, and determine, according to the node resource information and the target resources, a plurality of candidate nodes for allocating the target resources in the target edge cluster, where the node resource information is at least used to indicate the resource allocation information of each node in the target edge cluster; A first processing module 603, configured to determine a target node for allocating the target resources from the plurality of candidate nodes based on a preset node selection policy, and obtain the target resources from the target node for resource allocation, where the node selection policy selects nodes with the goal of maximizing at least one of the preset physical resource consumption in the node, minimizing the node fragmentation rate, and minimizing the node energy consumption.

[0071] Through the resource allocation device 600 based on edge computing, after determining multiple candidate nodes based on the resource application request, the target node for allocating the target resource can be determined from the multiple candidate nodes based on the preset node selection strategy. Since the node selection strategy can select nodes with the goal of maximizing the preset physical resource consumption in the node, in the process of node selection, nodes with fewer remaining resources can be preferentially selected, thereby reducing resource waste; in addition, the node selection strategy can also select nodes with the goal of minimizing the node fragmentation rate, thereby in the process of node selection, nodes with more concentrated resource allocation can be preferentially selected to reduce resource fragmentation and improve resource utilization; in addition, since the node selection strategy can also select nodes with the goal of minimizing node energy consumption, in the process of node selection, nodes with lower energy consumption can be preferentially selected, thereby reducing the overall energy consumption of the system.

[0072] In a possible manner, the first processing module 603 may include: The first determination submodule is used to determine the selection weight of each candidate node according to a preset node selection strategy; The second determination submodule is used to determine the target node for allocating the target resource according to the selection weight of each candidate node.

[0073] In a possible manner, the preset node selection strategy may include at least one of a first node selection strategy, a second node selection strategy, a third node selection strategy and a fourth node selection strategy; the first node selection strategy is used to select a candidate node whose resource load ratio reaches a preset resource load ratio from multiple candidate nodes when the target resource specification meets the preset resource specification; the second node selection strategy is used to select a candidate node whose preset physical resources can meet the target resource from multiple candidate nodes; the third node selection strategy is used to select a candidate node that has not allocated resources to a target user from multiple candidate nodes, and the target user is a user who initiates a resource application request; the fourth node selection strategy is used to select a candidate node that creates the least number of virtual machines from multiple candidate nodes.

[0074] In a possible manner, there are multiple preset node selection strategies, and accordingly, the first determination submodule may include: A processing unit, configured to select nodes from a plurality of candidate nodes according to each preset node selection strategy, assign a first weight value to the selected candidate nodes, and assign a second weight value to the unselected candidate nodes, wherein the first weight value is greater than the second weight value; The determination unit is used to take, for each candidate node, the sum of the weight values of the candidate node under all node selection strategies as the selection weight of the candidate node.

[0075] In a possible way, the resource allocation information includes unallocated resource specification information, pre-allocated resource specification information, and allocated resource specification information. The resource specification information includes the specification type and the specification quantity of the resource specification. Correspondingly, the edge computing-based resource allocation device 600 may further include: A second processing module, configured to, after determining the target node, based on the target resource, reduce the specification quantity of the specification type corresponding to the target resource specification in the unallocated resource specification information and increase the specification quantity of the specification type corresponding to the target resource specification in the pre-allocated resource specification information; A third processing module, configured to, according to the increased specification quantity in the pre-allocated resource specification information and the specification type corresponding to the increased specification quantity, create resource placeholders with corresponding quantities and corresponding specification types in the target node; Correspondingly, the first processing module 603 may be configured to allocate resources corresponding to the resource placeholders in the target node; Correspondingly, the edge computing-based resource allocation device 600 may further include: A fourth processing module, configured to, according to the resource placeholders created in the target node, reduce the specification quantity of the specification type corresponding to the target resource specification in the pre-allocated resource specification information and increase the specification quantity of the specification type corresponding to the target resource specification in the allocated resource specification information.

[0076] In a possible way, the node resource information is stored in the inventory module of the central cluster. Correspondingly, the edge computing-based resource allocation device 600 may further include: A fifth processing module, configured to determine first resource information of the target node through the target node and send the first resource information to the inventory module, where the first resource information is used to indicate the quantity of the first resource placeholders corresponding to the specification type of the target resource specification in the target node. The inventory module is configured to determine a first reconciliation result according to the first resource allocation information of the target node and the first resource information, and output a first alarm message when the first reconciliation result indicates that the quantity of the first resource placeholders is inconsistent with the allocated specification quantity for the specification type corresponding to the target resource specification in the resource allocation information.

[0077] In a possible way, the resource allocation information includes unallocated resource specification information, pre-allocated resource specification information, and allocated resource specification information. The resource specification information includes the specification type and the specification quantity of the resource specification. Correspondingly, the edge computing-based resource allocation device 600 may further include: A third determination module, configured to, in response to a resource release request, determine resource release information for the resource release request, where the resource release information is used to indicate the node to be released, the specification type to be released, and the quantity to be released; According to the specification type to be released and the quantity of the specifications to be released, remove the corresponding quantity and the resource placeholders of the corresponding specification type from the nodes to be released, reduce the quantity of the specification type corresponding to the allocated resource specification information, and increase the quantity of the specification type corresponding to the unallocated resource specification information.

[0078] Among possible ways, the node resource information is stored in the inventory module of the central cluster. Correspondingly, the resource allocation device 600 based on edge computing may further include: A sixth processing module, configured to determine second resource information of the nodes to be released through the nodes to be released, and send the second resource information to the inventory module, where the second resource information is used to indicate the quantity of the second resource placeholders corresponding to the specification type to be released in the nodes to be released. The inventory module is configured to determine a second reconciliation result according to the second resource allocation information and the second resource information of the nodes to be released, and output a second alarm message when the second reconciliation result indicates that the quantity of the second resource placeholders is inconsistent with the allocated specification quantity of the specification type to be released in the second resource allocation information.

[0079] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of any of the above-mentioned resource allocation methods based on edge computing are implemented.

[0080] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, which may include: A storage device, on which a computer program is stored; A processing device, configured to execute the computer program in the storage device to implement the steps of any of the above-mentioned resource allocation methods based on edge computing.

[0081] Based on the same concept, an embodiment of the present disclosure further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned resource allocation methods based on edge computing are implemented.

[0082] Next, refer to Figure 7 , which shows a schematic structural diagram of an electronic device 700 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example, and should not bring any limitation to the functions and usage scopes of the embodiments of the present disclosure.

[0083] AsFigure 7 As shown, the electronic device 700 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 701, which may perform various appropriate actions and processes according to a program stored in the read-only memory (ROM) 702 or a program loaded from the storage device 708 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. The input / output (I / O) interface 705 is also connected to the bus 704.

[0084] Generally, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 7 an electronic device 700 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0085] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0086] It should be noted that the above-mentioned computer-readable medium in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0087] In some embodiments, communication can be performed using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0088] The above-mentioned computer-readable medium can be included in the above-mentioned electronic device; or it can exist separately without being assembled into the electronic device.

[0089] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: in response to a resource application request, determine resource requirement information for the resource application request, where the resource requirement information is used to indicate a target edge cluster required and target resources required, and the target resources include a target resource specification and a target specification quantity; obtain node resource information for the target edge cluster, and determine, based on the node resource information and the target resources, a plurality of candidate nodes in the target edge cluster for allocating the target resources, where the node resource information is at least used to indicate the resource allocation information of each node in the target edge cluster; based on a preset node selection policy, determine a target node for allocating the target resources from the plurality of candidate nodes, and obtain the target resources from the target node for resource allocation, where the node selection policy selects nodes with the goal of maximizing at least one of the preset physical resource consumption in the nodes, minimizing the node fragmentation rate, and minimizing the node energy consumption.

[0090] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0092] The modules described in the embodiments of the present disclosure can be implemented in software or in hardware. In some cases, the name of a module does not constitute a limitation on the module itself.

[0093] The functions described above herein can be performed at least in part by one or more hardware logic components. By way of example, and without limitation, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0094] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0095] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

[0096] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0097] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.

Claims

1. A resource allocation method based on edge computing, characterized in that, The resource allocation method based on edge computing includes: In response to the resource application request, determine resource requirement information for the resource application request, the resource requirement information is used to indicate a required target edge cluster and a required target resource, the target resource including a target resource specification and a target specification quantity; Acquire node resource information for the target edge cluster, and determine, in the target edge cluster, a plurality of candidate nodes for allocating the target resource according to the node resource information and the target resource, wherein the node resource information is at least used to indicate resource allocation information of each node in the target edge cluster; Based on a preset node selection strategy, a target node for allocating the target resource is determined from the multiple candidate nodes, and the target resource is obtained from the target node for resource allocation, wherein the node selection strategy performs node selection with the goal of maximizing at least one of preset physical resource consumption in the node, minimizing node fragmentation rate, and minimizing node energy consumption.

2. The resource allocation method based on edge computing according to claim 1, characterized in that The step of determining a target node for allocating the target resource from among the plurality of candidate nodes based on a preset node selection strategy includes: Determine the selection weight of each candidate node according to a preset node selection strategy; A target node for allocating the target resource is determined according to the selection weight of each candidate node.

3. The resource allocation method based on edge computing according to claim 2, wherein, The preset node selection strategy includes at least one of a first node selection strategy, a second node selection strategy, a third node selection strategy, and a fourth node selection strategy; The first node selection strategy is used to select a candidate node whose resource load ratio reaches a preset resource load ratio from the multiple candidate nodes when the target resource specification meets the preset resource specification; The second node selection strategy is used to select a candidate node whose preset physical resources can meet the target resources from among the multiple candidate nodes; The third node selection strategy is used to select a candidate node that has not allocated resources to a target user from among the multiple candidate nodes, where the target user is a user who initiates the resource application request; The fourth node selection strategy is used to select a candidate node with the least number of created virtual machines from among the multiple candidate nodes.

4. The resource allocation method based on edge computing according to claim 2, wherein There are multiple preset node selection strategies, and determining the selection weight of each candidate node according to the preset node selection strategy includes: According to each preset node selection strategy, node selection is performed among the multiple candidate nodes, and a first weight value is assigned to the selected candidate nodes, and a second weight value is assigned to the unselected candidate nodes, wherein the first weight value is greater than the second weight value; For each candidate node, the sum of the weight values of the candidate node under all node selection strategies is used as the selection weight of the candidate node.

5. The resource allocation method based on edge computing according to any one of claims 1-4, characterized in that, The resource allocation information includes unallocated resource specification information, preallocated resource specification information, and allocated resource specification information, the resource specification information includes the specification type and specification quantity of the resource specification, and the resource allocation method based on edge computing also includes: After determining the target node, based on the target resource, reduce the specification quantity of the specification type corresponding to the target resource specification in the unallocated resource specification information and increase the specification quantity of the specification type corresponding to the target resource specification in the pre-allocated resource specification information; According to the increased specification quantity in the pre-allocated resource specification information and the specification type corresponding to the increased specification quantity, create resource placeholders with corresponding quantities and corresponding specification types in the target node; The obtaining the target resource from the target node for resource allocation includes: Performing resource allocation on the resources corresponding to the resource placeholders in the target node; The resource allocation method based on edge computing further includes: According to the resource placeholders created in the target node, reduce the specification quantity of the specification type corresponding to the target resource specification in the pre-allocated resource specification information and increase the specification quantity of the specification type corresponding to the target resource specification in the allocated resource specification information.

6. The resource allocation method based on edge computing according to claim 5, wherein, The node resource information is stored in the inventory module of the central cluster, and the resource allocation method based on edge computing further includes: Determine the first resource information of the target node through the target node, and send the first resource information to the inventory module, where the first resource information is used to indicate the number of the first resource placeholders of the specification type corresponding to the target resource specification in the target node, and the inventory module is used to determine the first reconciliation result according to the first resource allocation information of the target node and the first resource information, and output a first alarm message when the first reconciliation result indicates that the number of the first resource placeholders is inconsistent with the allocated specification quantity of the specification type corresponding to the target resource specification in the resource allocation information.

7. The resource allocation method based on edge computing according to any one of claims 1-4, characterized in that The resource allocation information includes unallocated resource specification information, pre-allocated resource specification information, and allocated resource specification information. The resource specification information includes the specification type and specification quantity of the resource specification. The resource allocation method based on edge computing further includes: In response to a resource release request, determine resource release information for the resource release request, where the resource release information is used to indicate the node to be released, the specification type to be released, and the quantity to be released; According to the specification type to be released and the quantity to be released, remove resource placeholders with corresponding quantities and corresponding specification types from the node to be released, reduce the specification quantity of the corresponding specification type in the allocated resource specification information, and increase the specification quantity of the corresponding specification type in the unallocated resource specification information.

8. The resource allocation method based on edge computing according to claim 7, wherein The node resource information is stored in the inventory module of the central cluster, and the resource allocation method based on edge computing further includes: Determine the second resource information of the node to be released through the node to be released, and send the second resource information to the inventory module, where the second resource information is used to indicate the number of second resource placeholders corresponding to the specification type to be released in the node to be released, and the inventory module is used to determine a second reconciliation result according to the second resource allocation information of the node to be released and the second resource information, and output a second alarm message when the second reconciliation result indicates that the number of second resource placeholders is inconsistent with the allocated specification quantity for the specification type to be released in the second resource allocation information.

9. A resource allocation device based on edge computing, characterized in that, The resource allocation device based on edge computing includes: A first determination module, configured to determine, in response to a resource application request, resource requirement information for the resource application request, where the resource requirement information is used to indicate a required target edge cluster and required target resources, and the target resources include a target resource specification and a target specification quantity; A second determination module, configured to obtain node resource information for the target edge cluster, and determine, according to the node resource information and the target resources, a plurality of candidate nodes for allocating the target resources in the target edge cluster, where the node resource information is at least used to indicate the resource allocation information of each node in the target edge cluster; A first processing module, configured to determine, based on a preset node selection policy, a target node for allocating the target resources from the plurality of candidate nodes, and obtain the target resources from the target node for resource allocation, where the node selection policy selects a node with the goal of maximizing at least one of the consumption of preset physical resources in the node, minimizing the node fragmentation rate, and minimizing the node energy consumption.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processing device, the steps of the method according to any one of claims 1-8 are implemented.

11. An electronic device, characterized in that, Including: A storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1-8 are implemented.

Citation Information

Patent Citations

  • Task scheduling method and system

    CN116302448A

  • Resource scheduling method, device and system and storage medium

    CN117591295A

  • Distributed real-time data stream processing system and method

    CN119356879A

  • Resource scheduling method, device, system and storage medium

    US20250190274A1