Due to the increasing complexity of the electromagnetic environment, the cavity with apertures are used more and more widely in electromagnetic shielding. At present, the time domain finite difference (FDTD) method has a good application effect for the transmission line response problem of a double-layer shield cavity with apertures, but this method usually encounters the boundary problem of semi-open and open areas. Due to the limited computing resources, the truncation of the FDTD region has an impact on the accuracy and speed of the calculation because that is very important. Based on that, this paper puts forward a method of combining mode-matching method with FDTD algorithm, which overcomes the limitation that mode-matching method can only be used for regular waveguide analysis and uses mode-matching method to solve FDTD boundary problems. The improved FDTD algorithm based on mode-matching method enhances the accuracy of the algorithm and guarantees the calculation speed.