Smart media overlay selection for a messaging system

A text string provided by a second client device of a second user is received by a first client device of a first user. The text string is parsed into one or more text portions. A score is assigned to each of the one or more text portions based on a specified criterion. One or more relevant tags of a plurality of tags are determined based on the one or more text portions. One or more media overlays are selected based on the one or more relevant tags and the assigned score for each of the one or more text portions. The text string with a reply interface for sending a reply message to the second client device is displayed.

BACKGROUND

Messaging systems provide for the exchange of message content between users. For example, a messaging system allows a user to exchange message content (e.g., text, images) with one or more other users.

DETAILED DESCRIPTION

A messaging system typically allow users to exchange content items (e.g., messages, images and/or video) with one another in a message thread. A messaging system may implement or otherwise work in conjunction with a media overlay system configured to maintain a collection of media overlays for use in messaging between users (e.g., friends). The disclosed embodiments provide for a messaging client to select one or more media overlays that correspond accurately to received and/or input text in a chat. This may be done by parsing the text and determining one or more tags that are relevant to each parsed word and/or phrase within the text. The determined tags can be used to select one or more associated media overlays that are relevant to the text. It is to be understood that while some figures herein use a sticker as an example of a media overlay, any type of media overlay can be used.

Networked Computing Environment

FIG.1is a block diagram showing an example messaging system100for exchanging data (e.g., messages and associated content) over a network. The messaging system100includes multiple instances of a client device102, each of which hosts a number of applications, including a messaging client104and other applications106. Each messaging client104is communicatively coupled to other instances of the messaging client104(e.g., hosted on respective other client devices102), a messaging server system108and third-party servers110via a network112(e.g., the Internet). A messaging client104can also communicate with locally-hosted applications106using Applications Program Interfaces (APIs).

A messaging client104is able to communicate and exchange data with other messaging clients104and with the messaging server system108via the network112. The data exchanged between messaging clients104, and between a messaging client104and the messaging server system108, includes functions (e.g., commands to invoke functions) as well as payload data (e.g., text, audio, video or other multimedia data).

The messaging server system108provides server-side functionality via the network112to a particular messaging client104. While certain functions of the messaging system100are described herein as being performed by either a messaging client104or by the messaging server system108, the location of certain functionality either within the messaging client104or the messaging server system108may be a design choice. For example, it may be technically preferable to initially deploy certain technology and functionality within the messaging server system108but to later migrate this technology and functionality to the messaging client104where a client device102has sufficient processing capacity.

Turning now specifically to the messaging server system108, an Application Program Interface (API) server116is coupled to, and provides a programmatic interface to, application servers114. The application servers114are communicatively coupled to a database server120, which facilitates access to a database126that stores data associated with messages processed by the application servers114. Similarly, a web server128is coupled to the application servers114, and provides web-based interfaces to the application servers114. To this end, the web server128processes incoming network requests over the Hypertext Transfer Protocol (HTTP) and several other related protocols.

The Application Program Interface (API) server116receives and transmits message data (e.g., commands and message payloads) between the client device102and the application servers114. Specifically, the Application Program Interface (API) server116provides a set of interfaces (e.g., routines and protocols) that can be called or queried by the messaging client104in order to invoke functionality of the application servers114. The Application Program Interface (API) server116exposes various functions supported by the application servers114, including account registration, login functionality, the sending of messages, via the application servers114, from a particular messaging client104to another messaging client104, the sending of media files (e.g., images or video) from a messaging client104to a messaging server118, and for possible access by another messaging client104, the settings of a collection of media data (e.g., story), the retrieval of a list of friends of a user of a client device102, the retrieval of such collections, the retrieval of messages and content, the addition and deletion of entities (e.g., friends) to an entity graph (e.g., a social graph), the location of friends within a social graph, and opening an application event (e.g., relating to the messaging client104).

The application servers114host a number of server applications and subsystems, including for example a messaging server118, an image processing server122, and a social network server124. The messaging server118implements a number of message processing technologies and functions, particularly related to the aggregation and other processing of content (e.g., textual and multimedia content) included in messages received from multiple instances of the messaging client104. As will be described in further detail, the text and media content from multiple sources may be aggregated into collections of content (e.g., called stories or galleries). These collections are then made available to the messaging client104. Other processor and memory intensive processing of data may also be performed server-side by the messaging server118, in view of the hardware requirements for such processing.

The application servers114also include an image processing server122that is dedicated to performing various image processing operations, typically with respect to images or video within the payload of a message sent from or received at the messaging server118.

The social network server124supports various social networking functions and services and makes these functions and services available to the messaging server118. To this end, the social network server124maintains and accesses an entity graph308(as shown inFIG.3) within the database126. Examples of functions and services supported by the social network server124include the identification of other users of the messaging system100with which a particular user has relationships or is “following,” and also the identification of other entities and interests of a particular user.

Returning to the messaging client104, features and functions of an external resource (e.g., an application106or applet) are made available to a user via an interface of the messaging client104. In this context, “external” refers to the fact that the application106or applet is external to the messaging client104. The external resource is often provided by a third party but may also be provided by the creator or provider of the messaging client104. The messaging client104receives a user selection of an option to launch or access features of such an external resource. The external resource may be the application106installed on the client device102(e.g., a “native app”), or a small-scale version of the application (e.g., an “applet”) that is hosted on the client device102or remote of the client device102(e.g., on third-party servers110). The small-scale version of the application includes a subset of features and functions of the application (e.g., the full-scale, native version of the application) and is implemented using a markup-language document. In one example, the small-scale version of the application (e.g., an “applet”) is a web-based, markup-language version of the application and is embedded in the messaging client104. In addition to using markup-language documents (e.g., a .*ml file), an applet may incorporate a scripting language (e.g., a .*js file or a .json file) and a style sheet (e.g., a .*ss file).

In response to receiving a user selection of the option to launch or access features of the external resource, the messaging client104determines whether the selected external resource is a web-based external resource or a locally-installed application106. In some cases, applications106that are locally installed on the client device102can be launched independently of and separately from the messaging client104, such as by selecting an icon, corresponding to the application106, on a home screen of the client device102. Small-scale versions of such applications can be launched or accessed via the messaging client104and, in some examples, no or limited portions of the small-scale application can be accessed outside of the messaging client104. The small-scale application can be launched by the messaging client104receiving, from a third-party server110for example, a markup-language document associated with the small-scale application and processing such a document.

In response to determining that the external resource is a locally-installed application106, the messaging client104instructs the client device102to launch the external resource by executing locally-stored code corresponding to the external resource. In response to determining that the external resource is a web-based resource, the messaging client104communicates with the third-party servers110(for example) to obtain a markup-language document corresponding to the selected external resource. The messaging client104then processes the obtained markup-language document to present the web-based external resource within a user interface of the messaging client104.

The messaging client104can notify a user of the client device102, or other users related to such a user (e.g., “friends”), of activity taking place in one or more external resources. For example, the messaging client104can provide participants in a conversation (e.g., a chat session) in the messaging client104with notifications relating to the current or recent use of an external resource by one or more members of a group of users. One or more users can be invited to join in an active external resource or to launch a recently-used but currently inactive (in the group of friends) external resource. The external resource can provide participants in a conversation, each using respective messaging clients104, with the ability to share an item, status, state, or location in an external resource with one or more members of a group of users into a chat session. The shared item may be an interactive chat card with which members of the chat can interact, for example, to launch the corresponding external resource, view specific information within the external resource, or take the member of the chat to a specific location or state within the external resource. Within a given external resource, response messages can be sent to users on the messaging client104. The external resource can selectively include different media items in the responses, based on a current context of the external resource.

The messaging client104can present a list of the available external resources (e.g., applications106or applets) to a user to launch or access a given external resource. This list can be presented in a context-sensitive menu. For example, the icons representing different ones of the application106(or applets) can vary based on how the menu is launched by the user (e.g., from a conversation interface or from a non-conversation interface).

System Architecture

FIG.2is a block diagram illustrating further details regarding the messaging system100, according to some examples. Specifically, the messaging system100is shown to comprise the messaging client104and the application servers114. The messaging system100embodies a number of subsystems, which are supported on the client-side by the messaging client104and on the sever-side by the application servers114. These subsystems include, for example, an ephemeral timer system202, a collection management system204, an augmentation system206, a map system208, a game system210, and/or a media overlay system212.

The ephemeral timer system202is responsible for enforcing the temporary or time-limited access to content by the messaging client104and the messaging server118. The ephemeral timer system202incorporates a number of timers that, based on duration and display parameters associated with a message, or collection of messages (e.g., a story), selectively enable access (e.g., for presentation and display) to messages and associated content via the messaging client104. Further details regarding the operation of the ephemeral timer system202are provided below.

The collection management system204furthermore includes a curation interface214that allows a collection manager to manage and curate a particular collection of content. For example, the curation interface214enables an event organizer to curate a collection of content relating to a specific event (e.g., delete inappropriate content or redundant messages). Additionally, the collection management system204employs machine vision (or image recognition technology) and content rules to automatically curate a content collection. In certain examples, compensation may be paid to a user for the inclusion of user-generated content into a collection. In such cases, the collection management system204operates to automatically make payments to such users for the use of their content.

In some examples, the augmentation system206provides a user-based publication platform that enables users to select a geolocation on a map and upload content associated with the selected geolocation. The user may also specify circumstances under which a particular media overlay should be offered to other users. The augmentation system206generates a media overlay that includes the uploaded content and associates the uploaded content with the selected geolocation.

In other examples, the augmentation system206provides a merchant-based publication platform that enables merchants to select a particular media overlay associated with a geolocation via a bidding process. For example, the augmentation system206associates the media overlay of the highest bidding merchant with a corresponding geolocation for a predefined amount of time.

The map system208provides various geographic location functions, and supports the presentation of map-based media content and messages by the messaging client104. For example, the map system208enables the display of user icons or avatars (e.g., stored in profile data316) on a map to indicate a current or past location of “friends” of a user, as well as media content (e.g., collections of messages including photographs and videos) generated by such friends, within the context of a map. For example, a message posted by a user to the messaging system100from a specific geographic location may be displayed within the context of a map at that particular location to “friends” of a specific user on a map interface of the messaging client104. A user can furthermore share his or her location and status information (e.g., using an appropriate status avatar) with other users of the messaging system100via the messaging client104, with this location and status information being similarly displayed within the context of a map interface of the messaging client104to selected users.

The game system210provides various gaming functions within the context of the messaging client104. The messaging client104provides a game interface providing a list of available games that can be launched by a user within the context of the messaging client104, and played with other users of the messaging system100. The messaging system100further enables a particular user to invite other users to participate in the play of a specific game, by issuing invitations to such other users from the messaging client104. The messaging client104also supports both the voice and text messaging (e.g., chats) within the context of gameplay, provides a leaderboard for the games, and also supports the provision of in-game rewards (e.g., coins and items).

The media overlay system212provides various media overlay functions within the context of the messaging system100. As described herein, a media overlay is a digital image or icon used in messaging. A media overlay may be placed or added (e.g., at a user-defined position) within a message. A media overlay may accompany other content (e.g., text and/or images) within a message. Alternatively, a media overlay may itself correspond to the entirety of a message. In one or more embodiments, the media overlay system212is configured to maintain a collection of media overlays that are available for messaging with respect to the messaging client104. Moreover, the media overlay system212may implement a recommendation system configured to select, from among the collection of available media overlays, a recommended set of media overlays for use in messaging. For example, when viewing a particular media content item (e.g., a message with media content, a Story, etc.) provided by another user, the messaging client104may present the selected set of media overlays within a reply interface. A user may select a media overlay, from among the selected set of media overlays, for including in a reply message to the media content item provided by the other user.

Data Architecture

FIG.3is a schematic diagram illustrating data structures300, which may be stored in the database126of the messaging server system108, according to certain examples. While the content of the database126is shown to comprise a number of tables, it will be appreciated that the data could be stored in other types of data structures (e.g., as an object-oriented database).

The database126includes message data stored within a message table302. This message data includes, for any particular one message, at least message sender data, message recipient (or receiver) data, and a payload. Further details regarding information that may be included in a message, and included within the message data stored in the message table302is described below with reference toFIG.4.

An entity table306stores entity data, and is linked (e.g., referentially) to an entity graph308and profile data316. Entities for which records are maintained within the entity table306may include individuals, corporate entities, organizations, objects, places, events, and so forth. Regardless of entity type, any entity regarding which the messaging server system108stores data may be a recognized entity. Each entity is provided with a unique identifier, as well as an entity type identifier (not shown).

The entity graph308stores information regarding relationships and associations between entities. Such relationships may be social, professional (e.g., work at a common corporation or organization) interested-based or activity-based, merely for example.

The profile data316stores multiple types of profile data about a particular entity. The profile data316may be selectively used and presented to other users of the messaging system100, based on privacy settings specified by a particular entity. Where the entity is an individual, the profile data316includes, for example, a user name, telephone number, address, settings (e.g., notification and privacy settings), as well as a user-selected avatar representation (or collection of such avatar representations). A particular user may then selectively include one or more of these avatar representations within the content of messages communicated via the messaging system100, and on map interfaces displayed by messaging clients104to other users. The collection of avatar representations may include “status avatars,” which present a graphical representation of a status or activity that the user may select to communicate at a particular time.

The database126also stores augmentation data, such as overlays or filters, in an augmentation table310. The augmentation data is associated with and applied to videos (for which data is stored in a video table304) and images (for which data is stored in an image table312).

Another type of filter is a data filter, which may be selectively presented to a sending user by the messaging client104, based on other inputs or information gathered by the client device102during the message creation process. Examples of data filters include current temperature at a specific location, a current speed at which a sending user is traveling, battery life for a client device102, or the current time.

Other augmentation data that may be stored within the image table312includes augmented reality content items (e.g., corresponding to applying Lenses or augmented reality experiences). An augmented reality content item may be a real-time special effect and sound that may be added to an image or a video.

As described above, augmentation data includes augmented reality content items, overlays, image transformations, AR images, and similar terms refer to modifications that may be applied to image data (e.g., videos or images). This includes real-time modifications, which modify an image as it is captured using device sensors (e.g., one or multiple cameras) of a client device102and then displayed on a screen of the client device102with the modifications. This also includes modifications to stored content, such as video clips in a gallery that may be modified. For example, in a client device102with access to multiple augmented reality content items, a user can use a single video clip with multiple augmented reality content items to see how the different augmented reality content items will modify the stored clip. For example, multiple augmented reality content items that apply different pseudorandom movement models can be applied to the same content by selecting different augmented reality content items for the content. Similarly, real-time video capture may be used with an illustrated modification to show how video images currently being captured by sensors of a client device102would modify the captured data. Such data may simply be displayed on the screen and not stored in memory, or the content captured by the device sensors may be recorded and stored in memory with or without the modifications (or both). In some systems, a preview feature can show how different augmented reality content items will look within different windows in a display at the same time. This can, for example, enable multiple windows with different pseudorandom animations to be viewed on a display at the same time.

As mentioned above, the video table304stores video data that, in one example, is associated with messages for which records are maintained within the message table302. Similarly, the image table312stores image data associated with messages for which message data is stored in the entity table306. The entity table306may associate various augmentations from the augmentation table310with various images and videos stored in the image table312and the video table304.

In one or more embodiments, the database126also stores a media overlay table318for storing a collection of media overlays. For example, the media overlay table318stores an indication (e.g., a list) of media overlays available for selection by a user of the messaging client104. As discussed above, the collection of media overlays is maintained by the media overlay system212, with each media overlay corresponding to a digital image or icon. For example, the media overlays stored within the media overlay table318may include one or more of emojis, graphics-based symbols, graphics with words incorporated therein, pictures, animated images, or other types of digital images/icons.

In one or more embodiments, one or more media overlays in the media overlay table318are associated with different attributes (e.g., different moods/expressions). These attributes can be based on one or more tags found in the tag table320. For example, a particular media overlay may be associated with one or more predefined words using metadata labels, designations, and the like that associate with a respective mood/expression. As discussed below, the messaging client104may search the predefined words stored in the media overlay table318to identify one or more media overlays associated with a particular term (e.g., a text-based term).

Data Communications Architecture

FIG.4is a schematic diagram illustrating a structure of a message400, according to some examples, generated by a messaging client104for communication to a further messaging client104or the messaging server118. The content of a particular message400is used to populate the message table302stored within the database126, accessible by the messaging server118. Similarly, the content of a message400is stored in memory as “in-transit” or “in-flight” data of the client device102or the application servers114. A message400is shown to include the following example components:message identifier402: a unique identifier that identifies the message400.message text payload404: text, to be generated by a user via a user interface of the client device102, and that is included in the message400.message image payload406: image data, captured by a camera component of a client device102or retrieved from a memory component of a client device102, and that is included in the message400. Image data for a sent or received message400may be stored in the image table312.message video payload408: video data, captured by a camera component or retrieved from a memory component of the client device102, and that is included in the message400. Video data for a sent or received message400may be stored in the video table304.message audio payload410: audio data, captured by a microphone or retrieved from a memory component of the client device102, and that is included in the message400.message augmentation data412: augmentation data (e.g., filters, media overlays, or other annotations or enhancements) that represents augmentations to be applied to message image payload406, message video payload408, or message audio payload410of the message400. Augmentation data for a sent or received message400may be stored in the augmentation table310.message duration parameter414: parameter value indicating, in seconds, the amount of time for which content of the message (e.g., the message image payload406, message video payload408, message audio payload410) is to be presented or made accessible to a user via the messaging client104.message geolocation parameter416: geolocation data (e.g., latitudinal and longitudinal coordinates) associated with the content payload of the message. Multiple message geolocation parameter416values may be included in the payload, each of these parameter values being associated with respect to content items included in the content (e.g., a specific image into within the message image payload406, or a specific video in the message video payload408).message story identifier418: identifier values identifying one or more content collections (e.g., “stories” identified in the story table314) with which a particular content item in the message image payload406of the message400is associated. For example, multiple images within the message image payload406may each be associated with multiple content collections using identifier values.message tag420: each message400may be tagged with multiple tags, each of which is indicative of the subject matter of content included in the message payload. For example, where a particular image included in the message image payload406depicts an animal (e.g., a lion), a tag value may be included within the message tag420that is indicative of the relevant animal. Tag values may be generated manually, based on user input, or may be automatically generated using, for example, image recognition.message sender identifier422: an identifier (e.g., a messaging system identifier, email address, or device identifier) indicative of a user of the Client device102on which the message400was generated and from which the message400was sent.message receiver identifier424: an identifier (e.g., a messaging system identifier, email address, or device identifier) indicative of a user of the client device102to which the message400is addressed.

The contents (e.g., values) of the various components of message400may be pointers to locations in tables within which content data values are stored. For example, an image value in the message image payload406may be a pointer to (or address of) a location within an image table312. Similarly, values within the message video payload408may point to data stored within a video table304, values stored within the message augmentations412may point to data stored in an augmentation table310, values stored within the message story identifier418may point to data stored in a story table314, and values stored within the message sender identifier422and the message receiver identifier424may point to user records stored within an entity table306.

According to various embodiments, It may be difficult to accurately recommend one or more media overlays that correspond to the text if there are more than a specified number of words (e.g., more than 5 words or more than 8 words). If a media overlay recommendation algorithm can capture message semantics and find the better media overlay more accurately, users may be more likely to click on the button and share a bitmoji media overlay. This may increase the bitmoji media overlay share rate. Embodiments described herein involve ways to analyze the user text and find one or more media overlays that can accurately correspond to the meaning behind text in a chat. This algorithm may mainly include two steps: 1. pre-processing to generate a model; and 2. use and run the model on the client device, e.g., in a C++ library on the client device. The pre-processing step may be at least partially accomplished on the server. In some cases, at least a portion of the pre-processing step is completed on the client device. The media overlay recommendation algorithm may not increase or not substantially increase the application size on the client device. Additionally, the algorithm may not substantially increase the memory usage for the application. For example, the model may be in proto format and may increase the memory usage by about 40 KB.

FIG.5is an interaction diagram illustrating a process500for providing a reply interface with selectable media overlays (e.g., stickers) for sending in a message, in accordance with some example embodiments. For explanatory purposes, the process500is primarily described herein with reference to a first client device502and a second client device504(e.g., each of which may correspond to a respective client device102), and with reference to the media overlay system212. However, one or more blocks (or operations) of the process500may be performed by one or more other components, and/or by other suitable devices. Further for explanatory purposes, the blocks (or operations) of the process500are described herein as occurring in serial, or linearly. However, multiple blocks (or operations) of the process500may occur in parallel or concurrently. In addition, the blocks (or operations) of the process500need not be performed in the order shown and/or one or more blocks (or operations) of the process500need not be performed and/or can be replaced by other operations. The process500may be terminated when its operations are completed. In addition, the process500may correspond to a method, a procedure, an algorithm, etc.

Each of the first client device502and the second client device504may have instances of the messaging client104installed thereon. The first client device502and the second client device504may be associated with a respective first user and second user of the messaging server system108. For example, the first user may be associated with a first user account of the messaging server system108, and the second user may be associated with a second user account of the messaging server system108. As noted above, the first and second users may be identified by the messaging server system108based on unique identifiers (e.g., a messaging system identifier, email address and/or a device identifier) associated with respective user accounts for the first and second users. In addition, the messaging server system108may implement and/or work in conjunction with the social network server122which is configured to identify other users (e.g., friends) with which a particular user has relationships.

As described herein, the messaging client104running on the first client device502is configured to display a reply interface in conjunction with displaying a media content item (e.g., text with or without media content) provided by the second user. The reply interface includes a media overlay selection interface that when activated displays a set of selectable media overlays to the first user. The set of media overlays may be chosen based on the received media content item. In some cases, at least some media overlays of the set of media overlays are ranked with regard to relevancy with the received media content item.

At operation514, the second client device504of the second user sends a media content item to the first client device502. For example, the media content item may correspond to a message (e.g., with or without media content) or a Story (e.g., a collection of media content) that was directly sent by the second user to the first user via the messaging server system108. In another example, the media content item corresponds to a Story broadcast by the second user, and selected for viewing by the first user via the messaging server system108.

At operation516, the first client device502sends a request for a set of media overlays to the media overlay system212. In some cases, the request may be based on the text meeting or exceeding a number of words. For example, the first client device502may send a request for media overlays to the media overlay system based on a determination that the text is at least 5 words or at least 8 words. As noted above, the media overlay system212is configured to maintain a collection of media overlays (e.g., stored in the media overlay table318) that are available for messaging, and/or to implement a recommendation system for selecting set(s) of media overlays for replying to received media content items.

As also noted above, the media overlay system212may correspond to a subsystem of the messaging system100, and may be supported on the client side by the messaging client104(e.g., of the first client device502) and/or on the server side by the application servers114. Thus, in one or more embodiments, the above-mentioned maintaining of the collection of media overlays and/or the recommendation system for selecting set(s) of media overlays may be implemented client side, server side and/or a combination of client side and server side.

At block506, the media overlay system212selects the set of media overlays. In one or more embodiments, the media overlay system212is configured to select a preset number of media overlays from among the collection of available media overlays stored by the media overlay table318. For example, while the collection of available media overlays may include hundreds of media overlays, the media overlay system212may set the preset number of media overlays to 9.

In one or more embodiments, the selected set of media overlays represents a variety of different moods/expressions. As noted above, the media overlay table318may store attributes (e.g., predefined words), corresponding to respective moods/expressions, in association with media overlays. These attributes may be described as tags herein and may be stored in a tag database. In one or more embodiments, the selected set of media overlays may include respective media overlays associated with one or more of the following moods/expressions: love (e.g., where the media overlay is a heart image and/or depicts words such as “love”); laughing (e.g., a laughing face icon and/or words such as “haha!”); an expression that the media content item is exciting (e.g., a fire icon and/or words such as “on fire” or “lit”); approval/applause (e.g., a thumbs up icon, clapping icon and/or words such as “yay!”); shock/awe (e.g., a surprised face icon and/or words such as “wow”); sadness (e.g., a crying/frowning face icon); anger (e.g., an angry face icon). As such, each media overlay in the set of media overlays may be user-selectable for conveying a respective mood/expression for sending in a message to the second client device504(e.g., as a response to the media content item provided by the second user).

The set of media overlays selected by the media overlay system212may correspond to a predefined set of media overlays, for example, that represent the above-mentioned variety of moods/expressions. Thus, in a case where the preset number of media overlays within the set is 9, the media overlay system212may preselect a set of 9 media overlays from among the collection of available media overlays stored in the media overlay table318.

According to various implementations, the set of media overlays selected by the media overlay system212may correspond to a predefined number of media overlays (e.g., 9 media overlays) that are randomly selected set from among the collection of available media overlays (e.g., stored in the media overlay table318). Thus, in response to the request at operation516, the media overlay system212may use a random number generator to select 9 media overlays from among the collection of available media overlays. In one or more embodiments, the media overlay system212may randomly select an individual media overlay from each mood/expression category. For example, for each of 9 mood/expression categories, the media overlay system212may randomly select a corresponding media overlay for that mood/expression (e.g., based on the predefined words stored in the media overlay table318). According to some embodiments, the media overlay system212provides a reference (e.g., a pointer) to the image data for the set of media overlays. At block508, the first client device502displays the media content item, with the reply interface, for generating a reply message to the media content item.

In selecting the set of media overlays, the media overlay system212may calculate respective relevancy scores for media overlays, for example, based on a number or frequency of confirmed matches between the input term and media overlay attributes (e.g., predefined words). The relevancy scores may be used to limit the number of media overlays that are selected (e.g., the 9 media overlays with the highest relevancy scores) and/or for displaying the selected media overlays in ranked order.

At operation518, the media overlay system212sends an indication of a selected set of media overlays to the first client device502. The media overlay system212may also send an indication of the ranking of the media overlays (e.g., based on the relevancy scores), for display of the media overlays in ranked order. Alternatively, in a case where the calculated relevancy scores are below a predefined value (e.g., suggesting that the input term does not appear to match a mood/expression within the collection of media overlays stored in the media overlay table318), the media overlay system212may instead send an indication that the set of media overlays is not be to updated.

In one or more embodiments, the first user at the first client device502may select a media overlay for sending to the second user at the second client device504. In such a case, at block510, the first client device502receives user selection of a media overlay within the set of media overlays (e.g., the updated set of media overlays, or the original set of media overlays in a case when the media overlays were not updated). The user selection may correspond to a predefined gesture (e.g., a tap gesture) for selecting the media overlay.

At operation520, in response to user selection of a media overlay, the first client device502sends a message with the selected media overlay to the second client device504. Moreover, in response to user selection of the media overlay, the first client device502may update the second reply interface, for example, by removing the keyboard interface therefrom.

At block512, the second client device504displays a message including the selected media overlay to the second user. In one or more embodiments, the second client device504displays the received media overlay within a chat interface of the messaging client104, for example, as part of a message thread between the first client device502and the second client device504.

FIG.6illustrates an example user interface600for displaying a media content item together with a reply interface for selecting a media overlay to send in a message, in accordance with some example embodiments. In the example ofFIG.6, the user interface600includes display of a media content item602, a reply interface604which includes interface elements606-614. According to various configurations, the media content item includes text.

The media content item602is displayed by the messaging client104. The media content item602corresponds to a message (e.g., with media content and/or text) or a Story (e.g., a collection of media content). As noted above, in one or more embodiments, the reply interface606is provided for display with the media content item602, for example, in response to a predefined gesture (e.g., a swipe up gesture) performed on the displayed media content item602.

The reply interface606includes an input box610configured for user input. For example, user input may be provided by one or more of: an image capture icon608for capturing an image/video via a device camera for including in a reply message; a media overlay selection icon612for showing a set of media overlays (e.g., all or a portion of available media overlays stored in the media overlay table318; a photo library icon614for selecting an image/video selected from a photo library (e.g., of the client device102); and a keyboard interface616for user input of text within the input box610.

Each media overlay in the set of media overlays is user-selectable for generating/sending a reply message which includes the selected media overlay. The set of media overlays may correspond to a variety of different moods/expressions, and include a predefined number of media overlays. In some cases, the set of media overlays includes all of the media overlays in the media overlay table318. The set of media overlays may be displayed as a carousel interface.

As noted above, the messaging client104is configured to update the set of media overlays in response to text-based terms entered within the input box610. For example, an order of media overlays in the set of media overlays may be updated in response to the input text-based terms of the first and/or second user. In one or more embodiments, the media overlay selection icon612may update to depict a highest-ranked media overlay (e.g., a media overlay with a highest relevancy score, as described above).

FIG.7Aillustrates an example of chat text with a media overlay recommendation that does not accurately correspond with the text702. For the example shown inFIG.7A, the “whatever” media overlay704may not be the best corresponding media overlay to the text702. Media overlays with angry and hateful emotion might be better fit. For example, the media overlay shown inFIG.7Bmight be better to recommend to the user.

FIG.8illustrates a process800for media overlay selection based on input text in accordance with embodiments described herein. In block802, the media overlay system212receives, by a first client device of a first user, a text string provided by a second client device of a second user. According to various configurations, the first user and the second user correspond to contacts within a messaging application running on each of the first client device and the second client device. The text string may include one or both of text and emojis, for example. In block804, the media overlay system212parses the text string into one or more text portions. According to various configurations, the text string is parsed using natural language processing that does not involve machine learning. According to various embodiments, the one or more text portions comprise one or more words. The media overlay system212may be configured to determine one or both of a synonym and an antonym of at least one of the one or more words.

In block806, the media overlay system212assigns a score to each of the one or more parsed text portions based on a specified criterion. The criterion may be based on the word use frequency and/or an amount of emotion associated with the word. The specified criterion may be updated at specified intervals. For example, the specified criterion may be updated daily. The specified criterion may be updated on the client device and/or at a server. In some cases, the specified criterion is updated automatically at the specified intervals.

In block808, the media overlay system212determines one or more relevant tags of a plurality of tags based on the parsed one or more text portions. According to various configurations, each portion of the text string is iteratively scanned to determine the one or more relevant tags.

In block810, the media overlay system212selects one or more media overlays based on the one or more relevant tags and the assigned score for each of the one or more parsed text portions. According to various embodiments, the one or more media overlays correspond to a predefined set of media overlays for displaying in a predefined order. In some cases, each of the one or more tags have an associated score and selecting the one or more media overlays comprises selecting the one or more media overlays based on the associated score of the one or more relevant tags.

In block812, the first client device displays the text string together with a reply interface for sending a reply message to the second device. receiving, According to various configurations, user selection of a media overlay within the one or more media overlays is received via the reply interface. The first client device may provide for transmission of the selected media overlay to the second device.

Although the described flowcharts can show operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be re-arranged. A process is terminated when its operations are completed. A process may correspond to a method, a procedure, an algorithm, etc. The operations of methods may be performed in whole or in part, may be performed in conjunction with some or all of the operations in other methods, and may be performed by any number of different systems, such as the systems described herein, or any portion thereof, such as a processor included in any of the systems.

According to various configurations, each tag in the tag database receives a score based on a level of certainty that a tag can be correctly associated with a media overlay or set of media overlays. In general, there may be certain words and phrases that usually encapsulate the user's intention. The score table may be updated periodically. For example, the score table may be updated daily and/or weekly based on metrics collected by the application. According to various embodiments, the score table uses the UINT8 data type, which costs only about 1 byte per phrase/term.

A sample score table is shown inFIG.9in accordance with embodiments described herein. In general, there may be certain words and phrases that usually encapsulate the user's intention. For example, “I hate you” is a phrase that can highlight lot of emotion may have a score of 7 while a common phrase such as “School bus” may have a score of 2. In some cases, the generation of this model will be done on the server that employ some natural language processing (NLP) capability.

FIGS.10A-10Gshow an example of determining tags for a text string on a client device in accordance with embodiments described herein. In general, all relevant tags are found for a text string. At least a portion of the media overlays in the media overlay table are ranked based on one or both of the associated tags frequency and tag score. As an example, assume we have three tags in the database: Happy1002, Halloween1004, children1006, and “Happy Halloween” as shown inFIG.10A. Here, the tag happy1002is found in the database. In this example, Halloween1004is a possible child of happy1002. This means that Halloween1004is often found after happy1002as a tag phrase. Happy1002does not have any root words in the example and happy1002can be a start of a tag. In some cases, this may also mean that is possible that happy is not the start of one or more tags in the database. The next tag is Halloween1004. In this example, Halloween1004does not have any children. This means that no tags include a word after Halloween1004in a text string. Halloween1004has a root word distance of Happy1002that is one word before Halloween1004. Moving on to the third tag, children1006, has no children and no root word so the root word distance is empty. In this example, the IsTagBeginning indicator is set to true for each of the happy1002, Halloween1004, and children1006tags. Each of these words could be the beginning of a tag.

FIGS.10B-10Gwalk through how to find tags for the example text “Hey children! Happy Halloween!” using a tag database having at least the tags shown inFIG.10A. Of the four words found in the text, happy, Halloween, and children can be found in the tag database. The text is first parsed into individual words. In this example, the text is parsed into hey1008, children1010, happy1012, and Halloween1014. A sliding window technique is used to loop through the list of individual words. A first pointer1016and a second pointer1018start at the first word in the text. In this example, the first parsed word is hey1008. The system determines whether hey1008is found in the tag graph. In this example, hey1008is not found in the graph and therefore there are no associated tags with this word.

Because hey1008is not found in the tag graph at all, the first pointer1016and the second pointer1018move on to the second word in the text string, children1010. The system then determines whether children1010is found in the graph. In this example, children1010is found in the tag graph and can also serve as the beginning of a tag. Because children1010can serve as the beginning of a tag, the first pointer1016remains at the children1010node while the system determines if the children1010is the beginning of a tag phrase.

The second pointer1018moves on to the third word in the text string, happy1012. The system then determines whether happy1012can follow the node children1010. In this example, no tags exist such that happy1012can follow children1010. The first pointer1016moves on to the happy node1012.

It can then be determined whether happy1012can serve as a tag on its own and/or as the beginning of a tag. Similarly to children1010, happy1012is found in the tag graph and can also serve as the beginning of a tag so the second pointer1018moves on to the last word in the text string, Halloween1014, while the first pointer1016remains with the happy1012node. The system moves on to determine whether the last word in the text, Halloween1014can follow happy1012. In this example, a tag exists in the database having the phrase “Happy Halloween.” Therefore, “Happy Halloween” is added to the list of tags associated with the text. The system then moves onto a potential next word in the text as shown inFIG.10G. In this example, there are no more words to consider so the process ends, and any media overlays associated with the tag “Happy Halloween” are presented to the first user in a reply interface.

FIGS.11A-11Eshow another example of determining tags for a text string in accordance with embodiments described herein. In this example, hello1102, world1104, series1106, and baseball1108are found in the tag database. Specifically, hello1102has world1104as a possible child. Hello1102does not have any root words in the example and can serve as the start of a tag phrase. Moving on, world1104has series1106as a child. Series1106has a root word distance from hello1102of one. Moving on to the third tag, series1106has baseball1108as a possible child. Series1106has no root word, so the root word distance is empty. The last tag in the database in this example is baseball1108. Baseball1108has no children and has a root world of world1104with a distance of two. In this example, the IsTagBeginning indicator is set to false for both of the series1106and baseball1108tag portions because neither series1106nor baseball1108serve as the beginning of a tag phrase.

FIGS.11B-11Ewalk through how to find tags for the example text “hello world series baseball” using a tag database having at least the tags shown inFIG.11A. The text can be broken down into the individual words to determine relevant tags. Of the four words found in the text, the phrases “hello world” and “world series baseball” are found in the tag database. The text is first parsed into individual words. In this example, the text is parsed into hello1110, world1112, series1114, and baseball1116. A sliding window technique is used to loop through the list of individual words. A first pointer1118and a second pointer1120start at the first word in the text. In this example, the first parsed word is hello1110. The system determines whether hello1110is found in the tag database. In this example, “hello”1110is found in the database and can serve as the beginning of a tag phrase.

The second pointer1120moves on to the second word in the text string, world1112. The system then determines whether world1112can follow the node hello1110. In this example, the database entry indicates that world1112can follow hello1110as a tag phrase. The database entry also indicates that world1112can be the ending to some phrases. The words hello1110and world1112are extracted as possible tag words and the phrase “hello world” can then be extracted as a potential tag phrase.

The second pointer1120moves on to the third word in the text string, series1114. The system then determines whether series1114can follow the node world1112. In this example, the database entry indicates that series1114can follow world1112as a tag phrase. The word series1114is added to the list of possible tag words and the phrase “hello world” can then be extracted as a potential tag phrase.

The second pointer1120moves on to the fourth word in the text string, baseball1116. The system then determines whether baseball1116can follow the word series1114. In this example, the database entry indicates that baseball1116can follow series1114as a tag phrase. Baseball1116can also be the ending word of some phrases. The system then checks to see if there are any possible phrases that can be extracted out starting from the first word in the potential phrase word list, hello1110. In this example, hello1110is not in the rootWordDistance of the node baseball1116as can be observed from the database entry of baseball1108. Therefore, the system continues to the next word in the potential phrase word list, world1112. In this example, world1112is found in the baseball1116node and the root word distance of two matches the distance between baseball1116and world1112in the example text string. Therefore, the phrase “world series baseball” can be added to the list of tag phrases in the text and used to recommend media overlays with the relevant tag.

While the examples shown inFIGS.10A-11Eillustrate looping through the individual words in sequential order, it is to be understood that this technique can be done in any order.

According to various implementations, the one or more media overlays presented to the user are media overlays that best represent the text.FIG.12Aillustrates a process for ordering media overlays in accordance with embodiments described herein. In block1202, the media overlay system212determines a relevancy score for each media overlay within the one or more media overlays based on one or more relevant tags and an assigned score for each of the one or more parsed media content items. In block1204, the media overlay system ranks the one or more media overlays based on a number of relevant tags associated with each media overlay. In block1206, the media overlay system212orders at least a portion of the one or more media overlays within a reply interface based on the ranking.

According to various configurations, the system finds one or more media overlays that overlap the most tags related to the text string. For example, the text: “What??!! I am MAD like a godzilla” can have the relevant tags: “what”, “mad”, “godzilla”. If the system only selects media overlays associated with the “mad” tag because “mad” has the highest score, the best media overlays may not be presented. The system may rank and/or order media overlays based on the number of overlapping tags. In this example, there is a media overlay that has both “mad” and “godzilla” tags as shown inFIG.12Band this media overlay may be the most relevant first media overlay to present.

According to various configurations, collected metrics may be used to improve media overlay selection over time. In some cases, privacy considerations do not allow to keep a log of any user. Tags associated with a text string can be uploaded to a server and serve to improve the media overlay selection model. Some example metrics that can be helpful include a number of the clicks on a particular emoji icon, denoted as “click rate”. It can be observed whether the smart media overlay selection model can improve that click rate by comparing click rate before implementation of the model and after implementation. Also, the click rate may give insight into to anything changing to the media overlay selection model. Another set of metrics that can be useful includes the tags detected from smart suggest model and the media overlay that the user eventually chooses. This can help to adjust the score of tags to improve the algorithm in the future and it can help to find out what the best and/or most favorable media overlay is for a given tag.

In some cases, if a word in a text string is not present in a tag database, it may be determined whether there are any antonyms and/or synonyms that are present. The first one or more synonyms of a word in the text string that appear in the database may be chosen to represent the word for tag and/or media overlay selection. Some types of words will not have any associated antonyms and/or synonyms. For example, pronouns, proper nouns, being words, auxiliary verbs, conjunctions, prepositions, determiners, and numerals do not have any associated antonyms and/or synonyms.

Time-Based Access Limitation Architecture

FIG.13is a schematic diagram illustrating an access-limiting process1300, in terms of which access to content (e.g., an ephemeral message1302, and associated multimedia payload of data) or a content collection (e.g., an ephemeral message group1304) may be time-limited (e.g., made ephemeral).

An ephemeral message1302is shown to be associated with a message duration parameter1306, the value of which determines an amount of time that the ephemeral message1302will be displayed to a receiving user of the ephemeral message1302by the messaging client104. In one example, an ephemeral message1302is viewable by a receiving user for up to a maximum of 10 seconds, depending on the amount of time that the sending user specifies using the message duration parameter1306.

The ephemeral message1302is shown inFIG.13to be included within an ephemeral message group1304(e.g., a collection of messages in a personal story, or an event story). The ephemeral message group1304has an associated group duration parameter1308, a value of which determines a time duration for which the ephemeral message group1304is presented and accessible to users of the messaging system100. The group duration parameter1308, for example, may be the duration of a music concert, where the ephemeral message group1304is a collection of content pertaining to that concert. Alternatively, a user (either the owning user or a curator user) may specify the value for the group duration parameter1308when performing the setup and creation of the ephemeral message group1304.

Additionally, each ephemeral message1302within the ephemeral message group1304has an associated group participation parameter1312, a value of which determines the duration of time for which the ephemeral message1302will be accessible within the context of the ephemeral message group1304. Accordingly, a particular ephemeral message group1304may “expire” and become inaccessible within the context of the ephemeral message group1304, prior to the ephemeral message group1304itself expiring in terms of the group duration parameter1308. The group duration parameter1308, group participation parameter1312, and message receiver identifier424each provide input to a group timer1314, which operationally determines, firstly, whether a particular ephemeral message1302of the ephemeral message group1304will be displayed to a particular receiving user and, if so, for how long. Note that the ephemeral message group1304is also aware of the identity of the particular receiving user as a result of the message receiver identifier424.

Accordingly, the group timer1314operationally controls the overall lifespan of an associated ephemeral message group1304, as well as an individual ephemeral message1302included in the ephemeral message group1304. In one example, each and every ephemeral message1302within the ephemeral message group1304remains viewable and accessible for a time period specified by the group duration parameter1308. In a further example, a certain ephemeral message1302may expire, within the context of ephemeral message group1304, based on a group participation parameter1312. Note that a message duration parameter1306may still determine the duration of time for which a particular ephemeral message1302is displayed to a receiving user, even within the context of the ephemeral message group1304. Accordingly, the message duration parameter1306determines the duration of time that a particular ephemeral message1302is displayed to a receiving user, regardless of whether the receiving user is viewing that ephemeral message1302inside or outside the context of an ephemeral message group1304.

The ephemeral timer system202may furthermore operationally remove a particular ephemeral message1302from the ephemeral message group1304based on a determination that it has exceeded an associated group participation parameter1312. For example, when a sending user has established a group participation parameter1312of 24 hours from posting, the ephemeral timer system202will remove the relevant ephemeral message1302from the ephemeral message group1304after the specified 24 hours. The ephemeral timer system202also operates to remove an ephemeral message group1304when either the group participation parameter1312for each and every ephemeral message1302within the ephemeral message group1304has expired, or when the ephemeral message group1304itself has expired in terms of the group duration parameter1308.

Responsive to the ephemeral timer system202determining that an ephemeral message group1304has expired (e.g., is no longer accessible), the ephemeral timer system202communicates with the messaging system100(and, for example, specifically the messaging client104) to cause an indicium (e.g., an icon) associated with the relevant ephemeral message group1304to no longer be displayed within a user interface of the messaging client104. Similarly, when the ephemeral timer system202determines that the message duration parameter1306for a particular ephemeral message1302has expired, the ephemeral timer system202causes the messaging client104to no longer display an indicium (e.g., an icon or textual identification) associated with the ephemeral message1302.

Machine Architecture

FIG.14is a diagrammatic representation of the machine1400within which instructions1410(e.g., software, a program, an application, an applet, an app, or other executable code) for causing the machine1400to perform any one or more of the methodologies discussed herein may be executed. For example, the instructions1410may cause the machine1400to execute any one or more of the methods described herein. The instructions1410transform the general, non-programmed machine1400into a particular machine1400programmed to carry out the described and illustrated functions in the manner described. The machine1400may operate as a standalone device or may be coupled (e.g., networked) to other machines. In a networked deployment, the machine1400may operate in the capacity of a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine1400may comprise, but not be limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular telephone, a smartphone, a mobile device, a wearable device (e.g., a smartwatch), a smart home device (e.g., a smart appliance), other smart devices, a web appliance, a network router, a network switch, a network bridge, or any machine capable of executing the instructions1410, sequentially or otherwise, that specify actions to be taken by the machine1400. Further, while only a single machine1400is illustrated, the term “machine” shall also be taken to include a collection of machines that individually or jointly execute the instructions1410to perform any one or more of the methodologies discussed herein. The machine1400, for example, may comprise the client device102or any one of a number of server devices forming part of the messaging server system108. In some examples, the machine1400may also comprise both client and server systems, with certain operations of a particular method or algorithm being performed on the server-side and with certain operations of the particular method or algorithm being performed on the client-side.

The machine1400may include processors1404, memory1406, and input/output I/O components1402, which may be configured to communicate with each other via a bus1440. In an example, the processors1404(e.g., a Central Processing Unit (CPU), a Reduced Instruction Set Computing (RISC) Processor, a Complex Instruction Set Computing (CISC) Processor, a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Radio-Frequency Integrated Circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor1408and a processor1412that execute the instructions1410. The term “processor” is intended to include multi-core processors that may comprise two or more independent processors (sometimes referred to as “cores”) that may execute instructions contemporaneously. AlthoughFIG.14shows multiple processors1404, the machine1400may include a single processor with a single-core, a single processor with multiple cores (e.g., a multi-core processor), multiple processors with a single core, multiple processors with multiples cores, or any combination thereof.

The memory1406includes a main memory1414, a static memory1416, and a storage unit1418, both accessible to the processors1404via the bus1440. The main memory1406, the static memory1416, and storage unit1418store the instructions1410embodying any one or more of the methodologies or functions described herein. The instructions1410may also reside, completely or partially, within the main memory1414, within the static memory1416, within machine-readable medium1420within the storage unit1418, within at least one of the processors1404(e.g., within the Processor's cache memory), or any suitable combination thereof, during execution thereof by the machine1400.

In further examples, the I/O components1402may include biometric components1430, motion components1432, environmental components1434, or position components1436, among a wide array of other components. For example, the biometric components1430include components to detect expressions (e.g., hand expressions, facial expressions, vocal expressions, body gestures, or eye-tracking), measure biosignals (e.g., blood pressure, heart rate, body temperature, perspiration, or brain waves), identify a person (e.g., voice identification, retinal identification, facial identification, fingerprint identification, or electroencephalogram-based identification), and the like. The motion components1432include acceleration sensor components (e.g., accelerometer), gravitation sensor components, rotation sensor components (e.g., gyroscope).

With respect to cameras, the client device102may have a camera system comprising, for example, front cameras on a front surface of the client device102and rear cameras on a rear surface of the client device102. The front cameras may, for example, be used to capture still images and video of a user of the client device102(e.g., “selfies”), which may then be augmented with augmentation data (e.g., filters) described above. The rear cameras may, for example, be used to capture still images and videos in a more traditional camera mode, with these images similarly being augmented with augmentation data. In addition to front and rear cameras, the client device102may also include a 360° camera for capturing 360° photographs and videos.

Communication may be implemented using a wide variety of technologies. The I/O components1402further include communication components1438operable to couple the machine1400to a network1422or devices1424via respective coupling or connections. For example, the communication components1438may include a network interface Component or another suitable device to interface with the network1422. In further examples, the communication components1438may include wired communication components, wireless communication components, cellular communication components, Near Field Communication (NFC) components, Bluetooth® components (e.g., Bluetooth® Low Energy), Wi-Fi® components, and other communication components to provide communication via other modalities. The devices1424may be another machine or any of a wide variety of peripheral devices (e.g., a peripheral device coupled via a USB).

The various memories (e.g., main memory1414, static memory1416, and memory of the processors1404) and storage unit1418may store one or more sets of instructions and data structures (e.g., software) embodying or used by any one or more of the methodologies or functions described herein. These instructions (e.g., the instructions1410), when executed by processors1404, cause various operations to implement the disclosed examples.

The instructions1410may be transmitted or received over the network1422, using a transmission medium, via a network interface device (e.g., a network interface component included in the communication components1438) and using any one of several well-known transfer protocols (e.g., hypertext transfer protocol (HTTP)). Similarly, the instructions1410may be transmitted or received using a transmission medium via a coupling (e.g., a peer-to-peer coupling) to the devices1424.

Software Architecture

FIG.15is a block diagram1500illustrating a software architecture1504, which can be installed on any one or more of the devices described herein. The software architecture1504is supported by hardware such as a machine1502that includes processors1520, memory1526, and I/O components1538. In this example, the software architecture1504can be conceptualized as a stack of layers, where each layer provides a particular functionality. The software architecture1504includes layers such as an operating system1512, libraries1510, frameworks1508, and applications1506. Operationally, the applications1506invoke API calls1550through the software stack and receive messages1552in response to the API calls1550.

The operating system1512manages hardware resources and provides common services. The operating system1512includes, for example, a kernel1514, services1516, and drivers1522. The kernel1514acts as an abstraction layer between the hardware and the other software layers. For example, the kernel1514provides memory management, processor management (e.g., scheduling), component management, networking, and security settings, among other functionality. The services1516can provide other common services for the other software layers. The drivers1522are responsible for controlling or interfacing with the underlying hardware. For instance, the drivers1522can include display drivers, camera drivers, BLUETOOTH® or BLUETOOTH® Low Energy drivers, flash memory drivers, serial communication drivers (e.g., USB drivers), WI-FI® drivers, audio drivers, power management drivers, and so forth.

The libraries1510provide a common low-level infrastructure used by the applications1506. The libraries1510can include system libraries1518(e.g., C standard library) that provide functions such as memory allocation functions, string manipulation functions, mathematic functions, and the like. In addition, the libraries1510can include API libraries1524such as media libraries (e.g., libraries to support presentation and manipulation of various media formats such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), graphics libraries (e.g., an OpenGL framework used to render in two dimensions (2D) and three dimensions (3D) in a graphic content on a display), database libraries (e.g., SQLite to provide various relational database functions), web libraries (e.g., WebKit to provide web browsing functionality), and the like. The libraries1510can also include a wide variety of other libraries1528to provide many other APIs to the applications1506.

The frameworks1508provide a common high-level infrastructure that is used by the applications1506. For example, the frameworks1508provide various graphical user interface (GUI) functions, high-level resource management, and high-level location services. The frameworks1508can provide a broad spectrum of other APIs that can be used by the applications1506, some of which may be specific to a particular operating system or platform.

In an example, the applications1506may include a home application1536, a contacts application1530, a browser application1532, a book reader application1534, a location application1542, a media application1544, a messaging application1546, a game application1548, and a broad assortment of other applications such as a third-party application1540. The applications1506are programs that execute functions defined in the programs. Various programming languages can be employed to create one or more of the applications1506, structured in a variety of manners, such as object-oriented programming languages (e.g., Objective-C, Java, or C++) or procedural programming languages (e.g., C or assembly language). In a specific example, the third-party application1540(e.g., an application developed using the ANDROID™ or IOS™ software development kit (SDK) by an entity other than the vendor of the particular platform) may be mobile software running on a mobile operating system such as IOS™, ANDROID™, WINDOWS® Phone, or another mobile operating system. In this example, the third-party application1540can invoke the API calls1550provided by the operating system1512to facilitate functionality described herein.

Glossary