In the Monte Carlo particle transport calculations, it is difficult to generate reasonable weight window distributions for the deep penetration problem. This work focused on the generation of importance function by the response matrix method. A built-in importance solver was implemented in the Monte Carlo code cosRMC. In addition, this work improved the iterative process of the weight window of the response matrix method for global variance reduction and realized the accelerated convergence of the global weight window generation. The application of the response matrix method to the local and global variance reduction problems verified the good effect of local variance reduction. The effectiveness of the method has also been further verified in the application of CFETR, where the computational efficiency was 21 times that of the initial analogue simulation, and the time of weight window convergence of the improved response matrix method was reduced by about 24.9%.