A compound of formula, or a tautomer, mesomer, racemate, enantiomer, diastereomer, and mixture thereof, or a pharmaceutically acceptable salt thereof: wherein: A is selected from the group consisting of -O-, -CH 2 - and -CH 2 CH 2 -; L is -O-; ring B is phenyl; R1, R 2 and R 3 are each independently selected from the group consisting of halogen, hydroxyl, cyano, nitro, alkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, -C OR 5, -OC R 5, -C R 5, -NHC R 5, -NR 6 R 7 and -S m R 5, wherein the alkyl, alkoxy, cycloalkyl, heterocyclyl, aryl or heteroaryl is each optionally substituted with one or more groups selected from the group consisting of halogen, hydroxyl, cyano, nitro, alkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, -C OR 5, -OC R 5, -C R 5, -NHC R 5, -NR 6 R 7 and -S m R 5; R 4 is selected from the group consisting of the following cycloalkyl and heterocyclyl: wherein the cycloalkyl and heterocyclyl are each optionally substituted with one or more groups selected from the group consisting of halogen, hydroxyl, alkyl, alkoxy, -C OR 5, -OC R 5, -C R 5, -NHC R 5, -NR 6 R 7 and -S m R 5; R 5 is selected from the group consisting of hydrogen, alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl or heteroaryl is each optionally substituted with one or more groups selected from the group consisting of alkyl, halogen, hydroxyl, cyano, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; R 6 and R 7 are each independently selected from the group consisting of hydrogen, alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl or heteroaryl is each optionally substituted with one or more groups selected from the group consisting of alkyl, halogen, hydroxyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; m is 0, 1 or 2; n is 0, 1, 2 or 3; p is 0, 1, 2, 3 or 4; and q is 0, 1, 2, 3 or 4. A is selected from the group consisting of -O-, -CH 2 - and -CH 2 CH 2 -; L is -O-; ring B is phenyl; R1, R 2 and R 3 are each independently selected from the group consisting of halogen, hydroxyl, cyano, nitro, alkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, -C OR 5, -OC R 5, -C R 5, -NHC R 5, -NR 6 R 7 and -S m R 5, wherein the alkyl, alkoxy, cycloalkyl, heterocyclyl, aryl or heteroaryl is each optionally substituted with one or more groups selected from the group consisting of halogen, hydroxyl, cyano, nitro, alkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, -C OR 5, -OC R 5, -C R 5, -NHC R 5, -NR 6 R 7 and -S m R 5; R 4 is selected from the group consisting of the following cycloalkyl and heterocyclyl: wherein the cycloalkyl and heterocyclyl are each optionally substituted with one or more groups selected from the group consisting of halogen, hydroxyl, alkyl, alkoxy, -C OR 5, -OC R 5, -C R 5, -NHC R 5, -NR 6 R 7 and -S m R 5; R 5 is selected from the group consisting of hydrogen, alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl or heteroaryl is each optionally substituted with one or more groups selected from the group consisting of alkyl, halogen, hydroxyl, cyano, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; R 6 and R 7 are each independently selected from the group consisting of hydrogen, alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl or heteroaryl is each optionally substituted with one or more groups selected from the group consisting of alkyl, halogen, hydroxyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; m is 0, 1 or 2; n is 0, 1, 2 or 3; p is 0, 1, 2, 3 or 4; and q is 0, 1, 2, 3 or 4.