The invention discloses a synchronization method and device for
time synchronization of a network
system, and relates to the technical field of computers, and the method comprises the following steps: when a
master station sends a dynamic compensation synchronization frame, recording a compensation sending
timestamp in a sensing identification field of a sending end; when the frame is received and transmitted from the
station, the identification field is sensed at the port to determine a compensation receiving
timestamp and a compensation transmitting
timestamp. And the slave
station identifies the dynamic compensation synchronization frame after reverse return, calculates dynamic compensation
time information based on the compensation receiving timestamp and the compensation sending timestamp corresponding to the slave
station, and reads and writes the dynamic compensation
time information to a corresponding field. And the
master station analyzes the returned dynamic compensation synchronization frame, aggregates the dynamic compensation
time information of each slave station, and solves the dynamic compensation values of the master and slave stations in combination with the fixed link
delay. And the
master station corrects a local high-precision
clock according to the data, and writes a compensation value into a local time correction register of the slave station to trigger a hardware counter to correct so as to complete synchronization of the master and slave clocks. By realizing dynamic
residence separation, the problem of overlarge error is solved.