What is the legal time for requesting invalidation of a patent right after the patent is granted?

Anytime. According to Article 45 of the Patent Law: “At any time from the date when the Patent Administration Department of the State Council announces the grant of a patent right, any unit or individual that believes that the grant of the patent right does not comply with the relevant provisions of this Law may request the Patent Reexamination Board. Declare the patent right to be invalid. Patent right is the exclusive right that the inventor or designer has to the invention within the period specified by the law.