Deep Learning for Website Traffic Forecasting
Deep Learning for Website Traffic Forecasting
[Link]
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at [Link]
Abstract: Nowadays, there is an increasing emphasis on how to predict traffic on web pages, and there is a need to explore
different methods for effectively predicting future values of multiple time series. Evaluating website traffic on a web server is
crucial for web service providers because, without proper demand forecasting, customers might face long waiting times and
abandon the website. However, this is a difficult task because it requires reliable predictions based on the arbitrariness of human
behavior. The most effective way of transmitting information would be to predict network traffic and display it visually.
Nowadays we depend too much on Google's servers, but if we wanted to host a server for many people, we might have predicted
in advance the number of users to prevent server failure. Time series prediction is important in many different areas. Although
there are already many systems and models for predicting Internet traffic flow, most of them use shallow traffic models and are
still somewhat unsatisfactory. Therefore, we will use deep learning techniques based on current and past data to predict future
traffic.
Keywords: website traffic, servers, time series forecasting.
I. INTRODUCTION
Website traffic analysis and prediction have many applications in various fields and have been the subject of numerous studies. It is
a proactive approach that helps ensure secure, reliable, and high-quality web communications. Web traffic is the amount of data sent
and received by visitors to a website, determined by the number of visitors and the number of pages they visit. Website owners often
use web traffic tools to monitor incoming and outgoing traffic, for example, to determine the popularity of web pages based on page
views; information collected about website traffic can help structure website content and address security issues such as denial-of-
service (Dos) attacks. Web traffic is measured in visits, sometimes called "sessions," and is a common way to measure the
effectiveness of an online business in attracting an audience. Web traffic measurement is used to check the popularity of websites or
specific web pages on that website. Each time a user visits the website, a page visit is generated. Any user who is connected to the
Internet will always visit at least one page and could visit many more if they stay connected. Monitoring web traffic requires
information such as the total number of visitors, average page views per visitor, most popular pages, average visits by visitors, and
duration of page views, etc. , which are commonly used to predict web traffic. We will take an in-depth look at the web traffic
dataset and how we can use LSTM to solve this time series prediction problem.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2654
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at [Link]
2) It is easy to implement and has manageable computational complexity. The effects of the LSTM network, BPNN model, and
ARIMA model on time series recorded at a single point are compared in the paper [5]. Under typical conditions, the proposed
LSTM network can accurately predict traffic flow based on a relatively constant time series. In contrast, the traffic system on
roadways is stochastic and complex and is often affected by unusual circumstances such as severe weather, traffic accidents, and
major events.
The flow of the project is explained in detail in the architecture diagram. We start with a dataset containing the features hour index
and sessions. To identify trends, we examine the data. Create training and validation sets from the dataset. Two models, LSTM and
CNN, were created, using the training data to feed the models and the validation data to test the models. To compare the
performances of the different models, determine the mean square error. Use line graphs with the hour index on the X-axis and the
sessions on the Y-axis to compare the performance of the two models.
IV. IMPLEMENTATION
In the first step is to Load Dataset for Web Traffic Forecasting and that dataset is a Wikipedia data Here we are reading the dataset
by using pandas. It has over 4800 observations. Check the shape of the dataset to understand the features and number of hours. The
first column is the hours as in this is the first hour, this is the second hour, and so on. And the second column session is the volume
of traffic at an hourly level. For example, this is the number of sessions in the second hour and so on. 4.1 Data Exploration for Web
Traffic Forecasting
Examine the data and plot the entire time series. At each point on this curve, which represents an early session count, there are some
recurring patterns in the time series.
After almost equal time intervals, the traffic volume decreases. That being said, there are some traffic peaks in this graph as well.
Let us examine this data in more detail. Instead of using the whole time series, we can use a part of it. We can see that the repeated
pattern is more apparent now that we have only shown the first week's data.
These dips in the online traffic graph can occur once every 24 hours. So it is obvious that there are two times in the day when traffic
is high, such as occasionally, and when it is low.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2655
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at [Link]
Fig 4.1.2 says the repeating pattern is more apparent now that we have shown only the first week's data. These dips in the online
traffic graph can occur once every 24 hours. So it is obvious that there are two times in the day when traffic is high, such as
occasionally, and when it is low.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2656
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at [Link]
This red curve is the actual value and this yellow curve is the predicted value both are pretty much close to each other.
The below fig 4.4.2 describes the prediction of 24 hours data using LSTM in which the X-axis is the Hour index and Y-axis is the
sessions
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2657
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 11 Issue IV Apr 2023- Available at [Link]
The above fig 4.6 describes the prediction of 24 hours data using CNN in which the X-axis is the Hour index and Y-axis is the
sessions.
VI. CONCLUSION
The main goal of our research is to develop a consistent forecasting model for predicting future web page traffic. Time series
prediction of web traffic can be performed more efficiently and accurately using recurrent neural networks with long-term memory
and CNN. We trained the model with this data using features such as the hours and number of visits, i.e., sessions for pages for one
year to predict future web traffic. It is possible to predict the number of users that will access the website in the future. The proposed
system will continue to improve as more user data is fed in. Our system can be used on all websites to improve Internet load
management and business analysis. LSTM RNN brings more efficiency to our system. Moreover, despite the limited amount of data
we had available, we achieved quite good results in training the LSTM. In future work, we plan to deepen the extraction of hidden
patterns to improve the efficiency of the LSTM and to study how human behavior affects web traffic. To improve the performance
of our model, we will investigate the unsupervised model proposed in previous work
REFERENCES
[1] Navyasree Petluri and Eyhab Al-Masri, "Wikipedia Page Traffic Prediction," 2018 IEEE International Conference on Big Data (Big Data).
[2] Mohammad Asifur Rahman Shuvo, Muhtadi Zubair, Afsara Tahsin Purnota, Sarowar Hossain, and Muhammad Iqbal Hossain, "Traffic Forecasting Using
Time-Series Analysis," 6th International Conference on Inventive Computation Technologies, 2021. (ICICT).
[3] Partha Sarathi Mangipudi and Rishabh Madan, "Predicting Computer Network Traffic: A Time Series Forecasting Approach Using DWT, ARIMA, and RNN,"
2018 Eleventh International Conference on Contemporary Computing (IC3).
[4] Jianhu Zheng and Mingfang Huang, "Traffic Flow Forecasting Using Deep Learning and Time Series Analysis," IEEE Access, 2020. P Montero-Manso.
[5] Montero-Manso, P.; Athanasopoulos, G.; Hyndman, R.J.; Talagala, T.S. Fforma: Featurebased forecast model averaging. Int. J. Forecast. 2020,36, 86–92.
[6] Boone, T.; Ganeshan, R.; Jain, A.; Sanders, N.R. Forecasting sales in the supply chain: Consumer analytics in the big data era. Int. J. Forecast. 2019,35,170–
1801
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2658
Time series forecasting in web traffic prediction differentiates from traditional analytical methods by employing models that can analyze sequential data over time to detect trends, cycles, and seasonal patterns. Unlike traditional methods that may focus on static or linear projections, time series forecasting can dynamically adjust to changes in traffic data, providing more accurate and timely predictions. Techniques like LSTM are particularly adept at modeling complex dependencies in datasets that traditional linear models cannot account for .
The primary challenges faced in predicting website traffic include the arbitrary nature of human behavior, non-linear and rapidly fluctuating data, and the difficulty in capturing seasonal fluctuations. Deep learning approaches like LSTM mitigate these issues by learning from historical data to model non-linear dependencies and detect complex patterns and trends. This capacity for recognizing intricate data patterns allows deep learning models to outperform traditional prediction techniques .
Monitoring web traffic is critical for maintaining effective online business operations because it allows businesses to understand user engagement levels and prepare for peak usage times, reducing the risks of server overloads and site crashes. Particularly during events like sales or holidays, when traffic is high, understanding these patterns ensures better resource allocation to maintain smooth operations, thus preventing potential revenue loss and ensuring customer satisfaction .
Current recurrent neural network models, including LSTM, can be limited by their requirement for vast amounts of data for training, challenges in capturing extremely complex temporal dependencies, and susceptibility to overfitting. Strategies to overcome these limitations include using more sophisticated architectures that integrate attention mechanisms to focus on significant time steps, employing dropouts and regularization techniques to prevent overfitting, and leveraging ensemble methods to combine predictions from multiple models for better generalization .
Understanding patterns in web traffic can help businesses enhance user experience by allowing them to predict high traffic times, thus ensuring that their servers are prepared to handle increased loads and prevent slowdowns, which are often detrimental to user satisfaction. Additionally, monitoring traffic can identify unusual spikes that may indicate security threats, such as denial-of-service attacks. Consequently, businesses can structure their web content effectively and implement robust security measures to protect against such threats .
Using historical data in time series prediction for web traffic is significant as it helps in identifying and modeling recurring patterns, trends, and seasonality within the data, which are critical for making accurate future predictions. Historical data provides the context that deep learning models need to understand variations and predict traffic effectively. This practice leads to more robust models that can adapt to changes over time, improving the model's prediction accuracy .
A Convolutional Neural Network (CNN) might be advantageous over an LSTM model for web traffic forecasting when dealing with large datasets where spatial hierarchies in data points are more relevant than temporal sequences. CNNs are proficient in recognizing spatial patterns and can be computationally less intensive compared to LSTM, making them beneficial for real-time web traffic prediction when speed is critical. However, when the primary goal is to capture temporal dependencies, LSTM would generally perform better .
A modular and scalable architecture offers key benefits such as ease of adaptation and minimal changes when applied to different environments, whether a closed computer network or a public website. Such architecture can effectively handle increased demand and various user levels, which is crucial for preventing website crashes due to unexpectedly high traffic. Moreover, it allows integration of different prediction models and the ability to expand the system as needed .
Deep learning techniques like Long Short-Term Memory (LSTM) improve the accuracy of web traffic forecasts by effectively capturing complex patterns such as seasonality and long-term trends that are not easily modeled by traditional models like ARIMA. LSTM can manage nonlinear relationships between data points, which is crucial for predicting web traffic that can be influenced by various unpredictable factors. In contrast, ARIMA is best suited for linear time series and is less efficient in handling the non-linearity and sudden fluctuations within web traffic data .
Future improvements in web traffic prediction models, such as incorporating unsupervised learning to detect hidden trends, could significantly impact congestion control by allowing businesses to anticipate and manage high traffic loads more effectively. Enhanced models can predict not only volume but also type of traffic, enabling businesses to optimize server capacity, improve customer interaction, and make informed decisions about infrastructure investments and marketing strategies .