Mechanism of kerogen pyrolysis in terms of chemical structure transformation