A method and system for processing time data

By dynamically adjusting the acquisition cycle and constructing an impact correlation model to correct the mapping table, the problem of the crystal oscillator frequency output being affected by the environment was solved, achieving efficient time-keeping data processing and improving the system's adaptability and long-term stability in complex environments.

CN121997074BActive Publication Date: 2026-06-26STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2026-04-07
Publication Date
2026-06-26

Smart Images

  • Figure CN121997074B_ABST
    Figure CN121997074B_ABST
Patent Text Reader

Abstract

The application discloses a kind of to time data processing method and system, it is related to data processing technical field, the method includes: based on local environment data, acquisition acquisition cycle, collect high-precision time data and local perception data;Data characteristics of the same batch crystal are analyzed, and based on the high-precision time data and the local perception data, obtain time deviation;Based on the data characteristics analysis rationality of time deviation, obtain rationality analysis result, adjust the acquisition cycle, obtain optimized acquisition cycle;Based on the local environment data is combined mapping table to obtain correction value, and based on the time deviation and crystal data characteristics and the mutual influence correlation of time deviation, the mapping table is dynamically revised, to obtain revised mapping table, for the time data processing of next cycle.The application solves the technical problem that the prior art exists and time data processing effect is not good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to a time-based data processing method and system. Background Technology

[0002] In the field of time synchronization technology, high-precision timekeeping terminals typically rely on crystal oscillators to maintain the stable operation of the local clock. However, the frequency output of a crystal oscillator is highly susceptible to changes in environmental factors, leading to time discrepancies between the local clock and the standard time source. To address the characteristic of crystal frequencies varying with the environment, a common practice is to pre-set a mapping table based on laboratory environment testing. This table records the correspondence between environmental parameters and crystal frequency correction values. In actual operation, the correction value is obtained by looking up the table to maintain timekeeping accuracy. However, this open-loop correction method, which relies on a fixed mapping table, is difficult to adapt to the characteristics of the crystal, resulting in poor correction accuracy. Summary of the Invention

[0003] This application provides a time synchronization data processing method and system to address the technical problem of poor time synchronization data processing performance in the prior art.

[0004] In view of the above problems, this application provides a method and system for time synchronization data processing.

[0005] In a first aspect, this application provides a time synchronization data processing method, the method comprising:

[0006] Based on local environmental data, the collection cycle is obtained, and high-precision time synchronization data and local sensing data are collected.

[0007] Analyze the data characteristics of crystals from the same batch, and obtain the time discrepancy based on the high-precision time synchronization data and the local sensing data;

[0008] Based on the analysis of the data characteristics, the rationality of the time deviation is determined, the rationality analysis results are obtained, and the acquisition cycle is adjusted to obtain an optimized acquisition cycle.

[0009] Based on the local environment data and the mapping table, the correction value is obtained, and based on the correlation between the timing deviation and the crystal data characteristics and the timing deviation, the mapping table is dynamically corrected to obtain a corrected mapping table for the timing data processing of the next cycle.

[0010] Secondly, this application provides a time synchronization data processing system, including:

[0011] The data acquisition module is used to obtain the acquisition cycle based on local environmental data, and to acquire high-precision time synchronization data and local sensing data;

[0012] The feature analysis module is used to analyze the data characteristics of crystals in the same batch and to obtain the timing deviation based on the high-precision timing data and the local sensing data.

[0013] The cycle optimization module is used to analyze the rationality of the time deviation based on the data characteristics, obtain the rationality analysis results, adjust the acquisition cycle, and obtain an optimized acquisition cycle.

[0014] The mapping correction module is used to obtain correction values ​​based on the local environment data and the mapping table, and to dynamically correct the mapping table based on the correlation between the timing deviation and the crystal data characteristics and the timing deviation, so as to obtain a corrected mapping table for the timing data processing of the next cycle.

[0015] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0016] This application proposes a time synchronization data processing method and system. By introducing an adaptive acquisition cycle adjustment mechanism based on local environmental data, it achieves optimal matching between the time synchronization data acquisition frequency and the rate of environmental change. When the environment is stable, the acquisition interval is automatically extended to reduce system power consumption and communication resource usage. When the environment changes drastically, the acquisition cycle is dynamically shortened to quickly track frequency fluctuations, thereby significantly improving the system's operational efficiency while ensuring timekeeping accuracy. Simultaneously, by analyzing the data characteristics of crystals in the same batch and performing a rationality analysis on the time synchronization deviation acquired each time, the data used in subsequent calculations becomes more representative. By constructing an influence correlation model between crystal data characteristics and time synchronization deviation, and dynamically correcting a preset mapping table accordingly, the frequency correction parameter is transformed from static open-loop control to adaptive closed-loop optimization. This allows the correction value to reflect the characteristic drift of the crystal caused by complex factors such as batch issues in real time, thus maintaining high-precision timekeeping capability over long-term operation. Compared with traditional methods, the technical solution provided in this application achieves improved timekeeping data processing performance and enhances the adaptability and long-term stability of the timekeeping terminal in complex environments through dual dynamic optimization of the acquisition cycle and correction parameters. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating a time synchronization data processing method provided in an embodiment of this application.

[0019] Figure 2 This is a schematic diagram of the structure of a time synchronization data processing system provided in an embodiment of this application.

[0020] The components represented by each number in the attached diagram are explained below:

[0021] Data acquisition module 100, feature analysis module 200, periodic optimization module 300, mapping correction module 400. Detailed Implementation

[0022] This application provides a time synchronization data processing method and system to address the technical problem of poor time synchronization data processing performance in the prior art.

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0024] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0025] Example 1, as Figure 1 As shown, this application provides a time synchronization data processing method, wherein the method includes:

[0026] S10: Based on local environmental data, obtain the collection cycle and collect high-precision time synchronization data and local sensing data.

[0027] Existing timekeeping terminals typically use a fixed period to collect high-precision time synchronization data. This approach is difficult to adapt to complex and ever-changing field operating environments. When environmental changes are relatively gradual, a fixed high-frequency acquisition will result in unnecessary power consumption; while when the environment changes drastically, the fixed acquisition period may fail to capture rapid drifts in the crystal frequency due to excessively large sampling intervals, causing the acquired time synchronization data to lag behind the actual changes, thus affecting the accuracy of subsequent corrections.

[0028] Step S10 in the method provided in this application embodiment includes:

[0029] Acquire local environmental data, wherein the local environmental data includes local temperature;

[0030] Based on the local environment data, the collection period is determined;

[0031] The acquisition period, based on the local environment data, includes:

[0032] Calculate the deviation between the local environmental data and the standard environmental data;

[0033] Based on the aforementioned deviation, the standard acquisition period is scaled down to obtain the acquisition period.

[0034] Using the aforementioned acquisition cycle, high-precision time synchronization data and local sensing data are acquired. The high-precision time synchronization data includes timestamps output by the clock source, and the local sensing data includes timestamps output by the local clock.

[0035] In this embodiment of the application, the acquisition period is obtained based on local environmental data, and high-precision time synchronization data and local sensing data are acquired.

[0036] Specifically, firstly, local environmental data is acquired, including local temperature. For example, local environmental data is acquired in real time using a temperature sensor installed on the timekeeping terminal; this local environmental data specifically refers to the current local temperature value, such as 30 degrees Celsius.

[0037] Furthermore, the collection period is obtained based on the local environment data.

[0038] Calculate the deviation between the local environmental data and the standard environmental data. For example, the standard environmental data can be preset to the reference temperature at the time of crystal factory calibration, such as 25 degrees Celsius. Calculate the deviation between the local temperature and the standard temperature, for example, calculate the absolute value of the temperature difference, i.e., |30-25|=5 degrees Celsius.

[0039] Furthermore, based on the aforementioned deviation, the standard acquisition period is scaled down to obtain the acquisition period. For example, the standard acquisition period is scaled down according to the deviation, and the scaling rule can be set such that for every 1 degree Celsius increase in deviation, the acquisition period is shortened by 10%. If the preset standard acquisition period is 3600 seconds, the optimized acquisition period is calculated as 3600 × (1 - 5 × 0.1) = 1800 seconds.

[0040] Furthermore, using the aforementioned acquisition cycle, high-precision time synchronization data and local sensing data are acquired. The high-precision time synchronization data includes a timestamp output by the clock source, and the local sensing data includes a timestamp output by the local clock. For example, an acquisition cycle is initiated at 1800-second intervals. The high-precision timestamp output by the clock source is obtained through the GNSS receiving module, and simultaneously, the local sensing timestamp recorded by the local clock counter is read. These two timestamp data are stored as the raw input for subsequent calculation of the time synchronization deviation.

[0041] By introducing a dynamic generation mechanism for the collection cycle based on local environment data, adaptive optimization of the data collection frequency is achieved, thereby improving the efficiency of data collection from the source.

[0042] S20: Analyze the data characteristics of crystals in the same batch, and obtain the time deviation based on the high-precision time synchronization data and the local sensing data.

[0043] Although different crystal individuals share common characteristics, they also have unique drift patterns. Without an understanding of the overall statistical characteristics of crystals in the same batch, it will be difficult to distinguish whether the current deviation is due to normal environmental influences or abnormal behavior of individual crystals, which may result in poor correction effects.

[0044] Step S20 in the method provided in this application embodiment includes:

[0045] Extract the operating characteristic parameters of clock crystals similar to the local clock crystal, and obtain the data characteristics of similar crystals through statistical analysis. The data characteristics include at least the local environmental data of similar crystals and the mean and standard deviation of similar time synchronization deviations.

[0046] Calculate the deviation between the high-precision time synchronization data and the local sensing data to obtain the time synchronization deviation.

[0047] In this embodiment of the application, the data characteristics of crystals in the same batch are analyzed, and the timing deviation is obtained based on the high-precision timing data and the local sensing data.

[0048] Specifically, firstly, the operating characteristic parameters of clock crystals of the same type as the local clock crystal are extracted. Statistical analysis is then used to obtain the data characteristics of these similar crystals. These data characteristics include at least the local environmental data of the similar crystals and the mean and standard deviation of their time synchronization deviations. For example, the operating characteristic parameters of multiple similar crystals from the same production batch and model as the local clock crystal are retrieved. These parameters include the local environmental temperature and its corresponding time synchronization deviation value recorded by each similar crystal during past operation. The average local environmental temperature of all similar crystals is calculated as the average temperature of the similar type, and its standard deviation is calculated as the standard deviation of the similar temperature. Simultaneously, the average time synchronization deviation of all similar crystals is calculated as the average deviation of the similar deviation, and its standard deviation is calculated as the standard deviation of the similar deviation. For example, the statistical analysis shows that the average temperature of the similar type is 25 degrees Celsius, and the standard deviation is 2 degrees Celsius; the average deviation of the similar type is 0 microseconds, and the standard deviation is 10 microseconds.

[0049] Further, the deviation between the high-precision time synchronization data and the locally sensed data is calculated to obtain the time synchronization deviation. In the current acquisition cycle, the difference between the locally sensed timestamp and the high-precision time synchronization timestamp is calculated to obtain the current time synchronization deviation. For example, the current time synchronization deviation is 5 microseconds.

[0050] By introducing data feature analysis methods for crystals from the same batch, the calculation of time deviation is upgraded from a single numerical comparison to a comprehensive judgment based on statistical features, providing more stable and reliable input parameters for subsequent rationality analysis and periodic adjustment.

[0051] S30: Based on the data characteristics, analyze the rationality of the time deviation, obtain the rationality analysis results, adjust the acquisition cycle, and obtain an optimized acquisition cycle.

[0052] In actual operation, due to external interference, communication abnormalities, or momentary sensor failures, the time deviation calculated at certain times may deviate from the actual situation. If these abnormal values ​​are directly used to adjust the acquisition cycle, it will lead to errors in the calculation of the cycle scaling factor, which in turn will cause abnormal and large fluctuations in the acquisition cycle in a short period of time, thus damaging the stability of the system.

[0053] Step S30 in the method provided in this application embodiment includes:

[0054] Based on the data characteristics, calculate the z-score of the local environment data of the crystal and the local environment data of the same type of crystal, and map the results to obtain the environmental rationality analysis results;

[0055] Calculate the z-score of the time synchronization deviation and the time synchronization deviation of the same type, and map the results to obtain the deviation rationality analysis results;

[0056] The environmental rationality analysis results and the deviation rationality analysis results are weighted and calculated to obtain the rationality analysis results;

[0057] Based on the results of the rationality analysis, the period scaling factor is calculated and obtained;

[0058] Calculate the product of the period scaling factor and the acquisition period to obtain the optimized acquisition period.

[0059] In this embodiment of the application, the rationality of the time deviation is analyzed based on the data characteristics, the rationality analysis results are obtained, the acquisition cycle is adjusted, and an optimized acquisition cycle is obtained.

[0060] Specifically, firstly, based on the data characteristics, the z-scores of the local environmental data of the crystal and the local environmental data of similar crystals are calculated, and the environmental rationality analysis results are obtained by mapping. For example, if the local environmental data of the crystal is 28 degrees Celsius, the average local environmental temperature of similar crystals is 25 degrees Celsius, and the standard deviation is 2 degrees Celsius, the z-score of the current local sensing data is calculated by subtracting the average temperature of similar crystals from the current temperature and then dividing by the standard deviation of similar crystals, resulting in z-score = (28-25) / 2 = 1.5. For example, the mapping rule is set such that when the absolute value of the z-score is between 0 and 3, the rationality result = |1-z-score / 3|, and when the absolute value of the z-score is greater than or equal to 3, the rationality result is 0. The environmental rationality analysis result is calculated as |1-z-score / 3| = 0.5.

[0061] Further, the time synchronization deviation and the z-score of the same type of time synchronization deviation are calculated, and the deviation rationality analysis result is obtained by mapping. For example, the mean of the same type of time synchronization deviation is 0 microseconds, the standard deviation is 10 microseconds, and the current time synchronization deviation is 5 microseconds. The z-score of the current time synchronization deviation is calculated as (5-0) / 10 = 0.5. Using the same mapping rule, the deviation rationality analysis result is calculated as |1-z-score / 3| = 0.5 = 0.8.

[0062] Furthermore, the environmental rationality analysis results and the deviation rationality analysis results are weighted and calculated to obtain the rationality analysis result. For example, the environmental rationality results and deviation rationality results are weighted and calculated, for instance, with a preset environmental weight of 0.3 and a deviation weight of 0.7 to amplify the impact of deviations in similar crystals. The actual weights can be adjusted based on the actual application scenario. Therefore, the rationality analysis result = 0.3 × 0.5 + 0.7 × 0.83 = 0.73.

[0063] Furthermore, based on the rationality analysis results, a period scaling factor is calculated. For example, the scaling factor is set to 0.5 + rationality result, and the period scaling factor is 0.5 + 0.73 = 1.23. When the rationality result is small, the scaling factor is close to 0.5, and the collection period is correspondingly shortened to enable encrypted monitoring when data reliability is low; when the rationality result is large, the scaling factor is close to 1.5, and the collection period is appropriately extended to reduce computational overhead.

[0064] Further, the product of the period scaling factor and the acquisition period is calculated to obtain the optimized acquisition period. Optimized acquisition period = period scaling factor × acquisition period = 1.23 × 1800 = 2214 seconds.

[0065] By constructing a two-dimensional rationality analysis mechanism based on data characteristics, we have achieved strict screening and evaluation of the basis for adjusting the acquisition cycle, avoiding erroneous adjustments caused by abnormal disturbances, and making the dynamic optimization process of the acquisition cycle smoother and more robust.

[0066] S40: Based on the local environment data and the mapping table, obtain the correction value, and based on the time deviation and the mutual influence and correlation between the crystal data characteristics and the time deviation, dynamically correct the mapping table to obtain a corrected mapping table for the time data processing of the next cycle.

[0067] The long-term accuracy of a timekeeping terminal still depends on the accuracy of the frequency correction value. The pre-set mapping table is calibrated for the general characteristics of the crystal under ideal laboratory conditions. However, crystals may exhibit collective characteristics during actual service, causing the mapping results of the mapping table to be incompatible, resulting in the timekeeping error accumulating and increasing over time.

[0068] Step S40 in the method provided in this application embodiment includes:

[0069] Retrieve a pre-stored mapping table, which is a table showing the correspondence between local environment data and crystal frequency correction values, and match the crystal frequency correction value corresponding to the current local environment data using a lookup table method;

[0070] Construct an impact correlation model, input the local environmental data and the time deviation into the model, and obtain the correction coefficient;

[0071] The construction of the influence correlation model includes:

[0072] Construct the basic framework for the influence correlation model;

[0073] The local environmental data and time deviation of the same type of crystal are used as the input set, and the corresponding correction coefficients of the same type of crystal are obtained as the output set.

[0074] Among them, obtaining the corresponding correction coefficients for similar crystals includes:

[0075] Retrieve the pre-stored mapping table of similar crystals and match the standard crystal frequency correction value corresponding to the local environment data of similar crystals;

[0076] Based on the time deviation of the same type of crystal, calculate the actual crystal frequency correction value for local environmental data of the same type of crystal;

[0077] Calculate the ratio of the standard crystal frequency correction value to the actual crystal frequency correction value, and obtain the corresponding correction coefficient for the same type of crystal;

[0078] The basic framework of the influence correlation model is trained using the input set and the output set to obtain the influence correlation model.

[0079] The mapping table is updated based on the correction coefficient to obtain the corrected mapping table;

[0080] The correction mapping table is stored in the storage module of the timekeeping terminal. During the next cycle of time synchronization data processing, the correction mapping table is directly called to match the local environment data to obtain the correction value.

[0081] In this embodiment of the application, a correction value is obtained based on the local environment data and the mapping table, and the mapping table is dynamically corrected based on the correlation between the timing deviation and the crystal data characteristics and the timing deviation, so as to obtain a corrected mapping table for the timing data processing of the next cycle.

[0082] Specifically, first, a pre-stored mapping table is retrieved. This mapping table represents the correspondence between local environmental data and crystal frequency correction values. The crystal frequency correction value corresponding to the current local environmental data is matched using a lookup method. For example, a pre-generated mapping table is retrieved from the storage module of the timekeeping terminal. This table records the correspondence between local environmental temperature and crystal frequency correction values, for example, a correction value is calibrated every 5 degrees Celsius. Based on the local environmental data, the corresponding crystal frequency correction value, for example, 12.5 ppm, is matched from the mapping table using linear interpolation.

[0083] Furthermore, an impact correlation model is constructed by inputting the local environmental data and the time deviation into the model to obtain correction coefficients.

[0084] The construction of the influence correlation model includes:

[0085] First, the basic framework of the influence correlation model is constructed. For example, a three-layer backpropagation (BP) neural network structure is used to construct the basic framework, where the input layer contains two nodes, which receive the local ambient temperature and the time deviation, respectively; the hidden layer contains five nodes, and the activation function is the sigmoid function; the output layer has one node, which outputs the correction coefficient.

[0086] Furthermore, the local environmental data and time deviation of the same type of crystal are used as the input set, and the corresponding correction coefficients for the same type of crystal are obtained as the output set. For example, multiple sets of local environmental temperature and time deviation are extracted from the operation records of the same type of crystal as input samples, and the corresponding correction coefficients for each set of samples are calculated as the output set.

[0087] Among them, obtaining the corresponding correction coefficients for similar crystals includes:

[0088] First, a pre-stored mapping table of similar crystals is retrieved, and the standard crystal frequency correction value corresponding to the local environmental data of the similar crystal is matched. For example, for each similar crystal sample, its pre-stored mapping table is retrieved first, and the standard crystal frequency correction value is obtained by looking up the table according to the sample's local environmental temperature.

[0089] Furthermore, based on the time synchronization deviation of similar crystals, the actual crystal frequency correction value for adapting to local environmental data of similar crystals is calculated. For example, according to the time synchronization deviation of the sample and the corresponding acquisition period, and according to a preset conversion relationship such as 0.01 ppm frequency correction for every 1 microsecond time synchronization deviation, this can be set based on actual application scenarios. The actual required crystal frequency correction value is calculated, i.e., actual correction value = standard correction value + 0.01 × time synchronization deviation.

[0090] Furthermore, the ratio of the standard crystal frequency correction value to the actual crystal frequency correction value is calculated to obtain the corresponding correction coefficient for the same type of crystal. For example, the correction coefficient = standard crystal frequency correction value / actual crystal frequency correction value.

[0091] Furthermore, similar correction coefficients are integrated to obtain the output set.

[0092] Furthermore, the basic framework of the influence correlation model is trained using the input set and the output set to obtain the influence correlation model. For example, the neural network is trained using the input set and output set with the help of Python's TensorFlow framework, setting the learning rate to 0.01 and the number of training epochs to 1000, until the loss function converges, thus obtaining the trained influence correlation model.

[0093] Furthermore, the local environmental data and the time deviation input model are used to obtain correction coefficients. The influence correlation model trained on the local environmental data and the time deviation input is then used to obtain correction coefficients.

[0094] Further, the mapping table is updated based on the correction coefficient to obtain a corrected mapping table. For example, the correction value corresponding to each temperature point in the mapping table is multiplied by the correction coefficient to obtain the corrected mapping table.

[0095] Furthermore, the correction mapping table is stored in the storage module of the timekeeping terminal. During the next cycle of time synchronization data processing, the correction mapping table is directly called to match the local environment data to obtain the correction value.

[0096] By establishing the correlation between crystal data characteristics and timing deviation, a dynamic closed-loop correction of the static mapping table was achieved. The resulting corrected mapping table implicitly contains the common characteristics of the crystal. In the timing data processing of the next cycle, this real-time updated mapping table can be directly called to match the local environmental data to obtain the correction value, ensuring that the frequency correction closely matches the latest actual state of the crystal.

[0097] Example 2, as Figure 2 As shown, based on the same inventive concept as the time synchronization data processing method provided in Embodiment 1, this embodiment of the invention also provides a time synchronization data processing system, including:

[0098] The data acquisition module 100 is used to obtain the acquisition cycle based on local environmental data, and to acquire high-precision time synchronization data and local sensing data.

[0099] The feature analysis module 200 is used to analyze the data features of crystals in the same batch and to obtain the timing deviation based on the high-precision timing data and the local sensing data.

[0100] The cycle optimization module 300 is used to analyze the rationality of the time deviation based on the data characteristics, obtain the rationality analysis results, adjust the acquisition cycle, and obtain an optimized acquisition cycle.

[0101] The mapping correction module 400 is used to obtain correction values ​​based on the local environment data and the mapping table, and to dynamically correct the mapping table based on the correlation between the timing deviation and the crystal data characteristics and the timing deviation, so as to obtain a corrected mapping table for the timing data processing of the next cycle.

[0102] In one embodiment, the data acquisition module 100 is further configured to:

[0103] Acquire local environmental data, wherein the local environmental data includes local temperature;

[0104] Based on the local environment data, the collection period is determined;

[0105] The acquisition period, based on the local environment data, includes:

[0106] Calculate the deviation between the local environmental data and the standard environmental data;

[0107] Based on the aforementioned deviation, the standard acquisition period is scaled down to obtain the acquisition period.

[0108] Using the aforementioned acquisition cycle, high-precision time synchronization data and local sensing data are acquired. The high-precision time synchronization data includes timestamps output by the clock source, and the local sensing data includes timestamps output by the local clock.

[0109] In one embodiment, the feature analysis module 200 is further configured to:

[0110] Extract the operating characteristic parameters of clock crystals similar to the local clock crystal, and obtain the data characteristics of similar crystals through statistical analysis. The data characteristics include at least the local environmental data of similar crystals and the mean and standard deviation of similar time synchronization deviations.

[0111] Calculate the deviation between the high-precision time synchronization data and the local sensing data to obtain the time synchronization deviation.

[0112] In one embodiment, the cycle optimization module 300 is further configured to:

[0113] Based on the data characteristics, calculate the z-score of the local environment data of the crystal and the local environment data of the same type of crystal, and map the results to obtain the environmental rationality analysis results;

[0114] Calculate the z-score of the time synchronization deviation and the time synchronization deviation of the same type, and map the results to obtain the deviation rationality analysis results;

[0115] The environmental rationality analysis results and the deviation rationality analysis results are weighted and calculated to obtain the rationality analysis results;

[0116] Based on the results of the rationality analysis, the period scaling factor is calculated and obtained;

[0117] Calculate the product of the period scaling factor and the acquisition period to obtain the optimized acquisition period.

[0118] In one embodiment, the mapping correction module 400 is further configured to:

[0119] Retrieve a pre-stored mapping table, which is a table showing the correspondence between local environment data and crystal frequency correction values, and match the crystal frequency correction value corresponding to the current local environment data using a lookup table method;

[0120] Construct an impact correlation model, input the local environmental data and the time deviation into the model, and obtain the correction coefficient;

[0121] The construction of the influence correlation model includes:

[0122] Construct the basic framework for the influence correlation model;

[0123] The local environmental data and time deviation of the same type of crystal are used as the input set, and the corresponding correction coefficients of the same type of crystal are obtained as the output set.

[0124] Among them, obtaining the corresponding correction coefficients for similar crystals includes:

[0125] Retrieve the pre-stored mapping table of similar crystals and match the standard crystal frequency correction value corresponding to the local environment data of similar crystals;

[0126] Based on the time deviation of the same type of crystal, calculate the actual crystal frequency correction value for local environmental data of the same type of crystal;

[0127] Calculate the ratio of the standard crystal frequency correction value to the actual crystal frequency correction value, and obtain the corresponding correction coefficient for the same type of crystal;

[0128] The basic framework of the influence correlation model is trained using the input set and the output set to obtain the influence correlation model.

[0129] The mapping table is updated based on the correction coefficient to obtain the corrected mapping table;

[0130] The correction mapping table is stored in the storage module of the timekeeping terminal. During the next cycle of time synchronization data processing, the correction mapping table is directly called to match the local environment data to obtain the correction value.

[0131] In summary, the embodiments of this application have at least the following technical effects:

[0132] This application proposes a time synchronization data processing method and system. By introducing an adaptive acquisition cycle adjustment mechanism based on local environmental data, it achieves optimal matching between the time synchronization data acquisition frequency and the rate of environmental change. When the environment is stable, the acquisition interval is automatically extended to reduce system power consumption and communication resource usage. When the environment changes drastically, the acquisition cycle is dynamically shortened to quickly track frequency fluctuations, thereby significantly improving the system's operational efficiency while ensuring timekeeping accuracy. Simultaneously, by analyzing the data characteristics of crystals in the same batch and performing a rationality analysis on the time synchronization deviation acquired each time, the data used in subsequent calculations becomes more representative. By constructing an influence correlation model between crystal data characteristics and time synchronization deviation, and dynamically correcting a preset mapping table accordingly, the frequency correction parameter is transformed from static open-loop control to adaptive closed-loop optimization. This allows the correction value to reflect the characteristic drift of the crystal caused by complex factors such as batch issues in real time, thus maintaining high-precision timekeeping capability over long-term operation. Compared with traditional methods, the technical solution provided in this application achieves improved timekeeping data processing performance and enhances the adaptability and long-term stability of the timekeeping terminal in complex environments through dual dynamic optimization of the acquisition cycle and correction parameters.

[0133] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.

[0134] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0135] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.

Claims

1. A time-synchronization data processing method, characterized in that, include: Based on local environmental data, the collection cycle is obtained, and high-precision time synchronization data and local sensing data are collected. Analyze the data characteristics of crystals from the same batch, and obtain the time discrepancy based on the high-precision time synchronization data and the local sensing data; Based on the analysis of the data characteristics, the rationality of the time deviation is determined, the rationality analysis results are obtained, and the acquisition cycle is adjusted to obtain an optimized acquisition cycle. Based on the local environment data and the mapping table, a correction value is obtained. Then, based on the correlation between the timing deviation and the crystal data characteristics and the timing deviation, the mapping table is dynamically corrected to obtain a corrected mapping table for use in the timing data processing of the next cycle. This includes: Retrieve a pre-stored mapping table, which is a table showing the correspondence between local environment data and crystal frequency correction values, and match the crystal frequency correction value corresponding to the current local environment data using a lookup table method; Construct an impact correlation model, input the local environmental data and the time deviation into the model, and obtain the correction coefficient; The mapping table is updated based on the correction coefficient to obtain the corrected mapping table; The correction mapping table is stored in the storage module of the timekeeping terminal. During the next cycle of time synchronization data processing, the correction mapping table is directly called to match the local environment data to obtain the correction value.

2. The time synchronization data processing method according to claim 1, characterized in that, Based on local environment data, the acquisition cycle is determined, and high-precision time synchronization data and local sensing data are collected, including: Acquire local environmental data, wherein the local environmental data includes local temperature; Based on the local environment data, the collection period is determined; Using the aforementioned acquisition cycle, high-precision time synchronization data and local sensing data are acquired. The high-precision time synchronization data includes timestamps output by the clock source, and the local sensing data includes timestamps output by the local clock.

3. The time synchronization data processing method according to claim 2, characterized in that, Based on the local environment data, the collection period is obtained, including: Calculate the deviation between the local environmental data and the standard environmental data; Based on the aforementioned deviation, the standard acquisition period is scaled down to obtain the acquisition period.

4. The time synchronization data processing method according to claim 1, characterized in that, Analyze the data characteristics of crystals from the same batch, and based on the high-precision time synchronization data and the local sensing data, obtain the time synchronization deviation, including: Extract the operating characteristic parameters of clock crystals similar to the local clock crystal, and obtain the data characteristics of similar crystals through statistical analysis. The data characteristics include at least the local environmental data of similar crystals and the mean and standard deviation of similar time synchronization deviations. Calculate the deviation between the high-precision time synchronization data and the local sensing data to obtain the time synchronization deviation.

5. The time synchronization data processing method according to claim 4, characterized in that, Based on the analysis of the aforementioned data characteristics, the rationality of the time deviation is determined, and the rationality analysis results are obtained, including: Based on the data characteristics, calculate the z-score of the local environment data of the crystal and the local environment data of the same type of crystal, and map the results to obtain the environmental rationality analysis results; Calculate the z-score of the time synchronization deviation and the time synchronization deviation of the same type, and map the results to obtain the deviation rationality analysis results; The environmental rationality analysis results and the deviation rationality analysis results are weighted and calculated to obtain the rationality analysis results.

6. The time synchronization data processing method according to claim 1, characterized in that, Adjusting the acquisition period to obtain an optimized acquisition period includes: Based on the results of the rationality analysis, the period scaling factor is calculated and obtained; Calculate the product of the period scaling factor and the acquisition period to obtain the optimized acquisition period.

7. The time synchronization data processing method according to claim 4, characterized in that, The construction of the influence correlation model includes: Construct the basic framework for the influence correlation model; The local environmental data and time deviation of the same type of crystal are used as the input set, and the corresponding correction coefficients of the same type of crystal are obtained as the output set. The basic framework of the influence correlation model is trained using the input set and the output set to obtain the influence correlation model.

8. The time synchronization data processing method according to claim 1, characterized in that, Obtain the corresponding correction coefficients for similar crystals, including: Retrieve the pre-stored mapping table of similar crystals and match the standard crystal frequency correction value corresponding to the local environment data of similar crystals; Based on the time deviation of the same type of crystal, calculate the actual crystal frequency correction value for local environmental data of the same type of crystal; Calculate the ratio of the standard crystal frequency correction value to the actual crystal frequency correction value, and obtain the corresponding correction coefficient for the same type of crystal.

9. A time-synchronization data processing system, characterized in that, The system is used to implement the time synchronization data processing method according to any one of claims 1-8, the system comprising: The data acquisition module is used to obtain the acquisition cycle based on local environmental data, and to acquire high-precision time synchronization data and local sensing data; The feature analysis module is used to analyze the data characteristics of crystals in the same batch and to obtain the timing deviation based on the high-precision timing data and the local sensing data. The cycle optimization module is used to analyze the rationality of the time deviation based on the data characteristics, obtain the rationality analysis results, adjust the acquisition cycle, and obtain an optimized acquisition cycle. The mapping correction module is used to obtain correction values ​​based on the local environment data and the mapping table, and to dynamically correct the mapping table based on the correlation between the timing deviation and the crystal data characteristics and the timing deviation, so as to obtain a corrected mapping table for the timing data processing of the next cycle.