A laser, comprising: a gain medium, a resonant cavity, and a second microring resonator, wherein the resonant cavity comprises a first cavity mirror and a second cavity mirror, the first cavity mirror is located at one port of the gain medium, and the second cavity mirror is located at another port of the gain medium; the second cavity mirror comprises one splitter, one first microring resonator, and one reflecting grating; an input port of the splitter is connected to the another port of the gain medium; a first output port of the splitter is connected to an input port of the first microring resonator, a second output port of the splitter is connected to the second microring resonator, and a download port of the first microring resonator is connected to the reflecting grating; the gain medium is configured to generate a laser gain signal; the resonant cavity that is formed by the first cavity mirror and the second cavity mirror performs resonance on the laser gain signal, and a laser light is generated after a laser generation condition is met, wherein the first microring resonator is configured to perform mode selection on the laser gain signal according to a filtering response curve of the first microring resonator, and the reflecting grating is configured to reflect the laser gain signal obtained after the mode selection; wherein: the laser comprises a modulation signal generator connected to the gain medium and configured to load a modulation signal to the laser light that is generated in the resonant cavity, to generate a modulated laser light; the modulated laser light is outputted by the splitter to the second microring resonator through the second output port after the modulated laser light is generated in the resonant cavity; and an input port of the second microring resonator is connected to the second output port of the splitter, the modulated laser light is filtered by the second microring resonator according to a filtering response curve of the second microring resonator to generate an output laser light, and the second microring resonator is configured to output the output laser light through a download port of the second microring resonator, wherein the output laser light matches the filtering response curve of the second microring resonator. the laser comprises a modulation signal generator connected to the gain medium and configured to load a modulation signal to the laser light that is generated in the resonant cavity, to generate a modulated laser light; the modulated laser light is outputted by the splitter to the second microring resonator through the second output port after the modulated laser light is generated in the resonant cavity; and an input port of the second microring resonator is connected to the second output port of the splitter, the modulated laser light is filtered by the second microring resonator according to a filtering response curve of the second microring resonator to generate an output laser light, and the second microring resonator is configured to output the output laser light through a download port of the second microring resonator, wherein the output laser light matches the filtering response curve of the second microring resonator.