A compound of formula, a stereoisomer or pharmaceutically acceptable salt thereof: wherein, X 1 is -O- or -CH 2 -; X 3 is -CH 2 - or -CH 2 -CH 2 -; R 1 is selected from the group consisting of C 1-4 alkyl, C 1-4 haloalkyl, C 1-4 deuterioalkyl, C 3-6 cycloalkyl C 1-4 alkyl, benzyl, C 2-4 alkenyl, C 2-4 alkynyl, C 3-8 cycloalkyl, 3-8 membered heterocyclyl, C 5-8 aryl and 5-8 membered heteroaryl; R 2 and R 3 are each independently selected from the group consisting of hydrogen, deuterium, methyl, ethyl, n-propyl, isopropyl, cyclopropyl, cyclopropylmethyl, methoxy, ethoxy, methoxyethyl, hydroxymethyl, cyanomethyl, trifluoromethyl, trideuteriomethyl, difluoromethyl, dideuteriomethyl and aminomethyl, or, R 2 and R 3, together with the carbon atom directly attached thereto, form carbonyl, C 3-6 cycloalkyl or 3-6 membered heterocyclyl, or, R 2 and R 1 or R 3 and R 1, together with the group directly attached thereto, form 3-6 membered heterocyclyl, the heteroatom is oxygen or nitrogen, and cycloalkyl and heterocyclyl are optionally further substituted by one or more substituents selected from deuterium or methyl; R 4 is selected from the group consisting of hydrogen, deuterium, fluorine, chlorine, cyano, methyl, ethyl, cyclopropyl, cyclopropylmethyl, methoxy, ethoxy, trifluoromethyl, trideuteriomethyl, difluoromethyl, dideuteriomethyl, amino and dimethylamino; R 6 is 5-6 membered heteroaryl, and the 5-6 membered heteroaryl is selected from the following structures: wherein, each R 23 is independently selected from the group consisting of hydrogen, deuterium, fluorine, chlorine, cyano, nitro, azido, C 1-4 alkyl, C 1-4 haloalkyl or C 1-4 deuterioalkyl, allyl, ethynyl, cyclopropyl, cyclopropylmethyl, oxa-cyclobutyl, aza-cyclopentyl, aza-cyclohexyl, phenyl, diazole, triazole, methanesulfonyl, isopropylsulfonyl, aminosulfonyl, methoxy, ethoxy, isopropoxy, methoxyethyl, ethoxyethyl, hydroxymethyl, hydroxyethyl, cyanomethyl, methoxycarbonyl, ethoxycarbonyl, acetyl, acetoxy, acetoxymethyl, amino, dimethylamino, aminomethyl, aminocarbonyl, dimethylaminocarbonyl and acetylamino; and R 24 is selected from the group consisting of hydrogen, deuterium, C 1-4 alkyl, C 1-4 haloalkyl, C 1-4 deuterioalkyl, allyl, ethynyl, cyclopropyl, cyclopropylmethyl, oxa-cyclobutyl, aza-cyclopentyl, aza-cyclohexyl, phenyl, diazole, triazole, methanesulfonyl, isopropylsulfonyl, aminosulfonyl, methoxyethyl, ethoxyethyl, hydroxymethyl, hydroxyethyl, cyanomethyl, methoxycarbonyl, ethoxycarbonyl, acetyl, aminomethyl, aminocarbonyl and dimethylaminocarbonyl; wherein cycloalkyl is saturated or partially unsaturated, wherein, X 1 is -O- or -CH 2 -; X 3 is -CH 2 - or -CH 2 -CH 2 -; R 1 is selected from the group consisting of C 1-4 alkyl, C 1-4 haloalkyl, C 1-4 deuterioalkyl, C 3-6 cycloalkyl C 1-4 alkyl, benzyl, C 2-4 alkenyl, C 2-4 alkynyl, C 3-8 cycloalkyl, 3-8 membered heterocyclyl, C 5-8 aryl and 5-8 membered heteroaryl; R 2 and R 3 are each independently selected from the group consisting of hydrogen, deuterium, methyl, ethyl, n-propyl, isopropyl, cyclopropyl, cyclopropylmethyl, methoxy, ethoxy, methoxyethyl, hydroxymethyl, cyanomethyl, trifluoromethyl, trideuteriomethyl, difluoromethyl, dideuteriomethyl and aminomethyl, or, R 2 and R 3, together with the carbon atom directly attached thereto, form carbonyl, C 3-6 cycloalkyl or 3-6 membered heterocyclyl, or, R 2 and R 1 or R 3 and R 1, together with the group directly attached thereto, form 3-6 membered heterocyclyl, the heteroatom is oxygen or nitrogen, and cycloalkyl and heterocyclyl are optionally further substituted by one or more substituents selected from deuterium or methyl; R 4 is selected from the group consisting of hydrogen, deuterium, fluorine, chlorine, cyano, methyl, ethyl, cyclopropyl, cyclopropylmethyl, methoxy, ethoxy, trifluoromethyl, trideuteriomethyl, difluoromethyl, dideuteriomethyl, amino and dimethylamino; R 6 is 5-6 membered heteroaryl, and the 5-6 membered heteroaryl is selected from the following structures: wherein, each R 23 is independently selected from the group consisting of hydrogen, deuterium, fluorine, chlorine, cyano, nitro, azido, C 1-4 alkyl, C 1-4 haloalkyl or C 1-4 deuterioalkyl, allyl, ethynyl, cyclopropyl, cyclopropylmethyl, oxa-cyclobutyl, aza-cyclopentyl, aza-cyclohexyl, phenyl, diazole, triazole, methanesulfonyl, isopropylsulfonyl, aminosulfonyl, methoxy, ethoxy, isopropoxy, methoxyethyl, ethoxyethyl, hydroxymethyl, hydroxyethyl, cyanomethyl, methoxycarbonyl, ethoxycarbonyl, acetyl, acetoxy, acetoxymethyl, amino, dimethylamino, aminomethyl, aminocarbonyl, dimethylaminocarbonyl and acetylamino; and R 24 is selected from the group consisting of hydrogen, deuterium, C 1-4 alkyl, C 1-4 haloalkyl, C 1-4 deuterioalkyl, allyl, ethynyl, cyclopropyl, cyclopropylmethyl, oxa-cyclobutyl, aza-cyclopentyl, aza-cyclohexyl, phenyl, diazole, triazole, methanesulfonyl, isopropylsulfonyl, aminosulfonyl, methoxyethyl, ethoxyethyl, hydroxymethyl, hydroxyethyl, cyanomethyl, methoxycarbonyl, ethoxycarbonyl, acetyl, aminomethyl, aminocarbonyl and dimethylaminocarbonyl; wherein cycloalkyl is saturated or partially unsaturated,