Ricciardo optimistic after qualifying second in China