With the increase of multimedia traffic, the implementation of fast and accurate classification has become an important issue. Besides, a manually captured dataset contains certain noise and mislabeled instances, which influences the accuracy of classifier to some extent. Motivated by these observations, a novel feature selection and instance purification (FS&IP) method based on consistency measure is proposed. It utilizes a linear consistency-constrained algorithm for feature selection. In each round of iteration, it removes the instance with the minor labels in every pattern subset. Our method has three desirable properties: 1) It can simultaneously achieve feature selection and data purification. 2) when purifying instance, it doesn't need to annotate the noisy instance with learned labels; that is because it is an unsupervised method in terms of data purification. 3) through data purification, it is able to obtain a minimal feature subset on condition of maintaining accuracy. In addition, the proposed method can be used to discover a new discriminative feature based on linking behaviors called the flow fragment (F - Frag), which can reflect important information among the complex and multitudinous packet communication behaviors. The experimental results over six different datasets demonstrate the advantages of the proposed technique compared to six existing methods, and the discriminative power of the new flow fragment feature.