Patent Description:
In a networked environment, such as the Internet or other networks, first-party content providers can provide information for presentation in electronic documents, for example web pages or application interfaces. The documents can include first-party content provided by first-party content providers and third-party content provided by third-party content providers.

Third-party content can be added to an electronic document using various techniques. Some documents include tags that instruct a client computer on which the document is presented to request third-party content items directly from third-party content providers. Other documents include tags that instruct the client computer to call an intermediary service that partners with multiple third-party content providers to return third-party content items selected from one or more of the third-party content providers. In some instances, third-party content items are dynamically selected for presentation in electronic documents, and the particular third-party content items selected for a given serving of a document may differ from third-party content items selected for other servings of the same document. <CIT> discloses systems, methods and computer-readable media for uniquely identifying a digital medium by receiving a request for the digital medium, the request corresponding to a requestor, associating a unique identification with the requestor, encoding the digital medium based on the unique identification to provide a watermarked digital medium, the watermarked digital medium including a watermark that can be used to determine the unique identification, and providing the watermarked digital medium to the requestor.

Some implementations of the subject matter described herein can, in certain instances, realize one or more of the following advantages. First, a system may generate a watermark image to augment an arbitrary source image, even if the source image is not known when the watermark image is created. Because the watermark image may be overlaid on the source image for presentation to a user at a client computer remote from the system, the system need not directly obtain or modify the source image before the watermark image is transmitted to a client computer. Second, the system may recover a watermark image, or may recover an encoding image from which the watermark image was derived, even without a priori knowledge of the source image, thereby enabling a system to decode arbitrary images without knowing where they originated from. Third, the watermark image can be substantially transparent so as to be imperceptible to users when the watermark image is rendered over a source image so that the watermark image does not degrade the perceived visual quality of the source image. Fourth, the amount of time and computational expense required to generate a watermark image can be reduced by separating the watermark image from the source image over which the watermark image will be displayed. For example, rather than directly modifying a complex source image to add a watermark, which can take a significant amount of time and processing resources, the systems and techniques disclosed herein may generate the watermark image independently of the source image, which can be performed with fewer processing resources and/or in less time than modifying the source image. By relying on a separate client computer to blend the watermark image over the source image, the system can reduce latency in serving the watermark image responsive to a request from the client computer, while also reducing the number of computational cycles involved in responding to the request because the server system is not required to blend the watermark image and the source image prior to delivering the source image. Fifth, the system may generate binary watermark images, or other watermark images with relatively few color or transparency options, to maintain a compact file size that allows the images to be efficiently transmitted to a client computer over a network, whereas other watermark images may be much larger to accommodate.

<FIG> depicts a block diagram of a networked environment <NUM> that generates a watermark image for display over a source image presented in an electronic document served to a client computer <NUM>. The environment <NUM> includes a server system <NUM>, a client computer <NUM>, and computing systems for one or more source image providers 106a-n. The server system <NUM>, client computer <NUM>, and source image providers 106a-n are connected over one or more networks such as the Internet or a local area network (LAN). In general, the client computer <NUM> is configured to generate and transmit requests for electronic documents to the server system <NUM>. Based on the requests from the client computer <NUM>, the server system <NUM> generates responses (e.g., electronic documents) to return to the client computer <NUM>. A given response can include a selected source image 128a that is configured to be displayed to a user of the client computer <NUM>, where the source image 128a is provided by one of the source image providers 106a-n. The server system <NUM> can augment the response served to the client computer <NUM> with a semi-transparent watermark image <NUM> that is arranged for display in a presentation of the response document at the client computer <NUM> over the source image <NUM>.

The client computer <NUM> can be any type of computing device that presents images and other content to one or more human users. The client computer <NUM> may include an application, such as a web browser application, that makes requests to and receives responses from the server system <NUM>. The application may execute a response from the server system <NUM>, such as web page code or other types of document files, to present the response to the one or more users of the client computer <NUM>. In some implementations, the client computer <NUM> includes an electronic display device (e.g., an LCD or LED screen, a CRT monitor, a head-mounted virtual reality display, a head-mounted mixed-reality display), or is coupled to an electronic display device, that displays content from the rendered response to the one or more users of the client computer <NUM>. The displayed content can include the selected source image 128a and the watermark image <NUM> displayed over top of the selected source image 128a in a substantially transparent manner. In some implementations, the client computer <NUM> is a notebook computer, a smartphone, a tablet computer, a desktop computer, or a smartwatch or other wearable device.

In some implementations, the source image <NUM> provided in the response to the client computer <NUM> is a third-party content item that, for example, is not among content provided by a first-party content provider of the response. For example, if the response is a web page, the creator of the web page may include a slot that is configured to be populated by a source image from a third-party content provider that differs from the creator of the web page (e.g., a provider of an image repository). In another example, the first-party content provider may directly link to a third-party source image <NUM>. The client computer <NUM> may request the source image <NUM> directly from a corresponding computing system for one of the source image providers 106a-n or indirectly via an intermediary service, such as a service provided by server system <NUM> or another server system.

The server system <NUM> is configured to respond to a request from the client computer <NUM> with an electronic document and a semi-transparent watermark image <NUM> that is to be displayed in the electronic document over a source image 128a. The server system <NUM> can be implemented as one or more computers in one or more locations. The server system <NUM> can include one or more of a front-end subsystem <NUM>, an image generation subsystem <NUM>, a response formatter <NUM>, an image analysis and decoder module <NUM>, and a response records database <NUM>. Each of the components <NUM>-<NUM> is configured to perform the respective operations described herein. For example, the operations associated with each component <NUM>-<NUM> may be defined by instructions stored in memory on one or more computer-readable storage devices, and the operations may be carried out when the instructions are executed by one or more processors of the server system <NUM>. Although some operations are described herein as being performed by a specific one of the components <NUM>-<NUM> by way of example, in other implementations, some or all of the operations of two or more of the components <NUM>-<NUM> may be consolidated and performed instead by a single component. In yet other implementations, the operations of any one of the components <NUM>-<NUM> may be divided among two or more components.

The server system <NUM> can be configured to carry out the techniques illustrated in <FIG> and the processes <NUM>, <NUM>, and <NUM>. The operations of processes <NUM>, <NUM>, and <NUM>, and other techniques, are described in further detail below with respect to <FIG>, <FIG>, <FIG>, and <FIG>. An overview of the server system <NUM> and its components <NUM>-<NUM> follows below, with further detail of the operations and other techniques performed by these components described subsequently with respect to <FIG> and <FIG>, <FIG>, and <FIG>.

The front-end subsystem <NUM> provides an interface for communicating over one or more networks. The front-end subsystem <NUM> receives requests from the client computer <NUM> and transmits responses to the requests, along with any content associated with the requests such as a watermark image and, optionally, a source image, to the client computer <NUM>. The front-end subsystem <NUM> may also communicate with the computing systems of source image providers 106a-n, e.g., to obtain a source image 128a to serve to the client computer <NUM>. The front-end subsystem <NUM> may also communicate with, and include a controller for coordinating activities among, each of the components <NUM>-<NUM> of the server system <NUM>. To facilitate communication with devices over a network, the front-end system can include a wired (e.g., metallic or optical), wireless, or combination of wired and wireless communications interfaces that enable the front-end subsystem to connect to an active communications network.

The image generation subsystem <NUM> is configured to generate images from input data. In particular, the image generation subsystem <NUM> includes an encoding input generator <NUM> and a watermark image generator <NUM>.

The encoding input generator <NUM> processes a plaintext data item <NUM> to generate an encoding image <NUM> that encodes the plaintext data item <NUM>. The plaintext data item <NUM> can be any data that is capable of being encoded within the constraints of the encoding input generator <NUM>. For example, the plaintext data item <NUM> may be a text sample with a maximum length of n characters, since the size of the encoding image <NUM> may be capable of providing lossless encoding for text samples only up to the pre-defined maximum length of n characters. In some implementations, the plaintext data item <NUM> is a session identifier that uniquely identifies a network session between the client computer <NUM> and the server system <NUM> during which a response is served to a request from the client computer <NUM>.

In some implementations, the plaintext data item <NUM> includes or references source image data that identifies the particular source image 128a served to the client computer <NUM> or information associated with the source image 128a (e.g., information that indicates which of the source image providers 106a-n provided the particular source image 128a served to the client computer <NUM>). In some implementations, the response records database <NUM> stores data that associates detailed information about a response served for a particular request, in order to make the detailed information accessible via the session identifier represented by the plaintext data item <NUM>. The response records database <NUM> can also associate a session identifier with source image data, thereby making the source image data accessible by querying the database <NUM> using the session identifier represented by the plaintext data item <NUM>. A user can then identify, for example, which of the source images 128a-n was served to the client computer <NUM> for a request using the session identifier from the plaintext data item <NUM>.

The encoding image <NUM> is an image that encodes the plaintext data item <NUM>. In some implementations, the encoding image <NUM> is a matrix-type barcode that represents the plaintext data item <NUM>. One example of a suitable matrix-type barcode is a Quick Response Code (QR code). The encoding image <NUM> can have a pre-defined size in terms of a number of rows and columns of pixels. Each pixel in the encoding image <NUM> can encode a binary bit of data, where the value of each bit is represented by a different color. For example, a pixel that encodes the binary value '<NUM>' may be black while a pixel that encodes the binary value '<NUM>' may be white. In some implementations, the smallest encoding unit of an encoding image <NUM> may actually be larger than a single pixel. But for purposes of the examples described herein, the smallest encoding unit is assumed to be a single pixel. It should be appreciated, however, that the techniques described herein may be extended to implementations where the smallest encoding unit is a set of multiple pixels, e.g., a 2x2 or 3x3 grid of pixels.

The image generator subsystem <NUM> further includes a watermark image generator <NUM>. The watermark image generator <NUM> is configured to process the encoding image <NUM> to generate a semi-transparent watermark image <NUM>. The semi-transparent watermark image <NUM> is derived from the encoding image <NUM> and also encodes the plaintext data item <NUM>. However, the transparencies, colors, arrangement of encoded pixels and/or other features of the watermark image <NUM> may be changed from the transparencies, colors, arrangement of encoded pixels and/or other features of the encoding image <NUM>. For example, whereas the encoding image <NUM> may be uniformly opaque and consist of encoded pixels that are closely packed adjacent to each other, the watermark image <NUM> may include some fully transparent pixels and some partially transparent pixels. Moreover, the encoded pixels in the watermark image <NUM> may be spaced relative to each other so that each encoded pixel is surrounded by non-encoded pixels (i.e., "blank" pixels). The transformation of the encoding image <NUM> to the watermark image <NUM> may be performed so that, after the watermark image <NUM> is overlaid and merged on a background source image 128a, the encoded information may be recovered, e.g., by reconstructing the encoding image <NUM> or the watermark image <NUM>. The details of how the watermark image generator <NUM> creates the watermark image <NUM> from the encoding image <NUM> are discussed more fully with respect to process <NUM> (<FIG>) and <FIG>.

The response formatter <NUM> is configured to generate a response to return to the client computer <NUM> in reply to the client's request for an electronic document. The response can include one or more content items, including first-party content items and third-party content items, which collectively form an electronic document such as a web page, an application interface, a PDF, a presentation slide deck, or a spreadsheet. In some implementations, the response includes a primary document that specifies how various content items are to be arranged and displayed. The primary document, such as a hypertext markup language (HTML) page, may refer to first-party content items and third-party content items that are to be displayed in the presentation of the document. In some implementations, the response formatter <NUM> is configured to add computer code to the primary document that instructs the client computer <NUM>, when executing the response, to display one or more instances of the watermark image <NUM> over the source image 128a, e.g., to add a watermark to the source image 128a that is substantially imperceptible to human users. Because the watermark image <NUM> has fully and partially-transparent pixels, the application at the client computer <NUM> that renders the electronic document can perform a blending technique to overlay the watermark image <NUM> on the source image 128a according to the specified transparencies of the watermark image <NUM>. For example, the response formatter <NUM> may add code that directs the client computer <NUM> to display the source image 128a as a background image in a third-party content slot in an electronic document and to display one or more instances of the watermark image <NUM> as a foreground image over the source image 128a.

The server system <NUM> further includes an image analysis and decoder module <NUM>. The image analysis and decoder module <NUM> is configured to recover an encoded representation of the plaintext data item <NUM> from an encoded source image <NUM>. The encoded source image is an image that results from the client computer <NUM> rendering the watermark image <NUM> over the source image 128a. Even though the watermark image <NUM> is separate from the source image 128a, the encoded source image <NUM> processed by the image analysis and decoder module <NUM> may be a merged image showing the watermark image <NUM> blended over the source image 128a. For example, a user of the client computer <NUM> may receive an inappropriate or irrelevant source image 128a from one of the source image providers 106a-n in response to a request for an electronic document. The user may take a screenshot of the encoded source image <NUM> and transmit the screenshot to the server system <NUM> for analysis, e.g., to inquire about the origin of the source image 128a. Because the screenshot shows the original source image 128a overlaid by the watermark image <NUM>, the image analysis and decoder module <NUM> can process the screenshot to recover an encoded representation of the plaintext data item <NUM>, which in turn can be decoded to recover the plaintext data item <NUM> itself. The system <NUM> can then use the recovered plaintext data item <NUM> for various purposes, e.g., to query the response records database <NUM> to lookup detailed information about the source image 128a and its origins, or other information about the particular client session in which the source image 128a was served to the client computer <NUM>. The encoded representation of the plaintext data item <NUM> that the image analysis and decoder module <NUM> generates can be, for example, a recovered watermark image <NUM> or a recovered encoding image <NUM>. Additional details about the operations performed by the image analysis and decoder module <NUM> to recover an encoded representation of the plaintext data item <NUM> are described below with respect to <FIG>.

<FIG> is a block diagram of an example environment <NUM> in which third-party content is distributed for presentation with electronic documents. The example environment <NUM> includes a network <NUM>, such as a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof. The network <NUM> connects electronic document servers <NUM>, user devices <NUM>, third-party content servers <NUM>, and a third-party content distribution system <NUM> (also referred to as a content distribution system). The example environment <NUM> may include many different electronic document servers <NUM>, user devices <NUM> (e.g., client computers), and third-party content servers <NUM>.

A user device <NUM> is an electronic device that is capable of requesting and receiving resources (e.g., electronic documents) over the network <NUM>. Example user devices <NUM> include personal computers, mobile communication devices, and other devices that can send and receive data over the network <NUM>. A user device <NUM> typically includes a user application, such as a web browser, to facilitate the sending and receiving of data over the network <NUM>, but native applications executed by the user device <NUM> can also facilitate the sending and receiving of data over the network <NUM>.

An electronic document is data that presents a set of content at a user device <NUM>. Examples of electronic documents include webpages, word processing documents, portable document format (PDF) documents, images, videos, search results pages, and feed sources. Native applications (e.g., "apps"), such as applications installed on mobile, tablet, or desktop computing devices are also examples of electronic documents. Electronic documents can be provided to user devices <NUM> by electronic document servers <NUM>. For example, the electronic document servers <NUM> can include servers that host publisher websites. In this example, the user device <NUM> can initiate a request for a given publisher webpage, and the electronic server <NUM> that hosts the given publisher webpage can respond to the request by sending machine executable instructions that initiate presentation of the given webpage at the user device <NUM>.

In another example, the electronic document servers <NUM> can include app servers from which user devices <NUM> can download apps. In this example, the user device <NUM> can download files required to install an app at the user device <NUM>, and then execute the downloaded app locally.

Electronic documents can include a variety of content. For example, electronic document can include static content (e.g., text or other specified content) that is within the electronic document itself and/or does not change over time. Electronic documents can also include dynamic content that may change over time or on a per-request basis. For example, a publisher of a given electronic document can maintain a data source that is used to populate portions of the electronic document. In this example, the given electronic document can include a tag or script that causes the user device <NUM> to request content from the data source when the given electronic document is processed (e.g., rendered or executed) by a user device <NUM>. The user device <NUM> integrates the content obtained from the data source into a presentation of the given electronic document to create a composite electronic document including the content obtained from the data source.

In some situations, a given electronic document can include a third-party tag or third-party script that references the third-party content distribution system <NUM>. In these situations, the third-party tag or third-party script is executed by the user device <NUM> when the given electronic document is processed by the user device <NUM>. Execution of the third-party tag or third-party script configures the user device <NUM> to generate a request for third-party content <NUM>, which is transmitted over the network <NUM> to the third-party content distribution system <NUM>. For example, the third-party tag or third-party script can enable the user device <NUM> to generate packetized data request including a header and payload data. The request <NUM> can include data such as a name (or network location) of a server from which the third-party content is being requested, a name (or network location) of the requesting device (e.g., the user device <NUM>), and/or information that the third-party content distribution system <NUM> can use to select third-party content provided in response to the request. The request <NUM> is transmitted, by the user device <NUM>, over the network <NUM> (e.g., a telecommunications network) to a server of the third-party content distribution system <NUM>.

The request <NUM> can include data specifying the electronic document and characteristics of locations at which third-party content can be presented. For example, data specifying a reference (e.g., URL) to an electronic document (e.g., webpage) in which the third-party content will be presented, available locations (e.g., third-party content slots) of the electronic documents that are available to present third-party content, sizes of the available locations, positions of the available locations within a presentation of the electronic document, and/or media types that are eligible for presentation in the locations can be provided to the content distribution system <NUM>. Similarly, data specifying keywords associated with the electronic document ("document keywords") or entities (e.g., people, places, or things) that are referenced by the electronic document can also be included in the request <NUM> (e.g., as payload data) and provided to the content distribution system <NUM> to facilitate identification of third-party content items that are eligible for presentation with the electronic document. The third-party content can be represented by one or more files (e.g., digitally stored files) that cause a perceptible (e.g., visual) instance of the third-party content to be generated by a computing device that processes the one or more files. In some implementations, the third-party content is stored in image files, text files, or other files that cause a visually perceptible instance of the third-party content to be presented by a computing device (e.g., mobile device, tablet device, wearable device). The third-party content can include any information, including images of scenery, images of text, and images that include advertising information.

Requests <NUM> can also include data related to other information, such as information that the user has provided, geographic information indicating a state or region from which the request was submitted, or other information that provides context for the environment in which the third-party content will be displayed (e.g., a type of device at which the third-party content will be displayed, such as a mobile device or tablet device). Data specifying characteristics of the user device <NUM> can also be provided in the request <NUM>, such as information that identifies a model of the user device <NUM>, a configuration of the user device <NUM>, or a size (e.g., physical size or resolution) of an electronic display (e.g., touchscreen or desktop monitor) on which the electronic document is presented. Requests <NUM> can be transmitted, for example, over a packetized network, and the requests <NUM> themselves can be formatted as packetized data having a header and payload data. The header can specify a destination of the packet and the payload data can include any of the information discussed above.

The third-party content distribution system <NUM> selects third-party content that will be presented with the given electronic document in response to receiving the request <NUM> and/or using information included in the request <NUM>. In some implementations, the third-party content is selected in less than a second to avoid errors that could be caused by delayed selection of the third-party content. For example, delays in providing third-party content in response to a request <NUM> can result in page load errors at the user device <NUM> or cause portions of the electronic document to remain unpopulated even after other portions of the electronic document are presented at the user device <NUM>. Also, as the delay in providing third-party content to the user device <NUM> increases, it is more likely that the electronic document will no longer be presented at the user device <NUM> when the third-party content, thereby negatively impacting a user's experience with the electronic document. Further, delays in providing the third-party content can result in a failed delivery of the third-party content, for example, if the electronic document is no longer presented at the user device <NUM> when the third-party content is provided.

In some implementations, the third-party content distribution system <NUM> is implemented in a distributed computing system that includes, for example, a server and a set of multiple computing devices <NUM> that are interconnected and identify and distribute third-party content in response to requests <NUM>. The set of multiple computing devices <NUM> operate together to identify a set of third-party content that are eligible to be presented in the electronic document from among a corpus of millions of available third-party content (3PC<NUM>-x). The millions of available third-party content can be indexed, for example, in a third-party corpus database <NUM>. Each third-party content index entry can reference the corresponding third-party content and/or include distribution parameters (DP<NUM>-DPx) (e.g. selection criteria) that condition the distribution of the corresponding third-party content.

In some implementations, the distribution parameters (e.g., selection criteria) for a particular third-party content can include distribution keywords that must be matched (e.g., by electronic documents or terms specified in the request <NUM>) in order for the third-party content to be eligible for presentation. The distribution parameters can also require that the request <NUM> include information specifying a particular geographic region (e.g., country or state) and/or information specifying that the request <NUM> originated at a particular type of user device (e.g., mobile device or tablet device) in order for the third-party content to be eligible for presentation. The distribution parameters can also specify a bid and/or budget for distributing the particular third-party content.

The identification of the eligible third-party content can be segmented into multiple tasks 217a-217c that are then assigned among computing devices within the set of multiple computing devices <NUM>. For example, different computing devices in the set <NUM> can each analyze a different portion of the third-party corpus database <NUM> to identify various third-party content having distribution parameters that match information included in the request <NUM>. In some implementations, each given computing device in the set <NUM> can analyze a different data dimension (or set of dimensions) and pass results (Res <NUM>-Res <NUM>) 218a-218c of the analysis back to the third-party content distribution system <NUM>. For example, the results 218a-218c provided by each of the computing devices in the set may identify a subset of third-party content that are eligible for distribution in response to the request and/or a subset of the third-party content that have certain distribution parameters or attributes.

The third-party content distribution system <NUM> aggregates the results 218a-218c received from the set of multiple computing devices <NUM> and uses information associated with the aggregated results to select one or more instances of third-party content that will be provided in response to the request <NUM>. For example, the third-party content distribution system <NUM> can select a set of winning third-party content based on the outcome of one or more content evaluation processes, as discussed in further detail below. In turn, the third-party content distribution system <NUM> can generate and transmit, over the network <NUM>, reply data <NUM> (e.g., digital data representing a reply) that enable the user device <NUM> to integrate the set of winning third-party content into the given electronic document, such that the set of winning third-party content and the content of the electronic document are presented together at a display of the user device <NUM>.

In some implementations, the winning third-party content that is provided in response to the request <NUM> is a source image that will be augmented with a watermark. The system <NUM> may generate a watermark image and configure an electronic document to overlay the watermark image on the source image when the document is presented at a user device <NUM>.

In some implementations, the user device <NUM> executes instructions included in the reply data <NUM>, which configures and enables the user device <NUM> to obtain the set of winning third-party content from one or more third-party content servers. For example, the instructions in the reply data <NUM> can include a network location (e.g., a Uniform Resource Locator (URL)) and a script that causes the user device <NUM> to transmit a third-party request (3PR) <NUM> to the third-party content server <NUM> to obtain a given winning third-party content from the third-party content server <NUM>. In response to the request, the third-party content server <NUM> will transmit, to the user device <NUM>, third-party data (TP Data) <NUM> that causes the given winning third-party content to be incorporated to the electronic document and presented at the user device <NUM>.

The content distribution system <NUM> can utilize one or more evaluation processes to identify and select the set of winning third-party content for each given request (e.g., based on data corresponding to the request). In some implementations, the evaluation process is not only required to determine which third-party content to select for presentation with the electronic document, but also the type of formatting that will be dynamically (e.g., on a per-request basis) applied to the selected third-party content, and the price that will be paid for presentation of the selected third-party content when presented with the applied formatting.

<FIG> illustrate example techniques for generating a watermark image that encodes plaintext data, and for recovering an encoded representation of the plaintext data. Each of <FIG> is discussed in further detail below with respect to the description of processes <NUM>-<NUM> of <FIG>, respectively.

<FIG> is a flowchart of an example process <NUM> for using a semi-transparent watermark image to augment a source image presented in an electronic document served to a client computer. The process <NUM> can be carried out by a system of one or more computers, e.g., server system <NUM>.

In some implementations, the process <NUM> begins at stage <NUM>, where the system receives plaintext data, e.g., plaintext data item <NUM>. Plaintext data is generally any data that is capable of being encoded in an encoding image such as a QR code. In some implementations, the plaintext data is a session identifier that uniquely identifies a logical session between a client computer and the system, or that identifies an electronic document served in response to a request from a client computer. In some implementations, the plaintext data includes or references source image data that identifies a particular source image served to the client computer or information associated with the source image.

At stage <NUM>, an encoding input generator, e.g., encoding input generator <NUM>, of the system generates an encoding image from the plaintext data. The encoding image is an image that encodes the plaintext data. In some implementations, the encoding image is a matrix-type barcode that represents the plaintext data. One example of a suitable matrix-type barcode is a Quick Response Code (QR code). The encoding image can have a pre-defined size in terms of a number of row and columns of pixels. Each pixel in the encoding image can encode a binary bit of data, where the value of each bit is represented by a different color. For instance, a pixel that encodes the binary value '<NUM>' may be black while a pixel that encodes the binary value '<NUM>' may be white.

One example of an encoding image <NUM> is shown in <FIG>. The encoding image <NUM> in this example is a matrix-type barcode, e.g., a QR code, that has three rows of pixels and three columns of pixels. Of course, other sizes of encoding images are also possible with more or fewer rows and columns of pixels. In the encoding image <NUM>, some pixels have a first binary color, i.e., black, and other pixels have a second binary color, i.e., white. The color of each pixel is defined by a color value. The pixels located at (row, column) coordinates (<NUM>, <NUM>), (<NUM>, <NUM>), and (<NUM>, <NUM>), for example, are white, while the other pixels in encoding image <NUM> are black.

Additionally, each pixel may have a transparency value (also referred to as an "alpha" value) that indicates a transparency level of the pixel. The transparency value may be normalized to the range [<NUM>, <NUM>] where a value of '<NUM>' represents fully transparent, a value of '<NUM>' represents fully non-transparent (opaque), and intermediate values between '<NUM>' and '<NUM>' represent partial transparencies. In some implementations, the encoding image <NUM> is fully non-transparent such that each of the pixels of the encoding image <NUM> has a transparency value of '<NUM>'. Image rendering applications can then use transparency values to determine composite colors for pixels that result when a foreground image is overlaid on a background image. For example, in some blending procedures, if the color value of the background pixel is 'bgRGB' and the color value of the foreground pixel is 'fgRGB' with a transparency (alpha) value of 'fgA' normalized to the range [<NUM>, <NUM>], then the composite pixel that is ultimately rendered for display to a user will have a color value of fgRGB*fgA + bgRGB*(<NUM> - fgA). If the value of 'fgA' is zero, then the formula condenses to bgRGB*(<NUM> - fgA). <FIG>, for example, shows an example background image <NUM> (e.g., a source image), where each pixel has a color value identified by the symbol CnRGB.

<FIG> shows an encoded source image <NUM> that has been generated using the blending technique described in the preceding paragraph to overlay watermark image <NUM> (foreround image) on source image <NUM> (background image), where the colors of certain encoded pixels in the encoded source image <NUM> are a blend of partially transparent foreground pixels from the watermark image <NUM> and the corresponding background pixel colors from the source image <NUM>. It should be noted that the color values and expressions shown in <FIG> assume that shaded pixels in the foreground watermark image are black and thus the foreground RGB value for the pixel is (<NUM>, <NUM>, <NUM>). Accordingly, the full expression for the composite pixel that results from blending the foreground watermark image and the background source image reduces from 'fgRGB*fgA + bgRGB*(<NUM> - fgA)' to simply 'bgRGB*(<NUM>-fgA). ' Thus, if a foreground pixel from the watermark image has color (<NUM>, <NUM>, <NUM>) and transparency value Ba, and the color of the background pixel is CnRGB, then the composite color value for the pixel is defined by the expression CnRGB*(<NUM>-Ba). If the foreground pixel from the watermark image has color (<NUM>, <NUM>, <NUM>) and transparency value <NUM>, and the color of the background pixel is CnRGB, then the composite color value for the pixel is CnRGB.

At stage <NUM>, a watermark image generator, e.g., watermark image generator <NUM>, of the system generates a watermark image. The watermark image is a semi-transparent image that includes pixels having two or more different levels of transparency to encode the plaintext data item. For bi-level transparency, the watermark image may consist of a first set of pixels having a first transparency level, e.g., partially transparent, and a second set of pixels having a second transparency level, e.g., fully transparent. The first set of pixels may be encoded pixels that each represents a respective pixel from the encoding image having a first color value such as black. The second set of pixels may include two subsets of pixels, namely encoded pixels and blank pixels. Although the encoded and blank pixels in the second subset may share the same transparency level, only the encoded subset of pixels represents pixels from the encoding image having a second color value, such as white. The blank pixels do not represent any pixels from the encoding image, but are instead interspersed among the encoded pixels of the first and second sets of pixels to facilitate recovery of information from an encoded source image that may later result from the watermark image being overlaid on a background image.

In some implementations, the system carries out stage <NUM> according to the example process <NUM> depicted in the flowchart of <FIG>. The process <NUM> is a process for generating a watermark image from an encoding image. The process <NUM> can be performed by a system of one or more computers, e.g., server system <NUM>, and specifically by a watermark image generator, e.g., watermark image generator <NUM>.

At stage <NUM>, the watermark image generator identifies an encoding image such as encoding image <NUM>.

Optionally, at stage <NUM>, the watermark image generator normalizes the encoding image. Normalizing the encoding image can involve mapping the respective color values and transparency values of all or some of the pixels in the encoding image to pre-defined color and/or transparency values. For example, if in the original encoding image, binary values encoded in the image were distinguished by pixel color, then in the normalized encoding image, binary values encoded in the normalized image may be distinguished by pixel transparency.

<FIG> depict one example of normalizing an encoding image. In particular, <FIG> shows an example representation <NUM> of the original encoding image <NUM> in which the black pixels all have the color value BRGB and have the transparency value BA and the white pixels all have the color value WRGB and have the transparency value WA. In some implementations, WA and BA are identical. <FIG> shows a normalized encoding image <NUM> where the colors and transparencies of the pixels have been transformed so that the black and white pixels are assigned the common color BRGB but are differentiated by their transparencies. The black pixels are assigned the transparency value BA, while the white pixels are assigned the transparency value of '<NUM>', i.e., fully transparent.

Referring again to <FIG>, at stage <NUM>, the watermark image generator generates an initial watermark canvas. In some implementations, the initial watermark canvas is a preliminary image that has a pre-defined size and provides a starting point for creation of a watermark image. An example initial watermark canvas is canvas <NUM>, as shown in <FIG>. The canvas <NUM> has the same number of rows as the normalized encoding image <NUM>, but is made to have twice the number of columns as the normalized encoding image <NUM>. Additionally, all the pixels in the initial watermark canvas <NUM> are blank pixels that have the same color and transparency level. Blank pixels are pixels that do not encode information from the encoding image and do not correspond to any pixels in the encoding image. In some implementations, blank pixels have the same transparency as the second set of pixels in the normalized encoding image <NUM>. For example, the blank pixels in canvas <NUM> are fully transparent as indicated by the latter value in the respective parentheticals (color value, transparency value) for each pixel.

At stage <NUM>, the watermark image generator uses the normalized encoding image to add encoded pixels to the initial watermark canvas to create a final watermark image. Encoded pixels are pixels in the watermark image which, in contrast to blank pixels, do encode information from the encoding image. Each encoded pixel in the watermark image corresponds to one of the pixels in the normalized encoding image. In some implementations, the final watermark image is generated by replacing blank pixels in the initial watermark canvas with encoded pixels from the normalized encoding image. For example, a given blank pixel in the initial watermark canvas may be fully transparent. If that pixel is made to be an encoded pixel, then that pixel is assigned the transparency of a corresponding pixel from the normalized encoding image. In some cases, the pixel may remain fully transparent if the corresponding pixel from the normalized encoding image is fully transparent. In other cases, the transparency of the watermark pixel may be adjusted to be partially transparent if the corresponding pixel from the normalized encoding image is partially transparent.

<FIG> shows one example of a watermark image <NUM> that the watermark image generator generates from the initial watermark canvas <NUM> based on the normalized encoding image <NUM>. Each of the pixels in the watermark image <NUM> that have a patterned background represents an encoded pixel. Each of the pixels in the watermark image <NUM> having a non-patterned white background represents a blank pixel. As the watermark image <NUM> shows, the encoded pixels are distributed among the blank pixels such that each encoded pixel is neighbored at the top, bottom, left, and/or right by at least two blank pixels. In general, the watermark image generator distributes encoded pixels in the watermark image so that each encoded pixel is directly adjacent to at least one, two, three, four, or more blank pixels. This arrangement can allow encoded information to later be recovered from a source image that has been augmented by a watermark image without a priori knowledge of the source image, as described further below. In the example of <FIG>, the watermark image generator has interspersed the encoded pixels in the watermark image by starting with the arrangement of pixels in the normalized encoding image, inserting a blank pixel directly to the right of each encoded pixel in odd-numbered rows, and inserting a blank pixel directly to the left of each encoded pixel in even-numbered rows so as to shift the encoded pixels in even-numbered rows by one pixel relative to the encoded pixels in odd-numbered rows. The effect is to stagger the encoded pixels and to surround them by blank pixels, as shown in the final watermark image <NUM>. Thus, in the final watermark image <NUM>, the only pixels that are not fully transparent are the encoded pixels that correspond to black pixels in the original encoding image <NUM>. More generally, encoded pixels in the watermark image <NUM> that correspond to pixels of a first binary color in the original encoding image <NUM> may be assigned a first transparency level, whereas a different, second transparency level may be assigned to both blank pixels and encoded pixels that correspond to pixels of a second binary color from the original encoding image <NUM>.

In some implementations, the watermark image generator can use other techniques for mapping encoded pixels from the normalized encoding image <NUM> to the final watermark image <NUM>. The watermark image generator may use a mapping template that correlates positions for encoded pixels in the watermark image <NUM> to pixel positions in the normalized encoding image <NUM>. Every pixel in the normalized encoding image <NUM> can be mapped to a pixel in the watermark image <NUM>. In some implementations, the system can also use the mapping template to perform a reverse mapping of encoded pixels from an encoded source image in order to reconstruct the watermark image <NUM> or the encoding image <NUM> from the encoded source image. The mapping template can identify any arrangement of encoding pixels (e.g., in any order) in the watermark image <NUM>, so long as each of the encoding pixels directly neighbors one or more blank pixels.

Referring back to <FIG>, at stage <NUM>, the system generates an entry in a response records database, e.g., response records database <NUM>. The response records database contains a log that stores information about each response or other electronic document (e.g., a pushed electronic document that is not responsive to a specific request) transmitted to one or more client computers in communication with the server system over a period of time. Each response may be associated with a client session, which may entail one or more request-response interactions between a given client computer and the server system. In some implementations, a given entry in the response records database includes a session ID, a response ID, and source image data. The session ID uniquely identifies a server-client network session, the response ID uniquely identifies a response served to the client computer during a given session, and the source image data identifies information about a source image transmitted to the client computer for a particular session or response. The session ID, response ID, or both may form the plaintext data that is encoded in the encoding image and watermark image so that the system can later use a watermark overlaid on a source image to recover the session ID, response ID, or both, and to lookup the appropriate source image data associated with the session ID and/or response ID.

At stage <NUM>, the server system serves an electronic document to the client computer. The electronic document may include computer code that, when executed by the client computer, causes the client computer to request and obtain the source image and the watermark image. Further, the computer code may include instructions for the client computer to overlay the watermark image on the source image when the electronic document is rendered for presentation to a user. For example, an example process <NUM> for rendering an encoded source image at a client computer is depicted in <FIG>. The process <NUM> can be carried out by one or more computing devices, e.g., client computer <NUM>. In some implementations, the process <NUM> is carried out by an application installed on the client computer, such as a web browsing application.

At stage <NUM>, the client computer receives a source image from the server system or another computing system. At stage <NUM>, the client computer receives a watermark image from the server system, along with an electronic document that contains instructions for the watermark image to be displayed in the foreground over the source image. At stage <NUM>, the client computer renders the electronic document, including displaying the watermark image over the source image. The resulting image that is displayed when the watermark is overlaid on the source image is referred to as an encoded source image. In some implementations, the client computer uses a blending technique to shade pixels in the source image that are covered by partially transparent pixels in the watermark image. The blending technique can involve, for example, for each pixel in the watermark image that overlays a pixel in the background source image, determining a composite/blended color to display by weighting the color of the watermark image pixel relative to the color of the background source image pixel using a transparency value assigned to the watermark image pixel. In some implementations, the watermark image is smaller than the source image in that it has fewer rows and/or columns of pixels than the source image. In order to watermark the entire source image, the client computer may tile multiple instances of the watermark image over the source image. By way of example, <FIG> shows an example source image <NUM>. <FIG> shows an example watermark image <NUM> based on the QR code <NUM>. <FIG> shows an encoded source image <NUM> in which the watermark image <NUM> has been tiled multiple times over the source image <NUM>.

At stage <NUM>, after serving the electronic document and watermark image to the client computer, the server system later receives an encoded source image that was rendered at the client computer. At stage <NUM>, a decoder module of the server system, e.g., image analysis and decoder module <NUM>, processes the encoded source image to recover an encoded representation of the plaintext data. In some implementations, the decoding involves generating a recovery image from the encoded source image. The recovery image may be, for example, the watermark image, the encoding image, the normalized encoding image, or another image from which the plaintext data can be read. An example process <NUM> for generating a recovery image from an encoded source image is depicted in <FIG>. The process <NUM> can be carried out by a system of one or more computers, e.g., image analysis and decoder module <NUM> of server system <NUM>.

At stage <NUM>, the decoder module receives an encoded source image. For example, a user of the client computer may be presented an inappropriate or irrelevant source image in an electronic document. The user may take a screenshot of the encoded source image and transmit the screenshot to the server system for analysis, e.g., to inquire about the origin of the source image.

In some instances, the client computer may have tiled multiple copies of the watermark image over the source image to render the encoded source image. The decoder module may only require a portion of the encoded source image that corresponds to a single, overlaid watermark image. Accordingly, at stage <NUM>, the decoder module selects such a portion of the encoded source image that corresponds to a single, overlaid watermark image. The server system may know the size/dimensions of the watermark image and selects a portion of the encoded source image that matches the known size. In some implementations, the server system selects a portion of the encoded source image that is known to correspond to one full instance of the watermark image, e.g., a portion that extends down and to the right from the top left corner of the encoded source image. In other implementations, the server system may "hunt" for an appropriate portion of the encoded source image that encompasses a single, but entire watermark image that has been overlaid in the encoded source image. For example, the decoder module may select a portion at an arbitrary location, generate a recovery image based on the selected portion, and then verify whether the recovery image encodes valid plaintext data. If the recovery image does not encode valid plaintext data, then the decoder module selects another portion at a different location of the encoded source image, generates a recovery image based on the newly selected portion, and verifies whether the recovery image encodes valid plaintext data. The decoder module may continue searching until a portion is selected that yields valid plaintext data when decoded.

At stage <NUM>, the decoder module generates a recovery image using the selected portion of the encoded source image. Generating a recovery image can involve performing the operations represented in stages <NUM>-<NUM> for each encoded pixel in the selected portion of the encoded source image. The encoded source image can include both encoded pixels and blank pixels. Encoded pixels carry encoded information and correspond to encoded pixels in the watermark image. Blank pixels do not carry encoded information and correspond to blank pixels in the watermark image. The decoder module uses a mapping template that identifies an arrangement of encoded pixels in a watermark image to distinguish encoded pixels from blank pixels.

Because the encoded source image is created by overlaying a partially transparent watermark image over the original source image, the color of each pixel in the selected portion of the encoded source image is based on the color of a background pixel from the original source image, the color of a foreground pixel from the watermark image, and the transparency level of the foreground pixel in the watermark image. In some implementations, the transparency levels of the blank pixels and a portion of the encoded pixels in the overlaid watermark image that correspond to a second binary value (e.g., pixels representing white pixels in the original encoding image) may be '<NUM>', i.e., fully transparent. The transparency levels of the remaining encoded pixels in the watermark image that correspond to a first binary value (e.g., pixels representing black pixels in the original encoding image) may be slightly greater than zero so as to slightly darken (e.g., by a user-imperceptible amount) the color of the respective background source image pixels when the watermark image is overlaid on the source image. Under these or similar conditions, and by applying the assumption that the color of any given pixel in the source image matches the color of its neighboring pixels within a specified tolerance, the decoder module can generate a recovery image by determining the encoded value of each encoded pixel in the selected portion of the encoded source image according to operations <NUM>-<NUM>.

In particular, at stage <NUM>, the decoder module identifies a color value that indicates the color of a given encoded pixel in the selected portion of the encoded source image. At stage <NUM>, the decoder module identifies the respective color values of the blank pixels that neighbor the given encoded pixel. A neighboring pixel is generally any pixel that is adjacent to the encoded pixel, e.g., directly above, below, or to the left or right of the encoded pixel.

At stage <NUM>, the decoder module decodes the given encoded pixel in the selected portion of the encoded source image using the identified color values of the encoded pixel and its neighboring pixels. Because the color value of each pixel in the source image is assumed to match the color value of its neighboring pixels within a specified tolerance, a decoded value of the encoded pixel can be determined by comparing the color value of the encoded pixel to the color values of one or more of its neighboring pixels. If the color value of the encoded pixel matches the color values of the neighboring pixels within the specified tolerance, then the encoded pixel is assumed not to have been darkened by a semi-transparent pixel in the overlaid watermark image, and the encoded pixel is decoded to represent a second binary value (e.g., a value that represents a 'white' pixel in the original encoding image). If the color value of the encoded pixel does not match the color values of the neighboring pixels within the specified tolerance, then the encoded pixel is considered to have been darkened by a semi-transparent pixel in the overlaid watermark image, and the encoded pixel is decoded to represent a first binary value (e.g., a value that represents a 'black' pixel in the original encoding image). Alternatively the decoder module may multiply the color values of the neighboring pixels from the encoded source image by (<NUM> - Ba), where Ba is the normalized transparency value that was assigned to encoded pixels having the first binary value (e.g., 'black' pixels) in the watermark image and where BRGB is represented by the value (<NUM>, <NUM>, <NUM>). If the resulting color values of the neighboring pixels after multiplication by (<NUM> - Ba) matches the color value of the encoded pixel within the specified tolerance, then the encoded pixel is decoded to represent the first binary value (e.g., a value that represents a 'black' pixel in the original encoding image), because the match indicates that the encoded pixel was also darkened by (<NUM> - Ba) during the blending process. As another alternative, the colors of the encoded pixel and its neighboring pixels may be provided as inputs to a machine-learning model that has been trained to classify encoded pixels as either encoding the first or second binary value based on the color of the encoded pixel and its neighboring pixels. In some instances, if the encoded pixel does not meet the matching criteria to be decoded to either the first or second binary value, the decoder module may arbitrarily assign either the first or second binary decoded value to that pixel.

During stage <NUM>, the decoder module may employ various techniques to determine a decoded value for a given encoded pixel from the encoded source image. In some implementations, the decoder module uses a matching technique that involves determining a match with the color values of a majority of neighboring pixels. If the colors of a majority of the neighboring pixels of an encoding pixel match the color of the encoding pixel within a specified tolerance, then the encoded pixel is decoded to represent the second binary value (e.g., a value that represents a 'white' pixel in the original encoding image). If the colors of a majority of the neighboring pixels after multiplication by (<NUM> - Ba) match the color of the encoding pixel within the specified tolerance, then the encoded pixel is decoded to represent the first binary value (e.g., a value that represents a "black" pixel in the original encoding image). If no match is determined for either the first or second binary value, then an encoding pixel can be arbitrarily decoded to either the first or second binary value. In other implementations, the decoder module uses a matching technique that involves determining an average color value among the neighboring pixels and comparing the averaged color value of the neighboring pixels to the color value of the target encoding pixel. The specified tolerance may be, for example, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, or <NUM> percent, for example. When the tolerance is <NUM> percent, the decoder module may require an exact match in color values between the encoded pixel and neighboring pixels.

The decoder module repeats operations <NUM>-<NUM> to decode each of the encoded pixels in the selected portion of the encoded source image, and can further use an appropriate mapping template to generate a recovery image such as a watermark image or a reconstruction of the original encoding image based on the decoded values of the pixels. In some implementations, the decoder module repeats stages <NUM> and <NUM> for each of multiple selected portions of the encoded source image and combines the decoding results from each selected portion. Each selected portion corresponds to a different instance of the watermark image overlaid on the source image, thereby adding redundancy and, potentially, reliability to the decoding results.

Finally, referring back to <FIG>, at stage <NUM> the server system uses the decoding information to recover plaintext data. The system uses the plaintext data for various purposes. In some implementations, the plaintext data represents a session ID or a response ID. The server system can query the response records database using the session ID or response ID to lookup source image data and determine, for example, a particular content provider that provided the source image.

<FIG> is a schematic diagram of a computer system <NUM>. The system <NUM> can be used to carry out the operations described in association with any of the computer-implemented methods, systems, devices, and other techniques described previously, according to some implementations. The system <NUM> is intended to include various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The system <NUM> can also include mobile devices, such as personal digital assistants, cellular telephones, smartphones, and other similar computing devices. Additionally the system can include portable storage media, such as, Universal Serial Bus (USB) flash drives. For example, the USB flash drives may store operating systems and other applications. The USB flash drives can include input/output components, such as a wireless transmitter or USB connector that may be inserted into a USB port of another computing device.

The system <NUM> includes a processor <NUM>, a memory <NUM>, a storage device <NUM>, and an input/output device <NUM>. Each of the components <NUM>, <NUM>, <NUM>, and <NUM> are interconnected using a system bus <NUM>. The processor <NUM> is capable of processing instructions for execution within the system <NUM>. The processor may be designed using any of a number of architectures. For example, the processor <NUM> may be a CISC (Complex Instruction Set Computers) processor, a RISC (Reduced Instruction Set Computer) processor, or a MISC (Minimal Instruction Set Computer) processor.

In some implementations, the processor <NUM> is a single-threaded processor. In another implementation, the processor <NUM> is a multi-threaded processor. The processor <NUM> is capable of processing instructions stored in the memory <NUM> or on the storage device <NUM> to display graphical information for a user interface on the input/output device <NUM>.

The features described can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. The apparatus can be implemented in a computer program product tangibly embodied in an information carrier, e.g., in a machine-readable storage device for execution by a programmable processor; and method steps can be performed by a programmable processor executing a program of instructions to perform functions of the described implementations by operating on input data and generating output. The described features can be implemented advantageously in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. A computer program is a set of instructions that can be used, directly or indirectly, in a computer to perform a certain activity or bring about a certain result.

Additionally, such activities can be implemented via touchscreen flat-panel displays and other appropriate mechanisms.

Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), peer-to-peer networks (having ad-hoc or static members), grid computing infrastructures, and the Internet.

While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any inventions or of what may be claimed, but rather as descriptions of features specific to particular implementations of particular inventions.

Claim 1:
A system of one or more computers, comprising:
a front-end server subsystem (<NUM>), including one or more processors, configured to receive a request from a client computer;
a watermark image generator (<NUM>), including one or more processors, that interacts with the front-end server subsystem and is configured to generate a watermark image by performing operations including:
(i) identifying a binary encoding image that encodes a plaintext data item, wherein the binary encoding image includes an arrangement of pixels that are each assigned one of a first color value or a second color value;
(ii) for pixels in the binary encoding image that are assigned the first color value, assigning a first transparency value to corresponding pixels in the watermark image; and
(iii) for pixels in the binary encoding image that are assigned the second color value, assigning a second transparency value to corresponding pixels in the watermark image, wherein the second transparency value differs from the first transparency value;
a response formatter (<NUM>), including one or more processors, configured to generate a response to the request that includes instructions for the client computer to overlay the watermark image on a source image; and
wherein the front-end server subsystem is configured to transmit, to the client computer, the response to the request and the watermark image;
wherein the watermark image includes:
(i) a set of encoded pixels that each corresponds to a respective pixel in the binary encoding image, and
(ii) a set of blank pixels that do not correspond to any pixels in the binary encoding image; and
wherein the watermark image generator generates the watermark image further by spacing the set of encoded pixels among the set of blank pixels such that each encoded pixel in the watermark image neighbors one or more blank pixels in the watermark image.