The present invention relates to the field of medical chemistry, and relates to a novel pyridone derivative represented by formula (I) or a stereoisomer thereof, a pharmaceutically acceptable salt, a solvate or a crystal thereof, and an application thereof in the preparation of a drug for preventing or treating viral infectious diseases such as influenza A or/and influenza B, in particular an application thereof as a PA subunit cap-dependent endonuclease inhibitor for preventing or treating influenza A and/or influenza B viral infectious diseases. The compound of the present invention has significant activity in inhibiting influenza endonuclease and influenza DNA, and may be used alone or in combination with a neuraminidase inhibitor, a nucleoside drug, a PB2 inhibitor, a PB1 inhibitor, an M2 inhibitor or other anti-influenza drugs, significantly shortening the time of influenza infection, reducing mortality, and having excellent clinical application prospects.