A method for switching a line bandwidth of an optical transport network, wherein the method is applicable to the optical transport network, the optical transport network comprises a plurality of network devices, and the method comprises: switching, by a network device, a first optical transport network, OTN, frame from a first bandwidth to a second bandwidth at a granularity of a substructure, wherein a bandwidth of the substructure is a specified value, and a difference between the first bandwidth and the second bandwidth is one or more specified values; and encapsulating, by the network device, the first OTN frame with the second bandwidth according to a first encapsulation protocol, and transmitting the encapsulated frame with the second bandwidth at an optical layer; and characterized in that the switching, by the network device, a first optical transport network OTN frame from a first bandwidth to a second bandwidth at a granularity of a substructure comprises: determining, by the network device, a second OTN frame, wherein the second OTN frame is a frame with a third bandwidth, and the second OTN frame is generated by the network device based on first service data from a client side according to a second encapsulation protocol; switching, by the network device, a bandwidth of a third encapsulation protocol referring to the bandwidth of the first OTN frame from the first bandwidth to the second bandwidth at a granularity of the specified value; and mapping, by the network device, a payload of the second OTN frame to a payload of the substructure of the first OTN frame according to the third encapsulation protocol, mapping an overhead of the second OTN frame to an overhead of the first OTN frame according to the third encapsulation protocol, and filling the substructure of the first OTN frame with an invalid byte being a padding according to the third encapsulation protocol, so that a ratio of the overhead or the invalid byte comprised in each substructure to the payload is a fixed ratio. switching, by a network device, a first optical transport network, OTN, frame from a first bandwidth to a second bandwidth at a granularity of a substructure, wherein a bandwidth of the substructure is a specified value, and a difference between the first bandwidth and the second bandwidth is one or more specified values; and encapsulating, by the network device, the first OTN frame with the second bandwidth according to a first encapsulation protocol, and transmitting the encapsulated frame with the second bandwidth at an optical layer; and characterized in that the switching, by the network device, a first optical transport network OTN frame from a first bandwidth to a second bandwidth at a granularity of a substructure comprises: determining, by the network device, a second OTN frame, wherein the second OTN frame is a frame with a third bandwidth, and the second OTN frame is generated by the network device based on first service data from a client side according to a second encapsulation protocol; switching, by the network device, a bandwidth of a third encapsulation protocol referring to the bandwidth of the first OTN frame from the first bandwidth to the second bandwidth at a granularity of the specified value; and mapping, by the network device, a payload of the second OTN frame to a payload of the substructure of the first OTN frame according to the third encapsulation protocol, mapping an overhead of the second OTN frame to an overhead of the first OTN frame according to the third encapsulation protocol, and filling the substructure of the first OTN frame with an invalid byte being a padding according to the third encapsulation protocol, so that a ratio of the overhead or the invalid byte comprised in each substructure to the payload is a fixed ratio.