A compound of formula, or a tautomer, mesomer, racemate, enantiomer, diastereomer, or mixture thereof, or a pharmaceutically acceptable salt thereof: wherein: ring A is cycloalkyl, wherein the cycloalkyl is optionally substituted with one or more groups selected from the group consisting of halogen, cyano, nitro, amino, hydroxy, oxo, alkyl, haloalkyl, hydroxyalkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; W 1 is N or CR a; W 2 is N or CR b; W 3 is N or CR c; R a, R b and R c are each independently selected from the group consisting of hydrogen, halogen, cyano, nitro, alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, heteroaryl, -OR 4, -S m R 4, -C R 4, -C OR 4, -C NR 5 R 6, -NR 5 R 6 and -NR 5 C R 6, wherein the alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl and heteroaryl are each optionally substituted with one or more groups selected from halogen, cyano, nitro, oxo, alkyl, haloalkyl, hydroxyalkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, heteroaryl, -OR 4, -S m R 4, -C R 4, -C OR 4, -C NR 5 R 6, -NR 5 R 6 and -NR 5 C R 6; R 1 is hydrogen or alkyl; R 2 and R 3 are each independently selected from the group consisting of hydrogen, halogen, cyano, nitro, alkyl, haloalkyl and hydroxyalkyl; R 4 is selected from the group consisting of hydrogen, alkyl, halogen, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl are each optionally substituted with one or more groups selected from the group consisting of halogen, cyano, nitro, hydroxy, oxo, alkyl, haloalkyl, hydroxyalkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl, alkoxycarbonyl, -C NR 5 R 6, -NR 5 R 6 and -NR 5 C R 6; R 5 and R 6 are each independently selected from the group consisting of hydrogen, alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl are each optionally substituted with one or more groups selected from the group consisting of halogen, cyano, nitro, amino, hydroxy, oxo, alkyl, haloalkyl, hydroxyalkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; and m is 0, 1, or 2. ring A is cycloalkyl, wherein the cycloalkyl is optionally substituted with one or more groups selected from the group consisting of halogen, cyano, nitro, amino, hydroxy, oxo, alkyl, haloalkyl, hydroxyalkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; W 1 is N or CR a; W 2 is N or CR b; W 3 is N or CR c; R a, R b and R c are each independently selected from the group consisting of hydrogen, halogen, cyano, nitro, alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, heteroaryl, -OR 4, -S m R 4, -C R 4, -C OR 4, -C NR 5 R 6, -NR 5 R 6 and -NR 5 C R 6, wherein the alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl and heteroaryl are each optionally substituted with one or more groups selected from halogen, cyano, nitro, oxo, alkyl, haloalkyl, hydroxyalkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, heteroaryl, -OR 4, -S m R 4, -C R 4, -C OR 4, -C NR 5 R 6, -NR 5 R 6 and -NR 5 C R 6; R 1 is hydrogen or alkyl; R 2 and R 3 are each independently selected from the group consisting of hydrogen, halogen, cyano, nitro, alkyl, haloalkyl and hydroxyalkyl; R 4 is selected from the group consisting of hydrogen, alkyl, halogen, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl are each optionally substituted with one or more groups selected from the group consisting of halogen, cyano, nitro, hydroxy, oxo, alkyl, haloalkyl, hydroxyalkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl, alkoxycarbonyl, -C NR 5 R 6, -NR 5 R 6 and -NR 5 C R 6; R 5 and R 6 are each independently selected from the group consisting of hydrogen, alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl, wherein the alkyl, cycloalkyl, heterocyclyl, aryl and heteroaryl are each optionally substituted with one or more groups selected from the group consisting of halogen, cyano, nitro, amino, hydroxy, oxo, alkyl, haloalkyl, hydroxyalkyl, alkoxy, cycloalkyl, heterocyclyl, aryl, heteroaryl, carboxyl and alkoxycarbonyl; and m is 0, 1, or 2.