CN112099946A - Resource scheduling method, device and storage medium - Google Patents

Resource scheduling method, device and storage medium Download PDF

Info

Publication number
CN112099946A
CN112099946A CN202010848846.6A CN202010848846A CN112099946A CN 112099946 A CN112099946 A CN 112099946A CN 202010848846 A CN202010848846 A CN 202010848846A CN 112099946 A CN112099946 A CN 112099946A
Authority
CN
China
Prior art keywords
target
display card
type
application program
card
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
CN202010848846.6A
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010848846.6A priority Critical patent/CN112099946A/en
Publication of CN112099946A publication Critical patent/CN112099946A/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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure provides a resource scheduling method, a resource scheduling device and a storage medium, which relate to the technical field of cloud computing, wherein the method comprises the steps of obtaining attribute information of a target application program; determining the target type of the target application program according to the attribute information; determining a target display card type matched with the target type when the target type is determined not to be the same as the type of the historical target application program on the target virtual machine; determining whether an idle target display card exists in the display cards of the target type bound by the target virtual machine; when the idle target display card is determined, determining the target display card as the display card required by the target virtual machine to run the target application program, and switching the display card currently used by the target virtual machine into the target display card. According to the method and the device, through dynamic calling of the display card resources, the actual rendering requirements of each virtual machine are met, and reasonable utilization of the display card resources can be realized.

Description

Resource scheduling method, device and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a resource scheduling method, an apparatus, and a storage medium.
Background
The cloud game is a game mode based on cloud computing, all games run at a server side in a running mode of the cloud game, and a rendered game picture is compressed by the server and then transmitted to game equipment of a user through a network. At the client, the user's gaming device does not require any high-end processor and graphics card, but only basic video decompression capability.
In the related art, in a cloud game scenario, a graphics card resource capable of meeting the user usage requirement is usually fixedly allocated to each user, that is, the graphics card resource allocated to a user is exclusively owned by the user.
In the technology, the display card resources allocated by all users are fixed, but the same user cannot always use the application with high load, that is, the display card resources fixedly allocated to the user cannot always run at full load, so that the display card resources are wasted, and the reasonable utilization of the display card resources cannot be ensured.
Disclosure of Invention
The embodiment of the disclosure provides a resource scheduling method, a resource scheduling device and a storage medium, which can solve the problems that display card resources are wasted and reasonable utilization of the display card resources cannot be obtained in the prior art. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a resource scheduling method, the method including:
acquiring attribute information of a target application program; the target application program is an application program which runs at the top layer of a display desktop of the target virtual machine currently; the attribute information is used for identifying the target application program;
determining the target type of the target application program according to the attribute information;
determining a target display card type matched with the target type when the target type is determined not to be the same as the type of the historical target application program on the target virtual machine;
determining whether an idle target display card exists in the display cards of the target type bound with the target virtual machine, wherein the display cards bound with the target virtual machine at least comprise a low-end display card, a middle-end display card and a high-end display card;
when the idle target display card is determined, determining the target display card as the display card required by the target virtual machine to run the target application program, and switching the display card currently used by the target virtual machine into the target display card.
The embodiment of the disclosure provides a resource scheduling method, which includes determining a target type of a target application program according to attribute information when the attribute information of the target application program is acquired, determining a target graphics card type matched with the target type when the target type is determined to be different from a type of a historical target application program on a target virtual machine, determining whether an idle target graphics card exists in graphics cards of the target type bound to the target virtual machine, and determining the target graphics card as a graphics card required by the target virtual machine to run the target application program when the idle target graphics card exists, so that the target graphics card can perform image rendering work of the target application program. It can be known that, in the present disclosure, fixed display card resources are not allocated to each user, but a corresponding target display card type is matched according to a target type of a currently running target application program, and then an idle display card in the display card of the target display card type is allocated to a target virtual machine, so that through dynamic call of display card resources, not only is an actual rendering requirement of each virtual machine satisfied, but also reasonable utilization of display card resources can be realized.
In one embodiment, before determining that the target type is not the same as the type of the historical target application program on the target virtual machine, determining a target graphics card type matching the target type, further includes:
acquiring attribute information of a historical target application program on the target virtual machine;
determining the type of the historical target application program according to the attribute information of the historical target application program;
comparing the target type to the historical type of target application to determine whether the target type is the same as the historical type of target application.
In one embodiment, the switching the graphics card currently used by the target virtual machine to the target graphics card includes:
saving a display card configuration instruction in a currently used display card;
forbidding the display card drive of the currently used display card, and enabling the display card drive of the target display card;
after the display card driver of the target display card is successfully started, sending the display card configuration instruction to the target display card;
restoring all configurations of previously used graphics cards by executing the graphics card configuration instructions on the target graphics card.
In an embodiment, the determining whether there is a free target graphics card in the graphics cards of the target type bound by the target virtual machine includes:
searching a pre-stored display card resource scheduling table for a display card of a target type bound with the target virtual machine; the display card resource scheduling table stores the mapping relation among the operating system of the virtual machine, the type of the display card and the use state;
acquiring the use state of each display card of the target type;
and determining whether an idle target display card exists according to the use state of each display card of the target type.
In one embodiment, the determining the target type of the target application according to the attribute information includes:
searching a target type matched with the attribute information in a prestored application program classification table; the application program classification table stores the mapping relation between the attribute information of the application program and the type of the application program.
In one embodiment, the determining the type of the target graphics card matching the target type includes:
searching a target display card type matched with the target type in a pre-stored display card classification table; the display card classification table stores the mapping relation between the application program type and the display card type.
In one embodiment, before the disabling of the graphics card driver of the currently used graphics card, the method further includes:
and sending a display card switching prompt message to a zero terminal connected with the target virtual machine, so that the zero terminal displays the display card switching prompt message.
According to a second aspect of the embodiments of the present disclosure, there is provided a resource scheduling apparatus, the apparatus including:
the first acquisition module is used for acquiring the attribute information of the target application program; the target application program is an application program which runs at the top layer of a display desktop of the target virtual machine currently; the attribute information is used for identifying the target application program;
the first determining module is used for determining the target type of the target application program according to the attribute information;
the second determination module is used for determining the type of the target display card matched with the target type when the target type is determined not to be the same as the type of the historical target application program on the target virtual machine;
a third determining module, configured to determine whether there is an idle target graphics card in the graphics cards of the target type bound to the target virtual machine, where the graphics cards bound to the target virtual machine at least include a low-end graphics card, a middle-end graphics card, and a high-end graphics card;
and the switching module is used for determining the target display card as the display card required by the target virtual machine to operate the target application program when the idle target display card is determined, and switching the display card currently used by the target virtual machine into the target display card.
The embodiment of the disclosure provides a resource scheduling device, which determines a target type of a target application program according to attribute information when acquiring the attribute information of the target application program, determines a target graphics card type matched with the target type when determining that the target type is different from a type of a historical target application program on a target virtual machine, determines whether an idle target graphics card exists in graphics cards of the target type bound to the target virtual machine, and determines the target graphics card as a graphics card required by the target virtual machine to run the target application program when determining that the idle target graphics card exists, so that the target graphics card can perform image rendering work of the target application program. It can be known that, in the present disclosure, fixed display card resources are not allocated to each user, but a corresponding target display card type is matched according to a target type of a currently running target application program, and then an idle display card in the display card of the target display card type is allocated to a target virtual machine, so that through dynamic call of display card resources, not only is an actual rendering requirement of each virtual machine satisfied, but also reasonable utilization of display card resources can be realized.
In one embodiment, the apparatus further comprises a second obtaining module, a fourth determining module, and a comparing module;
the second obtaining module is used for obtaining attribute information of a historical target application program on the target virtual machine;
the fourth determining module is used for determining the type of the historical target application program according to the attribute information of the historical target application program;
the comparison module is used for comparing the target type with the type of the historical target application program to determine whether the target type is the same as the type of the historical target application program.
In one embodiment, the switching module comprises a saving submodule, a starting submodule, a first sending submodule and a restoring submodule;
the storage submodule is used for storing a display card configuration instruction in a currently used display card;
the starting sub-module is used for forbidding the display card driver of the currently used display card and starting the display card driver of the target display card;
the first sending submodule is used for sending the display card configuration instruction to the target display card after the display card driver of the target display card is successfully started;
the restoring submodule is used for restoring all the configurations of the used display cards by executing the display card configuration instruction on the target display card.
In one embodiment, the third determining module includes a first searching sub-module, an obtaining sub-module and a determining sub-module;
the first searching submodule is used for searching a graphics card of a target type bound with the target virtual machine in a pre-stored graphics card resource scheduling table; the display card resource scheduling table stores the mapping relation among the operating system of the virtual machine, the type of the display card and the use state;
the acquisition submodule is used for acquiring the use state of each target type display card;
and the determining submodule is used for determining whether an idle target display card exists according to the use state of each display card of the target type.
In one embodiment, the first determination module includes a second lookup sub-module;
the second searching submodule is used for searching a target type matched with the attribute information in a prestored application program classification table; the application program classification table stores the mapping relation between the attribute information of the application program and the type of the application program.
In one embodiment, the second determination module includes a third lookup submodule;
the third searching submodule is used for searching a target display card type matched with the target type in a pre-stored display card classification table; the display card classification table stores the mapping relation between the application program type and the display card type.
In one embodiment, the switching module further comprises a second sending submodule;
and the second sending submodule is used for sending a display card switching prompt message to a zero terminal connected with the target virtual machine, so that the zero terminal displays the display card switching prompt message.
According to a third aspect of the embodiments of the present disclosure, there is provided a resource scheduling apparatus, including: a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the resource scheduling method described in the first aspect and any embodiment of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, having at least one computer instruction stored therein, where the instruction is loaded and executed by a processor to implement the steps performed in the resource scheduling method described in the first aspect and any embodiment of the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a resource scheduling method provided by an embodiment of the present disclosure;
fig. 2 is a basic implementation framework diagram of a cloud game platform provided by an embodiment of the present disclosure;
fig. 3 is a block diagram of a cloud gaming system provided by an embodiment of the present disclosure;
FIG. 4 is an example diagram of a graphics card resource schedule provided by an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an example of a graphics card resource schedule provided by an embodiment of the present disclosure;
fig. 6 is a flowchart of a resource scheduling method provided by an embodiment of the present disclosure;
fig. 7 is a flowchart of a resource scheduling method provided by an embodiment of the present disclosure;
fig. 8a is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 8b is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 8c is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 8d is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 8e is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 8f is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 8g is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 9 is a structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
An embodiment of the present disclosure provides a resource scheduling method, as shown in fig. 1, the method includes the following steps:
and step 101, acquiring attribute information of the target application program.
The target application program is an application program which runs at the top layer of a display desktop of the target virtual machine currently; the top layer of the display desktop refers to a layer which is not covered by other layers. The attribute information is used for identifying the target application program, and the target virtual machine is a currently running virtual machine.
For example, as shown in fig. 2, which is a basic implementation framework diagram of a cloud game platform, a virtual desktop can call, according to the needs of a game application, display card resources in an underlying display resource pool, where the display card resource pool is composed of a plurality of display cards with different sizes and different performances, and the display cards are organized together in the form of a GPU (Graphics Processing Unit) cluster or a blade cluster. As shown in fig. 3, which is a structural diagram of a cloud game system, the zero terminal communicates with a cloud server to implement processing of various applications, and specifically, the cloud server allocates a virtual machine to each zero terminal connected to the cloud server, where the virtual machine is used to process a service of the zero terminal connected to the virtual machine. The zero terminal generates an application request by controlling a virtual machine connected with the zero terminal, wherein the operation processing in the application request is processed by a central processing unit of the virtual machine, and the processing such as image rendering in the application request is processed by calling a display card resource in a display card resource pool by the virtual machine; in fig. 3, four virtual machines and four corresponding zero terminals are taken as an example.
For example, the cloud server monitors an application program located at the frontmost end in the display window of the target virtual machine, that is, an application program being operated or used by the user, and obtains attribute information of the target application program, where the attribute information may be a name of the target application program, for example.
And step 102, determining the target type of the target application program according to the attribute information.
Optionally, the target type matched with the attribute information is searched in a pre-stored application program classification table.
The application program classification table stores the mapping relationship between the attribute information of the application program and the type of the application program.
For example, before this step is performed, each application needs to be classified in advance, that is, all applications are classified into: recording an application program with high requirement on image rendering capacity as a high rendering level application program; recording application programs with medium requirements on image rendering capacity as medium rendering level application programs; and recording the application program with low requirement on the image rendering capability as a low rendering level application program, and then correspondingly storing the classification information of the application program and the attribute information of the application program to establish an application program classification table and storing the application program classification table in the system. Therefore, when the attribute information of the target application program is acquired, the classification information of the application program matched with the attribute information of the target application program can be searched in the application program classification table, and the classification information of the application program is determined as the target type of the target application program.
And 103, determining the type of the target display card matched with the target type when the target type is determined not to be the same as the type of the historical target application program on the target virtual machine.
Optionally, the target graphics card type matched with the target type is searched in a pre-stored graphics card classification table.
And the display card classification table stores the mapping relation between the application program type and the display card type.
For example, when it is determined that the target type is not the same as the type of the historical target application program on the target virtual machine, it is indicated that the type of the application program running on the determined target virtual machine is changed, and it is required to determine the type of the target graphics card matching with the target type. The method includes the steps that a plurality of display cards in a display card resource pool are classified in advance according to image rendering capacity, for example, the display cards are divided into a high-end display card, a middle-end display card and a low-end display card, wherein the high-end display card refers to the display card with high image rendering capacity and is suitable for processing high-end games or other applications with high image rendering capacity requirements; the middle-end display card is a display card with medium image rendering capability and is suitable for processing middle-end games or other applications with medium requirements on the image rendering capability; the low-end display card refers to a display card with weak image rendering capability, and is suitable for processing low-end games or other applications with low requirements on the image rendering capability. Further, after the display cards are classified, the types of the display cards and the types of the application programs are correspondingly stored, namely, the application programs with high rendering level are correspondingly stored with the high-end display card, the application programs with medium rendering level are correspondingly stored with the middle-end display card, and the application programs with low rendering level are correspondingly stored with the low-end display card, so that a display card classification table is established and stored in the system. Therefore, when the target type of the target application program is obtained, the display card type matched with the target type can be found in the display card classification table, and the display card type is determined as the target display card type.
Before step 103 is executed, the method further includes the following steps:
acquiring attribute information of a historical target application program on the target virtual machine; determining the type of the historical target application program according to the attribute information of the historical target application program; comparing the target type to the historical type of target application to determine whether the target type is the same as the historical type of target application.
For example, when the target type of the target application program is determined, the target type is recorded, attribute information of a historical target application program on the target virtual machine is acquired, and the type of the historical target application program is searched in an application program classification table according to the attribute information, wherein the historical target application program is an application program which is operated last time on the target virtual machine, the target type of the target application program is compared with the type of the historical target application program, whether the target type of the target application program is the same as the type of the historical target application program is judged, and when the target type of the target application program is determined to be different from the type of the historical target application program, the type of the application program which is operated on the target virtual machine is changed; and when the target type of the target application program is determined to be the same as the type of the historical target application program, indicating that the type of the application program running on the target virtual machine is not changed.
And 104, determining whether an idle target display card exists in the display cards of the target type bound with the target virtual machine.
The display cards bound with the target virtual machine at least comprise a low-end display card, a middle-end display card and a high-end display card.
Optionally, a graphics card of a target type bound to the target virtual machine is searched in a pre-stored graphics card resource scheduling table; acquiring the use state of each display card of the target type; and determining whether an idle target display card exists according to the use state of each display card of the target type.
The display card resource scheduling table stores the mapping relation among the operating system of the virtual machine, the type of the display card and the use state.
Illustratively, when a target graphics card type matched with the target type is determined, all graphics cards with the graphics card types being the target graphics card type are searched in a pre-stored graphics card resource scheduling table, then the use state of each graphics card in the graphics cards is acquired, whether the use state of each graphics card is idle or occupied is determined, and when a graphics card with the use state being idle is present, the graphics card in the idle state is determined as the target graphics card.
It should be noted that, before step 104 is executed, a display card resource scheduling table needs to be established in advance, in this disclosure, the operating system of each virtual machine needs to load the display card drivers of all the display cards corresponding to the operating system, and the registration work between the display cards and the corresponding operating systems is completed in advance, so that the operating system of the virtual machine can identify each display card. And the operating system of each virtual machine can recognize a plurality of display cards. Specifically, a certain number and types of graphics cards can be bound to each virtual machine according to requirements, which is not limited by the present disclosure. For example, each virtual machine needs to bind at least one low-end graphics card, at least one middle-end graphics card and at least one high-end graphics card, so that one operating system of the virtual machine can identify a plurality of graphics cards. In addition, in order to ensure effective utilization of resources, each graphics card may also register with a plurality of operating systems in a plurality of virtual machines at the same time, that is, the operating systems can identify the same graphics card. The specific display card resource scheduling table is shown in fig. 4 and 5, and each operating system in fig. 4 is respectively bound to each display card; in fig. 5, each operating system is respectively bound to one high-end display card, two middle-end display cards, and one low-end display card, the use state of each display card is stored in the resource scheduling table, and the server updates the use state of the display card in real time.
It should be noted that, when it is determined that there are multiple idle graphics cards in the graphics card of the target type bound to the target virtual machine, one of the multiple idle graphics cards may be randomly selected as the target graphics card.
And 105, when determining that an idle target display card exists, determining the target display card as a display card required by the target virtual machine to run the target application program, and switching the display card currently used by the target virtual machine into the target display card.
Optionally, as shown in fig. 6, the step of switching the currently used display card of the target virtual machine to the target display card is as follows:
and 1051, storing the display card configuration instruction in the currently used display card.
For example, when it is determined that there is an idle target graphics card, all graphics card configuration instructions in the graphics card currently used by the target virtual machine are obtained and stored.
Step 1052, disabling the display card driver of the currently used display card, and enabling the display card driver of the target display card.
In an example, when all the display card configuration instructions in the display card currently used by the target virtual machine are saved, the display card driver of the currently used display card is disabled, and the display card driver of the target display card is enabled, so that switching from the currently used display card to the target display card is realized.
And 1053, after the display card driver of the target display card is successfully started, sending the display card configuration instruction to the target display card.
For example, when the currently used graphics card is switched to the target graphics card and the graphics card driver of the target graphics card is successfully enabled, all the graphics card configuration instructions in the currently used graphics card of the target virtual machine, which are stored in advance, are sent to the target graphics card.
And 1054, restoring all the configurations of the used display cards by executing the display card configuration instruction on the target display card.
For example, when the target display card receives all the display card configuration instructions, the display card configuration instructions are executed to restore all the configurations of the previously used display card, after the configuration is completed, the target display card can normally work, the operating system of the target virtual machine can access the target display card through the display card driver of the target display card, and the image rendering work of the target application program is executed through the target display card.
It should be noted that, after the currently used graphics card is switched to the target graphics card, the cloud server needs to modify the use state of the currently used graphics card bound by the target virtual machine to idle, modify the use state of the target graphics card to occupied, and record information of the target virtual machine and the corresponding operating system, etc. that occupy the target graphics card, so that the cloud server can manage each graphics card resource conveniently.
Further, as shown in fig. 7, before the step 1052 is executed, the following step 1055 is further included:
and 1055, sending a display card switching prompt message to a zero terminal connected with the target virtual machine, so that the zero terminal displays the display card switching prompt message.
For example, since the time required for the video card to switch to normal operation is usually within one second, when the currently used video card needs to be switched to the target video card, the cloud server may send a video card switching prompt message to the zero terminal connected to the target virtual machine, so that when the zero terminal receives the video card switching prompt message, the text information of the video card switching prompt message is displayed, or the video card switching prompt message is voice-broadcasted, or the video card switching prompt message is displayed in a picture form, or the video card switching prompt message is displayed in a special effect form, so as to inform a user that the video card is being switched.
Therefore, the switching between the two display cards can be realized, the switching time is short, the image rendering can be ensured to be uninterrupted, and the switched display card resources are matched with the target application program, so that the user requirements can be met.
The embodiment of the disclosure provides a resource scheduling method, which includes determining a target type of a target application program according to attribute information when the attribute information of the target application program is acquired, determining a target graphics card type matched with the target type when the target type is determined to be different from a type of a historical target application program on a target virtual machine, determining whether an idle target graphics card exists in graphics cards of the target type bound to the target virtual machine, and determining the target graphics card as a graphics card required by the target virtual machine to run the target application program when the idle target graphics card exists, so that the target graphics card can perform image rendering work of the target application program. It can be known that, in the present disclosure, fixed display card resources are not allocated to each user, but a corresponding target display card type is matched according to a target type of a currently running target application program, and then an idle display card in the display card of the target display card type is allocated to a target virtual machine, so that through dynamic call of display card resources, not only is an actual rendering requirement of each virtual machine satisfied, but also reasonable utilization of display card resources can be realized; in addition, the switching time is short, the image rendering can be guaranteed to be uninterrupted, and the switched display card resources are matched with the target application program, so that the user requirements can be met.
Based on the resource scheduling method described in the foregoing embodiment, the following is an embodiment of the apparatus of the present disclosure, and may be used to execute the embodiment of the method of the present disclosure.
An embodiment of the present disclosure provides a resource scheduling apparatus, as shown in fig. 8a, the resource scheduling apparatus 80 includes: a first acquisition module 801, a first determination module 802, a second determination module 803, a third determination module 804, and a handover determination module 805.
The first obtaining module 801 is configured to obtain attribute information of a target application.
The target application program is an application program which runs at the top layer of a display desktop of the target virtual machine currently; the attribute information is used to identify the target application.
A first determining module 802, configured to determine a target type of the target application according to the attribute information.
A second determining module 803, configured to determine, when it is determined that the target type is not the same as the type of the historical target application program on the target virtual machine, a target graphics card type matching the target type.
A third determining module 804, configured to determine whether there is an idle target graphics card in the graphics cards of the target type bound to the target virtual machine, where the graphics cards bound to the target virtual machine include at least one low-end graphics card, one middle-end graphics card, and one high-end graphics card.
The switching module 805 is configured to, when it is determined that there is an idle target graphics card, determine the target graphics card as a graphics card required by the target virtual machine to run the target application program, and switch a graphics card currently used by the target virtual machine to the target graphics card.
In one embodiment, as shown in fig. 8b, the apparatus further comprises a second obtaining module 806, a fourth determining module 807 and a comparing module 808.
The second obtaining module 806 is configured to obtain attribute information of a historical target application program on the target virtual machine.
The fourth determining module 807 is configured to determine the type of the historical target application according to the attribute information of the historical target application.
The comparing module 808 is configured to compare the target type with the type of the historical target application to determine whether the target type is the same as the type of the historical target application.
In one embodiment, as shown in fig. 8c, the switching module 805 includes a saving sub-module 8051, a starting sub-module 8052, a first sending sub-module 8053, and a restoring sub-module 8054.
The saving submodule 8051 is configured to save a graphics card configuration instruction in a currently used graphics card.
The starting sub-module 8052 is configured to disable a graphics card driver of a currently used graphics card, and enable a graphics card driver of the target graphics card.
The first sending sub-module 8053 is configured to send the graphics card configuration instruction to the target graphics card after the graphics card driver of the target graphics card is successfully enabled.
The restoring sub-module 8054 is configured to restore all configurations of the previously used display cards by executing the display card configuration instruction on the target display card.
In one embodiment, as shown in FIG. 8d, the third determination module 804 includes a first lookup sub-module 8041, an acquisition sub-module 8042, and a determination sub-module 8043.
The first searching sub-module 8041 is configured to search, in a pre-stored graphics card resource scheduling table, a graphics card of a target type bound to the target virtual machine; the display card resource scheduling table stores the mapping relation among the operating system of the virtual machine, the type of the display card and the use state.
The obtaining sub-module 8042 is configured to obtain a use state of each target type graphics card.
The determining submodule 8043 is configured to determine whether there is an idle target graphics card according to the use state of each graphics card of the target type.
In one embodiment, as shown in FIG. 8e, the first determination module 802 includes a second lookup sub-module 8021.
The second searching sub-module 8021 is configured to search a pre-stored application program classification table for a target type matching the attribute information.
The application program classification table stores the mapping relation between the attribute information of the application program and the type of the application program.
In one embodiment, as shown in FIG. 8f, the second determination module 803 includes a third lookup sub-module 8031.
The third searching sub-module 8031 is configured to search a pre-stored graphics card classification table for a target graphics card type matching the target type.
The display card classification table stores the mapping relation between the application program type and the display card type.
In one embodiment, as shown in fig. 8g, the switching module 805 further includes a second transmitting submodule 8055.
The second sending submodule 8055 is configured to send a display card switching prompt message to a zero terminal connected to the target virtual machine, so that the zero terminal displays the display card switching prompt message.
The embodiment of the disclosure provides a resource scheduling device, which determines a target type of a target application program according to attribute information when acquiring the attribute information of the target application program, determines a target graphics card type matched with the target type when determining that the target type is different from a type of a historical target application program on a target virtual machine, determines whether an idle target graphics card exists in graphics cards of the target type bound to the target virtual machine, and determines the target graphics card as a graphics card required by the target virtual machine to run the target application program when determining that the idle target graphics card exists, so that the target graphics card can perform image rendering work of the target application program. It can be known that, in the present disclosure, fixed display card resources are not allocated to each user, but a corresponding target display card type is matched according to a target type of a currently running target application program, and then an idle display card in the display card of the target display card type is allocated to a target virtual machine, so that through dynamic call of display card resources, not only is an actual rendering requirement of each virtual machine satisfied, but also reasonable utilization of display card resources can be realized; in addition, the switching time is short, the image rendering can be guaranteed to be uninterrupted, and the switched display card resources are matched with the target application program, so that the user requirements can be met.
Referring to fig. 9, an embodiment of the present disclosure further provides a resource scheduling apparatus, where the resource scheduling apparatus includes a receiver 901, a transmitter 902, a memory 903 and a processor 904, where the transmitter 902 and the memory 903 are respectively connected to the processor 904, the memory 903 stores at least one computer instruction, and the processor 904 is configured to load and execute the at least one computer instruction to implement the resource scheduling method described in the embodiment corresponding to fig. 1.
Based on the resource scheduling method described in the embodiment corresponding to fig. 1, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the resource scheduling method described in the embodiment corresponding to fig. 1, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for scheduling resources, the method comprising:
acquiring attribute information of a target application program; the target application program is an application program which runs at the top layer of a display desktop of the target virtual machine currently; the attribute information is used for identifying the target application program;
determining the target type of the target application program according to the attribute information;
determining a target display card type matched with the target type when the target type is determined not to be the same as the type of the historical target application program on the target virtual machine;
determining whether an idle target display card exists in the display cards of the target type bound with the target virtual machine, wherein the display cards bound with the target virtual machine at least comprise a low-end display card, a middle-end display card and a high-end display card;
when the idle target display card is determined, determining the target display card as the display card required by the target virtual machine to run the target application program, and switching the display card currently used by the target virtual machine into the target display card.
2. The method of claim 1, further comprising, prior to determining that the target type is not the same as a type of a historical target application on the target virtual machine, determining a target graphics card type that matches the target type:
acquiring attribute information of a historical target application program on the target virtual machine;
determining the type of the historical target application program according to the attribute information of the historical target application program;
comparing the target type to the historical type of target application to determine whether the target type is the same as the historical type of target application.
3. The method of claim 1, wherein the switching the graphics card currently used by the target virtual machine to the target graphics card comprises:
saving a display card configuration instruction in a currently used display card;
forbidding the display card drive of the currently used display card, and enabling the display card drive of the target display card;
after the display card driver of the target display card is successfully started, sending the display card configuration instruction to the target display card;
restoring all configurations of previously used graphics cards by executing the graphics card configuration instructions on the target graphics card.
4. The method of claim 1, wherein the determining whether there is a free target graphics card among the graphics cards of the target type bound by the target virtual machine comprises:
searching a pre-stored display card resource scheduling table for a display card of a target type bound with the target virtual machine; the display card resource scheduling table stores the mapping relation among the operating system of the virtual machine, the type of the display card and the use state;
acquiring the use state of each display card of the target type;
and determining whether an idle target display card exists according to the use state of each display card of the target type.
5. The method of claim 1, wherein the determining the target type of the target application according to the attribute information comprises:
searching a target type matched with the attribute information in a prestored application program classification table; the application program classification table stores the mapping relation between the attribute information of the application program and the type of the application program.
6. The method of claim 1, wherein the determining a target graphics card type that matches the target type comprises:
searching a target display card type matched with the target type in a pre-stored display card classification table; the display card classification table stores the mapping relation between the application program type and the display card type.
7. The method of claim 3, further comprising, prior to said disabling a graphics card driver for a currently used graphics card:
and sending a display card switching prompt message to a zero terminal connected with the target virtual machine, so that the zero terminal displays the display card switching prompt message.
8. An apparatus for scheduling resources, the apparatus comprising:
the first acquisition module is used for acquiring the attribute information of the target application program; the target application program is an application program which runs at the top layer of a display desktop of the target virtual machine currently; the attribute information is used for identifying the target application program;
the first determining module is used for determining the target type of the target application program according to the attribute information;
the second determination module is used for determining the type of the target display card matched with the target type when the target type is determined not to be the same as the type of the historical target application program on the target virtual machine;
a third determining module, configured to determine whether there is an idle target graphics card in the graphics cards of the target type bound to the target virtual machine, where the graphics cards bound to the target virtual machine at least include a low-end graphics card, a middle-end graphics card, and a high-end graphics card;
and the fourth determining module is used for determining the target display card as the display card required by the target virtual machine to run the target application program when determining that the idle target display card exists, and switching the display card currently used by the target virtual machine into the target display card.
9. A resource scheduling apparatus, comprising: a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the resource scheduling method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon at least one computer instruction, which is loaded and executed by a processor to perform the steps performed in the resource scheduling method according to any one of claims 1 to 7.
CN202010848846.6A 2020-08-21 2020-08-21 Resource scheduling method, device and storage medium Pending CN112099946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010848846.6A CN112099946A (en) 2020-08-21 2020-08-21 Resource scheduling method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010848846.6A CN112099946A (en) 2020-08-21 2020-08-21 Resource scheduling method, device and storage medium

Publications (1)

Publication Number Publication Date
CN112099946A true CN112099946A (en) 2020-12-18

Family

ID=73754206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010848846.6A Pending CN112099946A (en) 2020-08-21 2020-08-21 Resource scheduling method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112099946A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064727A (en) * 2021-04-16 2021-07-02 上海众链科技有限公司 Image display scheduling method, terminal and storage medium applied to Android system
CN113204384A (en) * 2021-05-14 2021-08-03 山东英信计算机技术有限公司 Equipment starting method and device and computer readable storage medium
CN114398018A (en) * 2022-01-19 2022-04-26 腾讯科技(深圳)有限公司 Picture display method, device, storage medium and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064727A (en) * 2021-04-16 2021-07-02 上海众链科技有限公司 Image display scheduling method, terminal and storage medium applied to Android system
CN113064727B (en) * 2021-04-16 2022-08-26 上海众链科技有限公司 Image display scheduling method, terminal and storage medium applied to Android system
CN113204384A (en) * 2021-05-14 2021-08-03 山东英信计算机技术有限公司 Equipment starting method and device and computer readable storage medium
CN114398018A (en) * 2022-01-19 2022-04-26 腾讯科技(深圳)有限公司 Picture display method, device, storage medium and electronic equipment
WO2023138297A1 (en) * 2022-01-19 2023-07-27 腾讯科技(深圳)有限公司 Picture display method and apparatus, and electronic device, computer-readable storage medium and computer program product
CN114398018B (en) * 2022-01-19 2023-10-17 腾讯科技(深圳)有限公司 Picture display method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN112099946A (en) Resource scheduling method, device and storage medium
CN110333947B (en) Method, device, equipment and medium for loading subcontracting resources of game application
US20170192819A1 (en) Method and electronic device for resource allocation
US20160101360A1 (en) Game Accessing Method and Processing Method, Server, Terminal, and System
CN111737019B (en) Method and device for scheduling video memory resources and computer storage medium
CN108073423A (en) A kind of accelerator loading method, system and accelerator loading device
CN114327318A (en) Display method and system of cloud desktop
CN107911700B (en) Virtualization-based hardware decoding method, decoding equipment and storage medium
CN112269628A (en) Resource scheduling system and method
JPWO2012023190A1 (en) Communication terminal device, incoming call processing program, and incoming call processing method
CN112169310A (en) Game resource loading method and device, computer equipment and storage medium
CN108667750B (en) Virtual resource management method and device
CN111611017B (en) Display card selection method and related device
CN111111182B (en) Game view angle determining method, device and server
CN105807890A (en) Information display method and device and electronic equipment
CN111803926B (en) Matching method and device of control object in cloud application and electronic equipment
CN112416497A (en) Image display processing method and device and on-demand system
CN111491210A (en) Data processing method, device and system
CN109634721B (en) Method and related device for starting communication between virtual machine and host
CN113535298A (en) Display switching method and device for cloud game desktop
CN115700484A (en) Rendering method, device, equipment and storage medium
CN114168254A (en) Data processing method, device and equipment
CN116755892B (en) Method and system for distributing computing resources between virtual display card and cloud host
CN113786613B (en) Shadow map updating method, device and system
CN113282419B (en) Resource scheduling method, electronic device, and computer-readable 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