To effectively provide direct and clear reference for process parameter optimization in semiconductor manufacturing field, a new method to define input parameter window is proposed based on the advantages of both particle swarm optimization(PSO) algorithm and rectangle grid model. Simulation results on standard two-dimensional multi-modal functions show the effectiveness and validity of the method. For the scenario of two input parameters, the method can provide all the domains and a series of contour meeting process requirements. Both simulation results and production validation data show that the method is an effective way for process parameter optimization.