Resource management method, resource management system, and electronic equipment
By introducing a global resource manager and two servers into the resource management system, unified management and scheduling of local and remote GPU resources is solved, and the problem that users cannot access local and remote GPU resources at the same time is solved, reducing resource waste and cost, and improving resource utilization.
Patent Information
- Application Number
- CN202210646362.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-06-08
AI Technical Summary
The prior art cannot realize that users can directly access local GPU resources and remote GPU resources, resulting in waste of resources and high costs.
By introducing a global resource manager and two servers into the resource management system, using local packaging libraries and simulated kernel drivers, unified management and scheduling of local and remote resources can be achieved. The user determines the target resource path based on permissions and resource quotas through the API request issued by the client, and calls the corresponding resource through local or remote simulation kernel drivers.
It enables users to flexibly select local or remote resources to respond to API requests, reducing resource waste and cost, while improving resource utilization and management efficiency.
Smart Images

Figure CN115098248B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer technology, and more specifically, to a resource management method and a resource management system, and an electronic device. Background Art
[0002] With the development of artificial intelligence technology and image processing technology, the industry's demand for graphics processing unit (GPU) computing resources is growing. However, with the increase in hardware costs and the growth of single GPU computing power, the use of one or more GPUs by a single user for computing tasks is not only costly, but also wastes resources. In the existing technology, GPU resources can be shared to a certain extent through pooling or virtualization technology, but it is impossible to meet the needs of customers who can directly access local GPU resources and remote GPU resources. Therefore, it is necessary to propose a new resource management solution. Summary of the invention
[0003] The purpose of the present invention is to provide a resource management method, a resource management system, and an electronic device, which can support direct access to local resources and access to remote resources.
[0004] According to the first aspect of the present invention, a resource management method is provided. The resource management method is applied to a resource management system, which includes a first server, a second server, and a global resource manager; the first server is installed with a client, a local packaging library, and a local simulation kernel driver; the second server is installed with a server and a remote simulation kernel driver; the resource management method includes: the local packaging library obtains an API request issued by a user through the client of the first server, and determines the target resource path corresponding to the API request; wherein the local packaging library is a packaging function library of local resources, and the local resources are resources mounted on the first server; when the target resource path is a local resource path, the local packaging library submits the API request to the local simulation kernel driver , the local simulation kernel driver calls the local resource to execute the API request; wherein, the local simulation kernel driver is a virtual abstraction of the standard kernel driver of the local resource in the first server; when the target resource path is a remote resource path, the local wrapper library sends the API request to the server of the second server, submits the API request to the remote simulation kernel driver through the server of the second server, and the remote simulation kernel driver calls the remote resource to execute the API request; wherein, the second server is the server pointed to by the remote resource path, the remote resource is a resource mounted on the second server, and the remote simulation kernel driver is a virtual abstraction of the standard kernel driver of the remote resource in the second server.
[0005] Optionally, the local wrapper library determines the target resource path corresponding to the API request, including: negotiating with a local simulation kernel driver and / or a global resource manager to determine the target resource path.
[0006] Optionally, the method also includes: the local wrapper library authenticates the user before determining the target resource path corresponding to the API request, and obtains the user's permission information if the user identity authentication is passed; the user's permission information includes at least one of resource quantity permission and resource level permission; the local wrapper library determines the target resource path corresponding to the API request, including: negotiating with the local simulation kernel driver and / or the global resource manager to determine the target resource path based on the user's permission information.
[0007] Optionally, the method also includes: before determining the target resource path corresponding to the API request, the local packaging library authenticates the user, and obtains the user's permission information if the user identity authentication is passed; the user's permission information includes resource quantity permission, resource level permission, and resource path permission; the local packaging library determines the target resource path corresponding to the API request, including: when the user's resource path permissions only include local resource path permissions, the local resource path is determined as the target resource path; when the user's resource path permissions only include remote resource path permissions, a remote resource path is determined as the target resource path through negotiation with the global resource manager based on the user's resource quantity permissions and resource level permissions; when the user's resource path permissions include both local resource path permissions and remote resource path permissions, the target resource path is determined through negotiation with the local simulation kernel driver and the global resource manager based on the user's resource quantity permissions and resource level permissions.
[0008] Optionally, the method also includes: when the target resource path is a local resource path, the local wrapper library adds verification information to the API request before submitting the API request to the local simulation kernel driver; the local simulation kernel driver calls local resources to execute the API request, including: verifying the API request, and when the API request passes the verification, calling local resources to execute the API request.
[0009] Optionally, the local simulation kernel driver calls local resources to execute the API request, including: determining the execution priority of the API request based on the request type of the API request, a mapping relationship between a pre-configured request type and an execution priority; and calling local resources to execute the API request according to the execution priority of the API request.
[0010] Optionally, the method also includes: the local wrapper library determines the resource quota corresponding to the API request; when the target resource path is a local resource path, the local simulation kernel driver calls local resources to execute the API request, including: calling local resources within the amount of the resource quota to execute the API request; when the target resource path is a remote resource path, the remote simulation kernel driver calls remote resources to execute the API request, including: calling remote resources within the amount of the resource quota to execute the API request.
[0011] Optionally, the local wrapper library determines the resource quota corresponding to the API request, including: negotiating with a local simulation kernel driver and / or a global resource manager to determine the resource quota corresponding to the API request.
[0012] Optionally, the local resource and the remote resource are image processors.
[0013] According to a second aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps performed by the first server in the resource management method according to any one of the first aspects of the present invention are implemented.
[0014] According to a third aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps performed by the second server in the resource management method according to any one of the first aspects of the present invention are implemented.
[0015] According to a fourth aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps performed by the global resource manager in the resource management method according to any one of the first aspects of the present invention are implemented.
[0016] According to a fifth aspect of the present invention, a resource management system is provided. The resource management system includes a first server, a second server, and a global resource manager; the first server includes a first processor and a first memory, a first computer program is stored in the first memory, and when the first computer program is executed by the first processor, the steps performed by the first server in the resource management method described in any one of the first aspects of the present invention are implemented; the second server includes a second processor and a second memory, a second computer program is stored in the second memory, and when the second computer program is executed by the second processor, the steps performed by the second server in the resource management method described in any one of the first aspects of the present invention are implemented; the global resource manager includes a third processor and a third memory, a third computer program is stored in the third memory, and when the third computer program is executed by the third processor, the steps performed by the global resource manager in the resource management method described in any one of the first aspects of the present invention are implemented.
[0017] The resource management method, resource management system and electronic device of the present invention can support users to directly access local resources and remote resources.
[0018] The resource management method, resource management system, and electronic device of the present invention provide local resource paths and remote resource paths, so that local resources and remote resources form a unified resource pool, and can flexibly select local resources and remote resources to respond to user API requests, thereby meeting the various needs of different users.
[0019] The resource management method, resource management system, and electronic device of the present invention can be applied to the management of GPU resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0021] Figure 1 is a schematic diagram of a resource management system according to an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of the software architecture of a server according to an embodiment of the present invention;
[0023] Figure 3 The hardware configuration of the server and the global resource manager of the embodiment of the present invention is shown;
[0024] Figure 4 is a step diagram of a resource management method according to an embodiment of the present invention;
[0025] Figure 5 It is a schematic diagram of a resource management method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0027] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0028] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0029] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0030] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0031] <Resource Management System>
[0032] See also Figure 1 As shown, an embodiment of the present invention provides a resource management system.
[0033] The resource management system includes a global resource manager and at least two servers.
[0034] One or more resources are mounted on the server, and the resource may be, for example, a GPU resource.
[0035] The global resource manager communicates with each server to obtain the resource usage of each server and coordinates with the server on the allocation of its mounted resources.
[0036] See also Figure 2 As shown, the software architecture of the server includes a client, a server, a wrapper library, a native library, a simulated kernel driver, and a standard kernel driver for resources.
[0037] The native library is the native function library of the resource, usually provided by the resource manufacturer. The wrapper library is the wrapper function library of the resource, also known as the adapter, which can call the native functions in the native library.
[0038] The standard kernel driver is the standard kernel driver of the resource, usually provided by the resource manufacturer. The simulated kernel driver is a virtual abstraction of the standard kernel driver.
[0039] In one example, the native library includes a user authentication module, a resource negotiation module, and an API execution module. API is an application programming interface, and its full name is "Application Programming Interface". The user authentication module is used to authenticate the user's identity and determine the user's permissions. The resource negotiation module is used to negotiate resource paths and resource quotas with the simulated kernel driver and the global resource manager. The API execution module is used to call the native library to execute API requests.
[0040] In one example, the simulated kernel driver includes a resource management module and a device operation module. The resource management module manages the resources it is responsible for and allocates the resources to users. In one example, if the server does not mount the resources, the resource management module returns the information that no resources are available when receiving the resource negotiation information from the consultation negotiation module. The device operation module is used to call the resources it is responsible for, and can configure the resource space of the resources by operating the standard kernel driver in the kernel state to achieve the purpose of dividing the resources.
[0041] In one example, the resource management system adopts a Client / Server architecture, where the client is responsible for completing the interaction with the user, and the server can receive and respond to the client's instructions, and return the instruction execution results to the client.
[0042] In one example, the server and global resource manager in the resource management system may have the following Figure 3 The hardware configuration shown. The hardware configuration includes a processor 1110, a memory 1120, an interface device 1130, a communication device 1140, a display device 1150 and an input device 1160. The processor 1110 may be, for example, a central processing unit CPU, etc. The memory 1120 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1130 may include, for example, a USB interface, a serial interface, etc. The communication device 1140 may be, for example, capable of wired or wireless communication. The display device 1150 may be, for example, a liquid crystal display. The input device 1160 may include, for example, a touch screen, a keyboard, etc. The memory 1120 stores a computer program, and when the computer program is executed by the processor 1110, the steps performed by the first server, or the second server, or the global resource manager in the embodiment of the method of the present invention may be implemented.
[0043] <Resource Management Method>
[0044] See below Figure 4 and Figure 5 As shown, the resource management method provided by the embodiment of the present invention is described.
[0045] This method can be applied to Figure 1 The resource management system shown. Any one of the multiple servers is regarded as the first server, and the management method of the embodiment of the present invention is explained. For the first server itself, the resources mounted by itself are local resources, and the resources mounted by other servers are remote resources. For the convenience of distinction, in the following text, the packaging library of the first server is referred to as the "local packaging library", the native library of the first server is referred to as the "local native library", the simulation kernel driver of the first server is referred to as the "local simulation kernel driver", the standard kernel driver of the first server is referred to as the "local standard kernel driver", the simulation kernel driver of the second server is referred to as the "remote simulation kernel driver", and the standard kernel driver of the second server is referred to as the "remote standard kernel driver". The local simulation kernel driver is a virtual abstraction of the standard kernel driver of local resources in the first server, and the remote simulation kernel driver is a virtual abstraction of the standard kernel driver of remote resources in the second server.
[0046] S100: The local packaging library obtains an API request sent by a user through a client of a first server, and determines a target resource path corresponding to the API request.
[0047] In one example, before determining the target resource path corresponding to the API request, the local packaging library authenticates the user, and obtains the user's permission information if the user identity authentication is passed. The user's permission information includes at least one of resource quantity permission and resource level permission. In one example, the user authentication module of the local packaging library authenticates the user, and obtains the user's permission information if the user identity authentication is passed.
[0048] In one example, the resource management system is preset with a negotiation mechanism, and the local packaging library can negotiate with the local simulation kernel driver and / or the global resource manager to determine the target resource path based on the preset negotiation mechanism. In one example, the resource negotiation module of the local packaging library negotiates with the local simulation kernel driver and / or the global resource manager to determine the target resource path.
[0049] In one example, determining the target resource path corresponding to the API request includes: when the user's resource path permissions only include local resource path permissions, determining the local resource path as the target resource path. When the user's resource path permissions only include remote resource path permissions, negotiating with the global resource manager to determine a remote resource path as the target resource path based on the user's resource quantity permissions and resource level permissions. When the user's resource path permissions include both local resource path permissions and remote resource path permissions, negotiating with the local simulation kernel driver and the global resource manager to determine the target resource path based on the user's resource quantity permissions and resource level permissions.
[0050] In one example, the method further includes: the local wrapper library determines the resource quota corresponding to the API request. In one example, the resource management system is preset with a negotiation mechanism, and the local wrapper library can negotiate with the local simulated kernel driver and / or the global resource manager to determine the resource quota corresponding to the API request based on the preset negotiation mechanism. In one example, the resource negotiation module of the local wrapper library negotiates with the local simulated kernel driver and / or the global resource manager to determine the resource quota corresponding to the API request.
[0051] In one example, determining the resource quota corresponding to the API request includes: when the target resource path is a local resource path, negotiating with the local simulation kernel driver to determine the resource quota corresponding to the API request, and the local simulation kernel driver will reserve the resource quota to facilitate the local simulation kernel driver to execute the API request later. When the target resource path is a local resource path, negotiating with the global resource manager to determine the resource quota corresponding to the API request, the global resource manager and the remote simulation kernel driver of the second server apply to reserve the resource quota to facilitate the remote simulation kernel driver to execute the API request later.
[0052] For example, if the resource is a GPU, the user's resource path permissions include both local resource path permissions and remote resource path permissions, and the user's resource quantity permissions are 2 units, where the resource level permission corresponding to the first unit is high, that is, the first unit can use a GPU with higher performance, and the resource level permission corresponding to the second unit is low, that is, the second unit can only use a GPU with lower performance. Based on the user's resource quantity permissions, resource level permissions, the performance level and current usage of the GPU mounted on the first server, and the performance level and current usage of the GPU mounted on other servers in the system, the target resource path and resource quota corresponding to the API request are negotiated and determined.
[0053] S200: When the target resource path is a local resource path, the local packaging library submits the API request to the local simulation kernel driver, and the local simulation kernel driver calls the local resource to execute the API request.
[0054] When the target resource path is a local resource path, the local packaging library adds verification information to the API request before submitting the API request to the local simulated kernel driver. The local simulated kernel driver calls local resources to execute the API request, including: verifying the API request, and calling local resources to execute the API request when the API request passes the verification. If the user bypasses the local packaging library and directly sends an API request to the local simulated kernel driver, since there is no verification information in the API request, it will not pass the verification of the local simulated kernel driver and will be rejected by the local simulated kernel driver, thereby preventing users from bypassing the local packaging library to directly use local resources and ensuring that the process of users using local resources is controlled.
[0055] In the case where the target resource path is a local resource path, the local simulation kernel driver calls the local resource to execute the API request, including: calling the local resource to execute the API request within the resource quota.
[0056] S300: When the target resource path is a remote resource path, the local packaging library sends the API request to the server of the second server, and the server of the second server submits the API request to the remote simulation kernel driver, which calls the remote resource to execute the API request. The second server is the server pointed to by the remote resource path.
[0057] In the case where the target resource path is a remote resource path, the remote simulation kernel driver calls the remote resource to execute the API request, including: calling the remote resource to execute the API request within the amount of the resource quota.
[0058] The resource management method of the embodiment of the present invention provides a local resource path and a remote resource path, so that local resources and remote resources form a unified resource pool, and can flexibly select local resources and remote resources to respond to user API requests, thereby meeting user needs for accessing local resources and remote resources.
[0059] The resource management method of the embodiment of the present invention not only provides remote resources to users, but also supports users to directly access local resources. Supporting users to directly access local resources can ensure that users can implement some special functions. For example, when running debugger and profiler related functions, it is necessary to directly access local resources to implement them. Supporting users to directly access local resources also facilitates users to conduct in-depth analysis. For example, when it is necessary to conduct in-depth analysis of the performance of application algorithms for academic research and other purposes, in order to obtain conclusions that can be reproduced in other non-resource pooling environments, it is also necessary to conduct relevant tests and research directly on local resources.
[0060] The resource management method of the embodiment of the present invention designs a pure software-level resource pooling solution to build a unified resource pool including local resources and remote resources, allowing users to use local resources or remote resources at any granularity without perception.
[0061] The resource management method of the embodiment of the present invention integrates local resources and remote resources into unified management, improves overall resource utilization, and reduces costs.
[0062] The resource management method of the embodiment of the present invention supports flexible resource scheduling strategies, and implements flexible scheduling of local resources and remote resources through simulation kernel driving and global resource management.
[0063] The resource management method of the embodiment of the present invention provides a unified management view for local resources and remote resource bodies, thereby reducing the management cost of administrators.
[0064] A complete example of the resource management method according to an embodiment of the present invention is given below:
[0065] P101. The client of the first server issues an API request in response to a user instruction.
[0066] P102. The local packaging library of the first server intercepts the API request, and the user authentication module of the local packaging library authenticates the user, and obtains the user's permission information if the user authentication passes.
[0067] P103. When the user identity authentication is passed, the resource negotiation module of the local packaging library negotiates with the resource management module of the local simulation kernel driver and / or the global resource manager based on the preset negotiation mechanism to determine the target resource path corresponding to the API request.
[0068] P104. When the target resource path is a local resource path, the API execution module of the local wrapper library adds verification information to the API request, and then submits the API request to the local simulation kernel driver through the local native library.
[0069] After receiving the API request, the device operation module of the local simulation kernel driver verifies the received API request. If the verification is successful, the device operation module of the local simulation kernel driver calls the local resource through the local standard kernel driver to execute the API request.
[0070] If the verification fails, the device operation module of the local simulation kernel driver returns a "failure" message to avoid local resource leakage.
[0071] P105. When the target resource path is a remote resource path, the API execution module of the local packaging library sends the API request to the service end of the second server.
[0072] The server of the second server submits the API request to the remote simulation kernel driver through the remote native library, and the device operation module of the remote simulation kernel driver calls the remote resource through the remote standard kernel driver to execute the API request.
[0073] An embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps performed by the first server in any of the aforementioned method embodiments are implemented.
[0074] An embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps performed by the second server in any of the aforementioned method embodiments are implemented.
[0075] An embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps performed by the global resource manager in any of the aforementioned method embodiments are implemented.
[0076] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps performed by the first server in any of the aforementioned method embodiments are implemented.
[0077] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps performed by the second server in any of the aforementioned method embodiments are implemented.
[0078] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps performed by the global resource manager in any of the aforementioned method embodiments are implemented.
[0079] An embodiment of the present invention provides a resource management system, including a first server, a second server and a global resource manager.
[0080] The first server includes a first processor and a first memory, wherein a first computer program is stored in the first memory, and when the first computer program is executed by the first processor, steps are performed by the first server in any of the aforementioned method embodiments.
[0081] The end server includes a second processor and a second memory, wherein a second computer program is stored in the second memory, and when the second computer program is executed by the second processor, the steps performed by the second server in any of the aforementioned method embodiments are implemented.
[0082] The global resource manager includes a third processor and a third memory, wherein a third computer program is stored in the third memory, and when the third computer program is executed by the third processor, the steps performed by the global resource manager in any of the aforementioned method embodiments are performed.
[0083] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0084] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0085] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0086] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0087] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0088] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0089] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0090] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0091] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A resource management method, characterized in that: Applied to a resource management system, the resource management system includes a first server, a second server and a global resource manager; the first server is installed with a client, a local packaging library and a local simulation kernel driver; The second server is installed with a server and a remote simulation kernel driver; The resource management method comprises: The local packaging library obtains an API request sent by a user through a client of the first server, and determines a target resource path corresponding to the API request; wherein the local packaging library is a packaging function library of local resources, and the local resources are resources mounted on the first server; In the case where the target resource path is a local resource path, the local wrapper library submits the API request to a local simulation kernel driver, and the local simulation kernel driver calls a local resource to execute the API request; wherein the local simulation kernel driver is a virtual abstraction of a standard kernel driver of a local resource in the first server; When the target resource path is a remote resource path, the local wrapper library sends the API request to the server of the second server, submits the API request to the remote simulation kernel driver through the server of the second server, and the remote simulation kernel driver calls the remote resource to execute the API request; wherein, the second server is the server pointed to by the remote resource path, the remote resource is the resource mounted on the second server, and the remote simulation kernel driver is the virtual abstraction of the standard kernel driver of the remote resource in the second server.
2. The resource management method according to claim 1, characterized in that: The local packaging library determines the target resource path corresponding to the API request, including: Negotiate with the local emulation kernel driver and / or the global resource manager to determine the target resource path.
3. The resource management method according to claim 1, characterized in that: The method further includes: the local packaging library authenticates the user before determining the target resource path corresponding to the API request, and obtains the user's permission information if the user's identity authentication passes; the user's permission information includes at least one of resource quantity permission and resource level permission; The local wrapper library determines the target resource path corresponding to the API request, including: determining the target resource path through negotiation with the local simulation kernel driver and / or the global resource manager according to the user's permission information.
4. The resource management method according to claim 1, characterized in that: The method further includes: the local packaging library authenticates the user before determining the target resource path corresponding to the API request, and obtains the user's permission information if the user's identity authentication passes; the user's permission information includes resource quantity permission, resource level permission, and resource path permission; The local packaging library determines the target resource path corresponding to the API request, including: When the user's resource path permission only includes the local resource path permission, the local resource path is determined as the target resource path; When the user's resource path permissions only include remote resource path permissions, a remote resource path is determined as the target resource path through negotiation with the global resource manager based on the user's resource quantity permissions and resource level permissions; When the user's resource path permissions include both local resource path permissions and remote resource path permissions, the target resource path is determined through negotiation with the local simulation kernel driver and the global resource manager based on the user's resource quantity permissions and resource level permissions.
5. The resource management method according to claim 1, characterized in that: The method further comprises: when the target resource path is a local resource path, the local wrapper library adds verification information to the API request before submitting the API request to the local simulation kernel driver; The local simulation kernel driver calls local resources to execute the API request, including: verifying the API request, and calling local resources to execute the API request if the API request passes the verification.
6. The resource management method according to claim 1, characterized in that: The local simulation kernel driver calls local resources to execute the API request, including: Determine the execution priority of the API request according to the request type of the API request and the mapping relationship between the pre-configured request type and the execution priority; According to the execution priority of the API request, local resources are called to execute the API request.
7. The resource management method according to claim 1, characterized in that: The method further comprises: the local wrapper library determining a resource quota corresponding to the API request; In the case where the target resource path is a local resource path, the local simulation kernel driver calls local resources to execute the API request, including: calling local resources within the amount of the resource quota to execute the API request; In the case where the target resource path is a remote resource path, the remote simulation kernel driver calls the remote resource to execute the API request, including: calling the remote resource within the amount of the resource quota to execute the API request.
8. The resource management method according to claim 7, characterized in that: The local packaging library determines the resource quota corresponding to the API request, including: Negotiate with the local simulation kernel driver and / or the global resource manager to determine the resource quota corresponding to the API request.
9. The resource management method according to claim 1, characterized in that: The local resource and the remote resource are image processors.
10. An electronic device, characterized in that: It comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps executed by the first server in the resource management method according to any one of claims 1 to 9 are implemented.
11. An electronic device, characterized in that: It comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps executed by the second server in the resource management method according to any one of claims 1 to 9 are implemented.
12. An electronic device, characterized in that: It comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps executed by the global resource manager in the resource management method according to any one of claims 1 to 9 are implemented.
13. A resource management system, characterized in that: comprising a first server, a second server and a global resource manager; The first server comprises a first processor and a first memory, wherein a first computer program is stored in the first memory, and when the first computer program is executed by the first processor, the steps performed by the first server in the resource management method according to any one of claims 1 to 9 are implemented; The second server comprises a second processor and a second memory, wherein a second computer program is stored in the second memory, and when the second computer program is executed by the second processor, the steps performed by the second server in the resource management method according to any one of claims 1 to 9 are implemented; The global resource manager includes a third processor and a third memory, wherein a third computer program is stored in the third memory, and when the third computer program is executed by the third processor, the steps performed by the global resource manager in the resource management method described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Method and apparatus for tracking computing system, and computer readable medium
CN110058987A
Cloud edge cooperation system and cluster resource control method and device
CN112925647A