WO2015154592A1 - 一种更新虚拟桌面的方法和装置 - Google Patents

一种更新虚拟桌面的方法和装置 Download PDF

Info

Publication number
WO2015154592A1
WO2015154592A1 PCT/CN2015/073263 CN2015073263W WO2015154592A1 WO 2015154592 A1 WO2015154592 A1 WO 2015154592A1 CN 2015073263 W CN2015073263 W CN 2015073263W WO 2015154592 A1 WO2015154592 A1 WO 2015154592A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
column
thin client
row
sent
Prior art date
Application number
PCT/CN2015/073263
Other languages
English (en)
French (fr)
Inventor
胡泊
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP15777456.3A priority Critical patent/EP3208997A4/en
Priority to US15/519,811 priority patent/US20170242712A1/en
Publication of WO2015154592A1 publication Critical patent/WO2015154592A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/34Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators for rolling or scrolling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0464Positioning
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2354/00Aspects of interface with display user
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2370/00Aspects of data communication
    • G09G2370/02Networking aspects
    • G09G2370/022Centralised management of display operation, e.g. in a server instead of locally

Definitions

  • the present invention relates to cloud computing technologies, and more particularly to a method and apparatus for updating a virtual desktop.
  • Virtual desktop is an important application of cloud computing. Compared with traditional PCs and notebooks, the thin client desktop is replaced by a virtual desktop running in a remote data center. The content in the virtual desktop is returned to the user's screen as an image. Among them, the thin client refers to a computer terminal that basically does not need an application in the client-server network system.
  • the related method of updating the virtual desktop is: when the virtual desktop changes, the server sends the image corresponding to the changed virtual desktop to the thin client.
  • the server sends the entire image information corresponding to the changed virtual desktop to the thin client, thereby occupying a large bandwidth. A waste of bandwidth when updating a virtual desktop.
  • the embodiment of the present invention provides a method and an apparatus for updating a virtual desktop, which can reduce the waste of bandwidth when updating the virtual desktop, thereby saving bandwidth.
  • an embodiment of the present invention provides a method for updating a virtual desktop, including:
  • the server detects whether the second scrolling command is received within a preset time. If the second scrolling command is not received, the server calculates the first newly appearing pixel according to the first image that is cached and the image that was last sent to the thin client. The information is sent to the thin client by the calculated first new pixel information.
  • the method further includes:
  • the server When the server receives the second scrolling command within a preset time, the server caches the second image corresponding to the scrolling area of the currently active window, and according to the second image and the first image, Determining that the scrolling area of the current active window changes, calculating a second offset according to the second image and the first image, and calculating the calculated second offset and the second scrolling command Sending a second scrolling direction to the thin client;
  • the server continues to perform the step of detecting whether a third scroll command is received within a preset time.
  • the method further includes:
  • the server determines, according to the second image and the first image, that the scrolling area of the current active window has not changed, the server sends the thin client according to the second image and the last time The image of the end calculates the second newly appearing pixel information, and sends the calculated second newly appearing pixel information to the thin client.
  • the calculating the offset corresponding to the first scroll command comprises:
  • the first image cached and the image sent to the thin client last time when it is determined that the scroll area of the current active window changes, the first image that is cached and the image that was last sent to the thin client are calculated.
  • the first offset when it is determined that the scroll area of the current active window changes, the first image that is cached and the image that was last sent to the thin client are calculated. The first offset.
  • the server determines, according to the first image that is cached and the image that is sent to the thin client last time, whether the scroll area of the current active window changes includes:
  • the calculating the first offset according to the first image and the image sent to the thin client last time includes:
  • n is a positive integer and x is a positive integer greater than 2.
  • the method further includes:
  • the calculating the first offset according to the first image that is cached this time and the image that is sent to the thin client last time includes:
  • n is a positive integer
  • x is a positive integer greater than 2
  • m is the total number of rows or columns of images last sent to the thin client, m being greater than n.
  • the method further includes:
  • the calculating, by the server, the first newly appearing pixel information according to the first image that is cached and the image that is sent to the thin client last time includes:
  • the first newly appearing pixel information is the first to (n-1)th rows or columns of the first image; if not, the last time is sent to the thin client End image
  • the first row or column matches the (n+1)th row or column of the first image; if the first row or column of the image that was last sent to the thin client is all of the first image If none of the rows match, the first newly appearing pixel information is the first image; wherein n is a positive integer and x is a positive integer greater than 2.
  • the calculating, by the server, the first newly appearing pixel information according to the first image that is cached and the image that is sent to the thin client last time includes:
  • the first newly appearing pixel information is the nth to mth rows or columns of the first image; if not, continuing to send the image that was last sent to the thin client
  • the mth row or column is matched with the (n-1)th row or column of the first image; if the mth row or column of the image last sent to the thin client is all of the first image If the row or the column cannot match, the first newly appearing pixel information is the first image; wherein m is the total row or column number of the image sent to the thin client last time, and m is greater than n.
  • the calculating the second offset according to the second image and the first image includes:
  • n is a positive integer and x is a positive integer greater than 2.
  • the method further includes:
  • the calculating the second offset according to the second image and the first image includes:
  • the method further includes:
  • the method further includes:
  • the server When a window in the virtual desktop is changed from the inactive window to the current active window, the server obtains the application type of the currently obtained window, and searches for the application type of the pre-active window in the application type saved by itself. If the server finds, the server caches the image corresponding to the scrolling area of the current active window, and sends the image to the thin client.
  • Embodiments of the present invention also provide a computer program including program instructions that, when executed by a server, cause a server to perform the above method.
  • Embodiments of the present invention also provide a carrier carrying the computer program.
  • the embodiment of the invention further provides a method for updating a virtual desktop, including:
  • the thin client receives the first offset from the server and the first scroll direction or the second offset and the second scroll direction, and determines the scrolling of the current active window according to the received first scroll direction or the second scroll direction
  • the area is moved down or up, and the scroll area is uniformly moved down or up according to the judgment result until the number of lines moved down or up is equal to the received first offset or second offset.
  • the method further includes:
  • the scroll area of the current active window is left-shifted or right-shifted according to the received first scroll direction or the second scroll direction
  • the scroll area is uniformly left-shifted or right-shifted according to the determination result until The number of columns shifted left or right is equal to the received first offset or second offset.
  • the method further includes:
  • the thin client When the thin client receives the first newly appearing pixel information or the second newly appearing pixel information from the server, the received first newly appearing pixel information or the second newly appearing pixel information is on Displayed on newly appearing pixels during shifting or moving down or left or right.
  • Embodiments of the present invention also provide a computer program including program instructions that, when executed by a thin client, cause the thin client to perform the above method.
  • Embodiments of the present invention also provide a carrier carrying the computer program.
  • An embodiment of the present invention further provides an apparatus for updating a virtual desktop, including:
  • a calculation module configured to: when receiving the first scroll command, calculate a first offset corresponding to the first scroll command; detect whether a second scroll command is received within a preset time; if the second scroll command is not received, Calculating the first newly appearing pixel information according to the first image buffered this time and the image sent to the thin client last time;
  • a sending module configured to send the calculated first offset and the first scrolling direction of the received first scrolling command to the thin client; and send the calculated first newly appearing pixel information to the thin client .
  • the computing module is further configured to:
  • the sending module After the sending module sends the calculated second offset and the second scroll direction of the second scroll command to the thin client, it continues to detect whether the third scroll command is received within the preset time;
  • the sending module is further configured to:
  • the computing module is further configured to:
  • the sending module is further configured to:
  • the function of the calculating module to calculate the first offset corresponding to the first scrolling command is set to:
  • the first image corresponding to the scroll area of the current active window is cached; the server determines, according to the first image cached and the image sent to the thin client last time, that the scroll area of the current active window changes, according to the current cache. The first image and the image last sent to the thin client calculate the first offset.
  • the calculating module determines, according to the first image and the image sent to the thin client last time, whether the scrolling area of the current active window changes or not is set to:
  • the function of calculating, by the computing module, the first offset according to the first image and the image sent to the thin client last time is set to:
  • n is a positive integer and x is a positive integer greater than 2.
  • the function of calculating, by the calculation module, the first shift amount according to the first image and the image sent to the thin client last time is set to:
  • n is a positive integer
  • x is a positive integer greater than 2
  • m is the total number of rows or columns of images last sent to the thin client, m being greater than n.
  • the function of calculating, by the computing module, the first newly appearing pixel information according to the first image and the image sent to the thin client last time is set to:
  • the first newly appearing pixel information is the first to (n-1)th rows or columns of the first image; if not, the last time is continued.
  • the first row or column of the image sent to the thin client matches the (n+1)th row or column of the first image; if the first row or column of the image that was last sent to the thin client If all rows or columns of the first image cannot match, then the first newly appearing pixel information is the first image; wherein n is a positive integer and x is a positive integer greater than 2.
  • the function of calculating, by the computing module, the first newly appearing pixel information according to the first image and the image sent to the thin client last time is set to:
  • the first newly appearing pixel information is the nth to mth rows or columns of the first image; if not, continuing to send the image that was last sent to the thin client
  • the mth row or column is matched with the (n-1)th row or column of the first image; if the mth row or column of the image last sent to the thin client is all of the first image If the row or the column cannot match, the first newly appearing pixel information is the first image; wherein m is the total row or column number of the image sent to the thin client last time, and m is greater than n.
  • the function of the calculating module to calculate the second offset according to the second image and the first image is set to:
  • n is a positive integer and x is a positive integer greater than 2.
  • the function of the calculating module to calculate the second offset according to the second image and the first image is set to:
  • the computing module is further configured to:
  • An embodiment of the present invention further provides an apparatus for updating a virtual desktop, including:
  • a receiving module configured to receive a first offset from the server and a first scrolling direction or a second offset and a second scrolling direction;
  • the moving module is configured to determine, according to the received first scroll direction or the second scroll direction, that the scroll area of the current active window is moved down or up, and the scroll area is uniformly moved up or down according to the judgment result until moving down or The number of rows moved up is equal to the received first offset or second offset.
  • the mobile module is further configured to:
  • the receiving module is further configured to:
  • the device for updating a virtual desktop further includes:
  • the display module is configured to display the received first newly appearing pixel information or the second newly appearing pixel information on the newly appearing pixels in the process of moving up or down or left or right.
  • the embodiment of the present invention includes: when the server receives the first scroll command, calculating a first offset corresponding to the first scroll command, and calculating the first offset and the received first scroll
  • the first scrolling direction in the command is sent to the thin client; the server detects whether the second scrolling command is received within the preset time, and if the second scrolling command is not received, the server according to the first image cached and the last time
  • the image sent to the thin client calculates the first newly appearing pixel information, and sends the calculated first newly appeared pixel information to the thin client.
  • the server when receiving the first scrolling command, the server sends only the first offset and the first scrolling direction to the thin client, and then continues to detect whether the second scroll is received within the preset time.
  • the command if the second scrolling command is not received, the server calculates the first newly appearing pixel information according to the first image cached and the image sent to the thin client last time, and the calculated first newly appearing pixel information
  • the image is sent to the thin client, and the image corresponding to the changed virtual desktop is sent to the thin client every time the scroll command is received, which reduces the waste of bandwidth of the virtual desktop, thereby saving bandwidth.
  • FIG. 1 is a flowchart of a method for updating a virtual desktop applied to a server according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for updating a virtual desktop according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for updating a virtual desktop according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of another apparatus for updating a virtual desktop according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for updating a virtual desktop, which is applied to a server, including:
  • Step 100 When the server receives the first scrolling command, calculate a first offset corresponding to the first scrolling command.
  • calculating the first offset corresponding to the first scroll command includes:
  • the first image corresponding to the scrolling area of the current active window is cached; according to the first image cached and the image sent to the thin client last time, it is determined that the scrolling area of the current active window changes, according to the cached
  • the first offset is calculated for an image and the image that was last sent to the thin client.
  • the first scroll command may be a middle mouse button command, or a mouse movement and a left mouse button press command, or a finger sliding on the touch screen.
  • the first scrolling direction is also included in the first scrolling command.
  • the server determines, according to the first image that is cached and the image that is sent to the thin client last time, whether the scroll area of the current active window changes includes:
  • a row (or column) of the image sent to the thin client last time can match the row (or column) corresponding to the first image of the cache to refer to a row (or column) of the image sent to the thin client last time.
  • Each pixel of the pixel is the same as the pixel corresponding to the row (or column) corresponding to the first image of the cache.
  • the calculating, by the first image of the current cache and the image sent to the thin client last time, the first offset includes:
  • the first row (or column) of the image sent to the thin client last time and the nth row (or column) of the first image cached in the current cache are the first row of the image sent to the thin client last time.
  • Each pixel of the (or column) is the same as the pixel corresponding to the nth row (or column) of the first image of the cache.
  • the image that was last sent to the thin client is continued.
  • the first row (or column) matches the (n+1)th row (or column) of the first image of the cache.
  • the image that was last sent to the thin client is continued.
  • the mth row (or column) matches the (n-1)th row (or column) of the first image of the cache.
  • Step 101 Send the calculated first offset and the first scroll direction of the received first scroll command to the thin client.
  • Step 102 The server detects whether a second scrolling command is received within a preset time, if not After receiving the second scrolling command, the server calculates the first newly appearing pixel information according to the first image cached and the image sent to the thin client last time, and sends the calculated first newly appearing pixel information to the thin device. Client.
  • the server caches the second image corresponding to the scrolling area of the current active window, and determines the current active window according to the second image and the first image. Changing a scrolling area, calculating a second offset according to the second image and the first image, and transmitting the calculated second offset and the second scrolling direction of the second scrolling command to the thin client; the server continues A step of detecting whether a third scroll command is received within a preset time is performed.
  • the server calculates the second newly appearing pixel information according to the second image and the image sent to the thin client last time. And sending the calculated second newly appearing pixel information to the thin client.
  • the server calculates the first newly appearing pixel information according to the first image cached and the image sent to the thin client last time, including:
  • n is a positive integer.
  • the mth row (or column) of the first image of the end matches the (n-1)th row (or column) of the image being cached; if the mth row (or column) of the image sent to the thin client last time With this cached number If all the lines of an image cannot match, the first newly appearing pixel information is the currently cached image.
  • m is the total number of rows (or columns) of images that were last sent to the thin client.
  • the server caches the second image corresponding to the scrolling area of the currently active window, and determines, according to the second image and the first image, that the scrolling area of the current active window changes. Calculating a second offset according to the second image and the first image, and transmitting the calculated second offset and the second scrolling direction to the thin client; the server continues to execute whether to detect whether the third scroll is received within the preset time The steps of the command.
  • the server calculates the second newly appearing pixel information according to the second image and the image sent to the thin client last time, and the calculation is performed.
  • the obtained second newly appearing pixel information is sent to the thin client.
  • the server determines, according to the second image and the first image that is cached in this time, whether the scroll area of the current active window changes:
  • a row of the second image and the row corresponding to the first image of the current cache can match: each pixel of a certain row (or column) of the second image corresponds to a row corresponding to the first image of the current cache (or Columns are the same for the corresponding pixels.
  • the calculating the second offset according to the second image and the first image includes:
  • first row (or column) of the first image and the nth row (or column) of the second image are matched to refer to each pixel of the first row (or column) of the first image and the second image
  • the pixels corresponding to n rows (or columns) are the same.
  • first row (or column) of the first image does not match the nth row (or column) of the second image, then the first row (or column) of the first image and the first image of the second image are continued ( n+1) Rows (or columns) are matched.
  • the mth row (or column) of the first image does not match the nth row (or column) of the second image, then the mth row (or column) of the first image and the first image of the second image are continued ( N-1) Rows (or columns) are matched.
  • the method when a window in the virtual desktop is changed from an inactive window to a current active window, the method further includes:
  • the server obtains the application type of the currently obtained window, searches for the application type of the window before the activity in the application type saved by itself, and if found, the server caches the image corresponding to the scroll area of the current active window, and sends the image to the thin client. .
  • the image corresponding to the changed screen is sent to the thin client by using the method in the related art.
  • the application type of the currently obtained window can be obtained from the string in the current active window title.
  • the application type can be Microsoft Word, or Microsoft Excel, or a notepad or a browser.
  • the embodiment of the invention provides a method for updating a virtual desktop, which is applied to a thin client, and includes:
  • the thin client receives the first offset from the server and the first scroll direction or the second offset and the second scroll direction, and determines the scrolling of the current active window according to the received first scroll direction or the second scroll direction
  • the area is moved down (or up), and the scroll area is evenly moved down (or up) until the number of rows moved down (or up) is equal to the first offset or second offset received.
  • the scroll area of the current active window is right shift (or left shift)
  • the scroll area is evenly shifted right (or left) until right shift ( Or the left shift) the number of columns is equal to the received first offset or second offset.
  • the newly appearing pixels above (or above) the scrolling area are filled with a solid color (for example, white), and the left (or right) of the scrolling area during the left shift (or right shift)
  • the newly appearing pixels are filled with a solid color (such as white).
  • the method further includes:
  • the received first newly appearing pixel information or the second newly appearing pixel information is displayed on newly appearing pixels in the process of moving up or down or left or right.
  • the method includes:
  • Step 200 When the server receives the first scrolling command, calculate a first offset corresponding to the first scrolling command.
  • Step 201 The server sends the calculated first offset and the first scroll direction of the received first scroll command to the thin client.
  • Step 202 The thin client receives the first offset and the first scrolling direction, and determines, according to the received first scrolling direction, that the scrolling area of the current active window is moving up or down, and uniformly moving the scrolling area up or down. Move until the number of rows moved up or down is equal to the first offset received.
  • the scrolling area of the current active window is left-shifted or right-shifted
  • the scrolling area is uniformly shifted left or right until the number of rows moved to the left or right is received.
  • the first offset is equal.
  • Step 203 The server detects whether a second scroll command is received within a preset time. If the second scroll command is not received, step 204 is performed; if the second scroll command is received, step 206 is performed.
  • Step 204 The server calculates the first newly appearing pixel information according to the first image that is cached and the image that is sent to the thin client last time, and sends the calculated first newly appearing pixel information to the thin client.
  • Step 205 the thin client receives the first newly appearing pixel information up or down or Displayed on newly appearing pixels during left or right shift.
  • Step 206 the server caches the second image corresponding to the scrolling area of the current active window, and determines whether the scrolling area of the current active window changes according to the second image and the first image. If the change occurs, step 207 is performed; If no change occurs, step 209 is performed.
  • Step 207 Calculate a second offset according to the second image and the first image, and send the calculated second offset and the second scroll direction of the second scroll command to the thin client; and execute step 203 .
  • Step 208 The thin client receives the second offset and the second scrolling direction, and determines, according to the received second scrolling direction, that the scrolling area of the current active window is moving up or down, and uniformly moving the scrolling area up or down. Move until the number of rows moved up or down is equal to the second offset received.
  • the scrolling area of the current active window is left-shifted or right-shifted
  • the scrolling area is uniformly shifted left or right until the number of rows moved to the left or right is received.
  • the second offset is equal.
  • Step 209 The server calculates the second newly appearing pixel information according to the second image and the image sent to the thin client last time, and sends the calculated second newly appearing pixel information to the thin client.
  • Step 210 The thin client displays the second newly appeared pixel information on the newly appearing pixel in the process of moving up or down or moving left or right.
  • an embodiment of the present invention further provides an apparatus for updating a virtual desktop, including at least:
  • the calculation module 300 is configured to: when receiving the first scroll command, calculate a first offset corresponding to the first scroll command; detect whether the second scroll command is received within the preset time; if the second scroll command is not received, Calculating the first newly appearing pixel information according to the first image buffered this time and the image sent to the thin client last time;
  • the sending module 301 is configured to send the calculated first offset and the first scroll direction of the received first scroll command to the thin client; and send the calculated first newly appearing pixel information to the thin client end.
  • the calculation module 300 is further configured to:
  • the calculating module 300 is further configured to:
  • the sending module 301 is further configured to:
  • the calculation module 300 is further configured to:
  • the sending module 301 is also configured to:
  • the calculated second newly appearing pixel information is sent to the thin client.
  • the function of the calculation module 300 for calculating the first offset corresponding to the first scrolling command is set to:
  • the first image corresponding to the scroll area of the current active window is cached; the server determines, according to the first image cached and the image sent to the thin client last time, that the scroll area of the current active window changes, according to the current cache. The first image and the image last sent to the thin client calculate the first offset.
  • the calculating module 300 determines whether the scrolling area of the current active window changes according to the first image and the image sent to the thin client last time is set to:
  • the function of the calculation module 300 for calculating the second offset according to the second image and the first image is set to:
  • n is a positive integer and x is a positive integer greater than 2.
  • the function of the calculation module 300 for calculating the second offset according to the second image and the first image is set to:
  • the computing module 300 determines whether the scrolling area of the current active window changes according to the first image and the image sent to the thin client last time is set to:
  • the function of the calculation module 300 for calculating the first offset according to the first image and the image sent to the thin client last time is set to:
  • n is a positive integer and x is a positive integer greater than 2.
  • the function of the calculation module 300 for calculating the first offset according to the first image and the image sent to the thin client last time is set to:
  • n is a positive integer
  • x is a positive integer greater than 2
  • m is the total number of rows (or columns) of images last sent to the thin client, m being greater than n.
  • the calculation module 300 is further configured to:
  • the scroll command is not received within the preset time, or the judging module judges that the scroll area of the current active window has not changed according to the first image and the last cached image, according to the first image and the image sent to the thin client last time. Calculating the first newly appearing pixel information, and transmitting the calculated first newly appearing pixel information to the thin client.
  • the function of calculating, by the calculation module 300, the first newly appearing pixel information according to the first image and the image sent to the thin client last time is set to:
  • the function of calculating, by the calculation module 300, the first newly appearing pixel information according to the first image and the image sent to the thin client last time is set to:
  • the first newly appearing pixel information is the nth to mth row (or column) of the first image; if it cannot match, the mth row of the image last sent to the thin client is continued (or column) matches the (n-1)th row (or column) of the first image; if the mth row (or column) of the image sent to the thin client last time and all rows (or columns of the first image) Neither can match, then the first newly appearing pixel information is the first image; where m is the total number of rows (or columns) of the last cached image.
  • the calculation module 300 is further configured to:
  • a window in the virtual desktop is detected to be changed from an inactive window to a currently active window, and the application type of the currently obtained window is obtained, and the application type of the window before the activity is found in the application type saved by itself, and if found, the current activity is
  • the image corresponding to the scroll area of the window is cached and sent to the thin client.
  • an embodiment of the present invention further provides an apparatus for updating a virtual desktop, including at least:
  • the receiving module 400 is configured to receive a first offset from the server and a first scroll direction or a second offset and a second scroll direction;
  • the moving module 401 is configured to determine, according to the received first scroll direction or the second scroll direction, that the scroll area of the current active window is moved down (or moved up), and the scroll area is uniformly moved down (or moved up) until the next The number of rows shifted (or moved up) is equal to the received first offset or second offset.
  • the mobile module 401 is further configured to:
  • the receiving module 400 is further configured to:
  • Thin clients also include:
  • the display module 402 is configured to display the received first newly appearing pixel information or the second newly appearing pixel information on the newly appearing pixels in the process of moving up or down or left or right.
  • the server when receiving the first scrolling command, the server only sends the first offset and the first scrolling direction to the thin client, and then continues to detect whether the second scrolling command is received within the preset time, if not Receiving the second scrolling command, the server calculates the first newly appearing pixel information according to the first image that is cached and the image that was sent to the thin client last time, and sends the calculated first newly appearing pixel information to the thin client. The end does not need to send the image corresponding to the changed virtual desktop to the thin client every time the scroll command is received, which reduces the waste of bandwidth of the virtual desktop, thereby saving bandwidth.

Abstract

一种更新虚拟桌面的方法和装置,包括:服务器接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量(100),将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端(101);服务器在预设时间内检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端(102)。上述技术方案减少了更新虚拟桌面时对带宽的浪费。

Description

一种更新虚拟桌面的方法和装置 技术领域
本发明涉及云计算技术,尤指一种更新虚拟桌面的方法和装置。
背景技术
虚拟桌面是云计算的一个重要应用,与传统的PC机和笔记本相比,瘦客户端的桌面被运行在远程数据中心的虚拟桌面所代替。虚拟桌面中的内容以图像的方式回传到使用者的屏幕上。其中,瘦客户端是指在客户端-服务器网络体系中的一个基本无需应用程序的计算机终端。
相关的更新虚拟桌面的方法是:当虚拟桌面发生变化时,服务器将变化后的虚拟桌面对应的图像发送给瘦客户端。
相关的更新虚拟桌面的方法中,在虚拟桌面对应的图像发生部分变化时,服务器均要将变化后的虚拟桌面对应的整个图像信息发送给瘦客户端,从而对带宽的占用较大,造成了在更新虚拟桌面时对带宽的浪费。
发明内容
为了解决上述问题,本发明实施例提出了一种更新虚拟桌面的方法和装置,能够减少更新虚拟桌面时对带宽的浪费,从而节约带宽。
为了达到上述目的,本发明实施例提出了一种更新虚拟桌面的方法,包括:
服务器接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量;
将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端;
服务器在预设时间内检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端。
可选地,所述方法还包括:
当所述服务器在预设时间内接收到第二滚动命令,所述服务器将所述当前活动窗口的滚动区域对应的第二图像进行缓存,并根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域发生变化,根据所述第二图像和所述第一图像计算第二偏移量,将计算得到的第二偏移量和所述第二滚动命令中的第二滚动方向发送给所述瘦客户端;
所述服务器继续执行在预设时间内检测是否接收到第三滚动命令的步骤。
可选地,所述方法还包括:
当所述服务器根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域没有发生变化时,所述服务器根据所述第二图像和所述上一次发送给瘦客户端的图像计算第二新出现的像素信息,将计算得到的第二新出现的像素信息发送给所述瘦客户端。
可选地,所述计算第一滚动命令对应的偏移量包括:
将当前活动窗口的滚动区域对应的第一图像进行缓存;
根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断出当前活动窗口的滚动区域发生变化时,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算所述第一偏移量。
可选地,所述服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化包括:
将所述上一次发送给瘦客户端的图像的每一行或列与所述第一图像对应的行或列进行匹配,若均能够匹配,则判断出所述当前活动窗口的滚动区域没有发生变化;如果所述上一次发送给瘦客户端的图像的某一行或列与所述第一图像对应的行或列不能匹配,则判断出所述当前活动窗口的滚动区域发生变化。
可选地,所述根据第一图像和上一次发送给瘦客户端的图像计算第一偏移量包括:
根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移, 将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第2到(2+x)行或列与所述第一图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第一偏移量为(n-1);
其中,n为正整数,x为大于2的正整数。
可选地,所述方法还包括:
当所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列不能匹配时,继续将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第(n+1)行或列进行匹配。
可选地,所述根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一偏移量包括:
根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第(m-1-x)到(m-1)行或列与所述第一图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第一偏移量为(m-n);
其中,n为正整数,x为大于2的正整数,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
可选地,所述方法还包括:
当所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列不能匹配时,继续将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第(n-1)行或列进行匹配。
可选地,所述服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息包括:
根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述上一次发送给瘦客户端的图像的第1行与所述第一图像的第n行进行匹配,若能够匹配,则所述第一新出现的像素信息为所述第一图像的第1到第(n-1)行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像 的第1行或列与所述第一图像的第(n+1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的所有行均不能匹配,则所述第一新出现的像素信息为所述第一图像;其中,n为正整数,x为大于2的正整数。
可选地,所述服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息包括:
根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则所述第一新出现的像素信息为第一图像的第n到第m行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第(n-1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的所有行或列均不能匹配,则所述第一新出现的像素信息为第一图像;其中,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
可选地,所述根据第二图像和第一图像计算第二偏移量包括:
根据所述第二滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述第一图像的第1行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第二图像的第2到(2+x)行或列与所述第一图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第二偏移量为(n-1);
其中,n为正整数,x为大于2的正整数。
可选地,所述方法还包括:
当所述第一图像的第1行或列与所述第二图像的第n行或列不能匹配时,继续将所述第一图像的第1行或列与所述第二图像的第(n+1)行或列进行匹配。
可选地,所述根据第二图像和第一图像计算第二偏移量包括:
根据所述第二滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述第一图像的第m行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第一图像的第(m-1-x)到(m-1)行或列与所述第二图像 的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第二偏移量为(m-n)。其中,n为正整数,x为大于2的正整数,m为所述第一图像的总行或列数,m大于n。
可选地,所述方法还包括:
当所述第一图像的第m行或列与所述第二图像的第n行或列不能匹配,
继续将所述第一图像的第m行或列与所述第二图像的第(n-1)行或列进行匹配。
可选地,所述方法还包括:
当虚拟桌面中的一个窗口由非活动窗口变为所述当前活动窗口时,所述服务器获取当前获得窗口的应用类型,在自身保存的应用类型中查找所述当活动前窗口的应用类型,若查找到,则所述服务器将所述当前活动窗口的滚动区域对应的图像进行缓存,并发送给所述瘦客户端。
本发明实施例还提出了一种计算机程序,包括程序指令,当所述程序指令被服务器执行时,使得服务器可执行上述方法。
本发明实施例还提出了一种载有所述计算机程序的载体。
本发明实施例还提出了一种更新虚拟桌面的方法,包括:
瘦客户端接收到来自服务器的第一偏移量和第一滚动方向或第二偏移量和第二滚动方向,根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是下移或上移,根据判断结果将滚动区域均匀下移或上移,直到下移或上移的行数与接收到的第一偏移量或第二偏移量相等。
可选地,该方法还包括:
当根据所述接收到的第一滚动方向或第二滚动方向判断出所述当前活动窗口的滚动区域是左移或右移时,根据判断结果将所述滚动区域均匀左移或右移,直到左移或右移的列数与所述接收到的第一偏移量或第二偏移量相等。
可选地,该方法还包括:
当所述瘦客户端接收到来自所述服务器的第一新出现的像素信息或第二新出现的像素信息时,将接收的第一新出现的像素信息或第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
本发明实施例还提出了一种计算机程序,包括程序指令,当所述程序指令被瘦客户端执行时,使得瘦客户端可执行上述方法。
本发明实施例还提出了一种载有所述计算机程序的载体。
本发明实施例还提出了一种更新虚拟桌面的装置,包括:
计算模块,设置为接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量;在预设时间内检测是否接收到第二滚动命令;如果没有接收到第二滚动命令,则根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息;
发送模块,设置为将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端;将计算得到的第一新出现的像素信息发送给瘦客户端。
可选地,所述计算模块还设置为:
在预设时间内接收到第二滚动命令,将所述当前活动窗口的滚动区域对应的第二图像进行缓存;并根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域发生变化,根据所述第二图像和所述第一图像计算第二偏移量;以及
在所述发送模块将计算得到的第二偏移量和所述第二滚动命令中的第二滚动方向发送给瘦客户端后,继续在预设时间内检测是否接收到第三滚动命令;
所述发送模块还设置为:
将计算得到的第二偏移量和所述第二滚动方向发送给所述瘦客户端。
可选地,所述计算模块还设置为:
根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域没有发生变化,根据所述第二图像和所述上一次发送给瘦客户端的图像计算第二新出现的像素信息;
所述发送模块还设置为:
将计算得到的第二新出现的像素信息发送给所述瘦客户端。
可选地,所述计算模块计算第一滚动命令对应的第一偏移量的功能是设置为:
将当前活动窗口的滚动区域对应的第一图像进行缓存;服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断出当前活动窗口的滚动区域发生变化时,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算所述第一偏移量。
可选地,所述计算模块根据第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化的功能是设置为:
将所述上一次发送给瘦客户端的图像的每一行或列与所述第一图像对应的行或列进行匹配,若均能够匹配,则判断出所述当前活动窗口的滚动区域没有发生变化;如果所述上一次发送给瘦客户端的图像的某一行或列与所述第一图像对应的行或列不能匹配,则判断出所述当前活动窗口的滚动区域发生变化。
可选地,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算第一偏移量的功能是设置为:
根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第2到(2+x)行或列与所述第一图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第一偏移量为(n-1);
其中,n为正整数,x为大于2的正整数。
可选地,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算偏第一移量的功能是设置为:
根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第(m-1-x)到(m-1)行或列与所述第一图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第一偏移量为(m-n);
其中,n为正整数,x为大于2的正整数,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
可选地,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息的功能是设置为:
根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则所述第一新出现的像素信息为所述第一图像的第1到第(n-1)行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第(n+1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的所有行或列均不能匹配,则所述第一新出现的像素信息为所述第一图像;其中,n为正整数,x为大于2的正整数。
可选地,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息的功能是设置为:
根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则所述第一新出现的像素信息为第一图像的第n到第m行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第(n-1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的所有行或列均不能匹配,则所述第一新出现的像素信息为第一图像;其中,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
可选地,所述计算模块根据第二图像和第一图像计算第二偏移量的功能是设置为:
根据所述第二滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述第一图像的第1行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第一图像的第2到(2+x)行或列与所述第二图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第二偏移量为(n-1);
其中,n为正整数,x为大于2的正整数。
可选地,所述计算模块根据第二图像和第一图像计算第二偏移量的功能是设置为:
根据所述第二滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述第一图像的第m行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第一图像的第(m-1-x)到(m-1)行或列与所述第二图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第二偏移量为(m-n)。其中,n为正整数,x为大于2的正整数,m为所述第一图像的总行或列数,m大于n。
可选地,所述计算模块还设置为:
检测到虚拟桌面中的一个窗口由非活动窗口变为所述当前活动窗口,获取当前获得窗口的应用类型,在自身保存的应用类型中查找所述当活动前窗口的应用类型,若查找到,则将所述当前活动窗口的滚动区域对应的图像进行缓存,并发送给所述瘦客户端。
本发明实施例还提出了一种更新虚拟桌面的装置,包括:
接收模块,设置为接收到来自服务器的第一偏移量和第一滚动方向或第二偏移量和第二滚动方向;
移动模块,设置为根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是下移或上移,根据判断结果将滚动区域均匀下移或上移,直到下移或上移的行数与接收到的第一偏移量或第二偏移量相等。
可选地,所述移动模块还设置为:
根据所述接收到的第一滚动方向或第二滚动方向判断出所述当前活动窗口的滚动区域是左移或右移,根据判断结果将所述滚动区域均匀左移或右移, 直到左移或右移的列数与所述接收到的第一偏移量或第二偏移量相等。
可选地,所述接收模块还设置为:
接收到来自所述服务器的第一新出现的像素信息或第二新出现的像素信息;
所述更新虚拟桌面的装置还包括:
显示模块,设置为将接收的第一新出现的像素信息或第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
与相关技术相比,本发明实施例包括:服务器接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量,将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端;服务器在预设时间内检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端。通过本发明实施例的方案,服务器在接收到第一滚动命令时,只将第一偏移量和第一滚动方向发送给瘦客户端,然后在预设时间内继续检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端,而不需要在每次接收到滚动命令时都将变化后的虚拟桌面对应的图像发送给瘦客户端,减少了虚拟桌面对带宽的浪费,从而节约了带宽。
附图概述
图1为本发明实施例的应用于服务器的更新虚拟桌面的方法的流程图;
图2为本发明实施例的更新虚拟桌面的方法的流程图;
图3为本发明实施例的更新虚拟桌面的装置的结构组成示意图;
图4为本发明实施例的另一种更新虚拟桌面的装置的结构组成示意图。
本发明的较佳实施方式
为了便于本领域技术人员的理解,下面结合附图对本发明实施例进行描述,并不能用来限制本发明的保护范围。
参见图1,本发明实施例提出了一种更新虚拟桌面的方法,应用于服务器,包括:
步骤100、服务器接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量。
本步骤中,计算第一滚动命令对应的第一偏移量包括:
将当前活动窗口的滚动区域对应的第一图像进行缓存;根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断出当前活动窗口的滚动区域发生变化,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一偏移量。
本步骤中,第一滚动命令可以是鼠标中键命令、或鼠标移动和鼠标左键按下命令、或手指在触摸屏上的滑动等。第一滚动命令中还包括第一滚动方向。
本步骤中,如果服务器没有接收到滚动命令,则结束本流程。
其中,当判断出当前活动窗口的滚动区域没有发生变化,则结束本流程。
其中,服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化包括:
将上一次发送给瘦客户端的图像的每一行(或列)与本次缓存的第一图像对应的行(或列)进行匹配,若均能够匹配,则判断出当前活动窗口的滚动区域没有发生变化;如果上一次发送给瘦客户端的图像的某一行(或列)与本次缓存的第一图像对应的行(或列)不能匹配,则判断出当前活动窗口的滚动区域发生变化。
其中,上一次发送给瘦客户端的图像的某一行(或列)与本次缓存的第一图像对应的行(或列)能够匹配是指上一次发送给瘦客户端的图像的某一行(或列)的每一个像素与本次缓存的第一图像对应的行(或列)对应的像素均相同。
其中,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一偏移量包括:
根据第一滚动方向判断出滚动区域对应的图像是下移(或左移),将上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的第n行进行匹配,若能够匹配,则将上一次发送给瘦客户端的图像的第2到(2+x)行(或列)与本次缓存的第一图像的第(n+1)到(n+1+x)行(或列)进行匹配,若均能够匹配,则第一偏移量为(n-1)。其中,n为正整数,x为大于2的正整数。
其中,上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的第n行(或列)能够匹配是指上一次发送给瘦客户端的图像的第1行(或列)的每一个像素与本次缓存的第一图像的第n行(或列)对应的像素均相同。
其中,若上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的第n行(或列)不能匹配,则继续将上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的第(n+1)行(或列)进行匹配。
根据第一滚动方向判断出滚动区域对应的图像是上移(或右移),将上一次发送给瘦客户端的图像的第m行(或列)与本次缓存的第一图像的第n行(或列)进行匹配,若能够匹配,则将上一次发送给瘦客户端的图像的第(m-1-x)到(m-1)行(或列)与本次缓存的第一图像的第(n-1-x)到(n-1)行(或列)进行匹配,若均能够匹配,则第一偏移量为(m-n)。其中,n为正整数,x为大于2的正整数,m为上一次发送给瘦客户端的图像的总行(或列)数。
其中,若上一次发送给瘦客户端的图像的第m行(或列)与本次缓存的第一图像的第n行(或列)不能匹配,则继续将上一次发送给瘦客户端的图像的第m行(或列)与本次缓存的第一图像的第(n-1)行(或列)进行匹配。
步骤101、将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端。
步骤102、服务器在预设时间内检测是否接收到第二滚动命令,如果没 有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端。
本步骤中,当服务器在预设时间内接收到第二滚动命令,服务器将当前活动窗口的滚动区域对应的第二图像进行缓存,并根据第二图像和第一图像,判断出当前活动窗口的滚动区域发生变化,根据第二图像和第一图像计算第二偏移量,将计算得到的第二偏移量和第二滚动命令中的第二滚动方向发送给所述瘦客户端;服务器继续执行在预设时间内检测是否接收到第三滚动命令的步骤。
其中,当服务器根据第二图像和所述第一图像,判断出当前活动窗口的滚动区域没有发生变化时,服务器根据第二图像和上一次发送给瘦客户端的图像计算第二新出现的像素信息,将计算得到的第二新出现的像素信息发送给瘦客户端。
本步骤中,服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息包括:
根据第一滚动方向判断出滚动区域对应的图像是下移(或左移),将上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的第n行(或列)进行匹配,若能够匹配,则第一新出现的像素信息为本次缓存的图像的第1到第(n-1)行(或列);若不能匹配,则继续将上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的第(n+1)行(或列)进行匹配;若上一次发送给瘦客户端的图像的第1行(或列)与本次缓存的第一图像的所有行均不能匹配,则第一新出现的像素信息为本次缓存的图像。其中,n为正整数。
根据第一滚动方向判断出滚动区域对应的图像是上移(或右移),将上一次发送给瘦客户端的图像的第m行(或列)与本次缓存的第一图像的第n行(或列)进行匹配,若能够匹配,则第一新出现的像素信息为本次缓存的图像的第n到第m行(或列);若不能匹配,则继续将上一次发送给瘦客户端的第一图像的第m行(或列)与本次缓存的图像的第(n-1)行(或列)进行匹配;若上一次发送给瘦客户端的图像的第m行(或列)与本次缓存的第 一图像的所有行均不能匹配,则第一新出现的像素信息为本次缓存的图像。其中,m为上一次发送给瘦客户端的图像的总行(或列)数。
本步骤中,如果接收到第二滚动命令,则服务器将当前活动窗口的滚动区域对应的第二图像进行缓存,并根据第二图像和第一图像,判断出当前活动窗口的滚动区域发生变化,根据第二图像和第一图像计算第二偏移量,将计算得到的第二偏移量和第二滚动方向发送给瘦客户端;服务器继续执行在预设时间内检测是否接收到第三滚动命令的步骤。
其中,如果根据第二图像和第一图像,判断出当前活动窗口的滚动区域没有发生变化,则服务器根据第二图像和上一次发送给瘦客户端的图像计算第二新出现的像素信息,将计算得到的第二新出现的像素信息发送给瘦客户端。
其中,服务器根据本次缓存的第二图像和第一图像,判断当前活动窗口的滚动区域是否发生变化包括:
将第二图像的每一行(或列)与本次缓存的第一图像对应的行(或列)进行匹配,若均能够匹配,则判断出当前活动窗口的滚动区域没有发生变化;如果第二图像的某一行(或列)与本次缓存的第一图像对应的行(或列)不能匹配,则判断出当前活动窗口的滚动区域发生变化。
其中,第二图像的某一行与本次缓存的第一图像对应的行能够匹配是指第二图像的某一行(或列)的每一个像素与本次缓存的第一图像对应的行(或列)对应的像素均相同。
其中,根据第二图像和第一图像计算第二偏移量包括:
根据第二滚动方向判断出滚动区域对应的图像是下移(或左移),将第一图像的第1行(或列)与第二图像的第n行(或列)进行匹配,若能够匹配,则将第一图像的第2到(2+x)行(或列)与第二图像的第(n+1)到(n+1+x)行(或列)进行匹配,若均能够匹配,则第二偏移量为(n-1)。
其中,第一图像的第1行(或列)与第二图像的第n行(或列)能够匹配是指第一图像的第1行(或列)的每一个像素与第二图像的第n行(或列)对应的像素均相同。
其中,若第一图像的第1行(或列)与第二图像的第n行(或列)不能匹配,则继续将第一图像的第1行(或列)与第二图像的第(n+1)行(或列)进行匹配。
根据第二滚动方向判断出滚动区域对应的图像是上移(或右移),将第一图像的第m行(或列)与第二图像的第n行(或列)进行匹配,若能够匹配,则将第一图像的第(m-1-x)到(m-1)行(或列)与第二图像的第(n-1-x)到(n-1)行(或列)进行匹配,若均能够匹配,则第二偏移量为(m-n)。其中,n为正整数,x为大于2的正整数,m为第一图像的总行(或列)数,m大于n。
其中,若第一图像的第m行(或列)与第二图像的第n行(或列)不能匹配,则继续将第一图像的第m行(或列)与第二图像的第(n-1)行(或列)进行匹配。
本发明实施例的方法中,当虚拟桌面中的一个窗口由非活动窗口变为当前活动窗口时,还包括:
服务器获取当前获得窗口的应用类型,在自身保存的应用类型中查找当活动前窗口的应用类型,若查找到,则服务器将当前活动窗口的滚动区域对应的图像进行缓存,并发送给瘦客户端。
其中,若查找不到,则采用相关技术中的方法将变化后的屏幕对应的图像发送给瘦客户端。
其中,可以从当前活动窗口标题中的字符串获取当前获得窗口的应用类型。
其中,应用类型可以是Microsoft Word、或Microsoft Excel、或记事本或浏览器等。
本发明实施例提出了一种更新虚拟桌面的方法,应用于瘦客户端,包括:
瘦客户端接收到来自服务器的第一偏移量和第一滚动方向或第二偏移量和第二滚动方向,根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是下移(或上移),将滚动区域均匀下移(或上移),直到下移(或上移)的行数与接收到的第一偏移量或第二偏移量相等。
其中,若根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是右移(或左移),则将滚动区域均匀右移(或左移),直到右移(或左移)的列数与接收到的第一偏移量或第二偏移量相等。
其中,下移(或上移)过程中,滚动区域上面(或上面)的新出现的像素采用纯色(例如白色)填补,左移(或右移)过程中,滚动区域左面(或右面)的新出现的像素采用纯色(例如白色)填补。
当瘦客户端接收到来自服务器的第一新出现的像素信息或第二新出现的像素信息时,该方法还包括:
将接收的第一新出现的像素信息或第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
下面通过实施例详细说明本发明的方法,参见图2,该方法包括:
步骤200、服务器接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量。
步骤201、服务器将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端。
步骤202、瘦客户端接收到第一偏移量和第一滚动方向,根据接收到的第一滚动方向判断出当前活动窗口的滚动区域是上移或下移,将滚动区域均匀上移或下移,直到上移或下移的行数与接收到的第一偏移量相等。
本步骤中,当根据接收到的第一滚动方向判断出当前活动窗口的滚动区域是左移或右移,将滚动区域均匀左移或右移,直到左移或右移的行数与接收到的第一偏移量相等。
步骤203、服务器在预设时间内检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则执行步骤204;如果接收到第二滚动命令,则执行步骤206。
步骤204、服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端。
步骤205、瘦客户端将接收到的第一新出现的像素信息在上移或下移或 左移或右移过程中新出现的像素上进行显示。
步骤206、服务器将当前活动窗口的滚动区域对应的第二图像进行缓存,并根据第二图像和第一图像,判断出当前活动窗口的滚动区域是否发生变化,如果发生变化,则执行步骤207;如果不发生变化,则执行步骤209。
步骤207、根据第二图像和第一图像计算第二偏移量,将计算得到的第二偏移量和第二滚动命令中的第二滚动方向发送给所述瘦客户端;并执行步骤203。
步骤208、瘦客户端接收到第二偏移量和第二滚动方向,根据接收到的第二滚动方向判断出当前活动窗口的滚动区域是上移或下移,将滚动区域均匀上移或下移,直到上移或下移的行数与接收到的第二偏移量相等。
本步骤中,当根据接收到的第二滚动方向判断出当前活动窗口的滚动区域是左移或右移,将滚动区域均匀左移或右移,直到左移或右移的行数与接收到的第二偏移量相等。
步骤209、服务器根据第二图像和上一次发送给瘦客户端的图像计算第二新出现的像素信息,将计算得到的第二新出现的像素信息发送给瘦客户端。
步骤210、瘦客户端将接收到的第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
参见图3,本发明实施例还提出了一种更新虚拟桌面的装置,至少包括:
计算模块300,设置为接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量;在预设时间内检测是否接收到第二滚动命令;如果没有接收到第二滚动命令,则根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息;
发送模块301,设置为将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端;将计算得到的第一新出现的像素信息发送给瘦客户端。
本发明实施例的装置中,计算模块300还设置为:
在预设时间内接收到第二滚动命令,将所述当前活动窗口的滚动区域对应的第二图像进行缓存;并根据所述第二图像和所述第一图像,判断出所述 当前活动窗口的滚动区域发生变化,根据所述第二图像和所述第一图像计算第二偏移量;
在所述发送模块301将计算得到的第二偏移量和所述第二滚动命令中的第二滚动方向发送给瘦客户端后,所述计算模块300还设置为:
继续在预设时间内检测是否接收到第三滚动命令;
所述发送模块301还设置为:
将计算得到的第二偏移量和所述第二滚动方向发送给所述瘦客户端。
本发明实施例的装置中,计算模块300还设置为:
根据第二图像和第一图像,判断出当前活动窗口的滚动区域没有发生变化,根据第二图像和上一次发送给瘦客户端的图像计算第二新出现的像素信息;
发送模块301还设置为:
将计算得到的第二新出现的像素信息发送给瘦客户端。
本发明实施例的装置中,计算模块300计算第一滚动命令对应的第一偏移量的功能是设置为:
将当前活动窗口的滚动区域对应的第一图像进行缓存;服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断出当前活动窗口的滚动区域发生变化时,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算所述第一偏移量。
本发明实施例的装置中,所述计算模块300根据第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化的功能是设置为:
将所述上一次发送给瘦客户端的图像的每一行或列与所述第一图像对应的行或列进行匹配,若均能够匹配,则判断出所述当前活动窗口的滚动区域没有发生变化;如果所述上一次发送给瘦客户端的图像的某一行或列与所述第一图像对应的行或列不能匹配,则判断出所述当前活动窗口的滚动区域发生变化。
本发明实施例的装置中,计算模块300根据第二图像和第一图像计算第二偏移量的功能是设置为:
根据第二滚动方向判断出滚动区域对应的图像是下移(或左移),将第一图像的第1行(或列)与第二图像的第n行(或列)进行匹配,若能够匹配,则将第一图像的第2到(2+x)行(或列)与第二图像的第(n+1)到(n+1+x)行(或列)进行匹配,若均能够匹配,则第二偏移量为(n-1);
其中,n为正整数,x为大于2的正整数。
本发明实施例的装置中,计算模块300根据第二图像和第一图像计算第二偏移量的功能是设置为:
根据第二滚动方向判断出滚动区域对应的图像是上移(或右移),将第一图像的第m行(或列)与第二图像的第n行(或列)进行匹配,若能够匹配,则将第一图像的第(m-1-x)到(m-1)行(或列)与第二图像的第(n-1-x)到(n-1)行(或列)进行匹配,若均能够匹配,则第二偏移量为(m-n)。其中,n为正整数,x为大于2的正整数,m为第一图像的总行(或列)数,m大于n。
本发明实施例的装置中,计算模块300根据第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化的功能是设置为:
将上一次发送给瘦客户端的图像的每一行(或列)与第一图像对应的行(或列)进行匹配,若均能够匹配,则判断出当前活动窗口的滚动区域没有发生变化;如果上一次发送给瘦客户端的图像的某一行(或列)与第一图像对应的行(或列)不能匹配,则判断出当前活动窗口的滚动区域发生变化。
本发明实施例的装置中,计算模块300根据第一图像和上一次发送给瘦客户端的图像计算第一偏移量的功能是设置为:
根据第一滚动方向判断出滚动区域对应的图像是下移(或左移),将上一次发送给瘦客户端的图像的第1行(或列)与第一图像的第n行(或列)进行匹配,若能够匹配,则将上一次发送给瘦客户端的图像的第2到(2+x)行(或列)与第一图像的第(n+1)到(n+1+x)行(或列)进行匹配,若均能够匹配,则第一偏移量为(n-1);
其中,n为正整数,x为大于2的正整数。
本发明实施例的装置中,计算模块300根据第一图像和上一次发送给瘦客户端的图像计算第一偏移量的功能是设置为:
根据第一滚动方向判断出滚动区域对应的图像是上移(或右移),将上一次发送给瘦客户端的图像的第m行(或列)与第一图像的第n行(或列)进行匹配,若能够匹配,则将上一次发送给瘦客户端的图像的第(m-1-x)到(m-1)行(或列)与第一图像的第(n-1-x)到(n-1)行(或列)进行匹配,若均能够匹配,则第一偏移量为(m-n);
其中,n为正整数,x为大于2的正整数,m为上一次发送给瘦客户端的图像的总行(或列)数,m大于n。
本发明实施例的装置中,计算模块300还设置为:
在预设时间内没有接收到滚动命令,或者判断模块根据第一图像和上一次缓存的图像,判断出当前活动窗口的滚动区域没有发生变化,根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端。
本发明实施例的装置中,计算模块300根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息的功能是设置为:
根据第一滚动方向判断出滚动区域对应的图像是下移(或左移),将上一次发送给瘦客户端的图像的第1行(或列)与第一图像的第n行(或列)进行匹配,若能够匹配,则第一新出现的像素信息为第一图像的第1到第(n-1)行(或列);若不能匹配,则继续将上一次发送给瘦客户端的图像的第1行(或列)与第一图像的第(n+1)行(或列)进行匹配;若上一次发送给瘦客户端的图像的第1行(或列)与第一图像的所有行(或列)均不能匹配,则第一新出现的像素信息为第一图像;其中,n为正整数,x为大于2的正整数。
本发明实施例的装置中,计算模块300根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息的功能是设置为:
根据第一滚动方向判断出滚动区域对应的图像是上移(或右移),将上一次发送给瘦客户端的图像的第m行(或列)与第一图像的第n行(或列) 进行匹配,若能够匹配,则第一新出现的像素信息为第一图像的第n到第m行(或列);若不能匹配,则继续将上一次发送给瘦客户端的图像的第m行(或列)与第一图像的第(n-1)行(或列)进行匹配;若上一次发送给瘦客户端的图像的第m行(或列)与第一图像的所有行(或列)均不能匹配,则第一新出现的像素信息为第一图像;其中,m为上一次缓存的图像的总行(或列)数。
本发明实施例的装置中,计算模块300还设置为:
检测到虚拟桌面中的一个窗口由非活动窗口变为当前活动窗口,获取当前获得窗口的应用类型,在自身保存的应用类型中查找当活动前窗口的应用类型,若查找到,则将当前活动窗口的滚动区域对应的图像进行缓存,并发送给瘦客户端。
参见图4,本发明实施例还提出了一种更新虚拟桌面的装置,至少包括:
接收模块400,设置为接收到来自服务器的第一偏移量和第一滚动方向或第二偏移量和第二滚动方向;
移动模块401,设置为根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是下移(或上移),将滚动区域均匀下移(或上移),直到下移(或上移)的行数与接收到的第一偏移量或第二偏移量相等。
本发明实施例的装置中,移动模块401还设置为:
根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是左移(或右移),将滚动区域均匀左移(或右移),直到左移(或右移)的列数与接收到的第一偏移量或第二偏移量相等。
本发明实施例的装置中,接收模块400还设置为:
接收到来自服务器的第一新出现的像素信息或第二新出现的像素信息;
瘦客户端还包括:
显示模块402,设置为将接收的第一新出现的像素信息或第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
需要说明的是,以上所述的实施例仅是为了便于本领域的技术人员理解而已,并不用于限制本发明的保护范围,在不脱离本发明的发明构思的前提下,本领域技术人员对本发明所做出的任何显而易见的替换和改进等均在本发明的保护范围之内。
工业实用性
上述技术方案,服务器在接收到第一滚动命令时,只将第一偏移量和第一滚动方向发送给瘦客户端,然后在预设时间内继续检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端,而不需要在每次接收到滚动命令时都将变化后的虚拟桌面对应的图像发送给瘦客户端,减少了虚拟桌面对带宽的浪费,从而节约了带宽。

Claims (38)

  1. 一种更新虚拟桌面的方法,包括:
    服务器接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量;
    将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端;
    服务器在预设时间内检测是否接收到第二滚动命令,如果没有接收到第二滚动命令,则服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息,将计算得到的第一新出现的像素信息发送给瘦客户端。
  2. 根据权利要求1所述的方法,还包括:
    当所述服务器在预设时间内接收到第二滚动命令,所述服务器将所述当前活动窗口的滚动区域对应的第二图像进行缓存,并根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域发生变化,根据所述第二图像和所述第一图像计算第二偏移量,将计算得到的第二偏移量和所述第二滚动命令中的第二滚动方向发送给所述瘦客户端;
    所述服务器继续执行在预设时间内检测是否接收到第三滚动命令的步骤。
  3. 根据权利要求2所述的方法,还包括:
    当所述服务器根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域没有发生变化时,
    所述服务器根据所述第二图像和所述上一次发送给瘦客户端的图像计算第二新出现的像素信息,将计算得到的第二新出现的像素信息发送给所述瘦客户端。
  4. 根据权利要求1或2所述的方法,其中,所述计算第一滚动命令对应的偏移量包括:
    将当前活动窗口的滚动区域对应的第一图像进行缓存;
    根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断出当前 活动窗口的滚动区域发生变化时,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算所述第一偏移量。
  5. 根据权利要求4所述的方法,其中,所述服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化包括:
    将所述上一次发送给瘦客户端的图像的每一行或列与所述第一图像对应的行或列进行匹配,若均能够匹配,则判断出所述当前活动窗口的滚动区域没有发生变化;如果所述上一次发送给瘦客户端的图像的某一行或列与所述第一图像对应的行或列不能匹配,则判断出所述当前活动窗口的滚动区域发生变化。
  6. 根据权利要求4所述的方法,其中,所述根据第一图像和上一次发送给瘦客户端的图像计算第一偏移量包括:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第2到(2+x)行或列与所述第一图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第一偏移量为(n-1);
    其中,n为正整数,x为大于2的正整数。
  7. 根据权利要求6所述的方法,还包括:
    当所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列不能匹配时,
    继续将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第(n+1)行或列进行匹配。
  8. 根据权利要求4所述的方法,其中,所述根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一偏移量包括:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第 (m-1-x)到(m-1)行或列与所述第一图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第一偏移量为(m-n);
    其中,n为正整数,x为大于2的正整数,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
  9. 根据权利要求8所述的方法,还包括:
    当所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列不能匹配时,继续将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第(n-1)行或列进行匹配。
  10. 根据权利要求1或2所述的方法,其中,所述服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息包括:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述上一次发送给瘦客户端的图像的第1行与所述第一图像的第n行进行匹配,若能够匹配,则所述第一新出现的像素信息为所述第一图像的第1到第(n-1)行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第(n+1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的所有行均不能匹配,则所述第一新出现的像素信息为所述第一图像;其中,n为正整数,x为大于2的正整数。
  11. 根据权利要求10所述的方法,其中,所述服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息包括:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则所述第一新出现的像素信息为第一图像的第n到第m行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第(n-1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的所有行或列均不能匹配,则所述第一新出现的像素信息为第一图像;其中,m为上一次发送给瘦 客户端的图像的总行或列数,m大于n。
  12. 根据权利要求2所述的方法,其中,所述根据第二图像和第一图像计算第二偏移量包括:
    根据所述第二滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述第一图像的第1行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第二图像的第2到(2+x)行或列与所述第一图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第二偏移量为(n-1);
    其中,n为正整数,x为大于2的正整数。
  13. 根据权利要求12所述的方法,还包括,
    当所述第一图像的第1行或列与所述第二图像的第n行或列不能匹配时,继续将所述第一图像的第1行或列与所述第二图像的第(n+1)行或列进行匹配。
  14. 根据权利要求2所述的方法,其中,所述根据第二图像和第一图像计算第二偏移量包括:
    根据所述第二滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述第一图像的第m行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第一图像的第(m-1-x)到(m-1)行或列与所述第二图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第二偏移量为(m-n);其中,n为正整数,x为大于2的正整数,m为所述第一图像的总行或列数,m大于n。
  15. 根据权利要求14所述的方法,还包括:
    当所述第一图像的第m行或列与所述第二图像的第n行或列不能匹配,继续将所述第一图像的第m行或列与所述第二图像的第(n-1)行或列进行匹配。
  16. 根据权利要求1或2所述的方法,还包括:
    当虚拟桌面中的一个窗口由非活动窗口变为所述当前活动窗口时,所述服务器获取当前获得窗口的应用类型,在自身保存的应用类型中查找所述当活动前窗口的应用类型,若查找到,则所述服务器将所述当前活动窗口的滚 动区域对应的图像进行缓存,并发送给所述瘦客户端。
  17. 一种更新虚拟桌面的方法,包括:
    瘦客户端接收到来自服务器的第一偏移量和第一滚动方向或第二偏移量和第二滚动方向,根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是下移或上移,根据判断结果将滚动区域均匀下移或上移,直到下移或上移的行数与接收到的第一偏移量或第二偏移量相等。
  18. 根据权利要求17所述的方法,还包括:
    当根据所述接收到的第一滚动方向或第二滚动方向判断出所述当前活动窗口的滚动区域是左移或右移时,根据判断结果将所述滚动区域均匀左移或右移,直到左移或右移的列数与所述接收到的第一偏移量或第二偏移量相等。
  19. 根据权利要求17所述的方法,还包括:
    当所述瘦客户端接收到来自所述服务器的第一新出现的像素信息或第二新出现的像素信息时,将接收的第一新出现的像素信息或第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
  20. 一种更新虚拟桌面的装置,包括:
    计算模块,设置为接收到第一滚动命令时,计算第一滚动命令对应的第一偏移量;在预设时间内检测是否接收到第二滚动命令;如果没有接收到第二滚动命令,则根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息;
    发送模块,设置为将计算得到的第一偏移量和接收到的第一滚动命令中的第一滚动方向发送给瘦客户端;将计算得到的第一新出现的像素信息发送给瘦客户端。
  21. 根据权利要求20所述的装置,
    所述计算模块还设置为,在预设时间内接收到第二滚动命令,将所述当前活动窗口的滚动区域对应的第二图像进行缓存;并根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域发生变化,根据所述第二图像和所述第一图像计算第二偏移量;以及在所述发送模块将计算得到的第二偏移量和所述第二滚动命令中的第二滚动方向发送给瘦客户端后,
    继续在预设时间内检测是否接收到第三滚动命令;
    所述发送模块还设置为:
    将计算得到的第二偏移量和所述第二滚动方向发送给所述瘦客户端。
  22. 根据权利要求21所述的装置,
    所述计算模块还设置为:
    根据所述第二图像和所述第一图像,判断出所述当前活动窗口的滚动区域没有发生变化,根据所述第二图像和所述上一次发送给瘦客户端的图像计算第二新出现的像素信息;
    所述发送模块还设置为:
    将计算得到的第二新出现的像素信息发送给所述瘦客户端。
  23. 根据权利要求20或21所述的装置,其中,所述计算模块计算第一滚动命令对应的第一偏移量的功能是设置为:
    将当前活动窗口的滚动区域对应的第一图像进行缓存;服务器根据本次缓存的第一图像和上一次发送给瘦客户端的图像,判断出当前活动窗口的滚动区域发生变化时,根据本次缓存的第一图像和上一次发送给瘦客户端的图像计算所述第一偏移量。
  24. 根据权利要求23所述的装置,其中,所述计算模块根据第一图像和上一次发送给瘦客户端的图像,判断当前活动窗口的滚动区域是否发生变化的功能是设置为:
    将所述上一次发送给瘦客户端的图像的每一行或列与所述第一图像对应的行或列进行匹配,若均能够匹配,则判断出所述当前活动窗口的滚动区域没有发生变化;如果所述上一次发送给瘦客户端的图像的某一行或列与所述第一图像对应的行或列不能匹配,则判断出所述当前活动窗口的滚动区域发生变化。
  25. 根据权利要求23所述的装置,其中,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算第一偏移量的功能是设置为:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移, 将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第2到(2+x)行或列与所述第一图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第一偏移量为(n-1);
    其中,n为正整数,x为大于2的正整数。
  26. 根据权利要求23所述的装置,其中,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算偏第一移量的功能是设置为:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则将所述上一次发送给瘦客户端的图像的第(m-1-x)到(m-1)行或列与所述第一图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第一偏移量为(m-n);
    其中,n为正整数,x为大于2的正整数,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
  27. 根据权利要求23所述的装置,其中,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息的功能是设置为:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第n行或列进行匹配,若能够匹配,则所述第一新出现的像素信息为所述第一图像的第1到第(n-1)行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的第(n+1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第1行或列与所述第一图像的所有行或列均不能匹配,则所述第一新出现的像素信息为所述第一图像;其中,n为正整数,x为大于2的正整数。
  28. 根据权利要求23所述的装置,其中,所述计算模块根据第一图像和上一次发送给瘦客户端的图像计算第一新出现的像素信息的功能是设置为:
    根据所述第一滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第n行 或列进行匹配,若能够匹配,则所述第一新出现的像素信息为第一图像的第n到第m行或列;若不能匹配,则继续将所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的第(n-1)行或列进行匹配;若所述上一次发送给瘦客户端的图像的第m行或列与所述第一图像的所有行或列均不能匹配,则所述第一新出现的像素信息为第一图像;其中,m为上一次发送给瘦客户端的图像的总行或列数,m大于n。
  29. 根据权利要求21所述的装置,其中,所述计算模块根据第二图像和第一图像计算第二偏移量的功能是设置为:
    根据所述第二滚动方向判断出所述滚动区域对应的图像是下移或左移,将所述第一图像的第1行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第一图像的第2到(2+x)行或列与所述第二图像的第(n+1)到(n+1+x)行或列进行匹配,若均能够匹配,则所述第二偏移量为(n-1);
    其中,n为正整数,x为大于2的正整数。
  30. 根据权利要求21所述的装置,其中,所述计算模块根据第二图像和第一图像计算第二偏移量的功能是设置为:
    根据所述第二滚动方向判断出所述滚动区域对应的图像是上移或右移,将所述第一图像的第m行或列与所述第二图像的第n行或列进行匹配,若能够匹配,则将所述第一图像的第(m-1-x)到(m-1)行或列与所述第二图像的第(n-1-x)到(n-1)行或列进行匹配,若均能够匹配,则所述第二偏移量为(m-n);其中,n为正整数,x为大于2的正整数,m为所述第一图像的总行或列数,m大于n。
  31. 根据权利要求20或21所述的装置,所述计算模块还设置为:
    检测到虚拟桌面中的一个窗口由非活动窗口变为所述当前活动窗口,获取当前获得窗口的应用类型,在自身保存的应用类型中查找所述当活动前窗口的应用类型,若查找到,则将所述当前活动窗口的滚动区域对应的图像进行缓存,并发送给所述瘦客户端。
  32. 一种更新虚拟桌面的装置,包括:
    接收模块,设置为接收到来自服务器的第一偏移量和第一滚动方向或第 二偏移量和第二滚动方向;
    移动模块,设置为根据接收到的第一滚动方向或第二滚动方向判断出当前活动窗口的滚动区域是下移或上移,根据判断结果将滚动区域均匀下移或上移,直到下移或上移的行数与接收到的第一偏移量或第二偏移量相等。
  33. 根据权利要求32所述的装置,所述移动模块还设置为:
    根据所述接收到的第一滚动方向或第二滚动方向判断出所述当前活动窗口的滚动区域是左移或右移,根据判断结果将所述滚动区域均匀左移或右移,直到左移或右移的列数与所述接收到的第一偏移量或第二偏移量相等。
  34. 根据权利要求32所述的装置,所述接收模块还设置为:
    接收到来自所述服务器的第一新出现的像素信息或第二新出现的像素信息;
    所述更新虚拟桌面的装置还包括:
    显示模块,设置为将接收的第一新出现的像素信息或第二新出现的像素信息在上移或下移或左移或右移过程中新出现的像素上进行显示。
  35. 一种计算机程序,包括程序指令,当所述程序指令被服务器执行时,使得服务器可执行权利要求1~16中任一项所述的方法。
  36. 一种载有权利要求35所述计算机程序的载体。
  37. 一种计算机程序,包括程序指令,当所述程序指令被瘦客户端执行时,使得瘦客户端可执行权利要求17~19中任一项所述的方法。
  38. 一种载有权利要求37所述计算机程序的载体。
PCT/CN2015/073263 2014-10-15 2015-02-25 一种更新虚拟桌面的方法和装置 WO2015154592A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15777456.3A EP3208997A4 (en) 2014-10-15 2015-02-25 Method and device for updating virtual desktop
US15/519,811 US20170242712A1 (en) 2014-10-15 2015-02-25 Methods and devices for updating virtual desktop

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410545561.XA CN105516229B (zh) 2014-10-15 2014-10-15 一种更新虚拟桌面的方法和装置
CN201410545561.X 2014-10-15

Publications (1)

Publication Number Publication Date
WO2015154592A1 true WO2015154592A1 (zh) 2015-10-15

Family

ID=54287300

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073263 WO2015154592A1 (zh) 2014-10-15 2015-02-25 一种更新虚拟桌面的方法和装置

Country Status (4)

Country Link
US (1) US20170242712A1 (zh)
EP (1) EP3208997A4 (zh)
CN (1) CN105516229B (zh)
WO (1) WO2015154592A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160306531A1 (en) * 2015-04-16 2016-10-20 Microsoft Technology Licensing, Llc Dynamic Launch Behavior Based on Context Information
CN106020756A (zh) * 2016-05-13 2016-10-12 江苏云途腾科技有限责任公司 一种更新虚拟桌面的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872293A (zh) * 2009-04-23 2010-10-27 威睿公司 用于复制传输到远程显示装置的帧缓冲区的方法和系统
CN102047612A (zh) * 2008-03-24 2011-05-04 惠普开发有限公司 基于图像的远程访问系统
CN102566910A (zh) * 2011-12-14 2012-07-11 广州杰赛科技股份有限公司 刷新虚拟桌面客户端屏显的方法及虚拟桌面系统
CN102819389A (zh) * 2012-07-19 2012-12-12 宇龙计算机通信科技(深圳)有限公司 一种移动终端以及在移动终端显示内容的方法
CN103200237A (zh) * 2013-03-11 2013-07-10 天脉聚源(北京)传媒科技有限公司 一种保持远程桌面同步的方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1320241A3 (en) * 2000-05-26 2003-09-17 Citrix Systems, Inc. Method and system for efficiently reducing graphical display data for transmission over a low bandwidth transport protocol mechanism
US8176434B2 (en) * 2008-05-12 2012-05-08 Microsoft Corporation Virtual desktop view scrolling
CN103842982B (zh) * 2011-06-08 2017-11-17 茨特里克斯系统公司 用于本地生成的手势和过渡图形与终端控制服务的交互的方法和系统
US8941673B2 (en) * 2011-11-08 2015-01-27 Red Hat, Inc. Rendering images in a remote web browser
CN103324738B (zh) * 2013-06-28 2016-12-28 北京奇虎科技有限公司 一种电子设备上网页缩放后对齐的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047612A (zh) * 2008-03-24 2011-05-04 惠普开发有限公司 基于图像的远程访问系统
CN101872293A (zh) * 2009-04-23 2010-10-27 威睿公司 用于复制传输到远程显示装置的帧缓冲区的方法和系统
CN102566910A (zh) * 2011-12-14 2012-07-11 广州杰赛科技股份有限公司 刷新虚拟桌面客户端屏显的方法及虚拟桌面系统
CN102819389A (zh) * 2012-07-19 2012-12-12 宇龙计算机通信科技(深圳)有限公司 一种移动终端以及在移动终端显示内容的方法
CN103200237A (zh) * 2013-03-11 2013-07-10 天脉聚源(北京)传媒科技有限公司 一种保持远程桌面同步的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3208997A4 *

Also Published As

Publication number Publication date
CN105516229A (zh) 2016-04-20
EP3208997A4 (en) 2017-10-04
US20170242712A1 (en) 2017-08-24
EP3208997A1 (en) 2017-08-23
CN105516229B (zh) 2020-02-28

Similar Documents

Publication Publication Date Title
WO2016101795A1 (zh) 一种网页页面加载方法及系统
US9514111B1 (en) Providing autocomplete suggestions
US8799759B2 (en) Pre-rendering web content
US20140019858A1 (en) Synchronizing views during document presentation
US9146664B2 (en) Providing content rotation during scroll action
US20170123649A1 (en) Remote Desktop Controlled by Touch Device
US10581950B2 (en) Local operation of remotely executed applications
US10613731B2 (en) Apparatus and method for displaying information on web page based on scrolling speed
US11263028B2 (en) Providing user interface (UI) elements in virtual machine sessions at reduced latency
TW201211801A (en) Displaying items in an application window
US11610563B2 (en) Location-based display of pixel history
WO2015154592A1 (zh) 一种更新虚拟桌面的方法和装置
TWI485582B (zh) 修正觸碰位置的方法
JP5696563B2 (ja) 情報処理装置、画面更新方法、画面更新プログラム、および情報処理システム
US20120136988A1 (en) Dynamic bandwidth optimization for remote input
US20150212981A1 (en) Providing print view of document for editing in web-based application
US20160357395A1 (en) Information processing device, non-transitory computer-readable recording medium storing an information processing program, and information processing method
JP5614698B1 (ja) サーバ装置、情報処理方法及びプログラム
US20190012767A1 (en) Terminal device, display system, and control method of terminal device
CN105487801B (zh) 一种进度条调节方法及移动终端
JP2015203955A (ja) デジタイザペンによる描画制御装置、描画制御方法および描画制御用プログラム
US9235873B2 (en) Tile-based caching for rendering complex artwork
US20160266780A1 (en) Electronic devices, methods for operating user interface and computer program products
US20160014168A1 (en) Methods for sharing applications between apparatuses and systems using the same
US20180088771A1 (en) System and method for replaying a recorded pointer trajectory

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15777456

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15519811

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2015777456

Country of ref document: EP