Ultrafast electron diffraction (UED) is a powerful tool for observing the evolution of transient structures at the atomic level. However, temporal resolution is a huge challenge for UEDs, mainly depending on the pulse duration. Unfortunately, the Coulomb force between electrons causes the pulse duration to increase continually when propagating, reducing the temporal resolution. In this paper, we theoretically design a radio frequency (RF) compression cavity using the finite-element method of electromagnetic-thermal coupling to overcome this limitation and obtain a high-brightness, short-pulse-...