Time synchronization drift self-correction method for special transformer acquisition terminal

By obtaining condition information and real-time monitoring data, and dynamically evaluating local clock drifts with historical analysis, the time synchronization problem caused by time interruption of special-variable acquisition terminals is solved, and a self-correction mechanism is realized to ensure the stability and accuracy of time synchronization, and to improve the autonomy and robustness of the system.

CN120378039AActive Publication Date: 2025-07-25SHENZHEN FRIENDCOM TECH DEV +1

Patent Information

Application Number
CN202510863862.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-07-25
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

During long-term operation, the local clock drift caused by timing interruption, affecting data integrity and system reliability. The existing technology is difficult to effectively solve the time synchronization problem caused by timing link discontinuity.

Method used

By obtaining condition information, monitoring terminal status data in real time, combining historical data for correlation analysis, dynamically assessing local clock drift, and triggering a self-correction mechanism when specific conditions are met, using the power grid zero intersection point and local clock time for self-correction.

Benefits of technology

Active identification and accurate modeling of time offsets in the non-leverage state are realized, ensuring the stability and accuracy of time synchronization, avoiding time jumps and over-correction phenomena, and improving the autonomy and robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378039A_ABST
    Figure CN120378039A_ABST
Patent Text Reader

Abstract

The invention discloses a special transformer acquisition terminal-oriented time synchronization drift self-correction method, which relates to the technical field of special transformer acquisition terminals, and comprises the following steps of: acquiring condition information based on a special transformer acquisition terminal, and generating a judgment condition according to a size relationship among parameters in the condition information to identify triggering of a self-correction mechanism. Running state data in the special transformer acquisition terminal are monitored in real time, a local clock drift value of the current special transformer acquisition terminal is preliminarily evaluated after correlation analysis, trend tracking and updating of a variable time sequence are realized in combination with historical data and progressive regression, and finally a residual drift residual error is determined. And carrying out dynamic self-correction operation on the time synchronization drift of the special transformer acquisition terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of special transformer acquisition terminals, and specifically to a time synchronization drift self-correction method for special transformer acquisition terminals. Background Art

[0002] As an edge-side sensing device deployed on the low-voltage side of a special transformer, the special transformer acquisition terminal undertakes key tasks such as power consumption information acquisition, power quality monitoring, load data uploading, and abnormal alarm. The integrity and accuracy of its data highly depend on the continuous stability of the local time of the terminal. Such terminals usually rely on master station time synchronization or Beidou or GPS signals for time synchronization. However, due to factors such as environmental occlusion, electromagnetic interference, and communication interruption, the terminal often faces the actual problem of time synchronization interruption during long-term operation, which in turn causes continuous drift of the local clock and becomes an important factor restricting the reliability of the system.

[0003] Currently, common time synchronization methods include means such as master station time synchronization, GPS or Beidou external time synchronization modules. However, in actual operation scenarios, the time synchronization link is discontinuous. For example, communication interruption between the master station and the terminal, occlusion of satellite time synchronization signals, etc. may all cause the terminal to be in an out-of-synchronization state and it is difficult to obtain standard time signals in a timely manner. Taking the special transformer acquisition terminal as an example, its local RTC system relies on a low-power crystal oscillator, such as 32.768 kHz, to continuously operate. Although it has low power consumption and low cost, there is a frequency offset during long-term operation, resulting in cumulative drift of the system time. For example, if the crystal oscillator frequency offset reaches ±20 ppm, it means that there may be an error of more than ±1.7 seconds per day. After continuous operation for several days, a significant clock offset will occur. If there is an out-of-synchronization state at this time, it will seriously affect the timing consistency of data reporting, fault tracing, and system event response of the terminal. Summary of the Invention

[0004] In view of the deficiencies of the prior art, the present invention provides a time synchronization drift self-correction method for special transformer acquisition terminals, which solves the problems in the above background art.

[0005] To achieve the above objectives, the present invention is realized through the following technical solutions: A time synchronization drift self-correction method for special transformer acquisition terminals, comprising the following steps: S1: Based on the special transformer acquisition terminal, obtain condition information, and generate a judgment condition according to the magnitude relationship between the parameters in the condition information to identify the trigger of the self-correction mechanism; S2: Real-time monitor the operating state data in the special transformer acquisition terminal. After correlation analysis, initially evaluate the local clock drift value of the current special transformer acquisition terminal, and combine historical data and progressive regression to achieve trend tracking and update of the variable time series; S3: Determine the remaining drift residuals and perform dynamic self - calibration operations on the time synchronization drift of the special - purpose metering and data acquisition terminal.

[0006] Preferably, determine the last successful time - synchronization moment in the special - purpose metering and data acquisition terminal according to the valid time - synchronization packets and time - synchronization status received by the special - purpose metering and data acquisition terminal, where the time - synchronization status includes time - synchronization failure and time - synchronization success. Extract the instantaneous points when the power - grid AC signal waveform crosses 0 volts and count them to statistically obtain the number of power - grid zero - crossing points from the last successful time - synchronization moment to the current time, and obtain the statistically obtained number of power - grid zero - crossing points. Access the internal real - time clock module of the special - purpose metering and data acquisition terminal to obtain the local clock time of the special - purpose metering and data acquisition terminal. Back - calculate the current expected reference time through the power - grid zero - crossing points to obtain supplementary information, including: Obtain the equivalent power - grid operation duration according to the statistically obtained number of power - grid zero - crossing points. Determine the equivalent power - grid timestamp through the equivalent power - grid operation duration and in combination with the last successful time - synchronization moment. Use the equivalent power - grid timestamp as supplementary information, and in combination with the last successful time - synchronization moment, the local clock time of the special - purpose metering and data acquisition terminal, and the statistically obtained number of power - grid zero - crossing points, generate conditional information. Generate a judgment condition according to the magnitude relationship between the parameters in the conditional information to identify the trigger of the self - calibration mechanism.

[0007] Preferably, generate a judgment condition according to the magnitude relationship between the parameters in the conditional information to identify the trigger of the self - calibration mechanism, including: Determine the maximum allowable time - synchronization period according to the preset maximum tolerable time error. Estimate and judge whether the time - synchronization has expired. Specifically: if , it is estimated that the time - synchronization has expired, where is the maximum allowable time - synchronization period, is the equivalent power - grid timestamp, is the last successful time - synchronization moment; Whether the local clock time drifts abnormally. Specifically: if , it indicates that the local clock time has abnormal drift, where is the local clock time of the special - purpose metering and data acquisition terminal, is the preset drift threshold; Combine the estimation and judgment of whether the time - synchronization has expired and whether the local clock time drifts abnormally to obtain a judgment condition. If , and , it indicates that the time - synchronization status of this round is time - synchronization failure and automatically triggers the self - calibration mechanism.

[0008] Preferably, start the self - calibration mechanism to monitor the operating status data in the special - transformer acquisition terminal in real - time, and use the operating status data as candidate feature data; Meanwhile, record the actual drift values of the local clock of the special - transformer acquisition terminal at multiple time periods as the target dependent variable, and each time period is a sample; Use the Pearson correlation coefficient calculation method to analyze the correlation degree between each feature in the candidate feature data and the actual drift value of the local clock of the special - transformer acquisition terminal, so as to obtain the corresponding correlation coefficients. If the correlation coefficient does not exceed the preset correlation threshold, the corresponding feature is removed from the candidate feature data, otherwise it is retained; Obtain the updated candidate feature data; Perform data pre - processing on the updated candidate feature data. The pre - processing includes removing noise, filling missing values, and data smoothing operations, and use the dimensionless processing technology to scale the updated candidate feature data so that the feature range falls between 0 and 1; By correlating each feature in the updated candidate feature data and using the weighted summation method, preliminarily evaluate the local clock drift value of the current special - transformer acquisition terminal.

[0009] Preferably, retrieve the historical data within the historical period, extract the actually measured clock drift and the preliminarily evaluated local clock drift value at different times from the historical data, and combine with the preliminarily evaluated local clock drift value at the current time to achieve the trend tracking and dynamic fitting of the variable time series, specifically as follows: ; where is the time - offset prediction correction value after fusing the residuals, is the local clock drift value preliminarily evaluated at the current time, is the historical residual feedback factor, N is the historical window length, i is the time - point number in the historical window length, is the actually measured clock drift at the t - i moment, is the local clock drift value preliminarily evaluated at the t - i moment.

[0010] Preferably, according to the mechanism that the local clock time in the special - transformer acquisition terminal gradually returns from the deviation state to the steady state, update the time - offset prediction correction value after fusing the residuals, specifically as follows: , where is the local clock correction value, is the over - correction suppression factor, is the cumulative operating time since the last successful time - synchronization, is the drift inflation adjustment factor, is the frequency deviation of the crystal oscillator, and e is the natural base.

[0011] Preferably, the grid error is fused with the local clock correction value obtained in the self-correction mechanism to compensate the local clock correction value to obtain a local clock correction compensation value, specifically: , where is the local clock correction compensation value, is the weight value, is the local time counting error.

[0012] Preferably, based on the time offset prediction correction value and the local clock correction value after fusing the residuals, the remaining drift residuals are determined, specifically: , is the remaining drift residual; the remaining drift residual reflects the difference between the predicted value and the actual correction amount that has not been corrected, and is used to measure the prediction confidence; Based on the value of the remaining drift residual, the weight value is dynamically adjusted, specifically: , where is the dynamic weight value, , are the lower and upper limits of the fusion factor respectively, , are the lower and upper threshold values of the prediction error respectively, The English semantic of

[0013] Preferably, the dynamic weight value is substituted into the formula for obtaining the local clock correction compensation value to perform self-correction operation on the time synchronization drift of the special transformer metering terminal.

[0014] The present invention provides a method for self-correcting time synchronization drift for a special transformer metering terminal, which has the following beneficial effects: Through the time synchronization drift self-correction trigger determination mechanism constructed in this step, it is possible to actively identify and accurately model the time offset risk of the special transformer metering terminal in the non-time synchronization state. Specifically, by using the effective time synchronization packets and time synchronization status recorded inside the terminal, reliable tracking of the last successful time synchronization moment is realized, establishing a stable benchmark for subsequent time judgment; by combining the number of grid zero-crossing points with the standard grid frequency, the equivalent grid operation duration is accurately deduced, and combined with the last time synchronization information, the current equivalent grid timestamp is further inversely obtained, thereby providing an alternative reference time independent of the crystal oscillator and without relying on the main station for time synchronization; in the conditional information, the time span relationship and offset difference relationship between parameters are constructed, which can be used to judge whether the boundary conditions for triggering the self-correction mechanism are met, so as to ensure that the self-correction mechanism is triggered only when the offset risk is obvious and time synchronization is unavailable, effectively suppressing mis-correction and over-frequency calibration behaviors, and improving the accuracy, stability and security of the system correction behavior.

[0015] A time series model integrating residual feedback is constructed based on the actual drift trajectories and evaluation errors observed in multiple historical time periods, realizing the dynamic regression of variable time series and the predictive modeling of future trends. By introducing a historical residual feedback mechanism into the time series model, the model can coexist sensitivity and robustness to long-term trend stability and short-term perturbation changes, thereby forming an accurate tracking ability for drift behavior. Finally, through an exponential suppression function to adjust the convergence of the correction value, combined with the characteristics of crystal oscillator frequency offset and time lag effect, the progressive repair control of the local time from the deviation state to the steady state is realized, effectively avoiding the occurrence of time series anomalies such as time jumps, overcorrections, or rollbacks.

[0016] Introduce a calculation mechanism for integrating residuals, clearly quantify the remaining error part between the model prediction offset and the actual correction effect, and provide a dynamic evaluation index for measuring the confidence level and deviation compensation effect of the current drift model. For different residual intensity intervals, a segmented fusion factor adjustment mechanism is designed, which enables the system to automatically adjust the dependence on grid errors according to the drift risk level, and realizes the responsive suppression of prediction errors. The introduction of dynamic weights endows the correction logic with convergence, elasticity, and upper and lower limit constraints. When the model prediction is highly reliable, the weights will guide the system to rely more on the internal drift model; when the prediction error is large, the system will automatically enhance the dependence on the external grid reference, thereby forming an adaptive switching ability between prediction dominance and reference compensation. Finally, it effectively prevents the further accumulation of time correction errors caused by the distortion of the drift prediction model or external interference, and avoids time jumps or time rollback anomalies caused by overcorrection, enabling the special transformer metering terminal to maintain a high degree of time consistency and calibration robustness even under long-term operation and loss-of-authority environments. Brief Description of the Drawings

[0017] Figure 1 It is a schematic flow chart of a time synchronization drift self-correction method for a special transformer metering terminal according to the present invention; Figure 2 It is a logic diagram of a time synchronization drift self-correction method for a special transformer metering terminal according to the present invention; Detailed Embodiments

[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0019] Please refer to Figure 1 and Figure 2, the present invention provides a time synchronization drift self - calibration method for special - purpose variable acquisition terminals, including the following steps: S1: Based on the special - purpose variable acquisition terminal, obtain condition information, and generate a judgment condition according to the magnitude relationship between the parameters in the condition information to identify the trigger of the self - calibration mechanism; Specifically, according to the valid timing packets received by the special - purpose variable acquisition terminal and the timing status, determine the last successful timing moment in the special - purpose variable acquisition terminal, where the timing status includes timing failure and timing success; When the terminal receives a valid timing packet (master station / GPS, etc.), parse the timing time, calibrate the local RTC time, and at the same time when the RTC calibration is completed, write the last successful timing moment into the non - volatile memory, such as EEPROM, Flash; the system records and updates the last successful timing moment as the subsequent comparison reference.

[0020] By extracting the moment when the power grid AC signal waveform crosses 0 volts and counting, to count the number of power grid zero - crossing points from the last successful timing moment to the current time, and obtain the counted number of power grid zero - crossing points; the number can be obtained through a zero - crossing detector; the power grid zero - crossing point is the instantaneous point when the AC voltage waveform crosses 0V within one cycle; By accessing the internal real - time clock module (i.e., RTC module) of the special - purpose variable acquisition terminal, obtain the local clock time of the special - purpose variable acquisition terminal; The local clock time is the local timestamp of the special - purpose variable acquisition terminal; By back - calculating the current expected reference time through the power grid zero - crossing points, obtain supplementary information, including: According to the counted number of power grid zero - crossing points, obtain the equivalent power grid operation duration; Through the equivalent power grid operation duration and combined with the last successful timing moment, determine the equivalent power grid timestamp; The specific method for obtaining the equivalent power grid timestamp is: , where is the equivalent power grid timestamp, is the last successful timing moment, is the counted number of power grid zero - crossing points, is the standard power grid frequency, is the equivalent power grid operation duration. In the calculation of the equivalent power grid time, since there are two power grid zero - crossing points in each AC cycle, it is necessary to ; there are 2 zero - crossing points in each cycle: crossing 0V from positive to negative, and crossing 0V from negative to positive.

[0021] Take the equivalent power grid timestamp as supplementary information, and combine it with the last successful timing moment, the local clock time of the special - purpose variable acquisition terminal, and the counted number of power grid zero - crossing points to generate condition information; The grid frequency refers to the periodic rate at which the AC voltage and current in the power system change over time. The standard grid frequency is 50 Hz, which means that the voltage completes 50 positive and negative alternations per second, that is, 50 cycles per second. Generate judgment conditions according to the magnitude relationship among the parameters in the conditional information to identify the trigger of the self-correction mechanism.

[0022] In a dedicated transformer acquisition terminal (i.e., a power data acquisition device for dedicated transformer users), time synchronization drift refers to the change in the offset between the internal clock of the terminal and the standard time source, such as GPS, Beidou, the master station clock, etc. over time. This drift is a progressive time error accumulation phenomenon, which can lead to inaccurate data timestamps, thereby affecting data quality and power system operation judgment. Specifically, it will cause the data reporting time to be inconsistent with the master station time, resulting in a "time dislocation" phenomenon. And if there are different time drifts for multiple terminals, it may lead to incorrect data sorting and difficulty in aggregation analysis. For event record data, such as fault waveform records, it will seriously affect fault identification and location. In this embodiment, in step S1, a multi-dimensional condition perception and trigger mechanism is constructed around the time synchronization state of the dedicated transformer acquisition terminal. By integrating multi-source parameters such as the master station time synchronization status, grid zero-crossing statistics, local RTC time, and grid-derived timestamp, an autonomous and judgmental trigger judgment condition set is formed. Compared with the traditional passive waiting for the time synchronization signal mode, this mechanism records the last successful time synchronization moment and calculates the current number of grid zero-crossings that have been counted. According to the standard grid frequency, the actual operating duration experienced by the terminal can be calculated, that is, the equivalent grid operating time, so as to reverse the current reference timestamp that should be; combined with the local clock time of the terminal for comparison, it can be judged whether the current time synchronization failure state occurs. If a traditional terminal has not been time synchronized for a long time, it will generate a gradually accumulated drift due to the crystal oscillator frequency error. In the present invention, the grid frequency is introduced as a natural time reference, which can deduce the time that should be when there is no external time synchronization signal, forming a reference comparison basis. By judging whether the maximum allowable time synchronization period has been exceeded and whether the local clock time has abnormal drift, the system can automatically determine whether to enter the time self-correction process, reducing human intervention and improving the system autonomy.

[0023] For example, taking a dedicated transformer acquisition terminal installed in a substation as an example, the time when it last received the master station time synchronization packet is 2025 / 06 / 08 / 12:00:00, that is, 12 o'clock on June 8, 2025. Assume that the network communication is interrupted afterwards, and the terminal runs relying on its own crystal oscillator timing. After 24 hours, the terminal does not receive the time synchronization packet again, but through the voltage zero-crossing detection module, a total of 8,640,000 grid zero-crossings are counted (i.e., 50 Hz × 2 × 24 h × 3600 s). According to the grid frequency of 50 Hz, the current time can be deduced as follows: , that is, 12:00 on June 9, 2025; however, the current RTC reading of the terminal is 2025 / 06 / 09 / 12:05:30, indicating that the terminal time is 330 seconds faster. If the system determines that this deviation has exceeded the preset drift tolerance value (such as 60 seconds) and has also exceeded the maximum time synchronization period (such as 12 hours), the time self - correction mechanism is automatically triggered without waiting for the master station to synchronize the time, ensuring time continuity and the accuracy of the collected data.

[0024] Among them, the valid time synchronization packet is a time synchronization signal with a timestamp and a complete structure provided by the master station or GPS, used to record the last successful time synchronization moment; The power grid zero - crossing point is an event where the AC voltage waveform of the power grid crosses the 0V point (twice per cycle), used for counting to deduce the expected power grid time; The local clock time is the current timestamp recorded by the RTC module inside the terminal, representing the time that the terminal currently believes itself to be; The equivalent power grid timestamp is the theoretical current time deduced from the power grid zero - crossing point, used as a standard reference time for comparing drift; The RTC module is a hardware module dedicated to providing stable and continuous real - time time, widely used in embedded systems, metering terminals, and acquisition devices.

[0025] The condition information is a parameter set formed by combining multiple time information and count values, used to evaluate whether to enter the self - correction process; The judgment condition is a logical rule formed based on the size relationship of the parameters in the condition information, used as the decision criterion for triggering whether to enter the self - correction process; Specifically, according to the size relationship between the parameters in the condition information, judgment conditions are generated to identify the trigger of the self - correction mechanism, including: According to the preset maximum tolerable time error, the maximum allowable time synchronization period is determined; specifically: , where is the maximum allowable time synchronization period, is the maximum tolerable time error, is the crystal oscillator frequency offset rate of the special transformer - based acquisition terminal; for example, if the terminal hopes to control the maximum time error within ±2 seconds and the crystal oscillator offset is 20 ppm (parts per million): then 2 seconds (20 ) = 100000 seconds = 27.8 hours; among them, the frequency offset of the crystal oscillator is 20 ppm, meaning the offset ratio = 20 1000000 = 0.002%, that is: for every 1000000 seconds of operation, the time error generated is 20 seconds.

[0026] The method for obtaining the crystal oscillator frequency offset rate of the special transformer acquisition terminal is as follows: Divide the difference between the actual operating frequency of the crystal oscillator and the ideal frequency by the ideal frequency; The crystal oscillator uses the quartz oscillation principle to stabilize the oscillation and is used to provide the basic clock signal; The preset maximum tolerable time error is used to define the acceptable upper limit of the system time drift, indicating how long the terminal has not been time-synchronized and its RTC error is still tolerable; Estimate and determine whether the time synchronization has expired. Specifically: If , it is estimated that the time synchronization has expired, where is the allowable maximum time synchronization period, is the equivalent power grid timestamp, is the time of the last successful time synchronization; Whether the local clock time drifts abnormally. Specifically: If , it indicates that the local clock time has an abnormal drift, where is the local clock time of the special transformer acquisition terminal, is the preset drift threshold; Combine the estimation of whether the time synchronization has expired and whether the local clock time drifts abnormally to obtain the judgment condition; If , and , it indicates that the time synchronization status of this round is a time synchronization failure and the self-calibration mechanism is automatically triggered. Otherwise, it does not indicate that the time synchronization status of this round is a time synchronization failure.

[0027] Time synchronization failure means that during the planned external time synchronization process of the acquisition terminal, it fails to successfully obtain and apply the standard time signal within the predetermined time window, resulting in the terminal not completing the effective clock calibration process.

[0028] Whether the local clock time drifts abnormally is used to indicate whether the terminal has had an obvious drift during the period without time synchronization.

[0029] In this embodiment, through the logical judgment mechanism based on the size relationship of the conditional information parameters constructed in this step, the accurate identification and automatic decision-making of whether the special transformer acquisition terminal needs to trigger the time self-calibration process are realized. First, by setting the maximum tolerable time error and combining the crystal oscillator frequency offset rate, the allowable maximum time synchronization period is calculated to ensure that the calibration mechanism is only triggered when the system has actually lost the standard time synchronization ability and enters the potential drift state, effectively preventing the interference caused by frequent or excessive calibration of the system; Secondly, by judging the time difference between the current power grid reference timestamp and the last time synchronization moment, a discrimination mechanism for whether it is overdue is established, enabling the system to timely judge the time synchronization failure state before the time synchronization link is restored, providing a judgment basis for subsequent self-correction; furthermore, by obtaining the time deviation between the current local clock time and the power grid reference time and comparing it with the preset drift threshold, quantitative identification of whether the local time drifts abnormally is achieved, and the drift degree of the RTC crystal oscillator can be dynamically sensed; in addition, by performing combinational logic fusion on the two judgment results of whether the time synchronization is overdue and whether the local clock drifts abnormally, a comprehensive judgment condition is constructed, so that the self-correction process is only triggered when there is a real drift risk and external time synchronization is invalid, effectively avoiding problems of misjudgment, missed judgment, and overcorrection; finally, the entire time synchronization system has high robustness and intelligent triggering characteristics with controllable boundaries, sensible drifts, breakable behaviors, and traceable processes, further improving the self-stability, data consistency, and control system security of the special transformer collection terminal in abnormal time synchronization scenarios. In summary, this logical judgment method introduces multi-layer variable constraints such as time window, offset, and reference fusion in the setting of the correction trigger criterion, solves problems such as difficult judgment of the correction timing and uncontrollable time synchronization status in the prior art, and has clear engineering adaptability and deployment effectiveness.

[0030] Further, S2: Real-time monitor the operation status data in the special transformer collection terminal. After correlation analysis, initially evaluate the local clock drift value of the current special transformer collection terminal, and combine historical data and progressive regression to achieve trend tracking and update of the variable time series. Specifically, start the self-correction mechanism, real-time monitor the operation status data in the special transformer collection terminal, and use the operation status data as candidate feature data. At the same time, record the actual drift values of the local clocks of the special transformer collection terminal in multiple time periods as target dependent variables, and each time period is a sample. Use the Pearson correlation coefficient calculation method to analyze the correlation degree between each feature in the candidate feature data and the actual drift value of the local clock of the special transformer collection terminal to obtain the corresponding correlation coefficient. If the correlation coefficient does not exceed the preset correlation threshold, the corresponding feature is removed from the candidate feature data, otherwise it is retained. Obtain the updated candidate feature data. Perform data preprocessing on the updated candidate feature data. The data preprocessing includes removing noise, filling missing values, and data smoothing operations. Among them, the methods for filling missing values include mean filling, median filling, interpolation filling, and regression filling, and the dimensionless processing technology is used to scale the updated candidate feature data so that the feature range falls between 0 and 1. By correlating each feature in the updated candidate feature data and using the method of weighted summation, the local clock drift value of the current special transformer acquisition terminal is preliminarily evaluated.

[0031] Retrieve the historical data within the historical period, extract the actually measured clock drift and the preliminarily evaluated local clock drift value at different times from the historical data, and combine with the preliminarily evaluated local clock drift value at the current moment to achieve the trend tracking and dynamic fitting of the variable time series, specifically as follows: ; where is the time offset prediction correction value after fusing the residuals, is the local clock drift value preliminarily evaluated at the current moment, is the historical residual feedback factor, used to control the historical correction degree. The larger the value, the more sensitive the model. N is the historical window length, and i is the time point number in the historical window length, is the actually measured clock drift at the t - i moment, is the local clock drift value preliminarily evaluated at the t - i moment. The historical residual feedback factor can be taken by experience, and the value range is between 0.1 and 0.5. Among them, it is usually set in the interval of 0.2 - 0.3, which is suitable for terminal applications with priority on stability; The variable refers to various dynamic parameters that affect the local clock drift; The historical data includes various parameters collected within the special transformer acquisition terminal during the historical period and the parameters calculated and obtained; According to the mechanism that the local clock time in the special transformer acquisition terminal gradually returns from the deviation state to the steady state, update the time offset prediction correction value after fusing the residuals, specifically as follows: , where is the local clock correction value, is the over - correction suppression factor, used to control over - correction, and the value range is between 0.01 and 0.1, is the cumulative running time since the last successful time synchronization, is the drift inflation adjustment factor, used to introduce the second - order compensation of the frequency trend, is the frequency deviation of the crystal oscillator, and e is the natural base.

[0032] The drift inflation adjustment factor models the relationship between frequency change and time offset by using the least - squares regression principle, and automatically derives the optimal value of the drift inflation adjustment factor, enabling the model to have the frequency trend self - adaptation ability, specifically as follows: , where is the crystal oscillator frequency deviation sequence (the change of the crystal frequency measured in each time period relative to the nominal value), is the actually measured local clock drift value in the corresponding time period, is the covariance with , reflecting the consistency and linkage of the change directions of the two, is the variance of, representing the fluctuation range of the crystal oscillator frequency offset; this formula is essentially the calculation method of the slope term in linear regression, that is: observing the frequency change within multiple time periods on the clock drift influence degree; The larger, the more directly the frequency offset affects the clock drift, and the more the model relies on the frequency trend for second-order compensation.

[0033] This part is the attenuation control term of the main correction amount, is the deviation that should be corrected in this round estimated by the model. However, since excessive correction will cause the system time to jump, the system needs to converge gradually rather than adjust instantaneously. Therefore, not all of the can be directly corrected at this time; among them, the attenuation factor is introduced to represent that as increases, the exponential term gradually becomes smaller, indicating that the longer it runs, the less daring to correct too much at one time. The closer it is to the expected next time synchronization point, the more inclined it is to be stable; is used to control the attenuation speed. The larger its value, the more conservative the correction. On the contrary, the more radical the correction.

[0034] This part is the non-linear compensation of the trend term, represents the frequency deviation of the crystal oscillator, used to illustrate whether the internal oscillator of the terminal is too fast or too slow. Generally, the more deviated, the more serious the future drift trend. Therefore, it is necessary to pre-cancel the possible trend error that will increase rapidly in the future, is used to make the compensation small when the frequency error is small, and when the frequency error becomes large, the compensation value increases exponentially for early intervention; In this embodiment, by introducing a variable time series modeling method with clock drift prediction as the core, in the scenario where the external time synchronization of the special transformer terminal is interrupted and the time synchronization failure state cannot be restored immediately, it is possible to rely on the internal operation state data and historical drift records of the terminal to achieve accurate estimation and trend update of the local clock state. Specifically, first, by real-time collecting the terminal operation state parameters, such as crystal oscillator temperature, voltage, current, environmental humidity, etc., and using them as candidate feature data, a variable data set affecting the local clock offset is constructed; subsequently, the Pearson correlation coefficient is used to quantitatively analyze the statistical correlation strength between the candidate features and the actual clock drift values recorded in multiple time periods, effectively filtering out irrelevant or noisy features, so that the subsequent model training focuses on the highly correlated input variables, thereby improving the model prediction efficiency and stability.

[0035] In the feature data processing stage, the system performs preprocessing operations such as missing value filling, denoising, normalization and scaling on the data. The interpolation method or regression method is used to improve the accuracy of missing sample completion, and the dimensionless processing is used to compress each feature data to a unified scale, which helps to avoid the weighted offset caused by inconsistent feature dimensions. After the feature processing is completed, the local clock drift assessment value at the current moment is preliminarily calculated by weighted summing of the retained features. This value reflects the deviation trend of the local clock in the current state of the terminal compared to the standard time; at the same time, the system retrieves the data in the historical sliding window and performs residual feedback dynamic regression update, that is, the difference between the actual drift and the predicted drift is used as the correction factor to dynamically update the deviation trend prediction at the next moment, so that the system has the ability of adaptive trend fitting and correction.

[0036] Furthermore, based on the physical behavior mechanism of the terminal local clock gradually approaching stability from a deviated state, an exponential decay correction function is introduced, in which the first term reflects the natural decay of the correction amplitude with time, and the second term is expanded and compensated according to the crystal oscillator frequency deviation. This strategy effectively suppresses the time rollback phenomenon caused by misjudgment or short-term interference, and ensures the continuity and directionality of the correction.

[0037] Candidate feature data are variables from terminal state parameters that may affect clock drift, which serve as modeling inputs to guide drift assessment; The Pearson correlation coefficient is used to determine the statistical strength between features and targets and to filter out low-correlation features; Weighted summation is to assign different weights to the eigenvalues and synthesize the evaluation values to achieve quantitative prediction of the drift degree; The variable time series is a set of multidimensional parameters that changes dynamically over time, reflecting the time-varying characteristics of the system and is used for trend modeling; Attenuation adjustment is to reduce the correction strength exponentially to avoid short-term large corrections causing time jumps or callbacks; In summary, this step introduces variable feature drive, sliding residual regression and exponential control correction mechanism, so that the dedicated transformer acquisition terminal has the ability to self-perceive, self-model and self-adjust the local time drift trend in the non-timing state. It not only improves the system prediction accuracy and response timeliness, but also enhances the autonomous robustness, anti-interference and intelligent controllability of the terminal timing behavior in a complex power grid environment, laying a stable foundation for subsequent precise calibration.

[0038] Further, S3: determine the remaining drift residual, and perform dynamic self-correction operation on the time synchronization drift of the dedicated transformer acquisition terminal.

[0039] Specifically, the grid error is integrated with the local clock correction value obtained in the self-correction mechanism to compensate the local clock correction value to obtain the local clock correction compensation value, specifically: , where is the local clock correction compensation value, is the weight value, is the local time counting error. The power grid error here refers to the analysis and calculation of the local time counting error; Based on the time offset prediction correction value and the local clock correction value after fusing the residuals, determine the remaining drift residual, specifically: , is the remaining drift residual; The remaining drift residual reflects the uncorrected difference between the predicted value and the actual correction amount. The existence of the remaining drift residual is to avoid system time jumps or rollbacks caused by overcorrection. Usually, conservative correction is carried out, but its value is used to measure the prediction confidence; Based on the remaining drift residual value, dynamically adjust the weight value, specifically: , where is the dynamic weight value, , are the lower and upper limits of the fusion factor respectively, , are the lower and upper threshold values of the prediction error respectively. The English semantics of "otherwise" means that in the case of not meeting the first two conditions, the default rule is executed. Among them, maps the residual Rs to the interval from 0 to 1; represents the adjustable range of the weight change between the worst and best prediction cases; means that if the model is very accurate (small residual), then η tends to , if the model is very inaccurate (large residual), then η tends to , if the model is medium, then linearly from to smoothly transitions; Substitute the dynamic weight value into the formula for obtaining the local clock correction compensation value to perform self-correction operations on the time synchronization drift of the dedicated variable acquisition terminal.

[0040] If the remaining drift residual is very large, it means that the model prediction is inaccurate and the ability to predict the current terminal clock drift is poor. At this time, the influence of the power grid frequency reference should be increased and should be adjusted larger. If the residual is very small, it means that the model is effective and the dependence on the power grid signal should be reduced, and should be adjusted smaller to prevent the system from being misled.

[0041] In this embodiment, through the residual perception-driven dynamic fusion self-correction mechanism in this step, it is possible to achieve confidence-based error compensation and progressive correction for the local time drift of the special transformer acquisition terminal during the timing failure period, thereby improving the intelligent level and stability of time synchronization. Specifically: The system first calculates the difference between the time offset prediction correction value after fusing the residuals and the currently calculated local clock correction value to obtain the remaining drift residual Rs. This residual reflects the offset that still exists between the output of the current prediction model and the actual correction behavior and has not been covered or absorbed. The smaller its value, the higher the prediction credibility; the larger it is, the more the current model deviates from the true trend, and the lower the trust level should be. The system adaptively calculates the weight value in this round of correction through the set upper and lower threshold intervals ( and ). When Rs is small (the prediction is accurate), the weight of the grid time is reduced; when Rs is large (the prediction is inaccurate), the proportion of grid correction is increased, and a linear interpolation method is used for smooth transition in the middle interval to avoid system time jumps caused by sudden weight changes. The dynamic weight value is used to control the weight balance between the model prediction and the grid reference in the correction behavior; the model prediction correction value in this round of correction is fused with the local time counting error calculated based on the grid zero-crossing counting error to obtain the final compensated correction value: This can correct deviations by leveraging the long-term stable characteristics of the grid when the model prediction is distorted, and weaken the grid reference interference when the model prediction is accurate, achieving true trust-driven self-correction. Its ultimate goal is that even in the case of external timing failure, GPS unreachability, and master station disconnection, the terminal can rely on internal offset prediction and the change of sampling points per unit time of the terminal (based on the long-term stable characteristics of the grid frequency) to autonomously adjust the local clock, keeping the time of the terminal within an acceptable error range and ensuring the credibility of timestamp data.

[0042] Suppose a special transformer acquisition terminal has not received timing for 5 days: The model predicts that the current local drift is +3.2 seconds; the actual correction mechanism calculates that it should be corrected to +2.9 seconds; then Rs = 3.2 - 2.9 = 0.3 seconds, which is in the medium error interval; so the system calculates η ≈ 0.6, and thus decides to include part of the grid reference value; if the current grid zero-crossing error = +0.5 seconds, the final correction value: = (2.9 + 0.6 × 0.5) 1.6 = 2 seconds, achieving the fusion compensation of the grid stability and the model prediction difference.

[0043] In summary, the dynamic residual feedback mechanism enables the system to quantify the prediction deviation in real time. The weight self-adjustment mechanism can dynamically balance the dominance between the two types of time sources (prediction model and power grid signal). Finally, the compensation and correction scheme ensures that the correction behavior will not get out of control due to short-term model errors, nor will it over-intervene in the system due to power grid anomalies. The whole process is independently run by the acquisition terminal locally and can recover the time offset to a certain extent without relying on the master station or GPS timing.

[0044] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A time synchronization drift self-correction method for dedicated variable acquisition terminals, characterized in that: including the following steps S1: Based on the special transformer acquisition terminal, obtain condition information, and generate a judgment condition to identify the trigger of the self-calibration mechanism according to the magnitude relationship between the parameters in the condition information; S2: Monitor the operation status data in the special transformer acquisition terminal in real time. After correlation analysis, preliminarily evaluate the local clock drift value of the current special transformer acquisition terminal, and combine historical data and progressive regression to achieve trend tracking and update of the variable time series; S3: Determine the remaining drift residuals and perform dynamic self-calibration operations on the time synchronization drift of the special transformer acquisition terminal.

2. The method for self-calibrating time synchronization drift for a special transformer acquisition terminal according to claim 1, characterized in that: Determine the last successful time synchronization moment in the special transformer acquisition terminal according to the valid time synchronization packet received by the special transformer acquisition terminal and the time synchronization status, where the time synchronization status includes time synchronization failure and time synchronization success; Extract the instantaneous points where the power grid AC signal waveform crosses 0 volts and count them to statistically obtain the number of power grid zero-crossing points from the last successful time synchronization moment to the current time, and obtain the statistically obtained number of power grid zero-crossing points; Access the internal real-time clock module of the special transformer acquisition terminal to obtain the local clock time of the special transformer acquisition terminal; Back-calculate the current expected reference time through the power grid zero-crossing points to obtain supplementary information, including: Obtain the equivalent power grid operation duration according to the statistically obtained number of power grid zero-crossing points; Determine the equivalent power grid timestamp through the equivalent power grid operation duration and in combination with the last successful time synchronization moment; Use the equivalent power grid timestamp as supplementary information, and in combination with the last successful time synchronization moment, the local clock time of the special transformer acquisition terminal, and the statistically obtained number of power grid zero-crossing points, generate condition information; Generate a judgment condition to identify the trigger of the self-calibration mechanism according to the magnitude relationship between the parameters in the condition information.

3. A time synchronization drift self-correction method for dedicated variable acquisition terminals according to claim 2, characterized in that: Generate a judgment condition to identify the trigger of the self-calibration mechanism according to the magnitude relationship between the parameters in the condition information, including: Determine the maximum allowable time synchronization period according to the preset maximum tolerable time error; Estimate whether the timing has expired. Specifically: If , the estimated timing has expired, where is the maximum allowable timing period, is the equivalent power grid timestamp, is the time of the last successful timing; Whether the local clock time drifts abnormally, specifically: if , it indicates that the local clock time has an abnormal drift, where is the local clock time of the special transformer acquisition terminal, is the preset drift threshold; Estimate and judge the combination of whether the time synchronization has expired and whether the local clock time has abnormal drift to obtain a judgment condition; If and , it indicates that the timing status of this round is a timing failure, and the self-calibration mechanism is automatically triggered.

4. The method for self-calibrating time synchronization drift for a special transformer acquisition terminal according to claim 3, characterized in that: Start the self-calibration mechanism, monitor the operation status data in the special transformer acquisition terminal in real time, and use the operation status data as candidate feature data; At the same time, record the actual drift values of the local clock of the special transformer acquisition terminal in multiple time periods as target dependent variables, and each time period is a sample; Use the Pearson correlation coefficient calculation method to analyze the correlation degree between each feature in the candidate feature data and the actual drift value of the local clock of the special transformer acquisition terminal to obtain the corresponding correlation coefficient. If the correlation coefficient does not exceed the preset correlation threshold, the corresponding feature is removed from the candidate feature data, otherwise it is retained; Obtain the updated candidate feature data; Perform data preprocessing on the updated candidate feature data. The data preprocessing includes removing noise, filling missing values, and data smoothing operations, and use dimensionless processing technology to scale the updated candidate feature data so that the feature range falls between 0 and 1; By associating each feature in the updated candidate feature data and through the method of weighted summation, the local clock drift value of the current dedicated variable acquisition terminal is preliminarily evaluated.

5. A time synchronization drift self-correction method for a dedicated variable acquisition terminal according to claim 4, characterized in that: Retrieve historical data within a historical period, extract the actually measured clock drift and the preliminarily evaluated local clock drift value at different moments from the historical data, and combine with the preliminarily evaluated local clock drift value at the current moment to achieve trend tracking and dynamic fitting of the variable time series, specifically manifested as: ; In the formula, is the time offset prediction correction value after fusing the residuals, is the preliminarily evaluated local clock drift value at the current moment, is the historical residual feedback factor, N is the historical window length, i is the time point number in the historical window length, is the actually measured clock drift at the t - i moment, is the preliminarily evaluated local clock drift value at the t - i moment.

6. A time synchronization drift self-correction method for a dedicated variable acquisition terminal according to claim 5, characterized in that: According to the mechanism that the local clock time in the dedicated variable acquisition terminal gradually returns from the deviation state to the steady state, the time offset prediction correction value after fusing the residuals is updated, specifically manifested as: , where is the local clock correction value, is the overcorrection suppression factor, is the cumulative running time since the last successful time synchronization, is the drift inflation adjustment factor, is the frequency deviation of the crystal oscillator, and e is the base of the natural logarithm.

7. A time synchronization drift self-correction method for a dedicated variable acquisition terminal according to claim 6, characterized in that: Fuse the grid error with the local clock correction value obtained in the self-correction mechanism to compensate the local clock correction value to obtain a local clock correction compensation value, specifically: , where is the local clock correction compensation value, is the weight value, is the local time counting error.

8. A time synchronization drift self-correction method for a dedicated variable acquisition terminal according to claim 7, characterized in that: Determine the remaining drift residual based on the corrected value of the time offset prediction after fusing the residuals and the local clock correction value, specifically: , is the remaining drift residual; the remaining drift residual reflects the uncorrected difference between the predicted value and the actual correction amount, and is used to measure the prediction confidence; Based on the remaining drift residual value, the weight value is dynamically adjusted, specifically: , where is the dynamic weight value, , are respectively the lower limit and upper limit of the fusion factor, , are respectively the lower bound threshold and upper bound threshold of the prediction error, The English semantic of is otherwise.

9. A time synchronization drift self-correction method for a dedicated variable acquisition terminal according to claim 8, characterized in that: Substitute the dynamic weight value into the formula for obtaining the local clock correction compensation value to perform self-correction operation on the time synchronization drift of the dedicated variable acquisition terminal.

Citation Information

Patent Citations

  • Beidou high-precision intelligent navigation method and system

    CN118962747A

  • Salinity drift correction method and system for buoy observation data

    CN119249061A

  • Clock frequency drift algorithm monitoring sensing time service protection method and device terminal

    CN119337289A

  • Frequency switching method and device for embedded power terminal

    CN119788477A

  • Real-time state evaluation method and system for voltage transformer

    CN119902145A

Cited By

  • Synchronous sequence extraction and time delay correction system for unmanned aerial vehicle positioning

    CN121009500A