CN117389752A - Method and device for allocating accelerator resources, computer equipment and storage medium - Google Patents

Method and device for allocating accelerator resources, computer equipment and storage medium Download PDF

Info

Publication number
CN117389752A
CN117389752A CN202311670346.8A CN202311670346A CN117389752A CN 117389752 A CN117389752 A CN 117389752A CN 202311670346 A CN202311670346 A CN 202311670346A CN 117389752 A CN117389752 A CN 117389752A
Authority
CN
China
Prior art keywords
accelerator
user
application
information
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311670346.8A
Other languages
Chinese (zh)
Inventor
朱飞
吴佳欢
陈保文
朱鹏
胡东瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hexin Technology Co ltd
Hexin Technology Suzhou Co ltd
Original Assignee
Hexin Technology Co ltd
Hexin Technology Suzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hexin Technology Co ltd, Hexin Technology Suzhou Co ltd filed Critical Hexin Technology Co ltd
Priority to CN202311670346.8A priority Critical patent/CN117389752A/en
Publication of CN117389752A publication Critical patent/CN117389752A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/33User authentication using certificates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of resource allocation, and discloses an accelerator resource allocation method, an accelerator resource allocation device, computer equipment and a storage medium, wherein the accelerator resource allocation method comprises the following steps: receiving an application for using the accelerator resource, wherein the application carries the identity information of a user and the use time of the accelerator to be used; responding to the application, judging whether an accelerator in an idle state exists in the use time; if the accelerator in the idle state exists, generating an authentication information token based on the identity information and the use time of the user, wherein the authentication information token is used for authenticating the authority and the use time of the user; the invention automatically binds the user information of the accelerator, manages the use of the accelerator, ensures that the use of the accelerator becomes controllable, and ensures that the accelerator resource allocation is more reasonable.

Description

Method and device for allocating accelerator resources, computer equipment and storage medium
Technical Field
The present invention relates to the field of resource allocation technologies, and in particular, to an accelerator resource allocation method, an accelerator resource allocation device, a computer device, and a storage medium.
Background
The accelerator aims at meeting the changing requirements of the modern data center, provides performances far higher than CPU for important workload (including machine learning inference, video transcoding and database searching and analysis), has the functions of adapting to changing acceleration requirements and algorithm standards, accelerating any workload without changing hardware and reducing the total possession cost, and is applied to many enterprises. However, the accelerator is still quite expensive at present, so that the accelerator resources purchased by the enterprise are quite limited, but the required amount of the accelerator resources needed to be used inside the enterprise is quite large relative to the accelerator resources.
In the related art, when using the accelerator resource, the personnel inside the enterprise need to reserve in advance, but the situation that the accelerator needs to be used temporarily cannot be completely solved by going through the resource reservation management flow. In addition, before the use, the user has permission to use all the resources of the accelerator, which causes the use of the resources to be disordered, breaks the work being performed by others when the instant non-reservation task is executed, or causes the fact that the reservation of some people occupies the unused resources at the moment, so that the others cannot use the resources instantly.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus, computer device and storage medium for allocating accelerator resources, so as to solve the problems of unreasonable allocation and inefficiency of accelerator resources when accelerator resources are limited.
In a first aspect, the present invention provides a method for allocating accelerator resources, where the method includes:
receiving an application for using the accelerator resource, wherein the application carries the identity information of a user and the use time of the accelerator to be used;
responding to the application, judging whether an accelerator in an idle state exists in the use time;
if the accelerator in the idle state exists, generating an authentication information token based on the identity information and the use time of the user, wherein the authentication information token is used for authenticating the authority and the use time of the user;
and sending the authentication information token to terminal equipment held by the user so as to authenticate the application of the user when the user uses the accelerator resource.
According to the invention, the user information capable of using the accelerator is automatically bound by carrying the identity information of the user and the accelerator information, whether the accelerator is in an idle state or not is judged in the using time by responding to the using application of the user, the running condition of the accelerator is limited, the use of the accelerator is managed by using the authentication information token, the accelerator is controlled, the situation that the operation of other people is interrupted when the instant non-reservation task is executed or the unused resources at the moment are occupied by reservation of some people, so that the resource allocation of the accelerator is more reasonable, and the efficiency of the resource allocation of the accelerator is further improved.
In an alternative embodiment, before receiving the application for use of the accelerator resource, the method further comprises:
establishing a user information database, wherein the user information database comprises user identity information and department information to which the user belongs;
the accelerators are pre-allocated, and the accelerators available to each department and the using time of the accelerators are determined.
In this way, by pre-allocating accelerators and the usage time of the accelerators usable by each department, the usage of the accelerators is primarily managed, and uncontrollable and chaotic situations caused by random allocation are reduced.
In an alternative embodiment, in response to the application for use, determining whether there is an accelerator in an idle state for a use time includes:
determining accelerator usage right information of a user and a usage time of the accelerator to be used in response to the usage application;
based on the department of the user and the usage time of the accelerator to be used, it is determined whether the accelerator of the department of the user is in an idle state during the usage time.
In the mode, whether the department to which the user belongs is idle in the using time is judged, so that borrowing of resources of other departments is avoided, the controllability of resource allocation is improved, and the fact that the work being carried out by other people is not interrupted when the instant non-reservation task is executed is ensured.
In an alternative embodiment, when the accelerator of the department to which the user belongs is in a non-idle state during the use time, it is determined whether the accelerators of other departments are in an idle state during the use time.
In the mode, when the department to which the user belongs does not have an available accelerator in the using time, the idle accelerators of other departments are temporarily borrowed, so that the task of using the accelerator is ensured to be carried out, the use of the accelerator is controlled, and the management confusion caused by more and more temporary borrowing is avoided.
In an alternative embodiment, the accelerator of the department to which the user belongs is in an idle state during the use time, or when the accelerator of the department to which the user belongs is in a non-idle state during the use time, and when the accelerators of other departments exist in the idle state during the use time, the existence of the accelerator in the idle state is confirmed.
In this way, the allocation is only performed when the home gate is free or other departments are free, so that the work being performed by other people is not interrupted when the instant non-reservation task is executed.
In an alternative embodiment, authenticating a user application for use includes:
Determining the accelerator use permission information of a user corresponding to the authentication information token and the use time of the accelerator required to be used based on the authentication information token;
comparing the accelerator usage right information of the user carried by the authentication information token with the accelerator usage right information of the user carried by the user application, and comparing the usage time of the accelerator required to be used carried by the authentication information token with the usage time information of the accelerator required to be used carried by the user application, wherein the accelerator usage right information carried by the authentication information token is consistent with the accelerator usage right information of the user carried by the user application, and when the usage time information of the accelerator required to be used carried by the authentication information token is consistent with the usage time information of the accelerator required to be used carried by the user application, the accelerator in an idle state is distributed to the user for the use of accelerator resources by the user.
In this way, the use of the resources managed by using the authentication information token is further controllable, so that the situation that the unused resources are occupied by some people and cannot be used by others in real time due to reservation of the unused resources is avoided, and the temporary use does not affect the others.
In an alternative embodiment, when the accelerator usage right information carried by the authentication information token is inconsistent with the accelerator usage right information of the user carried by the usage application of the user, or the usage time information of the accelerator required to be used carried by the authentication information token is inconsistent with the usage time information of the accelerator required to be used carried by the usage application of the user, the user application is confirmed to be not authenticated, and the user application is prompted to be not authenticated.
In this way, the user is facilitated to determine the use of the resource and how to use the resource by informing the user of the reason why the resource cannot be used.
In a second aspect, the present invention provides an accelerator resource allocation apparatus, the apparatus comprising:
the application acquisition module is used for receiving an application for using the accelerator resource, wherein the application carries the identity information of a user and the service time of the accelerator to be used;
the accelerator judging module is used for responding to the application and judging whether the accelerator in an idle state exists in the using time or not;
the authentication token generation module is used for generating an authentication information token based on the identity information and the use time of the user if the accelerator in the idle state exists, wherein the authentication information token is used for authenticating the authority and the use time of the user;
And the identity authentication module is used for sending the authentication information token to terminal equipment held by the user so as to authenticate the application of the user when the user uses the accelerator resource.
In a third aspect, the present invention provides a computer device comprising: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the accelerator resource allocation method of the first aspect or any corresponding implementation mode of the first aspect is executed.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform the accelerator resource allocation method of the first aspect or any of its corresponding embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for allocating accelerator resources according to an embodiment of the present invention.
FIG. 2 is a flow diagram of a cluster detection normal use accelerator according to an embodiment of the invention.
FIG. 3 is a flow chart of a user applying for using other set of idle resources and corresponding approval according to an embodiment of the present invention.
Fig. 4 is a flow diagram of authentication information token detection by a cluster according to an embodiment of the invention.
Fig. 5 is a flow chart of another accelerator resource allocation method according to an embodiment of the invention.
FIG. 6 is a flow diagram of administrator pre-allocation in accordance with an embodiment of the present invention.
Fig. 7 is a flow chart of yet another accelerator resource allocation method according to an embodiment of the invention.
Fig. 8 is a block diagram of a structure of an accelerator resource allocation apparatus according to an embodiment of the present invention.
Fig. 9 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the related art, when using the accelerator resource, the personnel inside the enterprise need to reserve in advance, but the situation that the accelerator needs to be used temporarily cannot be completely solved by going through the resource reservation management flow. In addition, before the use, the user has permission to use all the resources of the accelerator, which causes the use of the resources to be disordered, breaks the work being performed by others when the instant non-reservation task is executed, or causes the fact that the reservation of some people occupies the unused resources at the moment, so that the others cannot use the resources instantly.
In order to solve the foregoing problems, in the embodiments of the present invention, an accelerator resource allocation method is provided for a computer device, and it should be noted that an execution body of the accelerator resource allocation method may be an accelerator resource allocation device, and the accelerator resource allocation device may be implemented by software, hardware, or a combination of software and hardware to form part or all of the computer device, where the computer device may be a terminal, a client, or a server, and the server may be a server, or may be a server cluster formed by multiple servers. In the following method embodiments, the execution subject is a computer device.
The computer equipment in the embodiment is suitable for use situations in which accelerator resources available to enterprises are limited and resource use needs to be managed. The invention provides the accelerator resource allocation method, which automatically binds the user information of the accelerator by carrying the identity information of the user and the accelerator information, judges whether the accelerator is in an idle state in the use time by responding to the use application of the user, limits the operation condition of the accelerator, manages the use of the accelerator by using the authentication information token, ensures that the use of the accelerator becomes controllable, and avoids the situation that the operation of others is interrupted when the instant non-reservation task is executed or the unused resource of some people is occupied at the moment to cause the situation that the others cannot use the accelerator in real time, thereby ensuring more reasonable accelerator resource allocation and further improving the efficiency of accelerator resource allocation.
According to an embodiment of the present invention, there is provided an accelerator resource allocation method embodiment, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.
In this embodiment, an accelerator resource allocation method is provided, which may be used in the above-mentioned computer device, and fig. 1 is a flowchart of the accelerator resource allocation method according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
step S101, receiving an application for using accelerator resources.
In the embodiment of the invention, the application carries the identity information of the user and the service time of the accelerator required to be used.
In one example, the application information includes the identity information of the user, the accelerator resource unit used for application, the detailed information recorded as a board, and how long the application is needed.
Step S102, in response to the application, judging whether the accelerator in the idle state exists in the use time.
In an example, it is first determined whether the user belongs to the department, and if there is an accelerator in an idle state in the use time, screening of other departments is performed if there is no accelerator.
Step S103, if there is an accelerator in an idle state, an authentication information token is generated based on the identity information of the user and the use time.
In the embodiment of the invention, the authentication information token is used for authenticating the authority and the use time of the user.
In one example, an authentication information token with timeliness is generated by combining the user's job number, the required board number and the required duration, and is denoted as license.
Step S104, the authentication information token is sent to the terminal equipment held by the user, so that the user can carry out authentication on the application of the user when the user carries out accelerator resource use.
In an example, the authentication information token license file is sent to the terminal device held by the user in a mail form, the user puts the authentication information token license file under the task directory before running the task, and after submitting, the detection module of the cluster obtains the authentication information token license to obtain the authentication information token license corresponding to the user, the authority authentication, the board number and the use time period, and after the corresponding user and the time detection pass, the real operation of the user is executed.
In one implementation scenario, in the resource reservation system, the user is prompted to the user according to a set of all boards that the user belongs to and limits the user's departments to reserve and use, so that the user can pre-select an effective board. FIG. 2 is a flow diagram of a cluster detection normal use accelerator according to an embodiment of the invention. As shown in fig. 2, when a user needs to use an accelerator through a cluster, a start detection module is developed in the cluster, and when the user submits a task to an accelerator queue in the cluster, the system acquires a department to which the current user belongs through a department information AD system, thereby acquiring a right corresponding to the department and an accelerator board which can be used: if the department has no allocable board, prompting the user to contact a super manager to allocate resources; if there is an assignable board, the board number required by the task submitted by the current user is obtained. After the board numbers required by the tasks submitted by the current user are obtained, the starting detection module searches the information allocated to the department by the administrator for whether the board numbers required to be used exist or not, and the board numbers can be used in the allocated time period: if the board number which needs to be used is available and can be used in the allocated time period, detecting passing, and executing the real operation of the user; if the used board number is not needed or can not be used in the allocated time period, the detection is failed, the time or the use limit is not met, the fact that the use is not available is indicated, and the specific reason is informed.
FIG. 3 is a flow chart of a user applying for using other set of idle resources and corresponding approval according to an embodiment of the present invention. As shown in fig. 3, when the accelerator resources allocated by the user's own department are all being used, and the task priority to be currently executed is urgent, the user may apply for using the allocated and idle boards of other departments through the system. After the user fills out the application condition (application using board detailed information and how long the application needs to be used), the system sends a mail to the responsible person of the target department. After receiving the mail, the target department responsible person confirms the use condition of the accelerator resource of the department, if the accelerator resource can be borrowed to the applicant in the time period, the system clicks the consent application, and after receiving the consent information, the system generates the license with timeliness according to the authentication information distributed by the administrator and the work number, the board number and the time length required to be used of the applicant. And then the license file is sent to the user in the form of mail, and the user puts the license file into a task directory before running the task.
Fig. 4 is a flow diagram of authentication information token detection by a cluster according to an embodiment of the invention. As shown in fig. 4, after the user submits the application, the detection module of the cluster obtains the license to obtain the license corresponding to the user, the authority authentication, the board number and the use time period. After the corresponding submitter and the using time period pass the detection, executing the real job of the user; if the detection is not passed, the prompt is not used, and the specific reason is informed. When the applied license exceeds the application use time period, the license is prompted to be expired and cannot be used.
According to the accelerator resource allocation method, the user information capable of using the accelerator is automatically bound by carrying the identity information of the user and the accelerator information, whether the accelerator in an idle state exists in the using time or not is judged by responding to the using application of the user, the running condition of the accelerator is limited, the use of the accelerator is managed by using the authentication information token, the accelerator is controlled to be used, the phenomenon that the operation of other people is interrupted when an instant non-reservation task is executed, or the situation that the unused resource of some people occupies at the moment and cannot be used by other people in an instant mode is avoided, so that the accelerator resource allocation is more reasonable, and the efficiency of accelerator resource allocation is further improved.
In this embodiment, an accelerator resource allocation method is provided, which may be used in the above-mentioned computer device, and fig. 5 is a flowchart of another accelerator resource allocation method according to an embodiment of the present invention, as shown in fig. 5, where the flowchart includes the following steps:
in step S501, a user information database is established.
In the embodiment of the invention, the user information database contains user identity information and department information to which the user belongs.
Step S502, pre-distributing the accelerators, and determining the accelerators and the using time of the accelerators which can be used by each department.
In one example, FIG. 6 is a flow diagram of an administrator pre-allocation in accordance with an embodiment of the present invention. As shown in fig. 6, the preallocation flow of the administrator includes: a superadministrator will initially be defined, typically given to the responsible person of the maintenance department of the accelerator. The super administrator can sort all accelerator boards, pre-allocate which boards can be used by which departments in which time period in the day (the departments can acquire the AD information of the system), so that each using department can clearly know that the departments can use the resources, after allocation is completed, each allocated using record can generate a unique authority authentication token according to the content to be allocated, and all the authority authentication tokens are stored in the relevant data of the cluster for starting management tasks.
In this way, by pre-allocating accelerators and the usage time of the accelerators usable by each department, the usage of the accelerators is primarily managed, and uncontrollable and chaotic situations caused by random allocation are reduced.
In step S503, an application for using the accelerator resource is received. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S504, in response to the application, judging whether the accelerator in the idle state exists in the use time.
Specifically, the step S504 includes:
in step S5041, in response to the use application, the accelerator usage right information of the user and the usage time of the accelerator to be used are determined.
Step S5042, based on the usage time of the user 'S affiliated department and the accelerator to be used, determines whether the accelerator of the user' S affiliated department is in an idle state during the usage time.
In step S5043, when the accelerator of the department to which the user belongs is in the non-idle state during the use time, it is determined whether the accelerators of other departments are in the idle state during the use time.
In some alternative embodiments, the accelerator of the department to which the user belongs is in an idle state during the use time, or when the accelerator of the department to which the user belongs is in a non-idle state during the use time, and when the accelerators of other departments exist in the idle state during the use time, the existence of the accelerator in the idle state is confirmed.
In an example, in the resource reservation system, the user is prompted to the user according to the set of all the boards that the department to which the user belongs limits the reservation and use, so that the user can pre-select the valid boards. When a user needs to use an accelerator through a cluster, a starting detection module is developed in the cluster, and when the user submits a task to an accelerator queue in the cluster, a system can acquire a department to which the current user belongs through a department information (AD) system, so that the authority corresponding to the department and the usable accelerator board are acquired: if the department has no allocable board, prompting the user to contact a super manager to allocate resources; if there is an assignable board, the board number required by the task submitted by the current user is obtained. After the board numbers required by the tasks submitted by the current user are obtained, the starting detection module searches the information allocated to the department by the administrator for whether the board numbers required to be used exist or not, and the board numbers can be used in the allocated time period: if the board number which needs to be used is available and can be used in the allocated time period, detecting passing, and executing the real operation of the user; if the used board number is not needed or can not be used in the allocated time period, the detection is failed, the time or the use limit is not met, the fact that the use is not available is indicated, and the specific reason is informed.
When the accelerator resources allocated by the user's own department are all in use, and the priority of the task to be executed is urgent, the user can apply for using the allocated and idle boards of other departments through the system. After the user fills out the application condition (application using board detailed information and how long the application needs to be used), the system sends a mail to the responsible person of the target department. After receiving the mail, the target department responsible person confirms the use condition of the accelerator resource of the department, if the accelerator resource can be borrowed to the applicant in the time period, the system clicks the consent application, and after receiving the consent information, the system generates the license with timeliness according to the authentication information distributed by the administrator and the work number, the board number and the time length required to be used of the applicant. And then the license file is sent to the user in the form of mail, and the user puts the license file into a task directory before running the task.
In step S505, if there is an accelerator in an idle state, an authentication information token is generated based on the identity information of the user and the use time. Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S506, the authentication information token is sent to the terminal equipment held by the user, so that the user can be authenticated when using the accelerator resource. Please refer to step S104 in the embodiment shown in fig. 1 in detail, which is not described herein.
According to the accelerator resource allocation method provided by the embodiment, the accelerators usable by each department and the use time of the accelerators are allocated in advance, so that the use of the accelerators is managed preliminarily, and uncontrollable and chaotic caused by random allocation are reduced. By judging whether the department to which the user belongs is idle in the using time, the borrowing of resources of other departments is avoided, the controllability of resource allocation is improved, and the fact that the work being carried out by other people is not interrupted when the instant non-reservation task is executed is ensured. When the user belongs to the department without usable accelerators in the using time, idle accelerators of other departments are temporarily borrowed, so that the task of using the accelerators can be ensured, the use of the accelerators becomes controllable, and the management confusion caused by more and more temporary borrowing is avoided. The allocation can be performed only when the home gate is free or other departments are free, so that the work which is performed by other people is not interrupted when the instant non-reservation task is performed.
In this embodiment, an accelerator resource allocation method is provided, which may be used in the above-mentioned computer device, and fig. 7 is a flowchart of another accelerator resource allocation method according to an embodiment of the present invention, as shown in fig. 7, where the flowchart includes the following steps:
in step S701, an application for using the accelerator resource is received. Please refer to the steps S501 to S503 in the embodiment shown in fig. 5 in detail, which is not described herein.
Step S702, in response to the use application, determines whether there is an accelerator in an idle state during the use time. Please refer to step S502 in the embodiment shown in fig. 5 in detail, which is not described herein.
In step S703, if there is an accelerator in an idle state, an authentication information token is generated based on the identity information of the user and the use time. Please refer to step S503 in the embodiment shown in fig. 5 in detail, which is not described herein.
Step S704, the authentication information token is sent to the user, so that the user can perform authentication on the application of the user when using the accelerator resource.
Specifically, the step S704 includes:
step S7041, based on the authentication information token, determines the accelerator usage permission information of the user corresponding to the authentication information token and the usage time of the accelerator to be used.
Step S7042, comparing the accelerator usage rights information of the user carried by the authentication information token with the accelerator usage rights information of the user carried by the user 'S application, and comparing the usage time of the accelerator to be used carried by the authentication information token with the usage time information of the accelerator to be used carried by the user' S application, when the accelerator usage rights information carried by the authentication information token is consistent with the accelerator usage rights information of the user carried by the user 'S application, and the usage time information of the accelerator to be used carried by the authentication information token is consistent with the usage time information of the accelerator to be used carried by the user' S application, allocating the accelerator in an idle state to the user for the user to use the accelerator resource.
In an alternative embodiment, the accelerator resource allocation method further includes, after step S7042:
step S7043, when the accelerator usage right information carried by the authentication information token is inconsistent with the accelerator usage right information of the user carried by the user 'S usage application, or the usage time information of the accelerator to be used carried by the authentication information token is inconsistent with the usage time information of the accelerator to be used carried by the user' S usage application, confirming that the usage application authentication is not passed, and prompting that the usage application authentication is not passed.
In an example, after the user submits the application, the detection module of the cluster may obtain the license to obtain the license corresponding to the user, the authority authentication, the board number and the usage time period. After the corresponding submitter and the using time period pass the detection, executing the real job of the user; if the detection is not passed, the prompt is not used, and the specific reason is informed. When the applied license exceeds the application use time period, the license is prompted to be expired and cannot be used.
According to the accelerator resource allocation method provided by the embodiment, the used resources are managed by using the authentication information token, so that the use becomes further controllable, the situation that other people cannot use the unused resources in the moment due to reservation of some people is avoided, and the temporary use does not affect other people. By informing the user of the reason that the resource cannot be used, the user can conveniently determine the use condition of the resource and how to use the resource.
The embodiment also provides an accelerator resource allocation device, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides an accelerator resource allocation apparatus, as shown in fig. 8, including:
the application obtaining module 801 is configured to receive an application for using the accelerator resource, where the application carries identity information of a user and a usage time of the accelerator that needs to be used. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
The accelerator judging module 802 is configured to judge whether an accelerator in an idle state exists during a use time in response to a use application. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
An authentication token generation module 803 is configured to generate an authentication information token based on the identity information and the usage time of the user if the accelerator is in an idle state, where the authentication information token is used to authenticate the authority and the usage time of the user. Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
The identity authentication module 804 is configured to send the authentication information token to a terminal device held by the user, so as to authenticate a use application of the user when the user uses the accelerator resource. Please refer to step S104 in the embodiment shown in fig. 1 in detail, which is not described herein.
In some alternative embodiments, the accelerator resource allocation device further comprises:
and the database establishing unit is used for establishing a user information database.
And the accelerator pre-allocation unit is used for pre-allocating the accelerators and determining the accelerators usable by each department and the using time of the accelerators.
In some alternative embodiments, the accelerator determination module 802 includes:
and a use determination unit for determining accelerator use authority information of the user and a use time of the accelerator to be used in response to the use application.
And the first idle judging unit is used for judging whether the accelerator of the department to which the user belongs is in an idle state in the using time based on the department to which the user belongs and the using time of the accelerator to be used.
In some alternative embodiments, the accelerator determination module 802 includes:
and the second idle judging unit is used for judging whether the accelerators of other departments are in idle states or not in the using time when the accelerators of the departments to which the user belongs are in non-idle states in the using time.
In some alternative embodiments, the first idle determination unit and the second idle determination unit include:
And the idle determination subunit is used for determining that the accelerator in the idle state exists when the accelerator in the other departments exists in the use time when the accelerator in the user department is in the idle state or the accelerator in the user department is in the non-idle state in the use time.
In some alternative embodiments, the identity authentication module 804 includes:
and the information authentication unit is used for determining the accelerator use permission information of the user corresponding to the authentication information token and the use time of the accelerator required to be used based on the authentication information token.
And the information comparison unit is used for comparing the accelerator use permission information of the user carried by the authentication information token with the accelerator use permission information of the user carried by the user application, comparing the use time of the accelerator required to be used carried by the authentication information token with the use time information of the accelerator required to be used carried by the user application, and distributing the accelerator in an idle state to the user when the accelerator use permission information of the authentication information token is consistent with the accelerator use permission information of the user carried by the user application and the use time information of the accelerator required to be used carried by the authentication information token is consistent with the use time information of the accelerator required to be used carried by the user application so as to enable the user to use accelerator resources.
In some alternative embodiments, the identity authentication module 804 further includes:
and the authentication failing unit is used for confirming that the use application authentication fails when the accelerator use permission information carried by the authentication information token is inconsistent with the accelerator use permission information of the user carried by the use application of the user or the use time information of the accelerator required to be used carried by the authentication information token is inconsistent with the use time information of the accelerator required to be used carried by the use application of the user, and prompting that the use application authentication fails.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The accelerator resource allocation means in this embodiment is presented in the form of functional units, here referred to as ASIC (Application Specific Integrated Circuit ) circuits, processors and memories executing one or more software or fixed programs, and/or other devices that can provide the above described functionality.
The embodiment of the invention also provides computer equipment, which is provided with the accelerator resource allocation device shown in the figure 8.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 9, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 9.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method for accelerator resource allocation, the method comprising:
receiving an application for using the accelerator resource, wherein the application carries the identity information of a user and the use time of the accelerator to be used;
responding to the use application, judging whether an accelerator in an idle state exists in the use time;
if the accelerator in the idle state exists, generating an authentication information token based on the identity information of the user and the use time, wherein the authentication information token is used for authenticating the authority and the use time of the user;
and sending the authentication information token to terminal equipment held by the user so as to authenticate the application of the user when the user uses the accelerator resource.
2. The method of claim 1, wherein prior to the receiving the application for use of accelerator resources, the method further comprises:
Establishing a user information database, wherein the user information database comprises user identity information and department information to which a user belongs;
and pre-distributing the accelerators, and determining the accelerators available to each department and the using time of the accelerators.
3. The method of claim 2, wherein said determining whether an accelerator is in an idle state for said use time in response to said use application comprises:
determining accelerator usage right information of the user and a usage time of the accelerator to be used in response to the usage application;
and judging whether the accelerator of the department to which the user belongs is in an idle state in the using time based on the department to which the user belongs and the using time of the accelerator to be used.
4. A method according to claim 3, wherein, when the accelerator of the department to which the user belongs is in a non-idle state during the use time, it is determined whether the accelerators of other departments are in an idle state during the use time.
5. The method according to any one of claims 3 to 4, wherein the presence of the accelerator in the idle state is confirmed when the accelerator of the department to which the user belongs is in the idle state during the use time, or when the accelerator of the department to which the user belongs is in the non-idle state during the use time, and when the accelerators of the other departments exist in the idle state during the use time.
6. The method of claim 1, wherein authenticating the user application comprises:
determining the accelerator use permission information of a user corresponding to the authentication information token and the use time of the accelerator required to be used based on the authentication information token;
comparing the accelerator usage right information of the user carried by the authentication information token with the accelerator usage right information of the user carried by the user application, and comparing the usage time of the accelerator required to be used carried by the authentication information token with the usage time information of the accelerator required to be used carried by the user application, wherein the accelerator usage right information carried by the authentication information token is consistent with the accelerator usage right information of the user carried by the user application, and when the usage time information of the accelerator required to be used carried by the authentication information token is consistent with the usage time information of the accelerator required to be used carried by the user application, the accelerator in an idle state is distributed to the user for accelerator resource usage by the user.
7. The method according to claim 1, wherein when the accelerator usage right information carried by the authentication information token is inconsistent with the accelerator usage right information of the user carried by the user's application, or the accelerator usage time information required to be used carried by the authentication information token is inconsistent with the accelerator usage time information required to be used carried by the user's application, the application is confirmed to be failed in authentication, and the cause of failed in application is prompted.
8. An accelerator resource allocation apparatus, the apparatus comprising:
the application acquisition module is used for receiving an application for using the accelerator resource, wherein the application carries the identity information of a user and the service time of the accelerator to be used;
the accelerator judging module is used for responding to the use application and judging whether an accelerator in an idle state exists in the use time or not;
an authentication token generation module, configured to generate an authentication information token based on the identity information of the user and the usage time if there is an accelerator in an idle state, where the authentication information token is used to authenticate the authority and the usage time of the user;
And the identity authentication module is used for sending the authentication information token to terminal equipment held by the user so as to authenticate the application of the user when the user uses the accelerator resource.
9. A computer device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the accelerator resource allocation method of any of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the accelerator resource allocation method of any one of claims 1 to 7.
CN202311670346.8A 2023-12-07 2023-12-07 Method and device for allocating accelerator resources, computer equipment and storage medium Pending CN117389752A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311670346.8A CN117389752A (en) 2023-12-07 2023-12-07 Method and device for allocating accelerator resources, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311670346.8A CN117389752A (en) 2023-12-07 2023-12-07 Method and device for allocating accelerator resources, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117389752A true CN117389752A (en) 2024-01-12

Family

ID=89470533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311670346.8A Pending CN117389752A (en) 2023-12-07 2023-12-07 Method and device for allocating accelerator resources, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117389752A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874657A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Resource reservation method, device, system and storage medium
CN111181931A (en) * 2019-12-18 2020-05-19 北京邮电大学 Authorization system and method based on user terminal authentication
CN113158198A (en) * 2020-01-22 2021-07-23 华为技术有限公司 Access control method, device, terminal equipment and storage medium
CN114844644A (en) * 2022-03-16 2022-08-02 深信服科技股份有限公司 Resource request method, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874657A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Resource reservation method, device, system and storage medium
CN111181931A (en) * 2019-12-18 2020-05-19 北京邮电大学 Authorization system and method based on user terminal authentication
CN113158198A (en) * 2020-01-22 2021-07-23 华为技术有限公司 Access control method, device, terminal equipment and storage medium
CN114844644A (en) * 2022-03-16 2022-08-02 深信服科技股份有限公司 Resource request method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108549580B (en) Method for automatically deploying Kubernets slave nodes and terminal equipment
US10430332B2 (en) System and method for performance tuning of garbage collection algorithms
WO2020062131A1 (en) Container cloud management system based on blockchain technology
US10178103B2 (en) System and method for accessing a service
CN109120614B (en) Service processing method and device based on distributed system
CN109040263B (en) Service processing method and device based on distributed system
CN106533961B (en) Flow control method and device
CN113742660B (en) Application program license management system and method
CN111343262A (en) Distributed cluster login method, device, equipment and storage medium
CN109213567B (en) Method and equipment for managing VNF instantiation
CN113285843B (en) Container network configuration method and device, computer readable medium and electronic equipment
CN111163186A (en) ID generation method, device, equipment and storage medium
CN111163140A (en) Method, apparatus and computer readable storage medium for resource acquisition and allocation
CN112181599B (en) Model training method, device and storage medium
CN112182606A (en) Access request processing method and device, electronic equipment and readable storage medium
CN117389752A (en) Method and device for allocating accelerator resources, computer equipment and storage medium
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
CN111683164B (en) IP address configuration method and VPN service system
CN112434275A (en) RPA user authentication method, device, electronic equipment and medium
CN108156195B (en) Service data checking method and system
CN112860422A (en) Method, apparatus and computer program product for job processing
CN116089020B (en) Virtual machine operation method, capacity expansion method and capacity expansion system
CN113312661B (en) User authorization system, method and device and electronic equipment
CN111866043B (en) Task processing method, device, computing equipment and computer storage medium
US8844006B2 (en) Authentication of services on a partition

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