A method for controlling a wavelength-selective switch, WSS, channel attenuation parameter, comprising: for each WSS module in a cascaded WSS system, inputting white noise to a WSS channel of the each WSS module and adjusting attenuation parameters of all N slices of the WSS channel according to a predefined rule until a flatness of an output spectrum of the white noise being less than a first threshold; and calculating an average value of adjusted attenuation parameters of slices of WSS channels of a plurality of WSS modules and controlling an WSS channel attenuation parameter of the each WSS module based on the average value; wherein the adjusting the attenuation parameters of all N slices of the WSS channel according to the predefined rule comprises: adjusting attenuation parameters of secondary edge slices of the N slices to obtain a first adjustment result; adjusting attenuation parameters of one or more center slices of the WSS channel based on the first adjustment result to obtain a second adjustment result; and adjusting other slices of the N slices excluding the secondary edge slices and the one or more center slices based on the first adjustment result and the second adjustment result; wherein the secondary edge slices are slices next to the slice of the left spectrum edge or the right spectrum edge, the other slices refer to slices in which the secondary edge slices and the one or more center slices are excluded from the N slices, and N is an integer greater than 2; characterized in that, the adjusting the attenuation parameters of the secondary edge slices of the N slices comprises: acquiring a baud rate of a traffic signal of the channel; and adjusting the attenuation parameters of the secondary edge slices of the N slices based on the baud rate. for each WSS module in a cascaded WSS system, inputting white noise to a WSS channel of the each WSS module and adjusting attenuation parameters of all N slices of the WSS channel according to a predefined rule until a flatness of an output spectrum of the white noise being less than a first threshold; and calculating an average value of adjusted attenuation parameters of slices of WSS channels of a plurality of WSS modules and controlling an WSS channel attenuation parameter of the each WSS module based on the average value; wherein the adjusting the attenuation parameters of all N slices of the WSS channel according to the predefined rule comprises: adjusting attenuation parameters of secondary edge slices of the N slices to obtain a first adjustment result; adjusting attenuation parameters of one or more center slices of the WSS channel based on the first adjustment result to obtain a second adjustment result; and adjusting other slices of the N slices excluding the secondary edge slices and the one or more center slices based on the first adjustment result and the second adjustment result; wherein the secondary edge slices are slices next to the slice of the left spectrum edge or the right spectrum edge, the other slices refer to slices in which the secondary edge slices and the one or more center slices are excluded from the N slices, and N is an integer greater than 2; characterized in that, the adjusting the attenuation parameters of the secondary edge slices of the N slices comprises: acquiring a baud rate of a traffic signal of the channel; and adjusting the attenuation parameters of the secondary edge slices of the N slices based on the baud rate. adjusting attenuation parameters of secondary edge slices of the N slices to obtain a first adjustment result; adjusting attenuation parameters of one or more center slices of the WSS channel based on the first adjustment result to obtain a second adjustment result; and adjusting other slices of the N slices excluding the secondary edge slices and the one or more center slices based on the first adjustment result and the second adjustment result; wherein the secondary edge slices are slices next to the slice of the left spectrum edge or the right spectrum edge, the other slices refer to slices in which the secondary edge slices and the one or more center slices are excluded from the N slices, and N is an integer greater than 2; characterized in that, the adjusting the attenuation parameters of the secondary edge slices of the N slices comprises: acquiring a baud rate of a traffic signal of the channel; and adjusting the attenuation parameters of the secondary edge slices of the N slices based on the baud rate. acquiring a baud rate of a traffic signal of the channel; and adjusting the attenuation parameters of the secondary edge slices of the N slices based on the baud rate.