[go: up one dir, main page]

CN115756840B - Hardware resource scheduling method, system, computer device and storage medium - Google Patents

Hardware resource scheduling method, system, computer device and storage medium

Info

Publication number
CN115756840B
CN115756840B CN202211410278.7A CN202211410278A CN115756840B CN 115756840 B CN115756840 B CN 115756840B CN 202211410278 A CN202211410278 A CN 202211410278A CN 115756840 B CN115756840 B CN 115756840B
Authority
CN
China
Prior art keywords
target
physical machine
machine
development machine
target task
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.)
Active
Application number
CN202211410278.7A
Other languages
Chinese (zh)
Other versions
CN115756840A (en
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.)
Shenzhen Smartmore Technology Co Ltd
Original Assignee
Shenzhen Smartmore 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 Shenzhen Smartmore Technology Co Ltd filed Critical Shenzhen Smartmore Technology Co Ltd
Priority to CN202211410278.7A priority Critical patent/CN115756840B/en
Publication of CN115756840A publication Critical patent/CN115756840A/en
Application granted granted Critical
Publication of CN115756840B publication Critical patent/CN115756840B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

本申请涉及一种硬件资源调度方法、系统、计算机设备和存储介质。方法包括:响应于开发机发送的针对目标任务的执行命令,确定目标物理机;启动目标物理机上的第一代理程序,通过第一代理程序将开启文件共享服务的开发机的根目录挂载到目标物理机的目标挂载点;通过第一代理程序启动目标容器,并将目标容器的根目录替换为目标物理机的目标挂载点;通过目标容器执行目标任务,得到目标任务执行结果。采用本方法能够保证目标任务的开发环境和运行环境的一致性,降低了开发人员额外配置环境的成本,节约开发机与特殊硬件资源进行结合的调试时间,使特殊硬件资源被分配给开发人员后的闲置时间减少,提高特殊硬件资源的利用率。

The present application relates to a hardware resource scheduling method, system, computer device and storage medium. The method includes: determining a target physical machine in response to an execution command for a target task sent by a development machine; starting a first agent program on the target physical machine, and mounting the root directory of the development machine that enables the file sharing service to the target mount point of the target physical machine through the first agent program; starting a target container through the first agent program, and replacing the root directory of the target container with the target mount point of the target physical machine; executing the target task through the target container to obtain the target task execution result. The use of this method can ensure the consistency of the development environment and the operating environment of the target task, reduce the cost of developers to configure the environment additionally, save the debugging time of combining the development machine with special hardware resources, reduce the idle time of special hardware resources after being allocated to developers, and improve the utilization rate of special hardware resources.

Description

Hardware resource scheduling method, system, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, a system, a computer device, and a storage medium for scheduling hardware resources.
Background
With the development of computer technology, artificial intelligence technology has emerged. When a developer researches on problems related to artificial intelligence technology, the code needs to be run by means of special hardware resources such as a GPU (graphics processing unit, a graphic processor) and/or an FPGA (Field Programmable GATE ARRAY, programmable array logic). Because these special hardware resources are expensive, in most of the current enterprises, developers are typically configured with development machines without special hardware resources, and when the developers need to run codes by means of the special hardware resources, the special hardware resources are allocated to the developers.
However, when the special hardware resources are combined with the developer's development machine, there are many debugging problems, so that the special hardware resources are not operated for most of the time allocated, resulting in low utilization of the special hardware resources.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a hardware resource scheduling method, system, computer device, computer-readable storage medium, and computer program product that can improve the utilization of hardware resources.
In a first aspect, the present application provides a method for scheduling hardware resources. The method comprises the following steps:
The method comprises the steps of responding to an execution command sent by a development machine and aiming at a target task, determining a target physical machine, wherein the target physical machine is used for providing special hardware resources required by executing the target task;
starting a first proxy program on a target physical machine, and mounting a root directory of a development machine for starting file sharing service to a target mounting point of the target physical machine through the first proxy program;
starting a target container through a first proxy program, and replacing a root directory of the target container with a target mounting point of a target physical machine;
and executing the target task through the target container to obtain a target task execution result.
In some embodiments, the method further comprises:
The file sharing service is used for realizing file sharing between the development machine and the target physical machine. In some embodiments, the magnetic disk includes a system disk and a data disk.
In some embodiments, the method further comprises:
after the execution of the target task is finished, destroying the target container through a first proxy program to recover the target physical machine;
The file sharing service is closed by the second agent.
In some embodiments, determining the target physical machine in response to an execution command for the target task sent by the development machine includes:
Responding to an execution command aiming at a target task and sent by a development machine, and analyzing the execution command to obtain special hardware resource demand information;
And determining the target physical machine from the physical machine cluster according to the special hardware resource demand information.
In some embodiments, after the target task is executed by the target container and the target task execution result is obtained, the method further includes:
forwarding a target task execution result to a second agent program on the development machine through the first agent program;
and the terminal receiving service started by the second agent program receives the target task execution result so as to output and display the target task execution result in the development machine.
In some embodiments, the method further comprises:
displaying a command line interface on a development machine;
according to the execution command code input in the command line interface, sending an execution command aiming at the target task to a server;
Responding to an execution command for a target task sent by a development machine, determining a target physical machine comprises the following steps:
The server side extracts the developer identification in the execution command and distributes a corresponding target physical machine for the developer uniquely represented by the developer identification.
In a second aspect, the application also provides a hardware resource scheduling system. The system comprises a server and a target physical machine;
The system comprises a development machine, a server side, a target physical machine and a development machine, wherein the development machine is used for developing a target task, and the development machine is used for developing a target physical machine;
The target physical machine is used for starting a first proxy program on the target physical machine, mounting a root directory of a development machine for starting file sharing service to a target mounting point of the target physical machine through the first proxy program, starting a target container through the first proxy program, replacing the root directory of the target container with the target mounting point of the target physical machine, and executing a target task through the target container to obtain a target task execution result.
In some embodiments, the system further comprises:
The development machine is used for starting file sharing service for a disk on the development machine through a second agent program on the development machine, wherein the file sharing service is used for realizing file sharing between the development machine and the target physical machine.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the above-described method embodiments when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method embodiments described above.
In a fifth aspect, the present application also provides a computer program product. Computer program product comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
When executing a target task requiring special hardware resources, determining a target physical machine with the special hardware resources through an execution command sent by a development machine aiming at the target task, mounting a root directory of the development machine for starting file sharing service to a target mounting point of the target physical machine and starting a target container through a first proxy program, replacing the root directory of the target container with the target mounting point of the target physical machine, and finally executing the target task through the target container to obtain a target task execution result. The root directory of the development machine is automatically mounted to the root directory of the target container through the first proxy program and the file sharing service, and the target task is executed through the target container, so that the consistency of the development environment and the running environment of the target task is ensured, the cost of the additional configuration environment of the development personnel is reduced, the debugging time for combining the development machine with the special hardware resources is saved, the idle time after the special hardware resources are distributed to the development personnel is reduced, and the utilization rate of the special hardware resources is further improved.
Drawings
FIG. 1 is an application environment diagram of a hardware resource scheduling method in one embodiment;
FIG. 2 is a flow chart of a method for scheduling hardware resources in one embodiment;
FIG. 3 is a flowchart of a method for scheduling hardware resources according to another embodiment;
FIG. 4 is a block diagram of a hardware resource scheduling system in one embodiment;
FIG. 5 is a block diagram of a hardware resource scheduling system in another embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment;
fig. 7 is an internal structural view of a computer device in another embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The hardware resource scheduling method provided by the embodiment of the application can be applied to an application environment shown in figure 1. When executing a target task requiring a special hardware resource, the development machine 101 requests the special hardware resource from the server 102, and the server 102 determines a target physical machine 1031 for executing the target task from the physical machine cluster 103. The server refers to a cluster manager for managing a physical machine cluster. The server is a main coordinator and manager of the whole physical machine cluster and is responsible for making an allocation strategy of the target physical machine and scheduling special hardware resources of the physical machine cluster. It should be noted that, the server may exist independently of the physical machine cluster, or may be disposed inside a certain physical machine in the physical machine cluster. It will be understood that the server and the physical machine cluster for providing the special hardware resources are devices in the background, i.e. the server and the physical machine cluster are regarded as one background device for performing the steps of the method embodiment.
Illustratively, the server 102 determines a target physical machine 1031 in response to an execution command for a target task sent by the development machine 101, where the target physical machine 1031 is configured to provide special hardware resources required for executing the target task. The first proxy program on the target physical machine 1031 is started, and the target physical machine 1031 mounts the root directory of the development machine 101 that starts the file sharing service to the target mount point of the target physical machine 1031 through the first proxy program. The target physical machine 1031 starts the target container through the first proxy program, and replaces the root directory of the target container with the target mount point of the target physical machine 1031. The target physical machine 1031 executes the target task through the target container, and obtains a target task execution result.
In some embodiments, as shown in fig. 2, a method for scheduling hardware resources is provided, where the method may be implemented through interaction between the server 102 and the target physical machine 1031 in fig. 1, or may be implemented through interaction between the server 102, the developer 101, and the target physical machine 1031, and the method includes, without limitation, the following steps:
and step 201, determining a target physical machine in response to an execution command for the target task sent by the development machine, wherein the target physical machine is used for providing special hardware resources required for executing the target task.
The development machine is a hardware environment for development and configuration. The developer configures the desired code environment on the developer. It is understood that virtual machines may be used as development machines.
Target tasks refer to code that a developer designs to achieve a certain purpose or solve a certain problem. And inputting a code execution command corresponding to the target task, namely, the execution command of the target task, so that code operation can be completed.
A physical machine is a name for a physical computer, and is a host that can provide special hardware resources. A particular hardware resource is a hardware resource that is difficult or expensive to obtain relative to a common hardware resource (e.g., memory). For example, the special hardware resources include at least one of GPU (Graphics Processing Unit, graphics processor) and FPGA (Field Programmable GATE ARRAY ), etc.
When executing a target task requiring special hardware resources, the server responds to an execution command for the target task sent by the developer, analyzes the execution command of the target task, and determines a target physical machine according to the analysis result.
Step 202, starting a first proxy program on a target physical machine, and mounting a root directory of a development machine for starting file sharing service to a target mounting point of the target physical machine through the first proxy program.
The first agent refers to an agent running on the target physical machine. It will be appreciated that the first agent is an agent with a completely new function proposed by the present application, that is, the first agent is an agent for implementing automatic directory mounting between the developer and the target physical machine, and for starting the container. It should be noted that the functions of the first proxy program include, but are not limited to, this. It will be appreciated that agents are agents.
The file sharing service refers to an NFS (Network FILE SYSTEM ) service. By using the file sharing service, users can access files on the remote system as local files so that the nodes of each computer can use the resources on the network as conveniently as local resources.
The target mount point is a directory of the disk that the physical machine uses to mount the development machine. It will be appreciated that any directory on the physical machine may be used as the target mount point, and this embodiment is not limited herein.
After the target physical machine is allocated by the server to execute the target task, a first proxy program on the target physical machine is started, a certain file directory on the target physical machine is set as a target mounting point through the first proxy program, and after the developer starts the file sharing service, the root directory of the developer which starts the file sharing service is mounted to the target mounting point of the target physical machine through the first proxy program.
It can be appreciated that after the root directory of the development machine is mounted to the target mounting point of the target physical machine, the files on the development machine can be accessed by accessing the target mounting point of the target physical machine.
In some embodiments, a specified file directory on the target physical machine may be used as the target mount point, or any file directory on the target physical machine may be used as the target mount point. This is not limited.
In some embodiments, the file sharing service on the development machine may be turned on all the time without waiting for the target physical machine to be assigned by the server for performing the target task, while ensuring the absolute security of the development machine. In other embodiments, the file sharing service may not always be turned on by default, but may be triggered to be turned on under certain conditions.
Step 203, starting the target container through the first proxy program, and replacing the root directory of the target container with the target mounting point of the target physical machine.
Wherein the target container is a container created on the target physical machine. It will be appreciated that containers created on the target physical machine can use specific hardware resources of the target physical machine. The target container is used for isolating various resources required by executing the tasks, so that a plurality of tasks are supported to run on the same target physical machine to use special hardware resources of the target physical machine, and the aim of maximizing the utilization rate of the resources can be achieved.
Illustratively, after the root directory of the development machine is successfully mounted to the target mounting point of the target physical machine, the target physical machine starts the target container through the first proxy program, and replaces the root directory of the target container with the target mounting point of the target physical machine.
And 204, executing the target task through the target container to obtain a target task execution result.
The target task execution result is a result output in the process of executing the target task, namely an operation result of the operation code.
The target physical machine executes the target task through the target container to obtain a target task execution result.
In some embodiments, the target physical machine may send the target task execution result to the development machine, so that the development machine outputs and displays the target task execution result.
In some embodiments, after the target task execution ends, the target physical machine may destroy the created target container to reclaim the special hardware resources occupied by the target container.
In some embodiments, after the target task is executed, the developer may close the file sharing service, thereby improving security. In other embodiments, after the execution of the target task is finished, the development machine can keep the file sharing service in an on state all the time under the safe condition, so that when special hardware resources are needed to be used later, the task can be executed directly based on the file sharing service in the on state all the time by using the special hardware resources, and the execution efficiency of the task is improved.
In the hardware resource scheduling method, the root directory of the development machine is automatically mounted to the root directory of the target container through the first proxy program and the file sharing service, and the target task is executed through the target container, so that the consistency of the development environment and the running environment of the target task is ensured, the cost of the additional configuration environment of the development machine is reduced, the debugging time for combining the development machine with the special hardware resource is saved, the idle time after the special hardware resource is distributed to the development machine is reduced, and the utilization rate of the special hardware resource is further improved.
In some embodiments, the method further comprises:
The file sharing service is used for realizing file sharing between the development machine and the target physical machine.
Wherein the second agent refers to an agent running on the developer. When the execution command of the target task is monitored, the second agent program is awakened to start. It can be understood that in this embodiment, the second agent has a function of controlling the opening of the file sharing service, that is, the second agent can autonomously control the opening of the file sharing service.
The second agent program is pre-run on the development machine, and when the development machine sends an execution command for the target task to the server, the development machine wakes up to start the second agent program on the development machine, and the development machine starts file sharing service for a disk on the development machine through the second agent program on the development machine.
In some embodiments, the disk includes a system disk and a data disk, and the second agent on the development machine may open a file sharing service for both the system disk and the data disk on the development machine. It can be understood that the first proxy program on the target physical machine can mount the system disk and the data disk of the developing machine for starting the file sharing service, so as to mount the root directory of the developing machine to the target mounting point of the target physical machine. It will be appreciated that sharing of data disks and system disks can be achieved by the method of the present application.
The starting sequence of the first agent program and the second agent program may be changed, and may be determined according to the requirement, and the embodiment is not limited herein.
In the above embodiment, when the execution command of the target task is monitored, the file sharing service on the development machine is started through the second agent program, so that the root directory local to the development machine can be accessed by the target physical machine, and the storage space local to the target physical machine can be saved.
In some embodiments, the method further comprises destroying the target container by the first agent to reclaim the target physical machine after execution of the target task is completed, and closing the file sharing service by the second agent.
The method includes the steps of distributing the root directory of a development machine for starting file sharing service to a target mounting point of a target physical machine through a first proxy program, starting a target container, replacing the root directory of the target container with the target mounting point of the target physical machine, and executing the target task through the target container. After the target task is executed, destroying the target container by the first agent program to recycle the target physical machine, and closing the file sharing service by the second agent program.
In the embodiment, the target container is destroyed by the first proxy program after the target task is executed, so that the target physical machine is recovered, the waste of special hardware resources of the target physical machine can be avoided, meanwhile, the file sharing service is closed after the target task is executed, and the safety of data resources on the development machine and the target physical machine is ensured.
In some embodiments, determining the target physical machine in response to the execution command for the target task sent by the development machine includes resolving the execution command to obtain special hardware resource requirement information in response to the execution command for the target task sent by the development machine, and determining the target physical machine from the physical machine cluster according to the special hardware resource requirement information.
The special hardware resource requirement information refers to information of special hardware resources required for executing the target task. The special hardware resource requirement information includes the type, size, and number of special hardware resources.
A physical machine cluster refers to a group of physical computers with special hardware resources that the physical machine cluster provides to a developer as a whole.
When executing the target task requiring the special hardware resource, the server side responds to the execution command for the target task sent by the developer, analyzes the execution command to obtain the special hardware resource requirement information, and determines the target physical machine from the physical machine cluster according to the special hardware resource requirement information.
It can be understood that the server may select, from the physical machine cluster, a physical machine that meets the special hardware resource condition required by the special hardware resource requirement information as the target physical machine.
In some embodiments, the server configures the size and the number of the special hardware resources required for executing the target task according to the special hardware resource requirement information, and uses the physical machines capable of meeting the size and the number of the special hardware resources as target physical machines from the physical machine cluster according to the sorting algorithm.
In the above embodiment, the special hardware resource requirement information is determined according to the execution command of the target task, and the target physical machine meeting the special hardware resource requirement information is allocated, so that the special hardware resource is prevented from being wasted by adopting an on-demand allocation mode.
In some embodiments, after the target task is executed through the target container and the target task execution result is obtained, the method further comprises the steps of forwarding the target task execution result to a second agent program on the development machine through the first agent program, and receiving the target task execution result through a terminal receiving service started by the second agent program so as to output and display the target task execution result in the development machine.
The terminal receiving service refers to a system service component capable of transmitting input of a client to a background and transmitting output of the background back to the client. It can be understood that after the terminal is started to receive the service, the output of the background can be forwarded to the client, that is, the output log of the background can be forwarded to the client, so that the output of the background can be seen at the client.
Illustratively, after the developer sends the execution command for the target task, the developer opens the terminal to receive the service through the second agent, and after the target physical machine executes the target task through the target container, the developer obtains the execution result of the target task, the target physical machine forwards the target task execution result to a second agent program on the development machine through the first agent program, and the development machine receives the target task execution result through a terminal started by the second agent program, so that the target task execution result is output and displayed in the development machine.
In the above embodiment, the second agent is further configured to perform an agent docking function for forwarding communications between the developer and the physical machine, and by opening the terminal to receive the service, communication is set up between the first agent and the second agent, and the developer can see the target task execution result in the developer without performing additional operations, for example, without performing additional operations such as opening a web page or inputting a command, and can see the target task execution result in the developer, so that the developer can see the target task execution result.
In some embodiments, the method further comprises the steps of displaying a command line interface on the development machine, sending an execution command for the target task to the server according to an execution command code input on the command line interface, and determining the target physical machine in response to the execution command for the target task sent by the development machine, wherein the step of extracting the development machine identification in the execution command by the server comprises the step of distributing a corresponding target physical machine for the development machine uniquely represented by the development machine identification.
Among them, command line interface (CLI, command-LINE INTERFACE) is the most widely used user interface before the graphic user interface is popularized, usually does not support a mouse, and a user inputs an instruction through a keyboard, and the computer receives the instruction and then executes the instruction.
The developer identification is a uuid (Universally Unique Identifier, universal unique identification code) pre-stored on the developer. The developer identification is used to uniquely identify the developer.
Illustratively, a developer invokes a command line interface of the developer to cause the command line interface to be displayed on the developer, and the developer sends an execution command for a target task to the server according to an execution command code input by the developer on the command line interface. It will be appreciated that the execution command code includes a developer identifier, and therefore, the generated execution command for the target task also includes a developer identifier. The server side responds to an execution command aiming at a target task and sent by the development machine, extracts the development machine identification in the execution command, and distributes a corresponding target physical machine for the development machine uniquely represented by the development machine identification.
In the above embodiment, the target physical machine is allocated to the development machine uniquely characterized by the development machine identifier by extracting the development machine identifier in the execution command, so that the target physical machine is accurately allocated to the development machine.
In some embodiments, as shown in fig. 3, a flowchart of a method for scheduling hardware resources is provided, where the method is implemented through interaction among a server, a target physical machine, and a developer, and includes the following steps:
And 301, the development machine displays a command line interface, and the development machine sends an execution command aiming at the target task to the server according to the execution command code input in the command line interface.
And 302, the server side responds to an execution command aiming at a target task and sent by the development machine, analyzes the execution command to obtain special hardware resource demand information, and determines a target physical machine from a physical machine cluster according to the special hardware resource demand information.
The target physical machine is used for providing special hardware resources required for executing the target task.
Step 303, the server side extracts the developer identifier in the execution command of the target task, and allocates a corresponding target physical machine to the developer uniquely represented by the developer identifier.
Step 304, the second agent on the development machine is awakened and started, and the file sharing service is started for the system disk and the data disk on the development machine through the second agent on the development machine.
The file sharing service is used for realizing file sharing between the development machine and the target physical machine.
Step 305, starting a first proxy program on the target physical machine, and mounting the root directory of the development machine for starting the file sharing service to a target mounting point of the target physical machine through the first proxy program.
The starting sequence of the first agent program and the second agent program may be changed, and may be determined according to the requirement, and the embodiment is not limited herein.
And 306, the developer starts the target container through the first proxy program and replaces the root directory of the target container with the target mounting point of the target physical machine.
In step 307, the target physical machine executes the target task through the target container, and a target task execution result is obtained.
And 308, the target physical machine forwards the target task execution result to a second agent program on the development machine through the first agent program, and the development machine receives the target task execution result through a terminal receiving service started by the second agent program so as to output and display the target task execution result in the development machine.
And 309, after the target task is executed, destroying the target container by the target physical machine through the first agent program to recycle the target physical machine, and closing the file sharing service by the development machine through the second agent program.
In this embodiment, the root directory of the development machine is automatically mounted to the root directory of the target container through the first proxy program and the file sharing service, and the target task is executed through the target container, so that the consistency of the development environment and the running environment of the target task is ensured, the cost of the additional configuration environment of the development machine is reduced, the debugging time for combining the development machine with the special hardware resource is saved, the idle time after the special hardware resource is allocated to the development machine is reduced, and the utilization rate of the special hardware resource is further improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a hardware resource scheduling system for realizing the above related hardware resource scheduling method. The implementation of the solution provided by the system is similar to the implementation described in the above method, so the specific limitation in the embodiments of the hardware resource scheduling system provided below may refer to the limitation of the hardware resource scheduling method hereinabove, and will not be repeated herein.
In some embodiments, as shown in FIG. 4, a block diagram of a hardware resource scheduling system is provided, the system comprising a server 401 and a target physical machine 402.
The server 401 is configured to determine a target physical machine in response to an execution command for a target task sent by the developer, where the target physical machine is configured to provide special hardware resources required for executing the target task.
The target physical machine 402 is used for starting a first proxy program on the target physical machine, mounting a root directory of a development machine for starting file sharing service to a target mounting point of the target physical machine through the first proxy program, starting a target container through the first proxy program, replacing the root directory of the target container with the target mounting point of the target physical machine, and executing a target task through the target container to obtain a target task execution result.
In the hardware resource scheduling system, the root directory of the development machine is automatically mounted to the root directory of the target container through the first proxy program in the target physical machine and the file sharing service started on the development machine, and the target task is executed through the target container, so that the consistency of the development environment and the running environment of the target task is ensured, the debugging time for combining the development machine with the special hardware resource is saved, the idle time after the special hardware resource is distributed to the development personnel is reduced, and the utilization rate of the special hardware resource is further improved.
In some embodiments, as shown in FIG. 5, the system further includes a developer 403.
The development machine 403 is used for opening a file sharing service for a disk on the development machine 403 through a second agent program on the development machine 403, and the file sharing service is used for realizing file sharing between the development machine 403 and the target physical machine 402.
In some embodiments, the target physical machine 402 is configured to destroy the target container by the first agent after the target task is executed, to recycle the target physical machine 402, and the developer 403 is configured to close the file sharing service by the second agent.
In some embodiments, the server 401 is further configured to respond to an execution command for the target task sent by the developer 403, parse the execution command to obtain special hardware resource requirement information, and determine the target physical machine from the physical machine cluster according to the special hardware resource requirement information.
In some embodiments, after the target task is executed through the target container and the target task execution result is obtained, the target physical machine 402 is further configured to forward the target task execution result to a second agent on the developer through the first agent, and the developer 403 is further configured to receive the target task execution result through a terminal receiving service started by the second agent, so as to output and display the target task execution result.
In some embodiments, the development machine 403 is further configured to display a command line interface, and send an execution command for the target task to the server 401 according to the execution command code input in the command line interface. The server 401 is further configured to extract a developer identifier in the execution command, and allocate a corresponding target physical machine 402 to a developer 403 uniquely represented by the developer identifier.
In some embodiments, a computer device is provided, which may be a server or a target physical machine, and an internal structure diagram thereof may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to perform at least part of the steps of a method for scheduling hardware resources.
In some embodiments, a computer device is provided, which may be a development machine, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to perform at least part of the steps of a method for scheduling hardware resources. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components. In some embodiments, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In some embodiments, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program, which may be stored on a non-transitory computer readable storage medium and which, when executed, may comprise the steps of the above-described embodiments of the methods. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (11)

1.一种硬件资源调度方法,其特征在于,所述方法包括:1. A hardware resource scheduling method, characterized in that the method comprises: 响应于开发机发送的针对目标任务的执行命令,确定目标物理机;所述目标物理机用于提供执行所述目标任务所需的特殊硬件资源;In response to an execution command for a target task sent by a development machine, determining a target physical machine; the target physical machine is used to provide special hardware resources required to execute the target task; 启动所述目标物理机上的第一代理程序,通过所述第一代理程序将开启文件共享服务的所述开发机的根目录挂载到所述目标物理机的目标挂载点;Starting a first agent program on the target physical machine, and mounting the root directory of the development machine on which the file sharing service is enabled to a target mount point of the target physical machine through the first agent program; 通过所述第一代理程序启动目标容器,并将所述目标容器的根目录替换为所述目标物理机的所述目标挂载点;Starting a target container through the first agent program, and replacing the root directory of the target container with the target mount point of the target physical machine; 通过所述目标容器执行所述目标任务,得到目标任务执行结果。The target task is executed through the target container to obtain a target task execution result. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, further comprising: 通过所述开发机上的第二代理程序,针对所述开发机上的磁盘开启文件共享服务;所述文件共享服务用于实现所述开发机和所述目标物理机之间的文件共享。A file sharing service is enabled for the disk on the development machine through the second agent program on the development machine; the file sharing service is used to realize file sharing between the development machine and the target physical machine. 3.根据权利要求2所述的方法,其特征在于,所述磁盘包括系统盘和数据盘。3 . The method according to claim 2 , wherein the disk comprises a system disk and a data disk. 4.根据权利要求2所述的方法,其特征在于,所述方法还包括:4. The method according to claim 2, further comprising: 在所述目标任务执行结束后,通过所述第一代理程序销毁所述目标容器,以回收所述目标物理机;After the target task is executed, destroying the target container through the first agent program to recycle the target physical machine; 通过所述第二代理程序关闭所述文件共享服务。The file sharing service is closed by the second agent program. 5.根据权利要求1所述的方法,其特征在于,所述响应于开发机发送的针对目标任务的执行命令,确定目标物理机,包括:5. The method according to claim 1, wherein determining the target physical machine in response to the execution command for the target task sent by the development machine comprises: 响应于开发机发送的针对目标任务的执行命令,对所述执行命令进行解析,得到特殊硬件资源需求信息;In response to an execution command for a target task sent by a development machine, the execution command is parsed to obtain special hardware resource requirement information; 根据所述特殊硬件资源需求信息,从物理机集群中确定所述目标物理机。The target physical machine is determined from a physical machine cluster according to the special hardware resource requirement information. 6.根据权利要求1所述的方法,其特征在于,所述通过所述目标容器执行所述目标任务,得到目标任务执行结果之后,还包括:6. The method according to claim 1, characterized in that after executing the target task through the target container and obtaining the target task execution result, it also includes: 通过所述第一代理程序向所述开发机上的第二代理程序转发所述目标任务执行结果;forwarding the target task execution result to the second agent program on the development machine through the first agent program; 通过所述第二代理程序开启的终端接收服务接收所述目标任务执行结果,以将所述目标任务执行结果在所述开发机中输出显示。The target task execution result is received through the terminal receiving service opened by the second agent program, so as to output and display the target task execution result in the development machine. 7.根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1 to 6, further comprising: 在开发机显示命令行界面;Display the command line interface on the development machine; 根据在所述命令行界面输入的执行命令代码,向服务端发送针对所述目标任务的执行命令;Sending an execution command for the target task to the server according to the execution command code entered in the command line interface; 所述响应于开发机发送的针对目标任务的执行命令,确定目标物理机,包括:The step of determining the target physical machine in response to the execution command for the target task sent by the development machine includes: 所述服务端提取所述执行命令中的开发机标识,为所述开发机标识所唯一表征的开发机分配相应的目标物理机。The server extracts the development machine identifier in the execution command and allocates a corresponding target physical machine to the development machine uniquely represented by the development machine identifier. 8.一种硬件资源调度系统,其特征在于,所述系统包括:服务端和目标物理机;8. A hardware resource scheduling system, characterized in that the system comprises: a server and a target physical machine; 所述服务端,用于响应于开发机发送的针对目标任务的执行命令,确定所述目标物理机;所述目标物理机用于提供执行所述目标任务所需的特殊硬件资源;The server is configured to determine the target physical machine in response to an execution command for a target task sent by the development machine; the target physical machine is configured to provide special hardware resources required to execute the target task; 所述目标物理机,用于启动所述目标物理机上的第一代理程序,通过所述第一代理程序将开启文件共享服务的所述开发机的根目录挂载到所述目标物理机的目标挂载点;通过所述第一代理程序启动目标容器,并将所述目标容器的根目录替换为所述目标物理机的所述目标挂载点;通过所述目标容器执行所述目标任务,得到目标任务执行结果。The target physical machine is used to start the first agent program on the target physical machine, and mount the root directory of the development machine that starts the file sharing service to the target mount point of the target physical machine through the first agent program; start the target container through the first agent program, and replace the root directory of the target container with the target mount point of the target physical machine; execute the target task through the target container to obtain the target task execution result. 9.根据权利要求8所述的系统,其特征在于,所述系统还包括:9. The system according to claim 8, further comprising: 开发机,用于通过所述开发机上的第二代理程序,针对所述开发机上的磁盘开启文件共享服务;其中,所述文件共享服务用于实现所述开发机和所述目标物理机之间的文件共享。The development machine is used to enable a file sharing service for a disk on the development machine through a second agent program on the development machine; wherein the file sharing service is used to realize file sharing between the development machine and the target physical machine. 10.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述的方法的步骤。10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program. 11.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。11. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN202211410278.7A 2022-11-11 2022-11-11 Hardware resource scheduling method, system, computer device and storage medium Active CN115756840B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211410278.7A CN115756840B (en) 2022-11-11 2022-11-11 Hardware resource scheduling method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211410278.7A CN115756840B (en) 2022-11-11 2022-11-11 Hardware resource scheduling method, system, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN115756840A CN115756840A (en) 2023-03-07
CN115756840B true CN115756840B (en) 2025-09-30

Family

ID=85369365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211410278.7A Active CN115756840B (en) 2022-11-11 2022-11-11 Hardware resource scheduling method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN115756840B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118964096A (en) * 2024-10-17 2024-11-15 金篆信科有限责任公司 Data backup method, device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035220A (en) * 2020-09-30 2020-12-04 北京百度网讯科技有限公司 Processing method, device and equipment for operation task of development machine and storage medium
CN113742716A (en) * 2021-11-04 2021-12-03 腾讯科技(深圳)有限公司 Code running method, device, electronic equipment, storage medium and program product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120246226A1 (en) * 2011-03-23 2012-09-27 Tappin Inc. System and method for sharing data from a local network to a remote device
US9898219B1 (en) * 2014-06-30 2018-02-20 EMC IP Holding Company LLC Allocating a device to a container
CN110673961A (en) * 2018-07-03 2020-01-10 山东华软金盾软件股份有限公司 Remote debugging method based on NFS service
CN114281263B (en) * 2021-12-27 2024-03-29 深圳市名竹科技有限公司 Storage resource processing method, system and equipment of container cluster management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035220A (en) * 2020-09-30 2020-12-04 北京百度网讯科技有限公司 Processing method, device and equipment for operation task of development machine and storage medium
CN113742716A (en) * 2021-11-04 2021-12-03 腾讯科技(深圳)有限公司 Code running method, device, electronic equipment, storage medium and program product

Also Published As

Publication number Publication date
CN115756840A (en) 2023-03-07

Similar Documents

Publication Publication Date Title
CN112104723B (en) Multi-cluster data processing system and method
CN109976667B (en) Mirror image management method, device and system
US10380103B2 (en) Object data updating method and apparatus in an object storage system
CN109189334B (en) Block chain network service platform, capacity expansion method thereof and storage medium
CN111901294A (en) Method for constructing online machine learning project and machine learning system
US8893272B2 (en) Method and device for recombining runtime instruction
US9275238B2 (en) Method and apparatus for data security reading
CN110704161A (en) Virtual machine creation method and device and computer equipment
CN107209683A (en) Backup Images recover
US12417149B2 (en) Service cluster instance backup and recovery methods and related devices
US9804878B2 (en) Using a status indicator for a merge operation for writing data associated with a virtual machine
CN115756840B (en) Hardware resource scheduling method, system, computer device and storage medium
CN113296891A (en) Multi-scene knowledge graph processing method and device based on platform
CN116360918A (en) Modeling data processing method, modeling data processing device, computer equipment and storage medium
CN110008261B (en) External change detection
CN114489956A (en) A cloud platform-based instance startup method and device
CN116820527B (en) Program upgrading method, device, computer equipment and storage medium
CN116016134A (en) Cross-cluster communication deployment method, device and computer equipment
US20180341717A1 (en) Providing instant preview of cloud based file
CN115309491A (en) Logic algorithm of platform system
CN116260861B (en) Service registration discovery method, device, computer equipment and storage medium
CN119922260A (en) Method, apparatus, device and storage medium for configuring message cards
CN119149514A (en) Data processing method, apparatus, computer device, storage medium, and program product
CN119718507A (en) Application processing method, apparatus, computer device, readable storage medium, and program product
CN120162170A (en) Middleware state transfer method, device, equipment, storage medium and program product

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
GR01 Patent grant