Thisabove mentioned algorithm generates the dictionary that can be used to extractthe feature vectors for the long payload features.
Figure 2 shows the block diagramof dictionary construction. Now this dictionary which has been built withBigrams and Trigrams can be used by any feature extraction algorithm moreeffectively even from the long payload features. The generated Bigrams andTrigrams can also be handled by any machine learning algorithms. In the presentwork, experiments were carried with one of the most widely cited machinelearning algorithm, Support Vector Machine (SVM) to study the results out ofthe proposed methodology. Thefurther step is the feature vector extraction for the long payload featureswhich is outlined in the following figure 3. The approach in 16 has beenfollowed in the present work for the task of feature vector extraction.
Thefeature vector extraction step is also explained in more detail in the belowAlgorithm 2. ______________________________________Algorithm 2:Feature Vector Extraction for Long Payload Features with Bigrams & TrigramsStep-1: Inputthe long payload features and constructed Bigram / TrigramDictionaryStep-2:Initialize all feature vectors to zeroStep-3: Take onestring at a time Step-4: Take oneBigram / Trigram Step-5: Find theindex of Bigram / Trigram from the dictionaryStep-6:Increment the location counter in the feature vectorStep-7: Repeattill there is no possibility of finding Bigram / Trigram from theinput payload featureStep-8: Finishfeature vector i, and proceed to feature vector i+1Step-9: Stop theprocess if all there no feature vector is left to be processedStep-10: Outputthe feature vectors