In recent years, the usual BPHZ algorithm for renormalization in perturbative quantum field theory has been interpreted, after dimensional regularization, as a Birkhoff decomposition of characters on the Hopf algebra of Feynman graphs, with values in a Rota-Baxter algebra of amplitudes. We associate in this paper to any such algebra a universal semigroup (different in nature from the Connes-Marcolli "cosmical Galois group"). Its action on the physical amplitudes associated to Feynman graphs produces the expected operations: Bogoliubov's preparation map, extraction of divergences, renormalization. In this process a key role is played by commutative and noncommutative quasi-shuffle bialgebras whose universal properties are instrumental in encoding the renormalization process.