Disclosed is a compound as shown in general formulas (I) or (II) and a pharmaceutically acceptable salt, an isomer or a mixture form thereof, a solvate, a polymorph, a stable isotope derivative, or a prodrug of the same. The compound of the present invention has CDK kinase inhibitory activity and can be used in treating a disease related to CDK kinase, such as a cancer.