In response to challenges such as data encryption, uneven distribution, and user privacy concerns in network traffic classification, this paper presents a clustering-based approach.In response to challenges such as data encryption, uneven distribution, and user privacy concerns in network traffic classification, this paper presents a clustering-based approach. The proposed method utilizes a graph matching approach to effectively categorize data streams in real-time scenarios. This approach aims to enhance the accuracy and efficiency of network traffic classification, particularly in the face of evolving encryption techniques and privacy-preserving measures. The method relies solely on non-content features to characterize network flow characteristics and employs graph matching algorithms to reduce inter-class imbalances, enabling coarse-grained clustering and reliable graph matching. Firstly, an unsupervised clustering framework is designed, which studies the diverse distributions and category similarities of traffic data based on a limited set of features. This unsupervised clustering helps mitigate network disparities by aggregating network sessions into a few clusters with extracted primary features. Next, the correlation between clusters from the same network is used to construct a similarity graph. Finally, a graph matching algorithm is proposed, which combines graph neural networks and graph matching networks to reveal reliable correspondences between different network relationships. This allows for associating clusters in the test network with clusters in the initial network, enabling the labeling of test clusters based on associated clusters in the training set. Simulation results demonstrate that the proposed method achieves an accuracy rate of 96.8%, which is significantly superior to existing approaches.