An optical switching apparatus, wherein the optical switching apparatus comprises an input port group, an input allocation matrix, a cross-connect matrix, an output allocation matrix, and an output port group, characterized in that: the input port group comprises multiple input slots, multiple input ports are provided in the input slot, and the input slot is configured to input optical signals in each dimension, or configured to input an optical signal that requires wavelength adding, or configured to input an optical signal obtained after wavelength conversion; the input allocation matrix is connected to the input port group in fiber cross-connection mode, the input allocation matrix comprises multiple first optical switches, and an input port of the first optical switch is connected to an input port of the input slot; the cross-connect matrix comprises multiple second optical switches, the second optical switch corresponds to one or more wavelengths, and an input port of the second optical switch is connected to an output port of the first optical switch; the output allocation matrix comprises multiple third optical switches, and an input port of the third optical switch is connected to an output port of the second optical switch; and the output port group is connected to the output allocation matrix in fiber cross-connection mode, the output port group comprises multiple output slots, multiple output ports are provided in the output slot, an output port of the output slot is connected to an output port of the third optical switch, and the output slot is configured to output optical signals in each dimension, or configured to output an optical signal that requires wavelength dropping, or configured to output an optical signal that requires wavelength conversion. the input port group comprises multiple input slots, multiple input ports are provided in the input slot, and the input slot is configured to input optical signals in each dimension, or configured to input an optical signal that requires wavelength adding, or configured to input an optical signal obtained after wavelength conversion; the input allocation matrix is connected to the input port group in fiber cross-connection mode, the input allocation matrix comprises multiple first optical switches, and an input port of the first optical switch is connected to an input port of the input slot; the cross-connect matrix comprises multiple second optical switches, the second optical switch corresponds to one or more wavelengths, and an input port of the second optical switch is connected to an output port of the first optical switch; the output allocation matrix comprises multiple third optical switches, and an input port of the third optical switch is connected to an output port of the second optical switch; and the output port group is connected to the output allocation matrix in fiber cross-connection mode, the output port group comprises multiple output slots, multiple output ports are provided in the output slot, an output port of the output slot is connected to an output port of the third optical switch, and the output slot is configured to output optical signals in each dimension, or configured to output an optical signal that requires wavelength dropping, or configured to output an optical signal that requires wavelength conversion.