CN116089092A - Heterogeneous resource scheduling method and device, electronic equipment and storage medium - Google Patents

Heterogeneous resource scheduling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116089092A
CN116089092A CN202310140976.8A CN202310140976A CN116089092A CN 116089092 A CN116089092 A CN 116089092A CN 202310140976 A CN202310140976 A CN 202310140976A CN 116089092 A CN116089092 A CN 116089092A
Authority
CN
China
Prior art keywords
module
service
target
address
service address
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
CN202310140976.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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202310140976.8A priority Critical patent/CN116089092A/en
Publication of CN116089092A publication Critical patent/CN116089092A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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
    • 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Abstract

The disclosure relates to a heterogeneous resource scheduling method, a heterogeneous resource scheduling device, electronic equipment and a storage medium, wherein the method comprises the following steps: the client module sends a heterogeneous resource scheduling request to the equipment allocation module; the equipment allocation module determines a target service identifier, acquires a service address list and determines a target service address; the equipment allocation module sends an application request for using heterogeneous resources to the target registration module, receives a target physical address corresponding to the target equipment management module sent by the target registration module, and returns the target physical address to the client module; the client module sends a heterogeneous resource access request to the target device management module, the target device management module analyzes the heterogeneous resource access request, accesses the heterogeneous resource based on the analysis result, and returns the heterogeneous resource access result to the client module. The method and the device successfully realize scheduling of heterogeneous resources, the remote equipment management module and the local client module are operated in a k8s container, and the remote function module can realize k8s deployment without transformation.

Description

Heterogeneous resource scheduling method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of communication, and in particular relates to a heterogeneous resource scheduling method, a heterogeneous resource scheduling device, electronic equipment and a storage medium.
Background
Heterogeneous computing remote mainly refers to a network communication-based API (Application Programming Interface, application program interface) forwarding technology accessing heterogeneous resource pools such as a remote FPGA (Field-Programmable Gate Array, field programmable gate array) or GPU (Graphics Processing Unit, graphics processor).
When heterogeneous resources in a heterogeneous resource pool are scheduled, the adopted technical scheme generally uniformly schedules the heterogeneous resources by introducing a centralized scheduler, but the centralized scheduler is easy to become a system bottleneck. To solve this problem, in the related art, a heterogeneous resource pool such as an FPGA or a GPU is migrated to kubernetes (k 8s for short) management, where k8s is an open source system for automatically deploying, expanding and managing a containerized application.
When the heterogeneous resource pool is migrated to k8s management, higher service transformation cost is brought due to the characteristics of k8s containerization and network virtualization.
Disclosure of Invention
The disclosure provides a heterogeneous resource scheduling method, a heterogeneous resource scheduling device, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a heterogeneous resource scheduling method applied to a kubernetes-based heterogeneous resource scheduling system, where the heterogeneous resource scheduling system includes a device management module, a registration center, a device allocation module, and a client module, and the method includes:
under the condition that the service needs to schedule heterogeneous resources, the client module sends a heterogeneous resource scheduling request to the equipment allocation module;
the equipment allocation module responds to the heterogeneous resource scheduling request and determines a target service identifier of scheduling service required by the heterogeneous resource scheduling request;
the equipment allocation module acquires a service address list corresponding to the target service identifier from the registry, and determines a currently available target service address in the service address list; the registration center stores the corresponding relation between each service identifier and a service address list, and each service address in the service address list is the address of the registration module;
the device allocation module sends an application request for using heterogeneous resources to a target registration module corresponding to the target service address, receives a target physical address corresponding to a target device management module sent by the target registration module and returns the target physical address to the client module when the application for using the heterogeneous resources to the target registration module is successful; the target equipment management module is an equipment management module corresponding to the target registration module;
The client module sends a heterogeneous resource access request to the target equipment management module based on the target physical address, the target equipment management module analyzes the heterogeneous resource access request, accesses the heterogeneous resource based on the analysis result, and returns a heterogeneous resource access result to the client module.
Optionally, before the device allocation module obtains the service address list associated with the target service identifier from the registry, the method further comprises:
starting a registration module, and starting a corresponding equipment management module through the registration module;
in the starting process of the equipment management module, the registration module acquires an address corresponding to the registration module and a physical address corresponding to the equipment management module;
the registration module registers the address corresponding to the registration module to the registration center, and associates the registered address corresponding to the registration module with the corresponding service identification;
the registration module stores the physical address corresponding to the equipment management module in a memory.
Optionally, the method further comprises:
the registration module monitors the current state of the equipment management module; the current state comprises a normal state and an abnormal state;
And in the case of the device management module with abnormal state, the registration module deletes the service address corresponding to the registered device management module with abnormal state.
Optionally, the determining the currently available target service address in the service address list includes:
selecting a first service address from the service address list;
acquiring a first quantity of receivable heterogeneous resource scheduling requests and a second quantity of received heterogeneous resource scheduling requests corresponding to the first service address;
in case the second number is smaller than the first number, the first service address is determined as a target service address.
Optionally, the method further comprises:
selecting a second service address from the service address list as an updated first service address when the second number is equal to the first number; the second service address is a service address except the first service address in the service address list;
and returning to execute the step of acquiring the first quantity of receivable heterogeneous resource scheduling requests and the second quantity of received heterogeneous resource scheduling requests corresponding to the first service address until the target service address is determined.
Optionally, the method further comprises:
and deleting the first service address from the service address list in case the second number is equal to the first number.
According to two aspects of the disclosure, a heterogeneous resource scheduling device is provided, and the heterogeneous resource scheduling device is applied to a heterogeneous resource scheduling system based on kubernetes, wherein the heterogeneous resource scheduling system comprises a device management module, a registration center, a device allocation module and a client module;
the client module is used for sending a heterogeneous resource scheduling request to the equipment allocation module under the condition that the service needs to schedule heterogeneous resources;
the equipment allocation module is used for responding to the heterogeneous resource scheduling request and determining a target service identifier of a scheduling service required by the heterogeneous resource scheduling request;
the equipment allocation module is used for acquiring a service address list corresponding to the target service identifier from the registry and determining a currently available target service address in the service address list; the registration center stores the corresponding relation between each service identifier and a service address list, and each service address in the service address list is the address of the registration module;
The device allocation module is used for sending an application request for using heterogeneous resources to a target registration module corresponding to the target service address, receiving a target physical address corresponding to a target device management module sent by the target registration module and returning the target physical address to the client module under the condition that the application for using the heterogeneous resources to the target registration module is successful; the target equipment management module is an equipment management module corresponding to the target registration module;
the client module is used for sending a heterogeneous resource access request to the target equipment management module based on the target physical address, the target equipment management module is also used for analyzing the heterogeneous resource access request, accessing the heterogeneous resource based on the analysis result and returning the heterogeneous resource access result to the client module.
Optionally, before the device allocation module obtains the service address list associated with the service identifier from the registry, the device allocation module is further configured to trigger to start the registration module, and start a corresponding device management module through the registration module;
in the starting process of the equipment management module, the registration module is also used for acquiring an address corresponding to the registration module and a physical address corresponding to the equipment management module;
The registration module is further configured to register an address corresponding to the registration module to the registry, and associate the registered address corresponding to the registration module with a corresponding service identifier;
the registration module is further configured to store a physical address corresponding to the device management module in a memory.
Optionally, the registration module is further configured to:
monitoring the current state of the equipment management module; the current state comprises a normal state and an abnormal state;
and in the case of the device management module with abnormal state, the registration module deletes the service address corresponding to the registered device management module with abnormal state.
Optionally, the device allocation module is further configured to:
selecting a first service address from the service address list;
acquiring a first quantity of receivable heterogeneous resource scheduling requests and a second quantity of received heterogeneous resource scheduling requests corresponding to the first service address;
in case the second number is smaller than the first number, the first service address is determined as a target service address.
Optionally, the device allocation module is further configured to:
selecting a second service address from the service address list as an updated first service address when the second number is equal to the first number; the second service address is a service address except the first service address in the service address list;
And returning to execute the step of acquiring the first quantity of receivable heterogeneous resource scheduling requests and the second quantity of received heterogeneous resource scheduling requests corresponding to the first service address until the target service address is determined.
Optionally, the device allocation module is further configured to:
and deleting the first service address from the service address list in case the second number is equal to the first number.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor;
a memory for storing the at least one processor-executable instruction;
wherein the at least one processor is configured to execute the instructions to implement the method of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of the first aspect.
According to the technical scheme provided by the embodiment of the disclosure, under the condition that the service needs to schedule heterogeneous resources, a client module sends a heterogeneous resource scheduling request to a device allocation module; the equipment allocation module determines a target service identifier of a scheduling service required by the heterogeneous resource scheduling request; the equipment distribution module acquires a service address list corresponding to the target service identifier from the registry, and determines a currently available target service address in the service address list; and under the condition that the device allocation module applies for successful use of the heterogeneous resources to the target registration module, the target registration module returns a target physical address corresponding to the target device management module to the device allocation module, finally, the heterogeneous resource access request is processed through the target device management module to obtain a heterogeneous resource access result, and the heterogeneous resource access result is fed back to the local client module, so that scheduling and access of the heterogeneous resources are successfully realized. In addition, in the embodiment of the disclosure, the k8s server deployment scene is oriented, and the remote equipment management module and the local client module are both operated in a k8s container, so that the k8s deployment can be realized without modification of the remote function module, the distributed characteristic is introduced, and the system stability is improved.
Drawings
Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments, with reference to the following drawings, wherein:
FIG. 1 is a flowchart of a specific process of registering a device by a registration module according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart of a device assignment module performing device assignment provided in an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart of a heterogeneous resource scheduling method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flow chart of one embodiment of S330 in FIG. 3;
FIG. 5 is a block diagram illustrating a heterogeneous resource scheduling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 6 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure;
fig. 7 is a block diagram of a computer system according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below. It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Traditional heterogeneous computing remote refers to access to heterogeneous resource pools such as remote FPGAs (FPGAs) or GPUs by using an API (Application Programming Interface, application program interface) forwarding technology based on network communication.
When scheduling heterogeneous resources in a heterogeneous resource pool, the adopted technical scheme generally uniformly schedules the heterogeneous resources by introducing a centralized scheduler, however, the centralized scheduler is easy to become a system bottleneck. In order to solve the problem, in the related art, when the heterogeneous resource pool such as FPGA or GPU is migrated to k8s management, high service modification cost is brought due to the characteristics of k8s containerization and network virtualization.
Aiming at the technical problems of the traditional scheduling solution, the invention provides a distributed heterogeneous resource calling method which can be suitable for calling heterogeneous resources such as FPGA or GPU. The embodiment of the disclosure is mainly oriented to a k8s service deployment scene, and the purpose that a remote function module can realize k8s deployment without transformation is achieved. Meanwhile, the distributed characteristic is introduced, and the system stability is improved.
The technical solutions of the embodiments of the present disclosure will be described in detail below as a whole. As shown in fig. 1, the heterogeneous resource scheduling system provided by the embodiment of the present disclosure may mainly include the following 5 parts, which are respectively:
1. and a remote device management module. The remote device management module is typically a tcp/udp protocol based service. The remote equipment management module is positioned on a server of heterogeneous resources such as FPGA or GUP, that is, the remote equipment management module is a service running in the server of heterogeneous resources such as FPGA or GUP; and the remote device management module runs in a k8s container.
After receiving the heterogeneous resource access request sent by the local client module, the remote equipment management module analyzes the heterogeneous resource access request to obtain an analysis result; and scheduling heterogeneous resources such as GPGA or GPU and the like to process based on the analysis result, obtaining a processing result, and feeding back the processing result to the local client module.
2. And a registration module. The registration module also operates in a server of heterogeneous resources such as FPGA or GUP, and is used for managing and registering the remote device management module described in 1 above. The registration module may monitor the IP address and port information of the remote device management module, etc. And the memory of the registration module stores the physical address corresponding to the monitored remote management module.
3. A registry. After the registration module obtains the IP address and the port information of the remote device management module, the registration module may register the IP address and the port information of the remote device management module to the registry, that is, the registration module may store both the IP address and the port information of the remote device management module to the registry. In practical application, the registry stores all the equipment resource pools and the IP addresses and port information of all the remote equipment management modules.
4. And a device allocation module. The device management module is primarily responsible for remote device resource allocation. And obtaining a device list of the device resource pool in the registry, and distributing the devices according to a certain algorithm. Wherein the device allocation may be performed using a random algorithm or a weighted algorithm, which is not specifically limited by the embodiments of the present disclosure.
5. And a local client module. The local client module is a user of the remote device resource. And after the equipment resource allocation module allocates the remote equipment, the remote equipment is handed to the local client module for use. The local client module operates in a business container.
After the description of the functions of the above section 5, a specific procedure of performing device registration on the registration module and a specific procedure of performing device allocation on the device allocation module will be described in detail.
As shown in fig. 1, the specific process of registering a device by the registration module may be divided into the following steps:
s110, starting a registration module.
S120, the registration module starts a remote device management module.
When the remote device management module is started, the registration module can monitor the IP address and the port information of the remote device management module, and take the monitored IP address and port information as the corresponding address of the registration module. And the registration module can acquire the physical address corresponding to the device management module and store the physical address corresponding to the device management module in the memory of the registration module.
S130, the registration module registers the address corresponding to the registration module with the registration center.
Specifically, after the registration module obtains the address corresponding to the registration module through S120, registering the obtained address corresponding to the registration module in the registration center; that is, the address corresponding to the obtained registration module is saved to the registry. And, the address corresponding to the registration module is associated with the service identification of the corresponding service. The service identifier may be a service name of a service, for example, service1, etc., and the embodiment of the disclosure does not specifically limit the service identifier.
S140, the registration module polls the state of the remote device management module.
From the above description, the remote device management module is actually a tcp/udp based service. In order to detect whether the state of the remote device management module is normal, the registration module may acquire the current state of the remote device management module by means of polling.
S150, the registration module judges whether the state of the remote equipment management module is normal. If the registration module determines that the status of the remote device management module is normal, the process returns to S140, and if the registration module determines that the status of the remote device management module is abnormal, the process returns to S160.
S160, the registration module de-registers the address corresponding to the module to the registration center.
S170, closing the remote device management module.
S180, the registration module exits.
Specifically, if the registration module determines that the status of the remote device management module is abnormal, it indicates that the remote device management module cannot normally provide services, so that the registration module deletes the address corresponding to the registration module from the registry, that is, deletes the IP address and port information of the remote device management module from the registry. And closing the remote equipment management module with abnormal state, and after closing the remote equipment management module, exiting the registration module.
As can be seen from the above description, the registration module can manage and register the remote device management module, monitor the status of the remote device management module, and close the corresponding remote device management module when the status of the remote device management module is abnormal, so that the status of the opened remote device management module can be ensured to be normal, and further the service can be provided normally.
How the device assignment module performs the device assignment will be described in detail below. When the service container needs to be started, the local client module generates a heterogeneous resource scheduling request and triggers the equipment allocation module to execute a specific equipment allocation process. The specific flow of the device allocation performed by the device allocation module, as shown in fig. 2, may be divided into the following steps:
s210, the device allocation module determines the service identification of the service to be invoked.
Specifically, after receiving the heterogeneous resource scheduling request, the device allocation module may determine a service identifier of a service that needs to be invoked by the heterogeneous resource scheduling request, for example, the service identifier may be service 1.
S220, the equipment distribution module acquires a service address list corresponding to the service identifier from the registration center.
Specifically, the registry stores service addresses (i.e., addresses corresponding to the registry modules) associated with each service identification. Assuming that there are 5 service addresses associated with a service identity, the service address list corresponding to the service identity is composed of the 5 service addresses.
S230, the device allocation module judges whether the service address list is empty. If yes, judging that the equipment allocation fails. If not, go to step S240.
Specifically, after the device allocation module obtains the service address list, it can determine whether the service address list is empty, that is, determine whether there is a service address in the service address list, if the service address list is empty, it indicates that there is no service address in the service address list, that is, there is no device that can provide service at present, so that it can directly determine that the device allocation fails.
S240, the device allocation module selects a service address from the service address list.
In particular, the service address list may generally include a plurality of service addresses, and thus, the device allocation module may select one service address from the service address list after acquiring the service address list. Wherein, a service address may be selected randomly or according to weight, which may be determined according to practical situations, which is not particularly limited in the embodiments of the present disclosure.
S250, the device allocation module applies for device access to the registration module corresponding to the service address selected in S240.
S260, the equipment allocation module judges whether the equipment access application is successful; if yes, judging that the equipment allocation is successful. Otherwise, step S270 is performed to delete the service address from the service address list.
Specifically, after the device allocation module selects a service address from the service address list, the device allocation module may apply for device access to a registration module corresponding to the service address, and the device allocation module may send an application request for using heterogeneous resources to the registration module corresponding to the service address. In practical applications, each service address corresponds to a first number, which is the number of the most serviceable clients at the same time, and a second number, which is the number of the clients currently being serviced.
The device allocation module may determine whether the first number is greater than the second number, and if the first number is greater than the second number, it indicates that the service address may also serve other clients, so that a physical address of a device management module corresponding to the service address may be returned, at this time, the device allocation is successful, and heterogeneous resources such as GPGA or GPU may be scheduled by the device management module corresponding to the physical address to perform processing, so as to obtain a processing result, and the processing result is fed back to the local client module.
If the first number is equal to the second number, indicating that the number of clients currently served by the service address has reached a maximum, the service address cannot serve other clients, and therefore the service address may be deleted from the service address list.
As can be seen from the above description, the device allocation module obtains the service address list corresponding to the service identifier from the registry, selects the currently available service address from the service address list, applies for device access to the registration module corresponding to the service address, returns the physical address of the corresponding device management module to the device allocation module when the device access is applied successfully, and finally dispatches heterogeneous resources such as GPGA or GPU through the device management module corresponding to the physical address to perform processing, so as to obtain a processing result, and feeds back the processing result to the local client module. In the embodiment of the disclosure, the k8s server deployment scenario is oriented, and the remote equipment management module and the local client module are both operated in a k8s container, so that the k8s deployment can be realized without modification of the remote function module, and meanwhile, the distributed characteristic is introduced, and the system stability is also improved.
The method, the device, the electronic equipment and the storage medium for scheduling heterogeneous resources provided by the embodiment of the disclosure are described in detail below.
First, a detailed explanation is provided for a heterogeneous resource scheduling method according to an embodiment of the present disclosure. The heterogeneous resource scheduling method is applied to a k8 s-based heterogeneous resource scheduling system, and the heterogeneous resource scheduling system comprises a device management module, a registration module, a device allocation module and a client module. All four modules can be run in a container of k8 s. In the above embodiments, the device management module, the registration module, the registry, the device allocation module, and the client module have been described in detail respectively, and are not described herein again.
The embodiment of the disclosure first provides a heterogeneous resource scheduling method, as shown in fig. 3, which may include the following steps:
s310, the client module sends a heterogeneous resource scheduling request to the equipment allocation module under the condition that the service needs to schedule the heterogeneous resources.
When the service container needs to be started, the local client module generates a heterogeneous resource scheduling request and sends the heterogeneous resource scheduling request to the equipment allocation module, namely, the equipment allocation module is triggered to execute a specific process of equipment allocation.
S320, the device allocation module responds to the heterogeneous resource scheduling request and determines a target service identifier of the scheduling service required by the heterogeneous resource scheduling request.
Specifically, after receiving the heterogeneous resource scheduling request, the device allocation module may determine a target service identifier of a service required to be invoked by the heterogeneous resource scheduling request, for example, the target service identifier may be service 1.
S330, the device allocation module acquires a service address list corresponding to the target service identifier from the registry, and determines the currently available target service address in the service address list.
The registry stores the corresponding relation between each service identifier and the service address list, and each service address in the service address list is the address of the registration module.
Specifically, the registry corresponding to the registration module stores the service address associated with each service identifier (i.e., the address corresponding to the registration module). Assuming that there are 5 service addresses associated with a service identity, the service address list corresponding to the service identity is composed of the 5 service addresses.
The service address list may typically include a plurality of service addresses, and thus, the device assignment module may select one service address from the service address list after acquiring the service address list. Wherein, a service address may be selected randomly or according to weight, which may be determined according to practical situations, which is not particularly limited in the embodiments of the present disclosure.
For clarity of solution description, a detailed description will be given in the following embodiment of how a currently available target service address is determined in a service address list.
S340, the equipment allocation module sends an application request for using the heterogeneous resource to the target registration module corresponding to the target service address, receives the target physical address corresponding to the target equipment management module sent by the target registration module and returns the target physical address to the client module when the application for using the heterogeneous resource to the target registration module is successful.
The target device management module is a device management module corresponding to the target registration module.
After selecting the target service address from the service address list, the device allocation module may apply for device access to the target registration module corresponding to the service address, and specifically may send an application request for using heterogeneous resources to the target registration module. And under the condition that the equipment access is successfully applied, the target registration module returns a target physical address corresponding to the target equipment management module to the equipment distribution module, and the equipment distribution module sends the target physical address to the client module.
S350, the client module sends a heterogeneous resource access request to the target device management module based on the target physical address, the target device management module analyzes the heterogeneous resource access request, accesses the heterogeneous resource based on the analysis result, and returns the heterogeneous resource access result to the client module.
And returning a target physical address corresponding to the target device management module to the client module by the device allocation module, namely successfully allocating the target physical address to the client module as the target device management module, sending a heterogeneous resource access request to the target device management module by the client module, analyzing the heterogeneous resource access request by the target device management module, accessing the GPGA or GPU and other heterogeneous resources according to the analysis result to process the heterogeneous resource access request to obtain a heterogeneous resource access result, and feeding back the heterogeneous resource access result to the local client module.
According to the technical scheme provided by the embodiment of the disclosure, under the condition that the service needs to schedule heterogeneous resources, a client module sends a heterogeneous resource scheduling request to a device allocation module; the equipment allocation module determines a target service identifier of a scheduling service required by the heterogeneous resource scheduling request; the equipment distribution module acquires a service address list corresponding to the target service identifier from the registry, and determines a currently available target service address in the service address list; and under the condition that the device allocation module applies for successful use of the heterogeneous resources to the target registration module, the target registration module returns a target physical address corresponding to the target device management module to the device allocation module, finally, the heterogeneous resource access request is processed through the target device management module to obtain a heterogeneous resource access result, and the heterogeneous resource access result is fed back to the local client module, so that scheduling and access of the heterogeneous resources are successfully realized. In addition, in the embodiment of the disclosure, the k8s server deployment scene is oriented, and the remote equipment management module and the local client module are both operated in a k8s container, so that the k8s deployment can be realized without modification of the remote function module, the distributed characteristic is introduced, and the system stability is improved.
Based on the embodiment shown in fig. 3, in one implementation, before the device allocation module obtains the service address list associated with the service identifier from the registration module, the method may further include the following steps, namely, step a1 to step a3:
step a1, starting a registration module, and starting a corresponding device management module through the registration module.
Step a2, in the starting process of the device management module, the registration module acquires an address corresponding to the registration module and a physical address corresponding to the device management module.
Specifically, when the remote device management module is started, the registration module may monitor the IP address and the port information of the remote device management module, and use the monitored IP address and port information as the address corresponding to the registration module.
And a3, the registration module registers the address corresponding to the registration module to a registration center, and associates the address corresponding to the registered registration module with the corresponding service identification.
Specifically, after the registration module obtains the address corresponding to the registration module through the step a2, registering the obtained address corresponding to the registration module in a registration center; that is, the address corresponding to the obtained registration module is saved to the registry. And, the address corresponding to the registration module is associated with the service identification of the corresponding service. The service identifier may be a service name of a service, for example, service1, etc., and the embodiment of the disclosure does not specifically limit the service identifier. It can be seen that the registration module may implement the functionality of managing and registering a remote device management module.
And a4, the registration module stores the physical address corresponding to the equipment management module in the memory.
Specifically, after the registration module obtains the physical address corresponding to the device management module, the physical address corresponding to the device management module may be stored in the memory of the registration module, so that after the device allocation module applies for the device to the registration module successfully, the registration module may return the physical address corresponding to the device management module to the device allocation module.
On the basis of the foregoing embodiment, in an implementation manner, the heterogeneous resource scheduling method may further include the following steps, respectively, step b1 and step b2:
step b1, the registration module monitors the current state of the device management module.
Wherein the current state includes a normal state and an abnormal state.
Specifically, the remote device management module is actually a tcp/udp based service. In order to detect whether the state of the remote device management module is normal, the registration module may acquire the current state of the remote device management module by means of polling.
And b2, when the device management module with abnormal state exists, the registration module deletes the service address corresponding to the registered device management module with abnormal state.
Specifically, if the registration module determines that the status of the remote device management module is abnormal, it indicates that the remote device management module cannot normally provide services, and therefore, the registration module deletes the service address of the remote device management module from the registry. And closing the remote equipment management module with abnormal state, and then closing the remote equipment management module, and exiting the registration module.
The registration module can manage and register the remote equipment management module, monitor the state of the remote equipment management module, and close the corresponding remote equipment management module when the state of the remote equipment management module is abnormal, so that the opened remote equipment management module can be ensured to be in a normal state, and further the service can be provided normally.
On the basis of the above embodiment, S330, determining the currently available target service address in the service address list, as shown in fig. 4, may include the following steps:
s331, selecting a first service address from the service address list.
In particular, the service address list may generally include a plurality of service addresses, so the device allocation module may select a service address from the service address list after acquiring the service address list, and for clarity of description of the solution, the service address may be referred to as a first service address. Wherein, a service address may be selected randomly or according to weight, which may be determined according to practical situations, which is not particularly limited in the embodiments of the present disclosure.
S332, a first number of receivable heterogeneous resource scheduling requests and a second number of received heterogeneous resource scheduling requests corresponding to the first service address are obtained.
Specifically, after the device allocation module selects a service address from the service address list, the device allocation module may apply for device access to the registration module corresponding to the service address, that is, apply for access to the remote device management module to the registration module. In practical applications, each service address corresponds to a maximum number of serviceable clients (referred to as a first number) at the same time, and a number of clients currently being serviced (referred to as a second number).
S333, in the case where the second number is smaller than the first number, the first service address is determined as the target service address.
Specifically, the device allocation module may determine whether the first number is greater than the second number, and if the first number is greater than the second number, the service address may also serve other clients, thereby determining the first service address as the target service address.
On the basis of the embodiment shown in fig. 4, the heterogeneous resource scheduling method may further include the following steps:
and under the condition that the second number is equal to the first number, selecting a second service address from the service address list as the updated first service address.
Wherein the second service address is a service address except the first service address in the service address list;
specifically, the method returns to execute the step of acquiring the first number of receivable heterogeneous resource scheduling requests corresponding to the first service address and the second number of received heterogeneous resource scheduling requests until the target service address is determined.
If the first number is equal to the second number, the number of clients served by the service address currently reaches the maximum, and the first service address cannot provide services for other clients, so that a second service address except the first service address can be selected again from the service address list to serve as an updated first service address, and the first number of receivable heterogeneous resource scheduling requests and the second number of received heterogeneous resource scheduling requests corresponding to the first service address are acquired and executed again until the target service address is determined, namely, the equipment management module capable of providing the service is determined.
Based on the embodiment shown in fig. 4, in an implementation manner, the heterogeneous resource scheduling method further includes:
in case the second number is equal to the first number, the first service address is deleted from the service address list.
Specifically, if the first number is equal to the second number, which indicates that the number of clients currently served by the service address has reached a maximum, the service address cannot provide services for other clients, and therefore, the service address may be deleted from the service address list. Namely, the purpose of deleting the service address which can not provide service for the client is achieved.
In the case of dividing each functional module by adopting corresponding each function, the embodiment of the disclosure provides a heterogeneous resource scheduling device, which may be a server or a chip applied to the server. Fig. 5 is a schematic block diagram of functional modules of a heterogeneous resource scheduling apparatus according to an exemplary embodiment of the present disclosure. As shown in fig. 5, the heterogeneous resource scheduling device applied to the heterogeneous resource scheduling system based on k8s comprises: a device management module 510, a registration module 520, a registry 530, a device allocation module 540, and a client module 550;
the client module is used for sending a heterogeneous resource scheduling request to the equipment allocation module under the condition that the service needs to schedule heterogeneous resources;
the equipment allocation module is used for responding to the heterogeneous resource scheduling request and determining a target service identifier of a scheduling service required by the heterogeneous resource scheduling request;
The equipment allocation module is used for acquiring a service address list corresponding to the target service identifier from the registry and determining a currently available target service address in the service address list; the registration center stores the corresponding relation between each service identifier and a service address list, and each service address in the service address list is the address of the registration module;
the device allocation module is used for sending an application request for using heterogeneous resources to a target registration module corresponding to the target service address, receiving a target physical address corresponding to a target device management module sent by the target registration module and returning the target physical address to the client module under the condition that the application for using the heterogeneous resources to the target registration module is successful; the target equipment management module is an equipment management module corresponding to the target registration module;
the client module is used for sending a heterogeneous resource access request to the target equipment management module based on the target physical address, the target equipment management module is also used for analyzing the heterogeneous resource access request, accessing the heterogeneous resource based on the analysis result and returning the heterogeneous resource access result to the client module.
According to the technical scheme provided by the embodiment of the disclosure, under the condition that the service needs to schedule heterogeneous resources, a client module sends a heterogeneous resource scheduling request to a device allocation module; the equipment allocation module determines a target service identifier of a scheduling service required by the heterogeneous resource scheduling request; the equipment distribution module acquires a service address list corresponding to the target service identifier from the registry, and determines a currently available target service address in the service address list; and under the condition that the device allocation module applies for successful use of the heterogeneous resources to the target registration module, the target registration module returns a target physical address corresponding to the target device management module to the device allocation module, finally, the heterogeneous resource access request is processed through the target device management module to obtain a heterogeneous resource access result, and the heterogeneous resource access result is fed back to the local client module, so that scheduling and access of the heterogeneous resources are successfully realized. In addition, in the embodiment of the disclosure, the k8s server deployment scene is oriented, and the remote equipment management module and the local client module are both operated in a k8s container, so that the k8s deployment can be realized without modification of the remote function module, the distributed characteristic is introduced, and the system stability is improved.
Optionally, before the device allocation module obtains the service address list associated with the service identifier from the registry, the device allocation module is further configured to trigger to start the registration module, and start a corresponding device management module through the registration module;
in the starting process of the equipment management module, the registration module is also used for acquiring an address corresponding to the registration module and a physical address corresponding to the equipment management module;
the registration module is further configured to register an address corresponding to the registration module to the registry, and associate the registered address corresponding to the registration module with a corresponding service identifier;
the registration module is further configured to store a physical address corresponding to the device management module in a memory.
Optionally, the registration module is further configured to:
monitoring the current state of the equipment management module; the current state comprises a normal state and an abnormal state;
and in the case of the device management module with abnormal state, the registration module deletes the service address corresponding to the registered device management module with abnormal state.
Optionally, the device allocation module is further configured to:
Selecting a first service address from the service address list;
acquiring a first quantity of receivable heterogeneous resource scheduling requests and a second quantity of received heterogeneous resource scheduling requests corresponding to the first service address;
in case the second number is smaller than the first number, the first service address is determined as a target service address.
Optionally, the device allocation module is further configured to:
selecting a second service address from the service address list as an updated first service address when the second number is equal to the first number; the second service address is a service address except the first service address in the service address list;
and returning to execute the step of acquiring the first quantity of receivable heterogeneous resource scheduling requests and the second quantity of received heterogeneous resource scheduling requests corresponding to the first service address until the target service address is determined.
Optionally, the device allocation module is further configured to:
and deleting the first service address from the service address list in case the second number is equal to the first number.
The embodiment of the disclosure also provides an electronic device, including: at least one processor; a memory for storing the at least one processor-executable instruction; wherein the at least one processor is configured to execute the instructions to implement the above-described methods disclosed by embodiments of the present disclosure.
Fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. As shown in fig. 6, the electronic device 1800 includes at least one processor 1801 and a memory 1802 coupled to the processor 1801, the processor 1801 may perform corresponding steps in the above-described methods disclosed by embodiments of the present disclosure.
The processor 1801 may also be referred to as a central processing unit (central processing unit, CPU), which may be an integrated circuit chip with signal processing capabilities. The steps of the above-described methods disclosed in the embodiments of the present disclosure may be accomplished by instructions in the form of integrated logic circuits or software in hardware in the processor 1801. The processor 1801 may be a general purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may reside in a memory 1802 such as random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as is well known in the art. The processor 1801 reads the information in the memory 1802 and, in combination with its hardware, performs the steps of the method described above.
In addition, various operations/processes according to the present disclosure, in the case of being implemented by software and/or firmware, may be installed from a storage medium or network to a computer system having a dedicated hardware structure, such as the computer system 1900 shown in fig. 7, which is capable of performing various functions including functions such as those described above, and the like, when various programs are installed. Fig. 7 is a block diagram of a computer system according to an exemplary embodiment of the present disclosure.
Computer system 1900 is intended to represent various forms of digital electronic computing devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the computer system 1900 includes a computing unit 1901, and the computing unit 1901 can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1902 or a computer program loaded from a storage unit 1908 into a Random Access Memory (RAM) 1903. In the RAM 1903, various programs and data required for the operation of the computer system 1900 may also be stored. The computing unit 1901, ROM 1902, and RAM 1903 are connected to each other via a bus 1904. An input/output (I/O) interface 1905 is also connected to bus 1904.
Various components in computer system 1900 are connected to I/O interface 1905, including: an input unit 1906, an output unit 1907, a storage unit 1908, and a communication unit 1909. The input unit 1906 may be any type of device capable of inputting information to the computer system 1900, and the input unit 1906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 1907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 1908 may include, but is not limited to, magnetic disks, optical disks. The communication unit 1909 allows the computer system 1900 to exchange information/data with other devices over a network, such as the internet, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 1901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1901 performs the various methods and processes described above. For example, in some embodiments, the above-described methods disclosed by embodiments of the present disclosure may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1908. In some embodiments, some or all of the computer programs may be loaded and/or installed onto electronic device 1900 via ROM 1902 and/or communication unit 1909. In some embodiments, the computing unit 1901 may be configured to perform the above-described methods of the disclosed embodiments by any other suitable means (e.g., by means of firmware).
The disclosed embodiments also provide a computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the above-described method disclosed by the disclosed embodiments.
A computer readable storage medium in embodiments of the present disclosure may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium described above can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specifically, the computer-readable storage medium described above may include one or more wire-based electrical connections, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The disclosed embodiments also provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described methods of the disclosed embodiments.
In an embodiment of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computers may be connected to the user computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computers.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules, components or units referred to in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module, component or unit does not in some cases constitute a limitation of the module, component or unit itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The above description is merely illustrative of some embodiments of the present disclosure and of the principles of the technology applied. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the disclosure. The scope of the present disclosure is defined by the appended claims.

Claims (10)

1. The heterogeneous resource scheduling method is characterized by being applied to a heterogeneous resource scheduling system based on kubernetes, wherein the heterogeneous resource scheduling system comprises a device management module, a registration center, a device allocation module and a client module, and the method comprises the following steps:
under the condition that the service needs to schedule heterogeneous resources, the client module sends a heterogeneous resource scheduling request to the equipment allocation module;
the equipment allocation module responds to the heterogeneous resource scheduling request and determines a target service identifier of scheduling service required by the heterogeneous resource scheduling request;
the equipment allocation module acquires a service address list corresponding to the target service identifier from the registry, and determines a currently available target service address in the service address list; the registration center stores the corresponding relation between each service identifier and a service address list, and each service address in the service address list is the address corresponding to the registration module;
the device allocation module sends an application request for using heterogeneous resources to a target registration module corresponding to the target service address, receives a target physical address corresponding to a target device management module sent by the target registration module and returns the target physical address to the client module when the application for using the heterogeneous resources to the target registration module is successful; the target equipment management module is an equipment management module corresponding to the target registration module;
The client module sends a heterogeneous resource access request to the target equipment management module based on the target physical address, the target equipment management module analyzes the heterogeneous resource access request, accesses the heterogeneous resource based on the analysis result, and returns a heterogeneous resource access result to the client module.
2. The method of claim 1, wherein prior to the device assignment module obtaining a list of service addresses associated with the target service identity from the registry, the method further comprises:
starting a registration module, and starting a corresponding equipment management module through the registration module;
in the starting process of the equipment management module, the registration module acquires an address corresponding to the registration module and a physical address corresponding to the equipment management module;
the registration module registers the address corresponding to the registration module to the registration center, and associates the registered address corresponding to the registration module with the corresponding service identification;
the registration module stores the physical address corresponding to the equipment management module in a memory.
3. The method according to claim 2, wherein the method further comprises:
The registration module monitors the current state of the equipment management module; the current state comprises a normal state and an abnormal state;
and in the case of the device management module with abnormal state, the registration module deletes the service address corresponding to the registered device management module with abnormal state.
4. A method according to any one of claims 1 to 3, wherein said determining a currently available target service address in said service address list comprises:
selecting a first service address from the service address list;
acquiring a first quantity of receivable heterogeneous resource scheduling requests and a second quantity of received heterogeneous resource scheduling requests corresponding to the first service address;
in case the second number is smaller than the first number, the first service address is determined as a target service address.
5. The method according to claim 4, wherein the method further comprises:
selecting a second service address from the service address list as an updated first service address when the second number is equal to the first number; the second service address is a service address except the first service address in the service address list;
And returning to execute the step of acquiring the first quantity of receivable heterogeneous resource scheduling requests and the second quantity of received heterogeneous resource scheduling requests corresponding to the first service address until the target service address is determined.
6. The method according to claim 4, wherein the method further comprises:
and deleting the first service address from the service address list in case the second number is equal to the first number.
7. The heterogeneous resource scheduling device is characterized by being applied to a heterogeneous resource scheduling system based on kubernetes, wherein the heterogeneous resource scheduling system comprises a device management module, a registration center, a device allocation module and a client module;
the client module is used for sending a heterogeneous resource scheduling request to the equipment allocation module under the condition that the service needs to schedule heterogeneous resources;
the equipment allocation module is used for responding to the heterogeneous resource scheduling request and determining a target service identifier of a scheduling service required by the heterogeneous resource scheduling request;
the equipment allocation module is used for acquiring a service address list corresponding to the target service identifier from the registry and determining a currently available target service address in the service address list; the registration center stores the corresponding relation between each service identifier and a service address list, and each service address in the service address list is the address of the registration module;
The device allocation module is used for sending an application request for using heterogeneous resources to a target registration module corresponding to the target service address, receiving a target physical address corresponding to a target device management module sent by the target registration module and returning the target physical address to the client module under the condition that the application for using the heterogeneous resources to the target registration module is successful; the target equipment management module is an equipment management module corresponding to the target registration module;
the client module is used for sending a heterogeneous resource access request to the target equipment management module based on the target physical address, the target equipment management module is also used for analyzing the heterogeneous resource access request, accessing the heterogeneous resource based on the analysis result and returning the heterogeneous resource access result to the client module.
8. The apparatus of claim 7, wherein the device assignment module is further configured to trigger a start-up registration module and start up a corresponding device management module via the registration module before the device assignment module obtains a list of service addresses associated with the service identities from the registry;
in the starting process of the equipment management module, the registration module is also used for acquiring an address corresponding to the registration module and a physical address corresponding to the equipment management module;
The registration module is further configured to register an address corresponding to the registration module to the registry, and associate the registered address corresponding to the registration module with a corresponding service identifier;
the registration module is further configured to store a physical address corresponding to the device management module in a memory.
9. An electronic device, comprising:
at least one processor;
a memory for storing the at least one processor-executable instruction;
wherein the at least one processor is configured to execute the instructions to implement the method of any of claims 1-6.
10. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-6.
CN202310140976.8A 2023-02-16 2023-02-16 Heterogeneous resource scheduling method and device, electronic equipment and storage medium Pending CN116089092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310140976.8A CN116089092A (en) 2023-02-16 2023-02-16 Heterogeneous resource scheduling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310140976.8A CN116089092A (en) 2023-02-16 2023-02-16 Heterogeneous resource scheduling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116089092A true CN116089092A (en) 2023-05-09

Family

ID=86206315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310140976.8A Pending CN116089092A (en) 2023-02-16 2023-02-16 Heterogeneous resource scheduling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116089092A (en)

Similar Documents

Publication Publication Date Title
US10162688B2 (en) Processing event messages for user requests to execute program code
US10719369B1 (en) Network interfaces for containers running on a virtual machine instance in a distributed computing environment
CN108717379B (en) Electronic device, distributed task scheduling method and storage medium
US20170373931A1 (en) Method for updating network service descriptor nsd and apparatus
CN110352401B (en) Local device coordinator with on-demand code execution capability
CN110958281B (en) Data transmission method and communication device based on Internet of things
US9342369B2 (en) System and method for increasing throughput of a PaaS system
CN111949364A (en) Deployment method of containerized VNF and related equipment
JP7100154B2 (en) Processor core scheduling method, equipment, terminals and storage media
CN111221638B (en) Concurrent task scheduling processing method, device, equipment and medium
CN112395107A (en) Tax control equipment control method and device, storage medium and electronic equipment
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN111491015B (en) Preheating task processing method and system, proxy server and service center
CN107045452B (en) Virtual machine scheduling method and device
US10846156B2 (en) Methods, devices and computer program products for managing software function
CN112565390A (en) Service distribution method, device, electronic equipment and storage medium
CN106657195B (en) Task processing method and relay device
CN114979286B (en) Access control method, device, equipment and computer storage medium for container service
CN111586140A (en) Data interaction method and server
CN113271228B (en) Bandwidth resource scheduling method, device, equipment and computer readable storage medium
CN116089092A (en) Heterogeneous resource scheduling method and device, electronic equipment and storage medium
CN111159233A (en) Distributed caching method, system, computer device and storage medium
CN114924888A (en) Resource allocation method, data processing method, device, equipment and storage medium
CN111045778B (en) Virtual machine creation method, device, server and storage medium
CN113760485A (en) Scheduling method, device and equipment of timing task and storage medium

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