The present invention falls within the technical field of medicine, and in particular relates to PDE9 inhibitor compounds as shown in formula (I) or pharmaceutically acceptable salts or stereoisomers thereof, and also relates to pharmaceutical preparations and pharmaceutical compositions of the compounds and the uses thereof. X