Stochastic resonance has been increasingly used for signal estimation, signal transmission, signal detection and image processing. The stochastic resonance effect can be realized by tuning system parameters or by adding noise. In our recent paper, we have investigated the possibility to enhance the aperiodic stochastic resonance (ASR) effect by tuning system parameters and adding noise simultaneously for the Gaussian-distribution weak input signal. This paper extends the result to a more general case using standard optimization theory. It is shown that the normalized power norm of the bistable double-well system with a small input signal can reach a larger maximal value by this scheme. An on-line fast-converging optimization algorithm is also proposed for searching the optimal values of system parameters and noise intensity.