Method, device and equipment for adjusting active resolution of virtual graphics card and medium

By modifying the source code of the virtual graphics card driver to match the cloud desktop resolution, the problem of mismatch between the resolution of the virtual graphics card and the touch screen device is solved, and the accuracy of touch operations in the virtual machine is improved.

CN119718242APending Publication Date: 2025-03-28BEIJING TRICOLOR TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411765113.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The active output resolution of the virtual graphics card in the cloud desktop system does not match the desktop resolution of the touch screen device, resulting in limited effective touch range of the touch screen, affecting the user's user experience.

Method used

By obtaining the driver source code of the virtual graphics card, determine the target value of the desktop resolution of the target system, and modify the target function in the driver source code to adjust the active resolution to match the desktop resolution.

Benefits of technology

The virtual graphics card's active output resolution and cloud desktop resolution are matched, ensuring that every touch point of the touch screen peripheral can be accurately identified and responded, and improving the accuracy of users' touch operations in the virtual machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718242A_ABST
    Figure CN119718242A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for adjusting the active resolution of a virtual graphics card and a medium, and the method comprises the steps: displaying a cloud desktop through touch screen equipment, enabling a virtual machine on the touch screen equipment to run a target system, and enabling the virtual graphics card to serve as graphics card equipment; when the active resolution of the virtual graphics card is not matched with the desktop resolution of a target system in a virtual machine, the method determines a target value of the desktop resolution by obtaining a driving source code of the virtual graphics card, finds out a target function describing the relationship between a display source established by graphics card equipment and a target interface, and displays the target function. Modifying the active resolution submitted by the function based on the target value; and finally, storing the modified driving source code and restarting the virtual machine, so that the active resolution of the virtual graphics card is matched with the desktop resolution. According to the invention, the active resolution can be matched with the desktop resolution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud desktop technology, and in particular to a method, device, equipment and medium for adjusting active resolution of a virtual graphics card. Background Art

[0002] As an important part of cloud computing technology, cloud desktop systems allow users to access and use work environments and applications through remote servers. Virtual machines are widely used in cloud desktop systems, but users may encounter display output problems when connecting touch screen devices. For example, the default active output resolution of QXL graphics cards in Windows 10 virtual machines is 1280x768, which does not match the common desktop resolution of 1080p (1920x1080) for touch screen devices, resulting in a limited effective touch range of the touch screen.

[0003] This resolution mismatch problem limits the application of touch screen devices in cloud desktop systems and affects the user experience. Especially in scenarios that require high-precision touch operations, resolution mismatch may lead to inaccurate operations, delayed responses, and other problems. Therefore, an effective method is needed to modify the active output resolution of the virtual graphics card to keep it consistent with the desktop resolution, thereby solving the problem that touch screen peripherals cannot be used normally in virtual machines. Summary of the invention

[0004] In view of this, embodiments of the present application provide a method, apparatus, device and medium for adjusting the active resolution of a virtual graphics card, which can match the active resolution with the desktop resolution.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for adjusting the active resolution of a virtual graphics card, wherein a cloud desktop is displayed through a touch screen device, the touch screen device runs a target system through a virtual machine and uses a virtual graphics card as a graphics card device, and the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the method comprising:

[0007] Obtaining the driver source code of the virtual graphics card, and determining the target value corresponding to the desktop resolution;

[0008] Determining from the driver source code a target function for describing the relationship between a display source and a target interface established by a graphics card device, and modifying the active resolution submitted by the target function based on the target value; wherein the target interface represents a destination for outputting display content by the graphics card device;

[0009] The modified driver source code is saved and the virtual machine is restarted to match the active resolution of the virtual graphics card with the desktop resolution.

[0010] In a second aspect, an embodiment of the present application further provides a virtual graphics card active resolution adjustment device, wherein a cloud desktop is displayed through a touch screen device, the touch screen device runs a target system through a virtual machine and uses a virtual graphics card as a graphics card device, and the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the device comprising:

[0011] An acquisition module, used to acquire the driver source code of the virtual graphics card and determine the target value corresponding to the desktop resolution;

[0012] a modification module, configured to determine from the driver source code a target function for describing the relationship between a display source and a target interface established by a graphics card device, and modify the active resolution submitted by the target function based on the target value; wherein the target interface represents a destination for outputting display content by the graphics card device;

[0013] A restart module is used to save the modified driver source code and restart the virtual machine so that the active resolution of the virtual graphics card matches the desktop resolution.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the virtual graphics card active resolution adjustment method described in any one of the first aspects.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for adjusting the active resolution of a virtual graphics card described in any one of the first aspects is executed.

[0016] The embodiments of the present application have the following beneficial effects:

[0017] (1) By matching the active output resolution of the virtual machine with the cloud desktop resolution, it ensures that every touch point of the touch screen peripheral can be accurately identified and responded to, greatly improving the accuracy of the user's touch operation in the virtual machine.

[0018] (2) It solves the problem of touch screen being unusable or having limited functions due to resolution mismatch in traditional virtual machines, making virtual machines compatible with and efficiently supporting various touch screen peripherals, thus broadening the application scenarios of cloud desktop systems.

[0019] (3) There is no need for users to manually adjust the resolution or perform complex configurations. The present invention automatically achieves resolution matching, simplifies the operation process, lowers the usage threshold, and provides users with a smoother, more intuitive and efficient virtual machine touch interaction experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 is a flowchart of steps S101-S103 provided in an embodiment of the present application;

[0022] Figure 2 It is a flowchart of steps S201-S202 provided in an embodiment of the present application;

[0023] Figure 3 It is a flowchart of steps S301-S302 provided in an embodiment of the present application;

[0024] Figure 4 It is a flowchart of steps S401-S402 provided in an embodiment of the present application;

[0025] Figure 5 It is a flowchart of steps S501-S502 provided in an embodiment of the present application;

[0026] Figure 6 It is a structural schematic diagram of a virtual graphics card active resolution adjustment device provided in an embodiment of the present application;

[0027] Figure 7 It is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0028] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0029] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0030] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0031] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0032] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0034] See also Figure 1 , Figure 1It is a flow chart of steps S101-S103 of the active resolution adjustment method of the virtual graphics card provided in an embodiment of the present application, wherein a cloud desktop is displayed through a touch screen device, the touch screen device runs a target system through a virtual machine and uses a virtual graphics card as a graphics card device, the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the method includes steps S101-S103, which will be described in conjunction with the specific steps.

[0035] In step S101, the driver source code of the virtual graphics card is obtained, and a target value corresponding to the desktop resolution is determined.

[0036] First, obtain the driver source code of the virtual graphics card and determine the target value corresponding to the target system desktop resolution, that is, the expected active resolution of the virtual graphics card.

[0037] In step S102, a target function for describing the relationship between a display source and a target interface established by a graphics card device is determined from the driver source code, and the active resolution submitted by the target function is modified based on the target value; wherein the target interface represents a destination for outputting display content by the graphics card device.

[0038] Next, in the driver source code, find the target function that describes the relationship between the display source and target interface established by the graphics card device, and based on the target value (i.e., the desired desktop resolution), modify the active resolution submitted by the target function. This step directly adjusts the parameters used to set the resolution in the graphics card driver.

[0039] In step S103, the modified driver source code is saved and the virtual machine is restarted to make the active resolution of the virtual graphics card match the desktop resolution.

[0040] Finally, save the modified driver source code and restart the virtual machine to make the modified driver take effect, thereby matching the active resolution of the virtual graphics card with the desktop resolution of the target system.

[0041] In some embodiments, see Figure 2 , Figure 2 It is a flowchart of steps S201-S202 provided in an embodiment of the present application. The target function used to describe the relationship between the display source and target interface established by the graphics card device is determined from the driver source code. It can be implemented through steps S201-S202 and will be explained in combination with each step.

[0042] In step S201, a first interface for enumerating collaborative function modes in a video presentation network is determined, and a second interface for submitting a configuration of the video presentation network is determined.

[0043] In step S202, a third interface for providing the active resolution to the first interface and the second interface is determined based on the first interface and the second interface, and the objective function is determined based on the third interface.

[0044] Here, in a virtual machine environment, when a cloud desktop is displayed through a touch screen device, the active resolution of the virtual graphics card needs to match the desktop resolution of the target system in the virtual machine. To achieve this, the system first calls the GetModeList interface to obtain a list of adapted display resolutions. This list contains all possible resolution combinations supported by the graphics card. However, in the current system implementation, the EnumVidPnCofuncModality (first interface) and CommitVidPn (second interface) interfaces are both based on the first set of source resolutions in the device list obtained by GetModeList (third interface) when configuring the video presentation network (VidPN) as the active resolution. This means that no matter what the desktop resolution of the target system is, the active resolution of the virtual graphics card is always set to this fixed first set of resolutions.

[0045] To solve this problem and allow the active resolution of the virtual graphics card to be dynamically adjusted according to the desktop resolution of the target system, we need to adjust the associated target function in the GetModeList interface. Specifically, we need to modify or extend the calling logic of GetModeList so that it can intelligently select or sort the returned resolution list based on the desktop resolution of the target system or other relevant factors. In this way, when the EnumVidPnCofuncModality and CommitVidPn interfaces set the relationship between the display source and target resolutions in subsequent steps, they can make selections based on a more appropriate or optimized resolution list, thereby matching the active resolution of the virtual graphics card with the desktop resolution of the target system.

[0046] In some embodiments, see Figure 3 , Figure 3 It is a flow chart of steps S301-S302 provided in an embodiment of the present application. Before modification, the objective function selects the most matching display mode from the display mode list based on the display capability of the current display device, and each display in the display mode list represents an active resolution; the active resolution submitted by the objective function is modified based on the target value, which can be achieved through steps S301-S302, which will be explained in combination with each step.

[0047] In step S301, the height and width parameters in the active resolution submitted by the objective function are determined.

[0048] In step S302, the height and width parameters are modified to the target values.

[0049] Here, during the execution of the target function, it selects the best matching display mode from the display mode list and determines the active resolution corresponding to the mode. This resolution usually consists of two parameters: height and width. From the active resolution submitted by the target function, the two key parameters of height and width are extracted. According to the requirements of the target system desktop resolution, the extracted height and width parameters are modified to the corresponding target values. The modified height and width parameters are reintegrated into the new active resolution and applied to the target function or related display configuration process. In this way, the graphics card driver will configure the video presentation network (VidPN) according to the new active resolution to match the target system desktop resolution.

[0050] In some embodiments, see Figure 4 , Figure 4 It is a flow chart of steps S401-S402 provided in an embodiment of the present application. Before modification, the objective function submits the active resolution by setting the selected most matching display mode to the first group in the display mode list; the modification of the active resolution submitted by the objective function based on the target value can be achieved through steps S401-S402, which will be explained in combination with each step.

[0051] In step S401, the display mode in which the height and width parameters are modified is determined.

[0052] In step S402, the display mode is set as the first group in the display mode list.

[0053] Here, after adjusting the parameters of the selected display mode, it is necessary to set this adjusted display mode as the first group in the display mode list. In the subsequent video presentation network (VidPN) configuration process, the target function will no longer look for the best matching display mode, but will directly check and select the display mode that has been adjusted to the target value. Next, the target function will submit the active resolution according to the new display mode list (where the modified display mode is now the first group). In this way, the graphics driver will configure the video presentation network according to this new active resolution to ensure consistency with the target system desktop resolution.

[0054] In some embodiments, the virtual graphics card includes one of QXL, Cirrus, and VGA; and the target system is a Windows system. The virtual graphics card uses one of the three types of QXL, Cirrus, or VGA, and the target system is a Windows system. For different configurations, the target function and its related active resolution modification process need to be more specifically adapted. Different Windows systems have specific requirements for parameters such as display resolution and refresh rate, and the desktop resolution of different Windows systems may be different. Depending on the type of virtual graphics card used, the target function may also need to be adapted and modified differently. For example, for a QXL graphics card, a specific QXL driver interface may be required to modify the active resolution. For a Cirrus or VGA graphics card, a corresponding driver interface needs to be used. After determining the virtual graphics card type and the display requirements of the Windows system, the display mode list needs to be updated to ensure that it contains a display mode that matches the desktop resolution of the target system.

[0055] In some embodiments, see Figure 5 , Figure 5 It is a flowchart of steps S501-S502 provided in an embodiment of the present application. The method also includes steps S501-S502, which will be described in combination with each step.

[0056] In step S501, the modified driver source code is obtained.

[0057] In step S502, a driver update control is constructed based on the modified driver source code, and when the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the driver update control is automatically obtained and the driver is updated.

[0058] Here, you first need to obtain the graphics driver source code that has been modified to support the target resolution. Next, use the modified driver source code to build a driver update control. This control is an executable file, installation package, or update patch that is used to deploy a new driver to a virtual machine. When running in a virtual machine, the system needs to periodically check whether the active resolution of the virtual graphics card matches the desktop resolution of the target system in the virtual machine. If a resolution mismatch is detected, the system will automatically obtain the previously built driver update control from a specified location (such as a server, network share, or local storage). The system will then automatically run this control to update the graphics driver.

[0059] In some embodiments, the driver update control includes a desktop resolution acquisition control, and the desktop resolution acquisition control is used to acquire the desktop resolution of the current device and apply a target value corresponding to the desktop resolution of the current device to the driver update control.

[0060] The driver update control contains a desktop resolution acquisition control, the main function of which is to obtain the desktop resolution of the current device and apply this resolution value as the target value to the driver update control. This design makes the driver update process more intelligent and automated, ensuring that the active resolution of the virtual graphics card is consistent with the desktop resolution of the target system in the virtual machine.

[0061] Specifically, the desktop resolution acquisition control is an independent component that is responsible for detecting and acquiring the desktop resolution of the current device. Once the desktop resolution acquisition control acquires the desktop resolution of the current device, this value is considered the target value. This target value is then passed to the driver update control to guide the graphics driver update process. The driver update control uses this target value to modify the graphics driver configuration to ensure that the active resolution of the virtual graphics card matches the desktop resolution of the current device.

[0062] In summary, the embodiments of the present application have the following beneficial effects:

[0063] (1) By matching the active output resolution of the virtual machine with the cloud desktop resolution, it ensures that every touch point of the touch screen peripheral can be accurately identified and responded to, greatly improving the accuracy of the user's touch operation in the virtual machine.

[0064] (2) It solves the problem of touch screen being unusable or having limited functions due to resolution mismatch in traditional virtual machines, making virtual machines compatible with and efficiently supporting various touch screen peripherals, thus broadening the application scenarios of cloud desktop systems.

[0065] (3) There is no need for users to manually adjust the resolution or perform complex configurations. The present invention automatically achieves resolution matching, simplifies the operation process, lowers the usage threshold, and provides users with a smoother, more intuitive and efficient virtual machine touch interaction experience.

[0066] Based on the same inventive concept, the embodiments of the present application also provide a virtual graphics card active resolution adjustment device corresponding to the virtual graphics card active resolution adjustment method in the first embodiment. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the above-mentioned virtual graphics card active resolution adjustment method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0067] like Figure 6 As shown, Figure 61 is a schematic diagram of the structure of a virtual graphics card active resolution adjustment device 600 provided in an embodiment of the present application. A cloud desktop is displayed through a touch screen device, the touch screen device runs a target system through a virtual machine and uses a virtual graphics card as a graphics card device, the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, and the virtual graphics card active resolution adjustment device 600 includes:

[0068] The acquisition module 601 is used to acquire the driver source code of the virtual graphics card and determine the target value corresponding to the desktop resolution;

[0069] A modification module 602 is used to determine a target function for describing the relationship between a display source and a target interface established by a graphics card device from the driver source code, and modify the active resolution submitted by the target function based on the target value; wherein the target interface represents a destination for outputting display content by the graphics card device;

[0070] The restart module 603 is used to save the modified driver source code and restart the virtual machine so that the active resolution of the virtual graphics card matches the desktop resolution.

[0071] Those skilled in the art should understand that Figure 6 The functions of each unit in the virtual graphics card active resolution adjustment device 600 shown can be understood by referring to the related description of the aforementioned virtual graphics card active resolution adjustment method. Figure 6 The functions of each unit in the virtual graphics card active resolution adjustment device 600 shown can be implemented by a program running on a processor, or can be implemented by a specific logic circuit.

[0072] In a possible implementation, the modification module 602 determines from the driver source code a target function for describing the relationship between the display source and target interfaces established by the graphics card device, including:

[0073] Determining a first interface for enumerating collaborative functional modes in a video presentation network, and determining a second interface for submitting a configuration of the video presentation network;

[0074] A third interface for providing the active resolution to the first interface and the second interface is determined based on the first interface and the second interface, and the objective function is determined based on the third interface.

[0075] In a possible implementation manner, the objective function selects the most matching display mode from a display mode list based on the display capability of the current display device before modification, and each display in the display mode list represents an active resolution; the modification module 602 modifies the active resolution submitted by the objective function based on the target value, including:

[0076] Determining height and width parameters in the active resolution submitted by the objective function;

[0077] The height and width parameters are modified to the target values.

[0078] In a possible implementation manner, the objective function, before modification, submits the active resolution by setting the selected best matching display mode to the first group in the display mode list; the modification module 602 modifies the active resolution submitted by the objective function based on the target value, including:

[0079] Determining a display mode in which the height and width parameters are modified;

[0080] This display mode is set as the first group in the display mode list.

[0081] In a possible implementation, the virtual graphics card includes one of QXL, Cirrus, and VGA; and the target system is a Windows system.

[0082] In a possible implementation, the restart module 603 further includes:

[0083] Obtaining the modified driver source code;

[0084] A driver update control is constructed based on the modified driver source code, and when the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the driver update control is automatically obtained and the driver update is performed.

[0085] In a possible implementation, the driver update control includes a desktop resolution acquisition control, and the desktop resolution acquisition control is used to acquire the desktop resolution of the current device and apply a target value corresponding to the desktop resolution of the current device to the driver update control.

[0086] The above virtual graphics card active resolution adjustment device has the following beneficial effects:

[0087] (1) By matching the active output resolution of the virtual machine with the cloud desktop resolution, it ensures that every touch point of the touch screen peripheral can be accurately identified and responded to, greatly improving the accuracy of the user's touch operation in the virtual machine.

[0088] (2) It solves the problem of touch screen being unusable or having limited functions due to resolution mismatch in traditional virtual machines, making virtual machines compatible with and efficiently supporting various touch screen peripherals, thus broadening the application scenarios of cloud desktop systems.

[0089] (3) There is no need for users to manually adjust the resolution or perform complex configurations. The present invention automatically achieves resolution matching, simplifies the operation process, lowers the usage threshold, and provides users with a smoother, more intuitive and efficient virtual machine touch interaction experience.

[0090] like Figure 7 As shown, Figure 7 The present invention provides a schematic diagram of the structure of an electronic device 700, wherein the electronic device 700 includes:

[0091] A processor 701, a storage medium 702 and a bus 703, wherein the storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device 700 is running, the processor 701 communicates with the storage medium 702 via the bus 703, and the processor 701 executes the machine-readable instructions to perform the steps of the virtual graphics card active resolution adjustment method described in the embodiment of the present application.

[0092] In actual application, the components in the electronic device 700 are coupled together via the bus 703. It is understood that the bus 703 is used to realize the connection and communication between these components. In addition to the data bus, the bus 703 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus 703.

[0093] The electronic device has the following beneficial effects:

[0094] (1) By matching the active output resolution of the virtual machine with the cloud desktop resolution, it ensures that every touch point of the touch screen peripheral can be accurately identified and responded to, greatly improving the accuracy of the user's touch operation in the virtual machine.

[0095] (2) It solves the problem of touch screen being unusable or having limited functions due to resolution mismatch in traditional virtual machines, making virtual machines compatible with and efficiently supporting various touch screen peripherals, thus broadening the application scenarios of cloud desktop systems.

[0096] (3) There is no need for users to manually adjust the resolution or perform complex configurations. The present invention automatically achieves resolution matching, simplifies the operation process, lowers the usage threshold, and provides users with a smoother, more intuitive and efficient virtual machine touch interaction experience.

[0097] The embodiment of the present application further provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by at least one processor 701, the virtual graphics card active resolution adjustment method described in the embodiment of the present application is implemented.

[0098] In some embodiments, the storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disk, or a compact disc read-only memory (CDROM); it can also be various devices including one or any combination of the above memories.

[0099] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0100] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).

[0101] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0102] The computer-readable storage medium has the following advantages:

[0103] (1) By matching the active output resolution of the virtual machine with the cloud desktop resolution, it ensures that every touch point of the touch screen peripheral can be accurately identified and responded to, greatly improving the accuracy of the user's touch operation in the virtual machine.

[0104] (2) It solves the problem of touch screen being unusable or having limited functions due to resolution mismatch in traditional virtual machines, making virtual machines compatible with and efficiently supporting various touch screen peripherals, thus broadening the application scenarios of cloud desktop systems.

[0105] (3) There is no need for users to manually adjust the resolution or perform complex configurations. The present invention automatically achieves resolution matching, simplifies the operation process, lowers the usage threshold, and provides users with a smoother, more intuitive and efficient virtual machine touch interaction experience.

[0106] In the several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0107] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0108] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0109] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0110] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for adjusting active resolution of a virtual graphics card, characterized in that: A cloud desktop is displayed through a touch screen device, the touch screen device runs a target system through a virtual machine and uses a virtual graphics card as a graphics card device, and the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the method comprising: Obtaining the driver source code of the virtual graphics card, and determining the target value corresponding to the desktop resolution; Determining from the driver source code a target function for describing the relationship between a display source and a target interface established by a graphics card device, and modifying the active resolution submitted by the target function based on the target value; wherein the target interface represents a destination for outputting display content by the graphics card device; The modified driver source code is saved and the virtual machine is restarted to match the active resolution of the virtual graphics card with the desktop resolution.

2. The method according to claim 1, characterized in that Determining a target function for describing the relationship between the display source and target interfaces established by the graphics card device from the driver source code includes: Determining a first interface for enumerating collaborative functional modes in a video presentation network, and determining a second interface for submitting a configuration of the video presentation network; A third interface for providing the active resolution to the first interface and the second interface is determined based on the first interface and the second interface, and the objective function is determined based on the third interface.

3. The method according to claim 1, characterized in that The objective function selects the most matching display mode from the display mode list based on the display capability of the current display device before modification, each display in the display mode list represents an active resolution; The modifying the active resolution submitted by the objective function based on the target value comprises: Determining height and width parameters in the active resolution submitted by the objective function; The height and width parameters are modified to the target values.

4. The method according to claim 3, characterized in that The objective function, before modification, realizes submission to the active resolution by setting the selected best matching display mode as the first group in the display mode list; The modifying the active resolution submitted by the objective function based on the target value comprises: Determining a display mode in which the height and width parameters are modified; This display mode is set as the first group in the display mode list.

5. The method according to claim 1, characterized in that: The virtual graphics card includes one of QXL, Cirrus, and VGA; and the target system is a Windows system.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining the modified driver source code; A driver update control is constructed based on the modified driver source code, and when the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the driver update control is automatically obtained and the driver update is performed.

7. The method according to claim 6, characterized in that The driver update control includes a desktop resolution acquisition control, and the desktop resolution acquisition control is used to acquire the desktop resolution of the current device and apply the target value corresponding to the desktop resolution of the current device to the driver update control.

8. A virtual graphics card active resolution adjustment device, characterized in that: A cloud desktop is displayed through a touch screen device, the touch screen device runs a target system through a virtual machine and uses a virtual graphics card as a graphics card device, and the active resolution of the virtual graphics card does not match the desktop resolution of the target system in the virtual machine, the device includes: An acquisition module, used to acquire the driver source code of the virtual graphics card and determine the target value corresponding to the desktop resolution; a modification module, configured to determine from the driver source code a target function for describing the relationship between a display source and a target interface established by a graphics card device, and modify the active resolution submitted by the target function based on the target value; wherein the target interface represents a destination for outputting display content by the graphics card device; A restart module is used to save the modified driver source code and restart the virtual machine so that the active resolution of the virtual graphics card matches the desktop resolution.

9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the virtual graphics card active resolution adjustment method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for adjusting the active resolution of a virtual graphics card according to any one of claims 1 to 7 is executed.