The invention provides a wavelength selection method and a communication device. The method is applied to the fields of optical communication, optical switching, digital center networks, microwave photonics, liquid crystal antennas, optical phased arrays, beam forming, beam scanning, laser radars, laser projection, laser televisions, holographic display, adaptive optics, laser beam shaping, laser processing, ultrafast laser pulse shaping, laser active imaging, optical tomography, retina imaging and the like. And under the condition that the port of the WSS device is switched, only the image data of the changed local image in the LCOS image is updated by taking the time interval smaller than the duration of one frame of image as a unit, and the driving voltage of the pixels on the LCOS display screen is refreshed according to the priority. Compared with refreshing the image data of the whole LCOS image according to the frame frequency and refreshing the driving voltage of the pixels according to the fixed sequence of the pixel numbers, the port switching of the WSS device can be accelerated.