Optimization of Key Factors Affecting Methane Production