Resource allocation method and device in computing network, storage medium, and electronic device
Through the method of hash ring mapping technology and encrypted IP addresses, the problems of high hardware cost and poor data isolation flexibility in the computing network are solved, the flexibility of multi-tenant data isolation and resource allocation is achieved, and the hardware deployment cost and business are reduced. Maintenance complexity.
Patent Information
- Application Number
- CN202210952781.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In existing computing power networks, the hardware cost of deploying domain isolators to achieve multi-tenant data isolation is high, and it is difficult to flexibly respond to data migration problems caused by changes in the number of computing resource management nodes.
Hash ring mapping technology is used to map the tenant's identity and the IP address of the computing resource management node to the hash ring based on the preset mapping rules. The target computing resource management node is selected through the mapping value relationship and allocates computing power to the tenant. human resources, and establishes a secure connection channel through encrypted IP addresses to achieve multi-tenant data isolation.
Multi-tenant data isolation can be achieved without hardware equipment, reducing hardware deployment costs, easily responding to changes in the number of computing resource management nodes, and reducing business maintenance complexity.
Smart Images

Figure CN115314558B
Abstract
Description
Background Art
[0002] As computing, storage and other resources continue to develop ubiquitously, the industry has proposed a "computing network" to integrate computing, storage and other resources from different owners, and provide the best resource services and network connections according to the different needs of tenants' businesses. In order to rationally utilize the computing resources of multiple parties, the same computing resource pool may provide computing and storage services to multiple tenants through computing routing nodes. Since tenants need to upload data to the computing resource pool to complete computing tasks, tenants lose direct control over their own information and data, so it is necessary to protect the security of tenant information and data.
[0003] In the related art, multi-tenant data isolation is generally achieved by deploying domain isolator devices. However, this method requires additional hardware equipment expenses and is costly.
[0004] In view of this, there is an urgent need in the art to develop a new resource allocation method and device in a computing power network.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure. Summary of the invention
[0006] The purpose of the present disclosure is to provide a resource allocation method in a computing power network, a resource allocation device in a computing power network, a computer storage medium and an electronic device, thereby overcoming the technical problem of high hardware cost caused by the limitations of related technologies at least to a certain extent.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to a first aspect of the present disclosure, a method for resource allocation in a computing power network is provided, comprising: in response to receiving a resource acquisition request from a tenant, mapping the tenant's identity to a pre-built hash ring based on a preset mapping rule, and obtaining a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; the hash ring includes multiple mapping values; based on the preset mapping rule, mapping multiple IP addresses of the multiple computing power resource management nodes to the hash ring, and obtaining a second mapping value of each IP address on the hash ring; based on the numerical relationship between the first mapping value and the multiple second mapping values, selecting a target computing power resource management node from the multiple computing power resource management nodes, so as to allocate computing power resources to the tenant through the target computing power resource management node.
[0009] In an exemplary embodiment of the present disclosure, based on a preset mapping rule, the tenant's identity is mapped to a pre-constructed hash ring to obtain a first mapping value of the identity on the hash ring, including: performing a hash operation on the identity to obtain a first hash value; using the first hash value to perform a modulo operation on a preset target value to obtain the first mapping value of the identity on the hash ring.
[0010] In an exemplary embodiment of the present disclosure, the multiple IP addresses of the multiple computing resource management nodes are mapped to the hash ring based on the preset mapping rule, including: performing a hash operation on each of the IP addresses to obtain a second hash value; using the second hash value to perform a modulo operation on the preset target value to obtain a second mapping value of each of the IP addresses on the hash ring.
[0011] In an exemplary embodiment of the present disclosure, the target computing resource management node is selected from the multiple computing resource management nodes according to the numerical relationship between the first mapping value and multiple second mapping values, including: selecting the target mapping value with the smallest difference with the first mapping value from the multiple second mapping values; determining the computing resource management node corresponding to the target mapping value as a candidate target computing resource management node; judging whether the idle resource holding of the candidate target computing resource management node is greater than the resource demand of the tenant; in response to the idle resource holding of the candidate target computing resource management node being greater than the resource demand of the tenant, determining the candidate target computing resource management node as the target computing resource management node; otherwise, jumping to the next mapping value of the target mapping value, and determining whether to determine the next computing resource management node as the target computing resource management node according to the idle resource holding of the next computing resource management node corresponding to the next mapping value; the next mapping value is the second mapping value with the smallest difference with the target mapping value.
[0012] According to a second aspect of the present disclosure, a resource allocation method in a computing power network is provided, which is applied to a target computing power resource management node, and the method includes: allocating target computing power resources to tenants, and encrypting the IP address of the target computing power resources; returning the tenant's identity and the encrypted IP address to the tenant, and storing the correspondence between the tenant's identity and the encrypted IP address; in response to receiving a resource access request from the tenant, obtaining the encrypted IP address according to the tenant's identity and the correspondence; the resource access request carries the tenant's identity; decrypting the encrypted IP address to obtain the IP address corresponding to the target computing power resource; and establishing a connection channel between the tenant's IP address and the IP address of the target computing power resource.
[0013] In an exemplary embodiment of the present disclosure, establishing a connection channel between the IP address of the tenant and the IP address of the target computing resource includes: establishing a secure tunnel between the IP address of the tenant and the IP address of the target computing resource based on a secure tunnel protocol.
[0014] According to a third aspect of the present disclosure, a resource allocation device in a computing power network is provided, wherein the computing power network includes multiple computing power resource management nodes, and different computing power resource management nodes correspond to different IP addresses. The device includes: a first mapping module, which is used to map the tenant's identity identifier to a pre-built hash ring based on a preset mapping rule in response to receiving a resource acquisition request from a tenant, and obtain a first mapping value of the identity identifier on the hash ring; a second mapping module, which is used to map multiple IP addresses of the multiple computing power resource management nodes to the hash ring based on the preset mapping rule, and obtain a second mapping value of each IP address on the hash ring; and a management node selection module, which is used to select a target computing power resource management node from the multiple computing power resource management nodes according to the numerical relationship between the first mapping value and the multiple second mapping values, so as to allocate computing power resources to the tenant through the target computing power resource management node.
[0015] According to a fourth aspect of the present disclosure, a resource allocation device in a computing power network is provided, the device comprising: a computing power resource allocation module, used to allocate target computing power resources to tenants, and encrypt the IP address of the target computing power resources; an encrypted address sending module, used to return the encrypted IP address to the tenant, and store the correspondence between the tenant's identity and the encrypted IP address; an encrypted address acquisition module, used to obtain the encrypted IP address according to the tenant's identity and the pre-stored correspondence in response to receiving a resource access request from the tenant; the resource access request carries the tenant's identity; a decryption module, used to decrypt the encrypted IP address to obtain the IP address corresponding to the computing power resource; and a channel establishment module, used to establish a connection channel between the tenant's IP address and the IP address of the target computing power resource.
[0016] According to a third aspect of the present disclosure, there is provided a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, the resource allocation method in the computing power network described in the first aspect is implemented.
[0017] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the resource allocation method in the computing power network described in the first aspect above by executing the executable instructions.
[0018] It can be seen from the above technical solutions that the resource allocation method in the computing power network, the resource allocation device in the computing power network, the computer storage medium and the electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:
[0019] In the technical solutions provided by some embodiments of the present disclosure, on the one hand, the present disclosure maps the tenant's identity to a pre-built hash ring based on a preset mapping rule in response to receiving a resource acquisition request from the tenant, and obtains a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; based on the preset mapping rule, multiple IP addresses of multiple computing resource management nodes are mapped to the hash ring, and a second mapping value of each IP address on the hash ring is obtained, and then, according to the numerical relationship between the first mapping value and the multiple second mapping values, a target computing resource management node is selected from the multiple computing resource management nodes to obtain a first mapping value of the identity on the hash ring through the target computing resource management node. The management node allocates computing resources to tenants. Therefore, on the one hand, the present disclosure provides a new idea for realizing data isolation of multiple tenants without hardware equipment, thereby solving the technical problem of high hardware cost caused by realizing multi-tenant isolation by deploying domain isolators in related technologies and reducing hardware deployment costs; on the other hand, based on the above scheme in the present disclosure, even if the number of computing resource management nodes is increased due to business needs in the future, the present disclosure can also conveniently map tenants to the newly added computing resource management nodes based on the above mapping rules, thereby avoiding related data migration problems caused by changes in the number of computing resource management nodes and reducing the complexity of subsequent business maintenance.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0022] Figure 1 A schematic diagram showing a flow chart of a method for allocating resources in a computing power network in an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a process of mapping a tenant's identity to a pre-built hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring in an embodiment of the present disclosure is shown;
[0024] Figure 3 A schematic diagram of a process of selecting a target computing resource management node from multiple computing resource management nodes according to a numerical relationship between a first mapping value and multiple second mapping values in an embodiment of the present disclosure is shown;
[0025] Figure 4 A schematic diagram showing the distribution of the first mapping value and the above-mentioned multiple second mapping values on the hash ring in an embodiment of the present disclosure is shown;
[0026] Figure 5 A schematic diagram showing a process in which a target computing resource node allocates target computing resources to a tenant and establishes a connection channel between the tenant and the allocated target computing resources in an embodiment of the present disclosure;
[0027] Figure 6 A schematic diagram showing the overall process of allocating target computing resources to tenants in cooperation with the target computing resource management node and the tenant mapping management module in an embodiment of the present disclosure;
[0028] Figure 7 The overall architecture diagram of the resource allocation method in the computing power network in the embodiment of the present disclosure is shown;
[0029] Figure 8 A schematic diagram showing the structure of a resource allocation device in a computing power network in an exemplary embodiment of the present disclosure is shown;
[0030] Fig. 9 A schematic diagram showing the structure of another resource allocation device in a computing power network according to an embodiment of the present disclosure is shown;
[0031] Fig.10 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0033] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0034] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0035] In the embodiments of the present disclosure, a method for allocating resources in a computing network is first provided, which at least to some extent overcomes the defect of high hardware cost in the related art.
[0036] The present disclosure proposes a solution for securely mapping computing resource management nodes for multiple tenants in a computing network environment. The present disclosure fully considers that the current computing network provides computing resource services but the protection of tenant information and leased resource information is insufficient, and there will be security risks in building a computing network trading platform in the future. This solution can be achieved by adding relevant software function modules to the existing computing network control layer and computing resource management nodes, and will not affect the operation of the existing computing network. The solution has good flexibility and will play a role in the construction of the computing network in the future.
[0037] Figure 1 A flow chart of a resource allocation method in a computing power network in an embodiment of the present disclosure is shown. The executor of the resource allocation method in the computing power network may be a management server of a computing power resource management node (hereinafter referred to as a tenant mapping module).
[0038] refer to Figure 1 According to an embodiment of the present disclosure, a method for allocating resources in a computing network includes the following steps:
[0039] Step S110, in response to receiving a resource acquisition request from a tenant, mapping the tenant's identity to a pre-built hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity;
[0040] Step S120, mapping multiple IP addresses of multiple computing resource management nodes to a hash ring based on a preset mapping rule, and obtaining a second mapping value of each IP address on the hash ring;
[0041] Step S130, selecting a target computing resource management node from multiple computing resource management nodes according to the numerical relationship between the first mapping value and multiple second mapping values, so as to allocate computing resources to the tenant through the target computing resource management node.
[0042] exist Figure 1 In the technical solution provided by the illustrated embodiment, the present disclosure maps the tenant's identity to a pre-built hash ring based on a preset mapping rule in response to receiving a resource acquisition request from the tenant, and obtains a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; based on the preset mapping rule, multiple IP addresses of multiple computing power resource management nodes are mapped to the hash ring, and a second mapping value of each of the IP addresses on the hash ring is obtained, and then, according to the numerical relationship between the first mapping value and the multiple second mapping values, a target computing power resource management node is selected from the multiple computing power resource management nodes, so as to obtain the first mapping value of the target computing power resource management node through the target computing power resource management node. Tenants allocate computing resources, so, on the one hand, the present disclosure provides a new idea for realizing data isolation of multiple tenants without hardware equipment, thereby being able to solve the technical problem of high hardware cost caused by realizing multi-tenant isolation by deploying domain isolators in related technologies, and reduce hardware deployment costs; on the other hand, based on the above-mentioned scheme in the present disclosure, even if the number of computing resource management nodes is increased due to business needs in the future, the present disclosure can also conveniently map tenants to newly added computing resource management nodes based on the above-mentioned mapping rules, thereby being able to avoid related data migration problems caused by changes in the number of computing resource management nodes, and reduce the complexity of subsequent business maintenance.
[0043] The following Figure 1 The specific implementation process of each step is described in detail:
[0044] Computing power network is a new type of information infrastructure that allocates and flexibly schedules computing resources, storage resources, and network resources between clouds, networks, and edges based on business needs.
[0045] The computing power network may include multiple computing power resource management nodes. Different computing power resource management nodes manage different computing power resource pools (a computing power resource pool contains multiple computing power resources). The computing power resource management nodes can allocate computing power resources to tenants from the computing power resource pool.
[0046] Among them, the above-mentioned computing resources can be various servers, virtual machines, etc. used to perform computing tasks, which can be set according to actual conditions, and this disclosure does not make any special limitations on this.
[0047] Tenants in the cloud management platform are a logical concept. After each of us or an enterprise registers an account on the public cloud platform, the platform considers us to be a tenant and allocates computing resources to us based on the tenant as the basic unit. A tenant is a tenant who uses the system or computing resources, including all data that can be identified as a designated tenant in the system, such as accounts and statistical information (Accounting Data) created in the system, as well as various data set in the system and customized application environments set by tenants, all of which belong to the scope of tenants.
[0048] In the present disclosure, a tenant mapping management module is added to the computing power network control layer, and the mapping relationship between tenants and computing power management nodes is managed through the tenant mapping management module. Thus, the problem of high hardware cost caused by the fact that data isolation of multiple tenants can only be achieved by adding hardware isolation devices in related technologies can be solved.
[0049] Specifically, the tenant mapping management module in the present disclosure can allocate storage resources and target computing resource management nodes for tenants. The specific process of the tenant mapping management module allocating target computing resource management nodes for tenants can refer to the following steps S110-S130:
[0050] It should be noted that when a tenant completes registration on the computing power trading platform for the first time, the computing power trading platform can generate an identity for the tenant. By way of example, the identity can be a 32-bit identity. The specific number of bits can be set according to actual conditions, and this disclosure does not make any special limitations on this.
[0051] After the tenant obtains the identity identifier, it can send a resource acquisition request to the tenant mapping management module, and the resource acquisition request is used to apply for computing resources.
[0052] In step S110, in response to receiving a resource acquisition request from a tenant, the tenant's identity is mapped to a pre-built hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring.
[0053] In this step, after receiving the resource acquisition request sent by the tenant (the resource acquisition request carries the tenant's identity), the tenant's identity can be mapped to the pre-built hash ring to obtain the first mapping value of the identity on the above hash ring.
[0054] Among them, the above hash ring includes a total of 2 32 mapping values, the above 2 32 The mapping values are 0 to 2. 32 -1.
[0055] For example, please refer to Figure 2 , Figure 2 A schematic diagram of a process of mapping a tenant's identity to a pre-built hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring is shown in an embodiment of the present disclosure, including steps S201-S202:
[0056] In step S201, a hash operation is performed on the identity identifier to obtain a first hash value.
[0057] In this step, a hash operation may be performed on the above-mentioned identity identifier to obtain a first hash value hash(ID).
[0058] In step S202, a modulo operation is performed on a preset target value using the first hash value to obtain a first mapping value of the identity on the hash ring.
[0059] In this step, after obtaining the first Hash value, the first Hash value can be used to calculate the preset target value (2 32 ) performs a remainder operation to obtain the first mapping value of the identity on the above hash ring hash(ID)%2 32 .
[0060] In step S120, multiple IP addresses of multiple computing resource management nodes are mapped to a hash ring based on a preset mapping rule to obtain a second mapping value of each IP address on the hash ring.
[0061] In this step, the total number of multiple computing resource management nodes and the IP address of each computing resource management node can be obtained, and then the multiple IP addresses of the multiple computing resource management nodes can be mapped to the hash ring to obtain the second mapping value of each IP address on the hash ring. For example, refer to the above Figure 2 , each IP address can be hashed to obtain a second hash value, and then the second hash value can be used to calculate the preset target value (2 32 ) performs a modulo operation to obtain the second mapping value of each IP address on the hash ring.
[0062] In step S130, a target computing resource management node is selected from multiple computing resource management nodes according to the numerical relationship between the first mapping value and multiple second mapping values, so as to allocate computing resources to the tenant through the target computing resource management node.
[0063] In this step, after the user's identity and multiple computing power resource management nodes are mapped to the hash ring, the target computing power resource management node can be selected from the multiple computing power resource management nodes based on the numerical relationship between the above-mentioned first mapping value and the above-mentioned multiple second mapping values, and then, computing power resources are allocated to the tenant through the target computing power resource management node.
[0064] For example, refer to Figure 3 , Figure 3 A schematic diagram of a process for selecting a target computing resource management node from multiple computing resource management nodes according to a numerical relationship between a first mapping value and multiple second mapping values in an embodiment of the present disclosure is shown, including steps S301 to S305:
[0065] In step S301, a target mapping value having the smallest difference with the first mapping value is selected from a plurality of second mapping values.
[0066] In this step, the first mapping value corresponding to the above identity is 4, and the computing network contains a total of 3 computing resource management nodes, and the second mapping values corresponding to the 3 computing resource management nodes are 1, 8, and 16 respectively. Figure 4 , Figure 4 A schematic diagram showing the distribution of the first mapping value and the above-mentioned multiple second mapping values on the hash ring in an embodiment of the present disclosure is shown, so that it can be determined that the second mapping value with the smallest difference from the first mapping value 4 is 1, and thus 1 can be determined as the target mapping value.
[0067] Optionally, the second mapping value that has the smallest difference with the first mapping value and is greater than the first mapping value can be determined as the target mapping value. In this case, since 1 is less than the first mapping value 4, 8 can be determined as the target mapping value. The specific rules can be set according to actual conditions, and the present disclosure does not make any special limitations on this.
[0068] In step S302, the computing power resource management node corresponding to the target mapping value is determined as a candidate target computing power resource management node.
[0069] In this step, after the target mapping value is determined, the computing power resource node corresponding to the target mapping value can be determined as a candidate target computing power resource node.
[0070] In step S303, it is determined whether the idle resource holdings of the candidate target computing resource management node are greater than the resource demand of the tenant.
[0071] In this step, it can be determined whether the idle resource holdings of the above-mentioned candidate target computing resource management node are greater than the resource demand of the tenant.
[0072] In step S304, in response to the idle resource holding amount of the candidate target computing power resource management node being greater than the resource demand amount of the tenant, the candidate target computing power resource management node is determined as the target computing power resource management node.
[0073] In this step, if the idle resource holdings of the above-mentioned candidate target computing power resource management node are greater than the resource demand of the tenant, the candidate target computing power resource management node is determined as the target computing power resource management node.
[0074] In step S305, otherwise, jump to the next mapping value of the target mapping value, and determine whether to determine the next computing resource management node as the target computing resource management node based on the idle resource holding amount of the next computing resource management node corresponding to the next mapping value.
[0075] In this step, if the idle resource holdings of the candidate target computing resource management node are not greater than the tenant's resource demand, it is possible to jump to the next mapping value with the smallest difference from the target mapping value, for example: Figure 4 The second mapping value 16 in the table can then be used to determine whether the idle resource holdings of the computing power resource management node corresponding to the second mapping value 16 are greater than the resource demand of the tenant. If so, the computing power resource management node corresponding to the second mapping value 16 can be directly determined as the target computing power resource management node. Otherwise, other computing power resource management nodes are obtained again until the idle resource holdings of the computing power resource management node are greater than the resource demand of the tenant, and the target computing power resource node is determined.
[0076] After determining the target computing resource node, the target computing resource node can allocate target computing resources to the tenant from the computing resource pool it manages, and establish a connection channel between the tenant and the allocated target computing resources. For details, refer to Figure 5 , Figure 5 A schematic diagram showing a process in which a target computing resource node allocates target computing resources to a tenant and establishes a connection channel between the tenant and the allocated target computing resources in an embodiment of the present disclosure, including steps S501 to S505:
[0077] In step S501, target computing resources are allocated to the tenant, and the IP address of the target computing resources is encrypted.
[0078] In this step, the target computing resource management node can allocate target computing resources to the tenants. The number of the target computing resources can be determined according to the resource demand of the tenants, and this disclosure does not make any special limitation on this.
[0079] After allocating the target computing resources, the target computing resource management node can encrypt the IP address of the above target computing resources to obtain the encrypted IP address: SN = Encry (key, R_Label), where key represents the encryption key used, and R_Label is the IP address set of the above target computing resource nodes. For example, R_Label = {IPAdd_p, IPAdd_v, ...}, where IPAdd_p and IPAdd_v represent the IP addresses corresponding to different target computing resources.
[0080] It should be noted that the above encryption process can adopt a symmetric encryption algorithm, an asymmetric encryption algorithm, etc., and can be set according to actual conditions. This disclosure does not make any special limitations on this.
[0081] In step S502, the tenant's identity and the encrypted IP address are returned to the tenant, and the corresponding relationship between the tenant's identity and the encrypted IP address is stored.
[0082] In this step, the target computing resource management node may return the tenant's identity and encrypted IP address as a tenant label to the tenant. Exemplarily, the tenant label T_Label returned to the tenant may include:<ID,SN> . Exemplarily, the above tenant tag may also be stored for subsequent backup.
[0083] In step S503, in response to receiving the resource access request of the tenant, the encrypted IP address is obtained according to the tenant's identity and the corresponding relationship.
[0084] In this step, after the tenant tag is returned to the tenant, the tenant can initiate a resource access request to the target computing resource management node. Then, the target computing resource management node can query the above tenant tag based on the tenant's identity carried in the above resource access request to obtain the encrypted IP address.
[0085] In step S504, the encrypted IP address is decrypted to obtain the IP address corresponding to the target computing resource.
[0086] In this step, after obtaining the above-mentioned encrypted IP address (ie, the above-mentioned SN), the target computing resource management node can decrypt the above-mentioned encrypted IP address to obtain the IP address corresponding to the target computing resource (ie, the above-mentioned R_Label).
[0087] In step S505, a connection channel is established between the tenant's IP address and the IP address of the target computing resource.
[0088] In this step, the target computing resource can establish a secure tunnel between the tenant's IP address and the IP address of the target computing resource based on a secure tunnel protocol (e.g., IPSec) to facilitate secure data transmission.
[0089] refer to Figure 6 , Figure 6 The overall process diagram showing the target computing resource management node and the tenant mapping management module cooperating with each other to allocate target computing resources to tenants in the embodiment of the present disclosure is as follows:
[0090] The target computing resource management node may include a tenant resource label generation module, a label encryption module, a label parsing and authentication module, a tenant label generation module and a routing module. Specifically:
[0091] Tenant mapping management module: obtains the first mapping value corresponding to the tenant's identity (ID) and the second mapping value corresponding to the IP address of each computing resource management node, and allocates a target computing resource management node to the tenant so that the target computing resource management node allocates target computing resources to the tenant.
[0092] The following are the steps performed by each module of the target computing resource:
[0093] Tenant resource label generation module: allocates target computing resources (including physical machine resources and virtual machine resources) to tenants and obtains the IP address of the target computing resources, such as: R_Label = {IPAdd_p, IPAdd_v, ...};
[0094] Label encryption module: Generates a key pair through an encryption algorithm, supports symmetric encryption, asymmetric encryption and other methods, encrypts the IP address of the target computing resource, and obtains SN = Encry (key, R_Label);
[0095] Tenant label generation module: Generates a label T_Label for the tenant based on the ID obtained from the tenant mapping management module and the SN obtained from the label encryption module.<ID,SN> , feedback to tenants.
[0096] Label parsing and authentication module: decrypt the encrypted IP address to obtain the IP address of the target computing resource, R_Label = Decrypt (key, SN);
[0097] Routing module: Establishes a secure channel between tenants and target computing resources based on a variety of secure tunnel routing protocols, such as IPSec.
[0098] refer to Figure 7 , Figure 7The overall architecture diagram of the resource allocation method in the computing power network in the embodiment of the present disclosure is shown, wherein the computing power network control layer mainly includes a computing power network management module, a computing power resource scheduling module, a tenant mapping management module and a routing scheduling module. The computing power resource management node is used to manage the computing power resource pool (the computing power resource pool includes multiple computing power resources), mainly including a computing power resource perception module, a routing module, a tenant label generation module, a tenant resource label generation module, a label encryption module and a label parsing authentication module. Specifically:
[0099] For the above computing power network control layer:
[0100] Computing power network management module: used to manage and maintain each computing power resource management node;
[0101] The computing resource scheduling module is used to schedule each computing resource management node;
[0102] Tenant mapping management module: used to store multiple mapping rules and protect tenant information by managing the isolation mapping relationship between tenants and computing resource management nodes;
[0103] The routing scheduling module is used to schedule various computing resource management nodes.
[0104] For the above computing resource management nodes:
[0105] Computing resource perception module: used to monitor the operating status of each computing resource in the computing resource pool in real time;
[0106] Tenant label generation module: used to generate a tenant label, which includes the tenant ID and the serial number generated by encrypting the IP address of the target computing resource allocated to the tenant.<ID,SN> ;
[0107] Tenant resource label generation module: used to generate corresponding labels according to the IP addresses of the target computing resources rented by the tenant; the label is a collection of IP addresses of various servers, virtual machines, etc., as shown below: R_Label = {IPAdd_p, IPAdd_v, ...};
[0108] Label encryption module: In order to ensure the security of tenant resources, the IP address of the target computing resource allocated to the tenant needs to be encrypted to obtain the encrypted IP address: SN = Encry (R_Label);
[0109] Label parsing authentication module: Use the tenant's identity ID to find the corresponding SN number, and obtain the IP address of the target computing resource after parsing; the parsing process is as follows: R_Label = Decrypt (SN);
[0110] Routing module: Establish a secure channel between the target computing resources and the tenant. Based on the above architecture in the present disclosure, a tenant mapping management module is added to the computing network control layer, and a tenant label generation module, a tenant resource label generation module, a label encryption module and a label resolution authentication module are added to the computing resource management node. The computing resource management node can encrypt, resolve, index, etc. the addresses of the computing resources rented by the tenants in order to manage and protect the tenant information.
[0111] The present disclosure also provides a resource allocation device in a computing network, Figure 8 A schematic diagram showing the structure of a resource allocation device in a computing power network in an exemplary embodiment of the present disclosure is shown; Figure 8 As shown, the resource allocation device 800 in the computing network may include a first mapping module 810, a second mapping module 820 and a management node selection module 830. Among them:
[0112] A first mapping module 810 is configured to map the tenant's identity to a pre-built hash ring based on a preset mapping rule in response to receiving a resource acquisition request from the tenant, and obtain a first mapping value of the identity on the hash ring;
[0113] A second mapping module 820 is used to map the multiple IP addresses of the multiple computing resource management nodes to the hash ring based on the preset mapping rule to obtain a second mapping value of each of the IP addresses on the hash ring;
[0114] The management node selection module 830 is used to select a target computing resource management node from the multiple computing resource management nodes based on the numerical relationship between the first mapping value and the multiple second mapping values, so as to allocate computing resources to the tenant through the target computing resource management node.
[0115] In an exemplary embodiment of the present disclosure, the first mapping module 810 is configured to:
[0116] A hash operation is performed on the identity identifier to obtain a first hash value; and a modulo operation is performed on a preset target value using the first hash value to obtain a first mapping value of the identity identifier on the hash ring.
[0117] In an exemplary embodiment of the present disclosure, the second mapping module 820 is configured to:
[0118] A hash operation is performed on each of the IP addresses to obtain a second hash value; and a modulo operation is performed on the preset target value using the second hash value to obtain a second mapping value of each of the IP addresses on the hash ring.
[0119] In an exemplary embodiment of the present disclosure, the management node selection module 830 is configured to:
[0120] Select a target mapping value with the smallest difference from the first mapping value from the multiple second mapping values; determine the computing power resource management node corresponding to the target mapping value as a candidate target computing power resource management node; determine whether the idle resource holding of the candidate target computing power resource management node is greater than the resource demand of the tenant; in response to the idle resource holding of the candidate target computing power resource management node being greater than the resource demand of the tenant, determine the candidate target computing power resource management node as the target computing power resource management node; otherwise, jump to the next mapping value of the target mapping value, and determine whether to determine the next computing power resource management node as the target computing power resource management node according to the idle resource holding of the next computing power resource management node corresponding to the next mapping value; the next mapping value is the second mapping value with the smallest difference from the target mapping value.
[0121] The present disclosure also provides a resource allocation device in a computing network, Fig. 9 A schematic diagram showing the structure of another resource allocation device in a computing power network in an exemplary embodiment of the present disclosure is shown; Fig. 9 As shown, the resource allocation device 900 in the computing power network may include a computing power resource allocation module 910, an encrypted address sending module 920, an encrypted address acquisition module 930, a decryption module 940 and a channel establishment module 950. Among them:
[0122] A computing resource allocation module, used to allocate target computing resources to tenants and encrypt the IP address of the target computing resources;
[0123] The encrypted address sending module is used to return the encrypted IP address to the tenant and store the corresponding relationship between the tenant's identity and the encrypted IP address;
[0124] An encrypted address acquisition module, configured to obtain the encrypted IP address in response to receiving a resource access request from the tenant, according to the tenant's identity and the pre-stored correspondence; the resource access request carries the tenant's identity;
[0125] A decryption module, used to decrypt the encrypted IP address to obtain the IP address corresponding to the computing power resource;
[0126] A channel establishment module is used to establish a connection channel between the IP address of the tenant and the IP address of the target computing resource.
[0127] In an exemplary embodiment of the present disclosure, the channel establishing module 950 is configured to:
[0128] Based on the secure tunnel protocol, a secure tunnel is established between the IP address of the tenant and the IP address of the target computing resource.
[0129] The specific details of each module in the resource allocation device in the above-mentioned computing power network have been described in detail in the corresponding resource allocation method in the computing power network, so they will not be repeated here.
[0130] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0131] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0132] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0133] The present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device.
[0134] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with 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 thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0135] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0136] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.
[0137] In addition, an electronic device capable of implementing the above method is also provided in an embodiment of the present disclosure.
[0138] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0139] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present disclosure is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0140] like Fig.10As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.
[0141] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 1 As shown in: Step S110, in response to receiving a resource acquisition request from a tenant, mapping the tenant's identity to a pre-built hash ring based on a preset mapping rule, and obtaining a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; the hash ring includes multiple mapping values; Step S120, mapping multiple IP addresses of the multiple computing resource management nodes to the hash ring based on the preset mapping rule, and obtaining a second mapping value of each IP address on the hash ring; Step S130, selecting a target computing resource management node from the multiple computing resource management nodes according to the numerical relationship between the first mapping value and the multiple second mapping values, so as to allocate computing resources to the tenant through the target computing resource management node.
[0142] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .
[0143] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0144] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0145] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or may communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0146] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A method for allocating resources in a computing network, characterized in that: The computing power network includes multiple computing power resource management nodes, different computing power resource management nodes correspond to different IP addresses, and the method includes: In response to receiving a resource acquisition request from a tenant, mapping the tenant's identity to a pre-constructed hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; the hash ring includes multiple mapping values; Mapping the multiple IP addresses of the multiple computing resource management nodes to the hash ring based on the preset mapping rule to obtain a second mapping value of each of the IP addresses on the hash ring; Selecting a target mapping value having the smallest difference with the first mapping value from a plurality of the second mapping values; Determine the computing power resource management node corresponding to the target mapping value as a candidate target computing power resource management node; In response to the idle resource holdings of the candidate target computing resource management node being greater than the resource demand of the tenant, the candidate target computing resource management node is determined as the target computing resource management node to allocate computing resources to the tenant through the target computing resource management node.
2. The method according to claim 1, characterized in that The mapping of the tenant's identity to a pre-built hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring includes: Performing a hash operation on the identity identifier to obtain a first hash value; A modulo operation is performed on a preset target value using the first Hash value to obtain a first mapping value of the identity identifier on the Hash ring.
3. The method according to claim 1, characterized in that The mapping of the multiple IP addresses of the multiple computing resource management nodes to the hash ring based on the preset mapping rule includes: Performing a hash operation on each of the IP addresses to obtain a second hash value; The preset target value is modulo operation performed using the second hash value to obtain a second mapping value of each IP address on the hash ring.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to the idle resource holding amount of the candidate target computing resource management node being not greater than the resource demand amount of the tenant, jumping to the next mapping value of the target mapping value; Determine whether to determine the next computing power resource management node as the target computing power resource management node according to the idle resource holding amount of the next computing power resource management node corresponding to the next mapping value; The next mapping value is a second mapping value with the smallest difference from the target mapping value.
5. A method for allocating resources in a computing network, characterized in that: Applied to the target computing resource management node, the method includes: Allocate target computing resources to the tenant and encrypt the IP address of the target computing resources; Returning the tenant's identity and the encrypted IP address to the tenant, and storing the corresponding relationship between the tenant's identity and the encrypted IP address; In response to receiving the resource access request of the tenant, obtaining the encrypted IP address according to the tenant's identity and the corresponding relationship; the resource access request carries the tenant's identity; Decrypting the encrypted IP address to obtain the IP address corresponding to the target computing power resource; Establishing a connection channel between the IP address of the tenant and the IP address of the target computing resource; The target computing power resource management node is determined by the resource allocation device in the computing power network based on the following method: In response to receiving a resource acquisition request from a tenant, mapping the tenant's identity to a pre-constructed hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; the hash ring includes multiple mapping values; Based on the preset mapping rule, multiple IP addresses of multiple computing resource management nodes are mapped to the hash ring to obtain a second mapping value of each IP address on the hash ring; Selecting a target mapping value having the smallest difference with the first mapping value from a plurality of the second mapping values; Determine the computing power resource management node corresponding to the target mapping value as a candidate target computing power resource management node; In response to the idle resource holding amount of the candidate target computing power resource management node being greater than the resource demand amount of the tenant, the candidate target computing power resource management node is determined as the target computing power resource management node.
6. The method according to claim 5, characterized in that The establishing a connection channel between the IP address of the tenant and the IP address of the target computing resource includes: Based on the secure tunnel protocol, a secure tunnel is established between the IP address of the tenant and the IP address of the target computing resource.
7. A resource allocation device in a computing network, characterized in that: The computing power network includes a plurality of computing power resource management nodes, different computing power resource management nodes correspond to different IP addresses, and the device includes: A first mapping module, configured to, in response to receiving a resource acquisition request from a tenant, map the tenant's identity to a pre-built hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring; A second mapping module, used to map the multiple IP addresses of the multiple computing resource management nodes to the hash ring based on the preset mapping rule, and obtain a second mapping value of each of the IP addresses on the hash ring; A management node selection module is used to select a target mapping value with the smallest difference with the first mapping value from multiple second mapping values; determine the computing power resource management node corresponding to the target mapping value as a candidate target computing power resource management node; in response to the idle resource holding of the candidate target computing power resource management node being greater than the resource demand of the tenant, determine the candidate target computing power resource management node as the target computing power resource management node, so as to allocate computing power resources to the tenant through the target computing power resource management node.
8. A resource allocation device in a computing network, characterized in that: The device comprises: A computing power resource allocation module, used to allocate target computing power resources to tenants through a target computing power resource management node, and encrypt the IP address of the target computing power resource; The encrypted address sending module is used to return the encrypted IP address to the tenant and store the corresponding relationship between the tenant's identity and the encrypted IP address; An encrypted address acquisition module, configured to obtain the encrypted IP address in response to receiving a resource access request from the tenant, according to the tenant's identity and the corresponding relationship; the resource access request carries the tenant's identity; A decryption module, used to decrypt the encrypted IP address to obtain the IP address corresponding to the computing power resource; A channel establishment module, used to establish a connection channel between the IP address of the tenant and the IP address of the target computing resource; The target computing resource management node is determined by the resource allocation device in the computing network based on the following method: In response to receiving a resource acquisition request from a tenant, mapping the tenant's identity to a pre-constructed hash ring based on a preset mapping rule to obtain a first mapping value of the identity on the hash ring; the resource acquisition request carries the tenant's identity; the hash ring includes multiple mapping values; Based on the preset mapping rule, multiple IP addresses of multiple computing resource management nodes are mapped to the hash ring to obtain a second mapping value of each IP address on the hash ring; Selecting a target mapping value having the smallest difference with the first mapping value from a plurality of the second mapping values; Determine the computing power resource management node corresponding to the target mapping value as a candidate target computing power resource management node; In response to the idle resource holding amount of the candidate target computing power resource management node being greater than the resource demand amount of the tenant, the candidate target computing power resource management node is determined as the target computing power resource management node.
9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the resource allocation method in the computing power network described in any one of claims 1 to 6 is implemented.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the resource allocation method in the computing power network described in any one of claims 1 to 6 by executing the executable instructions.
