Federated learning (FL) is an emerging machine learning method in which all participants can collaboratively train a model without sharing their raw data, thereby breaking down data silos and avoiding privacy issues caused by centralized data storage. In practical applications, client data are non-independent and identically distributed, resulting in FL requiring multiple rounds of communication to converge, which entails high communication costs. Moreover, the centralized architecture of traditional FL remains susceptible to privacy breaches, network congestion, and single-point failures. In order to solve these problems, this paper proposes an FL framework based on blockchain technology and a cluster training algorithm, called BCFL. We first improved an FL algorithm based on odd–even round cluster training, which accelerates model convergence by dividing clients into clusters and adopting serialized training within each cluster. Meanwhile, compression operations were applied to model parameters before transmission to reduce communication costs and improve communication efficiency. Then, a decentralized FL architecture was designed and developed based on blockchain and Inter-Planetary File System (IPFS), where the blockchain records the FL process and IPFS optimizes the high storage costs associated with the blockchain. The experimental results demonstrate the superiority of the framework in terms of accuracy and communication efficiency.