PHÂN LOẠI LUỒNG DỮ LIỆU SỬ DỤNG MẠNG NƠ-RON LUẬN VĂN THẠC SĨ KỸ THUẬT ĐIỆN TỬ

80 11 0
PHÂN LOẠI LUỒNG DỮ LIỆU SỬ DỤNG MẠNG NƠ-RON LUẬN VĂN THẠC SĨ KỸ THUẬT ĐIỆN TỬ

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

ĐẠI HỌC ĐÀ NẴNG TRƯỜNG ĐẠI HỌC BÁCH KHOA - TRẦN VĂN LÍC PHÂN LOẠI LUỒNG DỮ LIỆU SỬ DỤNG MẠNG NƠ-RON LUẬN VĂN THẠC SĨ KỸ THUẬT ĐIỆN TỬ Đà Nẵng – Năm 2019 ĐẠI HỌC ĐÀ NẴNG TRƯỜNG ĐẠI HỌC BÁCH KHOA - TRẦN VĂN LÍC PHÂN LOẠI LUỒNG DỮ LIỆU SỬ DỤNG MẠNG NƠ-RON Chuyên ngành Mã số : : KỸ THUẬT ĐIỆN TỬ 8520203 LUẬN VĂN THẠC SĨ NGƯỜI HƯỚNG DẪN KHOA HỌC TS PHAN TRẦN ĐĂNG KHOA Đà Nẵng – Năm 2019 i LỜI CAM ĐOAN Tôi cam đoan cơng trình nghiên cứu riêng tôi.Các số liệu, kết nêu luận văn trung thực chưa công bố cơng trình khác Tác giả luận văn ký ghi rõ họ tên Trần Văn Líc ii LỜI CẢM ƠN Để hồn thành luận văn này, tơi xin gửi lời cảm ơn đến TS Phan Trần Đăng Khoa tận tình hướng dẫn suốt trình thực hiện luận án Tôi xin chân thành cảm ơn quý Thầy, Cô khoa Điện tử – Viễn thông, Đại Học Bách Khoa – Đại học Đà Nẵng tận tình truyền đạt kiến thức suốt thời gian học Tôi gửi lời cảm ơn tới hãng NVIDIA gửi tặng GPU Titan V cho nhóm CIVIC phục vụ nghiên cứu luận án này, giúp cho kết cách nhanh chóng iii MỤC LỤC LỜI CAM ĐOAN .i LỜI CẢM ƠN ii TÓM TẮT LUẬN VĂN v DANH MỤC CÁC KÝ HIỆU, CÁC CHỮ VIẾT TẮT vi DANH MỤC CÁC BẢNG vii DANH MỤC CÁC HÌNH viii MỞ ĐẦU 10 CHƯƠNG .12 GIỚI THIỆU TỔNG QUAN VỀ ĐỀ TÀI 12 1.1 Giới thiệu .12 1.2 Các nghiên cứu liên quan .14 1.3 Mục tiêu nghiên cứu 16 CHƯƠNG .17 LÝ THUYẾT VỀ MẠNG NƠ-RON VÀ LUỒNG DỮ LIỆU MẠNG 17 2.1 Luồng liệu mạng .17 2.2 Mạng nơ-ron 18 Kiến trúc mạng Nơ-ron 18 Thuật toán lan truyền ngược 21 Hàm softmax cross-entropy 23 Overfitting 24 2.3 Kết luận chương 28 CHƯƠNG .29 MƠ HÌNH PHÂN LOẠI LUỒNG DỮ LIỆU SỬ DỤNG MẠNG NƠ-RON .29 iv 3.1 Cơ sở liệu 29 3.2 Xử lý tập liệu 32 Phân tích sở liệu 32 Chuẩn hóa thuộc tính định danh 33 Chuẩn hóa liệu đầu vào (kích thước) 34 Phân bố sở liệu 35 Giảm số chiều không gian đặc trưng 36 Gia tăng sở liệu .38 3.3 Cấu hình mạng nơ-ron 39 3.4 Kết luận chương 40 CHƯƠNG .41 KẾT QUẢ MƠ PHỊNG VÀ ĐÁNH GIÁ 41 4.1 Điều kiện tiến hành mô .41 4.2 Tiêu chí đánh giá 41 4.3 Đánh giá kiến trúc mạng nơ-ron 41 4.4 Đánh giá ảnh hưởng số lượng đặc trưng 43 4.5 Đánh giá ảnh hưởng việc gia tăng liệu .49 4.6 Đánh giá độ ổn định mơ hình theo thời gian 52 4.7 Kết luận chương 54 KẾT LUẬN VÀ KIẾN NGHỊ 55 TÀI LIỆU THAM KHẢO .56 PHỤ LỤC 58 v TÓM TẮT LUẬN VĂN PHÂN LOẠI LUỒNG DỮ LIỆU SỬ DỤNG MẠNG NƠ-RON Học viên: Trần Văn Líc Chuyên ngành: Kỹ thuật điện tử Mã số: 8520203 Khóa: K35.KĐT, Trường Đại học Bách khoa - ĐHĐN Tóm tắt – Với sự phát triển hạ tầng mạng internet cách nhanh chóng, năm gần tầm quan trọng việc phân loại luồng liệu mạng nhằm nâng cao chất lượng bảo mật cho hệ thống mạng ngày ý tới Trong đó, nghiên cứu phương pháp để phân loại luồng liệu mạng tăng lên ngày cải thiện giúp cho hoạt động hệ thống mạng dự đốn với độ xác cao nhận diện hành vi người dùng tốt Trong phương pháp sử dụng công cụ học máy nghiên cứu phát triển lĩnh vực đạt kết đáng ý Trong nghiên cứu này, sử dụng mơ hình học máy, cụ thể sử dụng mạng nơ-ron để phát triển mơ hình đạt độ xác cao việc phân loại luồng liệu mạng, phương pháp xử lý liệu áp dụng để tối ưu thời gian thực hiện tài nguyên cho hệ thống Ngoài ra, phương pháp khác sử dụng để phân loại luồng liệu mạng đưa vào với với mô hình nghiên cứu chúng tơi để so sánh đánh giá Từ khóa – Luồng liệu mạng; học máy; mạng nơ-ron; QoS; tập liệu mạng TRAFFIC CLASSIFICATION USING NEURAL NETWORK Abstract – Based on the rapid development of the internet infrastructure, in recent years the importance of network traffic classification have been improved the quality and security of the network system and has been paid more attention Since then, studies on methods to classify network traffic have also increased and improved, making network operation predictable with high accuracy and identifying human behavior In which using machine learning tools has been researched and developed in this field and has achieved remarkable results In this research, we use machine learning models, namely using neural networks to develop a model that can achieve high accuracy in the classification of network flows, data processing methods is also applied to optimize execution time and resources for the system In addition, other methods used to classify network flows are also included with the model in our study to be comparable and evaluated Key words – traffic flow; machine learning; neural network; QoS; network dataset vi DANH MỤC CÁC KÝ HIỆU, CÁC CHỮ VIẾT TẮT A ACK Acknowledge I ICMP Internet Control Message Protocol IANA International Assigned Number Authority G GPU Graphics Processing Unit H HTTP Hypertext Transfer Protocol N NCA Neighborhood Component Analysis P P2P Peer-to-peer network PCA Principal Component Analysis S SFS Sequential feature selection SYN Synchronous Q QoS Quality of Service U UDP User Datagram Protocol T TCP Transmission Control Protocol V VLAN Virtual Local Area Network vii DANH MỤC CÁC BẢNG Bảng 2.1 Các dạng hàm kích hoạt 20 Bảng 3.1 Thống kê tập liệu 29 Bảng 3.2 Các nhóm phân loại luồng liệu mạng 31 Bảng 3.3 Thống kê tần số xuất hiện nhóm 32 Bảng 4.1 Bảng so sánh ảnh hưởng số lượng đặc trưng .48 Bảng 4.2 Kết cho cho tập liệu thu thập từ máy chủ sau 12 tháng .53 viii DANH MỤC CÁC HÌNH Hình 2.1 Cấu trúc gói tin TCP 17 Hình 2.2 Một mơ hình mạng nơ-ron với hai lớp ẩn 18 Hình 2.3 Các ký hiệu sử dụng mạng nơ-ron 19 Hình 2.4 Mơ cách tính thuật tốn lan truyền ngược .23 Hình 2.5 Mơ hình Softmax Regression dạng mạng nơ-ron 24 Hình 2.6 Lựa chọn mơ hình dựa validation 25 Hình 2.7 Đồ thị thể hiện phương pháp Early Stopping 27 Hình 3.1 Giá trị đặc trưng từ mẫu 35 Hình 3.2 Ví dụ cấu trúc mạng nơ-ron sử dụng 40 Hình 4.1 Sự thay đổi hàm mát với tập huấn luyện, kiểm thử validation 42 Hình 4.2 Sự phụ thuộc kết phân loại vào số lượng nơ-ron lớp ẩn hàm kích hoạt 43 Hình 4.3 Kết thực hiện cho việc chọn Top 10 đặc trưng 44 Hình 4.4 Kết thực hiện cho việc chọn Top 20 đặc trưng 45 Hình 4.5 Kết thực hiện cho việc chọn Top 30 đặc trưng 45 Hình 4.6 Kết thực hiện cho việc chọn Top 40 đặc trưng 46 Hình 4.7 Kết thực hiện cho việc chọn Top 50 đặc trưng 46 Hình 4.8 Kết thực hiện với tất đặc trưng 47 Hình 4.9 Kết cho việc sử dụng PCA chọn nhóm 50 đặc trưng 47 Hình 4.10 Confusion matrix tập huấn luyện a) trước b) sau gia tăng liệu 51 Hình 4.11 Confusion matrix tập kiểm thử a) trước b) sau gia tăng liệu 52 124 125 RTT from 3WHS b a RTT full sz smpls a b 126 127 128 129 130 131 132 133 RTT full sz smpls b a RTT full sz a b RTT full sz b a RTT full sz max a b RTT full sz max b a RTT full sz avg a b RTT full sz avg b a RTT full sz stdev a b 134 135 RTT full sz stdev b a post-loss acks a b 136 137 post-loss acks b a segs cum acked a b 138 139 segs cum acked b a duplicate acks a b 140 141 duplicate acks b a triple dupacks a b 142 143 triple dupacks b a max # retrans a b Number 144 Short max # retrans b a ” (server→client) The total number of full-size RTT samples, calculated from the RTT samples of full-size segments Full-size segments are defined to be the segments of the largest size seen in the connection (client→server) ” (server→client) The minimum full-size RTT sample (client→server) ” (server→client) The maximum full-size RTT sample (client→server) ” (server→client) The average full-size RTT sample (client→server) ” (server→client) The standard deviation of full-size RTT samples (client→server) ” (server→client) The total number of ack packets received after losses were detected and a retransmission occurred More precisely, a post-loss ack is found to occur when an ack packet acknowledges a packet sent (acknowledgment value in the ack pkt is greater than the packet’s last sequence number), and at least one packet occurring before the packet acknowledged, was retransmitted later In other words, the ack packet is received after we observed a (perceived) loss event and are recovering from it (client→server) ” (server→client) The count of the number of segments that were cumulatively acknowledged and not directly acknowledged (client→server) ” (server→client) The total number of duplicate acknowledgments received (client→server) ” (server→client) The total number of triple duplicate acknowledgments received (three duplicate acknowledgments acknowledging the same segment), a condition commonly used to trigger the fast-retransmit/fastrecovery phase of TCP (client→server) ” (server→client) The maximum number of retransmissions seen for any segment during the lifetime of the connection (client→server) Continued on next page Long ” (server→client) 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 Number 178 179 retr time a b The minimum time seen between any two (re)transmissions of a segment amongst all the retransmissions seen (client→server) retr time b a ” (server→client) max retr time a b The maximum time seen between any two (re)transmissions of a segment (client→server) max retr time b a ” (server→client) avg retr time a b The average time seen between any two (re)transmissions of a segment calculated from all the retransmissions (client→server) avg retr time b a ” (server→client) sdv retr time a b The standard deviation of the retransmission-time samples obtained from all the retransmissions (client→server) sdv retr time b a ” (server→client) data wire a b Minimum number of bytes in (Ethernet) packet (client→server) q1 data wire a b First quartile of bytes in (Ethernet) packet med data wire a b Median of bytes in (Ethernet) packet mean data wire a b Mean of bytes in (Ethernet) packet q3 data wire a b Third quartile of bytes in (Ethernet) packet max data wire a b Maximum of bytes in (Ethernet) packet var data wire a b Variance of bytes in (Ethernet) packet data ip a b Minimum number of total bytes in IP packet q1 data ip a b First quartile of total bytes in IP packet med data ip a b Median of total bytes in IP packet mean data ip a b Mean of total bytes in IP packet q3 data ip a b Third quartile of total bytes in IP packet max data ip a b Maximum of total bytes in IP packet var data ip a b Variance of total bytes in IP packet data control a b Minimum of control bytes in packet q1 data control a b First quartile of control bytes in packet med data control a b Median of control bytes in packet mean data control a Mean of control bytes in packet b q3 data control a b Third quartile of control bytes in packet max data control a b Maximum of control bytes in packet var data control a b Variance of control bytes packet data wire b a Minimum number of bytes in (Ethernet) packet (server→client) q1 data wire b a First quartile of bytes in (Ethernet) packet med data wire b a Median of bytes in (Ethernet) packet mean data wire b a Mean of bytes in (Ethernet) packet Continued on next page Short Long q3 data wire b a Third quartile of bytes in (Ethernet) packet max data wire b a Maximum of bytes in (Ethernet) packet 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 var data wire b a data ip b a q1 data ip b a med data ip b a mean data ip b a q3 data ip b a max data ip b a var data ip b a data control b a q1 data control b a med data control b a mean data control b a q3 data control b a max data control b a var data control b a IAT a b q1 IAT a b med IAT a b mean IAT a b q3 IAT a b max IAT a b var IAT a b IAT b a q1 IAT b a med IAT b a mean IAT b a q3 IAT b a max IAT b a var IAT b a Time since last connection No transitions bulk/trans 211 212 213 214 Time spent in bulk Duration % bulk Time spent idle Number 215 216 217 Short Variance of bytes in (Ethernet) packet Minimum number of total bytes in IP packet First quartile of total bytes in IP packet Median of total bytes in IP packet Mean of total bytes in IP packet Third quartile of total bytes in IP packet Maximum of total bytes in IP packet Variance of total bytes in IP packet Minimum of control bytes in packet First quartile of control bytes in packet Median of control bytes in packet Mean of control bytes in packet Third quartile of control bytes in packet Maximum of control bytes in packet Variance of control bytes packet Minimum of packet inter-arrival time (client→server) First quartile of packet inter-arrival time Median of packet inter-arrival time Mean of packet inter-arrival time Third quartile of packet inter-arrival time Maximum of packet inter-arrival time Variance of packet inter-arrival time Minimum of packet inter-arrival time (server→client) First quartile of packet inter-arrival time Median of packet inter-arrival time Mean of packet inter-arrival time Third quartile of packet inter-arrival time Maximum of packet inter-arrival time Variance of packet inter-arrival time Time since the last connection between these hosts The number of transitions between transaction mode and bulk transfer mode, where bulk transfer mode is defined as the time when there are more than three successive packets in the same direction without any packets carrying data in the other direction Amount of time spent in bulk transfer mode Connection duration Percent of time spent in bulk transfer The time spent idle (where idle time is the accumulation of all periods of seconds or greater when no packet was seen in either direction) Continued on next page Long % idle Percent of time spent idle Effective Bandwidth Effective Bandwidth based upon entropy [10] (both directions) Effective Bandwidth a ” (client→server) 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 b Effective Bandwidth b ” (server→client) a FFT all FFT of packet IAT (arctan of the top-ten frequencies ranked by the magnitude of their contribution) (all traffic) (Frequency #1) FFT all ” (Frequency #2) FFT all ” FFT all ” FFT all ” FFT all ” FFT all ” FFT all ” FFT all ” FFT all ” (Frequency #10) FFT a b FFT of packet IAT (arctan of the top-ten frequencies ranked by the magnitude of their contribution) (client→server) (Frequency #1) FFT a b ” (Frequency #2) FFT a b ” FFT a b ” FFT a b ” FFT a b ” FFT a b ” FFT a b ” FFT a b ” FFT b a ” (Frequency #10) FFT b a FFT of packet IAT (arctan of the top-ten frequencies ranked by the magnitude of their contribution) (server→client) (Frequency #1) FFT b a ” (Frequency #2) FFT b a ” FFT b a ” FFT b a ” FFT b a ” FFT b a ” FFT b a ” FFT b a ” FFT b a ” (Frequency #10) Classes Application class, as assigned in [1] B Thuật tốn PCA (Principal Component Analysis) PCA phương pháp tìm hệ sở cho thông tin liệu chủ yếu tập trung vài toạ độ, phần lại mang lượng nhỏ thông tin Và đơn giản tính tốn, PCA tìm hệ trực chuẩn để làm sở Các bước để thực hiện PCA: Tính vector kỳ vọng tồn liệu: Trừ điểm liệu vector kỳ vọng tồn liệu: Tính ma trận hiệp phương sai: Tính trị riêng vector riêng có norm ma trận này, xếp chúng theo thứ tự giảm dần trị riêng Chọn K vector riêng ứng với K trị riêng lớn để xây dựng ma trận 𝑼𝑲 có cột tạo thành hệ trực giao K vectors này, cịn gọi thành phần chính, tạo thành không gian gần với phân bố liệu ban đầu chuẩn hoá ̂ xuống khơng gian tìm Chiếu liệu ban đầu chuẩn hố 𝑿 Dữ liệu toạ độ điểm liệu không gian Dữ liệu ban đầu tính xấp xỉ theo liệu sau: Ngoài ra, bước thực hiện PCA xem Hình phụ lục B.1 Hình phụ lục B.1 Hình ảnh bước thực hiện PCA QUYẾT ĐỊNH GIAO ĐỀ TÀI

Ngày đăng: 28/03/2021, 22:55

Tài liệu cùng người dùng

Tài liệu liên quan