Automated graphical image modification scaling based on rules

Aspects of the present disclosure involve systems and methods for performing operations comprising receiving, with a messaging application, user input to access a graphical image modification feature of the messaging application; in response to receiving, causing display of a video; accessing a first configuration rule of a plurality of configuration rules that associates a first device property rule with the graphical image modification feature of the messaging application; determining that the first configuration rule is satisfied by a first property of the client device; and in response to determining that the first configuration rule is satisfied by the first property of the client device, causing display of a first plurality of graphical image modification options each associated with performing a different modification to the video.

TECHNICAL FIELD

The present disclosure relates generally to graphical image modification features in messaging applications.

BACKGROUND

As consumption of content on mobile devices continues to grow, application developers seek new ways to engage users. Application developers constantly release new versions of their applications that have additional features to keep their users interested. Application developers, though, often fail to consider the capabilities of the hardware devices used to run the applications, which can negatively impact the new application releases.

DETAILED DESCRIPTION

Typically, application developers release new versions of their applications to add, remove, or modify features of their applications. In developing new versions of the applications, though, the application developers do not always consider the impact of the features on the underlying hardware. Specifically, features added to new application versions grow in complexity at a faster rate than the hardware capabilities of the devices on which the applications run. As a result, when the new versions of the applications are released, the devices running the new versions can often experience severe lag and over-consumption of resources, such as faster battery drain. This not only negatively impacts how the new version of the application runs on the device but also negatively impacts other applications that are running on the device. This results in a poor user experience and unnecessary waste of resources.

One particular feature that is known to consume a great deal of device resources is a graphical image modification function. Such a function is typically used to add virtual graphical elements to an image on a client device. Various types of graphical elements are typically available to choose from. However, different types of the graphical elements that are available can consume varying amounts of device resources. As such, because typically all of the graphical elements are made available for selection, regardless of their underlying resource consumption, this results in over-consumption of the device resources and poor functioning, or worse, crashes of the graphical image modification function. This often frustrates users and drives them away completely from using this functionality.

The disclosed embodiments improve the efficiency and functioning of client-side electronic devices by automatically scaling graphical image modification functions of a messaging application based on resources of respective devices, e.g., based on determining whether device resources consumed by the graphical image modification function exceed the underlying capabilities of a device. In particular, the graphical image modification function is dynamically scalable, to provide different sets of graphical image modification options, responsive to changes in one or more device properties. Specifically, the disclosed embodiments receive, with a messaging application, user input to access a graphical image modification feature of the messaging application on a client device and, in response, cause display of a video captured by an image capture device of the client device. The disclosed embodiments access a first configuration rule of a plurality of configuration rules that associates a first device property rule with the graphical image modification feature and, in response to determining that the first configuration rule is satisfied by a first property of the client device, cause display of a first plurality of graphical image modification options each associated with performing a different modification to the video captured by the image capture device. If the first configuration rule is not satisfied by the first property of the client device, a second plurality of graphical image modification options are displayed instead of the first plurality of graphical image modification options.

In this way, options of the graphical image modification feature of the messaging application that do not satisfy configuration rules associated with the graphical image modification feature, thereby indicating that the options exceed or unduly tax capabilities of the device, are not made available for selection. This prevents the need to disable the graphical image modification feature in its entirety, or to make options of the graphical image modification feature available that unduly burden the device. In this way, the user is able to still enjoy the functions of the graphical image modification feature in different ways depending on the capabilities of their devices. This increases the efficiency of running the messaging application on the device without wasting resources or degrading the overall user experience. This allows the messaging application to provide the graphical image modification feature with selective sets of graphical image modification options on the device without overly burdening the memory, bandwidth, and processing resources of the device.

FIG. 1is a block diagram showing an example messaging system100for exchanging data (e.g., messages and associated content) over a network106. The messaging system100includes multiple client devices102, each of which hosts a number of applications, including a messaging client application104. Each messaging client application104is communicatively coupled to other instances of the messaging client application104and a messaging server system108via the network106(e.g., the Internet).

Accordingly, each messaging client application104is able to communicate and exchange data with another messaging client application104and with the messaging server system108via the network106. The data exchanged between messaging client applications104and between a messaging client application104and the messaging server system108includes functions (e.g., commands to invoke functions) as well as payload data (e.g., text, audio, video, or other multimedia data).

The messaging client application104includes multiple features, one or more of which are scalable, by which is meant that such a feature is operable in a plurality of different alternative complexity levels. For example, the messaging client application104can include a scalable maps-based graphical user interface feature that allows a user to see where his/her contacts or friends are geographically located in a graphical map-based interface. The messaging client application104can include a scalable messaging feature allowing a user to exchange messages with one or more friends. The messaging client application104can include a scalable games feature allowing a user to play games via the messaging client application104with one or more friends on the messaging client application104. The messaging client application104can include a scalable memories feature in which images and videos captured by the user using a camera-enabled device running the messaging client application104are stored. The messaging client application104can include a scalable discover feature allowing the user to access a graphical user interface in which content, such as videos and images, that other users of the messaging client application104, which are friends or not friends of the user, captured, submitted, and posted. The messaging client application104can include a scalable friends feed feature which shows a user a chronologically-arranged list of status updates, images, videos, and content generated and associated with the user's friends. The messaging client application104can include a scalable image recognition feature that processes a real-time or stored video or image to identify and recognize objects depicted in the video or image.

The messaging client application104can include a scalable avatar feature which allows a user to create an animated avatar representation of the user to be shared with the user's friends and to view avatar representations of the user's friends on the messaging client application104in any of the graphical user interfaces of the messaging client application104, such as in the map-based graphical user interface. The messaging client application104can include a scalable graphical image modification feature (e.g., lens feature) allowing the user to overlay two-dimensional (2D) or three-dimensional (3D) graphical virtual objects (such as filters or geographically-relevant content) that are static or animated onto a scene depicted in real-time or stored images or videos that are/were captured by a camera-enabled device running the messaging client application104. The messaging client application104can include a scalable video encoding or decoding feature allowing a user device to capture and store a video in one or more formats and/or transcode a previously captured video. The messaging client application104can include a scalable encryption feature allowing a user to encrypt/decrypt messages or content exchanged using the messaging client application104with one or more other users. The messaging client application104can include a scalable backup feature which automatically stores copies, on a server, of content the messaging client application104captured using the device running the messaging client application104.

Any one or combination of these and other features discussed above and below of the messaging client application104may be installed and integrated in the messaging client application104to operate at a predetermined complexity level (e.g., the lowest complexity level) when the messaging client application104is initially downloaded and installed on the client device102. In an embodiment, certain ones of the scalable features of the messaging client application104, even though they are installed with the messaging client application104on the client device102, are set to operate at the lowest complexity level by default. This means that when the messaging client application104runs or is launched and executed on the client device102, the features operate at the lowest complexity level thereby having minimal resource requirements or computational loads that do not exceed the capabilities or capacity of the device. In such cases, options to access enhancements (e.g., animations, different sets of graphical elements for overlaying a real-time video feed, and so forth) associated with higher complexity levels of the features (having greater resource requirements or computational loads that do exceed, or may end up exceeding, the capabilities or capacity of the device) are prevented from being displayed or made available in any graphical user interface of the messaging client application104.

In some embodiments, the messaging client application104is downloaded and installed on the client device102only with those features that are set to operate at the lowest alternative or selectable complexity level by default. When a feature is requested or is needed to be operated at a higher complexity level at some later point in time, the feature is scaled up to set to operate at the higher complexity level, such as by downloading additional operations and functions implementing the higher complexity level from the server and integrated into the messaging client application104. For example, the messaging client application104may be downloaded and installed with code for its various features to operate at the lowest alternative or selectable complexity level. At some later point, a given one of the features of the messaging application can be scaled up by downloading code for operating the feature at the higher complexity level, the code to supplement and/or replace the previously installed code for operating the feature at the lowest alternative or selectable complexity level. In alternate embodiments, code for operating the feature at all of the alternative complexity levels is downloaded and installed with the installation of the messaging client application104. In such cases, the messaging client application104is instructed to select only one of the code segments to operate the feature at a given alternative complexity level.

Any one or a combination of these and other scalable features discussed above and below of the messaging client application104may operate on the client device102at one or more different selectable or alternative complexity levels. Each complexity level allows the feature to provide a particular functionality with certain different enhancements. For example, a scalable graphical image modification feature operating at a first complexity level that is greater than (e.g., being more complex than and/or consuming greater on-device resource capacities during implementation) a second complexity level may provide a first plurality of graphical image modification options available for selection. However, when the scalable graphical image modification feature operates at the second, lower complexity level, the graphical image modification feature provides a second plurality of graphical image modification options available for selection. In an embodiment, the first plurality of graphical image modification options allows a user to add, to a stored or real-time video feed that is displayed, one or more animated, 3D, and/or graphical elements that rely on and use motion information (e.g., GPS and/or accelerometer information) of the client device. In an embodiment, the second plurality of graphical image modification options allows a user to add, to a stored or real-time video feed that is displayed, one or more static, 3D and/or 2D graphical elements.

In some embodiments, when the scalable graphical image modification feature operates at the second, lower complexity level, the graphical image modification feature presents the first plurality of graphical image modification options available for selection by a user. The first plurality of graphical image modification options may include the same set of graphical image modification options that was provided when the scalable graphical image modification feature operates at the first complexity level. However, while operating at the second complexity level, functionality of some, but not all, of the graphical image modification options may be disabled or modified. In this way, the user sees the same set of graphical image modification options presented regardless of whether the configuration rule is satisfied and regardless of whether the feature operates at the higher or lower complexity level. But, functionality of some of the options changes depending on whether the feature operates at the higher or lower complexity level. This provides minimal disruption to the user and the user may not even notice that the functionality has changed when the complexity level changes and/or the configuration rule is or is not satisfied.

As an example, a first user device may include a property that satisfies a configuration rule and a second user device may include a property that fails to satisfy the configuration rule. Five graphical image modification options may be presented to users of both the first and the second user devices. The scalable graphical image modification feature may determine that 2 of the options may include high complexity operations and a remaining 3 of the options may include low complexity operations. Accordingly, the first user device may allow a user to select any one of the five options and perform the high complexity operations when one of the 2 options is selected. The second user device may also allow the user to select any one of the five options, but if the user selects one of the 2 options that include the high complexity operations, only a subset, revised and/or down scaled functionality (that only includes low complexity operations) may be performed. In this way, the user of the first user device may see and experience a first set of image modification results when the first user selects one of the 2 options and the user of the second user device may see and experience a second set of image modification results (e.g., a down scaled version of the first set of image modification results) when the first user selects the same one of the 2 options. Specifically, the selected one of the 2 options may correspond to presentation of a 3D animated virtual object. In such cases, the 3D animated virtual object may be presented to the first user at the first user device at a full frame rate, a first set of movements, a first set of colors, and/or with sound effects and the same 3D animated virtual object may be presented to the second user at the second user device at a reduced frame rate, a second set of movements, a second set of colors, and/or with different or no sound effects.

As referred to herein. “complexity level” (or level of complexity) represents the relative amount of processing and device resources (e.g., network bandwidth, processor operations, memory operations, battery consumption, and so forth) consumed by a set of operations and functions that implement a given function or a feature of the messaging client application104. The set of operations and functions that implement the given function or feature may consume more hardware and software resources of the client device102or less depending on the complexity level. For example, a given client device102may have a graphics accelerator available that drains the battery of the client device102very quickly. A feature operating at a high complexity level may include a set of operations and functions that use the graphics accelerator to implement the functions of the feature (e.g., to provide real-time enhancements to a video feed). The same feature operating at a lower complexity level may include a different set of operations and functions that implement the functions of the feature using a general purpose processor rather than the hardware accelerator. The same feature operating at the lower complexity level may thereby consume less of the battery resource at the cost of lower quality real-time enhancements of the video feed than were the feature to operate at the higher complexity level. Namely, operating the feature at the high complexity level may allow the feature to present a first set of graphical elements on a real-time video feed (e.g., elements that include animation and use gyroscopic and position sensors of the client device102) and operating the feature at the lower complexity level may allow the feature to present a different second set of graphical elements (e.g., that include static images and do not rely on gyroscopic and position sensors of the client device102) on the real-time video feed.

In some embodiments, the messaging client application104communicates with an automatic graphical image modification scaling system124to identify which graphical image modification options to enable or disable and/or to select the complexity level at which the graphical image modification options operate. This may be performed in response to the messaging client application104receiving a user request to access a live or stored video feed captured by an image capture device (e.g., a front-facing or rear-facing camera) of the client device102. The automatic graphical image modification scaling system124utilizes a set of configuration rules to identify which graphical image modification options, if any, to enable or disable and/or to select the complexity level at which the graphical image modification options are to operate. In an embodiment, the automatic graphical image modification scaling system124receives an identifier of the client device102on which the messaging client application104is implemented. The automatic graphical image modification scaling system124uses the identifier to retrieve a set of configuration rules associated with the client device102. Specifically, the automatic graphical image modification scaling system124can determine one or more properties of the client device102, such as a device type, available memory storage space, current battery level, disk level attributes, operating system version, messaging client application104version, processor type, or any other hardware capability of the client device102using the identifier. In an embodiment, the automatic graphical image modification scaling system124searches a database to retrieve the set of configuration rules associated with the identifier.

In an embodiment, the automatic graphical image modification scaling system124selects a particular set of graphical image modification options of the messaging client application104that is enabled or disabled currently on the messaging client application104that is running or installed on the client device102. The automatic graphical image modification scaling system124identifies a set of configuration rules or just one configuration rule that is associated with the particular set of options. In cases where multiple configuration rules are associated with the particular set of options, the automatic graphical image modification scaling system124uses a prioritization or ranking technique to select only one of the multiple configuration rules. Once the configuration rule is selected, the automatic graphical image modification scaling system124obtains one or more device property rules and/or one or more user information rules specified in the configuration rule. For example, the configuration rule can specify a particular Boolean, scalar, or complex construct expression that logically or otherwise combines the one or more device property rules and/or one or more user information rules. The automatic graphical image modification scaling system124evaluates whether the configuration rule is satisfied (e.g., the expression of the rule is determined to be TRUE) or not satisfied (e.g., the expression of the rule is determined to be FALSE) using device properties and/or user information of the client device102.

In some embodiments, the messaging client application104communicates with the automatic graphical image modification scaling system124to identify and select a complexity level at which one or more graphical image modification options of the messaging client application104will operate. The automatic graphical image modification scaling system124utilizes a set of configuration rules to identify the complexity level of the graphical image modification options. In an embodiment, the automatic graphical image modification scaling system124receives an identifier of the client device102on which the messaging client application104is implemented. The automatic graphical image modification scaling system124uses the identifier to retrieve a set of configuration rules associated with the client device102. Specifically, the automatic graphical image modification scaling system124can determine one or more properties of the client device102, such as a device type, available memory storage space, current battery level, disk level attributes, operating system version, messaging client application104version, processor type, or any other hardware capability of the client device102using the identifier. In an embodiment, the automatic graphical image modification scaling system124searches a database to retrieve the set of configuration rules associated with the identifier. The automatic graphical image modification scaling system124selects a complexity level of multiple complexity levels for operating a particular set of graphical image modification options of the messaging client application104.

In some embodiments, the automatic graphical image modification scaling system124communicates a portion of the configuration rule (e.g., a given portion of the expression of the rule) to be evaluated by the client device102. In this way, some information that is available only to the client device102and is not available to the automatic graphical image modification scaling system124and is included in the configuration rule can be used to determine if the rule is satisfied. Namely, a first portion of the configuration rule can be evaluated by the automatic graphical image modification scaling system124and a second portion of the same configuration rule can be evaluated by the client device102. The client device102can transmit the results of the evaluation of the second portion of the configuration rule to the automatic graphical image modification scaling system124to be combined with the results of the evaluation of the first portion. For example, the automatic graphical image modification scaling system124does not have access to information such as the amount of free memory, current battery level, or the currently available bandwidth of the client device102but does have information indicating the processor speed and type of the client device102. Namely, certain information about the client device102remains physically unchangeable and so can be stored on the automatic graphical image modification scaling system124for access independently of the client device102. Other information dynamically changes throughout the life of the device, such as the currently available bandwidth or battery level, current geographical location, and so when such information is included in the configuration rule parameters, the client device102needs to be involved in evaluating that portion of the configuration rule.

In some embodiments, as part of having the client device102evaluate a rule, the automatic graphical image modification scaling system124transmits a benchmark associated with the rule that represents functionality of the one or more operations of the graphical image modification options associated with the rule. The client device102can run the benchmark by executing code included in the benchmark and provide performance results to the automatic graphical image modification scaling system124of how the client device102ran the benchmark. The automatic graphical image modification scaling system124can then use the performance results to evaluate parameters of the configuration rule. This way, before a set of graphical image modification options of the messaging client application104is enabled on the client device102and operates at a particular complexity level, the benchmark representing operations of the set of graphical image modification options can be run by the client device102to verify that operating the graphical image modification options at a particular complexity level will run without degrading or negatively impacting the messaging client application104or other applications installed and running on the client device102. Specifically, the benchmark may be designed to consume the same amount and types of processor capabilities and resources of a given device as the associated complexity level of the graphical image modification options of the messaging client application104. This allows the automatic graphical image modification scaling system124to test whether the processor capabilities and device resources required by the corresponding complexity level of the graphical image modification options of the messaging client application104are available on the client device102using the benchmark without and before causing the particular graphical image modification options to operate at the particular complexity level.

In an embodiment, when the automatic graphical image modification scaling system124determines that the configuration rule is not satisfied (e.g., because any one or combination of parameters of the expression specified by the rule is not met by or does not match the device properties and/or user information of the client device102), the automatic graphical image modification scaling system124scales down the complexity level of the graphical image modification options to cause the graphical image modification options associated with the configuration rule to operate at a lower complexity level than the default complexity level or to prevent the graphical image modification options associated with the configuration rule from being available for selection (e.g., by preventing display of such graphical image modification options). In such cases, the automatic graphical image modification scaling system124selects a different set of graphical image modification options to be available for selection (e.g., by displaying a different set of graphical image modification options on top of an image or video that was or is being captured by the camera of the client device102).

When the automatic graphical image modification scaling system124determines that the configuration rule is satisfied (e.g., the combination of parameters of the expression specified by the rule are all met by or match the device properties and/or user information of the client device102), the automatic graphical image modification scaling system124maintains the complexity level of the graphical image modification options associated with the configuration rule at the current level and does not scale down the complexity level of the feature. Namely, the graphical image modification scaling system124makes available the set of graphical image modification options that are associated with the configuration rule for selection (e.g., by displaying the options for selection by the user on top of an image or video that was or is being captured by the camera of the client device102).

In some circumstances, the automatic graphical image modification scaling system124transmits code segments of the selected complexity level for the particular graphical image modification options that are selected to the client device102to update the messaging client application104and enable the messaging client application104to make available the particular graphical image modification options at the selected complexity level. Specifically, a first plurality of graphical image modification options may be available for selection by being displayed in response to a user request to access the graphical image modification feature of the messaging client application104. The first plurality of graphical image modification options may be made available by default because they have a minimum level of complexity and are associated with operations that consume a least amount of resources of the client device. At some later point, the automatic graphical image modification scaling system124determines that a configuration rule associated with a different, second plurality of graphical image modification options is satisfied by the client device. In such cases, the second plurality of graphical image modification options may not have been installed and available by default and as such, the automatic graphical image modification scaling system124transmits code for implementing the second plurality of graphical image modification options in response to determining that the configuration rule associated with a different second plurality of graphical image modification options is satisfied by the client device.

In some implementations, the second plurality of graphical image modification options includes all of the first plurality of graphical image modification options and additional options not included in the first plurality of graphical image modification options. In this way, the user can be presented with a list of all options that have operations that the client device102can handle including the lower complexity first plurality of graphical image modification options and the higher complexity other graphical image modification options in the second plurality of graphical image modification options. Namely, the second plurality of graphical image modification options can supplement the first plurality of graphical image modification options when the client device102is determined to satisfy the configuration rule associated with the second plurality of graphical image modification options.

In some embodiments, the configuration rules stored in the database accessible to the automatic graphical image modification scaling system124are dynamically updated to include new rules or to change or delete previously stored rules. Such updates are performed by providing application developers or developers of the messaging client application104with access via a graphical user interface to the rules. The application developer can define a new configuration rule using the graphical user interface by specifying various parameters such as a Boolean expression that logically combines one or more device property rules and/or one or more user information rules and identifies an action associated with a feature of the particular messaging client application104to perform when the parameters of the configuration rule are satisfied. Such an action can include enabling the feature, disabling the feature, modifying components of the feature, such as adding or removing graphical image modification options from a graphical image modification feature, downloading additional code associated with the feature, prefetching video content for a particular user, scaling a feature up or down, and so forth. As referred to herein, scaling a feature up means causing the feature to operate at a higher complexity level. As referred to herein, scaling a feature down means causing the feature to operate at a lower complexity level.

The graphical user interface may also allow the developer to assign a priority or rank to the configuration rule which may be used by the automatic graphical image modification scaling system124when a graphical image modification feature is associated with multiple matching configuration rules. The graphical user interface may also allow the developer to specify a set of portions of the configuration rule to be evaluated by the automatic graphical image modification scaling system124and another set of portions of the configuration rule to be evaluated by the client device102. As referred to herein, evaluating a rule means comparing current data (e.g., current device properties and/or user information) with the combination of the corresponding rule parameters to determine whether those parameters match the current data. Namely, evaluating a rule means determining whether an expression of the rule is TRUE or FALSE given the current data associated with the rule parameters.

As an example, a configuration rule includes an expression that, when satisfied, instructs the messaging client application104to enable graphical image modification options that include operations that operate at a high complexity level (e.g., such options include 3D virtual object animations that can be positioned and manipulated in 3D space relative to a real-world scene depicted in a live video feed using motion information of the client device102). Such an expression can include a logical AND operation of a first device property rule (e.g., battery level exceeds 70), a second device property rule (e.g., the device is part of a cluster of devices that is greater than 6), and a logical OR operation of a third device property rule (e.g., bandwidth of the device is greater than 100 Mbps) and a user information rule (e.g., a user shares videos or images that include virtual 3D objects more than 3 times per day). As such, in a given circumstance in which a given client device102has a battery level of 80 that exceeds the battery level 70 specified by the first device property rule, is part of a device cluster that exceeds 6 devices, and has a bandwidth greater than 100 Mbps or is used by a user that shares videos or images that include virtual 3D objects more than 3 times per day; the automatic graphical image modification scaling system124scales up the graphical image modification options of the messaging client application104to include graphical image modification options that allow a user to select 3D virtual object animations for positioning in a live camera feed. If the rule is not satisfied, the automatic graphical image modification scaling system124scales down the graphical image modification options of the messaging client application104causing the messaging client application104to only make available for selection 2D or 3D static virtual objects for addition to a live or stored video feed captured by a camera of the client device102. This consumes less bandwidth and processing resources of the client device102but provides in essence similar functionality.

The messaging server system108provides server-side functionality via the network106to a particular messaging client application104. While certain functions of the messaging system100are described herein as being performed either by a messaging client application104or by the messaging server system108, it will be appreciated that the location of certain functionality within either the messaging client application104or the messaging server system108is a design choice. For example, it may be technically preferable to initially deploy certain technology and functionality within the messaging server system108, but to later migrate this technology and functionality to the messaging client application104where a client device102has a sufficient processing capacity.

Dealing specifically with the API server110, this server110receives and transmits message data (e.g., commands and message payloads) between the client device102and the application server112. Specifically, the API server110provides a set of interfaces (e.g., routines and protocols) that can be called or queried by the messaging client application104in order to invoke functionality of the application server112. The API server110exposes various functions supported by the application server112, including account registration; login functionality; the sending of messages, via the application server112, from a particular messaging client application104to another messaging client application104; the sending of media files (e.g., images or video) from a messaging client application104to a messaging server application114, for possible access by another messaging client application104; the setting of a collection of media data (e.g., story); the retrieval of such collections; the retrieval of a list of friends of a user of a client device102; the retrieval of messages and content; the adding and deleting of friends to and from a social graph; the retrieval of one or more features (e.g., executable code segments of the one or more features) of the messaging client application104, such as graphical image modification options that are selected to be made available for selection on the messaging client application104(e.g., by being displayed on top of a real-time or stored video feed); the retrieval of operations and functions for different, higher or lower complexity levels of one or more graphical image modification options (e.g., executable code segments of the different, higher or lower complexity levels of the one or more graphical image modification options) of the messaging client application104; the location of friends within a social graph; access to user conversation data; access to avatar information stored on the messaging server system108; and the opening of an application event (e.g., relating to the messaging client application104).

The application server112also includes the image processing system116, which is dedicated to performing various image processing operations, typically with respect to images or video received within the payload of a message at the messaging server application114.

The social network system122supports various social networking functions and services and makes these functions and services available to the messaging server application114. To this end, the social network system122maintains and accesses an entity graph within the database120. Examples of functions and services supported by the social network system122include the identification of other users of the messaging system100with whom a particular user has relationships or whom the particular user is “following,” and also the identification of other entities and interests of a particular user. Such other users may be referred to as the user's friends. The social network system122may access location information associated with each of the user's friends to determine where they live or are currently located geographically. The social network system122may maintain a location profile for each of the user's friends indicating the geographical location where the user's friends live.

The application server112is communicatively coupled to the database server118, which facilitates access to the database120in which is stored data associated with messages processed by the messaging server application114.

FIG. 2is a schematic diagram200illustrating data, which may be stored in the database120of the messaging server system108, according to certain example embodiments. While the content of the database120is 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 database120includes message data stored within a message table214. An entity table202stores entity data, including an entity graph204. Entities for which records are maintained within the entity table202may include individuals, corporate entities, organizations, objects, places, events, and so forth. Regardless of 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 graph204furthermore stores information regarding relationships and associations between entities. Such relationships may be social, professional (e.g., work at a common corporation or organization), interest-based, or activity-based, merely for example.

The message table214may store a collection of conversations between a user and one or more friends or entities. The message table214may include various attributes of each conversation, such as the list of participants, the size of the conversation (e.g., number of users and/or number of messages), the chat color of the conversation, a unique identifier for the conversation, and any other conversation-related feature(s).

The database120also stores annotation data, in the example form of filters, in an annotation table212. The database120also stores annotated content received in the annotation table212. Filters for which data is stored within the annotation table212are associated with and applied to videos (for which data is stored in a video table210) and/or images (for which data is stored in an image table208). Filters, in one example, are overlays that are displayed as overlaid on an image or video during presentation to a recipient user. Filters may be of various types, including user-selected filters from a gallery of filters presented to a sending user by the messaging client application104when the sending user is composing a message. Other types of filters include geolocation filters (also known as geo-filters), which may be presented to a sending user based on geographic location. For example, geolocation filters specific to a neighborhood or special location may be presented within a UI by the messaging client application104, based on geolocation information determined by a Global Positioning System (GPS) unit of the client device102. Another type of filter is a data filter, which may be selectively presented to a sending user by the messaging client application104, based on other inputs or information gathered by the client device102during the message creation process. Examples of data filters include a current temperature at a specific location, a current speed at which a sending user is traveling, a battery life for a client device102, or the current time.

Other annotation data that may be stored within the image table208is so-called “lens” data. A “lens” may be a real-time special effect and sound (e.g., graphical image modification options for adding graphical elements) that may be added to an image or a video.

Configuration rules207store a set of configuration rules associated with different features of the messaging client application104. In some cases, multiple configuration rules207are associated with the same feature of the messaging client application104. In some cases, only one configuration rule is associated with a corresponding one of the features of the messaging client application104. The configuration rules207may be indexed by device type, build of the messaging client application104, version of the messaging client application104, geographical location, processor type, user attribute, user friends, or any other suitable device property or user information or combination of information. Rules stored in the configuration rules207can be accessed by any component in the system and/or by authorized devices or users. Rules can be added, modified, or deleted to/from the configuration rules207via a graphical user interface presented to an application developer of the messaging client application104. In some embodiments, configuration rules stored in the configuration rules207are associated with an owner (e.g., a creator of the rule) and, in such cases, the configuration rules207can only be modified or deleted by the associated owner using an owner identifier.

Certain rules stored in the configuration rules207can be selectively activated based on a time of day, device context, or other suitable attribute. Inactive rules are not used in evaluating whether a given device satisfies a rule to perform an action for a feature of the messaging client application104. Such action may include selecting a particular complexity level for implementing a given set of graphical image modification options from multiple sets of graphical image modification options.

Benchmarks209store a set of benchmarks associated with different graphical image modification options of the messaging client application104. In some cases, multiple benchmarks are associated with the same graphical image modification options of the messaging client application104. In some cases, only one benchmark is associated with a corresponding one of the graphical image modification options of the messaging client application104. Each benchmark in benchmarks209simulates various processor and device operations that the corresponding graphical image modification options of the messaging client application104perform. In some cases, different benchmarks can be associated with different device types, builds of the messaging client application104, versions of the messaging client application104, geographical locations, processor types, user attributes, user friends, or any other suitable device property or user information or combination of information. The benchmarks209store snippets of code that represent operations performed by the complexity level(s) corresponding to the graphical image modification options (or given set of graphical image modification options) of the messaging client application104. In some cases, the snippets of code include simulations of only the most complex operations performed by the complexity level(s) of the graphical image modification options of the messaging client application104.

Device capabilities220store a list of standard resources, processor types, memory types, and other suitable device properties of different device models and types. In some cases, each client device102of the messaging client application104may provide, upon installation of the messaging client application104, its corresponding standard physical capabilities. Such capabilities can be stored and indexed by a device identifier associated with the client device102. In some embodiments, the device capabilities220store dynamic device properties, such as battery levels, available storage space, network type, and bandwidth for one or more client devices102. In such cases, the dynamic device properties for a given device can be updated periodically or continuously by polling or requesting such information from the given device. In some cases, the device capabilities220group various devices and their capabilities into clusters of devices of similar types by grouping the corresponding identifiers of the devices into the same cluster of devices. In some embodiments, the device capabilities220organize and cluster the device capabilities220by friends associated with the devices such that device capabilities220of devices used by a given collection of friends, as indicated by the entity graph204, are grouped together. In some embodiments, the device capabilities220organize and cluster the device by geographical region associated with the devices.

User information221stores profiles for various users of the messaging client application104. Such information may include how active each user is, which features of the messaging client application104each user frequently uses, user upload history, developer status, whether the user is a beta tester, how often a given feature of the messaging client application104is used by each user, a geographical location associated with each user, and any other suitable information or combination of such information. The user information221is updated continuously or periodically as users utilize the messaging client application104.

As mentioned above, the video table210stores video data which, in one embodiment, is associated with messages for which records are maintained within the message table214. Similarly, the image table208stores image data associated with messages for which message data is stored in the entity table202. The entity table202may associate various annotations from the annotation table212with various images and videos stored in the image table208and the video table210.

FIG. 3is a schematic diagram illustrating a structure of a message300, according to some embodiments, generated by a messaging client application104for communication to a further messaging client application104or the messaging server application114. The content of a particular message300is used to populate the message table214stored within the database120, accessible by the messaging server application114. Similarly, the content of a message300is stored in memory as “in-transit” or “in-flight” data of the client device102or the application server112. The message300is shown to include the following components:A message identifier302: a unique identifier that identifies the message300.A message text payload304: text, to be generated by a user via a UI of the client device102and that is included in the message300.A message image payload306: image data, captured by a camera component of a client device102or retrieved from memory of a client device102, and that is included in the message300.A message video payload308: video data, captured by a camera component or retrieved from a memory component of the client device102and that is included in the message300.A message audio payload310: audio data, captured by a microphone or retrieved from the memory component of the client device102, and that is included in the message300.Message annotations312: annotation data (e.g., filters, stickers, or other enhancements) that represents annotations to be applied to the message image payload306, message video payload308, or message audio payload310of the message300.A message duration parameter314: a parameter value indicating, in seconds, the amount of time for which content of the message300(e.g., the message image payload306, message video payload308, or message audio payload310) is to be presented or made accessible to a user via the messaging client application104.A message geolocation parameter316: geolocation data (e.g., latitudinal and longitudinal coordinates) associated with the content payload of the message300. Multiple message geolocation parameter316values may be included in the payload, with each of these parameter values being associated with content items included in the content (e.g., a specific image within the message image payload306, or a specific video in the message video payload308).A message story identifier318: an identifier value identifying one or more content collections (e.g., “stories”) with which a particular content item in the message image payload306of the message300is associated. For example, multiple images within the message image payload306may each be associated with multiple content collections using identifier values.A message tag320: each message300may 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 payload306depicts an animal (e.g., a lion), a tag value may be included within the message tag320that is indicative of the relevant animal. Tag values may be generated manually, based on user input, or may be automatically generated using, for example, using image recognition.A message sender identifier322: an identifier (e.g., a messaging system identifier, email address, or device identifier) indicative of a user of the client device102on which the message300was generated and from which the message300was sent.A message receiver identifier324: an identifier (e.g., a messaging system identifier, email address, or device identifier) indicative of one or more users of the client device(s)102to which the message300is addressed. In the case of a conversation between multiple users, the identifier324may indicate each user involved in the conversation.

The contents (e.g., values) of the various components of the message300may be pointers to locations in tables within which content data values are stored. For example, an image value in the message image payload306may be a pointer to (or address of) a location within the image table208. Similarly, values within the message video payload308may point to data stored within the video table210, values stored within the message annotations312may point to data stored in the annotation table212, values stored within the message story identifier318may point to data stored in the story table206, and values stored within the message sender identifier322and the message receiver identifier324may point to user records stored within the entity table202.

FIG. 4is a block diagram showing an example automatic graphical image modification scaling system124, according to example embodiments. The automatic graphical image modification scaling system124includes a feature selection module411, a configuration rule selection module419, a configuration rule evaluation module416, a user information module414, a device properties module412, a configuration rule evaluation module416, and a feature action module418.

Feature selection module411communicates with a messaging client application104implemented on a given client device102to identify a feature (e.g., graphical image modification options) of the messaging client application104to analyze. The feature can be a first plurality of graphical image modification options that is currently selected to be made available that have operations with a low complexity level. In an embodiment, the feature selection module411cycles through a predetermined list of features over time to verify that the feature should be scaled up/down and change the selected graphical image modification options that are available if a given configuration rule is satisfied indicating a state change is needed. In this way, the graphical image modification options that are available are dynamically scalable responsive to changes in one or more device properties. As discussed herein, operating a feature at a given complexity level means executing a set of instructions having the given complexity level to implement the feature. For example, operating a feature at a first complexity level means executing a first set of instructions having the first complexity level to implement the feature and operating the same feature at a second complexity level means executing a second set of instructions having the second complexity level to implement the feature.

The feature selection module411may access user information221to infer user behavior and interest in having a particular set of graphical image modification options of the messaging client application104scaled up to include graphical image modification options that have operations with a higher complexity level. For example, the user information221may indicate that the user has recently started using the camera of the camera-enabled device on which the messaging client application104is implemented to capture and share videos. The feature selection module411may also determine that the lens feature (e.g., a feature that utilizes object recognition and allows a user to insert 2D or 3D graphical objects) is currently set to operate at a low complexity level on the device and is a feature that is popular among the user's friends or a set of users who frequently share videos. The feature selection module411may, in response, communicate the selected feature to the configuration rule selection module419to determine whether or not to scale up the feature (e.g., to add or replace the graphical image modification options that are available to include the ability to add virtual 3D animated objects to a live video feed rather than just having the ability to add virtual 2D static objects to a live video feed). Similarly, the feature selection module411may determine that the lens feature is currently scaled up and operating at a high complexity level but that the user of the device has not captured video using the camera-enabled device in over a threshold period of time. In response, the feature selection module411may communicate the selected feature to the configuration rule selection module419to determine whether or not to scale down the feature or perform an action associated with the feature.

As another example, the feature selection module411may determine that a geographical location of the user of the messaging client application104has changed. In response, the feature selection module411may identify a set of features that are location dependent and provide one or more of the identified features to the configuration rule selection module419to determine whether an action should be performed for such features. As another example, the feature selection module411receives a version identifier or client device102identifier and retrieves a set of features that are operating at a low complexity level on the client device102. The feature selection module411provides the retrieved set of features to the configuration rule selection module419for analysis as to whether to scale up the features. Similarly, the feature selection module411receives a version identifier or client device102identifier and retrieves a set of features that are currently set to operate at a high complexity level on the client device102. The feature selection module411provides the retrieved set of features to the configuration rule selection module419for analysis as to whether to scale down the features.

Configuration rule selection module419retrieves one or more configuration rules from configuration rules207that are associated with the features received from the feature selection module411. The configuration rule selection module419determines which configuration rules, that are associated with the feature, are active and associated with the device identifier and/or user identifier. The configuration rule selection module419determines whether multiple such configuration rules match and are associated with the selected feature. In response, the configuration rule selection module419retrieves a rank associated with each rule and selects the configuration rule with the highest rank. Alternatively, or in addition, the configuration rule selection module419analyzes a Boolean tree associated with the expression of each configuration rule. Specifically, the configuration rule selection module419compares the expressions of each configuration rule that is associated with the same feature and selects the configuration rule with the longest expression.

The configuration rule selection module419provides the selected configuration rule to the configuration rule evaluation module416. The configuration rule evaluation module416analyzes the expression contained in the selected rule to determine which parameters need to be evaluated. For example, the configuration rule evaluation module416identifies one or more device property rules contained in the expression and/or user information rules contained in the expression. The configuration rule evaluation module416also determines whether the rule specifies a particular portion of the expression that needs to be evaluated by the client device102. The configuration rule evaluation module416communicates with the user information module414to obtain user information221corresponding to the user information rule and/or with the device properties module412to obtain device properties corresponding to the device properties rules contained in the expression.

As an example, the configuration rule includes a first device property rule (e.g., a bandwidth greater than 1 Mbps) and a second device property rule (e.g., a minimum version of the messaging client application104). As a result, the configuration rule evaluation module416communicates with the device properties module412, and provides the client device102identifier to the device properties module412, to obtain the first device property (e.g., the current bandwidth of the client device102) and the second device property (e.g., the current version of the messaging client application104installed on the client device102) associated with the first and second device property rules. The device properties module412accesses the device capabilities220to retrieve the corresponding first and second device properties associated with the identifier of the client device102. If the device capabilities220only have the first property and not the second property, the device properties module412communicates directly with the client device102to obtain the current value of the second property.

The configuration rule may also include a first user information rule (e.g., a beta user attribute) and a second user information rule (e.g., accesses or consumes more than 25 videos from other users per day). As a result, the configuration rule evaluation module416communicates with the user information module414, and provides the user identifier to the user information module414, to obtain the first user information (e.g., the status of the user, such as whether the user is a beta user) and the second user information (e.g., the number of videos from other users the user consumes per day). The user information module414retrieves the first and second user information from user information221and returns the information to the configuration rule evaluation module416.

In some implementations, the configuration rule evaluation module416sends a portion of the expression to the client device102for the client device102to evaluate the portion of the expression. For example, the portion of the expression may specify that a particular benchmark result has to exceed a given minimum threshold performance. As a result, the configuration rule evaluation module416transmits the portion of the expression including the benchmark, retrieved from benchmarks209, to the client device102with an instruction for the client device102to run the benchmark. The client device102, after running the benchmark, may determine whether the performance exceeds the threshold indicated in the portion of the expression and provides this evaluation to the configuration rule evaluation module416. In some implementations, the configuration rule evaluation module416only sends the portion of the expression to the client device102after verifying that another portion of the expression, evaluated at the server, is satisfied. Namely, the configuration rule evaluation module416evaluates the portions of the expression with the currently available information on the server and, if those portions are satisfied, a remaining set of portions of the expression are sent by module416to the client device102for evaluation.

In some embodiments, the configuration rule evaluation module416sends an instruction to the client device102to re-evaluate the expression at a later point in time if the expression is currently satisfied. If the expression is later no longer satisfied, the client device102may automatically scale down the feature or perform an action associated with the feature. For example, certain graphical image modification options may be removed or made no longer available for selection if the expression is no longer satisfied.

After the configuration rule evaluation module416obtains all of the parameters for the expression (e.g., all of the needed device properties and/or user information221), the configuration rule evaluation module416determines whether the Boolean expression is satisfied. Namely, the configuration rule evaluation module416determines whether all or some of the received information matches the specified rules or Boolean combination of the rules.

In response to determining that the expression is satisfied, the configuration rule evaluation module416instructs the feature action module418to perform the action associated with the rule (e.g., scale the feature up, scale the feature down, enable the feature, add/remove graphical image modification options, disable the feature, or modify the feature). The feature action module418retrieves the action specified for the configuration rule from the configuration rules207and then executes the corresponding action. For example, the feature action module418transmits code for implementing a second plurality of graphical image modification options (e.g., options allowing a user to add virtual 3D animated objects to a live video feed) to the client device102to install and implement the operations and functions associated with the selected second plurality of graphical image modification options. Alternatively, the feature action module418sends a message300to the messaging client application104with instructions to scale up the first plurality of graphical image modification options that is currently installed on the messaging client application104by enabling or activating the second plurality of graphical image modification options. Alternatively, the feature action module418sends a message300to the messaging client application104with instructions to scale down the feature that is currently installed and operating at a high complexity level on the messaging client application104by disabling or deactivating the second plurality of graphical image modification options.

As one example, a feature that the feature selection module411selects includes graphical image modification options (e.g., options that are displayed on top of a live or stored video feed that the user can select to add different virtual graphical elements to add to the live or stored video feed). The graphical image modification options may have operations that include multiple complexity levels. Low complexity level operations of a first set of the graphical image modification options include only the ability to add virtual 2D static objects to the live or stored video feed and manipulate the position of the 2D objects in 2D space. High complexity level operations of a second set of the graphical image modification options include the ability to add virtual 2D static objects to the live or stored video feed and the ability to add virtual 3D animated objects that can be positioned in 2D or 3D space in the live or stored video feed using motion and gyroscopic information of the client device102. The configuration rule selected by the configuration rule selection module419associates a plurality of device property rules including first, second, and third device property rules with the feature. In such circumstances, a current battery level and current amount of available storage is received by the device properties module412from the client device102. The configuration rule evaluation module416on the server determines that processing capabilities of the client device102exceed threshold processing capabilities indicated by the first device property rule, the current battery level exceeds a minimum battery level indicated by the second device property rule, and the current amount of available storage exceeds a minimum available storage amount indicated by the third device property rule. Prior to scaling up the feature on the client device102to enable selection of the second plurality of graphical image modification options, the server instructs the client device102to determine whether an updated battery level of the client device102exceeds the minimum battery level indicated by the second device property rule and that an updated amount of available storage of the client device102exceeds the minimum available storage amount indicated by the third device property rule.

This way, even though a given rule is satisfied when evaluated based on a first set of device properties that is received by the server, the client device102can double check that after the feature associated with the given rule is scaled up, the given rule is still satisfied at some later point in time. Namely, the time between when the server evaluates the rule and when the client is instructed to scale up the feature (to activate the second plurality of graphical image modification options) may be large enough such that the battery level on the client device102drops below an allowable minimum. To ensure that the battery level is still above the allowable minimum after the time has passed since the server evaluated the rule, the client device102can test and evaluate the current battery level against the rule prior to scaling up the feature (and making available the second plurality of graphical image modification options) and/or while only the first plurality of graphical image modification options are available for selection to determine whether to scale up the graphical image modification options.

In an embodiment, a feature that the feature selection module411selects includes a lens creation or complex lens operations (e.g., creation of a graphical element that is added to a captured image or complex operations associated with such a graphical element, such as animation, scaling, pixelation, and so forth) that enables a user to add graphical elements to images captured by the client device102. The configuration rule selected by the configuration rule selection module419may specify minimum performance capabilities a client device102needs to operate the lens creation or complex lens operations features at a high complexity level (which provides a different set of graphical elements that are animated and utilize gyroscopic and position sensors of the client device102than a low complexity level provides).

The configuration rule evaluation module416retrieves information indicating a performance metric of the lens creation or complex lens operations by executing a benchmark on the client device102representing operations performed by the lens creation or complex lens operations, or retrieving a performance metric indicating how the benchmark performed on devices similar to the client device102in the past. The configuration rule evaluation module416determines that the performance metric exceeds a minimum performance threshold indicated by the first device property rule. In response to determining that the performance metric exceeds the minimum performance threshold indicated by the first device property rule, the configuration rule evaluation module416scales up the lens creation or complex lens operations for the client. Namely, the lens creation operations, operating at the scaled-up state implementing a high complexity level feature, allow a user to choose enhanced graphical elements that are animated and utilize gyroscopic and position sensors of the client device102. The lens creation operations, operating at the scaled-down state implementing a low complexity level feature, allow a user to choose static graphical elements that do not utilize gyroscopic and position sensors of the client device102.

In some embodiments, the complexity level for implementing the lens feature may be selected based on whether the client device102includes a frame fetch buffer capability. Such capability may be a rule in the configuration rules that is evaluated against device properties of the client device102. For example, if the client device102includes frame fetch buffer capability, the lens feature may be selected to operate at a high complexity level. If the client device102does not include frame fetch buffer capability, the lens feature may be selected to operate at a low complexity level.

In some embodiments, the lens feature or the graphical image modification options are presented to the user in response to the user requesting to activate the graphical image modification feature. In such cases, the camera of the user device is activated and begins capturing and displaying images being captured to the user. Prior to the configuration rule being satisfied, the images captured by the camera may be low resolution images and a first set of graphical image modification options are presented on top of the low resolution images. After the configuration rule associated with a second set of graphical image modification options is evaluated and determined to be satisfied, the camera is instructed to begin capturing high resolution images. In such cases, the images captured by the camera may be high resolution images and a second set of graphical image modification options are presented on top of the high resolution images. In some cases, when the images being captured are high resolution and the configuration rule is determined to no longer be satisfied, the camera is instructed to begin capturing low resolution images. Also, the first set of graphical image modification options are presented to replace the second set of graphical image modification options.

In some embodiments, the lens feature or the graphical image modification options are presented to the user in response to the user requesting to activate the graphical image modification feature. In such cases, the camera of the user device is activated and begins capturing and displaying images being captured to the user. The power state of the device can be analyzed to determine whether the client device102is operating in a low power state. In response to determining that the device is operating in the low power state, the images captured by the camera may be low resolution images and a first set of graphical image modification options are presented on top of the low resolution images. After the device is determined to have transitioned to a high power state, the camera is instructed to begin capturing high resolution images. In such cases, the images captured by the camera may be high resolution images and a second set of graphical image modification options are presented on top of the high resolution images.

FIG. 5is a flowchart illustrating example operations of the automatic graphical image modification scaling system124in performing a process500, according to example embodiments. The process500may be embodied in computer-readable instructions for execution by one or more processors such that the operations of the process500may be performed in part or in whole by the functional components of the messaging server system108and/or messaging client application104: accordingly, the process500is described below by way of example with reference thereto. However, in other embodiments, at least some of the operations of the process500may be deployed on various other hardware configurations. The process500is therefore not intended to be limited to the messaging server system108and can be implemented in whole, or in part, by any other component. Some or all of the operations of the process500can be in parallel, out of order, or entirely omitted.

At operation501, the automatic graphical image modification scaling system124selects a messaging application feature. For example, the feature selection module411selects a given feature of the messaging client application104to be scaled up or scaled down.

At operation502, the automatic graphical image modification scaling system124accesses a configuration rule that includes a configuration rule expression associated with the messaging application feature. For example, the configuration rule selection module419retrieves one or more configuration rules that are associated with the selected feature provided by the feature selection module411.

At operation503, the automatic graphical image modification scaling system124evaluates a first portion of the expression on a server. For example, the configuration rule evaluation module416obtains data for one or more parameters of the configuration rule expression from the user information module414and/or device properties module412and determines whether a Boolean expression in the configuration rule is satisfied.

At operation504, the automatic graphical image modification scaling system124determines if the first portion of the expression is satisfied. In response to determining that the first portion of the expression is satisfied, the process500continues to operation505; otherwise the process500continues to operation501.

At operation505, the automatic graphical image modification scaling system124transmits a second portion of the expression to a client device102. For example, the configuration rule evaluation module416identifies a portion of the configuration rule that needs to be evaluated on the client device102, such as a benchmark that needs to be run on the client device102to determine the performance of the benchmark or the currently available bandwidth, battery level, or storage space on the client device102.

At operation506, the automatic graphical image modification scaling system124evaluates the second portion of the expression on the client device102. For example, the configuration rule evaluation module416instructs the client device102to evaluate the portion of the rule and transmit an indication of whether the portion of the rule (e.g., the Boolean expression portion) matches the data obtained on the client device102and evaluates to be TRUE or FALSE.

At operation507, the automatic graphical image modification scaling system124determines if the second portion of the expression is satisfied. In response to determining that the second portion of the expression is satisfied, the process500continues to operation508; otherwise the process500continues to operation501. For example, if the second portion is not satisfied, the feature action module418enables a second set of graphical image modification options for selection and application to a live or stored video on the messaging client application104which have operations including a second complexity level that is lower than a first complexity level.

At operation508, the automatic graphical image modification scaling system124performs an action associated with the messaging application feature. For example, the feature action module418scales down the graphical image modification options available for selection on the messaging client application104to have options that operate at a lower complexity level, such as by sending code segments for implementing and executing the second set of graphical image modification options. As another example, the feature action module418scales up the graphical image modification options available for selection on the messaging client application104to have a first set of graphical image modification options that operate on the client device102at the first complexity level that is greater than the second complexity level.

FIG. 6is a flowchart illustrating example operations of the automatic graphical image modification scaling system124in performing a process600, according to example embodiments. The process600may be embodied in computer-readable instructions for execution by one or more processors such that the operations of the process600may be performed in part or in whole by the functional components of the messaging server system108and/or messaging client application104; accordingly, the process600is described below by way of example with reference thereto. However, in other embodiments, at least some of the operations of the process600may be deployed on various other hardware configurations. The process600is therefore not intended to be limited to the messaging server system108and can be implemented in whole, or in part, by any other component. Some or all of the operations of the process600can be in parallel, out of order, or entirely omitted.

At operation601, the automatic graphical image modification scaling system124receives, with a messaging application, user input to access a graphical image modification feature of the messaging application on a client device.

At operation602, the automatic graphical image modification scaling system124, in response to receiving the user input, causes display of a video captured by an image capture device of the client device.

At operation603, the automatic graphical image modification scaling system124accesses a first configuration rule of a plurality of configuration rules that associates a first device property rule with the graphical image modification feature of the messaging application.

At operation604, the automatic graphical image modification scaling system124determines that the first configuration rule is satisfied by a first property of the client device.

At operation605, the automatic graphical image modification scaling system124, in response to determining that the first configuration rule is satisfied by the first property of the client device, causes display of a first plurality of graphical image modification options each associated with performing a different modification to the video captured by the image capture device. As another example, the automatic graphical image modification scaling system124may determine that the first configuration rule is not satisfied by a first property of a second client device. In response to determining that the first configuration rule is not satisfied by the first property of the second client device, the automatic graphical image modification scaling system124may cause display of a second plurality of graphical image modification options, each associated with performing a different modification to the video, that are different from the first plurality of graphical image modification options.

FIGS. 7 and 8show illustrative inputs and outputs of the automatic graphical image modification scaling system124, according to example embodiments. The inputs and outputs shown inFIGS. 7 and 8can be implemented by the messaging client application104. A graphical user interface700, shown inFIG. 7, is presented by the messaging client application104in response to receiving a user request to access a graphical image modification feature of the messaging client application104. In response to receiving this request, graphical user interface700is presented in which a live or stored video is displayed presenting images that are or were captured by an image capture device of the client device102.

In response to, or prior to receiving this request, the automatic graphical image modification scaling system124determines whether a first plurality of graphical image modification options of the graphical user interface700are to be enabled for selection by a user and/or whether a second plurality of graphical image modification options are to be enabled for selection by a user. The graphical image modification options selected by the automatic graphical image modification scaling system124are presented as a scrollable list of options that overlay the images presented in the graphical user interface700. As an example, initially the messaging client application104receives a user request to access the graphical image modification scaling system124. In response, the messaging client application104accesses a live camera feed from the image capture device of the client device102. The live camera feed is presented in full screen on the graphical user interface700without any image modification options. In response to the messaging client application104receiving a user input (e.g., if the user taps on the screen), the messaging client application104communicates with the automatic graphical image modification scaling system124to select the appropriate and suitable list of graphical image modification options for presentation to the user. Once the automatic graphical image modification scaling system124provides the selected list of graphical image modification options, interactive visual representations or icons of each option are presented in a horizontally or vertically interactive scrollable list on top of the live camera feed presented in the graphical user interface700. The scrollable list can be presented at the top or the bottom of the screen, as depicted inFIGS. 7 and 8. This allows the user to toggle the display of the scrollable list of visual representations for adding the graphical image modifications to the live camera feed.

The graphical image modification options may allow a user to add a graphical element associated with each respective option to the live or stored video that is displayed in the graphical user interface700. For example, if a user selects a first graphical image modification option, by tapping or otherwise selecting a first interactive visual representation shown in the scrollable list, a first virtual object (e.g., a 2D static/animated image) is added to a user designed or automatically selected position on the live or stored video that is displayed. If the user then selects a second graphical image modification option, by tapping or otherwise selecting a second interactive visual representation shown in the scrollable list, a second, different virtual object (e.g., a 3D animated image) is added in addition to or in replacement of the previously added first virtual object to the live or stored video that is displayed. This results in image modification of the live camera feed, namely the addition of a 3D virtual object720(e.g., a virtual dog) responsive to selection of an icon701. The user can select a second icon702which results in another image modification of the live camera feed, namely the addition of a different 3D virtual object720(e.g., a virtual airplane). Other modifications to images can also be performed, not limited to the addition of virtual objects. For example, graphical image modification options may include different filters that change visual appearances or attributes of the live camera feed, 2D or 3D text, removal or erasure of one or more real-world items depicted in the live camera feed, and/or any combination thereof.

As an example, if the first set of graphical image modification options is enabled (e.g., because the automatic graphical image modification scaling system124determines that the client properties and/or user information221satisfy and match an expression in the corresponding configuration rule), as shown in the graphical user interface700, a first set of graphical image modification options710are presented on top of the live or stored video. For example, the automatic graphical image modification scaling system124determines that a frame fetch buffer and more than 100 Mbps of bandwidth are currently available on the client device102which satisfies a configuration rule with such parameters that is associated with enabling access to the first set of graphical image modifications options. A user can select a given one of the first set of graphical image modification options710to add a virtual object (e.g., a 3D animated object) to the live or stored video. For example, in response to receiving a user selection of one of the options in the first set of graphical image modification options710, a 3D virtual object720is presented at a user selected or automatically selected position in the live or stored video that is displayed.

If the first set of graphical image modification options is disabled (e.g., because the automatic graphical image modification scaling system124determines that the client properties and/or user information221do not satisfy and do not match the expression in a corresponding configuration rule), as shown in the graphical user interface800(FIG. 8), the client device102presents a second set of graphical image modification options810. For example, the automatic graphical image modification scaling system124determines that a frame fetch buffer and less than 100 Mbps of bandwidth are currently available on the client device102which fails satisfies a configuration rule with such parameters that is associated with enabling access to the first set of graphical image modifications options. As a result, the automatic graphical image modification scaling system124selects a second set of graphical image modification options810for presentation instead of the first set of graphical image modification options. The second set of graphical image modification options (e.g., due to the options corresponding to 3D animated virtual objects) may correspond to operations that consume less client device102resources (e.g., memory, bandwidth and processor operations) than the first set of graphical image modification options710. A user can select a given one of the second set of graphical image modification options810to add a virtual object (e.g., a 2D static object) to the live or stored video. For example, in response to receiving a user selection of one of the options in the second set of graphical image modification options810, a 2D virtual object820is presented at a user-selected or automatically selected position in the live or stored video that is displayed.

In some cases, the first set of graphical image modification options710displayed in graphical user interface700include all or some of the same graphical image modification options as those that are included in the second set of graphical image modification options810. The second set of graphical image modification options810includes none of the first set of graphical image modification options710. This is because the messaging client application104may determine that the complexity level of operations that implement the first set of graphical image modification options710is greater than the complexity level of the operations that implement the second set of graphical image modification options810. Accordingly, providing the options having the lower complexity when higher complexity options are presented (e.g., because the configuration rule associated with the higher complexity options is satisfied) does not consume more resources and does not reduce efficiencies of providing the graphical image modification feature. However, providing options having higher complexity when the messaging client application104determines that the configuration rule associated with the higher complexity options is not satisfied does come at a cost and does reduce the efficiencies of providing the graphical image modification feature, and accordingly such options are not presented when options of lower complexity are presented.

FIG. 9is a block diagram illustrating an example software architecture906, which may be used in conjunction with various hardware architectures herein described.FIG. 9is a non-limiting example of a software architecture, and it will be appreciated that many other architectures may be implemented to facilitate the functionality described herein. The software architecture906may execute on hardware such as a machine1000ofFIG. 10that includes, among other things, processors1004, memory1006and input/output (I/O) components1018. A representative hardware layer952is illustrated and can represent, for example, the machine1000ofFIG. 10. The representative hardware layer952includes a processing unit954having associated executable instructions904. The executable instructions904represent the executable instructions of the software architecture906, including implementation of the methods, components, and so forth described herein. The hardware layer952also includes memory and/or storage modules memory/storage956, which also have the executable instructions904. The hardware layer952may also comprise other hardware958.

In the example architecture ofFIG. 9, the software architecture906may be conceptualized as a stack of layers where each layer provides particular functionality. For example, the software architecture906may include layers such as an operating system902, libraries920, frameworks/middleware918, applications916, and a presentation layer914. Operationally, the applications916and/or other components within the layers may invoke API calls908through the software stack and receive messages912in response to the API calls908. The layers illustrated are representative in nature, and not all software architectures have all layers. For example, some mobile or special-purpose operating systems may not provide a frameworks/middleware918, while others may provide such a layer. Other software architectures may include additional or different layers.

The operating system902may manage hardware resources and provide common services. The operating system902may include, for example, a kernel922, services924, and drivers926. The kernel922may act as an abstraction layer between the hardware and the other software layers. For example, the kernel922may be responsible for memory management, processor management (e.g., scheduling), component management, networking, security settings, and so on. The services924may provide other common services for the other software layers. The drivers926are responsible for controlling or interfacing with the underlying hardware. For instance, the drivers926include display drivers, camera drivers, Bluetooth® drivers, flash memory drivers, serial communication drivers (e.g., Universal Serial Bus (USB) drivers), Wi-Fi® drivers, audio drivers, power management drivers, and so forth, depending on the hardware configuration.

The libraries920provide a common infrastructure that is used by the applications916and/or other components and/or layers. The libraries920provide functionality that allows other software components to perform tasks in an easier fashion than by interfacing directly with the underlying operating system902functionality (e.g., kernel922, services924, and/or drivers926). The libraries920may include system libraries944(e.g., C standard library) that may provide functions such as memory allocation functions, string manipulation functions, mathematical functions, and the like. In addition, the libraries920may include API libraries946such as media libraries (e.g., libraries to support presentation and manipulation of various media formats such as MPEG4, H.264. MP3, AAC. AMR. JPG, PNG), graphics libraries (e.g., an OpenGL framework that may be used to render two-dimensional and three-dimensional graphic content on a display), database libraries (e.g., SQLite that may provide various relational database functions), web libraries (e.g., WebKit that may provide web browsing functionality), and the like. The libraries920may also include a wide variety of other libraries948to provide many other APIs to the applications916and other software components/modules.

The frameworks/middleware918(also sometimes referred to as middleware) provide a higher-level common infrastructure that may be used by the applications916and/or other software components/modules. For example, the frameworks/middleware918may provide various graphic UI (GUI) functions, high-level resource management, high-level location services, and so forth. The frameworks/middleware918may provide a broad spectrum of other APIs that may be utilized by the applications916and/or other software components/modules, some of which may be specific to a particular operating system902or platform.

The applications916include built-in applications938and/or third-party applications940. Examples of representative built-in applications938may include, but are not limited to, a contacts application, a browser application, a book reader application, a location application, a media application, a messaging application, and/or a game application. The third-party applications940may include an application developed using the ANDROID™ or IOS™ software development kit (SDK) by an entity other than the vendor of the particular platform, and may be mobile software running on a mobile operating system such as IOS™, ANDROID™, WINDOWS® Phone, or other mobile operating systems. The third-party applications940may invoke the API calls908provided by the mobile operating system (such as the operating system902) to facilitate functionality described herein.

The applications916may use built-in operating system functions (e.g., kernel922, services924, and/or drivers926), libraries920, and frameworks/middleware918to create UIs to interact with users of the system. Alternatively, or additionally, in some systems, interactions with a user may occur through a presentation layer, such as the presentation layer914. In these systems, the application/component “logic” can be separated from the aspects of the application/component that interact with a user.

The machine1000may include processors1004, memory/storage1006, and I/O components1018, which may be configured to communicate with each other such as via a bus1002. In an example embodiment, the processors1004(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 processor1008and a processor1012that may execute the instructions1010. The term “processor” is intended to include multi-core processors1004that may comprise two or more independent processors1008(sometimes referred to as “cores”) that may execute instructions1010contemporaneously. AlthoughFIG. 10shows multiple processors1004, the machine1000may include a single processor1008with a single core, a single processor1008with multiple cores (e.g., a multi-core processor), multiple processors1004with a single core, multiple processors1004with multiple cores, or any combination thereof.

The memory/storage1006may include a memory1014, such as a main memory, or other memory storage, and a storage unit1016, both accessible to the processors1004such as via the bus1002. The storage unit1016and memory1014store the instructions1010embodying any one or more of the methodologies or functions described herein. The instructions1010may also reside, completely or partially, within the memory1014, within the storage unit1016, within at least one of the processors1004(e.g., within the processor1008's cache memory), or any suitable combination thereof, during execution thereof by the machine1000. Accordingly, the memory1014, the storage unit1016, and the memory of the processors1004are examples of machine-readable media.

The I/O components1018may include a wide variety of components to receive input, provide output, produce output, transmit information, exchange information, capture measurements, and so on. The specific I/O components1018that are included in a particular machine1000will depend on the type of machine1000. For example, portable machines such as mobile phones will likely include a touch input device or other such input mechanisms, while a headless server machine will likely not include such a touch input device. It will be appreciated that the I/O components1018may include many other components that are not shown inFIG. 10. The I/O components1018are grouped according to functionality merely for simplifying the following discussion, and the grouping is in no way limiting. In various example embodiments, the I/O components1018may include output components1026and input components1028. The output components1026may include visual components (e.g., a display such as a plasma display panel (PDP), a light-emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), acoustic components (e.g., speakers), haptic components (e.g., a vibratory motor, resistance mechanisms), other signal generators, and so forth. The input components1028may include alphanumeric input components (e.g., a keyboard, a touch screen configured to receive alphanumeric input, a photo-optical keyboard, or other alphanumeric input components), point-based input components (e.g., a mouse, a touchpad, a trackball, a joystick, a motion sensor, or other pointing instruments), tactile input components (e.g., a physical button, a touch screen that provides location and/or force of touches or touch gestures, or other tactile input components), audio input components (e.g., a microphone), and the like.

Communication may be implemented using a wide variety of technologies. The I/O components1018may include communication components1040operable to couple the machine1000to a network1037or devices1029via a coupling1024and a coupling1022, respectively. For example, the communication components1040may include a network interface component or other suitable device to interface with the network1037. In further examples, the communication components1040may 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 devices1029may be another machine or any of a wide variety of peripheral devices (e.g., a peripheral device coupled via a USB).

Glossary

“CARRIER SIGNAL”, in this context, refers to any intangible medium that is capable of storing, encoding, or carrying transitory or non-transitory instructions1010for execution by the machine1000, and includes digital or analog communications signals or other intangible media to facilitate communication of such instructions1010. Instructions1010may be transmitted or received over the network1037using a transitory or non-transitory transmission medium via a network interface device and using any one of a number of well-known transfer protocols.

“CLIENT DEVICE”, in this context, refers to any machine1000that interfaces to a communications network1037to obtain resources from one or more server systems or other client devices102. A client device102may be, but is not limited to, a mobile phone, desktop computer, laptop, PDA, smart phone, tablet, ultra book, netbook, laptop, multi-processor system, microprocessor-based or programmable consumer electronics system, game console, set-top box, or any other communication device that a user may use to access a network1037.

“EPHEMERAL MESSAGE”, in this context, refers to a message300that is accessible for a time-limited duration. An ephemeral message may be a text, an image, a video, and the like. The access time for the ephemeral message may be set by the message sender. Alternatively, the access time may be a default setting or a setting specified by the recipient. Regardless of the setting technique, the message300is transitory.

“MACHINE-READABLE MEDIUM”, in this context, refers to a component, a device, or other tangible media able to store instructions1010and data temporarily or permanently and may include, but is not limited to, random-access memory (RAM), read-only memory (ROM), buffer memory, flash memory, optical media, magnetic media, cache memory, other types of storage (e.g., erasable programmable read-only memory (EPROM)), and/or any suitable combination thereof. The term “machine-readable medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) able to store instructions1010. The term “machine-readable medium” shall also be taken to include any medium, or combination of multiple media, that is capable of storing instructions1010(e.g., code) for execution by a machine1000, such that the instructions1010, when executed by one or more processors1004of the machine1000, cause the machine1000to perform any one or more of the methodologies described herein. Accordingly, a “machine-readable medium” refers to a single storage apparatus or device, as well as “cloud-based” storage systems or storage networks that include multiple storage apparatus or devices. The term “machine-readable medium” excludes signals per se.

“COMPONENT”, in this context, refers to a device, physical entity, or logic having boundaries defined by function or subroutine calls, branch points. APIs, or other technologies that provide for the partitioning or modularization of particular processing or control functions. Components may be combined via their interfaces with other components to carry out a machine process. A component may be a packaged functional hardware unit designed for use with other components and a part of a program that usually performs a particular function of related functions. Components may constitute either software components (e.g., code embodied on a machine-readable medium) or hardware components. A “hardware component” is a tangible unit capable of performing certain operations and may be configured or arranged in a certain physical manner. In various example embodiments, one or more computer systems (e.g., a standalone computer system, a client computer system, or a server computer system) or one or more hardware components of a computer system (e.g., a processor or a group of processors1004) may be configured by software (e.g., an application or application portion) as a hardware component that operates to perform certain operations as described herein.

A hardware component may also be implemented mechanically, electronically, or any suitable combination thereof. For example, a hardware component may include dedicated circuitry or logic that is permanently configured to perform certain operations. A hardware component may be a special-purpose processor, such as a field-programmable gate array (FPGA) or an ASIC. A hardware component may also include programmable logic or circuitry that is temporarily configured by software to perform certain operations. For example, a hardware component may include software executed by a general-purpose processor1004or other programmable processor. Once configured by such software, hardware components become specific machines (or specific components of a machine) uniquely tailored to perform the configured functions and are no longer general-purpose processors1004. It will be appreciated that the decision to implement a hardware component mechanically, in dedicated and permanently configured circuitry, or in temporarily configured circuitry (e.g., configured by software) may be driven by cost and time considerations. Accordingly, the phrase “hardware component” (or “hardware-implemented component”) should be understood to encompass a tangible entity, be that an entity that is physically constructed, permanently configured (e.g., hardwired), or temporarily configured (e.g., programmed) to operate in a certain manner or to perform certain operations described herein. Considering embodiments in which hardware components are temporarily configured (e.g., programmed), each of the hardware components need not be configured or instantiated at any one instant in time. For example, where a hardware component comprises a general-purpose processor1008configured by software to become a special-purpose processor, the general-purpose processor1008may be configured as respectively different special-purpose processors (e.g., comprising different hardware components) at different times. Software accordingly configures a particular processor or processors1004, for example, to constitute a particular hardware component at one instant of time and to constitute a different hardware component at a different instant of time.

Hardware components may also initiate communications with input or output devices, and can operate on a resource (e.g., a collection of information). The various operations of example methods described herein may be performed, at least partially, by one or more processors1004that are temporarily configured (e.g., by software) or permanently configured to perform the relevant operations. Whether temporarily or permanently configured, such processors may constitute processor-implemented components that operate to perform one or more operations or functions described herein. As used herein, “processor-implemented component” refers to a hardware component implemented using one or more processors1004. Similarly, the methods described herein may be at least partially processor-implemented, with a particular processor or processors1004being an example of hardware. For example, at least some of the operations of a method may be performed by one or more processors1004or processor-implemented components. Moreover, the one or more processors1004may also operate to support performance of the relevant operations in a “cloud computing” environment or as a “software as a service” (SaaS). For example, at least some of the operations may be performed by a group of computers (as examples of machines1000including processors1004), with these operations being accessible via a network1037(e.g., the Internet) and via one or more appropriate interfaces (e.g., an API). The performance of certain of the operations may be distributed among the processors1004, not only residing within a single machine1000, but deployed across a number of machines1000. In some example embodiments, the processors1004or processor-implemented components may be located in a single geographic location (e.g., within a home environment, an office environment, or a server farm). In other example embodiments, the processors1004or processor-implemented components may be distributed across a number of geographic locations.

“PROCESSOR”, in this context, refers to any circuit or virtual circuit (a physical circuit emulated by logic executing on an actual processor1008) that manipulates data values according to control signals (e.g., “commands,” “op codes,” “machine code,” etc.) and which produces corresponding output signals that are applied to operate a machine1000. A processor1008may, for example, be 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 ASIC, a radio-frequency integrated circuit (RFIC), or any combination thereof. A processor1008may further be a multi-core processor having two or more independent processors1008(sometimes referred to as “cores”) that may execute instructions1010contemporaneously.