Federated Learning (FL) is a new machine learning model construction paradigm with great potential in privacy preservation and communication efficiency, but in real Internet of Things (IoT) scenarios, there is data heterogeneity between client nodes, and learning a unified global model will lead to a decrease in model accuracy. To solve this problem, a Clustering Federated Learning based on Feature Distribution (CFLFD) algorithm was proposed. In this algorithm, the results obtained through Principal Component Analysis (PCA) of the features extracted from the model by each client node were clustered in order to cluster client nodes with similar data distribution to collaborate with each other, so as to achieve higher model accuracy. In order to demonstrate the effectiveness of the algorithm, extensive experiments were conducted on three datasets and four benchmark algorithms. The results show that the algorithm improves model accuracy by 1.12 and 3.76 percentage points respectively compared to the FedProx on CIFAR10 dataset and Office-Caltech10 dataset.