Patent Description:
However, selecting and providing third-party content to client devices can present risks to data security and unnecessarily utilize network resources. To provide a third-party content item, client devices can send context information to a third-party content provider, which can use the context information to select relevant content items for display on the client device. As a result, to display a relevant content item, at least two network transmissions must occur: one to provide device context information, and another to provide the selected content for the client device. This can subject the client device to data security risks, as the device context information is limited to the overall security of the network as soon as it leaves the device. Transmitting up-to-date device context information frequently to third-party content providers can result in over-utilization of network and computing resources.

The systems and methods discussed herein enable a client device to access its own context information and generate on-device context information, thereby reducing the number of data transmissions to third-party content providers. Unlike other approaches, the systems and methods described herein can utilize on-device content generation and selection models to generate and select content items for display in applications on the client device. By using its own context information, the client device can generate one or more content items for display in real-time without transmitting any context information outside of the client device. Such techniques can reduce overall network utilization, power utilization, and computing resource utilization while increasing overall network system security by eliminating the requirement of sending the data to a third-party content provider. The techniques described herein can also improve the overall privacy of data present on client devices, and the privacy of client devices in general. Furthermore, the techniques described herein can further refine the selection and generation models based on user interaction information with the on-device content items. The invention provides a method and a system as defined in the appended claims.

At least one aspect of the present disclosure is directed to a method for generating on-device content items to improve security, privacy, and network resource utilization. The method can include accessing, by a client device including one or more processors and a memory, a plurality of content resources and a plurality of category information. The client device can access the plurality of interest resources and the plurality of category information, for example, from a data structure in the memory of the client device. The method can include generating, by the client device, a plurality of on-device content items based on the plurality of content resources and the plurality of category information. The method can include receiving, by the client device, from an application executing on the client device, an indication to display a content item. The method can include scanning, by the client device, device context information to create a relevant device context. The method can include selecting, by the client device, a relevant on-device content item from the plurality of on-device content items based on the relevant device context. The method can include providing, by the client device, the relevant on-device content item to the application for display on the client device.

In some implementations, the method can include detecting, by the client device, an interaction event associated with the relevant on-device content item. The method can include identifying, by the client device, interaction information based on the detected interaction event. The method can include transmitting, by the client device, the interaction information to a content provider server. In some implementations, the method can include receiving, by the client device, from the content provider server, additional content based on the interaction information. In some implementations, the method can include receiving, by the client device, from a content provider server, the plurality of content resources and the plurality of category information.

In some implementations, the method can include providing, by the client device, the plurality of content resources and the plurality of category information to a content generation model executing on the client device. The method can include receiving, by the client device, the plurality of on-device content items from an output of the content
generation model. In some implementations, the method can include receiving, by the client device from a content provider server, the content generation model. In some implementations, the method can include providing, by the client device, the relevant device context to a content selection model executing on the client device. The method can include receiving, by the client device, an indication of the relevant on device content item of the plurality of on-device content items from an output of the content selection model.

In some implementations, the method can include receiving, by the client device from a content provider server, the content selection model. In some implementations, the method can include detecting, by the client device, an interaction event associated with the relevant on-device content item. The method can include updating, by the client device, the content generation model based at least one of the relevant context information or the interaction event. In some implementations, the method can include detecting, by the client device, an interaction event associated with the relevant on-device content item. The method can include updating, by the client device, the content selection model based at least one of the relevant context information or the interaction event.

At least one other aspect of the present disclosure is directed to a system including a client device, the client device comprising one or more processors and a memory. The client device can access a plurality of content resources and a plurality of category information from a data structure in the memory of the client device. The client device can generate a plurality of on-device content items based on the plurality of content resources and the plurality of category information. The client device can receive, from an application executing on the client device, an indication to display a content item. The client device can scan device context information to create a relevant device context. The client device can select a relevant on-device content item from the plurality of on-device content items based on the relevant device context. The client device can provide the relevant on-device content item to the application for display on the client device.

In some implementations, the client device can detect an interaction event associated with the relevant on-device content item. The client device can identify interaction information based on the detected interaction event. The client device can transmit the interaction information to a content provider server. In some implementations, the client device can receive, from the content provider server, additional content based on the interaction information. In some implementations, the client device can receive, from a content provider server, the plurality of content resources and the plurality of category information.

In some implementations, the client device can provide the plurality of content resources and the plurality of category information to a content generation model executing on the client device. The client device can receive the plurality of on-device content items from an output of the content generation model. In some implementations, the client device can receive, from a content provider server, the content generation model. In some implementations, the client device can provide the relevant device context to a content selection model executing on the client device. The client device can receive an indication of the relevant on device content item of the plurality of on-device content items from an output of the content selection model.

In some implementations, the client device can receive, from a content provider server, the content selection model. In some implementations, the client device can detect an interaction event associated with the relevant on-device content item. The client device can update the content generation model based on at least one of the relevant context information or the interaction event. In some implementations, the client device can detect, an interaction event associated with the relevant on-device content item. The client device can update the content selection model based on at least one of the relevant context information or the interaction event.

Aspects can be combined and it will be readily appreciated that features described in the context of one aspect of the invention can be combined with other aspects. Aspects can be implemented in any convenient form. For example, by appropriate computer programs, which may be carried on appropriate carrier media (computer readable media), which may be tangible carrier media (e.g. disks) or intangible carrier media (e.g. communications signals). Aspects may also be implemented using suitable apparatus, which may take the form of programmable computers running computer programs arranged to implement the aspect.

Below are detailed descriptions of various concepts related to, and implementations of, methods, apparatuses, and systems of privacy preserving determination of intersection of sets of user identifiers. The various concepts introduced above and discussed in greater detail below may be implemented in any of numerous ways, as the described concepts are not limited to any particular manner of implementation.

Content provider platforms can select and provide relevant content items for presentation on client devices based on client device contextual signals, such as cookies, application usage information, and displayed text, among others. The client device can provide the contextual information to a content provider on a periodic basis, or in real-time to allow the content provider to select and provide content that is relevant to the context of the client device. For example, if the client device is displaying an article about a tropical location, the content provider may provide a content item related to a tropical vacation. In another example, where the client device is located in an area that is close to many restaurants, the content provider may use location information from the client device to provide one or more content items related to food or restaurants. Generally, the relevance of a content item to a particular device context is proportional to the amount of up-to-date context information transmitted to the content provider.

However, client device contextual information, such as device location and on-screen text, can change rapidly. To serve content items that are relevant to the most up-to-date client device context, the client device must transmit or provide contextual information in real-time, on a frequent periodic basis, or each time the client device context changes. This frequent transmission of information, coupled with the transmission of a content item from a content provider, can cause unnecessary computational resource utilization and network bandwidth utilization. Furthermore, transmitting contextual information can compromise the overall security of networking systems, because the client device context may include personal or protected information. When data is transmitted outside of a secure client device, it can become susceptible to man-in-the-middle attacks, data breaches, or other network vulnerabilities.

To address the foregoing issues, the systems and methods of this technical solution are broadly directed to a system for generating content items on a client device. In the event of an interaction with the generated content items, a signal can be provided to the content provider that includes information about the interaction, but may not include the device contextual information. Based on the interaction information, the content provider may select and transmit additional content items to the client device for display. By only transmitting data to the content provider in response to an interaction with generated content, the client device does not need to provide contextual information on a regular basis to the content provider, thereby reducing the overall network utilization of the system without hindering performance. Furthermore, the on-device content items can be generated based on the entire device context in real-time, providing more relevant content without compromising the security of data in the system.

The systems and methods of this technical solution can scan on-screen activities and information, such as interactions and text, along with additional device information to create a client device context. The client device context can be scanned in real-time, on a periodic basis, or only when an on-device content item must be generated. Using the context information of the client device, the systems and methods of this technical solution can generate one or more on-device content items using a content item model. The content item model can include a machine-learning model, a look-up table of strings and category information, or any other type of content selection solution. The on-device content items can be generated to include text, links, images, and videos, among other types of content. After generating the on-device content items using the model, the systems and methods of this technical solution can display the on-device content items on the client device. The client device can select a generated on-device content item for display using, for example, an on-device content selection model. In response to an interaction with the generated on-device content items, the systems and methods can transmit the interaction data from the client device to a content provider computing device, while also updating the content selection model and content generation model based on the interaction data. Thus, without transmitting contextual information to a content provider, the systems and methods of this technical solution can allow a client device to generate and display on-device, context-relevant content items.

Accordingly, the technical solution described herein can thus provide increased computational performance and reduce overall network utilization when compared with other content selection systems. Instead of continuously or periodically transmitting context information from the client device to a content provider server, this technical solution can generate content items using on-device context and transmit data in the event of an interaction. This can reduce the computational load on content provider computing systems, and decrease the overall network traffic between client devices and content providers. Furthermore, by only transmitting interaction data instead of device context information, this technical solution increases the overall security of content selection solutions, because protected or private context information does not leave the client device. Maintaining the context on the client device provides the added benefit of increased privacy, because the client device does not need to share its context with any other party to select relevant content. Thus, the private or protected context information is not susceptible to data breaches or man-in-the-middle attacks, which is an improvement over other content provider systems.

<FIG> depicts a system <NUM> for generating on device content items to improve security, privacy, and network resource utilization. The system <NUM> can include at least one computer network <NUM>. The system <NUM> can include at least one content provider <NUM>. The content provider <NUM> can include at least one stored interaction data <NUM>. The content provider <NUM> can include at least one additional content <NUM>. The system <NUM> can include at least one client device <NUM>. The client device <NUM> can include at least one display <NUM>, at least one content generation model <NUM>, at least one content selection model <NUM>, at least one storage <NUM>, at least one application <NUM>, at least one context scanner <NUM>, at least one content generator <NUM>, and at least one content selector <NUM>. The storage <NUM> can include at least one resources <NUM>, at least one event logs <NUM>, at least one categories <NUM>, and at least one context <NUM>.

Each of the components (e.g., the network <NUM>, the content provider <NUM>, the stored interaction data <NUM>, the additional content <NUM>, the client device <NUM>, the display <NUM> the content generation model <NUM>, the content selection model <NUM>, the storage <NUM>, the resources <NUM>, the event logs <NUM>, the categories <NUM>, the context <NUM>, the application <NUM>, the context scanner <NUM>, the content generator <NUM>, the content selector <NUM>) of the system <NUM> can be implemented using the hardware components or a combination of software with the hardware components of a computing system <NUM> detailed herein in conjunction with <FIG>. For example, the client device <NUM> can include one or more computing devices. The content provider <NUM> can include servers or other computing devices. Each of the components of the client device <NUM> can perform the functionalities detailed herein.

The network <NUM> can include computer networks such as the Internet, local, wide, metro or other area networks, intranets, satellite networks, other computer networks such as voice or data mobile phone communication networks, and combinations thereof. The client device <NUM> of the system <NUM> can communicate via the network <NUM>, for instance with at least one content provider <NUM>. The network <NUM> may be any form of computer network that relays information between the content provider <NUM>, client device <NUM>, and one or more content sources, such as web servers, amongst others. In some implementations, the network <NUM> may include the Internet and/or other types of data networks, such as a local area network (LAN), a wide area network (WAN), a cellular network, a satellite network, or other types of data networks. The network <NUM> may also include any number of computing devices (e.g., computers, servers, routers, network switches, etc.) that are configured to receive and/or transmit data within the network <NUM>. The network <NUM> may further include any number of hardwired and/or wireless connections. The client device may communicate wirelessly (e.g., via WiFi, cellular, radio, etc.) with a transceiver that is hardwired (e.g., via a fiber optic cable, a CAT5 cable, etc.) to other computing devices in the network <NUM>. The client device <NUM> may also communicate wirelessly with the computing devices of the network <NUM> via a proxy device (e.g., a router, network switch, or gateway). The content provider <NUM> may communicate wirelessly (e.g., via WiFi, cellular, radio, etc.) with a transceiver that is hardwired (e.g., via a fiber optic cable, a CAT5 cable, etc.) to other computing devices in the network <NUM>. The content provider <NUM> may also communicate wirelessly with the computing devices of the network <NUM> via a proxy device (e.g., a router, network switch, or gateway).

The client device <NUM> can include at least one processor and a memory, i.e., a processing circuit. The memory stores processor-executable instructions that, when executed by processor, cause the processor to perform one or more of the operations described herein. The processor may include a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), etc., or combinations thereof. The memory may include, but is not limited to, electronic, optical, magnetic, or any other storage or transmission device capable of providing the processor with program instructions. The memory may further include a floppy disk, CD-ROM, DVD, magnetic disk, memory chip, ASIC, FPGA, read-only memory (ROM), random-access memory (RAM), electrically erasable programmable ROM (EEPROM), erasable programmable ROM (EPROM), flash memory, optical media, or any other suitable memory from which the processor can read instructions. The instructions may include code from any suitable computer programming language. The client device <NUM> can include one or more computing devices or servers that can perform various functions.

The content provider <NUM> can include servers or other computing devices operated by a content provider entity to provide content items for display on information resources. The content provided by the content provider <NUM> can include third party content items for display on information resources, such as an information resource that includes primary content, e.g. content provided by the content provider <NUM>. The content items can also be displayed on a search results web page. For instance, the content provider <NUM> can provide or be the source of content items for display in content slots of information resources, such as a web page of a company where the primary content of the web page is provided by the company, or for display on a search results landing page provided by a search engine. The content items associated with the content provider <NUM> can be displayed on information resources other than web pages, such as content displayed as part of the execution of an application on a smartphone or other client device. The functionality of the content provider <NUM> in the context of system <NUM> will be explained below.

The content provider <NUM> can include stored interaction data <NUM> received from one or more client devices <NUM>. The stored interaction data <NUM> can include interaction information, such as timestamps, content type, content categories, resources, and other information about interactions with on-device content items. In some implementations, the stored interaction data <NUM> does not include any identifying information about the client device <NUM>, and does not include any context information from the client device <NUM>. Instead, the stored interaction data <NUM> can include information about generated on-device content items interacted with on the client device <NUM>. The client device <NUM> can transmit, communicate, or otherwise provide the stored interaction data <NUM>. Based on the stored interaction data <NUM>, the content provider can determine additional content <NUM> that can be associated with the on-device content indicated in the stored interaction data <NUM>.

The content provider <NUM> can include additional content <NUM>. The additional content can be associated with one or more interactions or categories, for example the categories <NUM>. Based on the stored interaction data <NUM>, the content provider <NUM> can access the additional content <NUM> to identify and select one or more additional content <NUM> items to transmit, communicate, or otherwise provide to the client device <NUM> for display. The additional content <NUM> can include links, web-pages, images, text, video, or any other type of media. The additional content <NUM> can be associated with one or more keywords, metadata, or other information to facilitate content selection by the content provider <NUM>. In some implementations, based on the stored interaction data <NUM>, the content provider <NUM> can generate one or more additional content <NUM> items for transmission to the client device <NUM>. The content provider <NUM> can transmit to the additional content <NUM> to the client device <NUM>, for example, in response to one or more events. The one or more events can include receiving an indication of an interaction with an on-device content item, receiving information about the content generation model <NUM>, receiving information about the content selection model <NUM>, or receiving a request for additional content from the client device <NUM>.

The content provider <NUM> can provide other information, data, or applications to the client device <NUM>. For example, the content provider <NUM> can provide the resources <NUM>, the categories <NUM>, and other information to the client device <NUM> to facilitate the generation of on-device content items. After receiving this other information, the client device <NUM> can store, update, or otherwise maintain the other information in the memory of the client device <NUM>, for example in one or more data structures in the storage <NUM>. The content provider <NUM> can provide one or more applications, for example the application <NUM>, or scripts to the client device <NUM>. In some implementations, the content provider <NUM> can provide one or more template scripts to the client device <NUM>. The client device <NUM>, or one or of its components (e.g., the content generator <NUM>), can populate the script template to facilitate the generation of on-device content items. The content provider <NUM> can provide one or more models to the client device <NUM>, for example the content generation model <NUM> and the content selection model <NUM>, among others. In response to receiving the one or more models from the content provider <NUM>, the client device <NUM> can store, update, or otherwise maintain the models in the memory of the client device <NUM>, for example in the storage <NUM>.

The storage <NUM> can be a database configured to store and/or maintain any of the information described herein. The storage <NUM> can be stored in any appropriate type and form of data structure, such as an array, flat file, delineated file, or any other type and form of database file. The storage <NUM> can maintain one or more data structures, which can contain and/or index each of the values, pluralities, or thresholds described herein. In some implementations, the storage may be accessed using one or more memory addresses or index values. The storage <NUM> may be accessed by the modules of the client device <NUM>, or the content provider <NUM> via the network <NUM>. In some implementations, the storage <NUM> is internal to the client device <NUM>. In some implementations, the storage <NUM> may exist external to the client device <NUM>, and may be accessed via the network <NUM> or another communications interface. In some implementations, the storage <NUM> may be distributed across many different computer systems or storage elements, and may be accessed via the network <NUM> and/or a suitable computer bus interface. The client device <NUM> can store the results of any or all computations, determinations, selections, identifications, or calculations in one or more data structures indexed appropriate values, each of which may be accessed by the client device <NUM> or the content provider <NUM> to perform any of the functions described herein.

The client device <NUM> can be communicatively coupled to a display <NUM>, which can be a liquid crystal display, active matrix display, light-emitting diode based display (LED), or an organic light-emitting diode display (OLED), among others. The display <NUM> can be configured to display information, for example from an application <NUM> executing on the client device <NUM>, to a user. The display <NUM> can include a touch-sensitive input device, which can be configured to provide one or more indications of input events to the client device <NUM>. The input events can include tap events, swipe events, drag-and-drop events, double-tap events, triple tap events, gesture events, or any other touch input based events or interactions. The display <NUM> can display any information, images, or graphical representations stored in the client device <NUM>, and can display generated or selected on-device content items.

The client device <NUM> can access one or more content resources <NUM> or one or more categories <NUM> from a data structure in the storage <NUM>. The content resources <NUM> can include, for example, text strings, text assets, image information, vector information (e.g., scalable vector graphics information, other graphics or drawing information or instructions, etc.), videos, animated images, and other content that can be included in a generated on-device content item. Each of the content resources <NUM> can include keywords or other identifying metadata. The client device <NUM> can match the metadata to one or more query to lookup terms to access specific content resources <NUM>, or ranges or categories of the content resources <NUM>. The categories <NUM> can include one or more content categories, such as locations, events, objects, interests, or other information relevant to content selection. In some implementations, the categories <NUM> can include a dependency graph, where each category <NUM> can point to one or more other related categories <NUM>. Accessing the content resources <NUM> or the categories <NUM> can include copying, extracting, or moving the data from the storage <NUM> into a different region of computer memory on the client device <NUM>, for example a region of working memory.

The content generator <NUM> can generate one or more on-device content items based on the content resources <NUM> and the categories <NUM>. To generate the on-device content items, the client device <NUM> can iterate through and select each of the resources <NUM>. As described above, each of the resources <NUM> can include keywords, metadata, pointers to related categories <NUM>, or other identifying information. Based on the identifying information, the content generator <NUM> can identify and access each of the categories <NUM> that may be related, similar, or otherwise associated with the selected resources <NUM>. The categories <NUM> can include additional related information that can facilitate content selection, for example keywords, metadata, device information, location information, or any other information to identify or associate the resource with a particular category of interest. For each of the selected resources <NUM>, which can include text strings, images, video, or other media information, the client device <NUM> can associate the category information identified from the categories <NUM>. For example, if the selected resource <NUM> includes information, metadata, keywords, or other information that identifies the selected resource <NUM> as a picture of a tropical beach, the content generator <NUM> can generate an on-device content item that includes the picture and text, for example stating "Hawaiian vacation," or other text that could be related to the picture or resources <NUM>.

The content generator <NUM> can generate the one or more on-device content items by providing the content resources <NUM> and the categories <NUM> to the content generation model <NUM>. In some implementations, the content generator <NUM> can apply one or both of the content resources <NUM> or the categories <NUM> to the input of the content generation model <NUM>. The content generation model <NUM> can include any type of machine learning model (e.g., neural network, convolutional neural network, recurrent neural network, linear regression, sparse vector machine, etc.). The content generation model <NUM> can include multiple layers of weights and biases that are applied to the inputs of the model, for example the indications of the resources <NUM> or the categories <NUM>. The content generation model <NUM> can output one or more indications of a resources, indications of keywords, keywords, or any other information to be included in an on-device content item. The content generation model <NUM> can identify or output associations between the resources <NUM> and the categories <NUM>, and include those associations in the on-device content item. The on-device content item can include one or more scripts, that when activated by an event on the client device <NUM>, can cause the client device to execute instructions to provide interaction information to the content provider <NUM>.

The content generator <NUM> can receive, from the output of the content generation model <NUM>, one or more on-device content items. The on-device content items can include, for example, any number of images, text, resource <NUM>, keywords, content selection, scripts, and computer media, among others. In some implementations, the client device can receive one or more indications of what is to be included in the on-device content items from the content generation model <NUM>. Based on these indications, which can be pointers to locations in the memory (e.g., the storage <NUM>) of the client device <NUM>, the client device <NUM> can access the memory (e.g., the storage <NUM>) to select each of the resources <NUM> and categories <NUM> indicated by the content generation model <NUM>. The content generator <NUM> can package the identified resources <NUM> and categories <NUM> into one or more on-device content items. Thus, based on the output of the content generation model <NUM>, the content generator <NUM> can assemble, package, or otherwise generate on-device content items. After generating the on-device content items, the content generator <NUM> can access the memory (e.g., the storage <NUM>) of the client device <NUM>, and store the generated on-device content items in one or more data structures. The on-device content items can be generated to include metadata, for example metadata associated with one or more selection keywords, context metadata, location information, or any other type of content selection data. The content selection data can be extracted from the resources <NUM>, the categories <NUM>, or from any other data accessed via the client device <NUM>. The content selection data can be included in each generated on-device content item to facilitate selection of content items for display on the client device <NUM>.

The client device <NUM> can execute an application <NUM>, which can include one or more instructions to display content on the display <NUM>. The application <NUM> can include, for example, a web-browser, a game application, or another type of application that executes on the client device. The application <NUM> can provide context information to other components on the client device <NUM> through an API interface, or through other means of communication with the components of the client device <NUM>. For example, the application <NUM> can provide regions of client device <NUM> memory that include device context information to other components of the client device <NUM>. The device context information can include text that is displayed to the user, text that is not displayed to the user, search queries (e.g. including one or more keywords, terms, etc.), historical search queries (e.g. including one or more keywords, terms, etc.), device input or interaction events (e.g., coordinates, associated application, time of interaction or input, frequency of interaction, etc.), time values, time periods of usage in the application or other applications on the device, applications executing or resident on the device, metadata (e.g., keywords, content items, interaction events, historical interaction events, profile information, timestamp information, etc.) associated with applications executing or on the device, web browsing history, interaction history, facial recognition information, biometric information (e.g., fingerprints, eye color, hair color, etc.), regular periods of device use, device charging information (e.g., power levels, battery, regular charging times or seasonalities, etc.), regular periods of device non-use, communication history (e.g., text or SMS message history, call history, video call history, call information, video call information, etc.), and other information that may be used or accessed via the application <NUM>. The application <NUM> can include instructions to display content items, or additional content that may be external to the application <NUM>. The content items can populate one or more content item slots provided by the application <NUM>. The application <NUM> executing on the client device <NUM> can provide one or more indications to the client device <NUM> to display, generate, or select a content item for display in the content slots. In some implementations, the application <NUM> can provide the indication to any one of the components of the client device <NUM>.

The context scanner <NUM> can receive, from the application <NUM> executing on the client device <NUM>, an indication to display a content item. The indication can include dimensions, context information, or a pointer to a region of memory in the client device to place the content item. The indication can include an indication to gather context information to select a particular content item, an indication to display a particular content item (e.g., including an indication of a particular content item in the memory of the client device <NUM>, or an indication of a piece of additional content received from the content provider <NUM>. In some implementations, the indication is a message that is transmitted to other components of the client device <NUM>. The message can include information about the application <NUM>, information about the content item slot, information about the client device <NUM>, or information about a series of user interactions that preceded the request for an on-device content item. The indication can include a request to generate an on-device content item based on information provided by the application <NUM>, include state, information displayed by the application <NUM>, interaction information, query information, input information, or other information provided to or accessed by the application <NUM>.

The context scanner <NUM> can scan the device context <NUM> of the client device <NUM> to create a device context <NUM> data structure in the memory (e.g., storage <NUM>) of the client device <NUM>. In some implementations, the context scanner <NUM> can update the device context in the memory of the client device <NUM> in response to detected changes in the device context. The context scanner <NUM> can access each and every interface, data structure, memory location, or other information associated, stored, or accessed by the client device <NUM> to construct or the device context in the memory (e.g., storage <NUM>) of the client device <NUM>. The context scanner <NUM> can create, update, or otherwise insert on-screen text information, interaction information, input information, past interaction information, past context information, location information, past location information, past on-screen text information, or other device information including device identifiers, device type, screen resolution information, hardware display information, or any other type of information accessible by the client device <NUM> into the device context <NUM>. The context scanner <NUM> can access the event logs <NUM> of the storage <NUM> to access any interaction events, past content item interactions, or other event based information to include in the device context <NUM>. The context scanner <NUM> can associate timestamp values with each entry in the device context <NUM> data structure, where each time stamp indicates the time the entry was created or updated by the context scanner <NUM>. In some implementations, the past information can be updated accordingly to a time threshold value. If the difference between the current device time of the client device <NUM> and the time stamp of an entry in the device context <NUM> exceed the time threshold value, the context scanner <NUM> can update the corresponding entry in the device context <NUM>. In some implementations, the context scanner <NUM> can scan the device to update or maintain the device context <NUM> on a periodic basis, a real-time basis, or when an indication for a request for content is received from the application <NUM>.

The content selector <NUM> can select an on-device content item for display in the application <NUM>. In some implementations, the content selector <NUM> can select an on-device content in response to receiving the indication or request to display a content item from the application <NUM>. In some implementations, the content selector <NUM> can select on-device content for display in the application <NUM> in response to the context scanner <NUM> updating the device context <NUM>. The content selector <NUM> can select on-device content from the on-device content items generated by the content generator <NUM> and stored in the memory (e.g., the storage, etc.) of the client device <NUM>. The content selector <NUM> can access the storage <NUM> to retrieve the device context <NUM>. The content selector <NUM> can use one or more entries in the device context <NUM> to select relevant content items. The content selector <NUM> can match one or more keywords, metadata, or selection information included in the on-device content items to information included in the device context <NUM>. For example, if the device context <NUM> indicates that on-screen text includes the words "tropical," "island," and "vacation," the content selector <NUM> can use those words to search for and select relevant on-device content items for display. Accordingly, the content selector <NUM> may select an on-device content item that includes a picture of a tropical island, along with the caption "Hawaiian Vacation!" for display based on the context information. In another example, the location information in the device context <NUM> may indicate that the client device <NUM> is nearby many restaurants or food establishments. In response, the content selector <NUM> can select content related to food or restaurants. Although only described here in a limited capacity, it should be understood that the content selector can select content based on any of the context information types described herein, based on any of the possible metadata stored by the on-device content items generated by the content generator <NUM>. By selecting the on-device content items based on the device context <NUM>, the content selector can select the most up-to-date and relevant on-device content items for display.

The content selector <NUM> can provide the selected content to the application <NUM> for display in one or more content slots on the display <NUM> of the client device <NUM>. Providing the on-device content item can include copying the on-device content item to a region of memory specified by the application <NUM>, or to another type or region of memory specified by the application <NUM>. After moving or copying the on-device content item data to the region of memory specified by the application <NUM>, the content selector <NUM> can provide the application <NUM> with a signal that indicates the on-device content item is ready for display. The content selector <NUM> can provide a pointer to the location of the on-device content item to the application <NUM>. The application <NUM> can access the location pointed to by the pointer to load the on-device content item into display memory <NUM>, and display the on-device content item in one or more content slots in the application <NUM>. In response to receiving the on-device content item, the application <NUM> can transmit an acknowledgement signal to the other components of the client device <NUM> to indicate that the on-device content item has been displayed. In some implementations, the application <NUM> can record the on-device content item display event in the storage <NUM>, for example in the event logs <NUM>. Accordingly, the application <NUM> can record each time an on-device content item was displayed in the application <NUM>, along with an identifier of the generated content item, an identifier of the application, or other information that can facilitate training of the content selection model <NUM> or content generation model <NUM>.

The content selector <NUM> can provide the device context <NUM> and any other related information to the content selection model <NUM> executing on the client device <NUM>. The content selection model <NUM> can include any type of machine learning model (e.g., neural network, convolutional neural network, recurrent neural network, linear regression, sparse vector machine, etc.). The content selection model <NUM> can include multiple layers of weights and biases that are applied to the inputs of the model, for example the context <NUM> information retrieved from the storage <NUM>. The content selection model <NUM> can output one or more indications of an on-device content item, thereby selecting an on-device content item for display in the application <NUM> of the client device <NUM>. The content selection model <NUM> can identify one or more on-device content items for display in the application <NUM>. In some implementations, the content selection model <NUM> can aggregate or combine one or more on-device content items into a single on-device content item for display in the application <NUM>. For example, the content selection model <NUM> can select several smaller on-device content items that each contain related or common selection information (e.g., keywords, metadata, other association information, etc.) and combine them into a single, larger content item. The content selection model <NUM> can combine the content items in a grid format, or in a list format, where the list can be iterated through based on input events, time based events, or other information. Accordingly, the content selector <NUM> can receive, from the output of the content selection model <NUM>, one or more selected on-device content items, or one or more aggregated selected on-device content items.

The application <NUM> executing on the client device <NUM> can record any or all events, including interaction events, input events, internal application events, operating system events, or other events, in the event logs <NUM> in storage <NUM>. Accordingly, the application <NUM> can detect any or all input or interaction events with any links, on-device content items, or other information in the event logs <NUM>. The application <NUM> can detect an interaction event associated with any of the displayed on-device content item. The interaction event can be a click, a tap, a swipe, or any other type of input described herein directed to the on-device content item displayed in the application <NUM>. In response to the interaction events, the application <NUM> can execute one or more scripts associated with each of the corresponding on-device content items. The scripts can include instructions to provide or transmit information related to the interaction to the content provider <NUM> via the network <NUM>.

The application <NUM>, in response to the detected interaction event, can identify interaction information related to the detected interaction event. The interaction information can include any or all data associated with the corresponding on-device content item, including related keywords, metadata, or other information. The interaction information can further include information about the interaction, for example the time of the interaction, the location on-screen of the interaction, the type of interaction, or any other interaction information described herein. The application <NUM> can record any or all interaction events and related interaction information in the event logs <NUM> of the storage <NUM>. In some implementations, the application can transmit an indication of the detected interaction, along with interaction information to the content provider <NUM> in response to a detected device interaction event. The application <NUM> can record any device context information associated with the interaction event in the event logs <NUM>, so as to facilitate the training of the content generation model <NUM> or the content selection model <NUM>. The application <NUM> can maintain one or more event logs <NUM> in the storage <NUM> in one or more data structures.

In response to a training condition, the client device <NUM> can train the content generation model <NUM> or the content selection model <NUM> based on the contents of the event logs. To facilitate generation and selection of relevant content items, the content generation model <NUM> and the content selection model <NUM> can be updated based on recorded interaction events with generated on-device content items. In this way, the content generation model <NUM> and the content selection model <NUM> can be improved based on input events received by the client device <NUM>. The training condition can be, amongst other things, an indication that the client device <NUM> is charging, a message received from the content provider <NUM> or another external computing device via the network <NUM>, or a request received at an input interface or an application interface of the client device <NUM>. The client device <NUM> can train the models using any appropriate machine learning model training algorithm, including gradient descent, amongst others. Furthermore, the client device can access the interaction events recorded in the event logs <NUM> in batches. The batches can be used, for example, to train each of the content generation model <NUM> and the content selection model <NUM> in a batch process, when the device is not in use. In some implementations, the client device <NUM> can train each of the models in real-time in response to interaction events. In addition to the interaction information, the client device <NUM> can access the device context <NUM> to train the content generation model <NUM> or the content selection model <NUM>. Training can include updating each of the models according to input events, interaction events, information received from the content provider <NUM>, or other such information.

Referring now to <FIG>, depicted is an environment <NUM> illustrating an example diagram of displaying a generated on-device content item in a content slot <NUM> in the application <NUM>. First, the application <NUM> is displayed on the display <NUM> of the client device <NUM>. The application <NUM>, as illustrated in this example implementation, includes a content slot <NUM>, which can be used to display generated on-device content. Although depicted here as a rectangular area in the application <NUM>, it should be understood that the content slot <NUM> can take up any shape, area, or position in the application <NUM>. In some implementations, the content slot <NUM> may be hidden and not displayed on the application <NUM>. In some implementations, the content slot itself will not be displayed until an on-device content item has been provided to the application <NUM>.

Next, the application <NUM> has requested and received an on-device content item <NUM> for display in the content slot <NUM>. The on-device content item can be displayed amongst other information resources in the application <NUM>, and may be inserted into a web-page, application slot, any other type of content slot. The application <NUM> can be configured to detect any or all input events, and record those input events in the memory of the client device <NUM>. The input events can include clicks, taps, swipes, or other input events or actions. If an input event is directed to the on-device content item <NUM>, the application <NUM> can execute one or more scripts to identify interaction information.

The interaction information can include information about the on-device content item, information about the type of interaction, the duration of interaction, or other types of information. In some implementations, an interaction can simply include displaying the on-device content item for a predetermined period of time. In response to the interaction event information, the application <NUM> can provide the interaction information to a content provider, for example the content provider <NUM>. The content provider <NUM> can receive the interaction information. Based on the received interaction information, the content provider <NUM> can select and transmit additional content <NUM> to the application <NUM> executing on the client device <NUM>. The application, in response to receiving the additional content, can display the additional content in the application <NUM>. Although depicted here as the additional content taking up the entire display <NUM> of the client device <NUM>, it should be understood that the additional content <NUM> can include any form of content, and can take up any shape, size, area, or position in the application <NUM>.

In some implementations, the additional content <NUM> can include a script, command, or uniform resource identifier (URI) to launch a different application <NUM>. The additional content <NUM> can include an indication to cause the application <NUM> to navigate to a web-page, or a different menu or state of the application <NUM>. This way, the application <NUM> can facilitate the selection of relevant additional content <NUM> for display on the client device <NUM> from the content provider <NUM> without providing updated device context <NUM> information to the content provider <NUM>. This has the effect of reducing the overall number of network transmissions to the content provider, improving network resource utilization and computing resource utilization. Furthermore, by not allowing the device context <NUM> information to be transmitted on the network, there is a reduced risk that the device context <NUM> information will be subjected to data breaches or man-in-the-middle attacks.

Referring now to <FIG>, illustrated is a block diagram <NUM> depicting the generation of an on-device content item based on context <NUM> information, categories <NUM>, and resources <NUM>. As depicted here, the context <NUM> can include on-screen text <NUM>, user actions <NUM>, past actions <NUM>, location data <NUM>, and device information <NUM>, among others. The categories <NUM> can include a number of strings that indicate certain categories of content, and can include additional metadata and keywords to select content based on each enumerated category. As depicted here in this example illustration, each of the categories <NUM> can be identified by a string value. The resources <NUM> can include both text strings <NUM> and cached images <NUM>. Each of the image data 340A-N (sometimes referred to generally as image data <NUM>) can include any format of video, audio, images, or other content, including JPEG, GIF, PNG, TIFF, MP4, M4V, MKV, and other media formats. Although not illustrated here, each of the image data <NUM> can include associated metadata and keywords, which can facilitate content selection and generation.

The diagram <NUM> illustrates the various parts of an on-device content item <NUM>, and how they can be generated by the content generator <NUM>, and by the content generation model <NUM>. Although this diagram shows on-device content items <NUM> generated using context <NUM>, content categories <NUM>, and content resources <NUM>, it should be understood that on-device content items can be generated, for example by the content generator <NUM> or the content generation model <NUM>, using any combination of these elements, or none of these elements.

As illustrated in the diagram, the on-device content item <NUM> can be generated based on the device context <NUM>, the categories <NUM>, and the resources <NUM>. Each of these items can be accessed, for example, from the storage <NUM> of the client device <NUM>. The categories of content can be chosen or selected based on the context <NUM>. The context information can include on-screen text <NUM>, user actions <NUM>, past actions <NUM>, location data <NUM>, and device information <NUM>. Based on this information, the content generator <NUM> can select relevant categories <NUM>. In this example, the on-screen text includes information about tropical islands and vacations. Accordingly, the content generator <NUM> has selected the "Vacation" and "Tropical" categories. Based on these categories <NUM> and the context <NUM> information, the content generator <NUM> can select relevant resources. In this example, the content generator <NUM> has matched the relevant keywords "Hawaiian vacation" and the image data 140B, which includes keywords or metadata related to the islands, vacations, or tropical locations. The content generator <NUM> can package each of the selected resources into the on-device content item <NUM>, thereby generating the on-device content item.

Referring now to <FIG>, illustrated is a flow chart of an example method <NUM> of generating on-device content items to improve security, privacy, and network resource utilization. The method <NUM> can be performed or otherwise executed by the client device <NUM>, the computer system <NUM> described herein in conjunction with <FIG>, or any other computing devices described herein. A client device (e.g., the client device <NUM>) can access content categories (ACT <NUM>). The client device can access content resources (ACT <NUM>). The client device can generate an on-device content item (ACT <NUM>). The client device can determine whether the counter register j is equal to the number of categories and resources n (DECISION <NUM>). The client device can increment the counter register j. The client device can receive an indication to display content (ACT <NUM>). The client device can scan the device context (ACT <NUM>). The client device can select on-device content (ACT <NUM>). The client device can provide on-device content for display (ACT <NUM>).

The client device (e.g., the client device <NUM>) can access content categories (ACT <NUM>). To generate on-device content items for each of the categories (e.g., the categories <NUM>) stored on the client device, the client device can iteratively loop through each of the content categories based on a counter register j. Each of the content categories can be indexed in a data structure by an index value (e.g., index <NUM>, index <NUM>, index <NUM>, etc.). To process a content category, the client device can select the content category that includes an index value equal to the counter register j. If it is the first iteration of the loop, the counter register j may be initialized to an initialization value (e.g. j = <NUM>) before selecting the j-th content category. Accessing the categories can include copying the data associated with the selected content category to a different region of computer memory, for example a working region of memory.

The client device can access content resources (ACT <NUM>). The content category selected by the client device can be associated with one or more keywords, metadata, location information, or other content selection criteria. To properly identify resources that can be used to generate content relevant to the selected category, the client device can compare the keywords, metadata, location information, or content selection criteria of the selected category to the information in the content resources. The content resources can include text, metadata, and other information to facilitate selection. The content resources can also include images, video, or audio, where each of these non-textual media can be associated with one or more keywords describing the media, or metadata indicating an association with a content category. The client device can identify which of the content resources are relevant to the selected category, and select each of the relevant resources. Selecting the relevant resources can include copying the data associated with the identified resources to a different region of computer memory, for example a working region of memory.

The client device can generate an on-device content item (ACT <NUM>). To generate an on-device content item, the client device can package each of the identified resources into a single content item. In some implementations, the client device can generate a single on-device content item for each of resources selected by the client device based on the selected category. In such implementations, each on-device content item can include one or more text strings, and one or more images. The client device can associate each generated on-device content item with the resources, metadata, keywords, and other content selection information to facilitate content selection. After generating each on-device content item, the client device can store the generated on-device content items in a data structure in the memory of the client device. In some implementations, the client device can associate each of the generated on-device content items with the selected content category. In some implementations, the client device can incorporate a script into the on-device content item. The script can be configured to cause the client device to communicate interaction information to a content provider (e.g., the content provider <NUM>) in response to an interaction with the on-device content item. The interaction information can include information about the on-device content item, such as associated categories, keywords, metadata, and other content selection information, as well as information about the interaction, such as time of interaction, duration of interaction, type of interaction, and other event information. In some implementations, the client device can use a content generation model (e.g., the content generation model <NUM>) to generate content. The client device can provide the selected categories and the selected content resources to the input of the content generation model, and receive the generated on-device content items at the output of the model.

The client device can determine whether the counter register j is equal to the number of categories and resources n (DECISION <NUM>). To determine whether the client device has generated an on-device content item for each of the content resources and the content categories, the client device can compare the counter register used to select each content category to the total number of content categories n. If the counter register j is not equal to (e.g., less than) the total number of content categories n, the client device can execute (ACT <NUM>). If the counter register j is equal to (e.g., equal to or greater than) the total number of content categories n, the client device can execute (ACT <NUM>).

The client device can increment the counter register j. The client device can add one to the counter register j to indicate the next unprocessed categories in the data structure of content categories. In some implementations, the client device can set the counter register j to a memory address value (e.g., location in computer memory) of the next unprocessed content category. In some implementations, the memory address value of the next unprocessed content category can be included in the data structure at the location of the current (e.g., selected) retrieval token. After incrementing the value of the counter register j, the client device can execute (ACT <NUM>) of the method <NUM>.

The client device can receive an indication to display content (ACT <NUM>). The indication can include information, such as dimensions, duration, position, and context information. The client device can receive the indication to display content from an application (e.g., the application <NUM>) executing on the client device. The indication can include additional information such as an identifier corresponding to the application (e.g., the application identifier), and other content item information. In some implementations, the indication to display content can include an indication to display a particular on-device content item. In such implementations, the client device can execute (ACT <NUM>), and skip (ACT <NUM>), because the device context is not needed. Otherwise, the client device can execute (ACT <NUM>).

The client device can scan the device context (ACT <NUM>). Scanning the device context can include gathering data about the applications, services, and operating systems executing on the client device, and storing this information in one or more data structures in the memory of the client device. Scanning the device context can include requesting for information from one or more applications executing on the client device, where each request is for information about each application. The device context can include gathering location information, on-screen text information, off-screen text information, audio information, microphone information, device status information (e.g., battery level, internet connectivity, cellular connectivity, etc.), interaction information, application event information, operating system event information, and other information related to the client device.

The client device can select on-device content (ACT <NUM>). To select one or more on-device content items that are relevant to the device context, the client device can access the device context. Using the accessed device context, the client device can compare the device context information, for example the on-screen text, location information, and other information about the client device, to the one or more generated on-device content items stored in the memory of the client device. If the keywords, metadata, or other content selection information associated with one or more on-device content items match that of the device context, the client device can select those content items. Selecting the content items can include copying the identified content items to a different region of memory, for example a working region of memory on the client device. In some implementations, the client device can select the one or more content items using a content selection model (e.g., the content selection model <NUM>). For example, the client device can provide the device context information to the input of the content selection model.

The client device can provide on-device content for display (ACT <NUM>). Providing the on-device content for display can include providing the one or more selected on-device content items to the application <NUM>. The application can load each of the content items into display memory, and display each of the on-device content items in a respective content item slot. In some implementations, the client device can aggregate more than on-device content item into a single on-device content item, and include the aggregated on-device content item in a single content item slot. The provided on-device content item can be configured to communicate interaction information to a content provider server in response to an interaction with a content item. The client device can receive additional content (e.g., additional content <NUM>) from the server. The additional content can be related to one or more categories associated with the generated on-device content corresponding to the interaction. The additional content can, for example, cause the client device to launch a different application, navigate to a webpage, or otherwise display the additional content in the application executing on the client device.

Referring now to <FIG>, illustrated is a flow chart of an example method <NUM> of updating a content selection model or a content generation model based on interaction information. The method <NUM> can be performed or otherwise executed by the client device <NUM>, the computer system <NUM> described herein in conjunction with <FIG>, or any other computing devices described herein. A client device (e.g., the client device <NUM>) can detect a user action (ACT <NUM>). The client device can determine whether to log the action (DECISION <NUM>). The client device can increment the counter register k (ACT <NUM>). The client device can log the user action (ACT <NUM>). The client device can determine whether the action was a training condition (DECISION <NUM>). The client device can identify a user action from logs (ACT <NUM>). The client device can train models with the action information (ACT <NUM>). The client device can determine whether the counter register k is equal to zero (DECISION <NUM>). The client device can decrement the counter register k (ACT <NUM>). The client device can finish training (ACT <NUM>).

The client device (e.g., the client device <NUM>) can detect a user action (ACT <NUM>). Detecting the user action can include utilizing one or more event listeners in an application (e.g., the application <NUM>) displaying on-device content on the client device. The event listeners can be configured to detect interactions with one or more intractable elements displayed by the application, for example links, buttons, or on-device content items. The event listeners can also detect other device events, for example charging events (e.g., the client device has been plugged in to charge), inactivity events (e.g., inactive for a predetermined period of time, the current device time is within a certain period of the day or night, etc.), temperature events (e.g., the temperature of the device has exceeded a certain value, etc.). The detected action can include information about the type of action, the duration of the action, and any associated links, buttons, objects, or on-device contents items.

The client device can determine whether to log the action (DECISION <NUM>). To determine whether to log the action, the client device can access an internal setting, a user-defined setting, or default profile information. For example, the client device may access one or more data structures in the memory of the client device that include settings or configuration information associated with the client device. The settings can indicate certain types of actions to log, and certain types of actions to ignore. If the settings indicate that interactions with on-device content items should be logged, the client device can determine that it should log all actions (e.g., interactions, etc.) associated with on-device content items. Likewise, if any other types of actions are indicated in the settings as actions that should be logged, the client device can determine that those identified types of actions should be logged. In some implementations, the client device can determine that the absence of an action is relevant to log. For example, the client device may determine that the lack of an interaction with a displayed on-device content item should be logged. In such implementations, the client device can create an "inactivity" action, which describes different parameters about the on-device content item(s) (e.g., duration of display, associated keywords, etc.), and parameters of the inactivity (e.g., durations of inactivity, other detected interactions, if any, etc.). If the client device determines that the detected user action should be logged, the client device can execute (ACT <NUM>). If the client device determines that the detected action should not be logged, the client device can execute (ACT <NUM>).

The client device can increment the counter register k (ACT <NUM>). To log the total number of interactions to use as training data for the content models, the client device can add one to the counter register k to indicate the total count of the logged user actions. In some implementations, the client device can set the counter register k to a memory address value (e.g., location in computer memory) of the next location in memory for logging the user actions, for example in a data structure. If this is the first iteration of this loop, the client device can initialize the counter register k to an initial value, for example zero, before incrementing the counter register. After incrementing the value of the counter register k, the client device can execute (ACT <NUM>) of the method <NUM>.

The client device can log the user action (ACT <NUM>). Logging the user action can include logging any information associated with any detected action, including device information, interaction information (e.g., type of interaction, duration of interaction, content involved in the interaction, frequency of interactions, timestamp of interaction, etc.). The user action can include actions taken by the operating system of the client device or an application executing on the client device. Accordingly, the client device can log any action, interaction, input event, or other type of event as it occurs, along with any information or parameters associated with the event. In some implementations, the client device can generate a data structure in the memory of the client device, and store the events in the data structure. The client device can update the data structure as new events are detected, or otherwise. Logging a user action can include logging if an inactivity event, including parameters about the corresponding on-device content item(s) (e.g., duration of display, associated keywords, etc.), and parameters of the inactivity (e.g., durations of inactivity, other detected interactions, if any, etc.). After logging the user action, the client device can perform (ACT <NUM>) of the method <NUM>. In some implementations, after performing (ACT <NUM>), the client device can perform (ACT <NUM>) of the method <NUM>.

The client device can determine whether the action was a training condition (DECISION <NUM>). A training condition can include an action that indicates the models (e.g., the content generation model <NUM>, the content selection model <NUM>, etc.) stored on the client device can be updated. The training condition can be an action detected by the client device (e.g., a user interaction, an indication that the device is being charged, an application event or automatic action, etc.). To determine whether a detected action is a training condition, the client device can compare the most recently detected action (e.g., by timestamp, etc.) with a training condition configuration setting. The client device can store a training condition configuration setting in the memory of the client device, for example in a data structure. The client device can access the data structure to determine whether the most recently detected action is a training condition. The configuration setting can include one or more rules that indicate whether any of the logged recorded actions include a training condition. If the most recently detected action (or another detected action, as specified by the configuration setting) is not determined to be a training condition, the client device can perform (ACT <NUM>). If the most recently detected action (or another detected action, as specified by the configuration setting) is determined to be a training condition, the client device can perform (ACT <NUM>).

The client device can identify a user action from logs (ACT <NUM>). To train the models stored in the memory of the client device, the client device can identify training data stored in the memory of the client device. The training data can include, for example, interactions detected while displaying an on-device content item or inactivity detected while displaying an on-device content item, among others. To properly train the models, the client device must perform a training algorithm on one or more of the models using the logged actions as an input to the model. Accordingly, the client device can iteratively loop through and identify each of the logged user actions based on the counter register k. Each of the user actions can be indexed in a data structure in the memory of the client device by an index value (e.g., index <NUM>, index <NUM>, index <NUM>, etc.). To access a user action for training, the client device can select the user action that includes an index value equal to the counter register k. The counter register, as established previously in the method <NUM>, can maintain a count of the total number of logged user actions since the last training condition. Identifying the user actions from the logs can include copying the data associated with the identified user actions to a different region of computer memory, for example a working region of memory.

The client device can train models with the action information (ACT <NUM>). Training the models can include performing a training algorithm (e.g., supervised learning, unsupervised learning, reinforcement learning, gradient descent algorithms, etc.). The client device can apply the identified user action, along with information about the device context, other detected actions, timestamps, input information, on-device content information, or other information as feedback into the model. By training the models stored in memory, the client device can facilitate relevant content selection based on additional information about the content items. Training the models based on detected actions can include adjusting the weights, biases, or parameters of the model to facilitate relevant on-device content generation or selection.

The client device can determine whether the counter register k is equal to zero (DECISION <NUM>). To determine whether the client device has trained the models using each of the logged actions, the client device can compare the counter register k used to select each logged action to the value of zero. Once the counter register k is equal to zero, the client device can finish training each model. If the counter register j is not equal to (e.g., greater than) the value of zero, the client device can execute (ACT <NUM>). If the counter register j is equal to (e.g., equal to or less than) the value of zero, the client device can execute (ACT <NUM>).

The client device can decrement the counter register k (ACT <NUM>). To train the content models using each of the actions logged by the client device, the client device can subtract one from the counter register k to indicate the next unprocessed logged user action in the memory of the client device. In some implementations, the client device can set the counter register k to a memory address value (e.g., location in computer memory) of the next unprocessed logged user action. After decrementing the value of the counter register k, the client device can execute (ACT <NUM>) of the method <NUM>.

The client device can finish training (ACT <NUM>). Finishing training can perform one or more actions to reinitialize the models. For example, the changes to the models generated by the training steps can be stored in a different region of memory on the client device, for example non-volatile storage (e.g., the storage <NUM>) of the client device. In some implementations, the client device can transmit a message to the content provider (e.g., the content provider <NUM>) indicating that the client device has performed training on the models. In some implementations, the client device can transmit the changes to the models to the content provider.

<FIG> shows the general architecture of an illustrative computer system <NUM> that may be employed to implement any of the computer systems discussed herein in accordance with some implementations. The computer system <NUM> can be used to provide information via the network <NUM> for display. The computer system <NUM> of <FIG> comprises one or more processors <NUM> communicatively coupled to memory <NUM>, one or more communications interfaces <NUM>, and one or more output devices <NUM> (e.g., one or more display units) and one or more input devices <NUM>. The processors <NUM> can be included in the client device <NUM>.

In the computer system <NUM> of <FIG>, the memory <NUM> may comprise any computer-readable storage media, and may store computer instructions such as processor-executable instructions for implementing the various functionalities described herein for respective systems, as well as any data relating thereto, generated thereby, or received via the communications interface(s) or input device(s) (if present). Referring again to the system <NUM> of <FIG>, the client device <NUM> can include the memory <NUM> to store information related to the sets of user identifiers, the generated vectors, among others. The processor(s) <NUM> shown in <FIG> may be used to execute instructions stored in the memory <NUM> and, in so doing, also may read from or write to the memory various information processed and or generated pursuant to execution of the instructions.

The processor <NUM> of the computer system <NUM> shown in <FIG> also may be communicatively coupled to or control the communications interface(s) <NUM> to transmit or receive various information pursuant to execution of instructions. For example, the communications interface(s) <NUM> may be coupled to a wired or wireless network, bus, or other communication means and may therefore allow the computer system <NUM> to transmit information to or receive information from other devices (e.g., other computer systems). While not shown explicitly in the system of <FIG>, one or more communications interfaces facilitate information flow between the components of the system <NUM>. In some implementations, the communications interface(s) may be configured (e.g., via various hardware components or software components) to provide a website as an access portal to at least some aspects of the computer system <NUM>. Examples of communications interfaces <NUM> include user interfaces (e.g., web pages), through which the user can communicate with the computer system <NUM>.

The output devices <NUM> of the computer system <NUM> shown in <FIG> may be provided, for example, to allow various information to be viewed or otherwise perceived in connection with execution of the instructions. The input device(s) <NUM> may be provided, for example, to allow a user to make manual adjustments, make selections, enter data, or interact in any of a variety of manners with the processor during execution of the instructions. Additional information relating to a general computer system architecture that may be employed for various systems discussed herein is provided further herein.

Implementations of the subject matter and the operations described in this specification can be implemented in digital electronic circuitry, or in computer software embodied on a tangible medium, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Implementations of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more components of computer program instructions, encoded on computer storage medium for execution by, or to control the operation of, data processing apparatus. The program instructions can be encoded on an artificially-generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. Moreover, while a computer storage medium is not a propagated signal, a computer storage medium can include a source or destination of computer program instructions encoded in an artificially-generated propagated signal.

The features disclosed herein may be implemented on a smart television module (or connected television module, hybrid television module, etc.), which may include a processing module configured to integrate internet connectivity with more traditional television programming sources (e.g., received via cable, satellite, over-the-air, or other signals). The smart television module may be physically incorporated into a television set or may include a separate device such as a set-top box, Blu-ray or other digital media player, game console, hotel television system, and other companion device. A smart television module may be configured to allow viewers to search and find videos, movies, photos and other content on the web, on a local cable TV channel, on a satellite TV channel, or stored on a local hard drive. A set-top box (STB) or set-top unit (STU) may include an information appliance device that may contain a tuner and connect to a television set and an external source of signal, turning the signal into content which is then displayed on the television screen or other display device. A smart television module may be configured to provide a home screen or top level screen including icons for a plurality of different applications, such as a web browser and a plurality of streaming media services, a connected cable or satellite media source, other web "channels", etc. The smart television module may further be configured to provide an electronic programming guide to the user. A companion application to the smart television module may be operable on a mobile computing device to provide additional information about available programs to a user, to allow the user to control the smart television module, etc. In alternate implementations, the features may be implemented on a laptop computer or other personal computer, a smartphone, other mobile phone, handheld computer, a tablet PC, or other computing device.

The terms "data processing apparatus", "data processing system", "user device", "client device", or "computing device" encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, a system on a chip, or multiple ones, or combinations, of the foregoing.

The processes and logic flows can also be performed by, and apparatuses can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

The elements of a computer include a processor for performing actions in accordance with instructions and one or more memory devices for storing instructions and data. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), for example.

To provide for interaction with a user, implementations of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube), plasma, or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can include any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input.

The computing system such as the client device <NUM> can include clients and servers. For example, the client device <NUM> can include one or more servers in one or more data centers or server farms. In some implementations, a server transmits data (e.g., an HTML page) to a client device (e.g., for purposes of displaying data to and receiving user input from a user interacting with the client device).

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 the systems and methods described herein.

For example, the client device <NUM> could be a single module, a logic device having one or more processing modules, one or more servers, or part of a search engine.

Having now described some illustrative implementations and implementations, it is apparent that the foregoing is illustrative and not limiting, having been presented by way of example. In particular, although many of the examples presented herein involve specific combinations of method acts or system elements, those acts and those elements may be combined in other ways to accomplish the same objectives. Acts, elements and features discussed only in connection with one implementation are not intended to be excluded from a similar role in other implementations or implementations.

Any implementation disclosed herein may be combined with any other implementation, and references to "an implementation," "some implementations," "an alternate implementation," "various implementation," "one implementation" or the like are not necessarily mutually exclusive and are intended to indicate that a particular feature, structure, or characteristic described in connection with the implementation may be included in at least one implementation. Such terms as used herein are not necessarily all referring to the same implementation. Any implementation may be combined with any other implementation, inclusively or exclusively, in any manner consistent with the aspects and implementations disclosed herein.

References to "or" may be construed as inclusive so that any terms described using "or" may indicate any of a single, more than one, and all of the described terms.

Where technical features in the drawings, detailed description or any claim are followed by reference signs, the reference signs have been included for the sole purpose of increasing the intelligibility of the drawings, detailed description, and claims.

Claim 1:
A method for generating on-device content items to improve security, privacy, and network resource utilization, comprising:
accessing, by a client device including one or more processors and a memory, a plurality of content resources and a plurality of category information from a data structure in the memory of the client device;
generating, by the client device, a plurality of on-device content items based on the plurality of content resources and the plurality of category information;
receiving, by the client device, from an application executing on the client device, an indication to display a content item;
scanning, by the client device, device context information to create a relevant device context;
selecting, by the client device, a relevant on-device content item from the plurality of on-device content items based on the relevant device context; and
providing, by the client device, the relevant on-device content item to the application for display on the client device;
wherein generating the plurality of on-device content items further comprises:
providing, by the client device, the plurality of content resources and the plurality of category information to a content generation model executing on the client device; and
receiving, by the client device, the plurality of on-device content items from an output of the content generation model.