In many applications, images are delivered from a client to a server. For example, in various types of web applications (e.g., search, photo sharing, social networking, etc.), a user requests content through a web browser, and a server responds by delivering images. Sometimes these images involve large amounts of data, due to the number of images to be delivered, or due to the high resolution of a particular image. Delivering a large amount of image data consumes a large amount of bandwidth.
One way to manage the use of bandwidth and resources when delivering images is to use an image pyramid. In an image pyramid, visual content is rendered at various different resolutions, and is partitioned into tiles. For example, for a given set of images, a pyramid may be created that contains the images at various different magnification levels, with each level of the pyramid representing a different magnification level. Each magnification level may be divided into one or more tiles, where a tile is a spatial unit (e.g., a rectangle that is 1024×1024 pixels in dimension) that contains visual content. The number of tiles that are used to represent the content may depend on the magnification level. For example, when images are shown at a low magnification level, it is possible to fit a larger number of images onto a single tile. When images are shown at a high magnification level, a smaller number of images fit on a single tile (or a single image may be divided into many tiles).
Image pyramids are typically pre-calculated based on some sort of fixed content. For example, a pyramid could be pre-calculated based on a specific image or collection of images. However, this technique assumes that the images to be represented in the pyramid either do not change, or change only infrequently. For content that is created or organized dynamically, image pyramids typically are not used. For example, if a page of thumbnail images is to be shown to a user in response to an image search query, rendering the search results page typically involves sending each thumbnail image separately from the server to the client.
Image pyramids may be used to provide visual content, such as content that changes or that is dynamically created in response to user input. For example, a server may generate or retrieve some image content to be delivered to a user. Based on some type of state information (e.g., a prior interaction with the user, or some other source of state information), the server may determine that the content is to be delivered at a particular magnification level, and that a particular spatial region of the content (e.g., a 1024×1024 rectangle) is to be shown to the user. Based on this state information, the server may create a tile that contains the content to be shown. The tile that is created may be the tile that would exist if an image pyramid had been pre-calculated for the dynamically-created content. That tile may be delivered to a client and may be shown to the user.
In one example, a user interacts with a server-based application, and content is prepared for the user based on the interaction. One example of such server-based application is a search application that returns images in response to a user query. The user may submit a search query, and images that are responsive to the query may be dynamically generated or retrieved. Based on the magnification level at which the images are to be provided to the user, the images may be rendered onto tiles, and one or more of these tiles may be delivered to a client to be shown to the user. Creating appropriately-sized tiles helps to manage bandwidth, since a user's screen could be filled with a given number of tiles regardless of whether the tile contains a small portion of a highly-magnified image, or contains several de-magnified images. In this way, a high-resolution image can be shown to a user without using the bandwidth to transmit the entire high-resolution image at once, since it is possible to transmit just the tile(s) that represent the parts of the image that the user is requesting to see.
Various optimizations can be performed. For example, when visual content has been rendered at a particular magnification level, the content can be stored and indexed in a database. In this way, if the same content is requested again, it can be retrieved from the database without having to re-render the content. Moreover, since rendering information onto tiles and delivering the tiles to a user is a particularly efficient way to provide content to a user, resources are freed up and these resources can be used to provide more content to the user. For example, the user might enter a search query and, in response to the query, might receive not only search results but also suggestions of related searches, ads, etc.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In many applications, content is delivered from a client to a server. These applications often want to be able to provide content at a variety of different zoom levels. One way to provide content at different zoom levels is to create an image pyramid. In an image pyramid, content is rendered at several different zoom levels onto tiles that have uniform spatial dimensions. When content is rendered at a low zoom level, the content takes up a smaller number of tiles. When content is rendered at a high zoom level, the content takes up a larger number of tiles. Since the tiles have a uniform size, a given tile can be transmitted from a server to a client using a constant amount of bandwidth, regardless of the zoom level of the image that is rendered onto the tile.
Rendering an image onto tiles in a pyramid provides a convenient way to manage bandwidth. For example, if a high-resolution image is to be rendered, then instead of transmitting the entire high-resolution image (which may involve transmitting a large amount of data), just enough tiles to cover the user's screen could be transmitted. If the user moves to another part of the screen, or changes the zoom level, then the appropriate additional tiles can be transmitted to cover the screen. However, image pyramids are typically pre-calculated, and thus are normally used for content that does not change, or that changes only infrequently. For content that is dynamically created or that changes frequently, images are typically delivered in other ways. For example, an image search engine might generate several thumbnail images as part of a set of search results, and might provide the images to a client one-by-one (and an overhead cost is incurred in transmitting each thumbnail separately). Or, if a high-resolution image is to be shown, the entire high-resolution image might be transmitted to a client, at a great expense of transmission bandwidth.
The subject matter described herein provides a way to use image pyramids with content that changes or that is created dynamically. When content is to be provided, the underlying content is generated. Based on what portion of the content is to be shown to a user and the zoom level at which it is to be shown (or based on some other type of state information), the appropriate portion of the content is rendered onto one or more tiles. The tile(s) are then delivered from a server to a client so that the tiles can be shown to the user. The tiles can be rendered dynamically—possibly “on demand”—thereby avoiding calculation of the entire pyramid. For example, a search application might provide images as part of search results. Based on the particular portion of the results to be shown to the user, and based on the applicable zoom level, an appropriate set of one or more tiles may be rendered. These tiles may be provided to a client to show to the user. If the zoom level changes (e.g., based on user selection, or in response to some other event), new tiles at a different zoom level can be calculated. Similarly, if the user pans around the content from one spatial region to another, then new tiles representing the new spatial region can be calculated and delivered to the client. In one example, tiles can be calculated in an anticipatory fashion: e.g., if the user is viewing a particular spatial region, then tiles adjacent to that region can be calculated in anticipation that the user will pan to those adjacent regions. The techniques described herein may be used to deliver content that could be shown at various different resolutions (e.g., photos or other images), or content whose underlying depth is infinite but that has to be rendered at a specific resolution (e.g., fractals).
Since providing content through tiles is a particularly efficient way to deliver content, it is possible to deliver additional content. For example, in an image search, the thumbnail images that form the results are typically delivered one-by-one, thereby making it expensive to provide additional thumbnails (e.g., ads, or other content that is not directly responsive to the search query). By transmitting the content efficiently through tiles, it is practical to provide these types of additional content to a user. Some examples of additional content that could be provided are ads, or metadata about the images. For example, if each image on a tile is an image of a car, then examples of some additional data that could be provided are the make manufacturer of each car, its price, its performance characteristics, interesting facts about the car, etc.
Turning now to the drawings.
Image 102 may be represented in the form of pyramid 104. Pyramid 104 contains image 102 at various zoom levels, where each zoom level corresponds to a level of the pyramid. Three zoom levels (106, 108, and 110) are shown. Pyramid 104 incorporates the concept of a tile that defines a particular spatial region. An example of a spatial region is a rectangle of a particular size and aspect ratio (e.g., a 1024×1024 rectangle), although a tile could be any shape or size. For example, tiles could be triangular, trapezoidal, etc. In the example of
The number of tiles that it takes to cover the image depends on the zoom level of the image. At level 106, image 102 is rendered small, so image 102 fits in a single tile. At level 108, image 102 is rendered somewhat larger, so it takes four tiles to cover image 102. At level 110, image 102 is rendered even larger, so it takes sixteen tiles to cover image 102. Since the tiles are the same size, it will be observed that each tile has the same number of pixels regardless of zoom level. For example, if a tile corresponded to approximately one screen-full of visual content, then a screen-full of the image can be provided with an approximately constant amount of data regardless of the zoom level.
Pyramid 104 may be a virtual pyramid in the sense that it might be calculated dynamically as tiles are requested, rather than having been pre-created. For example, tile 112 represents a particular portion of image 102 at the zoom level represented by level 110. But a user might or might not request to see image 102 at the zoom level represented by level 110. Or, a user might want to see image 102 at that zoom level, but might or might not request to see the particular spatial portion that corresponds to tile 112. Thus, specific portions of image pyramid 104 might be created “on demand” (e.g., in response to a user's request to see a particular portion of the pyramid), or might be created in response to other events (or in response to no event at all). (Tile 114 is also shown in
It is noted that the tiles shown in
In
The arrangement of images A-E into two rows may be rendered at various different zoom levels. Thus, these images may be represented in the form of a pyramid 202, having zoom levels 204, 206, and 208. At zoom level 204, images A-E all fit into a single tile. At zoom level 206, the images are larger, so they fit into two tiles, with images A, B, D, and E on one tile and image C on another tile. At zoom level 208, the images are even larger so each image takes up a separate tile.
As with pyramid 104 (shown in
At 302, a client requests a tile from an image pyramid. The request may be received by a server. In
It is noted that the specification of tile T and state S may overlap somewhat. For example, a user's profile might include information such as the user's chosen default zoom level. This profile information might be part of the state S, in which case the particular tile to be shown to the user may be determined, at least in part, based on state S.
Returning now to
At 310, the server adds the image data to the tile. At 312, the server determines whether there is additional content to add to the tile. If so, then the process returns to 306 to identify what the additional content is, and to obtain and/or generate this content. If there is no additional content to add to the tile, then the process continues to 314 and provides the generated tile to the client.
The above-described techniques may be used with a number of variations. Some of these variations are shown in
One example variation is to prepare tiles in anticipation of requests for those tiles (block 402). For example, suppose that a search application generates content in response to a search query. The application might only be able to show one screen-full of the content at a time, but if a user is looking at a particular screen-full of content, is it is reasonable to guess that the user may soon look at content that is adjacent to that screen-full. Thus, the tiles that correspond to regions adjacent to the one being viewed can be pre-rendered, so that those tiles will be ready when requested. Rendering tiles adjacent to the one being viewed is one example of how the preparation of tiles can be anticipated, although any tile could be prepared in anticipation of the tile's being requested.
Another example variation of the techniques described above is to store and index images, so that they may be included in future tiles (at 404). For example, suppose that a search engine returns a set of images that is responsive to a query. The images may be rendered onto tiles, so that the tiles may be shown to the user as search results. However, the same images might be responsive to future searches. Thus, instead of re-rendering the images in response to a future search, the images may be stored in a content database 406 and indexed in some manner. In that way, the computational effort that has been expended to render the images can be re-used, and the already-rendered images can be found in the database to include in future tiles.
An additional variation on the techniques described above is to include content other than that which is responsive to a user request (block 408). As noted above, in one example an application that provides content in the form of tiles is a search engine. The search results are directly responsive to a user's request. However, it is possible to provide content other than that which is directly responsive to the user's request. For example, some of the content on a tile might include advertisements, suggested searches, etc. It is noted that providing content on tiles is a particularly efficient way to deliver content to a user, since doing so can deliver a screen-full of information to the user in a single communication. One way to use this efficiency is to provide more content to the user than would otherwise have been provided. Advertisements, suggested searches, etc., are some examples of this additional content. (It is noted that, in general, the content that is provided on tile can be said to “follow” a request, even if that content is not said to respond to the request. Thus, content that “responds” to a request is a specific, non-limiting example of content that “follows” a request.)
Computer 500 includes one or more processors 502 and one or more data remembrance components 504. Processor(s) 502 are typically microprocessors, such as those found in a personal desktop or laptop computer, a server, a handheld computer, or another kind of computing device. Data remembrance component(s) 504 are components that are capable of storing data for either the short or long term. Examples of data remembrance component(s) 504 include hard disks, removable disks (including optical and magnetic disks), volatile and non-volatile random-access memory (RAM), read-only memory (ROM), flash memory, magnetic tape, etc. Data remembrance component(s) are examples of computer-readable storage media. Computer 500 may comprise, or be associated with, display 512, which may be a cathode ray tube (CRT) monitor, a liquid crystal display (LCD) monitor, or any other type of monitor.
Software may be stored in the data remembrance component(s) 504, and may execute on the one or more processor(s) 502. An example of such software is tile creation software 506, which may implement some or all of the functionality described above in connection with
The subject matter described herein can be implemented as software that is stored in one or more of the data remembrance component(s) 504 and that executes on one or more of the processor(s) 502. As another example, the subject matter can be implemented as instructions that are stored on one or more computer-readable storage media. Tangible media, such as an optical disks or magnetic disks, are examples of storage media. The instructions may exist on non-transitory media. Such instructions, when executed by a computer or other machine, may cause the computer or other machine to perform one or more acts of a method. The instructions to perform the acts could be stored on one medium, or could be spread out across plural media, so that the instructions might appear collectively on the one or more computer-readable storage media, regardless of whether all of the instructions happen to be on the same medium.
Additionally, any acts described herein (whether or not shown in a diagram) may be performed by a processor (e.g., one or more of processors 502) as part of a method. Thus, if the acts A, B, and C are described herein, then a method may be performed that comprises the acts of A, B, and C. Moreover, if the acts of A, B, and C are described herein, then a method may be performed that comprises using a processor to perform the acts of A, B, and C.
In one example environment, computer 500 may be communicatively connected to one or more other devices through network 508. Computer 510, which may be similar in structure to computer 500, is an example of a device that can be connected to computer 500, although other types of devices may also be so connected.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.