Computer networks such as the Internet enable services that synchronize the states of connected devices. One such service is remote display, which enables one device (a local device) to maintain on its display a portion of the display of another (remote) device. With such a service, the user of a local device may view the displayed content of a remote device and perform operations at the remote device by means of the network connection between the two devices (e.g., by transmitting commands to the remote device).
One challenge with remote display services pertains to efficiently synchronizing a local display with a remote display. In order to provide the local device user with a seamless experience, a remote display system must synchronize (update) the local display with the contents of the remote display frequently. If the local display is not updated quickly enough, the local display user may experience lag at the local display. This may result in the local device user performing operations based on a stale version of the remote display, causing unintended results.
Transmitting the entire remote display to the local device at short intervals is demanding in terms of resources, e.g., network bandwidth and processor usage at the local and remote ends, and generally is not feasible. If the size of the local display is smaller than the size of the remote display, it is known in the art to update only a subset of the remote display, e.g., the subset that the user of the local device is currently viewing. More efficient ways to perform display synchronization that take advantage of particular display or device characteristics and particular image formatting and compression schemes are continually sought.
The present invention addresses the foregoing need for more efficient display synchronization techniques.
An embodiment of the invention includes a remote device storing an old image and a new image, the old image comprising the last version of the remote device's display that was transmitted to a local device requesting an update of a particular requested region and the new image comprising the content of the old image and additionally updates for the requested region. The method also includes the remote device comparing, upon a request from the local device for an update for the requested region, portions of the old and new images corresponding to the requested region. The method further includes encoding compared pixels to yield an update region and transmitting the update region to the local device. In the encoding, (i) pixels which changed between the old image and the new image are encoded opaque and with the color corresponding to the pixels in the new image, and (ii) at least one pixel which did not change between the old image and the new image is encoded transparent. An embodiment of the invention further includes stripping boundary pixels that are unchanged between the old and new images. In an embodiment of the invention, unchanged pixels are assigned a color that does not interfere with the visual appearance of the pixels.
Another embodiment of the invention includes a local device requesting an update for a particular requested region of a remote display. The method further includes receiving an update region which is a portion of the requested region and updating a stored local representation of the remote display based on the update region. In an embodiment of the invention, the method further includes refreshing the local device's display based on the updated local representation. Other embodiments of the invention prioritize certain regions of the local representation for update, such as by proceeding in concentric layers outward from the currently viewed rectangle on the local device's display. Other embodiments of the invention use a Javascript-enabled browser to interface with and display the local representation.
The foregoing will be apparent from the following more particular description of example embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating embodiments of the present invention.
Referring to
In some cases, the user of the local device 100 may see at any given time a subset of the remote display 112. As the user of the local device 100 scrolls (using any conventional method of scrolling) the local display 102, the local display 102 is painted (drawn) with corresponding portions of the local representation 104. In this way, the user of the local device 100 may remotely navigate the remote display 112.
In order to synchronize the local display 102 with the remote display 112 (i.e., update the local representation 104 and refresh the local display 102 accordingly with the up-to-date viewed rectangle 118), messages are sent between the local device 100 and the remote device 110. First, an update request message 106 is sent to the remote device 110. This update request message 106 specifies a particular region, (termed a requested region 114) that is to be updated at the local device 100 (more precisely, at the local representation 104). The requested region 114 need not correspond to what is currently displayed on the local display 102, i.e., to the viewed rectangle 118. That is, the local device 100 may desire to update the local representation 104 with an arbitrary portion of the remote display 112, which may be a portion of the remote display 112 that the user of the local device 100 is not currently viewing on the local display 102 (i.e., which is not the viewed rectangle 118).
In an embodiment of the invention, the requested regions 114 are encoded within the URL used for the Image.src requesting the image. In order to avoid browser or proxy servers caching the request which might have the same URL as some earlier request, a unique sequence number is appended at the tail end of each image request URL. This unique sequence number is created initially from the time-date value (Javascript time in milliseconds since Jan. 1, 1970), which is then incremented on each request. Hence no two requests have the same URL, preventing the cache from returning a stale image.
In response to the update request message 106, the local device receives an update message 108 containing update information. The update message 108 includes data for a portion of the requested region 114, i.e., for an update region 116 which is a subset of the requested region 114. That is, the local device 100 may receive an update for a smaller region than the region for which an update was requested. By only sending back to the local device 114 an update of a portion of the requested region, the present invention is more efficient than conventional display synchronization systems.
In an embodiment of the invention, the update message 108 includes a cookie 120 containing additional information that is used by the local device 100 to synchronize its display. This additional information specifies the nature of the update region 116, which is important since the update region 116 may differ from the requested region 114. In embodiments of the invention, the requested region and the update region need not be rectangular.
1) compare (in the sense of color value of pixels), at step 202, the requested region 114 in old and new images stored at the remote device;
2) optionally strip from the compared region, at step 204, boundary pixels which did not change between the old and new images; and
3) encode, at step 206, compared pixels according to color and transparency/opacity (if the optional stripping step above is performed, the encoding will be performed on the region resulting from the stripping step).
These steps 202, 204, and 206 are described in further detail herein.
After the remote device 110 performs these steps, it transmits an update region 116 and optionally a cookie 120 to the local device 100, as described above. With the update region 116 and optionally the cookie 120, the local device 100 updates, at step 210, the local representation 104 and refreshes, at step 212, the local display 102.
In an embodiment of the invention, the foregoing steps are repeated as shown at 214, for different request regions 114, alternately based on: i) the viewed rectangle 118; and ii) other regions of the local representation 104. In this way, priority is given to synchronizing the viewed rectangle 118 (since it is processed during every other synchronization iteration), resulting in a better experience for the user of the local device 100. In other embodiments, different update schedules are used, e.g., updating the viewed rectangle every third iteration instead of every other iteration.
In an embodiment of the invention, the process of synchronizing regions other than the viewed rectangle 118 as described above proceeds in concentric layers outward from the viewed rectangle 118, until the entire local representation 104 is updated. In the illustrative example of
Referring to
A browser 410 is used to refresh the local display 102 with the update region 116, as shown at 406. In an embodiment of the invention, a Javascript-enabled browser 410 provides the interface to the Canvas objects 404-1, . . . , 404-N (i.e., uses the Canvas objects as a drawing surface).
In the example in
A session cookie is optimal, although any cookie type may be used. A session cookie expires when the browser 410 leaves the desktop session site, whereas other cookies persist in the browser storage after the browser goes to another site. Upon receiving the update region 114, Javascript compares the cookie 120 with the original request (the request and the cookie name carry the same sequence number) and paints the sub-rectangle (update region 116) specified by the cookie 120 instead of the request region 114.
The encoding of two numbers x,y into the cookie can be done using two strings, requiring two terminator characters, one for each number. To reduce the average number of characters sent, in the preferred approach, the two numbers x, y are combined into a single number n using the following formula:
if (x>y) n=x*x+y
if (x<=y) n=y*y+y+x
A decoder at the browser receives a number n, which it decomposes into x, y as follows:
There are other similar ways to encode x, y (or any sequence of integers) into a single number, reducing the average number of terminating characters. The general method for such reductions is via enumerative coding (which includes the method specified above).
The remote device 110 then compares a portion of the old image 500 corresponding to the requested region 114 with a portion of the new image 502 corresponding to the requested region 114. In the example shown in
In an embodiment of the invention, unchanged pixels are stripped from this region of comparison to yield a stripped region 506 with at least one changed pixel 508 on each boundary edge row or column. For example, as shown in
In an encoding step, unchanged pixels are encoded as transparent and assigned a common color value, and changed pixels are encoded as opaque, with color values corresponding to the color values of those changed pixels in the new image 502. The motivation for this encoding is twofold. First, setting all unchanged pixels to a common color increases efficiency in image compression, since it is efficient to encode a string of pixels all having same value. Secondly, setting unchanged pixels to transparent ensures that changing their color values to a common color (different than their corresponding color values in the new image 502) will not degrade the image that will ultimately be displayed in the local display 102 (since their previous color values will be visible, due to the pixels' transparency). Using transparency in this fashion during the encoding process results in greater compression and efficiency than is possible with conventional display synchronization systems.
The method of implementing transparency in the encoding may vary based on the image format used. The PNG specification allows two ways to indicate transparency: pixel by pixel (via a separate bitmap called “Alpha Channel”) or for a single RGB code value (via ancillary data known as a global tRNS chunk). For image formats which do not support transparency, such as JPEG and GIF, a transparency bitmap can be transmitted as a separate bitmap of the same dimensions as the original image, using one bit per pixel, e.g., 1=opaque, 0=transparent. Alternatively, an unused pixel value can be reserved as the “transparent pixel” and embedded into the color image. The latter method is generally more efficient since it retains more of the inter-row redundancy (useful for dictionary based compression such as the Lempel-Ziv family of algorithms, which includes gzip, zip, and deflate).
An embodiment of the invention comprises PNG “filtering” (or similar functionality with other image formats such as JPEG) as part of the encoding process at the remote device. This technique codes pixels relative to those above and to the left, resulting in increased encoding efficiency.
An embodiment of the invention comprises PNG “interlacing” (or similar functionality with other image formats such as JPG) to progressively update the local representation from coarser detail to finer detail. Progressive image download and drawing results in faster perceived response for the user of the local device.
The partially transparent update region resulting from the encoding described above is compressed prior to transmission to the local device. This compression, which is different from the compression inherent in encoding an image according to an image format (e.g., PNG or JPEG) as described above, may use any standard compression technique, such as “deflate” or “gzip”. The choice of compression technique may depend on capabilities declared by the browser 410 at the local device 100. If “deflate” is used, the update region will be transmitted via HTTP using “Content-Encoding: deflate” in the HTTP response field. If the “deflate” (or other compression) action does not reduce the size of the update region (e.g., reduce the size of the PNG file containing the update region), the non-deflated (non-compressed) copy is transmitted instead.
In order to improve compression performance, an embodiment of the invention incorporates the following rule. Unchanged pixels that are part of a sequence of unchanged pixels (i.e., pixels that did not change from the old image to the new image) shorter than a specified length (labeled MinT) are encoded as opaque instead of transparent. In the example shown in
Alternative embodiments use proxy components to perform the steps described above as being performed at the local device 100 and at the remote device 110. For example, instead of the local device 100 transmitting update request messages 106 directly to the remote device 110, a proxy may serve as an intermediate node. As other examples, the local representation 104 may be stored externally from the local device 100 for storage resource reasons, or the encoding may occur externally from the remote device for processor resource reasons. It is understood that the actions of the present invention occur at local or remote ends of a network connection.
The processor 930-1 is a conventional central processing unit (CPU) configured to execute computer-executable instructions and manipulate data contained in memory 920-1, including instructions and data that implement aspects of the present invention. In particular, memory 920-1 includes a stored local representation of the remote display 104. Memory 920-1 also includes program code (instructions) 960-1 for: 1) requesting an update of a requested region (962-1); 2) receiving an update region (962-2); and 3) updating the local representation (962-3).
The I/O interfaces 940-1 comprise circuitry that may interface the local device 100 with various I/O devices (not shown), such as display units (including local display 102), keyboards, disk units and the like.
The network interface 950-1 comprises circuitry configured to implement a conventional network interface that enables data (e.g., packets) to be transferred between the local device 100 and other entities (e.g., remote display 110) in the network 970 using various protocols, such as Asynchronous Transfer Mode (ATM), Frame Relay (FR), Ethernet and so on. To that end, network interface 950-1 comprises conventional interface circuitry that incorporates signal, electrical and mechanical characteristics and interchange circuits needed to interface with the physical media of the network 970 and the various protocols running over that media.
The memory 920-1 is a computer-readable medium implemented as a random access memory (RAM) comprising RAM devices, such as dynamic RAM (DRAM) devices. Memory 920-1 contains various software and data structures used by the processor 930-1 including software and data structures that implement aspects of the present invention.
Memory 920-1 includes an operating system 922-1. The operating system 922-1 is a conventional operating system that comprises software configured to support the execution of processes on processor 930-1. Specifically, operating system 922-1 is configured to perform various conventional operating system functions, such as enabling the processes to be scheduled for execution on the processor 930-1 as well as provide software services and controlled access to resources (e.g., the I/O devices) associated with local device 100.
Remote device 110 is shown in
Memory 920-2 includes stored copies of an old image 500 and a new image 502, the old image comprising the last version of the remote display that has been transmitted to the local device and the new image comprising the last version of the remote display that has been transmitted to the local device and updated content from the remote display for a region for which the local device requests an update.
Program code 960-2 includes instructions for: 1) comparing, upon a request from a local device to update a requested region, the requested region in the old and new images (964-1); 2) optionally stripping boundary unchanged pixels which did not change between the old image and the new image to yield a region including on each edge at least one pixel that changed between the old image and the new image (964-2); 3) encoding compared pixels to yield an update region (964-3); and 4) transmitting the update region to the local device (964-4).
While this invention has been particularly shown and described with references to example embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.
This application claims the benefit of U.S. Provisional Application No. 60/983,672, filed on Oct. 30, 2007. The entire teachings of the above application are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
60983672 | Oct 2007 | US |