Method and device for configuring resources

By querying the remaining resources in the host packet when receiving the resource creation request, and finding and allocating the target host from other packets, the problem of difficult resources between host packets is solved, and the resource utilization rate is improved.

CN112882820BActive Publication Date: 2025-01-07BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911203171.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-29
Publication Date
2025-01-07
Estimated Expiration
2039-11-29

AI Technical Summary

Technical Problem

In the prior art, when the resources in the host packet cannot meet the user's needs, the available resources of other host packets cannot be effectively utilized, resulting in low cloud resource utilization.

Method used

When receiving a resource creation request, first query the remaining resources in the corresponding host packet. If the requirements are not met, the target host that meets the difference remaining resources will be found from other host packets and allocated to the host packet. .

Benefits of technology

It realizes the effective allocation of resources between host packets, improves resource utilization, and solves the problem of difficult resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112882820B_ABST
    Figure CN112882820B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method and device for configuring resources, which relate to the field of cloud computing. A specific implementation of the method includes: in response to receiving a resource creation request, querying the remaining resources of the current group in the host group corresponding to the resource creation request; in response to the remaining resources of the current group not satisfying the resource creation request, searching for a target host satisfying the resource creation request from other host groups; and allocating the target host to the host group. This implementation improves resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to a method and device for configuring resources. Background Art

[0002] Cloud resources contain a vast amount of information. For ease of management, a large number of hosts that establish data connections to obtain cloud resources can usually be divided into multiple host groups. When a user operates cloud resources, it is usually necessary to perform corresponding resource configuration within the host group where the user's host (i.e., the terminal used by the user) is located to improve the security and stability of cloud operations. Summary of the invention

[0003] Embodiments of the present disclosure provide a method and apparatus for configuring resources.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for configuring resources, the method comprising: in response to receiving a resource creation request, querying the remaining resources of the current group within the host machine group corresponding to the above resource creation request; in response to the remaining resources of the above current group not satisfying the above resource creation request, searching for a target host machine that satisfies the above resource creation request from other host machine groups; and allocating the above target host machine to the above host machine group.

[0005] In some embodiments, the above-mentioned resource creation request includes at least one of the following: the number of processors, memory capacity, disk capacity, and the above-mentioned query of the remaining resources of the current group within the host machine group corresponding to the above-mentioned resource creation request includes: for the host machines included in the above-mentioned host machine group, obtaining the sub-remaining resources of the host machine, wherein the above-mentioned remaining resources include at least one of the following: the number of processors, memory capacity, disk capacity; combining all the sub-remaining resources corresponding to the above-mentioned host machine group to obtain the remaining resources of the current group.

[0006] In some embodiments, the above-mentioned searching for a target host machine that meets the above-mentioned resource creation request from other host machine groups includes: determining the difference remaining resources based on the above-mentioned resource creation request and the remaining resources of the current group; and searching for a target host machine that meets the above-mentioned difference remaining resources from other host machine groups.

[0007] In some embodiments, the above-mentioned resource creation request includes the target hardware information and target software information of the user host machine that issues the above-mentioned resource creation request, and the above-mentioned search for the target host machine that meets the above-mentioned difference remaining resources from other host machine groups includes: searching at least one initial host machine that meets the set resource conditions from the above-mentioned other host machine groups; setting the initial host machine among the above-mentioned at least one initial host machine that meets the above-mentioned target hardware information and target software information as the target host machine.

[0008] In some embodiments, the above-mentioned assigning the above-mentioned target host machine to the above-mentioned host machine group includes: adding the above-mentioned target host machine to the above-mentioned host machine group to obtain an updated host machine group; according to the above-mentioned resource creation request, configuring resources for the user host machine corresponding to the above-mentioned resource creation request in the above-mentioned updated host machine group.

[0009] In a second aspect, an embodiment of the present disclosure provides a device for configuring resources, the device comprising: a remaining resource query unit, which, in response to receiving a resource creation request, is configured to query the remaining resources of the current group within the host machine group corresponding to the above resource creation request; a target host machine query unit, which, in response to the remaining resources of the above current group not satisfying the above resource creation request, is configured to search for a target host machine that satisfies the above resource creation request from other host machine groups; and a resource configuration unit, which is configured to assign the above target host machine to the above host machine group.

[0010] In some embodiments, the resource creation request includes at least one of the following: the number of processors, memory capacity, and disk capacity, and the remaining resource query unit includes: a sub-remaining resource acquisition sub-unit, which is configured to obtain the sub-remaining resources of the host machine included in the host machine group, wherein the remaining resources include at least one of the following: the number of processors, memory capacity, and disk capacity; and a current group remaining resource acquisition sub-unit, which is configured to combine all sub-remaining resources corresponding to the host machine group to obtain the current group remaining resources.

[0011] In some embodiments, the above-mentioned target host machine query unit includes: a difference remaining resource calculation subunit, configured to determine the difference remaining resources based on the above-mentioned resource creation request and the current group remaining resources; a target host machine query subunit, configured to search for a target host machine that meets the above-mentioned difference remaining resources from other host machine groups.

[0012] In some embodiments, the above-mentioned resource creation request includes the target hardware information and target software information of the user host machine that issues the above-mentioned resource creation request, and the above-mentioned target host machine query subunit includes: an initial host machine query module, configured to search for at least one initial host machine that meets the set resource conditions from the above-mentioned other host machine groups; a target host machine determination module, configured to set the initial host machine among the above-mentioned at least one initial host machine that meets the above-mentioned target hardware information and target software information as the target host machine.

[0013] In some embodiments, the above-mentioned resource configuration unit includes: an update host group determination subunit, which is configured to add the above-mentioned target host to the above-mentioned host group to obtain an updated host group; a resource configuration subunit, which is configured to configure resources for the user host corresponding to the above-mentioned resource creation request in the above-mentioned updated host group according to the above-mentioned resource creation request.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; and a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors execute the method for configuring resources of the first aspect.

[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the method for configuring resources according to the first aspect is implemented.

[0016] The method and device for configuring resources provided by the embodiments of the present disclosure firstly query the remaining resources of the current group in the host group corresponding to the resource creation request when receiving a resource creation request; then, when the remaining resources of the current group do not meet the resource creation request, search for a target host that meets the resource creation request from other host groups; finally, assign the target host to the host group. In this way, the problem of difficult utilization of resources between host groups is solved, resource configuration of host groups is realized, and resource utilization is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0018] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0019] Figure 2 is a flow chart of an embodiment of a method for configuring resources according to the present disclosure;

[0020] Figure 3 is a schematic diagram of an application scenario of the method for configuring resources according to the present disclosure;

[0021] Figure 4 is a flow chart of yet another embodiment of a method for configuring resources according to the present disclosure;

[0022] Figure 5 is a structural schematic diagram of an embodiment of an apparatus for configuring resources according to the present disclosure;

[0023] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0024] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] Figure 1 An exemplary system architecture 100 is shown to which a method for configuring resources or an apparatus for configuring resources according to an embodiment of the present disclosure can be applied.

[0027] like Figure 1 As shown, the system architecture 100 may include a first host group 101, a second host group 102, a network 103, and a resource configuration server 104. The network 103 is used to provide a medium for a communication link between the first host group 101, the second host group 102, and the resource configuration server 104. The network 103 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0028] The first host group 101 and the second host group 102 interact with the resource configuration server 104 through the network 103 to receive or send messages, etc. The first host group 101 and the second host group 102 each include at least one host. Each host can interact with the network 103 for data. Various data processing applications can be installed on the host, such as web browser applications, virtual machine creation applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0029] The host machines in the first host machine group 101 or the second host machine group 102 can be hardware or software. When the host machine is hardware, it can be implemented as a distributed host machine cluster consisting of multiple host machines, or it can be implemented as a single host machine. When the host machine is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.

[0030] The resource configuration server 104 may be a server that provides various services, such as a server that configures resources of the first host group 101 and the second host group 102. The server may configure the grouping of hosts in the first host group 101 and the second host group 102 to implement configuration of resources between the first host group 101 and the second host group 102.

[0031] It should be noted that the method for configuring resources provided in the embodiments of the present disclosure is generally executed by the resource configuration server 104 , and accordingly, the device for configuring resources is generally set in the resource configuration server 104 .

[0032] It should be noted that the resource configuration server 104 can be hardware or software. When the resource configuration server 104 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the resource configuration server 104 is software, it can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.

[0033] It should be understood that Figure 1 The number of host groups, networks, and resource configuration servers in the embodiment is only illustrative. Any number of host groups, networks, and resource configuration servers may be provided as required.

[0034] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for configuring resources according to the present disclosure. The method for configuring resources comprises the following steps:

[0035] Step 201, in response to receiving a resource creation request, query the remaining resources of the current group in the host group corresponding to the resource creation request.

[0036] In this embodiment, the execution subject of the method for configuring resources (for example Figure 1 The resource configuration server 104 shown in the figure can receive resource creation requests from the hosts included in the first host group 101 and the second host group 102 through a wired connection or a wireless connection. Among them, the resource creation request is usually sent to the execution subject when the host that issues the resource creation request needs to obtain resources. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (Ultra Wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0037] In the prior art, when the resources in a host group cannot meet the needs of users, users usually do not have the authority to use cloud resources in other host groups. At the same time, the available resources in other hosts cannot be effectively utilized, and the utilization rate of cloud resources is not high.

[0038] To this end, after receiving a resource creation request, the execution subject of the present application can query the remaining resources of the current group in the host group corresponding to the resource creation request according to the resource creation request. The remaining resources of the current group are the remaining resources of the host group corresponding to the resource creation request.

[0039] In some optional implementations of this embodiment, the resource creation request may include at least one of the following: the number of processors, memory capacity, and disk capacity, and the querying of the remaining resources of the current group in the host group corresponding to the resource creation request may include the following steps:

[0040] The first step is to obtain the sub-remaining resources of the host included in the host group.

[0041] Typically, a host group includes multiple host machines, and multiple host machines can share resources. In order to query the remaining resources of the current group, the execution subject can query the sub-remaining resources of each host machine. The above remaining resources may include at least one of the following: the number of processors, memory capacity, disk capacity, etc.

[0042] The second step is to combine all the sub-remaining resources corresponding to the above host grouping to obtain the remaining resources of the current grouping.

[0043] After obtaining the sub-residual resources, the execution subject can combine all the sub-residual resources to obtain the current group residual resources.

[0044] Step 202: In response to the remaining resources of the current group not satisfying the resource creation request, searching for a target host satisfying the resource creation request from other host groups.

[0045] When the execution subject determines that the remaining resources of the current group do not satisfy the resource creation request, the execution subject may query other host groups and mark the host that can satisfy the resource creation request as the target host.

[0046] In some optional implementations of this embodiment, searching for a target host that satisfies the resource creation request from other host groups may include the following steps:

[0047] In the first step, the difference remaining resources are determined according to the resource creation request and the current group remaining resources.

[0048] When allocating resources to a host, the resources in the host group to which the host that sent the resource creation request belongs must be considered first. The execution subject can determine the difference remaining resources based on the resource creation request and the current group remaining resources in the host group to which the host belongs. That is, the difference remaining resources are the resources that need to be obtained from other host groups.

[0049] The second step is to find a target host that satisfies the above-mentioned difference in remaining resources from other host groups.

[0050] After determining the remaining resources, the execution subject needs to obtain the remaining resources from other host groups. In addition, the remaining resources should be obtained from one host as much as possible. Only when one host cannot meet the remaining resource conditions will multiple hosts be considered. This can minimize the changes in hosts in the host group and maintain the stability of cloud resources while satisfying resource creation requests.

[0051] In some optional implementations of this embodiment, the resource creation request may include target hardware information and target software information of the user host that issues the resource creation request, and the step of searching for a target host that satisfies the difference remaining resources from other host groups may include the following steps:

[0052] The first step is to search at least one initial host machine that meets the set resource conditions from the other host machine groups.

[0053] The execution subject may query the host machines in other host machine groups to determine the initial host machine that meets the set resource condition, wherein the set resource condition may be to meet the difference remaining resource condition or to be higher than the difference remaining resource.

[0054] In the second step, an initial host machine among the at least one initial host machine that meets the target hardware information and the target software information is set as a target host machine.

[0055] Different hardware may have different data processing frequencies, data processing methods, etc. Similarly, different software may also have compatibility issues. Therefore, in order to ensure the normal progress of data processing, the execution subject may select an initial host machine that satisfies both the target hardware information and the target software information from at least one initial host machine, and set it as the target host machine.

[0056] Step 203: assign the target host machine to the host machine group.

[0057] After determining the target host, the execution subject can assign the target host to the host group corresponding to the resource creation request. In this way, the configuration of cloud resources is realized and the resource requirements of the resource creation request are met.

[0058] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for configuring resources according to this embodiment. Figure 3 In the application scenario, the resource configuration server 104 receives a resource creation request from the first host group 101. The resource configuration server 104 queries the remaining resources of the first host group 101. When the remaining resources of the first host group 101 do not meet the resource creation request, the resource configuration server 104 finds the target host from the second host group 102. Finally, the resource configuration server 104 allocates the target host to the first host group 101.

[0059] The method provided by the above embodiment of the present disclosure firstly queries the remaining resources of the current group in the host group corresponding to the resource creation request when receiving a resource creation request; then, when the remaining resources of the current group do not meet the resource creation request, searches for a target host that meets the resource creation request from other host groups; finally, allocates the target host to the host group. In this way, the problem of the difficulty in utilizing resources between host groups is solved, the resource configuration of the host group is realized, and the resource utilization rate is improved.

[0060] Further references Figure 4 , which shows a process 400 of another embodiment of a method for configuring resources. The process 400 of the method for configuring resources includes the following steps:

[0061] Step 401, in response to receiving a resource creation request, query the host group corresponding to the resource creation request for remaining resources in the current group.

[0062] The content of step 401 is the same as that of step 201 and will not be described in detail here.

[0063] Step 402: In response to the remaining resources of the current group not satisfying the resource creation request, searching for a target host satisfying the resource creation request from other host groups.

[0064] The content of step 402 is the same as that of step 202 and will not be described in detail here.

[0065] Step 403: assign the target host machine to the host machine group.

[0066] The content of step 403 is the same as that of step 203 and will not be described in detail here.

[0067] Step 404: Add the target host to the host group to obtain an updated host group.

[0068] The execution subject may add the target host to the above-mentioned host group. The method of adding may be to modify the network relationship of the target host from the original host group to the host group corresponding to the resource creation request. For example, the network relationship of the target host may be: "XX01". Among them, "XX" may be the original host group where the target host is located; "01" may be the number of the target host in the original host group. The execution subject may modify "XX01" to "YY02". Among them, "YY" is the host group corresponding to the resource creation request; "02" is the number of the target host in the host group corresponding to the resource creation request. Then the host group corresponding to the resource creation request after adding the target host is the updated host group.

[0069] Step 405: According to the resource creation request, resources are configured for the user host corresponding to the resource creation request in the host update group.

[0070] As can be seen from the above description, the target host machine meets the difference remaining resources, target hardware information and target software information. Therefore, the update host machine group can now meet the resource creation request. The execution subject can configure resources for the user host machine corresponding to the above resource creation request in the update host machine group.

[0071] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for configuring resources. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0072] like Figure 5 As shown, the apparatus 500 for configuring resources in this embodiment may include: a remaining resource query unit 501, a target host query unit 502, and a resource configuration unit 503. Among them, the remaining resource query unit 501, in response to receiving a resource creation request, is configured to query the remaining resources of the current group in the host group corresponding to the resource creation request; the target host query unit 502, in response to the remaining resources of the current group not satisfying the resource creation request, is configured to search for a target host satisfying the resource creation request from other host groups; the resource configuration unit 503 is configured to allocate the target host to the host group.

[0073] In some optional implementations of this embodiment, the resource creation request includes at least one of the following: the number of processors, memory capacity, disk capacity, and the remaining resource query unit 501 may include: a sub-remaining resource acquisition sub-unit (not shown in the figure) and a current group remaining resource acquisition sub-unit (not shown in the figure). The sub-remaining resource acquisition sub-unit is configured to acquire the sub-remaining resources of the host included in the host group, wherein the remaining resources include at least one of the following: the number of processors, memory capacity, disk capacity; the current group remaining resource acquisition sub-unit is configured to combine all the sub-remaining resources corresponding to the host group to obtain the current group remaining resources.

[0074] In some optional implementations of this embodiment, the target host query unit 502 may include: a difference remaining resource calculation subunit (not shown in the figure) and a target host query subunit (not shown in the figure). The difference remaining resource calculation subunit is configured to determine the difference remaining resources according to the resource creation request and the current group remaining resources; the target host query subunit is configured to search for a target host that satisfies the difference remaining resources from other host groups.

[0075] In some optional implementations of this embodiment, the resource creation request includes the target hardware information and target software information of the user host that issues the resource creation request, and the target host query subunit may include: an initial host query module (not shown in the figure) and a target host determination module (not shown in the figure). The initial host query module is configured to search for at least one initial host that meets the set resource conditions from the other host groups; the target host determination module is configured to set the initial host that meets the target hardware information and target software information among the at least one initial host as the target host.

[0076] In some optional implementations of this embodiment, the resource configuration unit 503 may include: a host group update determination subunit (not shown in the figure) and a resource configuration subunit (not shown in the figure). The host group update determination subunit is configured to add the target host to the host group to obtain an updated host group; the resource configuration subunit is configured to configure resources for the user host corresponding to the resource creation request in the updated host group according to the resource creation request.

[0077] This embodiment also provides an electronic device, including: one or more processors; a memory, on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned method for configuring resources.

[0078] This embodiment also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method for configuring resources is implemented.

[0079] Reference below Figure 6 , which shows an electronic device suitable for implementing the embodiments of the present disclosure (for example, Figure 1 Schematic diagram of the structure of the computer system 600 of the resource configuration server 104). Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0080] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0081] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0082] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can 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 computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0083] It should be noted that the computer-readable medium in the embodiment of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. 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 of the above. In the embodiment of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiment of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0084] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a resource creation request, queries the remaining resources of the current group in the host group corresponding to the resource creation request; in response to the remaining resources of the current group not satisfying the resource creation request, searches for a target host satisfying the resource creation request from other host groups; and assigns the target host to the host group.

[0085] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via 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).

[0086] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0087] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a remaining resource query unit, a target host query unit, and a resource configuration unit. The names of these units do not, in certain cases, constitute limitations on the units themselves, for example, a resource configuration unit may also be described as a "unit for configuring resources".

[0088] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a 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 invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A method for configuring resources, comprising: In response to receiving a resource creation request, in a host group corresponding to the resource creation request, for a host included in the host group, obtaining a sub-remaining resource of the host, and combining all the sub-remaining resources corresponding to the host group to obtain a remaining resource of the current group, wherein the remaining resource includes at least one of the following: the number of processors, the memory capacity, and the disk capacity; In response to the remaining resources of the current group not satisfying the resource creation request, searching for a target host satisfying the resource creation request from other host groups, including: determining the difference remaining resources according to the resource creation request and the remaining resources of the current group; searching for a target host satisfying the difference remaining resources from other host groups; The target host is assigned to the host group.

2. The method according to claim 1, wherein: The resource creation request includes at least one of the following: the number of processors, memory capacity, and disk capacity.

3. The method according to claim 1, wherein: The resource creation request includes target hardware information and target software information of the user host machine that issues the resource creation request, and The step of searching for a target host machine that satisfies the difference in remaining resources from other host machine groups includes: Searching at least one initial host machine that meets the set resource condition from the other host machine groups; An initial host machine among the at least one initial host machine that meets the target hardware information and the target software information is set as a target host machine.

4. The method according to claim 1, wherein: The allocating the target host machine to the host machine group includes: Adding the target host machine to the host machine group to obtain an updated host machine group; According to the resource creation request, resources are configured for the user host corresponding to the resource creation request in the update host group.

5. A device for configuring resources, comprising: The remaining resource query unit is configured, in response to receiving a resource creation request, to obtain, within a host group corresponding to the resource creation request, for a host included in the host group, the sub-remaining resources of the host, and combine all the sub-remaining resources corresponding to the host group to obtain the remaining resources of the current group, wherein the remaining resources include at least one of the following: the number of processors, the memory capacity, and the disk capacity; The target host query unit is configured to search for a target host satisfying the resource creation request from other host groups in response to the remaining resources of the current group not satisfying the resource creation request, including: a difference remaining resource calculation subunit configured to determine the difference remaining resources according to the resource creation request and the remaining resources of the current group; a target host query subunit configured to search for a target host satisfying the difference remaining resources from other host groups; The resource configuration unit is configured to allocate the target host machine to the host machine group.

6. The device according to claim 5, wherein: The resource creation request includes at least one of the following: the number of processors, memory capacity, and disk capacity.

7. The device according to claim 5, wherein: The resource creation request includes target hardware information and target software information of the user host machine that issues the resource creation request, and The target host query subunit includes: An initial host query module is configured to search for at least one initial host satisfying a set resource condition from the group of other hosts; The target host machine determination module is configured to set an initial host machine among the at least one initial host machine that meets the target hardware information and the target software information as a target host machine.

8. The device according to claim 5, wherein: The resource configuration unit includes: An updated host group determination subunit is configured to add the target host to the host group to obtain an updated host group; The resource configuration subunit is configured to configure resources for the user host corresponding to the resource creation request in the update host group according to the resource creation request.

9. An electronic device, comprising: one or more processors; a memory having one or more programs stored therein, When the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to any one of claims 1 to 4.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Cloud virtual machine creating method and device and cloud equipment

    CN109783185A