A compound represented by formula or formula, or its tautomers, mesomers, racemates, enantiomers, diastereoisomers, mixtures thereof, or a pharmaceutically acceptable salt thereof: wherein: A 2 and A 3 are each independently selected from the group consisting of CR 1 and N; B 1 is a phenyl ring or 6-membered heteroaryl ring; B 2 is independently selected from the group consisting of C 3-8 cyclic group, 3- to 8-membered heterocyclic group, aryl and heteroaryl, wherein the cyclic group, heterocyclic group, aryl or heteroaryl is optionally substituted with one or more G 2; L 1 is independently selected from the group consisting of -C 1-2 alkyl-, -CR 5 R 6 -, -C 1-2 alkyl (R 5) -, -C -,, -NR 5 -, -NR 5 C -, -C NR 5 -, -CF 2 -, -O-, -S-, -S m -, -NR 5 S 2 - and -S 2 NR 5 -; L 2 is independently selected from the group consisting of -C 0-4 alkyl-, -C -, -O-, -NR 7 -, -NR 7 C - and -NR 7 S 2 -; Y is independently selected from the group consisting of -C -, -NR 8 C -, -S m - and -NR 8 S m -; R 1 is independently selected from the group consisting of H, D, C 0-4 alkyl, halogen and cyano; bond is a double bond or a triple bond; when bond is a double bond, R 2, R 3 and R 4 are each independently selected from the group consisting of H and D; and when bond is a triple bond, R 3 and R 4 are absent, and R 2 is independently selected from the group consisting of H, D, and C 1-4 alkyl,; R 5, R 6, R 7 and R 8 are each independently selected from the group consisting of H, D, C 0-8 alkyl, C 3-8 cyclic group, 3- to 8-membered heterocyclic group, aryl, and heteroaryl, wherein the alkyl, cyclic group, heterocyclic group, aryl or heteroaryl is optionally substituted with one or more G 5; G 1, G 2, and G 5 are each independently selected from the group consisting of H, D, halogen, cyano, alkyl, alkenyl, alkynyl, cyclic group, heterocyclic group, aryl, heteroaryl, -OR 9, -OC NR 9 R 10, -C OR 10, -C NR 9 R 10, -C R 9, -NR 9 R 10, -NR 9 C R 10, -NR 9 C NR 10 R 11, -S m R 10 and -NR 9 S m R 10, wherein the alkyl, alkenyl, alkynyl, cyclic group, heterocyclic group, aryl or heteroaryl is optionally substituted with one or more substituents selected from the group consisting of D, halogen, cyano, C 1-8 alkyl, C 3-8 cycloalkyl, 3- to 8-membered heterocyclic group, -OR 12, -OC NR 12 R 13, -C OR 12, -C NR 12 R 13, -C R 12, -NR 12 R 13, -NR 12 C R 13, -NR 12 C NR 13 R 14, -S m R 12, and -NR 12 S m R 13; R 9, R 10, R 11, R 12, R 13 and R 14 are each independently selected from the group consisting of H, C 1-6 alkyl, C 1 -C 6 heteroalkyl, C 3-8 cycloalkyl, 3- to 8-membered monocyclic heterocyclic group, monocyclic heteroaryl and monocyclic aryl; n and p are each independently selected from the group consisting of 0, 1 and 2; and Z 1 and Z 2 are each independently selected from the group consisting of C(R a) and N; R a is H or alkyl; m is 1 or 2. A 2 and A 3 are each independently selected from the group consisting of CR 1 and N; B 1 is a phenyl ring or 6-membered heteroaryl ring; B 2 is independently selected from the group consisting of C 3-8 cyclic group, 3- to 8-membered heterocyclic group, aryl and heteroaryl, wherein the cyclic group, heterocyclic group, aryl or heteroaryl is optionally substituted with one or more G 2; L 1 is independently selected from the group consisting of -C 1-2 alkyl-, -CR 5 R 6 -, -C 1-2 alkyl (R 5) -, -C -,, -NR 5 -, -NR 5 C -, -C NR 5 -, -CF 2 -, -O-, -S-, -S m -, -NR 5 S 2 - and -S 2 NR 5 -; L 2 is independently selected from the group consisting of -C 0-4 alkyl-, -C -, -O-, -NR 7 -, -NR 7 C - and -NR 7 S 2 -; Y is independently selected from the group consisting of -C -, -NR 8 C -, -S m - and -NR 8 S m -; R 1 is independently selected from the group consisting of H, D, C 0-4 alkyl, halogen and cyano; bond is a double bond or a triple bond; when bond is a double bond, R 2, R 3 and R 4 are each independently selected from the group consisting of H and D; and when bond is a triple bond, R 3 and R 4 are absent, and R 2 is independently selected from the group consisting of H, D, and C 1-4 alkyl,; R 5, R 6, R 7 and R 8 are each independently selected from the group consisting of H, D, C 0-8 alkyl, C 3-8 cyclic group, 3- to 8-membered heterocyclic group, aryl, and heteroaryl, wherein the alkyl, cyclic group, heterocyclic group, aryl or heteroaryl is optionally substituted with one or more G 5; G 1, G 2, and G 5 are each independently selected from the group consisting of H, D, halogen, cyano, alkyl, alkenyl, alkynyl, cyclic group, heterocyclic group, aryl, heteroaryl, -OR 9, -OC NR 9 R 10, -C OR 10, -C NR 9 R 10, -C R 9, -NR 9 R 10, -NR 9 C R 10, -NR 9 C NR 10 R 11, -S m R 10 and -NR 9 S m R 10, wherein the alkyl, alkenyl, alkynyl, cyclic group, heterocyclic group, aryl or heteroaryl is optionally substituted with one or more substituents selected from the group consisting of D, halogen, cyano, C 1-8 alkyl, C 3-8 cycloalkyl, 3- to 8-membered heterocyclic group, -OR 12, -OC NR 12 R 13, -C OR 12, -C NR 12 R 13, -C R 12, -NR 12 R 13, -NR 12 C R 13, -NR 12 C NR 13 R 14, -S m R 12, and -NR 12 S m R 13; R 9, R 10, R 11, R 12, R 13 and R 14 are each independently selected from the group consisting of H, C 1-6 alkyl, C 1 -C 6 heteroalkyl, C 3-8 cycloalkyl, 3- to 8-membered monocyclic heterocyclic group, monocyclic heteroaryl and monocyclic aryl; n and p are each independently selected from the group consisting of 0, 1 and 2; and Z 1 and Z 2 are each independently selected from the group consisting of C(R a) and N; R a is H or alkyl; m is 1 or 2.