Table of Contents....4
About the Authors....11
About the Technical Reviewer....13
Chapter 1: Introduction....14
1.1 Overview of Network Traffic Monitoring and Analysis....14
1.1.1 Importance of NTMA....17
1.1.2 Key Objectives of NTMA....18
1.1.3 Network Traffic Components....19
1.1.4 NTMA Techniques and Methodologies....21
1.1.5 Challenges of NTMA....24
1.1.6 Use Cases of NTMA....25
1.1.7 Emerging Trends in NTMA....27
1.1.8 Bridging the Gap between NTMA and User Experience....27
1.2 Overview of Video Quality Assessment....28
1.2.1 Significance of VQA....30
1.2.2 Factors Affecting Video Quality....31
1.2.3 Evolution of VQA Approaches....33
1.2.4 Real-World Applications of VQA....36
1.2.5 Challenges in VQA....37
1.2.6 Emerging Trends in VQA....39
1.3 Machine Learning in JavaScript....40
1.3.1 Introduction to Machine Learning....40
1.3.2 Coupling JavaScript with Machine Learning....42
1.3.3 Data Preparation and Preprocessing in JavaScript....43
1.3.4 Supervised Learning with JavaScript....45
1.3.5 Unsupervised Learning with JavaScript....46
1.3.6 Deep Learning in JavaScript....47
1.3.7 Deploying Machine Learning Models in Web Applications....49
1.4 Node.js and Networking....51
1.5 Book Overview....52
1.6 References – Chapter 1....54
Chapter 2: Network Traffic Monitoring and Analysis....63
2.1 NTMA Fundamentals....63
2.1.1 Data Sources and Collection....66
2.1.2 Key Metrics....67
2.1.3 Data Preprocessing and Cleaning....69
2.1.4 Network Topology and Architecture....70
2.1.5 Data-Driven Analytics....73
2.1.6 Supervised Learning for Traffic Classification....74
2.1.7 Unsupervised Learning for Anomaly Detection....75
2.1.8 Predictive Analytics....76
2.1.9 Real-time AI-Based Decision Support....78
2.2 Existing NTMA Applications....80
2.2.1 SolarWinds NetFlow Traffic Analyzer....80
2.2.2 Paessler PRTG Network Monitor....80
2.2.3 Wireshark....82
2.2.4 ManageEngine NetFlow Analyzer....84
2.2.5 Site24x7 Network Monitoring....85
2.2.6 Prometheus....86
2.2.7 Commercial vs. Open-Source Solutions....88
2.2.8 Challenges and Considerations....88
2.3 State-of-the-Art Review of NTMA....90
2.3.1 Background of NTMA....90
2.3.2 The Rise of Machine Learning....90
2.3.3 Machine Learning Algorithms to Classify Network Traffic....91
2.3.4 Machine Learning Algorithms to Predict Network Traffic....96
2.4 Summary....101
2.5 References – Chapter 2....101
Chapter 3: Video Quality Assessment....109
3.1 VQA Fundamentals....109
3.1.1 Video Quality Metrics....111
3.1.2 Human Perception in Video Quality....113
3.1.3 Video Quality Attributes....114
3.1.4 The Optimal VQA Strategy....116
3.1.5 Quality of Experience (QoE) Metrics....117
3.1.6 Quality of Service (QoS) Metrics....119
3.1.7 Quality of Performance (QoP) Metrics....120
3.1.8 Subjective VQA....120
3.1.9 Objective VQA....121
3.1.10 Quality Metrics for Network, Video, and Streaming....122
3.1.11 Video Quality Databases and Benchmarking....123
3.1.12 Temporal and Spatial Considerations in VQA....124
3.1.13 VQA for Evolving Video Content....125
3.2 Existing VQA Applications....127
3.2.1 Sentry by Telestream....127
3.2.2 Real-Time Media Assessment (RTMA) by ThinkTel....128
3.2.3 Witbe....128
3.2.4 ViCue Soft....129
3.2.5 AccepTV Video Quality Monitor....130
3.2.6 VQEG Image Quality Evaluation Tool (VIQET)....130
3.3 State-of-the-Art Review of VQA....132
3.3.1 Background of VQA....132
3.3.2 Machine Learning in VQA....133
3.3.3 Machine Learning Algorithms to Analyze Video Quality in Multimedia Communications....134
3.4 Summary....143
3.5 References – Chapter 3....143
Chapter 4: Machine Learning Techniques for NTMA and VQA....153
4.1 Classification Model for NTMA....153
4.1.1 Data Collection for Classification....154
4.1.2 K-Nearest Neighbor (KNN) Algorithm....156
4.1.3 Data Preparation for Classification....156
4.1.4 Shorthand Example for KNN....157
4.2 Prediction Model for NTMA....158
4.2.1 Multilayer Perceptron (MLP) Algorithm....158
4.2.2 Hyperparameters....159
4.2.3 Data Preparation for Time-Series Prediction....160
4.2.4 Sliding Window Concept....161
4.2.5 MLP for Time-Series Network Traffic Prediction....162
4.2.6 Short-hand Example for MLP....163
4.3 SVM for VQA....169
4.3.1 Blind Image Quality Assessment Using Distortion Aggravation....170
4.3.2 Preliminary Steps....170
4.3.3 Extraction of LBP Features....171
Process and Equations....171
Illustrations and Coding Procedure....172
4.3.4 Distortion Aggravation....177
JPEG Compression....177
JPEG2000 Compression....178
Gaussian Blur....178
White Noise....178
4.3.5 Similarity Index....179
4.3.6 Scaling....181
4.3.7 Using SVM for Prediction....183
4.4 Summary....183
4.5 References – Chapter 4....184
Chapter 5: NTMA Application with JavaScript....187
5.1 System Model for NTMA....187
5.1.1 Components and Functionalities....189
5.1.2 Prediction and Classification of Network Traffic....191
5.1.3 NTMA Application Layout....191
5.1.4 Client–Server Interaction....193
5.2 Client Program Structure for NTMA....194
5.2.1 Configuring Extension Settings and Permissions....195
5.2.2 Configuring the Background Script....197
5.2.3 Building the User Interface....198
File Functionality....198
Libraries and Required Resources....199
Creating the Document Structure....200
Adding the Document Details and References to External Resources....200
Adding the Graph and Dashboard Components....201
Styling the Components through Internal CSS....205
Adding the User Interface to Google Chrome....210
Visualizing the User Interface....212
5.2.4 Building the Client Script....213
File Functionality....213
Creating the Script Structure....214
Initializing and Configuring the Chart on Page Load....215
Real-Time WebSocket Communication and Dynamic Graph Updates....219
Real-Time Chart Update Mechanism....225
5.3 Server Program Structure for NTMA....226
5.3.1 Libraries and Required Resources....229
5.3.2 Adding Libraries....229
5.3.3 Declaring Global Variables....230
5.3.4 Fetching Local Databases....231
5.3.5 Creating a WebSocket Server....232
5.3.6 Listening for a Client Connection Request....233
Getting Messages from the Client....234
Measuring Latency....235
Measuring Network Traffic and Sending Real-Time Metrics to the Client....237
5.3.7 Method for Time-Series Prediction with MLP Regression....241
5.3.8 Method for Calculating the QoS Score....248
5.3.9 Method for Classifying the Device Activity....251
5.4 NTMA Application Testing and Deployment....256
5.5 Summary....259
5.6 References – Chapter 5....261
Chapter 6: Video Quality Assessment Application Development with JavaScript....262
6.1 System Model for VQA....262
6.1.1 Components and Functionalities....264
6.1.2 Prediction of an MOS Score for Video Quality....266
6.1.3 VQA Application Layout....266
6.1.4 Client–Server–Servlet Interaction....267
6.2 Client Program Structure for VQA....268
6.2.1 Configuring Extension Settings and Permissions....269
6.2.2 Configuring the Background Script....271
6.2.3 Building the User Interface....271
File Functionality....272
Libraries and Required Resources....273
Creating the Document Structure....273
Adding the Document Details and References to External Resources....274
Adding the Graph and Dashboard Components....275
Styling the Components through Internal CSS....279
Adding the User Interface to Google Chrome....282
Visualizing the User Interface....284
6.2.4 Building the Client Script....285
File Functionality....285
Creating the Script Structure....287
Initializing and Configuring the Chart on Page Load....288
Real-Time WebSocket Communication and Dynamic Graph Updates....292
Real-Time Chart Update Mechanism....298
6.3 Server Program Structure for VQA....299
6.3.1 Libraries and Required Resources....301
6.3.2 Adding Libraries....301
6.3.3 Declaring Global Variables....302
6.3.4 Emptying the Screenshot Folders....303
6.3.5 Creating a WebSocket Server....304
6.3.6 Listening for a Client Connection Request....304
Receiving Metadata and Site Data....306
Reconstructing and Cropping the Image....307
Querying the Servlet and Handling the Response....310
6.4 Servlet Program Structure for VQA....314
6.4.1 Creating a Java Servlet in Eclipse....316
6.4.2 Libraries and Required Resources....320
6.4.3 Adding Libraries....321
6.4.4 Adding Imports....323
6.4.5 Declaring Global Variables....324
6.4.6 Handling an HTTP POST Request from a Client....326
6.4.7 Extracting the LBP Features....335
LBP Pattern for Original Image....336
Binarization Process for Gaussian Blur....338
Binarization Process for White Noise....339
Binarization Process for JPEG Compression....340
Binarization Process for JPEG2000 Compression....341
6.4.8 Applying Distortions....342
Applying Gaussian Blur for Blurring....342
Applying White Noise for Noising....347
Applying JPEG Compression for Blocking....350
Applying JPEG2000 Compression for Ringing....352
6.4.9 Calculating the Similarity Index....355
6.4.10 Scaling the Similarity Scores....357
Implementing the Runner....357
Displaying Usage Information....365
File Handling and Buffer Management....366
Scaling Target and Attribute Values....367
6.4.11 Printing Utilities....369
6.4.12 Predicting the MOS....369
6.5 VQA Application Testing and Deployment....374
6.6 Summary....381
6.7 References – Chapter 6....382
Chapter 7: NTMA and VQA Integration....384
7.1 System Model for Integrated NTMA and VQA Application....384
7.1.1 Components and Functionalities....386
7.1.2 Prediction and Classification of Network Traffic with Video Quality Metrics....387
7.1.3 Integrated NTMA/VQA Application Layout....388
7.1.4 Client–Server–Servlet Interaction....390
7.2 Client Program Structure for Integrated NTMA/VQA Application....390
7.2.1 Configuring Extension Settings and Permissions....391
7.2.2 Configuring the Background Script....393
7.2.3 Building the User Interface....393
File Functionality....394
Libraries and Required Resources....395
Creating the Document Structure....396
Adding the Document Details and References to External Resources....396
Adding the Toggle, Graphs, and Dashboard Components....397
Styling the Components through Internal CSS....403
Adding the User Interface to Google Chrome....409
Visualizing the User Interface....410
7.2.4 Building the Client Script....411
File Functionality....411
Creating the Script Structure....412
Initializing and Configuring the Charts on Page Load....413
Real-Time WebSocket Communication and Dynamic Graph Updates....421
Real-Time Chart Update Mechanism....430
7.3 Server Program Structure for Integrated NTMA/VQA Application....431
7.3.1 Libraries and Required Resources....432
7.3.2 Adding Libraries....433
7.3.3 Declaring Global Variables....434
7.3.4 Emptying the Screenshot Folders....436
7.3.5 Fetching the Local Databases....436
7.3.6 Creating a WebSocket Server....437
7.3.7 Listening for a Client Connection....437
Adding the VQA Block....438
Adding the NTMA Block....446
7.3.8 Prediction, Classification, and Network Score Computation Methods....451
7.4 Integrated NTMA/VQA Application Testing and Deployment....451
7.5 Summary....458
7.6 References–Chapter 7....459
Index....461
This book offers both theoretical insights and hands-on experience in understanding and building machine learning-based Network Traffic Monitoring and Analysis (NTMA) and Video Quality Assessment (VQA) applications using JavaScript. JavaScript provides the flexibility to deploy these applications across various devices and web browsers.
The book begins by delving into NTMA, explaining fundamental concepts and providing an overview of existing applications and research within this domain. It also goes into the essentials of VQA and offers a survey of the latest developments in VQA algorithms. The book includes a thorough examination of machine learning algorithms that find application in both NTMA and VQA, with a specific emphasis on classification and prediction algorithms such as the Multi-Layer Perceptron and Support Vector Machine. The book also explores the software architecture of the NTMA client-server application. This architecture is meticulously developed using HTML, CSS, Node.js, and JavaScript. Practical aspects of developing the Video Quality Assessment (VQA) model using JavaScript and Java are presented. Lastly, the book provides detailed guidance on implementing a complete system model that seamlessly merges NTMA and VQA into a unified web application, all built upon a client-server paradigm.
By the end of the book, you will understand NTMA and VQA concepts and will be able to apply machine learning to both domains and develop and deploy your own NTMA and VQA applications using JavaScript and Node.js.
Software professionals and machine learning engineers involved in the fields of networking and telecommunications