End-to-End Time Synchronization Method, Device and Storage Medium for Time-Sensitive Networks

By obtaining and calibrating timestamps in complex network environments, analyzing and processing time delay factors, calculating network delay values ​​and adjusting local clocks, the problems of insufficient synchronization accuracy and unstable time delay in traditional methods are solved, and high-precision and stable time synchronization are achieved.

CN119788232BActive Publication Date: 2025-05-27SHENZHEN SCODENO TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510286367.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-05-27
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

In complex network environments, traditional time synchronization methods face problems of insufficient synchronization accuracy and unstable delay, especially when there are dynamically changing network delays and unpredictable jitters.

Method used

By obtaining the timestamps of the source and target ends, time calibration and delay analysis are performed, time offset factors, jitter factors and stability factors are extracted, correction and filtering are performed, network delay values ​​are calculated, and the local clock of the target end is adjusted based on this.

Benefits of technology

It significantly improves the accuracy and stability of end-to-end time synchronization, and improves the problems of insufficient synchronization accuracy and unstable delay in complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788232B_ABST
    Figure CN119788232B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of information processing, and provides a time-sensitive network end-to-end time synchronization method, device and storage medium, including obtaining a timestamp of a source end, calibrating a time synchronization signal according to the timestamp of the source end, collecting the time of a target end after obtaining the calibrated time synchronization signal to obtain a timestamp of the target end, analyzing the timestamp of the source end and the timestamp of the target end, obtaining a network delay value, and then combining the local clock information of the source end and the target end to correct the timestamp of the target end to obtain a corrected timestamp of the target end, and adjusting the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end. By obtaining the timestamp of the source end and performing time calibration and analysis, the timestamp of the target end is corrected, thereby improving the accuracy and stability of end-to-end time synchronization and solving the problems of insufficient synchronization accuracy and unstable delay in a complex network environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of information processing, and in particular, to an end-to-end time synchronization method, device, and storage medium for time-sensitive networks. Background Art

[0002] With the rapid development of fields such as industrial automation, intelligent manufacturing, unmanned driving, and 5G communication, there are more and more applications with extremely high requirements for real-time performance and accuracy. Especially in distributed systems, the time synchronization problem has become one of the key technologies. As a network technology for high-precision time synchronization, Time-Sensitive Networking (TSN) has been widely used in fields such as automation control, video surveillance, remote medical treatment, and industrial Internet. Through high-precision time synchronization, it can ensure that devices in the network work together and provide services with low latency and high stability.

[0003] In related technical means, time synchronization methods usually rely on clock synchronization protocols (such as IEEE1588 Precision Time Protocol, PTP) to ensure the time consistency of each node in the system. Existing time synchronization technologies include two main solutions: one is to exchange timestamp information between the source end and the target end, and through network delay estimation and compensation, accurately synchronize the time between devices; the other is to synchronize based on dedicated hardware (such as high-precision clock sources and dedicated synchronization modules). These solutions can usually support stable operation in a network environment on the basis of ensuring a certain degree of time synchronization accuracy.

[0004] For the above technical solutions, end-to-end time synchronization can be achieved by using the method of network delay estimation and compensation, ensuring a high degree of consistency between the time of the source end and the target end. However, in the face of a more complex network environment, especially when there are dynamic network delays and unpredictable jitters, traditional methods often face problems of insufficient synchronization accuracy and unstable time delay. Summary of the Invention

[0005] In order to improve the problems of insufficient synchronization accuracy and unstable time delay in a complex network environment, this application provides an end-to-end time synchronization method, device, and storage medium for time-sensitive networks.

[0006] The present invention provides an end-to-end time synchronization method for a time-sensitive network, including: obtaining a timestamp of a source end, calibrating a time synchronization signal according to the timestamp of the source end to obtain a calibrated time synchronization signal, and collecting the time of a target end by using the calibrated time synchronization signal to obtain a timestamp of the target end; inputting the timestamp of the source end and the timestamp of the target end into a preset delay analysis model to obtain a set of delay factors, classifying the set of delay factors to obtain a time offset factor, a jitter factor, and a stability factor; performing a time-domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and correcting the jitter factor by using the time offset reference to obtain a jitter correction value; performing a filtering process on the time offset error and the stability factor to obtain a stability correction value, performing a combined operation on the jitter correction value and the stability correction value to obtain a network delay value; based on the network delay value, combining the local clock information of the source end and the target end, correcting the timestamp of the target end to obtain a corrected timestamp of the target end, and adjusting the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end.

[0007] As a preferred solution, the steps of obtaining a timestamp of a source end, calibrating a time synchronization signal according to the timestamp of the source end to obtain a calibrated time synchronization signal, and collecting the time of a target end by using the calibrated time synchronization signal to obtain a timestamp of the target end include: when receiving a time synchronization signal for synchronizing the source end and the target end, obtaining a timestamp of the source end, identifying and verifying the timestamp of the source end by using a timestamp matching algorithm to obtain a valid timestamp; comparing the valid timestamp with a clock deviation parameter of the target end by using a dynamic time warping algorithm to generate a calibration factor and a remaining error value, adjusting the time synchronization signal by using the calibration factor to obtain an adjusted time synchronization signal, and calibrating the adjusted time synchronization signal by using the remaining error value to obtain a calibrated time synchronization signal; wherein the clock deviation parameter includes a frequency deviation and a phase deviation; collecting the time of the target end according to the calibrated time synchronization signal to obtain a timestamp of the target end.

[0008] As a preferred solution, the step of inputting the timestamps of the source end and the target end into a preset delay analysis model to obtain a set of delay factors, and classifying the set of delay factors to obtain a time offset factor, a jitter factor, and a stability factor includes: inputting the timestamps of the source end and the target end into a preset delay analysis model to calculate a time series difference, obtaining a preliminary delay data set, performing frequency domain decomposition on the preliminary delay data set by using discrete Fourier transform, and extracting a stable component and a dynamic component; calculating a time change trend based on the dynamic component to obtain a time offset factor, applying autoregressive analysis method to perform multi-order statistical analysis on the stable component to obtain a jitter factor and a noise intensity parameter, and performing low-pass filtering on the noise intensity parameter by using a FIR filter to generate a stability factor.

[0009] As a preferred solution, the step of performing time domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and using the time offset reference to correct the jitter factor to obtain a jitter correction value includes: constructing a time offset trend curve based on the time offset factor by using piecewise linear regression method, using curve fitting algorithm to segment and analyze the time offset trend curve to generate a time offset reference, and calculating a time offset error according to the time offset reference; using the time offset reference, applying fuzzy logic rules to classify the jitter factor to generate a jitter value, performing segmented optimization on the jitter value by using wavelet packet algorithm, and generating a jitter correction value based on the optimization result.

[0010] As a preferred solution, the step of constructing a time offset trend curve based on the time offset factor by using piecewise linear regression method, using curve fitting algorithm to segment and analyze the time offset trend curve to generate a time offset reference, and calculating a time offset error according to the time offset reference includes: segmenting the time offset factor into multiple linear segments by using piecewise linear regression to obtain the segment slope, segment intercept, and segment residual of each linear segment, performing statistical analysis on the segment slope to obtain a slope mean and a slope variance, adjusting the segment intercept by using the slope mean to obtain an adjusted intercept, and correcting the segment residual by using the slope variance to obtain a corrected residual; constructing a time offset trend curve according to the adjusted intercept and the corrected residual, performing curve fitting on the time offset trend curve by using Fourier series fitting algorithm to obtain Fourier coefficients and fitting residuals; performing low-pass filtering on the Fourier coefficients to obtain filtered coefficients, performing smoothing on the fitting residuals to obtain smoothed residuals, combining the filtered coefficients and the smoothed residuals to obtain a time offset reference, and inputting the time offset reference into a preset time offset error calculation model to calculate a time offset error.

[0011] As a preferred solution, the step of filtering the time offset error and the stability factor to obtain a stability correction value, and combining and calculating the jitter correction value and the stability correction value to obtain a network delay value includes: jointly filtering the time offset error and the stability factor by using a Kalman filter to obtain a filtered dynamic correction factor, optimizing the parameters of the dynamic correction factor by using a dynamic adaptive window algorithm to generate a stability correction value; performing a fast Fourier transform on the jitter correction value to extract frequency domain characteristics, fusing the frequency domain characteristics and the stability correction value by using a dynamic characteristic fusion algorithm based on convolution to generate a network dynamic delay factor, and performing matrix weighted summation on the network dynamic delay factor and the stability correction value to obtain a network delay value.

[0012] As a preferred solution, the step of correcting the timestamp of the target end based on the network delay value in combination with the local clock information of the source end and the target end to obtain a corrected timestamp of the target end, and adjusting the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end includes: correcting the network delay value and the timestamp of the target end by using non - linear least squares method to obtain a time correction factor, performing linear interpolation on the time correction factor to obtain a corrected timestamp of the target end; comparing the corrected timestamp of the target end with the timestamp of the source end to generate a synchronization deviation parameter, using the synchronization deviation parameter to finely adjust the local clock frequency of the target end to obtain a frequency adjustment value, and applying the frequency adjustment value to the local clock reference of the target end to complete the time reference adjustment.

[0013] The present application also provides a time-sensitive network end-to-end time synchronization device, including: an acquisition module, configured to acquire a timestamp of a source end, perform time calibration on a time synchronization signal according to the timestamp of the source end to obtain a calibrated time synchronization signal, and use the calibrated time synchronization signal to collect the time of a target end to obtain a timestamp of the target end; a classification module, configured to input the timestamp of the source end and the timestamp of the target end into a preset delay analysis model to obtain a set of delay factors, and perform classification processing on the set of delay factors to obtain a time offset factor, a jitter factor, and a stability factor; a correction module, configured to perform time-domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and use the time offset reference to correct the jitter factor to obtain a jitter correction value; a processing module, configured to perform filtering processing on the time offset error and the stability factor to obtain a stability correction value, and perform a combined operation on the jitter correction value and the stability correction value to obtain a network delay value; an adjustment module, configured to, based on the network delay value, combine the local clock information of the source end and the target end, correct the timestamp of the target end to obtain a corrected timestamp of the target end, and adjust the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end.

[0014] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the processor is caused to execute the time-sensitive network end-to-end time synchronization method as described in any one of the above.

[0015] Compared with the prior art, the present application has the following beneficial effects: high synchronization and stable delay. By acquiring the timestamp of the source end and performing precise time calibration, the accuracy of the time synchronization signal is ensured. Using a preset delay analysis model, the timestamps of the source end and the target end are analyzed in detail, and after extracting the time offset factor, jitter factor, and stability factor that affect time synchronization, time-domain analysis is performed on the time offset factor to determine the time offset reference and error, and the jitter factor is corrected to eliminate the influence of fixed delay; filtering processing is performed on the time offset error and the stability factor to obtain a stability correction value to reduce the interference of noise and unstable factors; a combined operation is performed on the jitter correction value and the stability correction value to accurately calculate the network delay value; based on the network delay value, combining the local clock information of the source end and the target end, the timestamp of the target end is corrected, and the local clock of the target end is adjusted, effectively compensating for the fixed delay and random jitter in the network transmission process, significantly improving the accuracy and stability of end-to-end time synchronization, and improving the problems of insufficient synchronization accuracy and unstable delay in a complex network environment. Description of the Drawings

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0017] The structures, proportions, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they do not have technical essential significance. Any modification of the structure, change of the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope covered by the technical content disclosed by the present invention.

[0018] Figure 1 It is a schematic flowchart of the end-to-end time synchronization method for a time-sensitive network provided by an embodiment of the present invention;

[0019] Figure 2 It is a schematic block diagram of the structure of the end-to-end time synchronization device for a time-sensitive network provided by an embodiment of the present invention.

[0020] Explanation of reference numerals:

[0021] 10. End-to-end time synchronization device for a time-sensitive network; 11. Acquisition module; 12. Classification module; 13. Calibration module; 14. Processing module; 15. Adjustment module. Detailed implementation manners

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0023] The flowchart shown in the drawings is only an example and explanation, and does not necessarily include all contents and operations / steps, nor does it necessarily need to be executed in the described order. For example, some operations / steps can also be decomposed, combined, or partially merged. Therefore, the actual execution order may change according to the actual situation.

[0024] It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification of this application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0025] It should be further understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] The technical solution of the present invention will be further described below with reference to the accompanying drawings and through specific embodiments.

[0027] Embodiment 1:

[0028] As Figure 1 shown, this application also provides an end-to-end time synchronization method for a time-sensitive network, including steps S100 to S500.

[0029] Step S100: Obtain the timestamp of the source end, calibrate the time synchronization signal according to the timestamp of the source end to obtain a calibrated time synchronization signal, and use the calibrated time synchronization signal to collect the time of the target end to obtain the timestamp of the target end.

[0030] In this step, obtaining the timestamp of the source end is the starting point of time synchronization, and ensuring the accuracy of the source end time is crucial for the entire synchronization process. Specifically, the local clock of the source end generates an accurate timestamp to record the current transmission time. Then, according to the timestamp of the source end, the time synchronization signal to be sent is time-calibrated so that the time information of the signal is consistent with the actual time of the source end, obtaining a calibrated time synchronization signal. Next, the calibrated time synchronization signal is sent to the target end. After receiving the signal, the target end uses it to collect the current time of the target end and records it as the timestamp of the target end.

[0031] For example, in an industrial control network, the timestamp of the source end device is T1, and the time synchronization signal is sent to the target end device through the network. The source end calibrates the signal to ensure that the transmission time is synchronized with T1. After receiving the synchronization signal, the target end device immediately records the reception time as T2 to obtain the timestamp of the target end. In this way, the timestamps of the source end and the target end are T1 and T2 respectively, providing basic data for subsequent delay analysis.

[0032] Step S200: Input the timestamp of the source end and the timestamp of the target end into a preset delay analysis model to obtain a set of delay factors, and classify the set of delay factors to obtain a time offset factor, a jitter factor, and a stability factor.

[0033] In this step, using a preset delay analysis model, the timestamps of the source end and the target end obtained are processed to analyze various delay factors existing in the network transmission process. Specifically, T1 and T2 are input into the delay analysis model, and the transmission delay Δt = T2 - T1 is calculated to form a set of delay factors. Then, the set of delay factors is classified and processed. According to the characteristics of the delay, it is divided into a time offset factor, a jitter factor, and a stability factor. Among them, the time offset factor represents the fixed delay in the system; the jitter factor represents the random delay change caused by reasons such as network load changes; the stability factor is used to evaluate the trend and stability of the delay change.

[0034] For example, assume that the delay data collected multiple times are Δt1, Δt2, Δt3... Through statistical analysis, the average value of these delays is calculated as the time offset factor, such as Δt_avg; the difference between each delay and the average value is calculated as the jitter factor; a trend analysis is performed on the delay data to evaluate its change over time, and the stability factor is obtained.

[0035] Step S300: Perform a time-domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and use the time offset reference to correct the jitter factor to obtain a jitter correction value.

[0036] In this step, a more in-depth time-domain analysis is performed on the time offset factor to determine the fixed delay reference of the system. Specifically, the time offset reference Δt0 is calculated using the time offset factor as a reference value in the synchronization process. At the same time, the difference between the time offset collected each time and the reference is calculated to obtain the time offset error Δt_err. Then, the jitter factor is corrected using the time offset reference to subtract the influence of the fixed delay and obtain a jitter correction value purely caused by random changes.

[0037] For example, if the time offset reference Δt0 = 5ms and the time offset Δt = 5.2ms measured in a certain time, then the time offset error Δt_err = Δt - Δt0 = 0.2ms. The jitter factor Jitter originally includes the influence of the fixed delay. After correction, the jitter correction value Jitter_corrected = Jitter - Δt0 is obtained, which reflects the true jitter situation of the network.

[0038] Step S400: Perform a filtering process on the time offset error and the stability factor to obtain a stability correction value, and perform a combined operation on the jitter correction value and the stability correction value to obtain the network delay value.

[0039] To eliminate the noise and unstable factors in the measurement data, filtering is performed on the time offset error and the stability factor. Specifically, an appropriate filtering algorithm (such as weighted average filtering, Kalman filtering, etc.) is used to process Δt_err and the stability factor to obtain a smoother stability correction value S_corrected. Then, the jitter correction value and the stability correction value are combined for calculation, and various delay factors are comprehensively considered to calculate the final network delay value Delay.

[0040] For example, the weighted average filtering is used to process the time offset error measured multiple times, and the stability correction value S_corrected = (Δt_err1 + Δt_err2 + Δt_err3...) / N is obtained. Then, the network delay value Delay = Δt0 + S_corrected + Jitter_corrected is used as the basis for correcting the timestamp of the target end.

[0041] Step S500: Based on the network delay value, combined with the local clock information of the source end and the target end, the timestamp of the target end is corrected to obtain the corrected timestamp of the target end. According to the corrected timestamp of the target end and the timestamp of the source end, the local clock of the target end is adjusted.

[0042] In this step, the calculated network delay value is used to correct the timestamp of the target end to keep it synchronized with the time of the source end. Specifically, the corrected timestamp of the target end T2_corrected = T2 - Delay. Then, T2_corrected is compared with the timestamp of the source end T1, and the time difference ΔT = T1 - T2_corrected is calculated. According to this time difference, the local clock of the target end is adjusted to compensate for the clock deviation and achieve time synchronization between the source end and the target end.

[0043] For example, assuming the calculated network delay value Delay = 5.5ms, the timestamp of the target end T2 = 1005.7ms, and the corrected timestamp of the target end T2_corrected = 1005.7ms - 5.5ms = 1000.2ms. The timestamp of the source end T1 = 1000ms, and the time difference ΔT = 1000ms - 1000.2ms = -0.2ms. The local clock of the target end needs to be accelerated by 0.2ms to achieve time synchronization with the source end.

[0044] In this embodiment, first, obtain the timestamp of the source end, and calibrate the time synchronization signal according to the timestamp of the source end to obtain the calibrated time synchronization signal. Use the calibrated time synchronization signal to collect the time of the target end to obtain the timestamp of the target end. Then, input the timestamp of the source end and the timestamp of the target end into a preset delay analysis model to obtain a set of delay factors, and classify the set of delay factors to obtain a time offset factor, a jitter factor, and a stability factor. Next, perform a time-domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and use the time offset reference to correct the jitter factor to obtain a jitter correction value. Subsequently, perform a filtering process on the time offset error and the stability factor to obtain a stability correction value, and perform a combined operation on the jitter correction value and the stability correction value to obtain a network delay value. Finally, based on the network delay value, combined with the local clock information of the source end and the target end, correct the timestamp of the target end to obtain the corrected timestamp of the target end, and adjust the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end, effectively improving the accuracy and stability of end-to-end time synchronization of the time-sensitive network.

[0045] By using the classification analysis and precise correction of the time offset factor, jitter factor, and stability factor, the dynamic delay and jitter factors in the network can be fully compensated, and the network delay can be accurately calculated and corrected. In this way, in a complex network environment, the timestamp of the target end is more accurately corrected, the local clock of the target end can be accurately synchronized with the source end, the synchronization error is significantly reduced, the real-time performance and reliability of the system are improved, and the problems of insufficient synchronization accuracy and unstable delay in a complex network environment are improved.

[0046] Embodiment 2:

[0047] In step S100, when receiving the time synchronization signal that needs to synchronize the source end and the target end, obtain the timestamp of the source end, and use the timestamp matching algorithm to identify and verify the timestamp of the source end to obtain a valid timestamp.

[0048] Precisely identify and verify the timestamp at the source end by adopting a timestamp matching algorithm. Specifically, first, after the source end sends a time synchronization signal, the target end receives this signal, which contains the timestamp information of the source end. To ensure the validity and accuracy of this timestamp, the target end uses the timestamp matching algorithm to perform format identification and content verification on the received source end timestamp. The timestamp matching algorithm includes format verification of the timestamp, such as whether it conforms to the UTC (Coordinated Universal Time) standard format, and checks whether the year, month, day, hour, minute, second, millisecond, etc. in the timestamp are within a reasonable range. It also includes integrity verification of the timestamp, such as verifying whether the timestamp data has been damaged or tampered with during transmission through a checksum (such as CRC check) or a hash function. Through these steps, a verified and valid timestamp is obtained, providing a reliable data basis for the subsequent synchronization process.

[0049] For example, if the timestamp at the source end is "2023-10-15T14:23:45.123456Z", after the target end receives the time synchronization signal, it first checks whether the format of the timestamp is in the ISO8601 standard format, confirms that the year is "2023", the month is "10", the date is "15", the hour is "14", the minute is "23", the second is "45", the millisecond is "123456", and verifies whether these values are within a reasonable range. Then, the target end performs a CRC check on the timestamp data, calculates the checksum of the received timestamp, and compares it with the checksum sent by the source end. After confirming that they are consistent, it determines that this timestamp is a valid timestamp, ensuring the reliability of subsequent time synchronization processing.

[0050] Compare the valid timestamp with the clock deviation parameters at the target end using the dynamic time warping algorithm to generate a calibration factor and a residual error value. Use the calibration factor to adjust the time synchronization signal in terms of time to obtain an adjusted time synchronization signal, and use the residual error value to calibrate the adjusted time synchronization signal to obtain a calibrated time synchronization signal. Among them, the clock deviation parameters include frequency deviation and phase deviation.

[0051] The clock deviation between the effective timestamp and the target end is accurately corrected by applying the dynamic time adjustment algorithm; specifically, first, the difference between the effective timestamp and the current time of the target end is calculated to obtain the initial time deviation. Among them, the clock deviation parameter of the target end is the systematic error of the clock of the target end device, including frequency deviation and phase deviation. Using the dynamic time adjustment algorithm, the initial time deviation is dynamically adjusted to generate a calibration factor by considering the frequency offset and phase difference of the target end clock. The calibration factor is used to compensate for the systematic deviation between the target end clock and the source end clock. Next, the residual error value between the adjusted time synchronization signal and the target end clock is calculated, and the error value may be caused by random jitter and noise. The adjusted time synchronization signal is finely calibrated using the residual error value to eliminate small random errors, and finally a calibrated time synchronization signal is obtained.

[0052] For example, assume that the valid timestamp is "2023-10-15T14:23:45.123456Z", the current time of the target end is "2023-10-15T14:23:45.120000Z", and the initial time deviation is 3.456 milliseconds. The clock frequency deviation of the target end is ±10ppm, which means that the deviation may be 10 microseconds per second. Through the dynamic time normalization algorithm, taking into account the frequency deviation and the initial time deviation, the calibration factor is calculated to be 3.456 milliseconds-(10ppm×time interval). Assuming that the time interval is 1 second, the time error caused by the frequency deviation is ±10 microseconds. The calibration factor is therefore adjusted to approximately 3.446 milliseconds. The time synchronization signal is time-adjusted using the calibration factor to obtain an adjusted time synchronization signal. The residual error value may be a small error caused by factors such as transmission delay jitter, such as 10 microseconds. The adjusted time synchronization signal is calibrated using the residual error value, and a high-precision calibrated time synchronization signal is finally obtained.

[0053] The time of the target end is collected according to the calibrated time synchronization signal to obtain the timestamp of the target end.

[0054] By using the calibrated time synchronization signal as a reference, the time of the target end is accurately collected; specifically, after receiving the calibrated time synchronization signal, the target end immediately triggers the local time acquisition module to record the local time at this moment as the timestamp of the target end. Since the previous calibration process has eliminated clock deviation and random errors as much as possible, the target end timestamp collected at this time has a high accuracy, providing reliable data for subsequent time synchronization calculations.

[0055] For example, after receiving the calibrated time synchronization signal, the destination immediately reads the local clock and obtains the timestamp of the destination as "2023-10-15T14:23:45.123466Z". Since the previous calibration has minimized the clock deviation between the source and the destination, the difference between the destination timestamp and the source timestamp is only at the nanosecond level, meeting the requirements of high-precision time synchronization.

[0056] In step S200, the timestamps of the source and the destination are input into a preset time delay analysis model for calculating the time sequence difference, obtaining a preliminary time delay data set, and using the discrete Fourier transform to perform frequency domain decomposition on the preliminary time delay data set to extract the stable component and the dynamic component.

[0057] By calculating the difference and performing frequency domain analysis on the timestamps of the source and the destination in the time delay analysis model; specifically, first, calculate the time difference between the source timestamp and the destination timestamp to obtain a preliminary time delay data set, which reflects the time difference between the source and the destination in multiple measurements. Then, use the discrete Fourier transform (DFT) to perform frequency domain decomposition on the preliminary time delay data set, converting the time delay data from the time domain to the frequency domain. By analyzing the frequency domain signal, the stable component and the dynamic component can be distinguished. The stable component corresponds to the low-frequency component and represents the fixed time delay of the system, such as the line propagation delay, etc.; the dynamic component corresponds to the high-frequency component and reflects the time delay changes caused by jitter, network congestion, etc. during the transmission process.

[0058] For example, assume that the preliminary time delay data set is [3.456ms, 3.458ms, 3.460ms, 3.455ms, 3.457ms], and perform DFT on this data set to obtain the frequency domain signal. Analyzing the spectrum shows that the main energy is concentrated in the DC and low-frequency components, the average value of the corresponding stable component is 3.457ms, and the dynamic component of the high-frequency component is less than ±0.003ms, indicating the small random variation of the time delay. This decomposition helps to distinguish the fixed time delay and the random jitter, facilitating the subsequent extraction of the time delay factor.

[0059] Calculate the time change trend based on the dynamic component to obtain the time offset factor, apply the autoregressive analysis method to perform multi-order statistical analysis on the stable component to obtain the jitter factor and the noise intensity parameter, and perform low-pass filtering on the noise intensity parameter through the FIR filter to generate the stability factor.

[0060] Through in-depth statistical analysis and filtering processing of the dynamic component and the stable component; specifically, for the dynamic component, by calculating its change trend over a period of time, it is identified whether there is a systematic time offset, such as linear drift, etc. According to the time change trend, a time offset factor is calculated to quantify the degree of this systematic offset. Then, the autoregressive (AR) analysis method is applied to the stable component to establish a multi-order autoregressive model, capture the statistical characteristics of the delay data, extract the jitter factor to quantify the amplitude of random jitter, and the noise intensity parameter to reflect the impact of measurement noise on the delay data. Next, a finite impulse response (FIR) filter is used to perform low-pass filtering on the noise intensity parameter to filter out high-frequency noise and obtain a smooth stability factor, which represents the long-term stability of the delay data.

[0061] For example, for the dynamic component, the calculated time offset factor is 0.001 ms per minute, indicating that the delay increases slightly with time. For the stable component, a third-order autoregressive model is applied, and the estimated jitter factor is ±0.002 ms, and the noise intensity parameter is 0.0005 ms. Then, the noise intensity parameter is low-pass filtered by the FIR filter, and the obtained smooth stability factor is 0.0004 ms. This stability factor shows that the noise level of the delay data is low and the system has good delay stability.

[0062] In step S300, a piecewise linear regression method is used to construct a time offset trend curve based on the time offset factor, the curve fitting algorithm is used to segment and analyze the time offset trend curve, a time offset reference is generated, and the time offset error is calculated according to the time offset reference.

[0063] By performing piecewise linear regression on the time offset factor, an accurate time offset trend curve is constructed; specifically, first, the time offset factors are sorted according to the time series to form a set of ordered time offset data. Then, using the piecewise linear regression method, the entire time series is divided into multiple intervals, and linear regression analysis is performed on the time offset data within each interval to obtain the segment slope, segment intercept, and segment residuals of each linear segment. Next, statistical analysis is performed on the segment slopes of all linear segments, the mean and variance of the slopes are calculated to evaluate the overall trend and fluctuation degree of the time offset. The segment intercepts are adjusted using the slope mean to obtain the adjusted intercepts to eliminate the influence of bias and error. Finally, the segment residuals are corrected using the slope variance to obtain the corrected residuals, improving the fitting accuracy of the regression model. Through the above steps, a time offset reference is generated, providing a reliable basis for subsequent calculation of the time offset error.

[0064] For example, assume that during a time synchronization process, the sequence of time offset factors collected is: 0.5ms, 0.8ms, 1.2ms, 1.6ms, 2.0ms, 2.4ms, 2.8ms, corresponding to times t1, t2, t3, t4, t5, t6, t7. First, sort the data by time, and then divide the sequence into two intervals: [t_1, t_4] and [t_4, t_7]. In the first interval, perform linear regression on 0.5ms, 0.8ms, 1.2ms, 1.6ms, obtaining a segment slope of 0.3667ms / unit time, a segment intercept of 0.1333ms, and segment residuals of 0.0333ms, -0.0333ms, 0.0333ms, -0.0333ms. In the second interval, perform linear regression on 1.6ms, 2.0ms, 2.4ms, 2.8ms, obtaining a segment slope of 0.4ms / unit time, a segment intercept of 1.2ms, and segment residuals of -0.1ms, 0.0ms, 0.1ms, 0.0ms. Conduct statistical analysis on the segment slopes, with a slope mean of 0.3833ms / unit time and a slope variance of 0.000278ms² / unit time². Adjust the segment intercepts using the slope mean, obtaining new intercepts of 0.15ms and 1.15ms. Correct the segment residuals using the slope variance, and finally obtain the corrected residuals of 0.0306ms, -0.0306ms, 0.0306ms, -0.0306ms and -0.0952ms, 0.0048ms, 0.1048ms, 0.0048ms. Ultimately, a time offset trend curve is constructed, laying the foundation for calculating the time offset error.

[0065] Using the time offset reference, apply fuzzy logic rules to classify the jitter factors, generate jitter values, perform segmented optimization on the jitter values through the wavelet packet algorithm, and generate jitter correction values based on the optimization results.

[0066] By using the time offset reference as a reference, use fuzzy logic rules to finely classify and process the jitter factors; specifically, first, according to the time offset reference, determine the thresholds and classification criteria of the jitter factors, construct a fuzzy set, and divide the jitter factors into levels such as "high jitter", "medium jitter", and "low jitter". Calculate the degree to which each jitter factor belongs to each jitter level using the membership function, and generate the corresponding jitter values. Then, perform segmented optimization processing on the jitter values using the wavelet packet algorithm. The wavelet packet algorithm can perform time-frequency analysis on the jitter signal, accurately extract the jitter characteristics of different frequency bands, and eliminate noise and interference. By reconstructing the jitter signals of each frequency band, the optimized jitter values are obtained. Finally, based on the optimization results, calculate the jitter correction values to compensate for the time delay error caused by random jitter during the transmission process.

[0067] For example, assume that the jitter factor sequence is 0.05 ms, 0.15 ms, 0.25 ms, 0.10 ms, 0.20 ms. Based on the time offset reference, set the thresholds for jitter factor classification as 0.1 ms and 0.2 ms. Apply fuzzy logic rules to calculate the membership degrees of each jitter factor belonging to different jitter levels. For example, 0.05 ms belongs to "low jitter" with a degree of 0.9 and "medium jitter" with a degree of 0.1; 0.15 ms belongs to "medium jitter" with a degree of 0.8 and "high jitter" with a degree of 0.2. Generate corresponding jitter values according to the membership degrees. Then, use the wavelet packet algorithm to decompose the jitter values and extract the jitter characteristics of each frequency band. By threshold processing and reconstruction of the wavelet coefficients, eliminate high-frequency noise to obtain the optimized jitter values of 0.048 ms, 0.142 ms, 0.238 ms, 0.095 ms, 0.190 ms. Finally, calculate the jitter correction value as the basis for subsequent delay correction.

[0068] Among them, the steps of constructing a time offset trend curve based on the time offset factor by using the piecewise linear regression method, and using the curve fitting algorithm to segment and analyze the time offset trend curve to generate a time offset reference and calculate the time offset error according to the time offset reference include: segmenting the time offset factor into multiple linear segments through piecewise linear regression to obtain the segment slope, segment intercept, and segment residual of each linear segment, statistically analyzing the segment slopes to obtain the slope mean and slope variance, adjusting the segment intercepts by using the slope mean to obtain the adjusted intercepts, and correcting the segment residuals by using the slope variance to obtain the corrected residuals.

[0069] Precisely extract the time offset characteristics by performing piecewise linear regression and statistical analysis on the time offset factor. Specifically, first, arrange the time offset factors in chronological order to form a time series. Then, according to the change trend and characteristics of the data, divide the time series into multiple linear intervals. In each interval, perform linear regression using the least squares method to obtain the corresponding segment slope (representing the change rate of time offset), segment intercept (representing the value of time offset at the starting point of this segment), and segment residual (the difference between the actual observed value and the fitted value). Next, statistically analyze the segment slopes of all linear segments, calculate the slope mean to reflect the average change trend of the overall time offset, and calculate the slope variance to evaluate the degree of slope fluctuation. Use the slope mean to adjust the segment intercepts of each linear segment to make the trends between different segments consistent and eliminate the discontinuity between segments caused by measurement errors or random factors. Use the slope variance to correct the segment residuals, reduce the deviation, and improve the fitting accuracy of the model. Through the above steps, a more accurate time offset trend curve is constructed.

[0070] For example, assume that the time offset factor data is: times t1, t2, t3, t4, t5, and the corresponding time offset factors are 1 ms, 2 ms, 3 ms, 5 ms, 7 ms. Divide the data into two segments, [t_1, t_3] and [t_3, t_5]. Within the first segment, perform linear regression to obtain a segment slope of 1 ms / unit time, a segment intercept of 0 ms, and a segment residual of 0 ms. Within the second segment, obtain a segment slope of 1 ms / unit time, a segment intercept of 2 ms, and a segment residual of 0 ms. Conduct a statistical analysis on the segment slopes, with a slope mean of 1 ms / unit time and a slope variance of 0 ms² / unit time². Use the slope mean to adjust the segment intercept of the second segment to be consistent with the first segment, and the adjusted intercept is 0 ms. Since the slope variance is zero, there is no need to correct the segment residuals. Finally, obtain a unified time offset trend curve.

[0071] Construct a time offset trend curve based on the adjusted intercept and the corrected residuals, and perform curve fitting on the time offset trend curve through the Fourier series fitting algorithm to obtain Fourier coefficients and fitting residuals.

[0072] By using the Fourier series fitting algorithm, perform spectral analysis on the adjusted time offset trend curve to extract the periodic characteristics of the signal; specifically, first, use the adjusted intercept and the corrected residuals to reconstruct the complete time offset trend curve. Then, adopt the Fourier series fitting algorithm to fit the time offset trend curve, and decompose the time series signal into sine and cosine functions of different frequencies. Through fitting, a series of Fourier coefficients are obtained, including the DC component (average value), the amplitudes and phases of the fundamental wave and each harmonic, comprehensively describing the spectral characteristics of the signal. At the same time, calculate the fitting residuals, that is, the difference between the original trend curve and the Fourier fitting curve, to evaluate the fitting accuracy.

[0073] For example, for the time offset trend curve , using the Fourier series expansion, we get:

[0074]

[0075] where is the DC component, and are the Fourier coefficients, is the fundamental angular frequency. Through calculation, the Fourier coefficients are obtained. For example, , , , , etc. The fitting residuals can be obtained by calculating the differences between the original curve and the fitting curve at each time point. If the residuals are small, it indicates a good fitting effect.

[0076] Perform low-pass filtering on the Fourier coefficients to obtain the filtered coefficients, perform smoothing on the fitting residuals to obtain the smoothed residuals, combine the filtered coefficients and the smoothed residuals to obtain the time offset reference, and input the time offset reference into a preset time offset error calculation model to calculate the time offset error.

[0077] By filtering and smoothing the Fourier coefficients and fitting residuals, high-frequency noise and random errors are eliminated, and an accurate time offset reference is obtained. Specifically, first, for the Fourier coefficients, a low-pass filter is used to filter out the high-frequency components and only retain the low-frequency components that have a significant impact on the time offset trend. This step can eliminate high-frequency noise and interference and extract the main features of the signal. Then, a smoothing method, such as the moving average method or the exponential smoothing method, is applied to the fitting residuals to reduce the influence of random errors and fluctuations on the results. The filtered Fourier coefficients are recombined to construct the filtered time offset trend curve. The smoothed residuals are superimposed on the filtered trend curve to obtain the final time offset reference. Finally, the time offset reference is input into a preset time offset error calculation model, and combined with the model parameters and algorithms, the time offset error is accurately calculated for subsequent time synchronization adjustment.

[0078] For example, for the Fourier coefficients, retain the coefficients below a certain frequency threshold. Assume only , , are retained. The filtered coefficients are , , . Use the filtered coefficients to reconstruct the time offset trend curve . For the fitting residuals , the five-point moving average method is used for smoothing to obtain the smoothed residuals . Add the two to obtain the time offset reference:

[0079]

[0080] Input into the time offset error calculation model. For example, the error calculation model is:

[0081]

[0082] where is the actually measured time offset value. Through calculation, the time offset error is obtained, providing an accurate basis for adjusting the clock of the target end.

[0083] In step S400, a Kalman filter is used to jointly filter the time offset error and the stability factor to obtain a filtered dynamic correction factor, and a dynamic adaptive window algorithm is used to optimize the parameters of the dynamic correction factor to generate a stability correction value.

[0084] By applying the Kalman filter, the time offset error and stability factor are jointly filtered, the information of the two is integrated, the noise and uncertainty are eliminated, and a more accurate dynamic correction factor after filtering is obtained; specifically, first, the state space model of the time offset error and the stability factor is established, the time offset error is regarded as the state variable of the system, the stability factor is used as the observation, the covariance matrix of the process noise and the measurement noise is introduced, and the initial parameters of the Kalman filter are constructed. Then, the time offset error is estimated and corrected by using the prediction and update steps of the Kalman filter, the influence of random jitter and noise is eliminated, and the dynamic correction factor after filtering is obtained. Then, the dynamic adaptive window algorithm is used to dynamically adjust the window size according to the changing trend of the dynamic correction factor, optimize the parameters of the dynamic correction factor, balance the sensitivity and stability of the filter, generate the stability correction value, and further improve the accuracy of time synchronization.

[0085] For example, suppose that during the time synchronization process, a series of time offset errors are measured , the corresponding stability factor is . First, build the state space model:

[0086] Equation of state:

[0087] Observation equation:

[0088] in, is the time offset error, is the stability factor, and are process noise and measurement noise respectively, assuming that they obey zero-mean Gaussian distribution, and the covariance matrices are Q and R. Set the initial state estimate and covariance matrix, apply the Kalman filter for iterative calculation, and obtain the dynamic correction factor after filtering, such as [0.105ms, 0.118ms, 0.143ms, 0.136ms, 0.132ms]. Then, the dynamic adaptive window algorithm is used to adjust the window size according to the change amplitude of the dynamic correction factor, such as increasing the window when the change is stable and reducing the window when the change is drastic, optimize the filtering parameters, and finally generate the stability correction value.

[0089] Perform a fast Fourier transform on the jitter correction value, extract the frequency domain characteristics, fuse the frequency domain characteristics and the stability correction value based on the dynamic characteristic fusion algorithm of convolution to generate the network dynamic delay factor, and perform matrix weighted summation on the network dynamic delay factor and the stability correction value to obtain the network delay value.

[0090] By performing frequency domain analysis on the jitter correction value, extracting its frequency components, combining with the stability correction value, and using the dynamic characteristic fusion algorithm of convolution, the fusion of the two in the frequency domain is realized to generate the network dynamic delay factor. Specifically, first, apply the fast Fourier transform (FFT) to the jitter correction value sequence to convert the time domain signal into a frequency domain signal, obtain the amplitude spectrum and phase spectrum, extract the main frequency components, and analyze the frequency characteristics of the jitter. Then, adopt the dynamic characteristic fusion algorithm based on convolution to perform convolution operation on the jitter frequency domain characteristics and the stability correction value to realize the frequency domain fusion of the signal, emphasize the common frequency components, suppress noise and irrelevant information, and obtain the network dynamic delay factor. Next, construct a weight matrix, perform matrix weighted summation on the network dynamic delay factor and the stability correction value, comprehensively consider the influence of both on the network delay, and obtain the final network delay value for accurate compensation of the delay.

[0091] For example, the jitter correction value sequence is 0.02ms, 0.03ms, -0.01ms, -0.02ms, 0.01ms. Perform FFT on it to obtain the frequency components: , and the corresponding amplitude spectrum: . The stability correction value is . Use convolution operation to fuse the amplitude spectrum and the stability correction value. For example, calculate:

[0092]

[0093] The obtained is the frequency domain representation of the network dynamic delay factor. Then, set the weight matrix , for example, , . Perform weighted summation on the network dynamic delay factor and the stability correction value to calculate the network delay value . After calculation, obtain the network delay value for subsequent adjustment of time synchronization.

[0094] In step S500, correct the network delay value and the time stamp of the target end through the nonlinear least squares method to obtain the time correction factor, and perform linear interpolation processing on the time correction factor to obtain the corrected time stamp of the target end.

[0095] By adopting the non - linear least - squares method, fitting the relationship model between the network delay value and the target - end timestamp, and solving the time correction factor to correct the target - end timestamp; specifically, first, establish a non - linear relationship equation between the network delay value and the target - end timestamp. For example, assume the relationship is , where is an undetermined non - linear function, is a parameter vector. Then, using the non - linear least - squares method, with the measured network delay values and the corresponding target - end timestamps as the data set, minimize the sum of the squared residuals between the model prediction values and the actual observed values, and solve for the parameter , to obtain the time correction factor . Next, perform linear interpolation on the time correction factor to make it smoothly transition in the target - end timestamp sequence, avoiding mutations caused by uneven sampling intervals, to obtain the corrected target - end timestamp, improving the accuracy and stability of time synchronization.

[0096] Compare the corrected target - end timestamp with the source - end timestamp to generate a synchronization deviation parameter, use the synchronization deviation parameter to finely adjust the local clock frequency of the target - end, obtain a frequency adjustment value, and apply the frequency adjustment value to the local clock reference of the target - end to complete the time - reference adjustment.

[0097] By precisely comparing the corrected target - end timestamp with the source - end timestamp, calculating the time difference between the two to generate a synchronization deviation parameter, and using this to adjust the frequency of the target - end local clock to achieve the purpose of precise synchronization; specifically, first, obtain the corrected target - end timestamp and the corresponding source - end timestamp , and calculate the synchronization deviation parameter . Then, according to the synchronization deviation parameter, use a frequency control algorithm to calculate the adjustment amount of the target - end local clock frequency, that is, the frequency adjustment value . This can be achieved through a proportional - integral - derivative (PID) controller or other suitable control strategies to convert the time deviation into a frequency adjustment to eliminate the accumulated time error. Next, apply the calculated frequency adjustment value to the local clock reference of the target - end, adjust the frequency of the clock oscillator, so that the running speed of the target - end clock is synchronized with the source - end clock, thereby completing the time - reference adjustment and meeting the requirements of high - precision time synchronization.

[0098] For example, assume the corrected target - end timestamp is seconds, and the source - end timestamp is seconds, then the synchronization deviation parameter is seconds. Assume the local clock frequency of the target - end is . Using the synchronization deviation parameter, according to the frequency adjustment formula:

[0099]

[0100] Among them, is the update time interval, such as 1 second. Substituting the value, the frequency adjustment value is obtained:

[0101]

[0102] Apply 's frequency adjustment value to the local clock reference of the target end, so that the clock frequency is adjusted from 20 MHz to 19,999,940 Hz. By fine-tuning the clock frequency, the target end clock will gradually correct the time deviation and keep in sync with the source end clock.

[0103] In this embodiment, by using a Kalman filter to jointly filter the time offset error and stability factor, noise and uncertainty are eliminated, and a more accurate dynamic correction factor is obtained; then, a dynamic adaptive window algorithm is used to optimize the parameters of the dynamic correction factor to generate a stability correction value, improving the accuracy and stability of time synchronization. Next, a fast Fourier transform is performed on the jitter correction value to extract its frequency domain characteristics, and a dynamic characteristic fusion algorithm based on convolution is used to fuse the frequency domain characteristics with the stability correction value to generate a network dynamic delay factor; then, by performing matrix weighted summation on the network dynamic delay factor and the stability correction value, a more accurate network delay value is obtained. Subsequently, a nonlinear least squares method is used to correct the network delay value and the time stamp of the target end to obtain a time correction factor, and linear interpolation processing is performed on it to obtain the corrected time stamp of the target end, ensuring smooth transition and accuracy between time stamps. Finally, the corrected time stamp of the target end is compared with the time stamp of the source end to generate a synchronization deviation parameter, and this parameter is used to fine-tune the local clock frequency of the target end to obtain a frequency adjustment value, which is applied to the local clock reference of the target end to achieve high-precision time reference adjustment, thus effectively completing the time synchronization between the target end and the source end. This embodiment comprehensively uses advanced filtering algorithms, frequency domain analysis, and clock frequency adjustment technologies, overcomes the influence of network delay and jitter, and realizes high-precision and stable time synchronization in a complex network environment, improving the reliability and synchronization performance of the system.

[0104] Embodiment 3:

[0105] As Figure 2 shown, the present application also provides a time-sensitive network end-to-end time synchronization device 10, including an acquisition module 11, a classification module 12, a correction module 13, a processing module 14, and an adjustment module 15.

[0106] The acquisition module 11 is mainly used to acquire the timestamp of the source end, calibrate the time synchronization signal according to the timestamp of the source end to obtain the calibrated time synchronization signal, and use the calibrated time synchronization signal to collect the time of the target end to obtain the timestamp of the target end.

[0107] The classification module 12 is mainly used to input the timestamps of the source end and the target end into a preset delay analysis model to obtain a set of delay factors, and perform classification processing on the set of delay factors to obtain a time offset factor, a jitter factor, and a stability factor.

[0108] The correction module 13 is mainly used to perform time-domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and use the time offset reference to correct the jitter factor to obtain a jitter correction value.

[0109] The processing module 14 is mainly used to perform filtering processing on the time offset error and the stability factor to obtain a stability correction value, and perform a combined operation on the jitter correction value and the stability correction value to obtain a network delay value.

[0110] The adjustment module 15 is mainly used to correct the timestamp of the target end based on the network delay value in combination with the local clock information of the source end and the target end to obtain the corrected timestamp of the target end, and adjust the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end.

[0111] In this embodiment, the acquisition module 11 accurately acquires the timestamps of the source end and the target end, calibrates the time synchronization signal using the timestamp of the source end to ensure the accuracy of the synchronization signal, and collects the timestamp of the target end. The classification module 12 inputs the timestamps of the source end and the target end into a preset delay analysis model to obtain a set of delay factors, and performs classification processing on it to extract a time offset factor, a jitter factor, and a stability factor, deeply analyzing the composition of network delay. The correction module 13 performs time-domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and uses the time offset reference to correct the jitter factor to obtain a jitter correction value, eliminating the jitter error caused by time offset. The processing module 14 performs filtering processing on the time offset error and the stability factor to obtain a stability correction value, and performs a combined operation on the jitter correction value and the stability correction value to obtain a network delay value, effectively integrating various delay factors. The adjustment module 15 corrects the timestamp of the target end based on the network delay value in combination with the local clock information of the source end and the target end to obtain the corrected timestamp of the target end. Subsequently, according to the corrected timestamp of the target end and the timestamp of the source end, the local clock of the target end is adjusted, achieving precise calibration of the target end clock.

[0112] It should be noted that those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described device and each module can refer to the corresponding processes in the foregoing embodiments of the time-sensitive network end-to-end time synchronization method, and will not be elaborated herein.

[0113] Embodiment 4:

[0114] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the processor is caused to execute the time-sensitive network end-to-end time synchronization method as in Embodiment 1.

[0115] In this embodiment, by storing the time synchronization method in the form of a software program on a computer-readable storage medium, it has good portability and maintainability. When the processor runs this program, it can implement a series of steps such as timestamp acquisition, delay analysis, offset correction, filtering processing, delay calculation, and local clock adjustment, so as to achieve high-precision time synchronization between the target end and the source end. Through this design, the system can complete the complex time synchronization process without additional hardware support, reducing the implementation cost. At the same time, by using the software update method, the synchronization algorithm can be conveniently upgraded and optimized, improving the adaptability and performance of the system. The solution of this embodiment enhances the flexibility of the time synchronization method, enabling it to be applicable to different hardware platforms and network environments, meeting the requirements of various time-sensitive applications for precise time synchronization, and effectively improving the overall performance and reliability of the time-sensitive network.

[0116] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A time-sensitive network end-to-end time synchronization method, characterized in that: include: Obtaining a timestamp of a source end, calibrating a time synchronization signal according to the timestamp of the source end to obtain a calibrated time synchronization signal, and using the calibrated time synchronization signal to collect the time of a target end to obtain a timestamp of the target end; Inputting the timestamp of the source end and the timestamp of the target end into a preset delay analysis model to calculate the time series difference to obtain a preliminary delay data set, and performing frequency domain decomposition of the preliminary delay data set by discrete Fourier transform to extract stable components and dynamic components; Based on the dynamic component, the time variation trend is calculated to obtain the time offset factor, and the autoregressive analysis method is used to perform multi-order statistical analysis on the stable component to obtain the jitter factor and the noise intensity parameter, and the noise intensity parameter is subjected to low-pass filtering by an FIR filter to generate a stability factor; wherein the time offset factor represents the fixed delay in the system; the jitter factor represents the random delay variation caused by network load changes and other reasons; and the stability factor is used to evaluate the trend and stability of the delay variation; Performing time domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and correcting the jitter factor using the time offset reference to obtain a jitter correction value; Filtering the time offset error and the stability factor to obtain a stability correction value, and combining the jitter correction value and the stability correction value to obtain a network delay value; Based on the network delay value and in combination with the local clock information of the source and target ends, the timestamp of the target end is corrected to obtain a corrected timestamp of the target end, and the local clock of the target end is adjusted according to the corrected timestamp of the target end and the timestamp of the source end.

2. The time-sensitive network end-to-end time synchronization method according to claim 1, characterized in that: The step of obtaining the timestamp of the source end, calibrating the time synchronization signal according to the timestamp of the source end to obtain the calibrated time synchronization signal, and collecting the time of the target end using the calibrated time synchronization signal to obtain the timestamp of the target end includes: After receiving a signal that requires time synchronization between the source end and the target end, the timestamp of the source end is obtained, and the timestamp of the source end is identified and verified by using a timestamp matching algorithm to obtain a valid timestamp; The effective timestamp and the clock deviation parameter of the target end are compared by using a dynamic time normalization algorithm to generate a calibration factor and a residual error value, the time synchronization signal is time-adjusted by using the calibration factor to obtain an adjusted time synchronization signal, and the adjusted time synchronization signal is calibrated by using the residual error value to obtain a calibrated time synchronization signal; wherein the clock deviation parameters include frequency deviation and phase deviation; The time of the target end is collected according to the calibrated time synchronization signal to obtain a timestamp of the target end.

3. The time-sensitive network end-to-end time synchronization method according to claim 1, characterized in that: The step of performing time domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and correcting the jitter factor using the time offset reference to obtain a jitter correction value comprises: A time shift trend curve is constructed based on the time shift factor using a piecewise linear regression method, the time shift trend curve is segmented and analyzed using a curve fitting algorithm to generate a time shift benchmark, and a time shift error is calculated based on the time shift benchmark; The jitter factors are classified and processed by using the time offset reference and applying fuzzy logic rules to generate jitter values. The jitter values ​​are segmentally optimized by using a wavelet packet algorithm, and jitter correction values ​​are generated based on the optimization results.

4. The time-sensitive network end-to-end time synchronization method according to claim 3, characterized in that: The step of constructing a time shift trend curve based on the time shift factor by using a piecewise linear regression method, segmenting and analyzing the time shift trend curve by using a curve fitting algorithm to generate a time shift benchmark, and calculating the time shift error according to the time shift benchmark includes: The time offset factor is divided into a plurality of linear segments by piecewise linear regression to obtain the segment slope, segment intercept and segment residual of each linear segment, the segment slope is statistically analyzed to obtain the slope mean and slope variance, the segment intercept is adjusted by using the slope mean to obtain the adjusted intercept, and the segment residual is corrected by using the slope variance to obtain the corrected residual; Constructing a time offset trend curve according to the adjusted intercept and the corrected residual, and performing curve fitting on the time offset trend curve by a Fourier series fitting algorithm to obtain Fourier coefficients and fitting residuals; The Fourier coefficients are low-pass filtered to obtain filtered coefficients, the fitting residuals are smoothed to obtain smoothed residuals, the filtered coefficients and the smoothed residuals are combined to obtain a time offset reference, the time offset reference is input into a preset time offset error calculation model to calculate the time offset error.

5. The time-sensitive network end-to-end time synchronization method according to claim 1, characterized in that: The step of filtering the time offset error and the stability factor to obtain a stability correction value, and combining the jitter correction value and the stability correction value to obtain a network delay value comprises: Using a Kalman filter to jointly filter the time offset error and the stability factor to obtain a filtered dynamic correction factor, and using a dynamic adaptive window algorithm to perform parameter optimization on the dynamic correction factor to generate a stability correction value; The jitter correction value is subjected to fast Fourier transform to extract frequency domain characteristics, the frequency domain characteristics are fused with the stability correction value based on a convolution-based dynamic characteristic fusion algorithm to generate a network dynamic delay factor, and matrix weighted summation is performed on the network dynamic delay factor and the stability correction value to obtain a network delay value.

6. The time-sensitive network end-to-end time synchronization method according to claim 1, characterized in that: The step of correcting the timestamp of the target end based on the network delay value and combining the local clock information of the source end and the target end to obtain a corrected timestamp of the target end, and adjusting the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end includes: Correcting the network delay value and the timestamp of the target end by a nonlinear least square method to obtain a time correction factor, and performing linear interpolation processing on the time correction factor to obtain a corrected timestamp of the target end; The corrected timestamp of the target end is compared with the timestamp of the source end to generate a synchronization deviation parameter, the local clock frequency of the target end is fine-tuned using the synchronization deviation parameter to obtain a frequency adjustment value, and the frequency adjustment value is applied to the local clock reference of the target end to complete the time reference adjustment.

7. A time-sensitive network end-to-end time synchronization device, characterized in that: include: An acquisition module is used to acquire a timestamp of a source end, calibrate a time synchronization signal according to the timestamp of the source end to obtain a calibrated time synchronization signal, and collect the time of a target end using the calibrated time synchronization signal to obtain a timestamp of the target end; A classification module, used for inputting the timestamp of the source end and the timestamp of the target end into a preset delay analysis model to perform time series difference calculation to obtain a preliminary delay data set, and performing frequency domain decomposition of the preliminary delay data set by discrete Fourier transform to extract stable components and dynamic components; Based on the dynamic component, the time variation trend is calculated to obtain the time offset factor, and the autoregressive analysis method is used to perform multi-order statistical analysis on the stable component to obtain the jitter factor and the noise intensity parameter, and the noise intensity parameter is subjected to low-pass filtering by an FIR filter to generate a stability factor; wherein the time offset factor represents the fixed delay in the system; the jitter factor represents the random delay variation caused by network load changes and other reasons; and the stability factor is used to evaluate the trend and stability of the delay variation; A correction module, used for performing time domain analysis on the time offset factor to obtain a time offset reference and a time offset error, and correcting the jitter factor using the time offset reference to obtain a jitter correction value; A processing module, configured to filter the time offset error and the stability factor to obtain a stability correction value, and perform a combined operation on the jitter correction value and the stability correction value to obtain a network delay value; The adjustment module is used to correct the timestamp of the target end based on the network delay value and the local clock information of the source end and the target end to obtain a corrected timestamp of the target end, and adjust the local clock of the target end according to the corrected timestamp of the target end and the timestamp of the source end.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the processor is enabled to execute the time-sensitive network end-to-end time synchronization method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Time synchronization using model correction

    US11849016B1