A method for clock recovery used in a packet-switched network, which comprises the following steps of: a transmitting terminal performing counting on Time Division Multiplexing, TDM, service data packet transmitting periods using a sampling clock of the transmitting terminal to obtain a first counting value a1, wherein the data packet transmitting period comprises a time for transmitting a data packet and a data packet transmitting interval; the transmitting terminal inserting identification information between at least two continuous data packet transmitting intervals, wherein a ratio of an inserting interval of two pieces of adjacent identification information to the sampling clock of the transmitting terminal is the first counting value a1, wherein the first counting value a1 acts as the identification information; a receiving terminal receiving the first counting value a1, calculating a proportionality coefficient between a sampling clock period of the transmitting terminal and a sampling clock period of the receiving terminal according to the first counting value a1 and the identification information, and recovering the inserting interval between the two pieces of adjacent identification information; the receiving terminal comparing an interval between the two pieces of received adjacent identification information with the recovered inserting interval between the two pieces of adjacent identification information to obtain an adjusting difference value, adjusting a time for receiving each data packet based on the adjusting difference value, and obtaining a recovered clock according to an adjusted data packet sequence; characterized in that, if the data packet transmitting period of the transmitting terminal is adjusted, and time for transmitting the identification information is superposed with time for transmitting the data packet, the transmitting terminal stopping inserting identification information, and a beginning position of the identification information and a data packet transmitting period at this moment are re-detected. a transmitting terminal performing counting on Time Division Multiplexing, TDM, service data packet transmitting periods using a sampling clock of the transmitting terminal to obtain a first counting value a1, wherein the data packet transmitting period comprises a time for transmitting a data packet and a data packet transmitting interval; the transmitting terminal inserting identification information between at least two continuous data packet transmitting intervals, wherein a ratio of an inserting interval of two pieces of adjacent identification information to the sampling clock of the transmitting terminal is the first counting value a1, wherein the first counting value a1 acts as the identification information; a receiving terminal receiving the first counting value a1, calculating a proportionality coefficient between a sampling clock period of the transmitting terminal and a sampling clock period of the receiving terminal according to the first counting value a1 and the identification information, and recovering the inserting interval between the two pieces of adjacent identification information; the receiving terminal comparing an interval between the two pieces of received adjacent identification information with the recovered inserting interval between the two pieces of adjacent identification information to obtain an adjusting difference value, adjusting a time for receiving each data packet based on the adjusting difference value, and obtaining a recovered clock according to an adjusted data packet sequence; characterized in that, if the data packet transmitting period of the transmitting terminal is adjusted, and time for transmitting the identification information is superposed with time for transmitting the data packet, the transmitting terminal stopping inserting identification information, and a beginning position of the identification information and a data packet transmitting period at this moment are re-detected.