Provided in the present disclosure is a small-molecule regulator of TLR8; a compound of formula (I) or the pharmaceutically acceptable salt thereof provided in the present disclosure has good TLR8 regulatory activity and can be used to prevent or treat diseases mediated by TLR8.