Research Article

Design and Implementation of an Anomaly Network Traffic Detection Model Integrating Temporal and Spatial Features

Algorithm 1

Raw traffic data extraction.
Input: network traffic pcap files.
Output: completed data of the raw traffic and their labels.
For each pcap do
 Create seven null lists srcip=[], dstip=[], sport=[], proto=[], raw data=[], labels=[].
If the five-tuple information of traffic packet could be found in the attack labels
  Trim source IP into the list srcip.
  Trim destination IP into the list dstip.
  Trim source port into the list sport.
  Trim destination port into the list dport.
  Trim protocol into the list proto.
  Get packet data into the list raw data.
  Get label into the list labels.
 Add above lists to the csv file, and the file name is named based on the date.
END if
END for