Machine Learning meets the Cloud: Intelligent Prefetching

,

Machine Learning Meets The Cloud: Intelligent Prefetching

Cloud technologies have been around for many years enabling companies to offer better services and be more agile. For most people, cloud only means serverless storage of documents and photos. But the cloud has a lot more services to offer, especially to facilitate the development of data-driven solutions.

At IIH Nordic we use Cloud technologies extensively to support our products, and a good example of that is our engine to improve load speed: Intelligent Prefetching. In a nutshell, Intelligent Prefetching is a tool that predicts the page that a web user will visit next, and instructs the browser to preload its content. When the user finally clicks on the link, the page content has already been cached and the page will load almost instantaneously. And this tool can be integrated into the site without modifying a single page.

Improving load speed with Intelligent Prefetching

As an example, if we predict the next page accurately in 80% of the visits, and the load time of a page is decreased from 5 to 2 seconds, the average load time will go down from 5 to 2.6. But what is more interesting than the average, the page will continue to work as usual for visitors with an unexpected session; but the rest of visitors will experience pages loading within 2 seconds. This reduction can turn into shorter sessions (visitors that find what they are looking for in a shorter time) and more page views (on the same time span, visitors can load more pages) which together can contribute to more conversions.

Seamless Deployment with Tag Managers

Tag manager systems like Tealium and Google Tag Manager are primarily used to decouple the content of a page from the code that tracks how that content is consumed. They allow web analysts to work in parallel with content producers, and let analysts upgrade the tracking code without involving IT personnel or requiring any downtime on the site.

Despite the focus on tracking, tag manager systems provide a general solution to inject code into a site and therefore we can use them to deploy Intelligent Prefetching. The advantages are twofold, first, as the analytics data that we use to build the model comes from the tag manager, we can also send the data live to the predictor without adding a tracking overhead. The second advantage is that we require minimal-to-no-involvement of content creators and IT specialists, allowing a shorter deployment period that does not burden the customer teams.

The Intelligent Prefetching engine predicts and prefetches the next page before the user clicks

After adding few tags to an existing tag manager installation, a website can start to prefetch the resources of upcoming pages and track the load time savings.

Scalable Predictions with Serverless Infrastructure

Rather than looking at the most common pages across users, Intelligent Prefetching uses personalised predictions for every user, using anonymous information from their current session.

These predictions rely on complex models that require significant memory and processor time. Running those models in the browser would be counterproductive as it would slow down the page while trying to speed it up. We have solved this problem by moving the predictive model into a web service that the browser queries when a user is viewing a new page.

This web service needs to respond in a fraction of a second to every request, regardless of increasing traffic volume. We have met this requirement by developing our solution with a combination of Google Cloud services (including App Engine and ML Cloud) to process the requests from all users in different sites, in a timely and secure manner. These services scale automatically the number of servers to match the demand of requests, keeping the cost of operations low and the latency of the service constant. It also allows us to decrease the deployment time of Intelligent Prefetching as we do not have to purchase, install and test new hardware with every new deal.

Scalable predictions with serverless infrastructure

Serverless Model Training

As websites and user behaviour change across time, the predictive models need to be updated (re-trained in machine learning jargon) periodically. Training a model includes collecting, cleaning and transforming the data as well as fitting the parameters of the model (e.g. a neural network). For Intelligent Prefetching we use enriched web analytics data that contains the sequence of pages that every anonymous user views, among other session information like device and browser.

We utilise Google transfer services to securely pull the data from the customers preferred analytics service into a private data lake in the cloud (BigQuery). From there, we rely again on a combination of cloud services to process the data, train and test new predictive models, and updating the prediction web service automatically.

The scalability of the cloud allows us in this case to use more or less computational power to build the models depending on how much data the website produces and how often we have to update the models. Note that for a slow changing website (e.g. a company site with fixed products and only a monthly campaign) we would suggest 1 monthly update while for a fast changing website (e.g. a news site that adds content in real time) daily updates would be required. In the former case, we can train the model within 24 hours but in the latter case the model needs to be trained and tested within few hours. By training machine learning models in the cloud, we can add more machines, more processors or more GPUs to match the demands of the customer. Although the price of the services will go up, we can scale up the training cloud infrastructure to even retrain the models within minutes.

Using cloud technologies the predictive models are scalable

Beyond Load Speed

Intelligent Prefetching provides a solution for high-traffic sites that want to improve conversion without making changes to the site’s design and infrastructure. But it also showcases how we can harness the power of the cloud to predict user behaviour on-the-fly. With some adjustments, this solution can be tuned to detect users likely to make a purchase or recommend products that match viewers’ interests. Cloud technologies make it possible for us to focus on finding the best business cases for our customers and creating the most accurate models, without having to worry about service latency, availability and security.

At IIH Nordic we believe that machine learning and artificial intelligence can make a difference for any business. If you do too, but need help developing the solution, do not hesitate to get in touch.

1 reply
  1. Rishi Rawat
    Rishi Rawat says:

    Hello, Hector. I’m not a super technical person. My friend, who is super technical, suggested I read this post. And boy am I glad I did. I can clearly see the business applications for this. Especially for mobile sites being accessed by phones in spotty network areas. Prefetching important pages could be the difference between “just another visit” and “contact form submission”. Thanks a lot.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *