CN114201302A - Application resource allocation method and device - Google Patents

Application resource allocation method and device Download PDF

Info

Publication number
CN114201302A
CN114201302A CN202111537492.4A CN202111537492A CN114201302A CN 114201302 A CN114201302 A CN 114201302A CN 202111537492 A CN202111537492 A CN 202111537492A CN 114201302 A CN114201302 A CN 114201302A
Authority
CN
China
Prior art keywords
resource
application
target
use condition
target resource
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
Application number
CN202111537492.4A
Other languages
Chinese (zh)
Inventor
孔祥东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Jingxundi Supply Chain Technology Co ltd
Original Assignee
Xi'an Jingxundi Supply Chain Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xi'an Jingxundi Supply Chain Technology Co ltd filed Critical Xi'an Jingxundi Supply Chain Technology Co ltd
Priority to CN202111537492.4A priority Critical patent/CN114201302A/en
Publication of CN114201302A publication Critical patent/CN114201302A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an application resource allocation method and device, and relates to the technical field of computers. One embodiment of the method comprises: receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier; detecting a first use condition of a first resource currently used by a first application corresponding to an application identifier, and determining whether the first use condition of the first resource meets a first preset use condition; when the first use condition is determined to meet the first preset use condition, respectively determining whether target resources with second use conditions not meeting second preset use conditions exist in second resources currently used by one or more second applications; and when the target resource exists in the second resource, allocating the target resource to the first application so that the first application uses the target resource. The method and the device can automatically detect the first use condition of the first resource and allocate the target resource to the first application, so that the working efficiency is improved.

Description

Application resource allocation method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for allocating application resources.
Background
When an application is developed, certain application resources are allocated to the application to maintain the normal operation of the application. During the continuous operation and maintenance of the application, the problem of insufficient application resources originally allocated to the application may occur, and at this time, the application resources need to be allocated again to the application, so as to continue to maintain the normal operation of the application.
However, when the application resource is reallocated to the application, not only the developer and the operation and maintenance staff are required to check the usage of the application resource previously allocated to the application, but also the developer and the operation and maintenance staff are required to coordinate the amount of the reallocated application resource, thereby reducing the work efficiency.
Disclosure of Invention
In view of the above, embodiments of the present invention provide an application resource allocation method and apparatus, which are capable of allocating, after receiving an application resource allocation request for a first application, detecting a first usage of a first resource currently used by a first application, and determining whether the first usage of the first resource satisfies a first preset usage condition, when the first use condition is determined to meet the first preset use condition, respectively determining whether a target resource with the second use condition not meeting the second preset use condition exists in the second resources currently used by the one or more second applications, when the target resource is determined to exist, the target resource is allocated to the first application so that the first application uses the target resource, therefore, the first using condition of the first resource can be automatically detected, the target resource is automatically allocated to the first application, and the working efficiency is improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, an application resource allocation method is provided.
The application resource allocation method of the embodiment of the invention comprises the following steps:
receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier;
detecting a first use condition of a first resource currently used by a first application corresponding to an application identifier, and determining whether the first use condition of the first resource meets a first preset use condition;
when the first use condition is determined to meet the first preset use condition, respectively determining whether target resources with second use conditions not meeting second preset use conditions exist in second resources currently used by one or more second applications; the second application identifies other corresponding applications except the first application for the requester;
and when the target resource exists in the second resource, allocating the target resource to the first application so that the first application uses the target resource.
Alternatively,
when it is determined that the target resource does not exist in the second resource, the method further includes:
determining a third resource to be allocated according to the first use condition and the first preset use condition;
and updating the application resource allocation request according to the third resource, and forwarding the updated resource allocation request to the public resource platform, so that the public resource platform allocates the third resource for the first application according to the resource allocation request.
Alternatively,
allocating a target resource to a first application, comprising:
acquiring parameters of target resources and corresponding mirror image information;
according to the parameters, configuring the target resources by using the mirror image information to generate new target resources;
and binding the new target resource to the first application so as to add the new target resource to the first application.
Alternatively,
and when the target resource exists in the second resource, locking the target resource before the target resource is allocated to the first resource so as to pre-occupy the target resource.
Alternatively,
when a plurality of target resources exist in the second resource, before the target resources are allocated to the first resource, the target resources are locked to pre-occupy the target resources, and the method comprises the following steps:
displaying a plurality of target resources to a requester corresponding to the requester identifier;
and locking the selected target resource according to the received selection of the requester on the plurality of target resources so as to pre-occupy the selected target resource.
Alternatively,
detecting a first use case of a first resource, comprising:
acquiring a plurality of performance data of a first resource in a preset time period;
and performing aggregation operation on the plurality of performance data to obtain a first use condition.
Alternatively,
and when the first using condition of the first resource is determined not to meet the first preset using condition, rejecting the application resource allocation request.
To achieve the above object, according to still another aspect of the embodiments of the present invention, an application resource allocation apparatus is provided.
The application resource allocation device comprises a request receiving module, a detection module, a target resource determining module and an allocation module; wherein:
the request receiving module is used for receiving an application resource allocation request, and the application resource allocation request comprises an application identifier and a requester identifier;
the detection module is used for detecting a first use condition of a first resource currently used by a first application corresponding to the application identifier and determining whether the first use condition of the first resource meets a first preset use condition;
the target resource determining module is used for respectively determining whether target resources with second use conditions not meeting second preset use conditions exist in second resources currently used by one or more second applications when the first use conditions are determined to meet the first preset use conditions; the second application identifies other corresponding applications except the first application for the requester;
and the allocation module is used for allocating the target resource to the first application when the target resource exists in the second resource, so that the first application uses the target resource.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device for application resource allocation.
An electronic device for allocating application resources according to an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors implement the application resource allocation method of the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements an application resource allocation method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of detecting a first use condition of a first resource currently used by a first application after receiving an application resource allocation request aiming at the first application, determining whether the first use condition of the first resource meets a first preset use condition, respectively determining whether a target resource with a second use condition not meeting a second preset use condition exists in one or more second resources currently used by a second application when determining that the first use condition meets the first preset use condition, and allocating the target resource to the first application when determining that the target resource exists so that the first application uses the target resource, thereby automatically detecting the first use condition of the first resource, automatically allocating the target resource to the first application, and improving the working efficiency.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of the main steps of an application resource allocation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process for detecting a second usage of a second resource currently used by each second application;
FIG. 3 is a schematic diagram of a process for allocating a target resource to a first application;
FIG. 4 is a diagram illustrating the main steps of another application resource allocation method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of main modules of an application resource allocation apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram illustrating the main steps of an application resource allocation method according to an embodiment of the present invention.
As shown in fig. 1, an application resource allocation method according to an embodiment of the present invention mainly includes the following steps:
step S101: and receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier.
In the embodiment of the present invention, the application resource allocation request may be initiated online by a developer, and at this time, the requestor identifier included in the application resource allocation request is an identifier of the developer initiating the request. In addition, in an actual application scenario of the present solution, a developer may manage a plurality of applications, including a first application of resources to be allocated and one or more second applications that temporarily do not need more application resources, so that the application resource allocation request further includes an application identifier corresponding to the first application of resources to be allocated.
Step S102: the method comprises the steps of detecting a first use condition of a first resource currently used by a first application corresponding to an application identifier, and determining whether the first use condition of the first resource meets a first preset use condition.
In an actual application scenario, a developer may request allocation of a large amount of application resources without counting costs, so that the application resources are wasted in a vacant state. Specifically, a plurality of performance data of the first resource in a preset time period may be acquired; and further carrying out aggregation operation on the plurality of performance data to obtain a first use condition.
In a preferred embodiment of the present invention, the plurality of performance data of the first resource in the preset time period includes, but is not limited to, any one or more of the following: the maximum usage of the CPU in a preset time period, the average usage of the CPU in the preset time period, the maximum usage of the hard disk in the preset time period, the average usage of the hard disk in the preset time period, the maximum usage of the hard disk in the preset time period, and the average usage of the hard disk in the preset time period.
In the embodiment of the invention, the asynchronous task can be started to periodically acquire and record a plurality of performance data of the first resource in the using process within the preset time period so as to acquire the plurality of performance data of the first resource within the preset time period.
Step S103: when the first use condition is determined to meet the first preset use condition, respectively determining whether target resources with second use conditions not meeting second preset use conditions exist in second resources currently used by one or more second applications; the second application identifies a corresponding other application for the requestor in addition to the first application.
In the embodiment of the present invention, when the first usage condition of the first resource meets the first preset usage condition, it indicates that the first application has met the criterion for allocating the application resource, and the application resource needs to be allocated to the first application. For example, the first preset usage condition is that the average usage rate of the CPU in the past month reaches 70%, and the average usage rate of the CPU of the first application in the past month reaches 75%, which indicates that the application resource needs to be allocated to the first application to reduce the CPU usage rate of the first application.
In the embodiment of the invention, when the first use condition of the first resource meets the first preset use condition, whether the target resource with the second use condition not meeting the second preset use condition exists in the one or more second resources currently used by the second application corresponding to the requester identifier can be respectively determined, and if so, the target resource can be directly allocated to the first application, so that the reasonable allocation of the application resource can be automatically completed, the operation and maintenance personnel do not need to examine and approve, and the working efficiency is improved.
In the embodiment of the present invention, when the first usage of the first resource satisfies the first preset usage condition, all the second applications, except the first application, that the requesting party participates in may be first obtained according to the identifier of the requesting party, and then the second usage of the second resource currently used by each second application is respectively detected to determine whether there is a target resource whose second usage does not satisfy the second preset usage condition. The second use case is associated with an operation requirement of the second application, and may be the same as or different from the first use case.
Specifically, as shown in fig. 2, the process of respectively detecting the second usage of the second resource currently used by each second application may be performed for each second resource currently used by each second application, and the following steps may be performed:
step S201: acquiring a plurality of performance data of the second resource in a preset time period;
step S202: performing aggregation operation on the plurality of performance data to obtain a second use condition of the second resource;
step S203: determining whether the second use condition meets a second preset use condition;
step S204: if not, determining that the target resource exists, and marking the second resource as the target resource;
step S205: determining a third resource to be allocated according to the first use condition and the first preset use condition; and updating the application resource allocation request according to the third resource, and forwarding the updated resource allocation request to the public resource platform, so that the public resource platform allocates the third resource for the first application according to the resource allocation request.
In the embodiment of the present invention, when it is determined that the first usage of the first resource does not satisfy the first preset usage, it indicates that the first application does not satisfy the criterion for allocating the application resource, and therefore the application resource allocation request may be rejected. For example, the first preset usage condition is that the average usage rate of the CPU in the past month reaches 70%, but the average usage rate of the CPU of the first application in the past month is only 50%, which indicates that the first resource of the first application is sufficient, and the application resource allocation request does not need to be allocated to the first application, so the application resource allocation request can be rejected.
Step S104: and when the target resource exists in the second resource, allocating the target resource to the first application so that the first application uses the target resource.
In the embodiment of the present invention, when it is determined that the target resource exists in the second resource, the target resource may be locked before being allocated to the first resource, so as to camp on the target resource.
In the embodiment of the present invention, when it is determined that a plurality of target resources exist in the second resource, the plurality of target resources may be displayed to the requester corresponding to the requester identifier before the target resources are allocated to the first resource; and locking the selected target resource according to the received selection of the requester on the plurality of target resources so as to pre-occupy the selected target resource.
In a preferred embodiment of the present invention, the number of target resources may be measured in units of an ip of a target resource, and when it is determined that a plurality of target resources exist in the second resource, the plurality of target resources may be automatically presented to the requester corresponding to the requester identifier in the form of a target resource list before the target resources are allocated to the first resource. The content of the target resource list is an ip of a plurality of target resources; and then according to the received ip of the target resource selected by the requester, locking the ip of the selected target resource so as to pre-occupy the selected target resource.
In the embodiment of the present invention, since the target resource may store or run the data of the second application before being allocated to the first application, the target resource needs to be reallocated to the first application after being reconfigured. Therefore, the process of allocating the target resource to the first application may be as shown in fig. 3, and mainly includes the following steps:
step S301: acquiring parameters of target resources and corresponding mirror image information;
step S302: according to the parameters, configuring the target resources by using the mirror image information to generate new target resources;
step S303: and binding the new target resource to the first application so as to add the new target resource to the first application.
In the embodiment of the present invention, if the target resource is locked before the target resource is allocated to the first resource, the target resource needs to be unlocked after the target resource is allocated to the first application.
In this embodiment of the present invention, when it is determined that the target resource does not exist in the second resource, the method further includes: determining a third resource to be allocated according to the first use condition and the first preset use condition; according to the third resource, the application resource allocation request is updated, and the updated resource allocation request is forwarded to the public resource platform, so that the public resource platform allocates the third resource for the first application according to the resource allocation request, the function of automatically allocating the required resource for the first application from the public resource platform can be realized, operation and maintenance personnel are not required to check and examine and approve, and the working efficiency is further improved.
A more complete embodiment is described in detail below for an application resource allocation method proposed in the present scheme. As shown in fig. 4, fig. 4 is a schematic diagram of main steps of another application resource allocation method according to an embodiment of the present invention, and the method mainly includes the following steps:
step S401: receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier;
step S402: detecting a first use condition of a first resource currently used by a first application corresponding to an application identifier;
step S403: determining whether the first using condition of the first resource meets a first preset using condition, if not, executing step S404, and if so, executing step S405;
step S404: rejecting the application resource allocation request;
step S405: respectively determining whether a target resource with a second use condition not meeting a second preset use condition exists in one or more second resources currently used by a second application corresponding to the requester identifier, if so, executing steps S406-S407, and if not, executing steps S408-S409;
step S406: when one target resource is available, locking the target resource to pre-occupy the target resource; when a plurality of target resources are available, displaying the plurality of target resources to a requester corresponding to the requester identifier in a form of a target resource list, and locking the selected target resources according to the received target resources selected by the requester so as to pre-occupy the selected target resources;
step S407: allocating the pre-occupied target resource to a first application, and canceling the locking of the target resource so as to enable the first application to use the target resource;
step S408: determining a third resource to be allocated according to the first use condition and the first preset use condition;
step S409: and updating the application resource allocation request according to the third resource, and forwarding the updated resource allocation request to the public resource platform, so that the public resource platform allocates the third resource for the first application according to the resource allocation request.
An application resource allocation method according to an embodiment of the present invention can be seen that, after receiving an application resource allocation request for a first application, detecting a first usage of a first resource currently used by a first application, and determining whether the first usage of the first resource satisfies a first preset usage condition, when the first use condition is determined to meet the first preset use condition, respectively determining whether a target resource with the second use condition not meeting the second preset use condition exists in the second resources currently used by the one or more second applications, when the target resource is determined to exist, the target resource is allocated to the first application so that the first application uses the target resource, therefore, the first using condition of the first resource can be automatically detected, the target resource is automatically allocated to the first application, and the working efficiency is improved.
Fig. 5 is a schematic diagram of main modules of an application resource allocation apparatus according to an embodiment of the present invention.
As shown in fig. 5, an application resource allocation apparatus 500 according to an embodiment of the present invention includes a request receiving module 501, a detecting module 502, a target resource determining module 503, and an allocating module 504; wherein:
a request receiving module 501, configured to receive an application resource allocation request, where the application resource allocation request includes an application identifier and a requester identifier;
a detecting module 502, configured to detect a first usage of a first resource currently used by a first application corresponding to an application identifier, and determine whether the first usage of the first resource meets a first preset usage condition;
a target resource determining module 503, configured to determine, when it is determined that the first usage condition meets a first preset usage condition, whether a target resource whose second usage condition does not meet a second preset usage condition exists in second resources currently used by one or more second applications, respectively; the second application identifies other corresponding applications except the first application for the requester;
the allocating module 504 is configured to, when it is determined that the target resource exists in the second resource, allocate the target resource to the first application, so that the first application uses the target resource.
In this embodiment of the present invention, when it is determined that the target resource does not exist in the second resource, the allocating module 504 is further configured to: determining a third resource to be allocated according to the first use condition and the first preset use condition; and updating the application resource allocation request according to the third resource, and forwarding the updated resource allocation request to the public resource platform, so that the public resource platform allocates the third resource for the first application according to the resource allocation request.
In an embodiment of the present invention, the allocating module 504 is further configured to: acquiring parameters of target resources and corresponding mirror image information; according to the parameters, configuring the target resources by using the mirror image information to generate new target resources; and binding the new target resource to the first application so as to add the new target resource to the first application.
In this embodiment of the present invention, when it is determined that the target resource exists in the second resource, before allocating the target resource to the first resource, the allocating module 504 is further configured to: and locking the target resource to pre-occupy the target resource.
In this embodiment of the present invention, when it is determined that there are multiple target resources in the second resource, before allocating the target resources to the first resource, the allocating module 504 is further configured to: displaying a plurality of target resources to a requester corresponding to the requester identifier; and locking the selected target resource according to the received selection of the requester on the plurality of target resources so as to pre-occupy the selected target resource.
In this embodiment of the present invention, the detecting module 502 is further configured to: acquiring a plurality of performance data of a first resource in a preset time period; and performing aggregation operation on the plurality of performance data to obtain a first use condition.
In this embodiment of the present invention, when it is determined that the first usage of the first resource does not satisfy the first preset usage, the detecting module 502 is further configured to: the application resource allocation request is denied.
An application resource allocation apparatus according to an embodiment of the present invention can be seen that, after receiving an application resource allocation request for a first application, detecting a first usage of a first resource currently used by a first application, and determining whether the first usage of the first resource satisfies a first preset usage condition, when the first use condition is determined to meet the first preset use condition, respectively determining whether a target resource with the second use condition not meeting the second preset use condition exists in the second resources currently used by the one or more second applications, when the target resource is determined to exist, the target resource is allocated to the first application so that the first application uses the target resource, therefore, the first using condition of the first resource can be automatically detected, the target resource is automatically allocated to the first application, and the working efficiency is improved.
Fig. 6 shows an exemplary system architecture 600 of an application resource allocation method or an application resource allocation apparatus to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and an electronic device 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and electronic device 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the electronic device 605 via the network 604 to receive or send messages or the like. Various application management software may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The electronic device 605 may be a server that provides various services, such as a background management server that provides support for application management software browsed by a user using the terminal devices 601, 602, 603. The background management server may analyze and perform other processing on the received data such as the first usage query request for the application resource currently used by the first application, and feed back a processing result (e.g., the first usage of the application resource currently used by the first application) to the terminal device.
It should be noted that, an application resource allocation method provided in the embodiment of the present invention is generally executed by the electronic device 605, and accordingly, an application resource allocation apparatus is generally disposed in the electronic device 605.
It should be understood that the number of terminal devices, networks, and electronic devices in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and electronic devices, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments 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 can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can 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 the present invention, 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 the present invention, however, a computer readable signal medium may include 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a request receiving module, a detection module, a target resource determination module, and an allocation module. The names of these modules do not in some cases constitute a limitation on the module itself, for example, the request receiving module may also be described as a "module for receiving an application resource allocation request".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier; detecting a first use condition of a first resource currently used by a first application corresponding to an application identifier, and determining whether the first use condition of the first resource meets a first preset use condition; when the first use condition is determined to meet the first preset use condition, respectively determining whether target resources with second use conditions not meeting second preset use conditions exist in second resources currently used by one or more second applications; the second application identifies other corresponding applications except the first application for the requester; and when the target resource exists in the second resource, allocating the target resource to the first application so that the first application uses the target resource.
According to the technical scheme of the embodiment of the invention, after the application resource allocation request aiming at the first application is received, the first use condition of the first resource currently used by the first application can be detected, whether the first use condition of the first resource meets the first preset use condition is determined, when the first use condition is determined to meet the first preset use condition, whether the target resource with the second use condition not meeting the second preset use condition exists in the second resources currently used by one or more second applications is respectively determined, and when the target resource exists, the target resource is allocated to the first application, so that the first application uses the target resource, the first use condition of the first resource can be automatically detected, the target resource is automatically allocated to the first application, and the working efficiency is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An application resource allocation method, comprising:
receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier;
detecting a first use condition of a first resource currently used by a first application corresponding to the application identifier, and determining whether the first use condition of the first resource meets a first preset use condition;
when the first use condition is determined to meet the first preset use condition, respectively determining whether target resources with second use conditions not meeting second preset use conditions exist in second resources currently used by one or more second applications; the second application identifies other corresponding applications except the first application for the requester;
when the target resource exists in the second resource, the target resource is allocated to the first application, so that the first application uses the target resource.
2. The method of claim 1, wherein when it is determined that the target resource does not exist in the second resource, further comprising:
determining a third resource to be allocated according to the first use condition and the first preset use condition;
and updating the application resource allocation request according to the third resource, and forwarding the updated resource allocation request to a public resource platform, so that the public resource platform allocates the third resource to the first application according to the resource allocation request.
3. The method of claim 1, wherein the allocating the target resource to the first application comprises:
acquiring parameters of the target resource and corresponding mirror image information;
according to the parameters, the mirror image information is utilized to configure the target resource so as to generate a new target resource;
and binding the new target resource to the first application so as to add the new target resource to the first application.
4. The method of claim 1,
when the target resource exists in the second resource, the target resource is locked before the target resource is allocated to the first resource, so that the target resource is pre-occupied.
5. The method of claim 4,
when it is determined that a plurality of target resources exist in the second resource, before the target resource is allocated to the first resource, the locking the target resource to camp on the target resource includes:
displaying a plurality of target resources to a requester corresponding to the requester identifier;
and locking the selected target resource according to the received selection of the requester on the plurality of target resources so as to pre-occupy the selected target resource.
6. The method of claim 1, wherein the detecting the first usage of the first resource comprises:
acquiring a plurality of performance data of the first resource in a preset time period;
and performing aggregation operation on the plurality of performance data to obtain the first use condition.
7. The method of claim 1,
and rejecting the application resource allocation request when the first using condition of the first resource is determined not to meet the first preset using condition.
8. An application resource allocation device is characterized by comprising a request receiving module, a detection module, a target resource determining module and an allocation module; wherein:
the request receiving module is used for receiving an application resource allocation request, wherein the application resource allocation request comprises an application identifier and a requester identifier;
the detection module is used for detecting a first use condition of a first resource currently used by a first application corresponding to the application identifier and determining whether the first use condition of the first resource meets a first preset use condition;
the target resource determining module is configured to determine whether a target resource exists in the second resources currently used by the one or more second applications, where the second usage does not satisfy the second preset usage condition, when it is determined that the first usage satisfies the first preset usage condition; the second application identifies other corresponding applications except the first application for the requester;
the allocation module is configured to, when it is determined that the target resource exists in the second resource, allocate the target resource to the first application, so that the first application uses the target resource.
9. An electronic device for application resource allocation, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. 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-7.
CN202111537492.4A 2021-12-15 2021-12-15 Application resource allocation method and device Pending CN114201302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111537492.4A CN114201302A (en) 2021-12-15 2021-12-15 Application resource allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111537492.4A CN114201302A (en) 2021-12-15 2021-12-15 Application resource allocation method and device

Publications (1)

Publication Number Publication Date
CN114201302A true CN114201302A (en) 2022-03-18

Family

ID=80654199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111537492.4A Pending CN114201302A (en) 2021-12-15 2021-12-15 Application resource allocation method and device

Country Status (1)

Country Link
CN (1) CN114201302A (en)

Similar Documents

Publication Publication Date Title
JP7127010B2 (en) Resource allocation methods, apparatus, electronic equipment, computer readable media and computer programs
CN113641457A (en) Container creation method, device, apparatus, medium, and program product
CN109960575B (en) Computing capacity sharing method, system and related equipment
EP3958122A1 (en) Memory management method, apparatus, and system
CN110706093A (en) Accounting processing method and device
US11418583B2 (en) Transaction process management by dynamic transaction aggregation
CN115617511A (en) Resource data processing method and device, electronic equipment and storage medium
CN111062572A (en) Task allocation method and device
CN109828830B (en) Method and apparatus for managing containers
CN112817562A (en) Service processing method and device
CN114116173A (en) Method, device and system for dynamically adjusting task allocation
CN110928594A (en) Service development method and platform
CN111831503A (en) Monitoring method based on monitoring agent and monitoring agent device
CN115629853A (en) Task scheduling method and device
CN114201302A (en) Application resource allocation method and device
CN115442129A (en) Method, device and system for managing cluster access authority
CN114237902A (en) Service deployment method and device, electronic equipment and computer readable medium
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN108683608B (en) Method and device for distributing flow
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN112506583A (en) Instance control method, device, equipment, storage medium and program product
CN113778657B (en) Data processing method and device
CN112784187A (en) Page display method and device
CN112148448B (en) Resource allocation method, apparatus, device and computer readable medium
CN113220555B (en) Method, apparatus, device, medium, and article for processing data

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