Accurate time service receiving module test method
By generating coordinate points, clustering analysis and dynamic adjustment of parameters, the problem of delay in the time receiving module affecting system synchronization is solved, accurate delay monitoring and abnormal judgment is achieved, and the stability and reliability of the system are improved.
Patent Information
- Application Number
- CN202510657776.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-02
AI Technical Summary
The timed receiving module may experience delays due to environmental noise, signal attenuation, hardware aging, and algorithm processing delays, which affects the precise time synchronization between the modules in the system, resulting in data recording deviations, command response lags and even equipment operation inconsistent.
By generating coordinate points, performing clustering analysis, adjusting the clustering radius to obtain the second cluster, obtaining the theoretical center of gravity of the target cluster, determining the coordinate point C closest to the theoretical center of gravity, performing the delay test of the time-delivery receiving module based on the coordinate point C, drawing the curve of the delay with time, and applying the correction coefficient and preset threshold comparison to determine whether the delay test result is abnormal.
It realizes accurate monitoring and abnormal judgment of the delay data of the time-delivery receiving module, reduces single occasional error interference, ensures system clock accuracy and stability, provides timely and reliable technical feedback, and improves the stability and reliability of the entire time-delivery system.
Smart Images

Figure CN120577832A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of delay testing, and in particular to an accurate testing method for a timing receiving module. Background Art
[0002] The timing receiver module is an electronic device used to receive time information from standard time signals (such as BD, radio timing signals, etc.) and convert it into a format usable by the device, thereby achieving automatic calibration and synchronization of the system time. It is widely used in data acquisition systems and communication equipment.
[0003] The timing receiver module may experience delays due to various reasons, including environmental noise, signal attenuation, hardware aging, and algorithm processing delays, thus affecting the precise time synchronization between modules in the system. For example, in fields such as data acquisition, network communications, and industrial control, precise clock synchronization is key to ensuring the coordinated operation of various components. If the timing module experiences delays, it can lead to data recording deviations, delayed command responses, and even uncoordinated device operation, ultimately causing the entire system to fail. Therefore, how to reduce the delay of the timing receiver module has become an urgent problem to be solved. Summary of the Invention
[0004] The object of the present invention is to provide an accurate timing receiving module testing method to solve the following technical problems: The timing receiving module may experience delays due to various reasons, such as environmental noise, signal attenuation, hardware aging, and algorithm processing delays, thus affecting the precise time synchronization between modules in the system. For example, in fields such as data acquisition, network communications, and industrial control, accurate clock synchronization is key to ensuring the coordinated operation of various components. If the timing module experiences delays, it can lead to data recording deviations, delayed command responses, and even uncoordinated device operation, ultimately causing failure of the entire system.
[0005] The purpose of the present invention can be achieved through the following technical solutions: A precise timing receiving module testing method comprises the following steps: S1: Calculate the processing delay based on the output time of the timing receiving module and the corresponding standard time, and generate the coordinate point based on the processing delay; S2: Cluster the coordinate points according to their density and obtain the second cluster by adjusting the cluster radius; S3: Adjust the second cluster according to its cluster center to obtain the target cluster; S4: Obtain the theoretical center of gravity of the target cluster, determine the coordinate point C that is closest to the theoretical center of gravity, and perform a delay test on the timing receiving module based on the coordinate point C.
[0006] As a further solution of the present invention: in step S1, the process of generating coordinate points specifically includes: Collect the output time t1 of the timing receiving module and obtain the corresponding standard time t2. The standard time is used to determine whether there is a delay in the output time, calculate the processing delay tcz = t2-t1, periodically obtain the processing delay, obtain the average processing delay A1 and the maximum processing delay A2, and generate the coordinate point (A1, A2); The average processing delay , M represents the total number of times the processing delay is obtained, tcz m Indicates the processing delay of the mth acquisition; Maximum processing delay A2=max(tcz jh ), processing delay set tcz jh =(tcz1, tcz2, …, tcz M ).
[0007] As a further solution of the present invention, the process of obtaining the second cluster includes: Taking the coordinate point as the center, obtain the coordinate point density P within a preset radius R. When the coordinate point density P ≥ Pys, the corresponding coordinate point is regarded as a cluster, recorded as the first cluster, and Pys represents the preset coordinate point density threshold; Increasing the radius R by a preset radius adjustment value and determining the corresponding coordinate point density threshold. After increasing the radius R for the i-th time, the corresponding coordinate point density threshold is Pys+i*Pyz, where Pyz represents the preset coordinate point density threshold adjustment value. After increasing the radius R, determine whether the corresponding first cluster is still the first cluster based on the corresponding coordinate point density. If so, increase the radius again by the radius adjustment value and repeat the above steps. If not, mark the first cluster in the previous iteration as the second cluster.
[0008] As a further solution of the present invention: the process of obtaining the target cluster includes: Obtain the theoretical center of gravity of the second cluster, increase the radius by the radius adjustment value starting from zero with the theoretical center of gravity as the center, and record the corresponding coordinate point density after each increase in radius, sort them according to the time axis order to generate a first sort, starting from the first coordinate point density in the first sort, and taking the first a coordinate point densities in the first sort as the judgment density, where a represents a preset number; Determine whether the judgment density is less than the coordinate point density threshold. If not, remove the first coordinate point density from the first sort to obtain a new first sort, and repeat the above steps. If so, obtain the radius R1 corresponding to the first coordinate point density in the first sort at this time, and take the coordinate points within the radius R1 as a cluster with the theoretical center of gravity as the center, recorded as a target cluster.
[0009] As a further solution of the present invention: in the step S4, the process of performing the delay test of the timing receiving module based on the coordinate point C specifically includes: Obtain the timing receiving module corresponding to the coordinate point C, record it as a standard module, and draw a curve F(t) showing the processing delay of the standard module changing with time, where t represents time and t∈[T1, T2]; Calculate test value , η represents the preset correction coefficient; When the test value is greater than or equal to a preset test value threshold, it is determined that the delay test result of the timing receiving module in the target cluster is abnormal; When the test value is less than the test value threshold, it is determined that there is no abnormality in the delay test result of the timing receiving module in the target cluster.
[0010] As a further solution of the present invention: the step S3 further includes the following steps: Obtain a curve f(t) showing the change in processing delay over time corresponding to the coordinate point in the target cluster, obtain the similarity between the curve f(t) and the curve F(t), and if the similarity is less than or equal to a preset similarity threshold, remove the corresponding coordinate point from the target cluster.
[0011] As a further solution of the present invention: Euclidean distance is used as a measure of the similarity between the curve f(t) and the curve F(t).
[0012] As a further solution of the present invention: in the step S3, in the process of obtaining the theoretical center of gravity of the second cluster, when there is no coordinate point on the theoretical center of gravity, the coordinate point with the shortest distance to the theoretical center of gravity is obtained and used as the theoretical center of gravity of the second cluster.
[0013] As a further solution of the present invention: in step S2, the coordinate point density , N represents the number of coordinate points within the radius R.
[0014] As a further solution of the present invention: in the step S4, all coordinate points that do not belong to the target cluster are obtained, and the steps S2-S3 are re-executed to obtain a new target cluster again. If there are still coordinate points that do not belong to the target cluster after repeating the steps S2-S3 for the nth time, the coordinate point is regarded as an abnormal point, the processing delay of the abnormal point is re-obtained, and a coordinate point is generated, which is used as the theoretical center of gravity of the target cluster, and a delay test of the timing receiving module is performed, where n represents a preset number threshold.
[0015] Beneficial effects of the present invention: This solution realizes accurate monitoring and abnormal judgment of the delay data of the timing receiving module through gradual refinement and cluster analysis. Its core lies in that on the basis of comparing the output of the acquisition module with the standard time, the delay is calculated and processed and the average and maximum delay data are periodically obtained to ensure that the real-time performance of the system can be intuitively reflected, thereby providing an accurate basis for subsequent data analysis and reducing the interference caused by single occasional errors; then, the method of coordinate point density clustering is used to aggregate a large amount of delay data into representative data clusters, which not only helps to eliminate noise and edge anomalies, but also can dynamically adjust the radius and density threshold, gradually lock the abnormal area, so that the distribution of test data is more accurate. Concentration and stability provide a scientific basis for further judgment; secondly, by determining the theoretical center of gravity of the cluster and sorting the density of the coordinate points, the modules with consistent performance in the system can be gathered together to effectively capture the overall delay trend, and use this as a reference for judging whether there is an anomaly; finally, the coordinate point closest to the theoretical center of gravity is selected as the standard module for in-depth testing. By drawing a curve of delay changes over time and applying the correction coefficient and preset threshold for comparison, it is possible to accurately determine whether the delay test results in the target cluster are abnormal, thereby ensuring the overall system clock accuracy while providing timely and reliable technical feedback, which ultimately helps to improve the stability and reliability of the entire timing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below with reference to the accompanying drawings.
[0017] Figure 1 The present invention is a flow chart of a precise timing receiving module testing method. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0019] See also Figure 1As shown, the present invention is a precise timing receiving module testing method, comprising the following steps: S1: Calculate the processing delay based on the output time of the timing receiving module and the corresponding standard time, and generate the coordinate point based on the processing delay; S2: Cluster the coordinate points according to their density and obtain the second cluster by adjusting the cluster radius; S3: Adjust the second cluster according to its cluster center to obtain the target cluster; S4: Obtain the theoretical center of gravity of the target cluster, determine the coordinate point C that is closest to the theoretical center of gravity, and perform a delay test of the timing receiving module based on the coordinate point C.
[0020] To illustrate, let's assume we have a batch of timing receiver modules in a laboratory that need testing. First, we use a high-precision BD receiver as a standard time source and connect it to a data acquisition system. Every second, we record the module output time t1 and the corresponding standard time t2. We then calculate the processing delay tcz = t2 - t1, generating a series of delay data. Next, we calculate the average delay A1 and the maximum delay A2 from this data, using these values as coordinate points, for example, (15 ms, 30 ms). We then calculate the density of other test data within a radius R centered at this coordinate point. We set a density threshold, Pys, and if the delay data density within this area exceeds the threshold, the modules are considered representative and can be classified as a preliminary cluster. We then gradually increase the radius by a certain amount, adjusting the density threshold accordingly, to check whether the current cluster remains stable. If the data distribution changes (i.e., it is no longer the first cluster), the previous clustering result is used as the final cluster. Next, we calculate the theoretical centroid of the data within this cluster. Starting from this centroid, we increase the radius from zero, recording each density change. We sort these data by time, select the first a data points as the basis for judgment, and gradually remove the outliers with the highest density until we determine a radius R1. The data within this radius now constitute the target cluster. Finally, we select the module closest to the theoretical centroid from the target cluster as the standard module. We plot the processing delay versus time curve for this module and calculate the test value using a preset correction coefficient. By comparing it with the threshold, we determine whether the delay of the module within this cluster is abnormal. This entire process, through data collection, cluster analysis, and dynamic parameter adjustment, effectively eliminates interfering factors and ensures that the test results truly reflect the module's performance, providing strong support for subsequent system optimization.
[0021] It's important to note that the theoretical centroid of the second cluster, derived through preliminary clustering, often more accurately reflects the central tendency of the majority of the data, effectively eliminating bias introduced by occasional anomalies or noise. Robust estimation methods are often used in statistics to mitigate the influence of extreme values. In theory, selecting a cluster with higher data density as a benchmark ensures that the subsequently calculated centroid is more representative and stable. Using the theoretical centroid of the second cluster as the center of a new round of screening further enhances the accuracy of capturing the central tendency of the data, resulting in a more consistent target cluster free of anomalies. This approach offers the advantage of gradually narrowing the range of data fluctuations through successive rounds of screening, ensuring that the final test data not only reflects the true performance of most system modules but also provides a reliable basis for anomaly detection. Finally, this approach is consistent with cluster analysis and the theory of central tendency. Specifically, through multiple iterations and density assessment, typical patterns within the overall data distribution are extracted, resulting in more robust and reliable system test results.
[0022] In another preferred embodiment of the present invention, in step S1, the process of generating coordinate points specifically includes: Collect the output time t1 of the timing receiving module and obtain the corresponding standard time t2. The standard time is used to determine whether there is a delay in the output time, calculate the processing delay tcz = t2-t1, periodically obtain the processing delay, obtain the average processing delay A1 and the maximum processing delay A2, and generate the coordinate point (A1, A2); Calculating average processing delay , M represents the total number of times the processing delay is obtained, tcz m Indicates the processing delay of the mth acquisition; Calculate the maximum processing delay A2=max(tcz jh ), processing delay set tcz jh =(tcz1, tcz2, …, tcz M ).
[0023] In another preferred embodiment of the present invention, in step S4, the process of performing a delay test on the timing receiving module based on the coordinate point C specifically includes: Obtain the timing receiving module corresponding to the coordinate point C, record it as a standard module, and draw a curve F(t) showing the processing delay of the standard module changing with time, where t represents time and t∈[T1, T2]; Calculate test value , η represents the preset correction coefficient; When the test value is greater than or equal to a preset test value threshold, it is determined that the delay test result of the timing receiving module in the target cluster is abnormal; When the test value is less than the test value threshold, it is determined that there is no abnormality in the delay test result of the timing receiving module in the target cluster.
[0024] It can be understood that by using the delay test results of the standard module (including the presence and absence of abnormalities) as the test results of all timing receiving modules in the target cluster, the complexity and time cost of delay testing each timing receiving module in turn are avoided.
[0025] In a preferred embodiment of the present invention, the process of obtaining the second cluster includes: Taking the coordinate point as the center, obtain the coordinate point density P within a preset radius R. When the coordinate point density P ≥ Pys, the corresponding coordinate point is regarded as a cluster, recorded as the first cluster, and Pys represents the preset coordinate point density threshold; Increasing the radius R by a preset radius adjustment value and determining the corresponding coordinate point density threshold. After increasing the radius R for the i-th time, the corresponding coordinate point density threshold is Pys+i*Pyz, where Pyz represents the preset coordinate point density threshold adjustment value. After increasing the radius R, determine whether the corresponding first cluster is still the first cluster based on the corresponding coordinate point density. If so, increase the radius again by the radius adjustment value and repeat the above steps. If not, mark the first cluster in the previous iteration as the second cluster.
[0026] In a preferred embodiment of the present invention, the process of obtaining the target cluster includes: Obtain the theoretical center of gravity of the second cluster, increase the radius by the radius adjustment value starting from zero with the theoretical center of gravity as the center, and record the corresponding coordinate point density after each increase in radius, sort them according to the time axis order to generate a first sort, starting from the first coordinate point density in the first sort, and taking the first a coordinate point densities in the first sort as the judgment density, where a represents a preset number; Determine whether the judgment density is less than the coordinate point density threshold. If not, remove the first coordinate point density from the first sort to obtain a new first sort, and repeat the above steps. If so, obtain the radius R1 corresponding to the first coordinate point density in the first sort at this time, and take the coordinate points within the radius R1 as a cluster with the theoretical center of gravity as the center, recorded as a target cluster.
[0027] In another preferred embodiment of the present invention, the step S3 further includes the following steps: Obtain a curve f(t) showing the change in processing delay over time corresponding to the coordinate point in the target cluster, obtain the similarity between the curve f(t) and the curve F(t), and if the similarity is less than or equal to a preset similarity threshold, remove the corresponding coordinate point from the target cluster.
[0028] It should be noted that by comparing the similarity of the processing delay variation curve f(t) of each coordinate point in the target cluster with the overall standard curve F(t), abnormal data whose delay behavior is inconsistent with the performance of most modules can be screened out, thereby further improving the purity of data clustering and the accuracy of test results. It also helps prevent abnormal data from interfering with the overall statistical analysis. For example, suppose F(t) represents the stable trend of delay variation over time for most modules within a day, and the f(t) of a certain module suddenly fluctuates greatly or drops abnormally within a certain period of time. By calculating the similarity, it is found that the similarity between this curve and F(t) is far below the threshold. In this case, it can be determined that there is a problem with the performance data of this module and it is removed from the target cluster. The test value calculated by the curve F(t) cannot represent its test level, so it needs to be removed. Subsequent judgment is made by other methods, such as calculating the test value of it separately using the same calculation method as the curve F(t) to determine whether there is an abnormality.
[0029] In another preferred embodiment of the present invention, the Euclidean distance is used as a measure of the similarity between the curve f(t) and the curve F(t).
[0030] It should be noted that, specifically, for two time-varying delay curves, the overall deviation between the two curves can be quantified by calculating the sum of the squares of the differences between the delay values at corresponding moments and then taking the square root to obtain the Euclidean distance. A small Euclidean distance indicates that the delay variations of the two curves over the entire time interval are relatively consistent; otherwise, a large deviation exists. For example, a preset threshold is set. When the Euclidean distance between a module's delay curve f(t) and the curve F(t) representing the overall trend is below this threshold, it indicates that the module's performance is relatively consistent with that of most modules. If the distance exceeds the threshold, the module's delay behavior is considered abnormal, and its data is discarded.
[0031] In another preferred embodiment of the present invention, in step S3, in the process of obtaining the theoretical center of gravity of the second cluster, when there is no coordinate point on the theoretical center of gravity, the coordinate point with the shortest distance to the theoretical center of gravity is obtained and used as the theoretical center of gravity of the second cluster.
[0032] In another preferred embodiment of the present invention, in step S2, the coordinate point density , N represents the number of coordinate points within the radius R.
[0033] In another preferred embodiment of the present invention, in the step S4, all coordinate points that do not belong to the target cluster are obtained, the steps S2-S3 are re-executed, and a new target cluster is obtained again. If there are still coordinate points that do not belong to the target cluster after repeating the steps S2-S3 for the nth time, the coordinate point is regarded as an abnormal point, the processing delay of the abnormal point is re-obtained, and a coordinate point is generated, which is used as the theoretical center of gravity of the target cluster, and a delay test of the timing receiving module is performed, where n represents a preset number threshold.
[0034] It is noteworthy that in this preferred embodiment, by re-incorporating all coordinate points that do not belong to the initial target cluster into the iterative process and repeatedly executing steps S2-S3, anomalous data that consistently fails to fit into the representative cluster after multiple clustering runs can be effectively captured and eliminated. The theoretical basis of this method is that iterative clustering continuously refines the data distribution, thereby gradually eliminating noise and outliers, thereby improving the purity and representativeness of the overall data. For example, suppose that during the initial test, due to environmental interference, the delay data of some modules consistently deviates from the trend of the majority modules and still fails to be classified into the target cluster after one clustering run. By setting a preset repetition threshold n, if these data remain isolated after another clustering run, they are identified as outliers. The delay data of these outliers is then re-collected and new coordinate points are generated. This is then used as the theoretical center of gravity of the target cluster for subsequent testing, ensuring that the outlier modules are also evaluated individually. This not only prevents the outlier data from interfering with the overall evaluation, but also accurately identifies and provides feedback on problematic modules.
[0035] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A precise timing receiving module testing method, characterized in that: The following steps are involved: S1: Calculate the processing delay based on the output time of the timing receiving module and the corresponding standard time, and generate the coordinate point based on the processing delay; S2: Cluster the coordinate points according to their density and obtain the second cluster by adjusting the cluster radius; S3: Adjust the second cluster according to its cluster center to obtain the target cluster; S4: Obtain the theoretical center of gravity of the target cluster, determine the coordinate point C that is closest to the theoretical center of gravity, and perform a delay test of the timing receiving module based on the coordinate point C.
2. The method for testing an accurate timing receiving module according to claim 1, wherein: In step S1, the process of generating coordinate points specifically includes: Collect the output time t1 of the timing receiving module and obtain the corresponding standard time t2. The standard time is used to determine whether there is a delay in the output time, calculate the processing delay tcz = t2-t1, periodically obtain the processing delay, obtain the average processing delay A1 and the maximum processing delay A2, and generate the coordinate point (A1, A2); The average processing delay , M represents the total number of times the processing delay is obtained, tcz m Indicates the processing delay of the mth acquisition; Maximum processing delay A2=max(tcz jh ), processing delay set tcz jh =(tcz1, tcz2, …, tcz M ).
3. A method for testing an accurate timing receiving module according to claim 2, characterized in that: The process of obtaining the second cluster includes: Taking the coordinate point as the center, obtain the coordinate point density P within a preset radius R. When the coordinate point density P ≥ Pys, the corresponding coordinate point is regarded as a cluster, recorded as the first cluster, and Pys represents the preset coordinate point density threshold; Increasing the radius R by a preset radius adjustment value and determining the corresponding coordinate point density threshold. After increasing the radius R for the i-th time, the corresponding coordinate point density threshold is Pys+i*Pyz, where Pyz represents the preset coordinate point density threshold adjustment value. After increasing the radius R, determine whether the corresponding first cluster is still the first cluster based on the corresponding coordinate point density. If so, increase the radius again by the radius adjustment value and repeat the above steps. If not, mark the first cluster in the previous iteration as the second cluster.
4. The method for testing an accurate timing receiving module according to claim 3, wherein: The process of obtaining the target cluster includes: Obtain the theoretical center of gravity of the second cluster, increase the radius by the radius adjustment value starting from zero with the theoretical center of gravity as the center, and record the corresponding coordinate point density after each increase in radius, sort them according to the time axis order to generate a first sort, starting from the first coordinate point density in the first sort, and taking the first a coordinate point densities in the first sort as the judgment density, where a represents a preset number; Determine whether the judgment density is less than the coordinate point density threshold. If not, remove the first coordinate point density from the first sort to obtain a new first sort, and repeat the above steps. If so, obtain the radius R1 corresponding to the first coordinate point density in the first sort at this time, and take the coordinate points within the radius R1 as a cluster with the theoretical center of gravity as the center, recorded as a target cluster.
5. The method for testing an accurate timing receiving module according to claim 4, wherein: In step S4, the process of performing the delay test of the timing receiving module based on the coordinate point C specifically includes: Obtain the timing receiving module corresponding to the coordinate point C, record it as a standard module, and draw a curve F(t) showing the processing delay of the standard module changing with time, where t represents time and t∈[T1, T2]; Calculate test value , η represents the preset correction coefficient; When the test value is greater than or equal to a preset test value threshold, it is determined that the delay test result of the timing receiving module in the target cluster is abnormal; When the test value is less than the test value threshold, it is determined that there is no abnormality in the delay test result of the timing receiving module in the target cluster.
6. The method for testing an accurate timing receiving module according to claim 5, wherein: The step S3 further includes the following steps: Obtain a curve f(t) showing the change in processing delay over time corresponding to the coordinate point in the target cluster, obtain the similarity between the curve f(t) and the curve F(t), and if the similarity is less than or equal to a preset similarity threshold, remove the corresponding coordinate point from the target cluster.
7. The method for testing an accurate timing receiving module according to claim 6, wherein: The Euclidean distance is used as a measure of the similarity between the curve f(t) and the curve F(t).
8. The method for testing an accurate timing receiving module according to claim 7, wherein: In the step S3, when obtaining the theoretical center of gravity of the second cluster, if there is no coordinate point on the theoretical center of gravity, the coordinate point with the shortest distance to the theoretical center of gravity is obtained and used as the theoretical center of gravity of the second cluster.
9. The method for testing an accurate timing receiving module according to claim 8, wherein: In the step S2, the coordinate point density , N represents the number of coordinate points within the radius R.
10. The method for testing an accurate timing receiving module according to claim 9, wherein: In step S4, all coordinate points that do not belong to the target cluster are obtained, and steps S2-S3 are re-executed to obtain a new target cluster. If there are still coordinate points that do not belong to the target cluster after repeating S2-S3 for the nth time, the coordinate point is regarded as an abnormal point, the processing delay of the abnormal point is re-obtained, and a coordinate point is generated, which is used as the theoretical center of gravity of the target cluster, and a delay test of the timing receiving module is performed, where n represents a preset number threshold.
Citation Information
Cited By
Aluminum bar production temperature monitoring method and data management system thereof
CN121092552A
Time service link intrusion detection system for power dispatching
CN121619256A