This application provides a method and apparatus for collecting CSQF scheduling cycles in deterministic networks. In this embodiment, for the first node on a transmission path in a deterministic network, the CSQF scheduling cycle information of the first node is determined based on the receive
timestamp of the test message received by the first node and the send
timestamp of the scheduled test message. For non-first nodes, based on the CSQF scheduling cycle information of other transmission nodes preceding the non-first node in the transmission path, the test messages corresponding to the non-first node are controlled to enter the receive
queue (RQ) of other transmission nodes preceding the non-first node in the transmission path. The CSQF scheduling cycle information of the transmission node is determined based on the receive
timestamp of the test message received by the non-first node and the send timestamp of the scheduled test message. This ultimately achieves the collection of CSQF scheduling cycle information for all transmission nodes along the entire transmission path.