Aiming at the problem that the IEEE1588 protocol based on the network has large clock synchronization deviation, a clock synchronization method based on IEEE1588 protocol is proposed. Based on the in-depth analysis of the IEEE1588 protocol, the clock bias and frequency deviation that affect the synchronization accuracy are modeled. The Kalman filter algorithm recursively discriminates the clock bias and frequency deviation, and verifies the noise characteristics through the Allan variance to continuously correct the clock bias. Finally, three sets of test schemes are designed in the laboratory environment to test the improved clock synchronization accuracy. The accuracy of the improved synchronization method and the IEEE1588 protocol synchronization method are compared, and the effectiveness and superiority of the improved synchronization method are verified.