A clock synchronization apparatus, wherein the clock synchronization apparatus is applied to an optical transmitter, and comprises a digital interpolator, a digital delay element, and a clock control circuit, wherein the digital interpolator is configured to perform sampling clock adjustment on a received first digital signal under phase control of the clock control circuit, to obtain a second optical digital signal; the digital delay element is configured to delay the second optical digital signal to obtain a third optical digital signal; and the clock control circuit is configured to: detect sampling clocks of the second optical digital signal and the third optical digital signal to obtain a sampling clock deviation, generate a clock control signal based on the sampling clock deviation, and perform sampling clock control on the digital interpolator based on the clock control signal; wherein the clock control circuit comprises: a phase detector, configured to detect the second optical digital signal and the third optical digital signal to obtain the sampling clock deviation; and a loop controller, configured to generate the clock control signal based on the sampling clock deviation; wherein the second optical digital signal is used as input of the digital delay element, and is related to a bandwidth of a flexible-rate service data obtained by the optical transmitter and the third optical digital signal is used as output of the digital delay element, and is related to a bandwidth of a signal transmitted by the optical transmitter, and wherein the phase detector is configured to detect bandwidths of the input signal and the output signal of the digital delay element, to obtain a bandwidth deviation between the input signal and the output signal so as to perform coarse adjustment of a sampling rate of the service data received by the optical transmitter, based on the bandwidths of the input signal and the output signal, and wherein the clock control circuit and the digital interpolator perform fine adjustment of the sampling rate obtained by the digital delay element after the coarse adjustment. the digital interpolator is configured to perform sampling clock adjustment on a received first digital signal under phase control of the clock control circuit, to obtain a second optical digital signal; the digital delay element is configured to delay the second optical digital signal to obtain a third optical digital signal; and the clock control circuit is configured to: detect sampling clocks of the second optical digital signal and the third optical digital signal to obtain a sampling clock deviation, generate a clock control signal based on the sampling clock deviation, and perform sampling clock control on the digital interpolator based on the clock control signal; wherein the clock control circuit comprises: a phase detector, configured to detect the second optical digital signal and the third optical digital signal to obtain the sampling clock deviation; and a loop controller, configured to generate the clock control signal based on the sampling clock deviation; wherein the second optical digital signal is used as input of the digital delay element, and is related to a bandwidth of a flexible-rate service data obtained by the optical transmitter and the third optical digital signal is used as output of the digital delay element, and is related to a bandwidth of a signal transmitted by the optical transmitter, and wherein the phase detector is configured to detect bandwidths of the input signal and the output signal of the digital delay element, to obtain a bandwidth deviation between the input signal and the output signal so as to perform coarse adjustment of a sampling rate of the service data received by the optical transmitter, based on the bandwidths of the input signal and the output signal, and wherein the clock control circuit and the digital interpolator perform fine adjustment of the sampling rate obtained by the digital delay element after the coarse adjustment. a phase detector, configured to detect the second optical digital signal and the third optical digital signal to obtain the sampling clock deviation; and a loop controller, configured to generate the clock control signal based on the sampling clock deviation; wherein the second optical digital signal is used as input of the digital delay element, and is related to a bandwidth of a flexible-rate service data obtained by the optical transmitter and the third optical digital signal is used as output of the digital delay element, and is related to a bandwidth of a signal transmitted by the optical transmitter, and wherein the phase detector is configured to detect bandwidths of the input signal and the output signal of the digital delay element, to obtain a bandwidth deviation between the input signal and the output signal so as to perform coarse adjustment of a sampling rate of the service data received by the optical transmitter, based on the bandwidths of the input signal and the output signal, and wherein the clock control circuit and the digital interpolator perform fine adjustment of the sampling rate obtained by the digital delay element after the coarse adjustment.