Application window display method and device and computer readable storage medium

By configuring the frame buffer of the virtual graphics card in the host, the virtual machine stores the update data in the frame buffer, solving the problem of insufficient display of the application window on the virtual machine side in the existing technology, and achieving a more stable and smooth application window refresh effect.

CN119597379APending Publication Date: 2025-03-11PHYTIUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411479026.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, the display of the virtual machine-side application window is not smooth enough, which is mainly due to the low or unstable network communication rate, resulting in poor user experience.

Method used

By configuring the frame buffer of the virtual graphics card in the host, the virtual machine stores the update data in the frame buffer, and the host refreshes the application window based on the update data to avoid transmitting data over the network.

Benefits of technology

The update data transmission between the virtual machine and the host is not affected by the network transmission rate, the data transmission process is more stable, the process of refreshing the application window is smoother, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597379A_ABST
    Figure CN119597379A_ABST
Patent Text Reader

Abstract

The invention provides a display method and device of an application program window and a computer readable storage medium, and is applied to the technical field of computers, the method responds to a display update event of an application program, update data corresponding to a display update area is determined through a virtual machine, the update data is stored in a frame buffer of a virtual graphics card of a host machine, and the application program window is displayed. Meanwhile, in response to the storage operation of the frame buffer, the application program window of the application program is refreshed according to the update data, when the display update event occurs, the update data is transmitted between the virtual machine and the host machine through the frame buffer of the virtual graphics card of the host machine without passing through a network, and the data transmission efficiency is improved. Therefore, the transmission process of the updated data is not influenced by the network transmission rate, the data transmission process is more stable, the updated data is transmitted through the frame buffer, the transmission efficiency of the updated data is higher, the process of refreshing the application program window is smoother, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for displaying an application window, and a computer-readable storage medium. Background Art

[0002] In virtualization technology, if a computer runs a virtual machine, the host and virtual machine can each run an operating system, and both the virtual machine operating system and the host operating system can run at least one application. Since the host operating system and the virtual machine operating system are isolated from each other, the windows of the application running in the virtual machine can only be displayed within the virtual machine desktop.

[0003] To solve this problem, application window fusion technology based on the RDP protocol (Remote Desktop Protocol) came into being. By applying window fusion technology, the application window of the virtual machine side application can be displayed separately on the host desktop without displaying the virtual machine desktop, so that users can operate the virtual machine side application window as smoothly as operating the host side application window.

[0004] In the application window fusion technology provided by the prior art, when the screen of the application on the virtual machine side is updated, the server program on the virtual machine side needs to capture the entire virtual machine desktop and transmit the desktop screenshot through the network. After receiving the desktop screenshot, the host client updates the application window according to the obtained desktop screenshot. It can be seen that the smoothness of the application window display update in the prior art depends to a large extent on the network communication rate. When the network communication rate is low or unstable, the display of the application window will be extremely unsmooth, and the user experience will be poor. Summary of the invention

[0005] In view of this, the present application is dedicated to providing a method, device and computer-readable storage medium for displaying an application window to solve the problem in the prior art that the application window display on the virtual machine side is not smooth enough.

[0006] In a first aspect, the present application provides a method for displaying an application window, which is applied to a host machine, wherein the host machine includes a host operating system, the host operating system runs a virtual machine and is configured with a host virtual graphics card, and the application runs in the virtual machine operating system of the virtual machine, the method comprising:

[0007] In response to a display update event of the application, determining, by the virtual machine, update data corresponding to a display update area;

[0008] The update data is stored in the frame buffer of the host machine virtual graphics card through the virtual machine;

[0009] In response to the storing operation of the frame buffer, an application window of the application is refreshed according to the update data.

[0010] In an optional implementation, the virtual machine operating system is configured with a virtual machine graphics card driver;

[0011] Determining, by the virtual machine, update data corresponding to the display update area includes:

[0012] Calculate and display the update area through the virtual machine operating system;

[0013] The update data corresponding to the display update area is determined by the virtual machine graphics card driver.

[0014] In an optional implementation, the display update event includes: a target window creation event triggered by an external device, or an image update event triggered by the application when a target image needs to be displayed;

[0015] Calculating and displaying an update area through the virtual machine operating system includes:

[0016] Based on a preset correspondence between a window creation event and a new window, determining, by the virtual machine operating system, a target new window corresponding to the target window creation event;

[0017] Determining a display update area corresponding to the target new window based on preset configuration information of the target new window;

[0018] or,

[0019] The display update area is determined by the virtual machine operating system according to the image specification of the target image.

[0020] In an optional implementation, refreshing the application window of the application according to the update data includes:

[0021] Calculate the overlapping area between the display update area and the application window according to the update data;

[0022] The overlapping area is refreshed.

[0023] In an optional implementation, the method for displaying an application window provided in the first aspect of the present application further includes: drawing a screen outside the overlapping area in the display update area.

[0024] In an optional implementation, the method for displaying an application window provided in the first aspect of the present application further includes:

[0025] Acquire a trigger event fed back by an external device, and send an interrupt signal to the virtual machine according to the trigger event;

[0026] The virtual machine responds to the interrupt signal to notify the application to respond to the trigger event, so as to trigger the display update event.

[0027] In an optional implementation, the host machine is configured with a virtual external device corresponding to the external device;

[0028] The obtaining of a trigger event fed back by an external device and sending an interrupt signal to the virtual machine according to the trigger event includes:

[0029] Acquiring a trigger event fed back by an external device through the application window;

[0030] In response to the triggering event, an interrupt signal is sent to the virtual machine through the virtual external device.

[0031] In an optional implementation, the virtual machine is configured with a driver for the virtual external device;

[0032] Responding to the interrupt signal through the virtual machine includes:

[0033] The driver responds to the interrupt signal and sends notification information to the virtual machine operating system, where the notification information is used to notify the application to respond to the trigger event.

[0034] In a second aspect, the present application provides an electronic device, including:

[0035] Memory, used to store programs;

[0036] The processor is used to call the program in the memory to execute the method for displaying the application window as described in any one of the first aspects of the present application.

[0037] In a third aspect, the present application provides a computer-readable storage medium having a program stored thereon, wherein the program enables a computer to execute the method for displaying an application window as described in any one of the first aspects of the present application.

[0038] Based on the above content, the display method of the application window provided by the present application is applied to a host machine, the host machine includes a host operating system, the host operating system runs a virtual machine and is configured with a host virtual graphics card, the application is run in the virtual machine operating system of the virtual machine, in response to a display update event of the application, the update data corresponding to the display update area is determined by the virtual machine, and the update data is stored in the frame buffer of the host virtual graphics card. At the same time, in response to the storage operation of the frame buffer, the application window of the application is refreshed according to the update data. The display method provided by the present application, when a display update event occurs, realizes the transmission of update data between the virtual machine and the host through the frame buffer of the host virtual graphics card, without passing through the network, so the transmission process of the update data is not affected by the network transmission rate, and the data transmission process is more stable. At the same time, by transmitting the update data through the frame buffer, the process of data copying and parsing can be omitted, the delay is basically eliminated, the update data transmission efficiency is higher, and the process of refreshing the application window is smoother, which helps to improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 The present invention is a schematic diagram of running virtual machines in two computer devices according to the prior art.

[0041] Figure 2 The diagram is a schematic diagram of a prior art for running an application in a virtual machine.

[0042] Figure 3 A schematic diagram of another prior art for running an application in a virtual machine.

[0043] Figure 4 A flowchart of a method for displaying an application window provided in this application.

[0044] Figure 5 A schematic diagram of a scenario for displaying update events provided by this application.

[0045] Figure 6 Another schematic diagram of a scenario for displaying update events provided by this application.

[0046] Figure 7 A schematic diagram of another scenario for displaying update events provided by the present application.

[0047] Figure 8A schematic diagram of another scenario showing an update event provided by the present application.

[0048] Fig. 9 A flowchart of another method for displaying an application window provided in this application.

[0049] Fig.10 A schematic diagram of the application architecture of a method for displaying an application window provided in this application.

[0050] Fig.11 This is a structural block diagram of an electronic device provided in this application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] In the computer field, virtualization is a resource management technology that abstracts and transforms various physical resources of a computer, such as processors, networks, memory, and hard disks, to break the inseparable barriers between physical structures, allowing users to use these resources in a better way than the original configuration. The new virtual parts of these resources are not restricted by the way existing resources are set up, the region, or the physical configuration.

[0053] In actual use, virtualization technology is usually implemented by running a virtual machine on a host machine, which can also be called a local computer. When creating a virtual machine, part of the host machine's hard disk and memory capacity needs to be used as the virtual machine's hard disk and memory capacity. Each virtual machine has independent hardware resources and operating system, and can be operated like a host machine.

[0054] The use of virtualization technology makes it possible to run multiple operating systems simultaneously in a computer. If a computer runs a virtual machine, the computer and the virtual machine can each run an operating system. The operating system running in the virtual machine can be the same as or different from the operating system running in the host machine. Moreover, at least one application can be run in both the virtual machine operating system and the host operating system.

[0055] Based on the above, Figure 1 A schematic diagram of running virtual machines in two computer devices is given.

[0056] See also Figure 1 , Figure 1It may include Figure 100a and Figure 100b, where Figure 100a is a schematic diagram of running a virtual machine in a desktop computer, and Figure 100b is a schematic diagram of running a virtual machine in a notebook computer, wherein 110a and 110b are host computer desktops, and 120a and 120b are virtual machine desktops.

[0057] For further information, see Figure 2 , Figure 2 A schematic diagram of running an application in a virtual machine shown in 100a is provided. The virtual machine desktop 120a includes a virtual machine desktop application icon 121, an application window 122, and a virtual machine system tray 123. The host desktop 110a includes host desktop application icons 111 and 112 and a system tray (system taskbar) 113. Among them, the virtual machine desktop application icon, the host desktop application icon, and the system tray are all given as examples, and this application does not limit the content.

[0058] It can be seen that the virtual machine desktop 120a and the host desktop 110a are isolated from each other, and the virtual machine desktop area is usually smaller than the host desktop 110a. If an application is run in a virtual machine, the application window can only be displayed and receive human-computer interaction operations within the range shown in 120a, and the operation range is limited. Moreover, special operations are required to switch between the virtual machine desktop 120a and the host desktop 110a, which is not conducive to user experience.

[0059] To solve this technical problem, application window fusion technology based on the RDP protocol (Remote Desktop Protocol) came into being. By applying window fusion technology, the application window of the virtual machine side application can be displayed separately on the host desktop without displaying the virtual machine desktop. Figure 3 As shown, by applying the window fusion technology, the virtual machine desktop can be hidden in the host desktop 110a, and only the application window 122 in the virtual machine is displayed, so that the user can operate the virtual machine side application window as smoothly as operating the host side application window.

[0060] However, the inventors found through in-depth research on the prior art that since the application window fusion technology provided by the prior art is implemented based on the RDP protocol and requires the support of the communication network, when the screen of the virtual machine side application is updated, the virtual machine side server program needs to capture the entire virtual machine desktop and transmit the desktop screenshot through the network. After receiving the desktop screenshot, the host client updates the application window according to the obtained desktop screenshot. It can be seen that the smoothness of the application window display update in the prior art depends largely on the network communication rate. When the network communication rate is low or unstable, the display of the application window will be extremely unsmooth and the user experience will be poor.

[0061] In order to solve the problem in the prior art that the display update of the application window depends on the network communication rate, which may cause the display to be not smooth and the user experience to be poor, the present application provides a method for displaying an application window, which is applied to the host machine, that is, applied to the local computer. Of course, it can also be other electronic devices that can install virtual machines, which are not listed here one by one. Furthermore, the host machine is loaded with a host operating system, a virtual machine is running in the host operating system, and the host machine is configured with a host virtual graphics card, an application is running in the virtual machine operating system of the virtual machine, and the virtual machine operating system is configured with a virtual machine graphics card driver. It should be emphasized that the application window described in the subsequent embodiments mainly refers to the window of the application installed by the virtual machine operating system.

[0062] Based on this, see Figure 4 The method for displaying an application window provided in this application includes the following steps.

[0063] S100: In response to a display update event of an application, determining update data corresponding to a display update area through a virtual machine.

[0064] First of all, it should be noted that the display update event described in this embodiment and subsequent embodiments mainly refers to an event that can trigger an application window to update the display content. In actual applications, there are many possibilities for display update events. For example, a user may click on an application window to create a new application window. Another example is that a user clicks on a certain space in an application window to pop up a preset function control. Another example is that an application in a virtual machine is playing a video. As the video content changes, the application window needs to change different image frames. Of course, other display update events may also be included, which are not listed here one by one. It can be understood that the display update event occurs before the display content of the host machine is updated, that is, the display update event occurs first, and then the display content changes.

[0065] In an optional implementation, after a display update event occurs, the virtual machine operating system first responds to the display update event and calculates a display update area according to specific circumstances of the display update event.

[0066] Combining the above content and actual application requirements, it can be known that the display update event includes two typical application scenarios. In one application scenario, the display update event includes a target window creation event triggered by a user through an external device, such as a keyboard or a mouse, that is, the user sends an instruction to the virtual machine application through an external device to create a new target window on the premise of displaying the application window. It should be noted that the target window mentioned here includes not only the application window, but also a drop-down list or other types of displayable controls. The specific details can be determined in combination with the actual application situation and will not be described in detail here.

[0067] In the above application scenario, the host operating system determines the target new window corresponding to the target window creation event based on the preset correspondence between the window creation event and the new window. It is understandable that in actual applications, for an application, when a user clicks a control in the application window (i.e. triggering a window creation event), it is certain which window the application will create. At the same time, it is also predictable for the virtual machine operating system. Based on this, the virtual machine operating system can predetermine the preset correspondence between the window creation event and the new window of any application, and then determine the new window corresponding to the target window creation event, i.e. the target new window, according to the preset correspondence.

[0068] Furthermore, the virtual machine operating system can determine the display update area corresponding to the target new window according to the preset configuration information of the target new window. In an optional embodiment, the preset configuration information includes display information corresponding to the target new window. For example, for the target new window A, its display information is expressed as: A(x, y, length, width), wherein x represents the horizontal coordinate of the target new window on the host computer display desktop, y represents the vertical coordinate of the target new window on the host computer display desktop, length represents the length of the target new window, and width represents the width of the target new window. It can be understood that the display update area corresponding to the target new window can be determined based on the display information.

[0069] In another application scenario, the display update event includes an image update event triggered by an application when it needs to display a target image. The most typical example is when an application in a virtual machine is playing a video. Since a video is composed of a large number of image frames, the application in the virtual machine will play the image frames one by one when playing the video. Each time an image frame is changed, an image update event is triggered. In this case, the virtual machine operating system can determine the display update area according to the image specifications (length and width) of the target image.

[0070] After determining the display update area, the virtual machine operating system further calls the virtual machine graphics driver to determine the update data corresponding to the display update area. As for the specific process of the virtual machine graphics driver determining the corresponding update data based on the display update area, it can be implemented with reference to relevant technologies, and this application does not make specific limitations on this.

[0071] S110 , storing the updated data in the frame buffer of the virtual graphics card of the host machine through the virtual machine.

[0072] After obtaining the update data corresponding to the display update area, the host machine stores the update data in the frame buffer of the host machine's virtual graphics card through the virtual machine, specifically the virtual machine operating system loaded by the virtual machine. Framebuffer plays a vital role in computer graphics. The main function of the framebuffer is to provide an interface that allows upper-level applications to directly read and write to the display buffer, thereby achieving direct control of the screen content. Framebuffer is essentially a memory area that can be located in the video memory or memory. As long as it is within the space accessible to the GPU, any allocated memory (or video memory) can be used as a framebuffer. By setting the graphics card-related register configuration, this memory area information can be associated with the graphics card, thereby achieving display control of the screen content.

[0073] By storing the update data in the frame buffer and providing the update data through the frame buffer in subsequent steps, zero copy of the update data can be achieved, and there is no need for transmission through the network protocol stack. This not only avoids the impact of changes in network transmission performance on the update data transmission process, but also improves data transmission efficiency.

[0074] S120 . In response to the storage operation of the frame buffer, refresh the application window of the application according to the update data.

[0075] After storing the updated data in the frame buffer, the host extracts the updated data stored in the frame buffer in response to the storage operation of the frame buffer, and refreshes the application window of the application according to the updated data, thereby changing the display content of the application window based on the updated data.

[0076] Based on the existing image display technology, refreshing the displayed image requires a lot of logic overhead for the central processing unit and the image processor. Reducing the data that needs to be processed during the image refresh process can significantly reduce the load on the central processing unit and the image processor, which helps to improve the operating efficiency of the host machine. Therefore, how to reduce the refresh area has always been a research and development direction that the industry pays more attention to. The inventor found through research that the display update area and the application window are in the same display plane, and there is a certain gap between the two. Figures 5 to 8 The four position relationships are shown.

[0077] Specifically, in the first position relationship, the display update area and the application window partially overlap, see Figure 5 , Figure 5 The shaded area shown is the overlapping area. The second position relationship is that the area of ​​the display update area is larger than the area of ​​the application window, and the application window is completely within the range corresponding to the display update area. Figure 6 , Figure 6 The shaded area shown is both the overlapping area and the display area corresponding to the application window. The third position relationship is that the area of ​​the application window is larger than the area of ​​the display update area, and the display update area is completely within the range corresponding to the application window. Figure 7 , Figure 7 The shaded area shown is both the overlapping area and the display update area (this situation often occurs when the virtual machine application plays a video). The fourth position relationship, such as Figure 8 As shown, the application window has nothing to do with the display update region, and there is no overlap between the two.

[0078] For the above four scenarios, as a preferred implementation, the overlapping area between the display update area and the application window can be first calculated based on the update data. For example, the update data corresponding to the display update area includes the display information of the display update data (10, 10, 100, 200). At the same time, the display information of the application window is (20, 20, 400, 500), and the overlapping area between the two is (20, 20, 90, 190). After determining the overlapping area, the host machine can only refresh the overlapping area included in the application window instead of refreshing the entire application window, thereby reducing the amount of data that needs to be processed in the process of displaying the application window, reducing the logical overhead occupied by the application window refresh, reducing the load of the central processing unit and the image processor, and helping to improve the operating performance of the host machine.

[0079] Furthermore, after the host machine completes the refresh display of the application window, since the display update area also needs to be displayed, the host machine can further draw the screen outside the aforementioned overlapping area in the display update area. Figure 8 In the application scenario shown, since there is no overlapping area, no processing can be done on the application window, and the display update area can be directly drawn. As for the specific implementation of drawing the display update area, reference can be made to the relevant technical implementation, which will not be described in detail here.

[0080] by Figure 5 Taking the first position relationship shown as an example, for the user, after clicking the application window of the virtual machine with the mouse, the host machine responds to the user's click operation according to the aforementioned process, and a display update area pops up based on the original application window. There is an overlapping area between the display update area and the application window. For the host machine, it is necessary to refresh the overlapping area of ​​the application window and update it to the content of the display update area. At the same time, the part outside the overlapping area of ​​the display update area must be drawn, so as to fully present the display update area. In addition, the display update area partially blocks the application window, the blocked area and the overlapping area.

[0081] As mentioned above, for Figure 7 The third positional relationship described often occurs in application scenarios where a virtual machine plays a video through an application. In this scenario, as the video content changes, the virtual machine application needs to continuously switch the displayed image frames, that is, continuously and repeatedly refresh the content of the overlapping area. The method provided in this application can effectively improve the smoothness of video playback.

[0082] To sum up, through the application window display method provided by the present application, when a display update event occurs, the update data is transmitted between the virtual machine and the host through the frame buffer of the host virtual graphics card without passing through the network. Therefore, the transmission process of the update data is not affected by the network transmission rate, and the data transmission process is more stable. At the same time, by transmitting the update data through the frame buffer, the process of data copying and parsing can be omitted, the delay is basically eliminated, the update data transmission efficiency is higher, and the process of refreshing the application window is smoother, which helps to improve the user experience.

[0083] Furthermore, compared to the prior art of updating the application window based on the desktop screenshot, the present method does not need to transmit the entire desktop screenshot, nor does it need to perform screenshot comparison. During the application window refresh process, only the update data corresponding to the display update area is transmitted, and the amount of data required to be processed is smaller. In addition, the overlapping area can be determined based on the relative position relationship between the display update area and the application window, and only the part corresponding to the overlapping area in the application window is refreshed and displayed, thereby avoiding invalid or redundant refreshes, which can effectively reduce the resource consumption of the host machine and help improve the operating performance of the host machine.

[0084] Furthermore, compared with the prior art that relies on network communication to realize the display of virtual machine application windows, which causes network security issues caused by the need to open the RDP network port, the display method provided by the present application does not require the transmission of data through the communication network during the display refresh process of the application window, and is therefore more secure.

[0085] As mentioned above, the display update time that triggers the application window update includes the target window creation time triggered by the external device. Combined with actual application experience, it can be known that the application window of the virtual machine operated by the user through the external device belongs to the application scenario with a very high frequency of updates in actual applications. Users often need to operate the application in actual applications. Therefore, how to quickly and accurately identify the operation request initiated by the user through the external device (i.e., the display update time) and then refresh the display content of the application window in time is also crucial to improving the user experience.

[0086] Based on this, the present application also provides a method for identifying display update events based on the above embodiments, which cooperates with the above-mentioned display method of the application window, so as to be able to respond to user operations quickly and accurately. Fig. 9 The display update event identification method provided in this application may include the following steps.

[0087] S200: Obtain a trigger event fed back by an external device, and send an interrupt signal to the virtual machine according to the trigger event.

[0088] In actual applications, the host machine provides users with external devices in various forms, such as mouse, keyboard, touchpad, etc. Of course, other external devices are also possible, which are not listed here one by one. This application does not limit the specific selection of external devices.

[0089] The user can provide corresponding trigger events to the host machine by operating an external device, such as a selection event triggered by a user clicking a mouse, or a control instruction provided by a keyboard, etc., which are all trigger events mentioned in this application.

[0090] When the user operates an external device, the host machine first obtains the trigger event of the external device. In an optional implementation, the host machine is configured with a virtual external device corresponding to the external device, such as a virtual mouse, a virtual keyboard, etc. After the user provides a trigger event through the external device, the host machine obtains the trigger event through the application window, and the application window responds to the trigger event and passes the trigger event to the virtual external device, and the virtual external device sends an interrupt signal to the virtual machine. As mentioned above, the virtual machine is also configured with some hardware resources of the host machine. Therefore, as an optional implementation, after obtaining the trigger event, the virtual external device can write a first value to the interrupt register corresponding to the external device to trigger the aforementioned interrupt signal. Of course, the virtual external device can also send an interrupt signal to the virtual machine in other ways, which will not be described in detail here. Under the premise of not exceeding the core idea of ​​this application, it also belongs to the scope of protection of this application.

[0091] It can be understood that the external device is a hardware component of the host machine. Therefore, in an optional implementation, when a user operates an external device, the external device driver loaded by the host operating system will first respond to the operation of the external device. Similar to the aforementioned virtual external device driver, the driver of the external device will also send an interrupt signal to the host operating system by writing an interrupt register. The host operating system responds to the interrupt signal and notifies the application window to obtain the trigger event of the external device feedback.

[0092] S210 . Respond to the interrupt signal through the virtual machine to notify the application program to respond to the trigger event, so as to trigger a display update event.

[0093] As mentioned above, the application mentioned in this application refers to an application running under the virtual machine operating system. Therefore, after the user initiates a trigger event for the window of the application through an external device, the host machine responds to the interrupt signal corresponding to the trigger event through the virtual machine.

[0094] Similar to the configuration of the host machine, the virtual machine is installed with the driver required to drive the virtual external device, namely, the virtual external device driver. The driver of the virtual external device responds to the interrupt signal and sends a notification message to the virtual machine operating system. The virtual machine operating system notifies the application of the virtual machine to handle the triggering event according to the notification message, thereby triggering the display update event. Furthermore, the host machine responds to the display update event and refreshes the display content of the application window. As for the specific process of the host machine responding to the display update event, please refer to Figure 4 The relevant contents in the illustrated embodiment will not be repeated here.

[0095] In summary, compared with the related art of responding to trigger events of external devices based on the RDP network protocol, the method provided in this embodiment does not require the participation of network protocols in the process of responding to trigger events. It can be achieved through the cooperation of the host's own software and hardware, without the participation of server-side software, and does not involve issues such as network protocol stacks. Therefore, the entire process of responding to trigger events and generating display update events is not affected by the network transmission rate, and the response process is faster, more stable, and more reliable, which helps to improve the user experience. Furthermore, since there is no need to open the RDP network port, the process of responding to trigger events is safer.

[0096] Based on the above, see Fig.10 , Fig.10 A schematic diagram of an application architecture of an application window display method is given.

[0097] Combination Fig.10 As shown, the architecture 500 includes a host machine 510 and a virtual machine 520, wherein the host machine 510 may include a host machine operating system 511, an application window display program 512 (i.e., a program corresponding to the application window display method provided in the above embodiment), a virtual machine hypervisor 513, and an application window set 514. The virtual machine 520 may include a virtual machine operating system 521, and an application 522 loaded in the virtual machine. In addition, the host machine desktop also includes a hardware platform 515.

[0098] The host machine 510 may be a computer with an operating system and a virtual machine management tool installed thereon. The virtual machine management tool may include a virtual machine management program 513, an application window display program 512, and the like.

[0099] The virtual machine management program 513 is an application program that configures, creates, and maintains virtual machines on a host machine by calling the system call interface of the host machine operating system. The virtual machine 520 can be a virtual computer constructed using a virtual machine management tool, which can essentially be a process running in the host machine operating system.

[0100] The operating system is a system software running on a hardware platform, which can be responsible for initializing and managing hardware resources, and providing a system call interface and a graphical desktop operating environment for application layer software. In the embodiment of the present application, the host operating system 511 refers to the operating system running on the physical machine in the virtualization scenario, and the virtual machine operating system 521 refers to the operating system running on the virtual machine in the virtualization scenario.

[0101] The application window display program 512 is a computer application running on the host operating system, and can exchange data with the application window display program 522 through the virtual machine operating system, thereby controlling the window display of the application software installed in the virtual machine.

[0102] The virtual machine application 522 may be an application that is incompatible with the host operating system but compatible with the virtual machine operating system, and the application window set 514 and the computing logic together constitute a complete application. The application window set 514 is a window set responsible for human-computer interaction of the application, and may include components such as the main window, subwindows, system tray icons, and window controls of the application.

[0103] The hardware platform 515 is a computer hardware system including computing resources, network resources and storage resources, which can provide hardware support for the operation of the host machine and the virtual machine. The hardware platform can include components such as a central processing unit (CPU), memory, disk, network card, graphics card, display, mouse, keyboard, etc. The hardware platform 515 can exchange data with the host machine operating system 511.

[0104] Furthermore, the present application also provides an electronic device. In practical applications, the electronic device includes:

[0105] Memory, used to store programs;

[0106] The processor is used to call the program in the memory to execute the display method of the application window and the display update event identification method provided in any of the above embodiments of the present application.

[0107] In some embodiments, this embodiment further provides a computer-readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash disk, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, etc., in which one or more instructions for implementing the above steps are stored. When the one or more instructions are executed by one or more processors, the processors execute the display method of the application window and the display update time identification method described above. Please refer to the above description for the relevant specific implementation, which will not be repeated here.

[0108] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the method for displaying an application window according to various embodiments of the present application and the method for identifying a display update time described in the above content of this specification.

[0109] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0110] Those skilled in the art will appreciate that the contents disclosed in this disclosure may be subject to various modifications and improvements. For example, the various devices or components described above may be implemented by hardware, or by software, firmware, or a combination of some or all of the three.

[0111] In addition, although the present disclosure makes various references to certain units in the system according to embodiments of the present disclosure, any number of different units can be used and run on the client and / or server. The units are only illustrative, and different aspects of the system and method can use different units.

[0112] Flowcharts are used in this disclosure to illustrate the steps of the method according to the embodiments of the present disclosure. It should be understood that the preceding or following steps are not necessarily performed precisely in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes.

[0113] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, etc. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of a software functional module. The present disclosure is not limited to any particular form of combination of hardware and software.

[0114] Unless otherwise defined, all terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an idealized or highly formal sense, unless explicitly defined as such herein.

[0115] The above is an explanation of the present disclosure and should not be considered as a limitation thereof. Although several exemplary embodiments of the present disclosure are described, it will be readily understood by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined in the claims. It should be understood that the above is an explanation of the present disclosure and should not be considered to be limited to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

Claims

1. A method for displaying an application window, characterized in that: Applied to a host machine, the host machine includes a host machine operating system, the host machine operating system runs a virtual machine and is configured with a host machine virtual graphics card, and an application program runs in the virtual machine operating system of the virtual machine, the method includes: In response to a display update event of the application, determining, by the virtual machine, update data corresponding to a display update area; The update data is stored in the frame buffer of the host machine virtual graphics card through the virtual machine; In response to the storing operation of the frame buffer, an application window of the application is refreshed according to the update data.

2. The method according to claim 1, characterized in that The virtual machine operating system is configured with a virtual machine graphics card driver; Determining, by the virtual machine, update data corresponding to the display update area includes: Calculate and display the update area through the virtual machine operating system; The update data corresponding to the display update area is determined by the virtual machine graphics card driver.

3. The method according to claim 2, characterized in that The display update event includes: a target window creation event triggered by an external device, or an image update event triggered by the application when a target image needs to be displayed; Calculating and displaying an update area through the virtual machine operating system includes: Based on a preset correspondence between a window creation event and a new window, determining, by the virtual machine operating system, a target new window corresponding to the target window creation event; Determining a display update area corresponding to the target new window based on preset configuration information of the target new window; or, The display update area is determined by the virtual machine operating system according to the image specification of the target image.

4. The method according to claim 1, characterized in that: Refreshing the application window of the application according to the update data includes: Calculate the overlapping area between the display update area and the application window according to the update data; The overlapping area is refreshed.

5. The method according to claim 4, characterized in that Also includes: A screen outside the overlapping area in the display update area is drawn.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: Acquire a trigger event fed back by an external device, and send an interrupt signal to the virtual machine according to the trigger event; The virtual machine responds to the interrupt signal to notify the application to respond to the trigger event, so as to trigger the display update event.

7. The method according to claim 6, characterized in that The host machine is configured with a virtual external device corresponding to the external device; The obtaining of a trigger event fed back by an external device and sending an interrupt signal to the virtual machine according to the trigger event includes: Acquiring a trigger event fed back by an external device through the application window; In response to the triggering event, an interrupt signal is sent to the virtual machine through the virtual external device.

8. The method according to claim 7, characterized in that The virtual machine is configured with a driver of the virtual external device; Responding to the interrupt signal through the virtual machine includes: The driver responds to the interrupt signal and sends notification information to the virtual machine operating system, where the notification information is used to notify the application to respond to the trigger event.

9. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to call the program in the memory to execute the method for displaying an application window according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: A program is stored thereon, the program causing a computer to execute the method for displaying an application window according to any one of claims 1 to 8.