CN112882820A - Method and device for configuring resources - Google Patents
Method and device for configuring resources Download PDFInfo
- Publication number
- CN112882820A CN112882820A CN201911203171.3A CN201911203171A CN112882820A CN 112882820 A CN112882820 A CN 112882820A CN 201911203171 A CN201911203171 A CN 201911203171A CN 112882820 A CN112882820 A CN 112882820A
- Authority
- CN
- China
- Prior art keywords
- host
- resource
- target
- creation request
- resources
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 230000004044 response Effects 0.000 claims abstract description 14
- 230000006735 deficit Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000013468 resource allocation Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5072—Grid computing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the disclosure discloses a method and a device for configuring resources, and relates to the field of cloud computing. One embodiment of the method comprises: responding to the received resource creating request, and inquiring the residual resources of the current group in the host group corresponding to the resource creating request; in response to the fact that the residual resources of the current group do not meet the resource creating request, searching target host machines meeting the resource creating request from other host machine groups; and distributing the target host to the host group. This embodiment improves resource utilization.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for configuring resources.
Background
Cloud resources contain a vast amount of information. For convenience of management, a large number of hosts that acquire cloud resources to establish data connections may be generally divided into a plurality of host groups. When a user operates a cloud resource, corresponding resource configuration is generally required to be performed in a host group where a host of the user (i.e., a terminal used by the user) is located, so as to improve security and stability of cloud operation.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for configuring resources.
In a first aspect, an embodiment of the present disclosure provides a method for configuring a resource, the method including: responding to the received resource creating request, and inquiring the residual resources of the current group in the host group corresponding to the resource creating request; in response to the fact that the residual resources of the current group do not meet the resource creating request, searching target host machines meeting the resource creating request from other host machine groups; and distributing the target host to the host group.
In some embodiments, the resource creation request comprises at least one of: the number of processors, memory capacity, disk capacity, and the above-mentioned querying of the remaining resources of the current packet in the host packet corresponding to the resource creation request include: for the hosts included in the host grouping, acquiring the sub-residual resources of the host, wherein the residual resources include at least one of the following: the number of processors, memory capacity, and disk capacity; and combining all the sub-residual resources corresponding to the host machine grouping to obtain the current grouping residual resource.
In some embodiments, the searching for the target host satisfying the resource creation request from the other host group includes: determining the surplus resources according to the resource creating request and the current grouping surplus resources; and searching the target host machine which meets the balance residual resources from other host machine groups.
In some embodiments, the resource creation request includes target hardware information and target software information of a user host that issued the resource creation request, and the searching for a target host that satisfies the deficit surplus resource from the other host group includes: searching at least one initial host machine meeting set resource conditions from the other host machine groups; and setting the initial host machine which meets the target hardware information and the target software information in the at least one initial host machine as a target host machine.
In some embodiments, the assigning the target host to the host group includes: adding the target host to the host grouping to obtain an updated host grouping; and according to the resource creation request, configuring resources for the user host corresponding to the resource creation request in the update host group.
In a second aspect, an embodiment of the present disclosure provides an apparatus for configuring a resource, the apparatus including: a residual resource query unit, configured to query a current group of residual resources within a host group corresponding to a resource creation request in response to receiving the resource creation request; a target host inquiry unit, 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; a resource allocation unit configured to allocate the target host to the host group.
In some embodiments, the resource creation request comprises at least one of: the number of processors, memory capacity, disk capacity, and the remaining resource query unit include: a sub-surplus resource acquiring subunit, configured to acquire, for a host included in the host group, a sub-surplus resource of the host, where the surplus resource includes at least one of: the number of processors, memory capacity, and disk capacity; and the current grouping residual resource obtaining subunit is configured to combine all the sub-residual resources corresponding to the host machine grouping to obtain the current grouping residual resource.
In some embodiments, the target host query unit includes: a difference surplus resource calculation subunit configured to determine a difference surplus resource based on the resource creation request and the currently grouped surplus resource; and the target host inquiry subunit is configured to search the target hosts meeting the balance residual resources from other host groups.
In some embodiments, the resource creation request includes target hardware information and target software information of a user host that issued the resource creation request, and the target host querying subunit includes: the initial host inquiry module is configured to search at least one initial host meeting set resource conditions from the other host groups; and the target host determination module is configured to set an initial host which meets the target hardware information and the target software information in the at least one initial host as a target host.
In some embodiments, the resource configuration unit includes: an update host grouping determination subunit configured to add the target host to the host grouping to obtain an update host grouping; and the resource configuration subunit is configured to configure resources for the user hosts corresponding to the resource creation requests in the update host groups according to the resource creation requests.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for configuring resources of the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, where the program, when executed by a processor, implements the method for configuring resources of the first aspect described above.
The method and the device for configuring the resources provided by the embodiment of the disclosure comprise the steps that firstly, when a resource creation request is received, the remaining resources of a current group are inquired in a host group corresponding to the resource creation request; then, when the residual resources of the current group do not meet the resource creation request, searching target host machines meeting the resource creation request from other host machine groups; and finally, distributing the target host to the host group. Therefore, the problem that resources among host machine groups are difficult to utilize is solved, the resource configuration of the host machine groups is realized, and the resource utilization rate is improved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for configuring resources, according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a method for configuring resources according to the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method for configuring resources according to the present disclosure;
FIG. 5 is a schematic diagram illustrating one embodiment of an apparatus for configuring resources according to the present disclosure;
FIG. 6 is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of a method for configuring resources or an apparatus for configuring resources to which embodiments of the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include a first host packet 101, a second host packet 102, a network 103, and a resource configuration server 104. Network 103 is the medium used to provide communication links between first host packet 101, second host packet 102, and resource configuration server 104. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The first host packet 101 and the second host packet 102 interact with the resource configuration server 104 over the network 103 to receive or send messages or the like. The first host group 101 and the second host group 102 each include at least one host. Each host may interact with the network 103 for data. The host machine can be provided with various data processing applications, such as a web browser application, a virtual machine creating application, a search application, an instant messaging tool, a mailbox client, social platform software and the like.
The hosts in the first host group 101 or the second host group 102 may be hardware or software. When the host is hardware, a distributed host cluster composed of a plurality of hosts can be realized, and a single host can also be realized. When the host is software, the host may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, which is not limited herein.
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 enable the configuration of resources between the first host group 101 and the second host group 102.
It should be noted that the method for configuring the resource provided by the embodiment of the present disclosure is generally performed by the resource configuration server 104, and accordingly, the apparatus for configuring the resource is generally disposed in the resource configuration server 104.
The resource allocation server 104 may be hardware or software. When the resource configuration server 104 is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the resource configuration server 104 is software, it may be implemented as a plurality of software or software modules (for example, for providing distributed services), or may be implemented as a single software or software module, and is not limited herein.
It should be understood that the number of host groupings, networks, and resource configuration servers in fig. 1 are merely illustrative. There may be any number of host groupings, networks, and resource configuration servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for configuring resources in accordance with the present disclosure is shown. The method for configuring resources comprises the following steps:
In this embodiment, an execution subject of the method for configuring the resource (for example, the resource configuration server 104 shown in fig. 1) may receive the resource creation request from the hosts included in the first host group 101 and the second host group 102 by a wired connection manner or a wireless connection manner. The resource creation request is usually sent to the execution subject when a host sending the resource creation request needs to acquire a resource. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In the prior art, when resources in a host group cannot meet the requirements of a user, the user usually does not have the authority to use cloud resources in other host groups. Meanwhile, available resources in other hosts cannot be effectively utilized, and the utilization rate of cloud resources is not high.
Therefore, after receiving the resource creation request, the execution subject of the 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. And the residual resources of the current grouping are the residual resources of the host grouping corresponding to the resource creation request.
In some optional implementations of this embodiment, the resource creation request may include at least one of: the number of processors, the memory capacity, the disk capacity, and the remaining resources of the current packet queried in the host packet corresponding to the resource creation request may include the following steps:
the first step, for the host machine included in the host machine group, the sub-surplus resource of the host machine is obtained.
Generally, a host comprises a plurality of hosts in groups, and resource sharing can be realized among the hosts. To query the remaining resources of the current packet, the execution body may query the sub-remaining resources of each host. Wherein the remaining resources may include at least one of: number of processors, memory capacity, disk capacity, etc.
And secondly, combining all the sub-residual resources corresponding to the host machine grouping to obtain the current grouping residual resource.
After obtaining the sub remaining resources, the execution main body may combine all the sub remaining resources to obtain the current grouped remaining resources.
When the execution main body determines that the remaining resources of the current group do not satisfy the resource creation request, the execution main body can inquire other host machine groups and mark the host machine capable of satisfying the resource creation request as a target host machine.
In some optional implementation manners of this embodiment, the searching for the target host that satisfies the resource creation request from the other host groups may include the following steps:
and step one, determining the surplus resources according to the resource creating request and the current grouping surplus resources.
When allocating resources to a host, first, the resources in the host group where the host sending the resource creation request is located are considered. The execution body may determine the deficit surplus resource based on the resource creation request and the current grouped surplus resources within the host group in which the host is located. Namely, the balance residual resource is the resource which needs to be obtained from other host machine groups.
And secondly, searching target host computers which meet the balance residual resources from other host computer groups.
After determining the deficit surplus resource, the executing entity needs to obtain the deficit surplus resource from other host groups. In addition, the surplus resource should be acquired from one host as much as possible, and a plurality of hosts are considered only under the condition that one host cannot meet the condition of the surplus resource, so that the variation of the hosts in the host grouping can be reduced as much as possible, and the stability of the cloud resource is maintained as much as possible while the resource creation request is met.
In some optional implementation manners of this embodiment, the resource creation request may include target hardware information and target software information of a user host that sends the resource creation request, and the searching for a target host that satisfies the balance remaining resource from other host groups may include the following steps:
the first step, at least one initial host machine meeting the set resource condition is searched from the other host machine groups.
The execution subject may query hosts in other host groupings to determine initial hosts that meet the set resource conditions. Wherein, the set resource condition may be that the deficit surplus resource condition is satisfied or that the deficit surplus resource is higher.
And secondly, setting the initial host machine which meets the target hardware information and the target software information in the at least one initial host machine as a target host machine.
Different hardware may differ in data processing frequency, data processing manner, and the like. Similarly, different software also has compatibility and other problems. Therefore, in order to ensure normal data processing, the execution subject may select an initial host satisfying both the target hardware information and the target software information from at least one initial host and set it as a target host.
After the target host is determined, the execution subject may allocate the target host to the host group corresponding to the resource creation request. Therefore, the configuration of the cloud resources is realized, and the resource requirement of the resource creation request is met.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for configuring resources according to the present embodiment. In the application scenario of fig. 3, the resource configuration server 104 receives a resource creation request from the first host packet 101. The resource configuration server 104 queries the remaining resources of the first host packet 101. When the remaining resources of the first host group 101 do not satisfy the resource creation request, the resource configuration server 104 finds the target host from the second host group 102. Finally, the resource allocation server 104 assigns the target host to the first host group 101.
In the method provided by the above embodiment of the present disclosure, first, when a resource creation request is received, a remaining resource of a current group is queried in a host group corresponding to the resource creation request; then, when the residual resources of the current group do not meet the resource creation request, searching target host machines meeting the resource creation request from other host machine groups; and finally, distributing the target host to the host group. Therefore, the problem that resources among host machine groups are difficult to utilize is solved, the resource configuration of the host machine groups is realized, and the resource utilization rate is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for configuring resources is illustrated. The process 400 of the method for configuring resources comprises the following steps:
The content of step 401 is the same as that of step 201, and is not described in detail here.
The content of step 402 is the same as that of step 202, and is not described in detail here.
Step 403, allocating the target host to the host group.
The content of step 403 is the same as that of step 203, and is not described in detail here.
The executing agent may add the target host to the host grouping described above. The adding mode can be that the network relation of the target host is modified from the original host group to the host group corresponding to the resource creating request. For example, the network relationship of the target host may be: "XX 01". Wherein "XX" may be the original host grouping in which the target host is located; "01" may be the number of the target host within the original host packet. The executive may modify "XX 01" to "YY 02". Wherein, YY is a host machine 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. The host machine group corresponding to the resource creation request after the target host machine is added is the update host machine group.
From the above description, the target host satisfies the deficit surplus resource, the target hardware information, and the target software information. Thus, the update host packet may satisfy the resource creation request at this time. The execution agent may configure resources for the user hosts corresponding to the resource creation request within the update host group.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of an apparatus for configuring a resource, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for configuring resources of the present embodiment may include: a remaining resource query unit 501, a target host query unit 502, and a resource configuration unit 503. The remaining resource querying unit 501, in response to receiving the resource creation request, is configured to query the remaining resources of the current group in the host group corresponding to the resource creation request; a target host querying unit 502, configured to, in response to that the remaining resources of the current group do not satisfy the resource creation request, search for a target host satisfying the resource creation request from other host groups; a resource allocation unit 503 configured to allocate the target host to the host group.
In some optional implementations of this embodiment, the resource creation request includes at least one of: the number of processors, the memory capacity, the disk capacity, and the remaining resource query unit 501 may include: a sub remaining resource acquiring sub-unit (not shown in the drawing) and a current packet remaining resource acquiring sub-unit (not shown in the drawing). Wherein, the sub-surplus resource acquiring subunit is configured to acquire, for a host included in the host group, a sub-surplus resource of the host, where the surplus resource includes at least one of: the number of processors, memory capacity, and disk capacity; and the current grouping residual resource obtaining subunit is configured to combine all the sub-residual resources corresponding to the host machine grouping to obtain the current grouping residual resource.
In some optional implementations of this embodiment, the target host querying unit 502 may include: a deficit surplus resource calculation subunit (not shown) and a target host query subunit (not shown). Wherein, the surplus resource calculation subunit is configured to determine the surplus resource according to the resource creation request and the current grouping surplus resource; and the target host inquiry subunit is configured to search the target hosts meeting the balance residual resources from other host groups.
In some optional implementation manners of this embodiment, the resource creation request includes target hardware information and target software information of a user host that issued the resource creation request, and the target host querying subunit may include: an initial host query module (not shown) and a target host determination module (not shown). The initial host inquiry module is configured to search the other host groups for at least one initial host meeting the set resource condition; the target host determination module is configured to set an initial host satisfying the target hardware information and the target software information among the at least one initial host as a target host.
In some optional implementations of this embodiment, the resource configuration unit 503 may include: an update host packet determination subunit (not shown) and a resource configuration subunit (not shown). Wherein, the update host grouping determination subunit is configured to add the target host to the host grouping to obtain an update host grouping; and the resource configuration subunit is configured to configure resources for the user hosts corresponding to the resource creation requests in the update host groups according to the resource creation requests.
The present embodiment also provides an electronic device, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the above-described method for configuring resources.
The present embodiments also provide a computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the above-mentioned method for configuring a resource.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use with an electronic device (e.g., resource configuration server 104 of FIG. 1) to implement an embodiment of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 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 bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium mentioned above in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to the received resource creating request, and inquiring the residual resources of the current group in the host group corresponding to the resource creating request; in response to the fact that the residual resources of the current group do not meet the resource creating request, searching target host machines meeting the resource creating request from other host machine groups; and distributing the target host to the host group.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a remaining resource querying unit, a target host querying unit, and a resource configuration unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, a resource configuration unit may also be described as a "unit for configuring a resource".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Claims (12)
1. A method for configuring resources, comprising:
in response to receiving a resource creation request, querying the residual resources of the current group in the host group corresponding to the resource creation request;
in response to the fact that the residual resources of the current group do not meet the resource creation request, searching target host machines meeting the resource creation request from other host machine groups;
assigning the target host to the host group.
2. The method of claim 1, wherein the resource creation request comprises at least one of: number of processors, memory capacity, disk capacity, and
the querying the remaining resources of the current group in the host group corresponding to the resource creation request includes:
for the hosts included in the host grouping, acquiring the sub-residual resources of the host, wherein the residual resources include at least one of the following: the number of processors, memory capacity, and disk capacity;
and combining all the sub-residual resources corresponding to the host machine grouping to obtain the current grouping residual resource.
3. The method of claim 2, wherein said finding a target host from a group of other hosts that satisfies the resource creation request comprises:
determining the surplus resources according to the resource creating request and the current grouping surplus resources;
and searching the target host machine which meets the surplus resources from other host machine groups.
4. The method of claim 3, wherein the resource creation request includes target hardware information and target software information of a user host that issued the resource creation request, and
the searching for the target host satisfying the deficit surplus resource from the other host groups comprises:
searching at least one initial host which meets set resource conditions from the other host groups;
and setting the initial host machine which meets the target hardware information and the target software information in the at least one initial host machine as a target host machine.
5. The method of claim 1, wherein said assigning said target host to said host group comprises:
adding the target host to the host grouping to obtain an updated host grouping;
and according to the resource creation request, configuring resources for the user host corresponding to the resource creation request in the update host group.
6. An apparatus for configuring resources, comprising:
a residual resource query unit, which is used for responding to the received resource creation request and is configured to query the residual resources of the current group in the host group corresponding to the resource creation request;
a target host inquiry unit, 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;
a resource configuration unit configured to allocate the target host to the host group.
7. The apparatus of claim 6, wherein the resource creation request comprises at least one of: number of processors, memory capacity, disk capacity, and
the remaining resource querying unit includes:
a sub-surplus resource obtaining subunit, configured to, for a host included in the host group, obtain a sub-surplus resource of the host, where the surplus resource includes at least one of: the number of processors, memory capacity, and disk capacity;
and the current grouping residual resource obtaining subunit is configured to combine all the sub-residual resources corresponding to the host machine grouping to obtain the current grouping residual resource.
8. The apparatus of claim 7, wherein the target host query unit comprises:
a deficit surplus resource calculation subunit configured to determine deficit surplus resources from the resource creation request and the currently grouped surplus resources;
a target host query subunit configured to find a target host satisfying the deficit surplus resource from the other host group.
9. The apparatus of claim 8, wherein the resource creation request includes target hardware information and target software information of a user host that issued the resource creation request, and
the target host inquiry subunit comprises:
an initial host inquiry module configured to search at least one initial host satisfying a set resource condition from the other host group;
a target host determination module configured to set an initial host satisfying the target hardware information and the target software information among the at least one initial host as a target host.
10. The apparatus of claim 6, wherein the resource configuration unit comprises:
an update host group determination subunit configured to add the target host to the host group to obtain an update host group;
a resource configuration subunit configured to configure, according to the resource creation request, resources for the user hosts corresponding to the resource creation request within the update host group.
11. An electronic device, comprising:
one or more processors;
a memory having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911203171.3A CN112882820A (en) | 2019-11-29 | 2019-11-29 | Method and device for configuring resources |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911203171.3A CN112882820A (en) | 2019-11-29 | 2019-11-29 | Method and device for configuring resources |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112882820A true CN112882820A (en) | 2021-06-01 |
Family
ID=76038708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911203171.3A Pending CN112882820A (en) | 2019-11-29 | 2019-11-29 | Method and device for configuring resources |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112882820A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020937A (en) * | 2016-07-07 | 2016-10-12 | 腾讯科技(深圳)有限公司 | Method, device and system for creating virtual machine |
WO2017000645A1 (en) * | 2015-06-30 | 2017-01-05 | 华为技术有限公司 | Method and apparatus for allocating host resource |
WO2017166785A1 (en) * | 2016-04-01 | 2017-10-05 | 华为技术有限公司 | Method for deploying virtual machines, host machine, and system |
CN108170520A (en) * | 2018-01-29 | 2018-06-15 | 北京搜狐新媒体信息技术有限公司 | A kind of cloud computing resources management method and device |
WO2019062699A1 (en) * | 2017-09-29 | 2019-04-04 | 腾讯科技(深圳)有限公司 | Resource scheduling method, scheduling server, cloud computing system and storage medium |
CN109783185A (en) * | 2017-11-14 | 2019-05-21 | 阿里巴巴集团控股有限公司 | Cloud virtual machine creation method, device and cloud device |
-
2019
- 2019-11-29 CN CN201911203171.3A patent/CN112882820A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017000645A1 (en) * | 2015-06-30 | 2017-01-05 | 华为技术有限公司 | Method and apparatus for allocating host resource |
WO2017166785A1 (en) * | 2016-04-01 | 2017-10-05 | 华为技术有限公司 | Method for deploying virtual machines, host machine, and system |
CN106020937A (en) * | 2016-07-07 | 2016-10-12 | 腾讯科技(深圳)有限公司 | Method, device and system for creating virtual machine |
WO2018006864A1 (en) * | 2016-07-07 | 2018-01-11 | 腾讯科技(深圳)有限公司 | Method, apparatus and system for creating virtual machine, control device and storage medium |
WO2019062699A1 (en) * | 2017-09-29 | 2019-04-04 | 腾讯科技(深圳)有限公司 | Resource scheduling method, scheduling server, cloud computing system and storage medium |
CN109582433A (en) * | 2017-09-29 | 2019-04-05 | 腾讯科技(深圳)有限公司 | A kind of resource regulating method, device, cloud computing system and storage medium |
CN109783185A (en) * | 2017-11-14 | 2019-05-21 | 阿里巴巴集团控股有限公司 | Cloud virtual machine creation method, device and cloud device |
CN108170520A (en) * | 2018-01-29 | 2018-06-15 | 北京搜狐新媒体信息技术有限公司 | A kind of cloud computing resources management method and device |
Non-Patent Citations (2)
Title |
---|
彭红;杨根兴;蔡立志;: "基于用户个性化需求的虚拟机部署机制", 软件产业与工程, no. 01, 10 January 2013 (2013-01-10) * |
闫健恩;张宏莉;许海燕;: "基于负载优化的虚拟机放置方法", 智能计算机与应用, no. 06 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3798833B1 (en) | Methods, system, articles of manufacture, and apparatus to manage telemetry data in an edge environment | |
US20200328984A1 (en) | Method and apparatus for allocating resource | |
US9448901B1 (en) | Remote direct memory access for high availability nodes using a coherent accelerator processor interface | |
CN109729040B (en) | Method, apparatus and computer readable medium for selection of a protocol | |
US11003658B2 (en) | Selectively retrieving data from remote share nothing computer clusters | |
CN110166507B (en) | Multi-resource scheduling method and device | |
US20160070475A1 (en) | Memory Management Method, Apparatus, and System | |
CN114924751A (en) | Method and device for distributing service access request flow | |
WO2022083293A1 (en) | Managing task flow in edge computing environment | |
CN110401731B (en) | Method and apparatus for distributing content distribution nodes | |
CN115237589A (en) | SR-IOV-based virtualization method, device and equipment | |
CN109471713B (en) | Method and device for inquiring information | |
CN114296953A (en) | Multi-cloud heterogeneous system and task processing method | |
CN112306685A (en) | Task isolation method and device, electronic equipment and computer readable medium | |
CN112596897A (en) | Method and system for multi-tenant isolation | |
CN108810130B (en) | Method and device for planning distribution request | |
US10231269B2 (en) | Dynamic generation of geographically bound manet IDs | |
CN115277707A (en) | Service processing method, device, electronic equipment and storage medium | |
CN112882820A (en) | Method and device for configuring resources | |
CN112152988B (en) | Method, system, computer device and medium for asynchronous NBMP request processing | |
CN112181605A (en) | Load balancing method and device, electronic equipment and computer readable medium | |
CN112507676A (en) | Energy report generation method and device, electronic equipment and computer readable medium | |
CN111314457B (en) | Method and device for setting virtual private cloud | |
CN111782268B (en) | Method, apparatus, device and computer readable medium for allocating hardware resources | |
CN115309410B (en) | Edge cluster application publishing method and device of edge computing scene and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |