Scalable systems and methods for generating and serving recommendations

A scalable recommendation engine includes stateless processors in communication with at least one memory server that stores contextual data. A router is configured to direct a recommendation request to a first stateless processor, which is configured to generate a recommendation using contextual data from the memory server. A controller monitors the available processing bandwidth of the stateless processors and deploys an additional stateless processor if the available processing bandwidth is less than a minimum available processing bandwidth threshold. The controller can remove from deployment a stateless processor if the available processing bandwidth is greater than a maximum pre-determined available processing bandwidth threshold.

TECHNICAL FIELD

This application generally relates to computer systems and methods for generating and serving recommendations for content, products, and/or services that are related to a user's online and/or offline activity.

BACKGROUND

Commercial websites and applications often provide recommendations to their users. Such recommendations can include content related to the current webpage or application accessed by the user (e.g., a related news story), a product related to a product in a user's shopping cart (e.g., a recommendation for socks if the user is buying shoes), or a promotion/advertisement related to the current webpage accessed by the user and/or a product in a user's shopping cart. Product and offer recommendations can also be injected into email communications sent to users. Recommendations that are personalized, relevant, and appropriate can help increase user traffic, sales, and/or revenue and, therefore, they are important components of commercial websites and applications.

In order to generate a relevant recommendation, a recommendation engine takes into account one or more factors or data regarding the user and/or the content of the current webpage accessed by the user. Generally, the recommendation engine uses real-time information as well as historical information accumulated over large periods of time to generate the recommendation. Such a recommendation engine requires memory and processing power, which may vary depending on the volume of user traffic, the number of products or offers in the merchant's catalog, and the amount of historical data available. The recommendation engine also requires network bandwidth to serve the recommendation without an undesired latency delay.

FIG. 1is a block diagram of a system10for providing recommendations to a client100according to the prior art. As a user is viewing a webpage on the client100that is downloaded from a host110, the host110transmits a request for a recommendation to a recommendation backend120. The recommendation backend120includes a routing server130and a plurality of recommendation servers140a,140b,140c,140n. The recommendation servers140a,140b,140c,140neach include a logic processor150a,150b,150c,150n, and a memory160a,160b,160c,160n, respectively. Although the processors may vary between recommendation servers, each memory is a mirror image of the other memories. Each memory contains all the information that the respective server needs to respond to a recommendation request.

The routing server130receives the recommendation request and determines which recommendation server140a,140b,140c,140nto send the recommendation request to. The routing server130can take various factors into consideration to determine the appropriate recommendation server140a,140b,140c,140nto handle the recommendation request, such as the available capacity and the geographic location of each recommendation server. The routing server130then transmits the recommendation request to the appropriate recommendation server140ato process the request. Upon receiving the recommendation request, the processor150aqueries the memory160afor data relevant to the request. Such data can include personal information regarding the user, information regarding the webpage or website accessed by the user, and/or a list of products related to a product in the user's shopping cart. The processor150athen applies logic (e.g., a recommendation algorithm) to the data and returns a recommendation to the routing server130, which then transmits the recommendation to client100via the host110.

In response to the volume of recommendation requests (e.g., due to increased or decreased website traffic), the routing server130can adjust the number of recommendation servers140a,140b,140c,140nupwards or downwards. If the routing server130needs to deploy a new recommendation server140nin response to an increased volume of recommendation requests, the routing server130must first cause an existing recommendation server140cto copy its memory160cto the memory160nof the new server140n. Since the memory160cis very large, it may take several hours or more to copy memory160cto memory160n. Thus, it may take several hours or more to deploy the new recommendation server140n. Also, some of the bandwidth of server140cis diverted to bring new server140nonline. Since the backend120is overcapacity (or near overcapacity) until new server140nis brought online, the recommendation requests will take longer to process, which results in an undesired latency. For this reason, new recommendation servers are often deployed before their capacity is truly needed to allow for adequate time to copy the data to the new server. As a result, recommendation backends120generally operate at over capacity, which results in undesired costs and inefficiencies.

SUMMARY

The following description and drawings set forth certain illustrative implementations of the disclosure in detail, which are indicative of several exemplary ways in which the various principles of the disclosure may be carried out. The illustrative examples, however, are not exhaustive of the many possible embodiments of the disclosure. Other objects, advantages and novel features of the disclosure will be set forth in the following detailed description of the disclosure when considered in conjunction with the drawings.

Aspects of the invention are directed to the use of stateless servers or processors, which generally do not retain (store) information regarding the state of some or any transactions or conditions, e.g., session data from interactions with a client computer. A scalable recommendation engine includes stateless processors in communication with at least one memory server that stores contextual data. A router is configured to direct a recommendation request to a first stateless processor, which is configured to generate a recommendation using contextual data from the memory server. A controller monitors the available processing bandwidth of the stateless processors and deploys an additional stateless processor if the available processing bandwidth is less than a minimum available processing bandwidth threshold. The controller can remove from deployment a stateless processor if the available processing bandwidth is greater than a pre-set available processing bandwidth threshold, which can be referred to here as a maximum, pre-set maximum or pre-determined maximum bandwidth.

In an aspect, the invention includes a method of generating a recommendation for a user operating a client. The method comprises in a recommendation generation engine having an array of stateless processors in communication with a memory, receiving a recommendation request from a host. The method also comprises in said recommendation generation engine, directing said recommendation request to a first stateless processor in said array of stateless processors. The method also comprises in said first stateless processor, receiving contextual data in response to a contextual data query to said memory, said contextual data including a webpage currently accessed by said client. The method also comprises in said first stateless processor, generating said recommendation using said contextual data, said recommendation for a related content of said webpage.

In another aspect, the invention includes a method of controlling a processing capacity of a recommendation engine comprising a plurality of stateless processors and a plurality of memory servers. The method comprises monitoring an available processing bandwidth of said recommendation engine. The method also comprises determining if the available processing bandwidth is less than a minimum available processing bandwidth threshold. The method also comprises activating an additional stateless processor if the available processing bandwidth is less than the minimum available processing bandwidth threshold.

In another aspect, the invention includes a scalable recommendation engine. The recommendation engine comprises a plurality of stateless processors; at least one memory server in communication with the plurality of stateless processors, the memory server storing contextual data; a router in communication with the plurality of stateless processors to direct a recommendation request to a first stateless processor, wherein the first stateless processor is configured to generate a recommendation using said contextual data; and a controller in communication with the plurality of processors, the controller configured to monitor an available processing bandwidth of said plurality of processors and to deploy an additional stateless processor if the available processing bandwidth is less than a minimum available processing bandwidth threshold.

DETAILED DESCRIPTION

FIG. 2is a block diagram of a system20for providing recommendations to a client200according to an embodiment. The system20includes the client200, a host210, and a recommendation engine220. The recommendation engine220includes a router server230, a controller235, stateless logic processors240a,240b,240c,240n(generally240), and memory stores250a,250b,250c(generally250). The stateless logic processors240are servers or virtual servers that provide computing power for the recommendation engine220. In some embodiments, each logic processor240is identical. The logic processors240are stateless in that they do not permanently store the data needed to generate a recommendation. Instead, the data is stored in memory stores250, which can be accessed by the stateless processors240through a query.

Since the stateless logic processors240and memory stores250are decoupled, a new stateless logic processor240ncan be brought online quickly and independently because data does not need to be copied into a new memory store250nassociated with the new stateless logic processor240n. Also, since the logic processors240can be identical or substantially identical to one another, there is little configuration or lead time needed to bring a new stateless logic processor240online. For example the new stateless logic processor240only needs to load the recommendation service loaded and to retrieve configuration parameters (e.g., logic or rules for recommendations) prior to going online. Thus, the recommendation engine220can activate and deactivate the stateless logic processors240in close to real time as the capacity needs of the recommendation engine220fluctuate, providing a highly scalable recommendation engine220. For example, a new stateless logic processor240ncan be activated quickly if the recommendation engine220receives (or expects to receive) a surge in recommendation requests. Also, an existing stateless processor (e.g.,240c) can be deactivated if the volume of recommendation requests drops below a threshold value or the logic processors240are operating at greater than a pre-set maximum capacity (e.g., greater than 50% excess capacity). Since the logic processor (e.g.,240c) can be re-activated in short order, there is minimal risk in deactivating the logic processor.

The memory stores250can include one or more databases (or other methods of/structures for data storage) hosted in a cluster of on one or more servers and/or virtual servers. In some embodiments, the memory stores are Redis data servers or data server instances. In some embodiments, the memory stores250can communicate with one another. In addition, the servers and/or virtual servers in a given cluster can communicate with each other, for example to shard data across the cluster. A new memory store250can be brought online when extra storage capacity (e.g., for recommendation data) is needed and/or for geographic distribution of the memory store250(e.g., adding a memory store250in Europe to service the European market). For example, additional recommendation data can be driven by new customers, new products, or the like. Such a new memory store250can be brought online without having to bring a new stateless processor240online.

In operation, a user accesses the client200to view a webpage or an email promotional advertisement. The contents of the webpage are transmitted to the client200from the host210over a first network (e.g., a first wide area network). In parallel (or at any time), the host210and/or client200can send a request for a recommendation to the recommendation engine220. The recommendation request can include information relating to the user's browsing activity, the user's account information, the products in the user's shopping cart, the type of device operated by the user, and/or the time and/or date that the recommendation request was generated. The user's browsing activity can include the advertisement, promotional email, or URL link (e.g., a link for an advertisement, a link for a product or service, etc.) that the user accessed to generate the recommendation request. The request can be sent over an API.

The recommendation request is sent over a second network (e.g., a second wide area network), which can be the same or different than the first network. The router server230receives the recommendation request and selects a stateless logic processor240(e.g., stateless logic processor240a) to process the recommendation request. The router server230can select the stateless logic processor240based on the percentage of a pre-set maximum capacity at which the stateless logic processor240is operating, the geographic location of the stateless logic processor240, and/or the network bandwidth for the stateless logic processor240. The router server230then forwards the recommendation request to the appropriate stateless logic processor240(e.g., stateless processor240a). In some embodiments, the router server230is in communication with a load balancer to balance the processing workload across the available stateless processor240.

The controller235is in communication with the router server230over a network (e.g., a local area network or a wide area network). In some embodiments, the controller235and router server230are on the same server or virtual server. The controller235is configured to determine the available bandwidth of the stateless processors240, for example by sending queries to each logic processor240via the router server230. Alternatively, the available bandwidth of the stateless processors240is measured directly and/or pushed to the controller235. If the available processing bandwidth is less than a minimum pre-determined threshold value (e.g., 5%, 10%, or 20%), the controller235can deploy additional stateless processors240to increase the available processing bandwidth. In addition or in the alternative, the controller235can deploy additional stateless logic processors240in advance of an anticipated increase in recommendation requests even though the available processing bandwidth is greater than the minimum threshold value described above. For example, the controller235can deploy additional stateless logic processors240in advance of an email promotional campaign or due to other expected increases in recommendation request traffic (e.g., on Black Friday). Likewise, the controller235can decrease the number of stateless processors240if the available processing bandwidth is greater than a maximum pre-determined threshold value (e.g., 25%, 30%, or 35%). For example, the controller235can first increase the number of stateless logic processors240in advance of an email campaign and then decrease the number of stateless logic processors240after the associated surge in recommendation requests has ended. In another example, the controller235increases the number of processors240during the day and decreases the number of processors240during the night. Deployment of additional processors240can include allocating additional processors240(e.g., from a service provider such as Amazon Web Services) and configuring the processors240with the recommendation service including algorithms (as described herein) for providing recommendations and related business logic. In some embodiments, the processors240periodically fetch the algorithms and business logic from the advertiser/retailer/service provider to make sure they are up to date.

The stateless logic processor240evaluates the information (if any) associated with the recommendation request and determines what contextual data to request from the memory store250. The processor240then sends a query to an available memory store250(e.g., memory store250b) for the appropriate contextual data. In some embodiments, the stateless logic processor240sends the query to multiple memory stores250. The logic processor240can use the data from the first memory store250to respond to the query, or the logic processor240can use all responses. The contextual data can include the user's account number, the user's geographic location, the user's gender, the user's age, the user's website access history, the user's order history, the user's social media posts (or other social media interaction data), the contents of the webpage being accessed by the user, product reviews, product inventory, product pricing and sales, the product catalog, the popularity of each product, product ordering trends, the weather forecast, and similar information.

After the logic processor240receives the contextual data from the memory store250and stores the contextual data in a local memory or cache, the logic processor240applies an algorithm or other logic using at least some of the contextual data and the information received with the recommendation request to generate a relevant recommendation. At this stage, the logic processor240can apply any merchant-defined business rules to filter/influence the recommendations shown to the user. For example, the merchant might decide not to show any products on clearance to the user. Another example might be that the merchant might decide which brands are eligible to be shown to a user depending on the brand of the current product the user is browsing. Another example might be that the merchant prefers products with certain attributes (e.g., color, fit, style, etc.) over others to be shown as recommendations. The algorithms and business rules are processed and applied by logic processor240to generate a recommendation. The processor240then transmits the recommendation to the router server230, which forwards the recommendation to the host210to provide to the client200. In some embodiments, different algorithms can be applied to similar users, for example, to test the relative performance of the algorithms.

The recommendation can be for related content (e.g., a related news story) selected just for that particular user, a related product or service (e.g., tennis balls if the user is buying a tennis racket) selected just for that particular user, a promotion (e.g., a sale for men's clothing if the user is a male) selected just for that particular user, or a similar recommendation as understood by those skilled in the art.

In some embodiments, the router server230can send the recommendation request to multiple stateless processors240in order to obtain multiple recommendations based on different algorithms, and the results of the recommendations requests can be combined or merged together. For example, logic processor240amay apply an algorithm based on the user's gender and logic processor240bmay apply an algorithm based on the products in the user's shopping cart. The router server230or a third logic processor240ccan merge the two recommendations into a single recommendation for the user. Alternatively, the router server230or third logic processor240ccan provide both recommendations to the user. In some embodiments, the configuration parameters retrieved from the merchant can determine whether a recommendation request is sent to multiple processors250.

While operation of the recommendation engine220has been described with respect to a webpage or email, the recommendation engine220is not limited to these technologies. The recommendation engine220can be applied to any technology in which a recommendation is desired. For example, the recommendation engine220can be applied to applications, video games, online dating, smart phones, in-store advertisements, coupons (online or in-store printed at checkout), vending machines, e-book readers, or restaurants (e.g., menu recommendations).

In some embodiments, the recommendation engine220can be described as having an outer layer245of stateless logic processors240and an inner layer255of memory stores250. The number of stateless logic processors240in the outer layer245can be adjusted upwards or downwards based on the capacity needs of the recommendation engine220, the volume of recommendation requests received by the recommendation engine220, and/or the network traffic. The stateless logic processors240in the outer layer245communicate with the memory stores250in the inner layer255to access contextual data for generating the recommendations.

FIG. 3is a flow chart of a method30for generating a recommendation request according to an embodiment. The method30includes300receiving a recommendation request from a host. As discussed above, the recommendation request can include information relating to the user's browsing activity, the user's account information, the products in the user's shopping cart, the type of device operated by the user, and/or the time and/or date that the recommendation request was generated. The method also includes310directing the recommendation request to a first stateless logic processor. The recommendation request can be directed to the first stateless logic processor by a router or a router server as discussed above. The method also includes320receiving (e.g., at a stateless logic processor) contextual data in response to a query to a memory store. The method also includes330generating (e.g., at a stateless logic processor) a recommendation request using at least some of the contextual data.

FIG. 4is a flow chart of a method40for dynamically controlling the capacity of a recommendation engine. The method40includes400determining the available processing bandwidth of the stateless logic processors (e.g., stateless logic processors240). At410, the available processing bandwidth is compared to a minimum available processing bandwidth threshold. The minimum available processing bandwidth threshold can be set manually by an operator (e.g., through an administrator user interface) or it can be set automatically based on historical data or best practices. The minimum available processing bandwidth threshold can be 5%, 10%, 15%, 20%, or any value therebetween. If the available processing bandwidth is less than the minimum available processing bandwidth threshold, at420one or more additional stateless logic processors are deployed to increase the available processing bandwidth of the recommendation engine. In some embodiments, additional stateless logic processors are deployed iteratively. For example, a first additional stateless processors can be deployed and then the available processing bandwidth can be determined. If the available processing bandwidth is still less than the minimum processing bandwidth threshold, a second additional logic stateless processor can be deployed and then the available processing bandwidth can be determined again. This iterative process can continue until the available processing bandwidth is greater than the minimum available processing bandwidth threshold.

If the available processing bandwidth is not less than the minimum available processing bandwidth threshold, the method proceeds to430. At430, the available processing bandwidth is compared to the pre-set maximum available processing bandwidth threshold. The pre-set maximum available processing bandwidth threshold can be set manually by an operator (e.g., through an administrator user interface) or it can be set automatically based on historical data or best practices. The pre-set maximum available processing bandwidth threshold can be 40%, 45%, 50%, or any value therebetween. If the available processing bandwidth is greater than the pre-set maximum available processing bandwidth threshold, one or more excess stateless processors are released from deployment to reduce the excess processing bandwidth of the recommendation engine. In some embodiments, excess stateless logic processors can be released from deployment iteratively. For example, a first excess stateless logic processor can be released from deployment and then the available processing bandwidth can be determined. If the available processing bandwidth is still greater than the pre-set maximum available processing bandwidth threshold, a second excess stateless logic processor can be released from deployment and then the available processing bandwidth can be determined again. This iterative process can continue until the available processing bandwidth is less than the pre-set maximum available processing bandwidth threshold. In these sections, processing bandwidth may refer to CPU usage, memory usage, network usage, or a combination of these factors.

FIG. 5is a block diagram of a system50for providing recommendations to a client500according to another embodiment. The system50includes a host510, a router520, and a regional recommendation engine525. The regional recommendation engine525includes a load balancer530, stateless logic processors540A,540B,540C (generally540), a product server550, a cache server550, logging servers555, pre-computed recommendation servers560, real-time model scoring servers565, and analytics servers570. The regional recommendation engine525represents one of a plurality of recommendation engines that can be geographically distributed to provide fast response times.

Similar to the embodiments discussed above, the client500is in communication with the host510, for example by accessing a website or email server hosted by the host510. The client500or host510sends a request for a recommendation, which is transmitted to the router520. The router520directs the recommendation request to regional recommendation engine525. The regional recommendation engine525can be selected based on the relative locations of the client500and the recommendation engine525and/or the available processing bandwidth of the recommendation engine525. The router520can be a DNS latency router.

The recommendation request is sent to a load balancer530, which directs the request to a stateless logic processor cluster or layer545. The load balancer530determines the available processing bandwidth of each stateless logic processor540in the stateless logic processor cluster/layer545and directs the recommendation request to the stateless logic processor540with the most available processing bandwidth to distribute the processing load across the stateless processors540.

The stateless processors540are in communication with product server550, cache server555, logging servers560, pre-computed recommendation servers565, real-time model scoring servers570, and analytics servers575. The stateless processor540can query or call the pre-computed recommendation servers565for one or more pre-calculated recommendations. The pre-calculated recommendations can include the most popular products overall, the most popular products for customers from the same city or region, products that are commonly purchased together (e.g., shirts and ties), popular products for the current season, products on sale, etc. Pre-calculated recommendations can also include recommendations based on historical online activity and/or purchases by the customer. In addition, the stateless processor540can query or call the real-time model scoring servers570for one or more real-time recommendations based on the user's online activity. Examples of real-time recommendations include recommendations based on items in the user's shopping cart, recommendations based on the user's browsing history within the retailer's website, and recommendations based on the user's online activity generally (e.g., social media posts, web searches, etc.).

After the stateless processor540receives the recommendations from the pre-computed recommendation servers565and/or the real-time model scoring servers570, the stateless processor540can communicate with the product server550. For example, the product server550has a database of the product catalog offered by the retailer. Thus, the stateless processor540can query the product server550for the current product offerings that match the recommended products, such as the actual ties currently available in response to a recommendation for ties. The product server550also includes various metadata about each product, such as its price, whether it's on sale, whether it's a new product or a product near the end of its lifecycle, the inventory of the product, the season for which the product is intended (e.g., heavy coats for winter), etc. The stateless processor540can use the product metadata to select additional recommended products based on recommendations from pre-computed recommendation servers565and/or from real-time model scoring servers570. The stateless processor540can temporarily store data in cache server555while processing the recommendation request. For example, the cache server555can store intermediate and/or final calculations from stateless processor540to speed up subsequent responses.

The logging servers560can log the recommendation requests and the recommendations processed by the stateless processor540for later analysis. The analytics servers575can track user activity on retailer websites and compute certain metrics for later use. For example, the analytics servers575can be used to track the conversion rate (sales) of the recommended products and the methodology used to generate the recommendations.

FIG. 6is a flow chart60for recommending a product to a user. In step610, the stateless processor determines whether the user is known to the merchant. For example, the stateless processor can query a user database based on the user's email address, the user's IP address, data in a cookie on the user's device, etc. If the user is not known to the merchant, in step620the recommendation engine generates a preliminary recommendation based on aggregate sales data. For example, the recommendation engine can generate a preliminary recommendation based on the top products sold to users that have the same device or that live in the same location as the user for which the recommendation is intended. If the user is known to the merchant, in step630the recommendation engine determines whether it has any data on recent activity (e.g., browsing activity, products in shopping cart, etc.) for the user. If there is data for recent activity, the recommendation engine applies a recent activity machine learning model640to generate a preliminary recommendation. The recent machine learning model640uses only very recent activity to generate the preliminary recommendations. If there is no data for recent activity, the recommendation engine applies a historic activity machine learning model650to generate a preliminary recommendation. The historic activity machine learning model650uses all available historical data for the user to generate the preliminary recommendations. In some embodiments, both the recommendation engine applies both the recent activity machine learning model640and the historic activity machine learning model650.

The output of the recent activity machine learning model640and/or the historic activity machine learning model650is merged at step660(though no merger is necessary if only one of models640and650is applied). The output of step660is combined with the output of step620at step670to provide a combined preliminary recommendation output. In other words, the preliminary recommendations generated at step620(unknown user model) are merged with the preliminary recommendations from steps640and/or650(known user models) to provide a superset of preliminary recommendations. At step680, business rules are applied to the combined preliminary recommendation output to generate a final recommendation, which is returned to the host/user at step690. The business rules applied in step680can include which products are on sale, which products the merchant wants to promote, which products are in season, etc., as discussed above.

As would now be appreciated, the above systems and methods allow for the dynamic increase or decrease in processing bandwidth of a recommendation engine. Such systems and methods can reduce the undesired processing latency in recommendation engines that operate at overcapacity while additional processing power is brought online. The systems and methods can also provide cost savings because the recommendation engine does not need to operate at overcapacity since additional processing power can be deployed dynamically. As such, the excess processing power can be released for more productive use within an enterprise or released back to the cloud provider (e.g., Amazon).

The present invention should not be considered limited to the particular embodiments described above, but rather should be understood to cover all aspects of the invention as fairly set out in the present claims. Various modifications, equivalent processes, as well as numerous structures to which the present invention may be applicable, will be readily apparent to those skilled in the art to which the present invention is directed upon review of the present disclosure. The claims are intended to cover such modifications.