In engineering practice, the operation of mechanical equipment under conditions of sharp speed variation can result in domain shift in the distribution of samples. Moreover, the presence of data deficiencies in engineering poses significant challenges for intelligent diagnostic techniques. To address these issues, this paper proposes a network called Hybrid Augmented network with Balance Domain Window (BW-HAN). The BW-HAN network utilizes convolution operations to segment samples into infinitesimal patches while extracting their underlying features, and then embeds these patches into attention computational mechanism for invariant domain feature extraction. To handle domain shift, a novel partitioning method is designed based on data restructuring and data flow. This method aims to suppress domain shift within windows while establishing global connectivity between windows. Furthermore, a semi-dense connection method with multi-level residual fusion has been developed based on the principles of feature reuse and parameter sharing to address the issue of overfitting caused by limited samples, thereby enhancing model stability. Comparative studies are conducted with other networks on three variable-speed cases to demonstrate the superiority of the BW-HAN network. The experimental results show that the proposed BW-HAN network performs well in all three cases and effectively addresses the problem of insufficient data under sharp speed variation in mechanical fault diagnosis.