CN112269659A - Resource management method, system, electronic equipment and storage medium - Google Patents
Resource management method, system, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112269659A CN112269659A CN202011147016.7A CN202011147016A CN112269659A CN 112269659 A CN112269659 A CN 112269659A CN 202011147016 A CN202011147016 A CN 202011147016A CN 112269659 A CN112269659 A CN 112269659A
- Authority
- CN
- China
- Prior art keywords
- resource
- resources
- application
- resource pool
- pool
- 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
- 238000007726 management method Methods 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 claims abstract description 34
- 239000003999 initiator Substances 0.000 claims abstract description 25
- 238000013468 resource allocation Methods 0.000 claims abstract description 7
- 238000004590 computer program Methods 0.000 claims description 12
- 238000004458 analytical method Methods 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000000872 buffer Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 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
Abstract
The application discloses a resource management method, a system, a device and a medium, wherein the method comprises the following steps: acquiring a resource application request by using a universal interface, and automatically determining the resource type and the application quantity in the request; detecting whether available resources exist in the corresponding sub-resource pool or not according to the resource types; the child resource pool is a resource pool obtained by inheriting the parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all the resources; if yes, directly distributing available resources for the initiator of the resource application request, and updating the resource management linked list; and if not, applying for the target resource from the parent resource pool. According to the resource allocation method and device, when the user needs to apply for the resources, the application request can be directly sent through the provided universal interface, and only the resource type and the application number need to be specified in the request, the resource can be searched and allocated in the corresponding sub resource pool or parent resource pool, the work flow of the user when applying for different resources is unified and simplified, and the work efficiency and the user use experience are improved.
Description
Technical Field
The present application relates to the field of memory management technologies, and in particular, to a method and a system for resource management, an electronic device, and a computer-readable storage medium.
Background
In the era of advanced science and technology, information processing becomes a key technology in each field, and fields such as AI (Artificial Intelligence), cloud computing, servers and databases have special designs for corresponding data processing according to actual application scenarios.
In a conventional resource management scheme, different resource pools are usually defined for different types of resources, and different resource pools may use different mechanisms for resource management. When a user applies for a required resource, the interface corresponding to the resource pool needs to be determined according to the type of the required resource, and the resource pool interface is accessed according to a specific resource application method based on the management mechanism of the corresponding resource pool, so that the resource application is realized. However, this method requires the user to apply for resources by using a specific method under different resource requirements, which is inefficient and inconvenient to use, resulting in poor user experience.
Therefore, how to solve the above problems is a great concern for those skilled in the art.
Disclosure of Invention
The application aims to provide a resource management method, a resource management system, an electronic device and a computer readable storage medium, which improve the working efficiency and the user experience.
In order to achieve the above object, the present application provides a resource management method, including:
acquiring a resource application request by using a universal interface, and automatically determining the resource type and the application quantity corresponding to a target resource in the resource application request through analysis;
detecting whether available resources with the quantity larger than the application quantity exist in the sub-resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources;
if the available resources with the quantity larger than the application quantity exist in the sub-resource pool, directly distributing the corresponding available resources for the initiator of the resource application request, and updating a resource management linked list corresponding to the sub-resource pool;
and if the available resources with the number larger than the application number do not exist in the child resource pool, applying for the target resource from the parent resource pool.
Optionally, the applying for the target resource from the parent resource pool includes:
searching whether available resources corresponding to the target resource type and larger than the application number exist in the parent resource pool;
if yes, directly distributing corresponding available resources for the initiator of the resource application request;
if not, searching sequentially upwards until finding available resources which correspond to the target resource type and are larger than the application number.
Optionally, the sequentially searching upwards until finding the available resources corresponding to the target resource type and greater than the application number includes:
and if the available resources corresponding to the target resource type and larger than the application quantity are not found in the top resource pool, performing resource application in other sub-resource pools of the top resource pool.
Optionally, after the resource application is performed in the other sub resource pools of the top resource pool, the method further includes:
if available resources which correspond to the target resource type and are larger than the application number are not found in other sub resource pools of the top resource pool, adding the resource application request into a waiting queue;
and after detecting that the resources are released, if the released resources are the available resources, awakening the resource application request and performing resource allocation for an initiator of the resource application request.
Optionally, the method further includes:
when a resource release request is received, releasing the current released resource to the corresponding sub-resource pool;
judging whether a waiting queue corresponding to the sub-resource pool has a resource application request to be processed or not;
if the resource application requests to be processed exist, determining resources to be allocated corresponding to the resource application requests, and judging whether resources matched with the currently released resources exist in the resources to be allocated;
if so, awakening the corresponding target resource application request, and distributing the current released resource to the initiator of the target resource application request.
Optionally, after allocating the currently released resource to the initiator of the target resource application request, the method further includes:
judging whether the number of available resources of the current sub-resource pool is greater than the initial number of resources;
if yes, releasing the redundant resources exceeding the initial resource number into the father resource pool, and updating the available resource number in the corresponding resource management linked list.
To achieve the above object, the present application provides a resource management system, including:
the resource determining module is used for acquiring a resource application request by using a universal interface and automatically determining the resource type and the application number corresponding to a target resource in the resource application request through analysis;
the resource detection module is used for detecting whether the available resources with the number larger than the application number exist in the sub resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources;
a resource allocation module, configured to directly allocate, if there are available resources in the sub-resource pool greater than the application number, corresponding available resources to an initiator of the resource application request, and update a resource management linked list corresponding to the sub-resource pool;
and the resource application module is used for applying the target resource to the parent resource pool if the available resources with the number larger than the application number do not exist in the child resource pool.
Optionally, the method further includes:
the resource release module is used for acquiring all resource application requests to be processed currently after receiving the resource release requests and determining resources to be allocated corresponding to the resource application requests;
the resource matching module is used for judging whether resources matched with the resources to be released corresponding to the resource release request exist in the resources to be distributed; and if so, directly distributing the resources to be released to the corresponding request initiator.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of any of the resource management methods disclosed above when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the resource management methods disclosed in the foregoing.
According to the above scheme, the resource management method provided by the application comprises the following steps: acquiring a resource application request by using a universal interface, and automatically determining the resource type and the application quantity corresponding to a target resource in the resource application request through analysis; detecting whether available resources with the quantity larger than the application quantity exist in the sub-resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources; if the available resources with the quantity larger than the application quantity exist in the sub-resource pool, directly distributing the corresponding available resources for the initiator of the resource application request, and updating a resource management linked list corresponding to the sub-resource pool; and if the available resources with the number larger than the application number do not exist in the child resource pool, applying for the target resource from the parent resource pool. According to the method, the concrete data objects are abstracted in advance according to the resources and stored in the father resource pool, and the child resource pool is obtained by inheriting the father resource pool according to different resource types. When a user needs to apply for resources, the application request can be directly sent through the provided universal interface, and only the resource type and the application number need to be specified in the request, so that the resource can be searched and distributed in the corresponding child resource pool or parent resource pool, the working flow of the user when applying for different resources is unified and simplified, and the working efficiency and the user experience are improved.
The application also discloses a resource management system, an electronic device and a computer readable storage medium, which can also achieve the technical effects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a resource management method disclosed in an embodiment of the present application;
FIG. 2 is a flow chart of another resource management method disclosed in the embodiments of the present application;
FIG. 3 is a block diagram of a resource management system according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device disclosed in an embodiment of the present application;
fig. 5 is a block diagram of another electronic device disclosed in the embodiments of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In a conventional resource management scheme, when a user applies for a required resource, an interface corresponding to a resource pool needs to be determined according to the type of the required resource, and the resource pool interface is accessed according to a specific resource application method based on a management mechanism of the corresponding resource pool, so that the resource application is realized.
Therefore, the embodiment of the application discloses a resource management method, which unifies and simplifies the work flow of a user when applying for different resources, and improves the work efficiency and the user experience.
Referring to fig. 1, a resource management method disclosed in an embodiment of the present application includes:
s101: acquiring a resource application request by using a universal interface, and automatically determining the resource type and the application quantity corresponding to a target resource in the resource application request through analysis;
in the embodiment of the application, a resource application request initiated by a user terminal can be acquired through a preset general interface, and the resource application request is automatically analyzed based on a preset analysis rule so as to acquire the resource type and the application number in the resource application request. For example, a user may apply for a memory resource, specify the resource type as a memory in the initiated memory application request, and set the amount of the required memory resource.
S102: detecting whether available resources with the quantity larger than the application quantity exist in the sub-resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources;
in this step, the sub-resource pool of the corresponding type may be determined according to the analyzed resource type, and then whether there is an available resource in the sub-resource pool is searched. Specifically, whether available resources larger than the current application number exist in the sub-resource pool or not can be searched.
It should be noted that, in the embodiment of the present application, various system resources are defined in advance according to different scenes, a specific data type object is abstracted, and is stored in the parent resource pool, so as to implement generalized management of resources. According to different resource types, various types of child resource pools are generated by inheriting a parent resource pool, and a hierarchical relation among the resource pools is established, so that one resource can be distributed in different scenes and independently applied for release.
S103: if the available resources with the quantity larger than the application quantity exist in the sub-resource pool, directly distributing the corresponding available resources for the initiator of the resource application request, and updating a resource management linked list corresponding to the sub-resource pool;
specifically, if there are available resources in the sub-resource pool greater than the current application number, the corresponding available resources may be directly allocated to the initiator of the resource application request, and the resource management linked list corresponding to the sub-resource pool is updated. The resource management linked list is specifically used for recording the use condition of the resources in the corresponding sub-resource pool.
S104: and if the available resources with the number larger than the application number do not exist in the child resource pool, applying for the target resource from the parent resource pool.
It can be understood that if there are no available resources in the child resource pool greater than the currently applied number, the target resource can be applied for the parent resource pool of the current child resource pool.
In specific implementation, whether available resources which correspond to the target resource type and are larger than the application number exist or not can be searched in the parent resource pool; if yes, directly distributing corresponding available resources for the initiator of the resource application request; if not, searching is carried out in the upper stage in sequence until the available resources which correspond to the target resource type and are larger than the application number are searched. For example, if an available resource is not found in the parent resource pool, the available resource can be found upwards stage by stage. And if the available resources corresponding to the target resource type and larger than the application number are not found in the top resource pool, performing resource application in other sub-resource pools of the top resource pool.
As a feasible implementation manner, in the embodiment of the present application, if available resources corresponding to the target resource type and larger than the application number still cannot be found in other sub resource pools of the top resource pool, the current resource application request is added to the waiting queue; and after detecting that the resources are released, if the released resources are available resources, awakening the resource application request and distributing the resources for an initiator of the resource application request.
According to the above scheme, the resource management method provided by the application comprises the following steps: acquiring a resource application request by using a universal interface, and automatically determining the resource type and the application quantity corresponding to a target resource in the resource application request through analysis; detecting whether available resources with the quantity larger than the application quantity exist in the sub-resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources; if the available resources with the quantity larger than the application quantity exist in the sub-resource pool, directly distributing the corresponding available resources for the initiator of the resource application request, and updating a resource management linked list corresponding to the sub-resource pool; and if the available resources with the number larger than the application number do not exist in the child resource pool, applying for the target resource from the parent resource pool. According to the method, the concrete data objects are abstracted in advance according to the resources and stored in the father resource pool, and the child resource pool is obtained by inheriting the father resource pool according to different resource types. When a user needs to apply for resources, the application request can be directly sent through the provided universal interface, and only the resource type and the application number need to be specified in the request, so that the resource can be searched and distributed in the corresponding child resource pool or parent resource pool, the working flow of the user when applying for different resources is unified and simplified, and the working efficiency and the user experience are improved.
The embodiment of the application discloses another resource management method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Referring to fig. 2, specifically:
s201: when a resource release request is received, releasing the current released resource to the corresponding sub-resource pool;
in the embodiment of the application, a resource release request sent by a user terminal after the user terminal uses the resources can be received. When a resource release request is received, the currently released resources can be released to the sub-resource pools of the corresponding types, and the number of available resources in the resource management linked list corresponding to the sub-resource pools can be updated.
S202: judging whether a waiting queue corresponding to the sub-resource pool has a resource application request to be processed or not;
s203: if the resource application requests to be processed exist, determining resources to be allocated corresponding to the resource application requests, and judging whether resources matched with the currently released resources exist in the resources to be allocated; if yes, go to step S204;
after the resource release is completed, whether the waiting queue corresponding to the sub-resource pool has the resource application request to be processed or not can be judged. If the resource application request exists, the resources to be allocated corresponding to each resource application request can be respectively determined, and whether the resources matched with the currently released resources exist in the resources to be allocated of each resource application request is further judged.
S204: and awakening the corresponding target resource application request, and distributing the current released resource to an initiator of the target resource application request.
If the resources matched with the current released resources exist in the resources to be distributed, the matched target resource application request can be awakened, and the current released resources are directly distributed to the initiator of the target resource application request. After allocation, the number of available resources in the corresponding resource management linked list may be updated again.
It should be noted that, after the number of available resources is updated, it can be determined whether the number of available resources in the current sub-resource pool is greater than the initial number of resources; if yes, releasing the redundant resources exceeding the initial resource number into the parent resource pool, and further updating the available resource number in the corresponding resource management linked list.
The resource management method provided by the embodiment of the present application is introduced through a specific implementation scenario. Specifically, the embodiment may adopt the C language for programming, the core data structure is a resource pool, the resource pool converts the memory resources such as pages, buffers, and the like reserved by the module into data objects of different formats according to actual requirements, and the data objects can be directly obtained from the resource pool whenever the resources need to be applied, and then released back to the resource pool after the use is finished.
In this embodiment, the structure definition of the resource pool may specifically include: the resource management linked list is used for recording the use condition of the data object resources in the resource pool; a lock for protecting resource objects in the resource pool from being used simultaneously; two index member variables for recording the number of available resources and the number allocated respectively; the waiting queue is used for writing the corresponding application request into the queue when the applied resource is insufficient; a pointer pointing to the parent resource pool and used for representing the inheritance relationship between the resource pool and the parent resource pool; the initial resource number of the resource pool; a list of pointers to the sub-resource pool.
On the basis of the above-defined resource pool structure, the processing flow of the resource application includes: if the resources exist in the sub-resource pool of the corresponding type and the number is larger than the number of the resource application, the number of the available and allocated resources is updated, and the required resource objects are picked from the data chain table for resource allocation; if the child resource pool does not have enough resources, the existing resources can be allocated first, and then the remaining required number is applied to the parent resource pool; if the parent resource pool has enough resource quantity, the applied resources are distributed in the same way; if no available resource is found in the top resource pool, the top resource pool can try to obtain from other sub resource pools; and if the resource cannot be acquired finally, adding the corresponding application request into the waiting queue. And if the corresponding resources are released in the subsequent process, awakening the corresponding application request from the waiting queue and allocating the corresponding resources to the application request.
On the basis of the above-defined resource pool structure, the processing flow of resource release includes: the released resources are put back into the corresponding resource pools, and the number of the available and allocated resource objects is updated; and if the waiting queue of the resource pool is not empty, judging whether the released resources meet the application request in the waiting queue. If the number of available resources in the resource pool is detected to be larger than the initial number of resources when the resources are released, the redundant resources are released to the ancestor pool, and the number of the available and allocated resources is updated again.
In the embodiment of the application, various complex types of resources can be managed more conveniently through the generalized management of the resources. In addition, a hierarchical relation among resource pools is established, so that one resource can be independently applied and released in different scenes, and high efficiency can be achieved in large data processing and high concurrency scenes. In the process of resource application and release, a user only needs to call a universal interface, so that the method is easy to implement and has high efficiency and portability.
In the following, a resource management system provided by an embodiment of the present application is introduced, and a resource management system described below and a resource management method described above may be referred to each other.
Referring to fig. 3, a resource management system provided in an embodiment of the present application includes:
a resource determining module 301, configured to obtain a resource application request through a universal interface, and automatically determine a resource type and an application number corresponding to a target resource in the resource application request through analysis;
a resource detection module 302, configured to detect whether there are available resources greater than the application number in the sub resource pool of the corresponding type according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources;
a resource allocation module 303, configured to directly allocate, if there are available resources in the sub-resource pool greater than the application number, corresponding available resources to the initiator of the resource application request, and update a resource management linked list corresponding to the sub-resource pool;
a resource applying module 304, configured to apply for the target resource from the parent resource pool if there is no available resource in the child resource pool that is greater than the application number.
For the specific implementation process of the modules 301 to 304, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
On the basis of the foregoing embodiment, as a preferred implementation, the resource management system provided in the embodiment of the present application may further include:
the resource release module is used for acquiring all resource application requests to be processed currently after receiving the resource release requests and determining resources to be allocated corresponding to the resource application requests;
the resource matching module is used for judging whether resources matched with the resources to be released corresponding to the resource release request exist in the resources to be distributed; and if so, directly distributing the resources to be released to the corresponding request initiator.
The present application further provides an electronic device, and as shown in fig. 4, an electronic device provided in an embodiment of the present application includes:
a memory 100 for storing a computer program;
the processor 200, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 100 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 200 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and provides computing and controlling capability for the electronic device, and when executing the computer program stored in the memory 100, the resource management method disclosed in any of the foregoing embodiments may be implemented.
On the basis of the above embodiment, as a preferred implementation, referring to fig. 5, the electronic device further includes:
and an input interface 300 connected to the processor 200, for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 100 under the control of the processor 200. The input interface 300 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or a button, a track ball or a touch pad arranged on a terminal shell, or a keyboard, a touch pad or a mouse, etc.
And a display unit 400 connected to the processor 200 for displaying data processed by the processor 200 and for displaying a visualized user interface. The display unit 400 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like.
And a network port 500 connected to the processor 200 for performing communication connection with each external terminal device. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like.
While FIG. 5 shows only an electronic device having the assembly 100 and 500, those skilled in the art will appreciate that the configuration shown in FIG. 5 does not constitute a limitation of the electronic device, and may include fewer or more components than shown, or some components may be combined, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium has stored thereon a computer program which, when executed by a processor, implements the resource management method disclosed in any of the foregoing embodiments.
According to the method and the device, concrete data objects are abstracted in advance according to resources and stored in a father resource pool, and according to different resource types, a child resource pool is obtained by inheriting the father resource pool. When a user needs to apply for resources, the user can directly send a request through a provided universal interface, and only needs to specify the resource type and the application number in the request, so that resource searching and allocation can be performed in the corresponding child resource pool or parent resource pool, the working process of the user when applying for different resources is unified and simplified, and the working efficiency and the user experience are improved.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A method for resource management, comprising:
acquiring a resource application request by using a universal interface, and automatically determining the resource type and the application quantity corresponding to a target resource in the resource application request through analysis;
detecting whether available resources with the quantity larger than the application quantity exist in the sub-resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources;
if the available resources with the quantity larger than the application quantity exist in the sub-resource pool, directly distributing the corresponding available resources for the initiator of the resource application request, and updating a resource management linked list corresponding to the sub-resource pool;
and if the available resources with the number larger than the application number do not exist in the child resource pool, applying for the target resource from the parent resource pool.
2. The method of claim 1, wherein the applying for the target resource from the parent resource pool comprises:
searching whether available resources corresponding to the target resource type and larger than the application number exist in the parent resource pool;
if yes, directly distributing corresponding available resources for the initiator of the resource application request;
if not, searching sequentially upwards until finding available resources which correspond to the target resource type and are larger than the application number.
3. The method according to claim 2, wherein the sequentially searching up until finding the available resources corresponding to the target resource type and greater than the requested number comprises:
and if the available resources corresponding to the target resource type and larger than the application quantity are not found in the top resource pool, performing resource application in other sub-resource pools of the top resource pool.
4. The method for resource management according to claim 3, wherein after the resource application is made in other sub-resource pools of the top-level resource pool, the method further comprises:
if available resources which correspond to the target resource type and are larger than the application number are not found in other sub resource pools of the top resource pool, adding the resource application request into a waiting queue;
and after detecting that the resources are released, if the released resources are the available resources, awakening the resource application request and performing resource allocation for an initiator of the resource application request.
5. The resource management method according to any one of claims 1 to 4, further comprising:
when a resource release request is received, releasing the current released resource to the corresponding sub-resource pool;
judging whether a waiting queue corresponding to the sub-resource pool has a resource application request to be processed or not;
if the resource application requests to be processed exist, determining resources to be allocated corresponding to the resource application requests, and judging whether resources matched with the currently released resources exist in the resources to be allocated;
if so, awakening the corresponding target resource application request, and distributing the current released resource to the initiator of the target resource application request.
6. The method of claim 5, wherein after the allocating the currently released resource to the initiator of the target resource application request, the method further comprises:
judging whether the number of available resources of the current sub-resource pool is greater than the initial number of resources;
if yes, releasing the redundant resources exceeding the initial resource number into the father resource pool, and updating the available resource number in the corresponding resource management linked list.
7. A resource management system, comprising:
the resource determining module is used for acquiring a resource application request by using a universal interface and automatically determining the resource type and the application number corresponding to a target resource in the resource application request through analysis;
the resource detection module is used for detecting whether the available resources with the number larger than the application number exist in the sub resource pool of the corresponding type or not according to the resource type; the child resource pool is a resource pool obtained by inheriting a parent resource pool according to different resource types, and the parent resource pool comprises abstract objects corresponding to all resources;
a resource allocation module, configured to directly allocate, if there are available resources in the sub-resource pool greater than the application number, corresponding available resources to an initiator of the resource application request, and update a resource management linked list corresponding to the sub-resource pool;
and the resource application module is used for applying the target resource to the parent resource pool if the available resources with the number larger than the application number do not exist in the child resource pool.
8. The resource management system of claim 7, further comprising:
the resource release module is used for acquiring all resource application requests to be processed currently after receiving the resource release requests and determining resources to be allocated corresponding to the resource application requests;
the resource matching module is used for judging whether resources matched with the resources to be released corresponding to the resource release request exist in the resources to be distributed; and if so, directly distributing the resources to be released to the corresponding request initiator.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the resource management method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the resource management method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011147016.7A CN112269659A (en) | 2020-10-23 | 2020-10-23 | Resource management method, system, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011147016.7A CN112269659A (en) | 2020-10-23 | 2020-10-23 | Resource management method, system, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112269659A true CN112269659A (en) | 2021-01-26 |
Family
ID=74342103
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011147016.7A Pending CN112269659A (en) | 2020-10-23 | 2020-10-23 | Resource management method, system, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112269659A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113254223A (en) * | 2021-07-14 | 2021-08-13 | 苏州浪潮智能科技有限公司 | Resource allocation method and system after system restart and related components |
CN113553195A (en) * | 2021-09-22 | 2021-10-26 | 苏州浪潮智能科技有限公司 | Memory pool resource sharing method, device, equipment and readable medium |
CN113742061A (en) * | 2021-07-30 | 2021-12-03 | 苏州浪潮智能科技有限公司 | Resource management method, system, storage medium and equipment |
CN114356586A (en) * | 2022-03-17 | 2022-04-15 | 飞腾信息技术有限公司 | Processor and electronic equipment |
CN115208764A (en) * | 2022-07-27 | 2022-10-18 | 济南浪潮数据技术有限公司 | Resource pool-based request response method, device and medium thereof |
CN115269207A (en) * | 2022-09-29 | 2022-11-01 | 浙江省公众信息产业有限公司无线运营分公司 | Method and system for allocating resources to vCPE network elements |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180041449A1 (en) * | 2016-08-08 | 2018-02-08 | Bank Of America Corporation | Resource assignment system |
CN111338786A (en) * | 2019-08-19 | 2020-06-26 | 海通证券股份有限公司 | Quota management method and device for cloud platform resources and computer equipment |
CN111694649A (en) * | 2020-06-12 | 2020-09-22 | 北京字节跳动网络技术有限公司 | Resource scheduling method and device, computer equipment and storage medium |
-
2020
- 2020-10-23 CN CN202011147016.7A patent/CN112269659A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180041449A1 (en) * | 2016-08-08 | 2018-02-08 | Bank Of America Corporation | Resource assignment system |
CN111338786A (en) * | 2019-08-19 | 2020-06-26 | 海通证券股份有限公司 | Quota management method and device for cloud platform resources and computer equipment |
CN111694649A (en) * | 2020-06-12 | 2020-09-22 | 北京字节跳动网络技术有限公司 | Resource scheduling method and device, computer equipment and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113254223A (en) * | 2021-07-14 | 2021-08-13 | 苏州浪潮智能科技有限公司 | Resource allocation method and system after system restart and related components |
CN113742061A (en) * | 2021-07-30 | 2021-12-03 | 苏州浪潮智能科技有限公司 | Resource management method, system, storage medium and equipment |
CN113742061B (en) * | 2021-07-30 | 2023-07-14 | 苏州浪潮智能科技有限公司 | Resource management method, system, storage medium and equipment |
CN113553195A (en) * | 2021-09-22 | 2021-10-26 | 苏州浪潮智能科技有限公司 | Memory pool resource sharing method, device, equipment and readable medium |
CN114356586A (en) * | 2022-03-17 | 2022-04-15 | 飞腾信息技术有限公司 | Processor and electronic equipment |
CN114356586B (en) * | 2022-03-17 | 2022-09-02 | 飞腾信息技术有限公司 | Processor and electronic equipment |
CN115208764A (en) * | 2022-07-27 | 2022-10-18 | 济南浪潮数据技术有限公司 | Resource pool-based request response method, device and medium thereof |
CN115269207A (en) * | 2022-09-29 | 2022-11-01 | 浙江省公众信息产业有限公司无线运营分公司 | Method and system for allocating resources to vCPE network elements |
CN115269207B (en) * | 2022-09-29 | 2022-12-23 | 浙江省公众信息产业有限公司无线运营分公司 | Method and system for allocating resources to vCPE network element |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112269659A (en) | Resource management method, system, electronic equipment and storage medium | |
CN107480198B (en) | Distributed NewSQL database system and full-text retrieval method | |
EP3403177B1 (en) | Managing delivery of code and dependent data using application containers | |
CN110851114A (en) | Business system development method and device, electronic equipment and storage medium | |
CN108874924B (en) | Method and device for creating search service and computer-readable storage medium | |
WO2010015485A1 (en) | Managing gui control auto-advancing | |
CN102254021A (en) | Method for constructing database based on virtual machine management system | |
CN110968305A (en) | Applet visualization generation method, device, equipment and storage medium | |
CN111737221B (en) | Data read-write method, device and equipment of cluster file system and storage medium | |
CN109951553B (en) | Data processing method, system, electronic device and computer readable storage medium | |
CN104303145A (en) | Translation of touch input into local input based on a translation profile for an application | |
US11556468B2 (en) | Multi-ring shared, traversable, and dynamic advanced database | |
CN111078205A (en) | Modular programming method and device, storage medium and electronic equipment | |
CN111797157A (en) | Data processing method and system, electronic equipment and storage medium | |
CN111371851B (en) | Connection method, connection device, electronic equipment and storage medium | |
CN108459842B (en) | Model configuration method and device and electronic equipment | |
CN110569256A (en) | business processing method and device, electronic equipment and storage medium | |
CN110795454A (en) | Service request method, device, server and storage medium | |
CN109739738A (en) | Event log management method, system and relevant apparatus based on HTML5 | |
CN111782717A (en) | Data processing method and system, electronic equipment and storage medium | |
CN112269658B (en) | Composite resource application method and system, electronic equipment and storage medium | |
US20220261489A1 (en) | Capability management method and computer device | |
CN114238391A (en) | Data paging query method and device, electronic equipment and storage medium | |
CN115270941A (en) | Method, device and equipment for training data classification model and storage medium | |
CN111625221B (en) | Version control method, device, equipment and medium applied to integrated development environment |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210126 |
|
RJ01 | Rejection of invention patent application after publication |