To address the issue of imbalanced distribution in equipment fault data, this paper proposes an improved FedAvg aggregation algorithm. By dynamically adjusting aggregation weights, it ensures the adaptability of fault data weights across different distribution dimensions during the aggregation process. The algorithm first introduces a contribution mechanism and then combines the contribution degree of each client with the weight of their dataset for model aggregation, resulting in the FedAvg-ContribData algorithm. Experimental data demonstrate that, compared to FedAvg and FedAvg-Data algorithms, our proposed algorithm improves accuracy by 39.7% and 7.9%, precision by 40.4% and 9.1%, recall rate by 41.0% and 7.8%, and F1 score by 46.6% and 9.3%.