A method for switching of a device, comprising: receiving, by a machine-to-machine, M2M, platform, a re-registration message from a network service capability layer, NSCL, module, wherein the re-registration message comprises a position of a device in a resource tree of a NSCL, before registration and a position of the device in the resource tree of the NSCL after registration; generating, by the M2M platform, mapping relationship between the position of the device in the resource tree of the NSCL before registration and the position of the device in the resource tree of the NSCL after registration, wherein the method further comprises: determining, by the M2M platform, according to the position of the device in the resource tree of the NSCL after registration, that the device does not have SCL capability after registration, and determining, according to the position of the device in the resource tree of the NSCL before registration, that the device has the SCL capability before registration, notifying the device of setting an SCL capability state of the device to be OFF, and deleting a resource related to the device; or determining, by the M2M platform, according to the position of the device in the resource tree of the NSCL after registration, that the device has the SCL capability after registration, and determining, according to the position of the device in the resource tree of the NSCL before registration, that the device does not have the SCL capability before registration, notifying the device of setting the SCL capability state of the device to be ON, and adding the resource related to the device in the resource tree of the NSCL. receiving, by a machine-to-machine, M2M, platform, a re-registration message from a network service capability layer, NSCL, module, wherein the re-registration message comprises a position of a device in a resource tree of a NSCL, before registration and a position of the device in the resource tree of the NSCL after registration; generating, by the M2M platform, mapping relationship between the position of the device in the resource tree of the NSCL before registration and the position of the device in the resource tree of the NSCL after registration, wherein the method further comprises: determining, by the M2M platform, according to the position of the device in the resource tree of the NSCL after registration, that the device does not have SCL capability after registration, and determining, according to the position of the device in the resource tree of the NSCL before registration, that the device has the SCL capability before registration, notifying the device of setting an SCL capability state of the device to be OFF, and deleting a resource related to the device; or determining, by the M2M platform, according to the position of the device in the resource tree of the NSCL after registration, that the device has the SCL capability after registration, and determining, according to the position of the device in the resource tree of the NSCL before registration, that the device does not have the SCL capability before registration, notifying the device of setting the SCL capability state of the device to be ON, and adding the resource related to the device in the resource tree of the NSCL. determining, by the M2M platform, according to the position of the device in the resource tree of the NSCL after registration, that the device does not have SCL capability after registration, and determining, according to the position of the device in the resource tree of the NSCL before registration, that the device has the SCL capability before registration, notifying the device of setting an SCL capability state of the device to be OFF, and deleting a resource related to the device; or determining, by the M2M platform, according to the position of the device in the resource tree of the NSCL after registration, that the device has the SCL capability after registration, and determining, according to the position of the device in the resource tree of the NSCL before registration, that the device does not have the SCL capability before registration, notifying the device of setting the SCL capability state of the device to be ON, and adding the resource related to the device in the resource tree of the NSCL.