Broadcast terminal and server clock synchronization accuracy guarantee method and system
By detecting clock source faults and network latency, and combining error statistical analysis to generate a visual report, the problem of insufficient clock synchronization accuracy between the broadcast terminal and the server was solved, and the system achieved stable and accurate synchronization.
Patent Information
- Application Number
- CN202411541265.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing clock synchronization process between broadcast terminals and servers fails to effectively consider network latency and the physical condition of the clock source, resulting in insufficient synchronization accuracy.
It employs a clock source module, a timestamp generation module, a network latency analysis module, a clock synchronization module, an error statistics analysis module, and a visualization report module. By detecting clock source faults, calculating network latency and error values, and generating visualization reports, it ensures synchronization accuracy.
It improves the accuracy of clock synchronization between the broadcast terminal and the server, and corrects errors in a timely manner by detecting clock source failures and network latency, ensuring stable system operation.
Smart Images

Figure CN119299037A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing, and in particular to a method and system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server. Background Art
[0002] In existing data processing systems, each CPU is required to process data based on time, and all types of data acquisition rely on the time scale of the entire system. However, each system's CPU has its own clock. If these clocks are inconsistent, it will lead to erroneous results and affect the normal operation of the control system. Therefore, it is necessary to synchronize the clocks of each CPU in the data processing system; In the prior art, a clock synchronization method and data processing system in CN105334907A relate to the field of signal processing. The data processing system includes multiple CPUs and clock synchronization devices respectively connected to the multiple CPUs. The method includes: the clock synchronization device receives a clock refresh command sent by one of the multiple CPUs; updates the current system time saved by the clock synchronization device according to the clock refresh command; and sends the updated system time to the multiple CPUs to synchronize the clocks of the multiple CPUs. The clock synchronization method and data processing system provided in the embodiment of the present invention can obtain a clock refresh command from any CPU, and after the system time is updated by the clock synchronization device, it is forwarded to each CPU, so that the clocks of each CPU in the entire system are synchronized, avoiding errors caused by clock asynchrony, and effectively ensuring the normal operation of the system; However, in the existing process of synchronizing the clocks of the broadcast terminal and the server, the network delay and the physical condition of the clock source are not taken into consideration, so the accuracy of the synchronization of the clocks of the broadcast terminal and the server cannot be well guaranteed. Summary of the invention
[0003] 1. Technical issues to be resolved In view of the deficiencies in the prior art, the present invention provides a method and system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, which has the advantages of ensuring the accuracy of clock synchronization between a broadcast terminal and a server, and solves the above-mentioned technical problems.
[0004] (II) Technical solution To achieve the above-mentioned object, the present invention provides the following technical solutions: a broadcast terminal and server clock synchronization accuracy assurance system, comprising a clock source module, a timestamp generation module, a network delay analysis module, a clock synchronization module, an error statistics analysis module and a visual report module; The clock source module includes a clock source output unit and a clock source fault detection unit, wherein the clock source output unit is used to output a stable time signal, and the clock source fault detection unit is used to detect the fault of the clock source and determine whether the clock source is damaged; The timestamp generation module includes a time reading unit and a timestamp output unit, wherein the time reading unit is used to read the time signal output by the clock source output unit, and the timestamp output unit is used to generate a corresponding timestamp in combination with the time signal output by the clock source output unit read by the time reading unit when the broadcast terminal sends data; The network delay analysis module includes a data receiving unit and a delay calculation unit, wherein the data receiving unit is used to receive data sent by the broadcast terminal, and the delay calculation unit is used to calculate the network delay; The clock synchronization module is used to read the network delay calculated by the delay calculation unit and perform clock synchronization. The error statistical analysis module includes an error data acquisition unit and an error analysis and judgment unit. The error data acquisition unit is used to read the difference between the local time of the broadcast end and the time of the server end, and send it to the error analysis and judgment unit. The error analysis and judgment unit is used to store the current error value, and calculate the average error and error growth rate of all error values in the sampling time interval, and then perform error judgment; The visual report module includes a chart generation unit for reading all data recorded in the error statistics analysis module and generating a visual chart for output. The visual report module also includes an access permission reading identification unit for identifying and judging the permissions of the access personnel.
[0005] As a preferred technical solution of the present invention, the steps of the clock source fault detection unit detecting the fault of the clock source and determining whether the clock source is damaged are as follows: Step A1, judging whether the clock source is loose or the outer surface is damaged, if so, terminating the judgment and directly outputting that the clock source is physically damaged; Step A2, collecting the voltage and frequency of the clock source as well as the voltage standard value and the frequency standard value; Step A3, calculate the circuit of the clock source in combination with the voltage and frequency of the clock source as well as the voltage standard value and the frequency standard value, and determine whether the clock source has a circuit abnormality based on the calculation result. If it is determined to be abnormal, send a circuit abnormality signal to the visualization reporting module.
[0006] As a preferred technical solution of the present invention, the expressions of the voltage and frequency collected in step A2 are as follows:
[0007] in, Indicates the first voltage collected within the clock source sampling interval. , the first sample collected within the clock source sampling interval Voltage, , the first sample collected within the clock source sampling interval Voltage, Indicates a frequency collected within the clock source sampling interval, , the first sample collected within the clock source sampling interval Frequency, , the first sample collected within the clock source sampling interval frequency.
[0008] As a preferred technical solution of the present invention, the expression for calculating the circuit of the clock source in step A3 by combining the voltage and frequency of the clock source and the voltage standard value and the frequency standard value is as follows:
[0009] in, Indicates the fault judgment calculation result. If This indicates that the circuit is normal. This indicates that the circuit is abnormal and needs to be tested.
[0010] As a preferred technical solution of the present invention, the specific expression of the network delay calculation by the delay calculation unit is as follows:
[0011] in, Indicates network delay, Indicates the time when the broadcast terminal sends data. Indicates the time when the server receives the data. Indicates the server response start time. Indicates the time it takes for the broadcast terminal to receive the response.
[0012] As a preferred technical solution of the present invention, the specific calculation expression for clock synchronization performed by the clock synchronization module is as follows:
[0013] in, Indicates the adjusted broadcast terminal time, Indicates the server time. Indicates the broadcast terminal time, Indicates network latency.
[0014] As a preferred technical solution of the present invention, the error statistical analysis module broadcasts the difference between the local time of the end and the server time to obtain the expression of the average error of all error values in the sampling time interval as follows:
[0015] in, Indicates the number of samples within the sampling time interval, It represents the difference between the local time of the broadcast end and the time of the server end for the jth sampling. represents the average error, Indicates absolute value.
[0016] As a preferred technical solution of the present invention, the error statistical analysis module broadcasts the difference between the local time of the end and the server time to obtain the error growth rate expression of all error values in the sampling time interval as follows:
[0017] in, Indicates The difference between the local time of the broadcast end and the time of the server end is sampled. Indicates The difference between the local time of the broadcast end and the time of the server end is sampled. represents the error growth rate, Indicates absolute value.
[0018] As a preferred technical solution of the present invention, the expression for error judgment performed by the error analysis and judgment unit is as follows:
[0019] in, represents the error growth rate, represents the average error, Indicates the error judgment value.
[0020] The present invention also provides a method for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, based on the above-mentioned system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, comprising the following steps: Step 1: When sending data, the broadcast terminal generates a corresponding timestamp through the timestamp generation module and sends it; Step 2: When the server receives the data, it calculates the network delay, combines the calculated network delay, and performs clock synchronization; Step 3: After the clocks are synchronized, the difference between the local time of the broadcaster and the time of the server is read several times within the sampling time interval, and the current error value is stored. At the same time, the average error and error growth rate of all error values in the sampling time interval are calculated; Step 4: After the average error and error growth rate of all error values in the sampling time interval are calculated, they are stored and a visual chart is generated for output; Step 5: When the access personnel views the data, the access personnel's authority is identified and judged. If the authority is insufficient, access is prohibited.
[0021] Compared with the prior art, the present invention provides a method and system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, which has the following beneficial effects: The present invention determines whether the clock source is loose or has an outer surface damaged, calculates the circuit of the clock source in combination with the voltage and frequency of the clock source as well as the voltage standard value and the frequency standard value, and determines whether the clock source has a circuit abnormality based on the calculation result, thereby eliminating the synchronization abnormality problem caused by physical damage to the device, and then calculates the difference between the local time of the broadcast end and the time of the server end to obtain the error growth rate of all error values in the sampling time interval, and combines the two to determine the current clock synchronization accuracy, and performs timely inspections when an abnormality occurs, thereby ensuring the synchronization accuracy of the broadcast terminal and the server end clock. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the system framework of the present invention; Figure 2 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0024] See also Figure 1-Figure 2 , a broadcast terminal and server clock synchronization accuracy assurance system, including a clock source module, a timestamp generation module, a network delay analysis module, a clock synchronization module, an error statistics analysis module and a visual report module; The clock source module includes a clock source output unit and a clock source fault detection unit. The clock source output unit is used to output a stable time signal. Through a unified time standard, the clock deviation caused by different time sources between different systems is reduced, and the overall accuracy is improved. The clock source fault detection unit is used to detect the fault of the clock source and determine whether the clock source is damaged. The steps for the clock source fault detection unit to detect the fault of the clock source and determine whether the clock source is damaged are as follows: Step A1, judging whether the clock source is loose or the outer surface is damaged, if so, terminating the judgment and directly outputting that the clock source is physically damaged; Step A2: collect the voltage and frequency of the clock source as well as the voltage standard value and the frequency standard value. The expressions of the collected voltage and frequency are as follows:
[0025] in, Indicates the first voltage collected within the clock source sampling interval. , the first sample collected within the clock source sampling interval Voltage, , the first sample collected within the clock source sampling interval Voltage, Indicates a frequency collected within the clock source sampling interval, , the first sample collected within the clock source sampling interval Frequency, , the first sample collected within the clock source sampling interval Frequency; Step A3, the circuit of the clock source is calculated in combination with the voltage and frequency of the clock source and the voltage standard value and the frequency standard value, and it is determined whether the clock source has a circuit abnormality based on the calculation result. If it is determined to be abnormal, a signal of the circuit abnormality is sent to the visualization report module. The expression for calculating the circuit of the clock source in combination with the voltage and frequency of the clock source and the voltage standard value and the frequency standard value in step A3 is as follows:
[0026] in, Indicates the fault judgment calculation result. If This indicates that the circuit is normal. This indicates that the circuit is abnormal and needs to be tested; The timestamp generation module includes a time reading unit and a timestamp output unit. The time reading unit is used to read the time signal output by the clock source output unit. The timestamp output unit is used to generate a corresponding timestamp when the broadcast terminal sends data in combination with the time signal output by the clock source output unit read by the time reading unit, so that the server and the client can share the same time reference, so as to perform time comparison and delay calculation more accurately. The network delay analysis module includes a data receiving unit and a delay calculation unit. The data receiving unit is used to receive data sent by the broadcast terminal, and the delay calculation unit is used to calculate the network delay. Through the formulaic calculation, the adjustment process is ensured to be transparent and reproducible, thereby improving the stability and reliability of clock synchronization. The clock synchronization module is used to read the network delay calculated by the delay calculation unit and perform clock synchronization. The error statistical analysis module includes an error data acquisition unit and an error analysis and judgment unit. The error data acquisition unit is used to read the difference between the local time of the broadcast end and the time of the server end, and send it to the error analysis and judgment unit. The error analysis and judgment unit is used to store the current error value, and calculate the average error and error growth rate of all error values in the sampling time interval, and then perform error judgment. The expression for error judgment by the error analysis and judgment unit is as follows:
[0027] in, represents the error growth rate, represents the average error, Indicates the error judgment value; The error statistics analysis module uses the difference between the local time of the broadcast end and the server time to obtain the average error of all error values in the sampling time interval as follows:
[0028] The error statistics analysis module broadcasts the difference between the local time of the end and the server time to obtain the error growth rate of all error values in the sampling time interval as follows:
[0029] in, Indicates The difference between the local time of the broadcast end and the time of the server end is sampled. Indicates The difference between the local time of the broadcast end and the time of the server end is sampled. represents the error growth rate, represents the absolute value, Indicates the number of samples within the sampling time interval, It represents the difference between the local time of the broadcast end and the time of the server end for the jth sampling. represents the average error, Indicates the absolute value. When the error judgment value is higher than the set value, an early warning is issued and an inspection is performed, thereby ensuring the accuracy of the clock synchronization between the broadcast terminal and the server. The visual report module includes a chart generation unit for reading all data recorded in the error statistics analysis module and generating visual charts for output. The visual report module also includes an access rights reading identification unit for identifying and judging the permissions of access personnel.
[0030] Furthermore, the specific expression of the network delay calculation by the delay calculation unit is as follows:
[0031] in, Indicates network delay, Indicates the time when the broadcast terminal sends data. Indicates the time when the server receives the data. Indicates the server response start time. Indicates the time it takes for the broadcast terminal to receive the response.
[0032] Furthermore, the specific calculation expression for clock synchronization performed by the clock synchronization module is as follows:
[0033] in, Indicates the adjusted broadcast terminal time, Indicates the server time. Indicates the broadcast terminal time, Indicates network latency.
[0034] Furthermore, the main task of the visual report module is to display data in an intuitive and understandable way to help users understand the performance and status of the system. This module can be divided into two core units: the chart generation unit and the access rights identification unit.
[0035] The chart generation unit can read the recorded data from the error statistics analysis module and generate various types of visual charts based on these data, such as line charts, bar charts, pie charts, etc., to display the performance and error of clock synchronization. Through clear and intuitive chart display, technical personnel and management can quickly understand the operating status of the system and identify potential problems. It can also allow users to intuitively observe the changing trend of clock synchronization errors, help identify unstable factors and their root causes, and support decision-making and optimization strategies. Before generating a visualization report, the access permission identification unit verifies the identity and permission of the access personnel, and controls the access, viewing and operation permissions of different users to the visualization report according to the preset permission levels. Therefore, a strict permission control mechanism can ensure that only authorized personnel can view or operate sensitive data, protecting data privacy and security.
[0036] The present invention also provides a method for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, based on the above-mentioned system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, comprising the following steps: Step 1: When sending data, the broadcast terminal generates a corresponding timestamp through the timestamp generation module and sends it; Step 2: When the server receives the data, it calculates the network delay, combines the calculated network delay, and performs clock synchronization; Step 3: After the clocks are synchronized, the difference between the local time of the broadcaster and the time of the server is read several times within the sampling time interval, and the current error value is stored. At the same time, the average error and error growth rate of all error values in the sampling time interval are calculated; Step 4: After the average error and error growth rate of all error values in the sampling time interval are calculated, they are stored and a visual chart is generated for output; Step 5: When the access personnel views the data, the access personnel's authority is identified and judged. If the authority is insufficient, access is prohibited.
[0037] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, characterized in that: It includes clock source module, timestamp generation module, network delay analysis module, clock synchronization module, error statistics analysis module and visual report module; The clock source module includes a clock source output unit and a clock source fault detection unit, wherein the clock source output unit is used to output a stable time signal, and the clock source fault detection unit is used to detect the fault of the clock source and determine whether the clock source is damaged; The timestamp generation module includes a time reading unit and a timestamp output unit, wherein the time reading unit is used to read the time signal output by the clock source output unit, and the timestamp output unit is used to generate a corresponding timestamp in combination with the time signal output by the clock source output unit read by the time reading unit when the broadcast terminal sends data; The network delay analysis module includes a data receiving unit and a delay calculation unit, wherein the data receiving unit is used to receive data sent by the broadcast terminal, and the delay calculation unit is used to calculate the network delay; The clock synchronization module is used to read the network delay calculated by the delay calculation unit and perform clock synchronization. The error statistical analysis module includes an error data acquisition unit and an error analysis and judgment unit. The error data acquisition unit is used to read the difference between the local time of the broadcast end and the time of the server end, and send it to the error analysis and judgment unit. The error analysis and judgment unit is used to store the current error value, and calculate the average error and error growth rate of all error values in the sampling time interval, and then perform error judgment; The visual report module includes a chart generation unit for reading all data recorded in the error statistics analysis module and generating a visual chart for output. The visual report module also includes an access permission reading identification unit for identifying and judging the permissions of the access personnel.
2. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 1, characterized in that: The steps of the clock source fault detection unit detecting the fault of the clock source and determining whether the clock source is damaged are as follows: Step A1, judging whether the clock source is loose or the outer surface is damaged, if so, terminating the judgment and directly outputting that the clock source is physically damaged; Step A2, collecting the voltage and frequency of the clock source as well as the voltage standard value and the frequency standard value; Step A3, calculate the circuit of the clock source in combination with the voltage and frequency of the clock source as well as the voltage standard value and the frequency standard value, and determine whether the clock source has a circuit abnormality based on the calculation result. If it is determined to be abnormal, send a circuit abnormality signal to the visualization reporting module.
3. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 2, characterized in that: The expressions of the voltage and frequency collected in step A2 are as follows: in, Indicates the first voltage collected within the clock source sampling interval. , the first sample collected within the clock source sampling interval Voltage, , the first sample collected within the clock source sampling interval Voltage, Indicates a frequency collected within the clock source sampling interval, , the first sample collected within the clock source sampling interval Frequency, , the first sample collected within the clock source sampling interval frequency.
4. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 3, characterized in that: The expression for calculating the circuit of the clock source in step A3 by combining the voltage and frequency of the clock source and the voltage standard value and the frequency standard value is as follows: in, Indicates the fault judgment calculation result. If This means that there is no abnormality in the circuit. This indicates that the circuit is abnormal and needs to be tested.
5. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 1, characterized in that: The specific expression of the network delay calculation by the delay calculation unit is as follows: in, Indicates network delay, Indicates the time when the broadcast terminal sends data. Indicates the time when the server receives the data. Indicates the server response start time. Indicates the time it takes for the broadcast terminal to receive the response.
6. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 5, characterized in that: The specific calculation expression for clock synchronization performed by the clock synchronization module is as follows: in, Indicates the adjusted broadcast terminal time, Indicates the server time. Indicates the broadcast terminal time, Indicates network latency.
7. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 1, characterized in that: The error statistics analysis module broadcasts the difference between the local time of the end and the server time to obtain the average error of all error values in the sampling time interval as follows: in, Indicates the number of samples within the sampling time interval, It represents the difference between the local time of the broadcast end and the time of the server end for the jth sampling. represents the average error, Indicates absolute value.
8. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 7, characterized in that: The error statistics analysis module broadcasts the difference between the local time of the end and the server time to obtain the error growth rate of all error values in the sampling time interval as follows: in, Indicates The difference between the local time of the broadcast end and the time of the server end is sampled. Indicates The difference between the local time of the broadcast end and the time of the server end is sampled. represents the error growth rate, Indicates absolute value.
9. A broadcast terminal and server clock synchronization accuracy assurance system according to claim 8, characterized in that: The error analysis and judgment unit performs error judgment using the following expression: in, represents the error growth rate, represents the average error, Indicates the error judgment value.
10. A method for ensuring the accuracy of clock synchronization between a broadcast terminal and a server, based on a system for ensuring the accuracy of clock synchronization between a broadcast terminal and a server as claimed in any one of claims 1 to 9, characterized in that: The following steps are involved: Step 1: When sending data, the broadcast terminal generates a corresponding timestamp through the timestamp generation module and sends it; Step 2: When the server receives the data, it calculates the network delay, combines the calculated network delay, and performs clock synchronization; Step 3: After the clocks are synchronized, the difference between the local time of the broadcaster and the time of the server is read several times within the sampling time interval, and the current error value is stored. At the same time, the average error and error growth rate of all error values in the sampling time interval are calculated; Step 4: After the average error and error growth rate of all error values in the sampling time interval are calculated, they are stored and a visual chart is generated for output; Step 5: When the access personnel views the data, the access personnel's authority is identified and judged. If the authority is insufficient, access is prohibited.
Citation Information
Patent Citations
Clock synchronization method and data processing system
CN105334907A
Cited By
Method and system for adjusting sampling frequency
CN121265036A