Un método de control de longitud de onda, que comprende: ajustar (201, 401), las potencias de todas las subportadoras en un supercanal en un extremo de transmisión y un extremo de recepción a una misma potencia, en donde el supercanal comprende una subportadora i-1, una subportadora i y una subportadora i+1, la subportadora i-1, la subportadora i y la subportadora i+1 son subportadoras consecutivas, e i es un número entero positivo mayor que 1; cuando las potencias de todas las subportadoras en el supercanal se ajustan a la misma potencia, obtener (202, 402), los valores Q de la subportadora i-1 y la subportadora i+1, en donde los valores Q se usan para indicar el rendimiento de las subportadoras; calcular (203, 403), una diferencia de valores Q entre el valor Q de la subportadora i+1 y el valor Q de la subportadora i-1, y calcular una diferencia entre la diferencia de valores Q y un valor de referencia obtenido previamente de la subportadora i; y determinar (204, 404), si un valor absoluto de la diferencia es menor que un valor de desplazamiento de frecuencia permitido previamente obtenido, y si el valor absoluto de la diferencia no es menor que el valor de desplazamiento de frecuencia permitido previamente obtenido, ajustar (205), una longitud de onda central de la subportadora i de acuerdo con la diferencia.
Embodiments of the present invention disclose a wavelength control method and apparatus. The method may include: adjusting powers of all subcarriers on a super channel to a same power, where the super channel includes at least a subcarrier i-1, a subcarrier i, and a subcarrier i+1, and the subcarrier i-1, the subcarrier i, and the subcarrier i+1 are consecutive subcarriers; when the powers of all the subcarriers on the super channel are adjusted to the same power, obtaining Q values of the subcarrier i-1 and the subcarrier i+1, where the Q values are used to indicate performance of the subcarriers; calculating a Q value difference between the Q value of the subcarrier i+1 and the Q value of the subcarrier i-1, and calculating a difference between the Q value difference and a pre-obtained reference value of the subcarrier i; and determining whether an absolute value of the difference is less than a pre-obtained allowable frequency offset value, and if the absolute value of the difference is not less than the pre-obtained allowable frequency offset value, adjusting a center wavelength of the subcarrier i according to the difference. According to the embodiments of the present invention, a center wavelength of a subcarrier can be precisely controlled.