Influence maximization and inference of opinion dynamics on complex networks