Abstract:To address the challenges of imbalanced multi-class fault data, high noise levels, and slow diagnostic response in DC charging stations, this paper proposes an improved Random Forest method, termed Sandwich-RF, which integrates a Triple-Bernoulli mechanism with a meta cost-sensitive learning strategy. The proposed method embeds controlled randomness into three stages of decision tree construction: feature subspace selection, intra-feature soft sampling, and splitting criterion switching. Furthermore, category cost information is incorporated into both feature selection and node splitting through a dynamic weight matrix, significantly enhancing the recognition capability for minority and high-cost classes while maintaining model diversity and generalization performance. Experiments conducted on a real-world dataset containing 19 fault categories and 9 operational features show that Sandwich-RF achieves a test accuracy of 96.76% and an F1 score of 0.948, outperforming C4.5-RF (66.01%, 0.605) and CART-RF (86.33%, 0.834), with a training time of only 54.93s—approximately 92.8% faster than C4.5-RF. Ablation studies confirm that the combination of the Triple-Bernoulli mechanism and cost-sensitive learning effectively improves accuracy while reducing computational cost, demonstrating strong potential for engineering applications in online fault diagnosis of DC charging stations.