WO2018166418A1 - 一种网络校时方法及装置 - Google Patents

一种网络校时方法及装置 Download PDF

Info

Publication number
WO2018166418A1
WO2018166418A1 PCT/CN2018/078699 CN2018078699W WO2018166418A1 WO 2018166418 A1 WO2018166418 A1 WO 2018166418A1 CN 2018078699 W CN2018078699 W CN 2018078699W WO 2018166418 A1 WO2018166418 A1 WO 2018166418A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
calibration
historical
school
difference
Prior art date
Application number
PCT/CN2018/078699
Other languages
English (en)
French (fr)
Inventor
徐森
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to US16/494,906 priority Critical patent/US10708033B2/en
Priority to EP18766773.8A priority patent/EP3598247B1/en
Publication of WO2018166418A1 publication Critical patent/WO2018166418A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors
    • GPHYSICS
    • G04HOROLOGY
    • G04FTIME-INTERVAL MEASURING
    • G04F5/00Apparatus for producing preselected time intervals for use as timing standards
    • G04F5/14Apparatus for producing preselected time intervals for use as timing standards using atomic clocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present application relates to the field of network calibration technology, and in particular, to a network calibration method and apparatus.
  • the device time is calculated by a hardware crystal chip in the device, but is limited by factors such as manufacturing process, equipment cost, hardware design, etc., and the hardware crystal chip is in the device.
  • the hardware crystal chip is in the device.
  • multiple network cameras monitor different locations in the same area. If it is necessary to synchronously call video of all network cameras at the same time, but there is a large error in the shooting time of these network cameras, Lead to error analysis of the video.
  • the device needs to be calibrated every time the device is running to ensure the accuracy and synchronization of the device's current time.
  • the user In the related school time mode, the user usually needs to configure the address of the school time server and the school time period. During the school time process, it is necessary to periodically send a school time request to the school time server in the network, according to the school time agreement, Reconfigure the device time after the school time information of the school time server interacts.
  • the traditional school time protocol is NTP (Network Time Protocol), which is mainly used to measure the delay of the round-trip transmission of the data request packet on the network and estimate the device clock deviation.
  • the device is biased according to the estimated device clock.
  • Conduct school hours. The specific process is as shown in FIG. 1.
  • the calibration server 102 sends the calibration data to the network device 101 when it is received, and the network device 101 is in the school. After the school time data is received, the school time is completed, and then the school time completion status is sent to the school time server 102 to achieve the purpose of realizing high-precision equipment calibration on the network.
  • the calibration interval of the calibration period is usually set to be short, for example, the calibration interval is set to 30 seconds, and the calibration is performed every 30 seconds, which not only ensures The accuracy of the device time and the synchronization between the devices is guaranteed.
  • the short time interval due to the short time interval, a lot of short-term calibration data packets are introduced into the network, resulting in an increase in the amount of redundant data in the network.
  • the purpose of the embodiment of the present application is to provide a network calibration method and device, so as to reduce the amount of redundant data in the network on the basis of ensuring the accuracy of the device time.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a network calibration method, where the method includes:
  • the historical time data before the current time is obtained, wherein the historical time data includes: a time difference between each historical calibration time and a time difference corresponding to each historical calibration time point. value;
  • the current total school time difference value of the current time is obtained by a preset algorithm
  • the time of the current time is adjusted to complete the adaptive calibration time.
  • the adaptive timing instruction is generated according to a user input; or generated according to a preset adaptive calibration period.
  • the method further includes:
  • the server network time is checked by the calibration server according to the preset first network calibration period, and each time and time of the server network calibration is performed, and each time The school time difference corresponding to the calibration time point of the server network calibration time is saved as historical school time data;
  • the preset first network calibration period is extended to a preset duration, and the server network calibration is performed by the calibration server according to the preset duration, and the time is obtained. a first calibration time point corresponding to the server calibration time and a calibration time difference corresponding to the first calibration time point;
  • the calibration time difference corresponding to the first calibration time point and the first calibration time point is saved as historical calibration data
  • the number of times of the historical calibration data is equal to the preset number of times, deleting the oldest historical calibration time point and the corresponding calibration time difference in the historical calibration data, and the first calibration time
  • the school time difference corresponding to the point and the first calibration time point is saved as historical time data.
  • the preset network network time period is performed, and the server network time is performed by the calibration server, and the calibration time of each server network calibration time and the calibration time of each server calibration time
  • the school time difference corresponding to the point is saved as historical school time data, including:
  • the time-of-school information includes: a first time T1 when the network device sends a school-time request to the school-time server while the school is waiting for the school, and the first time that the school-time server receives the school-time request a second time T2, a third time T3 when the calibration server sends the calibration data to the network device to be calibrated, and a fourth time T4 when the network device to be calibrated receives the calibration data.
  • the school time data includes: a post-school time obtained by the school time server after analyzing the school time request;
  • the time difference between the calibration time of each server network calibration time and the calibration time point of each server network calibration time is saved as historical calibration data.
  • the determining, according to each group of school time information, a school time difference corresponding to a calibration time point of each server network calibration time including:
  • the calculating is a historical total time difference corresponding to each historical time point, including:
  • the calibration time difference between each historical calibration time point and the historical time difference of all historical calibration time points before the historical calibration time point is accumulated to obtain each history.
  • the data obtained by accumulating the calibration time difference between each historical calibration time point and all historical calibration time points before the historical calibration time point is added. And adding the calibration time difference that has been adaptively calibrated, and obtaining the historical total time difference corresponding to each historical calibration time point.
  • the total current time difference of the current time is obtained by using a preset algorithm according to the historical total time difference corresponding to each historical time point, including:
  • the first calculation formula is used to obtain the first A parameter, wherein the first calculation formula is:
  • the b is the first parameter
  • the x i is an i-th historical calibration time point
  • the y i is a calibration time difference of the i-th historical calibration time point
  • n is a history The total number of school time points, For the average timing time point, The average time difference of the school hours;
  • the a is the second parameter, the For the average calibrated total difference, the b is the first parameter, For the average timing time point;
  • the y is the current total time difference of the current time
  • the b is the first parameter
  • the x is a calibration time point of the current time
  • the a is the second time parameter.
  • the adjusting the current time according to the calibration time difference of the current time, and completing the adaptive calibration time including:
  • an embodiment of the present application provides a network calibration device, where the device includes:
  • Obtaining a module configured to obtain historical time data before the current time when receiving the adaptive timing instruction, wherein the historical time data includes: a time point of each historical time, and a time point of each historical time Corresponding school time difference;
  • a calculation module configured to calculate a historical total time difference corresponding to each historical time point
  • a first determining module configured to obtain a current total time difference of the current time by using a preset algorithm according to a total historical time difference corresponding to each historical time point;
  • a second determining module configured to determine, as a current time difference, a difference between the current total time difference and the historical total time difference of the latest historical time;
  • the adjusting module is configured to adjust the current time according to the calibration time difference of the current time to complete the adaptive calibration time.
  • the adaptive timing instruction is generated according to a user input; or generated according to a preset adaptive calibration period.
  • the device further includes:
  • the first storage module is configured to perform server network calibration through the calibration server according to a preset first network calibration period before receiving the first adaptive calibration instruction, and each time the server network calibration The time difference and the school time difference corresponding to the calibration time point of each server network calibration time are saved as historical school time data;
  • a third determining module configured to: after receiving the first adaptive timing instruction, extend the preset first network calibration period to a preset duration, and perform a server through the calibration server according to the preset duration During the network calibration, the first calibration time point corresponding to the server calibration time and the calibration time difference corresponding to the first calibration time point are obtained;
  • a second storage module configured to use the school time difference corresponding to the first calibration time point and the first calibration time point as a historical time when the number of times of the historical calibration data is less than a preset number of times Data storage;
  • a third storage module configured to: if the number of times of the historical calibration data is equal to the preset number of times, delete the first historical time point of the historical time data and the corresponding school time difference, and The calibration time difference corresponding to the first calibration time point and the first calibration time point is saved as historical calibration data.
  • the first storage module includes:
  • a first obtaining sub-module configured to obtain a plurality of sets of time-of-day information
  • the time-of-school information includes: a first time T1 when the network device sends a school time request to the school time server, and the school time server receives a second time T2 when the school time request is requested, a third time T3 when the school time server sends the school time data to the network device to be calibrated, and the school time time network device receives the school time
  • the fourth time T4 of the data, the calibration data includes: a post-time time obtained by the calibration server after analyzing the calibration request;
  • a second obtaining sub-module configured to obtain a calibration time point of the server network calibration time corresponding to the second time T2 or the third time T3 in each group of calibration information
  • a first determining submodule configured to determine, according to each group of calibration information, a school time difference corresponding to a calibration time point of each server network calibration time;
  • the storage sub-module is used to save the calibration time corresponding to the calibration time point of each server network calibration time and the calibration time point of each server network calibration time as historical calibration data.
  • the first determining submodule includes:
  • a calculating unit configured to calculate a first difference between the second time T2 and the first time T1 in each group of time information, and the fourth time T4 and the third time in each group of time information The second difference of T3;
  • a determining unit configured to divide the first difference value and the second difference value and divide by 2 to obtain a calibration time difference corresponding to a calibration time point of each server network calibration time.
  • the computing module includes:
  • a judging sub-module for obtaining and judging whether an adaptive calibration has been performed according to the adaptive calibration time flag
  • a second determining sub-module configured to correct the calibration time difference between each historical calibration time point and all historical calibration time points before the historical calibration time point if the adaptive calibration time has not been performed The values are accumulated to obtain the historical school time total difference corresponding to each historical calibration time point;
  • a third determining sub-module configured to: if the adaptive calibration has been performed, the calibration time difference between each historical calibration time point and all historical calibration time points before the historical calibration time point The accumulated data after the value is added to the calibration time difference of the adaptive calibration, and the historical total time difference corresponding to each historical calibration time point is obtained.
  • the first determining module includes:
  • the average calibration time point determination sub-module is configured to determine an average calibration time point of all historical calibration time points according to each historical calibration time point;
  • the average school time total difference determination sub-module is configured to determine an average total school time difference of all historical school time points according to a historical total time difference corresponding to each historical time point;
  • a first parameter determining submodule configured to calculate a historical total time difference corresponding to each historical time point, each historical time point, the average time of the school time, and the average total time difference
  • the first parameter is obtained by the first calculation formula, wherein the first calculation formula is:
  • the b is the first parameter
  • the x i is an i-th historical calibration time point
  • the y i is a calibration time difference of the i-th historical calibration time point
  • n is a history The total number of school time points, For the average timing time point, The average time difference of the school hours;
  • a second parameter determining submodule configured to obtain a second parameter according to the average calibrated time point, the average calibrated total time difference, and the first parameter, where the second parameter is obtained, where the second calculating formula is for:
  • the a is the second parameter, the For the average calibrated total difference, the b is the first parameter, For the average timing time point;
  • a current total time difference determination sub-module configured to substitute the first parameter and the second parameter into a linear fitting equation to obtain a current total time difference y of the current time, wherein the linear The equation is:
  • the y is the current total time difference of the current time
  • the b is the first parameter
  • the x is a calibration time point of the current time
  • the a is the second time parameter.
  • the adjusting module includes:
  • a target calibration time determination sub-module configured to add the current time difference to the current time difference, to obtain a target calibration time of the current time
  • the adjustment submodule is configured to adjust the time of the current moment to the target calibration time to complete the adaptive calibration.
  • the embodiment of the present application provides a storage medium for storing executable code, where the executable code is used to execute at a runtime: the network calibration method provided by the first aspect of the embodiment of the present application.
  • the embodiment of the present application provides an application program for performing the network calibration method provided by the first aspect of the embodiment of the present application.
  • an embodiment of the present application provides a network device, including: a processor, a memory, a communication interface, and a bus;
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor by reading the executable program code stored in the memory, runs a program corresponding to the executable program code for performing the network calibration method provided by the first aspect of the embodiment of the present application.
  • the network calibration method and device provided by the embodiment of the present application accumulates the historical time data in the historical school time data by accumulating the historical school time data to obtain the total school time difference value of each historical school time point.
  • the preset time difference value is obtained by the preset algorithm, and the time of the current time is adjusted according to the time difference of the school, which has high real-time performance, ensures the accuracy of the equipment time, and only needs to accumulate a small amount of history.
  • Data, that is, only a small number of calibration packets are transmitted between the timing device and the server, thereby reducing the amount of redundant data in the network.
  • FIG. 2 is a schematic flowchart of a network calibration method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a process of recording each historical time data according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a linear fitting curve of an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a network calibration apparatus according to an embodiment of the present application.
  • the embodiment of the present application provides a network calibration method and device.
  • the execution body of a network calibration method provided by the embodiment of the present application may be a network device, where the network device includes a chip for timing, such as a DSP (Digital Signal Processor) and an ARM (Advanced Reduced). Instruction Set Computer Machines, or a Field-Programmable Gate Array (FPGA), etc., are not limited herein.
  • the manner of implementing a network calibration method provided by the embodiment of the present application may be at least one of software, hardware circuitry, and logic circuitry of a chip disposed in a calibration device.
  • a network calibration method provided by an embodiment of the present application may include the following steps:
  • the historical school time data includes: the time difference point of each historical school time, and the school time difference corresponding to each historical school time point.
  • the historical school time can be: the order of historical school hours determined according to the order of historical school time, such as the first historical school time, the second historical school time, the third historical school time, etc., in order to ensure the school time Accuracy, in general, it is necessary to record a certain number of school hours data, such as 16 or 32 times of school time data.
  • the history time of the school can also be: every time the history of the school hours.
  • the historical school time data may be recorded periodically or non-periodically, and is not limited herein.
  • the network calibration method of the embodiment of the present application is mainly divided into two parts, the first part is the accumulation of historical time data, and the second part is adaptive time.
  • the early stage of the network calibration method it is necessary to accumulate a part of the historical school time data for statistical analysis, and then to make adaptive time.
  • the adaptive timing instruction may be generated according to user input, or may be generated according to a preset adaptive calibration period.
  • Adaptive timing refers to the use of linear regression techniques to statistically analyze historical school time data and calculate school time data at a certain time in the future.
  • the adaptive timing command is required to start the adaptive calibration time.
  • the adaptive calibration time instruction may be generated by the user himself or herself when the self-determination is required to input the activation instruction, or the calibration time period may be set in advance. For example, when the 16-time history data is accumulated in advance and the adaptive calibration is started, the adaptive calibration time is automatically generated when the accumulated historical calibration data reaches 16 times.
  • the network timing method may further include:
  • the server network timing is performed by the calibration server according to the preset first network calibration period, and the calibration time of each server network calibration time, and each time The school time difference corresponding to the calibration time point of the server network calibration time is saved as historical school time data.
  • the preset first network calibration period is a preset period of recording historical calibration data.
  • the historical calibration data Before the first adaptive timing instruction is received, the historical calibration data needs to be accumulated.
  • the historical calibration data is recorded according to the preset period, and the accumulation of the historical calibration data is obtained by interacting with the calibration server.
  • the specific interaction process may be: when the device is to be calibrated, the device sends a school time request to the school time server in the network, and the school time server sends the school time data to the device to be calibrated after receiving the school time request, and the device is waiting for the school time. After receiving the school time data, the device time is reconfigured according to the school time data, and the school time completion instruction is sent to the school time server.
  • the server network calibration time is performed by the calibration server, and the calibration time point of each server network calibration time and the calibration time point of each server calibration time are corresponding.
  • the school time difference as a step of saving historical time data, may include:
  • the first step is to get multiple sets of school hours information.
  • the school time information is time information, that is, the time when the network device sends the school time request and the time when the school time server receives the school time request and sends the school time data.
  • the school time information specifically includes: a first time when the network device sends a school time request to the school time server, a second time T1 when the school time server receives the school time request, and a school time server to the school time network.
  • the third time T3 when the device sends the school time data, and the fourth time T4 when the network device receives the school time data, the school time data includes: the post-time time obtained by the school time server after analyzing the school time request. .
  • a calibration time point of the server network calibration time corresponding to the second time T2 or the third time T3 in each group of school time information is obtained.
  • the second time T2 when the calibration server receives the calibration request or the third time T3 when the calibration server sends the calibration data is usually set as the calibration time point, or T2 or T3 is corresponding.
  • the school time order is set to the school time point.
  • the school time difference corresponding to the calibration time point of each server network calibration time is determined.
  • the step of determining the calibration time difference corresponding to the calibration time point of each server network calibration time according to each group of school time information may include:
  • the difference between the first difference and the second difference is divided by 2 to obtain the calibration time difference corresponding to the calibration time point of each server network calibration.
  • the calibration time difference corresponding to the calibration time point of each server network calibration time can be calculated by using formula (1).
  • T2 is the second time when the school time server receives the school time request
  • T1 is the school time time network device sends the school time to the school time server.
  • T4 is the fourth time when the network device receives the school time data
  • T3 is the third time when the school time server sends the school time data to the network device to be corrected.
  • the time difference between the calibration time of each server network calibration time and the calibration time point of each server network calibration time is saved as historical school time data.
  • the historical school time data includes the calibration time point of each server network calibration time and the corresponding school time difference value, that is, the school time difference value of the first few school hours is saved as historical school time data.
  • the network calibration method of the embodiment of the present application may further include:
  • the preset first network calibration period is extended to a preset duration, and the server network calibration is performed by the calibration server according to the preset duration, and the server calibration is obtained.
  • the school time difference corresponding to the first calibration time point and the first calibration time point is saved as historical school time data
  • the earliest historical time point of the historical time data and the corresponding school time difference are deleted, and the first school time point and the first school time are deleted.
  • the school time difference corresponding to the time point is saved as historical time data.
  • the self-adaptive calibration of the network equipment on the basis of accumulating historical school time data can extend the school time period between the network equipment and the school time server, that is, after the server network calibration time.
  • the amount of data generated is less than the amount of data generated by the associated calibration method, thereby reducing network redundancy.
  • the number of times as the historical calibration data is generally set to a preset number. If the adaptive timing command input by the user starts the adaptive calibration, the recorded historical calibration data may not reach the preset number of times. If the recorded historical time data does not reach the preset number of times, the newly recorded server network calibration data can be saved as historical calibration data; if the recorded historical calibration data has reached the preset number of times, the original history school needs to be deleted. The earliest historical time data in the time data, and then the newly recorded server network time data is saved as historical time data.
  • Each time of the historical school time corresponds to the school time difference of the historical school time point.
  • the step of calculating the historical total time difference corresponding to each historical time point of the historical time may include:
  • the calibration time difference between each historical calibration time point and the historical time difference of all historical calibration time points before the historical calibration time point is accumulated to obtain each history.
  • the data obtained by accumulating the calibration time difference between each historical calibration time point and all historical calibration time points before the historical calibration time point is added. And adding the calibration time difference that has been adaptively calibrated, and obtaining the historical total time difference corresponding to each historical calibration time point.
  • the adaptive calibration time affects the historical total time difference of the school time point. Therefore, when calculating the total time difference, it is necessary to judge whether the adaptive calibration has been performed. If no adaptive calibration has been performed, then according to Equation (2) calculates the historical total time difference corresponding to each historical time point; if adaptive time has been performed, the historical time total corresponding to each historical time point is calculated according to formula (3) Difference.
  • T n is the historical total time difference corresponding to the nth historical calibration time point
  • t i is the school time difference of the i-th historical calibration time point
  • T n is the historical total time difference corresponding to the nth historical calibration time point
  • t i is the school time difference of the i-th historical calibration time point
  • t' is the school time difference value of the adaptive calibration time.
  • S203 Obtain a current total time difference of the current time by using a preset algorithm according to a historical total time difference corresponding to each historical time point.
  • the method for statistically analyzing historical time-of-day data in this embodiment is a linear fitting method, and the most commonly used linear fitting method is a least square method. Of course, other linear fitting methods also belong to the protection scope of the embodiments of the present application.
  • the least squares method is taken as an example, and the step of obtaining the current total time difference of the current time according to the total time difference of the historical school time corresponding to each historical time point may include:
  • the average school time point of all historical school time points is determined according to each historical school time point.
  • the average school time point can be the average of the order of all historical school hours, then the average school time point is among them, The average school time point for all historical school hours, For the sum of all historical school time points, i is the i-th historical school time point.
  • the average total school time difference of all historical school time points is determined according to the total historical time difference corresponding to each historical time point.
  • the average total time difference is among them, The average total time difference for all historical school hours, The sum of the historical school hours total difference for all historical school hours, i is the i-th historical school time point.
  • the formula (4) is used to obtain the first One parameter.
  • b is the first parameter
  • x i is the i-th historical calibration time point
  • y i is the school time difference of the i-th historical calibration time point
  • n is the total number of historical calibration time points.
  • the average school time The average school time total difference.
  • the second parameter is obtained by formula (5).
  • a is the second parameter, For the average total time difference, b is the first parameter, For the average timing time point.
  • the first parameter and the second parameter are substituted into the formula (6), and the current total time difference of the current time is obtained by formula (6) according to the current time point of the current time.
  • the formula (6) is a linear fitting equation, specifically:
  • y is the current total time difference of the current time
  • b is the first parameter
  • x is the current time point of the current time
  • a is the second parameter
  • S205 Adjust the current time according to the calibration time difference of the current time to complete the adaptive calibration time.
  • the time difference of the current time that is, the current time, the time difference between the network device and the calibration server at the time of the school, the time difference may be positive or negative, and the time difference is positive.
  • the current time is the time difference of the network device when the current time is waiting for the school.
  • the time difference is negative, the time of adjusting the current time is the time of the network device at the current time.
  • the step of adjusting the current time according to the calibration time difference of the current time, and completing the step of the adaptive calibration time may include:
  • the target time of the current time is the current time and the current time difference.
  • the sign of the time difference is positive plus positive.
  • the execution body of the network calibration method provided by the embodiment of the present application may also be a chip in the calibration server, or a calibration controller independent of the calibration device and the calibration server, and the chip or the calibration time in the calibration server.
  • the controller can also reduce the amount of redundant data in the network to some extent.
  • adaptive time calibration is performed on the network device on the basis of accumulating historical school time data, so that the school time period between the network device to be calibrated and the school time server can be extended, that is, the next time the server network is calibrated, The time of the school can be shortened, thereby reducing network redundancy.
  • the time gap between multiple network devices in the network is reduced, and all waiting time is improved. The accuracy and synchronicity of network device time.
  • the network calibration method provided by the embodiment of the present application is introduced in the following with reference to specific application examples.
  • the network device 101 sends a calibration request to the school time server 102, and records the time T1 of the time request for sending the calibration.
  • the calibration server 102 Receiving the school time request, recording the time T2 of receiving the school time request, the school time server 102 analyzes the school time request, and sends the school time calibration data to the network device 101 to be scheduled, and records the time T3 of transmitting the school time data.
  • the network device 101 receives the calibration data, and records the time T4 when the school time data is received. Since the time data between the network device 101 and the calibration server satisfies the formula (7),
  • T2 is the time when the calibration server 102 receives the calibration request sent by the network device 101
  • T1 is the time when the network device 101 sends the calibration request
  • is the network device 101 to be compared with the school.
  • the time difference of the server 102 at the time T1 ⁇ 1 is the time consumed by the calibration request to propagate in the network
  • T4 is the time when the calibration server 102 transmits the calibration data
  • T3 is the time when the network device 101 receives the school.
  • the time of the time data transmitted by the server 102, ⁇ 2 is the time consumed for the time-of-day data to propagate in the network
  • is the round-trip transmission delay between the network device 101 and the time-of-day server 102 to be corrected.
  • the calibration data includes the calibration time difference of the network device 101 to be checked relative to the calibration server 102 at time T1.
  • the calibration time difference ⁇ of the network device 101 to be corrected relative to the calibration server 102 at the time T1 and the round-trip transmission delay ⁇ between the network device 101 and the calibration server 102 to be corrected are only related to the calibration server 102.
  • the school time network device 101 receives the difference correlation of the time T3 of the calibration data transmitted by the calibration server 102.
  • the recorded historical time data is: a total of 32 times of school time data are recorded, and the time difference of each historical time is 2.1 seconds.
  • the historical time is set as follows.
  • the order of historical school hours determined by the order of historical school hours, the average school time point of historical school time points is the average of the order of all historical school hours, and the average school time point of all historical school time points is :
  • the average total time difference between all historical school hours is:
  • the first parameter b 2.1
  • the linear fitting curve is obtained as shown in FIG. 4 .
  • the abscissa of the curve shown in Fig. 4 is the order of the historical calibration time points, and the ordinate is the historical school time total difference corresponding to each historical calibration time point.
  • the target time of the network device is the current time plus 2.1 seconds.
  • the program accumulates the historical school time data, accumulates the school time difference values in the historical school time data, and obtains the total school time difference value of each historical school time point, and obtains the current time through a preset algorithm.
  • the school time difference is adjusted according to the time difference of the school to the current time, which has high real-time performance, ensures the accuracy of the equipment time, and only needs to accumulate a small amount of historical data, that is, the school time equipment and Only a small number of school time packets are transmitted between servers, reducing the amount of redundant data in the network.
  • the embodiment of the present application provides a network calibration device.
  • the network calibration device may include:
  • the obtaining module 510 is configured to: when the adaptive timing instruction is received, obtain historical time data before the current time, wherein the historical time data includes: a time point of each historical time, and each time of the historical time The corresponding school time difference of the point;
  • the calculation module 520 is configured to calculate a historical total time difference corresponding to each historical calibration time point
  • the first determining module 530 is configured to obtain a current total time difference of the current time by using a preset algorithm according to a historical total time difference corresponding to each historical time point;
  • the second determining module 540 is configured to determine, as the current time difference, a difference between the current total time difference and the historical total time difference of the latest historical time;
  • the adjusting module 550 is configured to adjust the time of the current time according to the calibration time difference of the current time, and complete the adaptive calibration time.
  • the adaptive timing instruction may be generated according to a user input; or generated according to a preset adaptive calibration period.
  • the device may further include:
  • the first storage module is configured to perform server network calibration through the calibration server according to a preset first network calibration period before receiving the first adaptive calibration instruction, and each time the server network calibration The time difference and the school time difference corresponding to the calibration time point of each server network calibration time are saved as historical school time data;
  • a third determining module configured to: after receiving the first adaptive timing instruction, extend the preset first network calibration period to a preset duration, and perform a server through the calibration server according to the preset duration During the network calibration, the first calibration time point corresponding to the server calibration time and the calibration time difference corresponding to the first calibration time point are obtained;
  • a second storage module configured to use the school time difference corresponding to the first calibration time point and the first calibration time point as a historical time when the number of times of the historical calibration data is less than a preset number of times Data storage;
  • a third storage module configured to: if the number of times of the historical calibration data is equal to the preset number of times, delete the first historical time point of the historical time data and the corresponding school time difference, and The calibration time difference corresponding to the first calibration time point and the first calibration time point is saved as historical calibration data.
  • the first storage module may include:
  • a first obtaining sub-module configured to obtain a plurality of sets of time-of-day information
  • the time-of-school information includes: a first time T1 when the network device sends a school time request to the school time server, and the school time server receives a second time T2 when the school time request is requested, a third time T3 when the school time server sends the school time data to the network device to be calibrated, and the school time time network device receives the school time
  • the fourth time T4 of the data, the calibration data includes: a post-time time obtained by the calibration server after analyzing the calibration request;
  • a second obtaining sub-module configured to obtain a calibration time point of the server network calibration time corresponding to the second time T2 or the third time T3 in each group of calibration information
  • a first determining submodule configured to determine, according to each group of calibration information, a school time difference corresponding to a calibration time point of each server network calibration time;
  • the storage sub-module is used to save the calibration time corresponding to the calibration time point of each server network calibration time and the calibration time point of each server network calibration time as historical calibration data.
  • the first determining submodule may include:
  • a calculating unit configured to calculate a first difference between the second time T2 and the first time T1 in each group of time information, and the fourth time T4 and the third time in each group of time information The second difference of T3;
  • a determining unit configured to divide the first difference value and the second difference value and divide by 2 to obtain a calibration time difference corresponding to a calibration time point of each server network calibration time.
  • the calculating module 520 may include:
  • a judging sub-module for obtaining and judging whether an adaptive calibration has been performed according to the adaptive calibration time flag
  • a second determining sub-module configured to correct the calibration time difference between each historical calibration time point and all historical calibration time points before the historical calibration time point if the adaptive calibration time has not been performed The values are accumulated to obtain the historical school time total difference corresponding to each historical calibration time point;
  • a third determining sub-module configured to: if the adaptive calibration has been performed, the calibration time difference between each historical calibration time point and all historical calibration time points before the historical calibration time point The accumulated data after the value is added to the calibration time difference of the adaptive calibration, and the historical total time difference corresponding to each historical calibration time point is obtained.
  • the first determining module 530 may include:
  • the average calibration time point determination sub-module is configured to determine an average calibration time point of all historical calibration time points according to each historical calibration time point;
  • the average school time total difference determination sub-module is configured to determine an average total school time difference of all historical school time points according to a historical total time difference corresponding to each historical time point;
  • a first parameter determining submodule configured to calculate a historical total time difference corresponding to each historical time point, each historical time point, the average time of the school time, and the average total time difference
  • the first parameter is obtained by the first calculation formula, wherein the first calculation formula is:
  • the b is the first parameter
  • the x i is an i-th historical calibration time point
  • the y i is a calibration time difference of the i-th historical calibration time point
  • n is a history The total number of school time points, For the average timing time point, The average time difference of the school hours;
  • a second parameter determining submodule configured to obtain a second parameter according to the average calibrated time point, the average calibrated total time difference, and the first parameter, where the second parameter is obtained, where the second calculating formula is for:
  • the a is the second parameter, the For the average calibrated total difference, the b is the first parameter, For the average timing time point;
  • a current total time difference determination sub-module configured to substitute the first parameter and the second parameter into a linear fitting equation to obtain a current total time difference y of the current time, wherein the linear The equation is:
  • the y is the current total time difference of the current time
  • the b is the first parameter
  • the x is a calibration time point of the current time
  • the a is the second time parameter.
  • the adjusting module 550 may include:
  • a target calibration time determination sub-module configured to add the current time difference to the current time difference, to obtain a target calibration time of the current time
  • the adjustment submodule is configured to adjust the time of the current moment to the target calibration time to complete the adaptive calibration.
  • the network calibration device of the embodiment of the present application is a device applying the network calibration method described above, and all embodiments of the network calibration method are applicable to the device, and all of the same or similar beneficial effects can be achieved.
  • the embodiment of the present application provides a storage medium for storing executable code, where the executable code is used to be executed at runtime:
  • the network calibration method provided; specifically, the network calibration method includes:
  • the historical time data before the current time is obtained, wherein the historical time data includes: a time difference between each historical calibration time and a time difference corresponding to each historical calibration time point. value;
  • the current total school time difference value of the current time is obtained by a preset algorithm
  • the time of the current time is adjusted to complete the adaptive calibration time.
  • the storage medium stores an application that executes the network calibration method provided by the embodiment of the present application at runtime, and thus can realize: correcting the calibration time in the historical calibration data by accumulating historical calibration data. Accumulating to obtain the total time difference of each historical school time, obtain the current time difference by the preset algorithm, and adjust the current time according to the school time difference, which has high real-time performance. The accuracy of the device time is guaranteed, and since only a small amount of historical data needs to be accumulated, that is, only a small number of calibration data packets are transmitted between the calibration device and the server, thereby reducing the amount of redundant data in the network.
  • the embodiment of the present application provides an application program for performing the network calibrating method provided by the embodiment of the present application;
  • the network timing method provided by the embodiment includes:
  • the historical time data before the current time is obtained, wherein the historical time data includes: a time difference between each historical calibration time and a time difference corresponding to each historical calibration time point. value;
  • the current total school time difference value of the current time is obtained by a preset algorithm
  • the time of the current time is adjusted to complete the adaptive calibration time.
  • the application performs the network calibration method provided by the embodiment of the present application at runtime, so that it is possible to accumulate the calibration time difference in the historical calibration data by accumulating the historical calibration data.
  • the total school time difference of the historical school time point is obtained by the preset algorithm, and the current time time is adjusted according to the school time difference, which has high real-time performance and ensures the equipment time.
  • the embodiment of the present application provides a network device, including: a processor, a memory, a communication interface, and a bus;
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor by reading the executable program code stored in the memory, to run a program corresponding to the executable program code, for performing the network calibration method provided by the embodiment of the present application;
  • the network calibration method provided by the embodiment of the present application includes:
  • the historical time data before the current time is obtained, wherein the historical time data includes: a time difference between each historical calibration time and a time difference corresponding to each historical calibration time point. value;
  • the current total school time difference value of the current time is obtained by a preset algorithm
  • the time of the current time is adjusted to complete the adaptive calibration time.
  • the processor of the network device runs a program corresponding to the executable program code by reading executable program code stored in the memory, and the program executes the network calibration provided by the embodiment of the present application at runtime.
  • the time method can be realized by accumulating the historical time data and accumulating the school time difference values in the historical school time data to obtain the total school time difference value of each historical school time point, and obtaining the current time by a preset algorithm.
  • the school time difference is adjusted according to the time difference of the school to the current time, which has high real-time performance, ensures the accuracy of the equipment time, and only needs to accumulate a small amount of historical data, that is, the school time equipment and the server. Only a small number of school time packets are transmitted between them, reducing the amount of redundant data in the network.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Abstract

本申请实施例提供了一种网络校时方法及装置,其中,网络校时方法包括:当接收到自适应校时指令,获得当前时刻之前的历史校时数据;计算得到每次历史校时时间点对应的历史校时总差值;根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;将当前校时总差值与历史校时时间点中最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;根据当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。通过本方案可以在保证设备时间的准确性的基础上,降低网络中的冗余数据量。

Description

一种网络校时方法及装置
本申请要求于2017年03月17日提交中国专利局、申请号为201710161466.3发明名称为“一种网络校时方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络校时技术领域,特别是涉及一种网络校时方法及装置。
背景技术
随着计算机网络技术及视频技术的发展,网络中网络设备的时间同步起着越来越重要的作用。
一般情况下,在网络设备中,例如电脑或者网络摄像机中,设备时间是通过设备中的硬件晶振芯片计算得到的,但是受限于制作工艺、设备成本、硬件设计等因素,硬件晶振芯片在设备中运行会存在一定的误差,该误差对于设备的运行有着重要的影响。例如,针对多网络摄像机的联动系统,多个网络摄像机监控同一区域的不同地点,如果需要同步调用同一时刻的所有网络摄像机的视频,但是这些网络摄像机的拍摄时间存在着较大的误差,则会导致对视频的错误分析。例如,如果两个摄像机的拍摄时间的误差在5秒以上,则获取到的两路视频之间会有5秒以上的延时,两路视频中的内容不是同一时刻对应的视频信息,从而会引起错误的理解和分析;如果这些网络摄像机的拍摄时间的同步性很高,则可以较为轻易地分析视频中某个事件的发生过程。因此,每当设备运行一段时间后需要对设备进行校时,以确保设备当前的时间的准确性和同步性。
相关的校时方式中,通常需要用户配置校时服务器的地址和校时周期,在校时的过程中需要周期性地向网络中的校时服务器发送校时请求,根据校时协议,经过和校时服务器的校时信息交互后重新配置设备时间。
传统的校时协议为NTP(Network Time Protocol,网络校时协议),该协议主要用来测量校时请求数据包在网络上往返传输的延迟和估算设备时钟偏差,按照估算的设备时钟偏差对设备进行校时。具体的流程如图1所示,待校时网络设备101发送校时请求,校时服务器102在接收到校时请求后发送校时 数据至待校时网络设备101,待校时网络设备101在接收到校时数据后完成校时,然后发送校时完成状态至校时服务器102,达到在网络上实现高精度设备校时的目的。
上述的相关技术中,为了保证设备时间的准确性,校时周期的校时间隔通常设置的较短,例如:将校时间隔设置为30秒,每间隔30秒进行一次校时,这样不但能够保证设备时间的准确性,而且保证了设备间的同步性。但是,由于校时间隔比较短,在网络中会引入非常多的短时校时数据包,导致网络中的冗余数据量增加。
发明内容
本申请实施例的目的在于提供一种网络校时方法及装置,以实现在保证设备时间的准确性的基础上,降低网络中的冗余数据量。具体技术方案如下:
第一方面,本申请实施例提供了一种网络校时方法,所述方法包括:
当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
计算得到每次历史校时时间点对应的历史校时总差值;
根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
可选的,所述自适应校时指令为根据用户输入产生的;或,按预设自适应校时周期生成的。
可选的,所述方法还包括:
在接收到第一个自适应校时指令之前,按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、 及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存;
在接收到第一个自适应校时指令之后,将所述预设第一网络校时周期延长至预设时长,并按所述预设时长通过校时服务器进行服务器网络校时,得到该次服务器校时对应的第一校时时间点及所述第一校时时间点对应的校时差值;
若所述历史校时数据的次数小于预设次数,则将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存;
若所述历史校时数据的次数等于所述预设次数,则删除所述历史校时数据中最早一次的历史校时时间点及对应的校时差值,并将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存。
可选的,所述按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器校时的校时时间点对应的校时差值,作为历史校时数据保存,包括:
获得多组校时信息,其中,所述校时信息包括:待校时网络设备向校时服务器发送校时请求时的第一时间T1、所述校时服务器接收到所述校时请求的第二时间T2、所述校时服务器向所述待校时网络设备发送校时数据时的第三时间T3、及所述待校时网络设备接收到所述校时数据的第四时间T4,所述校时数据包括:所述校时服务器对所述校时请求进行分析后得到的校时后时间;
获得每组校时信息中所述第二时间T2或所述第三时间T3对应的服务器网络校时的校时时间点;
根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值;
将每次服务器网络校时的校时时间点及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
可选的,所述根据每组校时信息,确定每次服务器网络校时的校时时间 点对应的校时差值,包括:
计算每组校时信息中所述第二时间T2与所述第一时间T1的第一差值,及每组校时信息中所述第四时间T4与所述第三时间T3的第二差值;
将所述第一差值与所述第二差值作差后除以2,得到每次服务器网络校时的校时时间点对应的校时差值。
可选的,所述计算得到每次历史校时时间点对应的历史校时总差值,包括:
获取并根据自适应校时标志,判断是否已进行过自适应校时;
如果未进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加,得到每次历史校时时间点对应的历史校时总差值;
如果已进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加后的到的数据、与已进行过自适应校时的校时差值相加,得到每次历史校时时间点对应的历史校时总差值。
可选的,所述根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值,包括:
根据每次历史校时时间点,确定所有历史校时时间点的平均校时时间点;
根据每次历史校时时间点对应的历史校时总差值,确定所有历史校时时间点的平均校时总差值;
根据每次历史校时时间点、每次历史校时时间点对应的历史校时总差值、所述平均校时时间点及所述平均校时总差值,通过第一计算公式,得到第一参数,其中,第一计算公式为:
Figure PCTCN2018078699-appb-000001
所述b为所述第一参数,所述x i为第i次历史校时时间点,所述y i为所述第i次历史校时时间点的校时差值,所述n为历史校时时间点的总次数,所述
Figure PCTCN2018078699-appb-000002
为所述平均校时时间点,所述
Figure PCTCN2018078699-appb-000003
为所述平均校时总差值;
根据所述平均校时时间点、所述平均校时总差值及所述第一参数,通过第二计算公式,得到第二参数,其中,第二计算公式为:
Figure PCTCN2018078699-appb-000004
所述a为所述第二参数,所述
Figure PCTCN2018078699-appb-000005
为所述平均校时总差值,所述b为所述第一参数,所述
Figure PCTCN2018078699-appb-000006
为所述平均校时时间点;
将所述第一参数及所述第二参数代入线性拟合方程,得到所述当前时刻的当前校时总差值y,其中,所述线性拟合方程为:
y=bx+a,
其中,所述y为所述当前时刻的当前校时总差值,所述b为所述第一参数,所述x为所述当前时刻的校时时间点,所述a为所述第二参数。
可选的,所述根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时,包括:
将所述当前时刻与所述当前时刻的校时差值相加,得到所述当前时刻的目标校时时间;
调整所述当前时刻的时间至所述目标校时时间,完成本次自适应校时。
第二方面,本申请实施例提供了一种网络校时装置,所述装置包括:
获得模块,用于当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
计算模块,用于计算得到每次历史校时时间点对应的历史校时总差值;
第一确定模块,用于根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
第二确定模块,用于将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
调整模块,用于根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
可选的,所述自适应校时指令为根据用户输入产生的;或,按预设自适应校时周期生成的。
可选的,所述装置还包括:
第一存储模块,用于在接收到第一个自适应校时指令之前,按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存;
第三确定模块,用于在接收到第一个自适应校时指令之后,将所述预设第一网络校时周期延长至预设时长,并按所述预设时长通过校时服务器进行服务器网络校时,得到该次服务器校时对应的第一校时时间点及所述第一校时时间点对应的校时差值;
第二存储模块,用于若所述历史校时数据的次数小于预设次数,则将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存;
第三存储模块,用于若所述历史校时数据的次数等于所述预设次数,则删除所述历史校时数据中最早一次的历史校时时间点及对应的校时差值,并将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存。
可选的,所述第一存储模块,包括:
第一获得子模块,用于获得多组校时信息,其中,所述校时信息包括:待校时网络设备向校时服务器发送校时请求时的第一时间T1、所述校时服务器接收到所述校时请求的第二时间T2、所述校时服务器向所述待校时网络设备发送校时数据时的第三时间T3、及所述待校时网络设备接收到所述校时数 据的第四时间T4,所述校时数据包括:所述校时服务器对所述校时请求进行分析后得到的校时后时间;
第二获得子模块,用于获得每组校时信息中所述第二时间T2或所述第三时间T3对应的服务器网络校时的校时时间点;
第一确定子模块,用于根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值;
存储子模块,用于将每次服务器网络校时的校时时间点及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
可选的,所述第一确定子模块,包括:
计算单元,用于计算每组校时信息中所述第二时间T2与所述第一时间T1的第一差值,及每组校时信息中所述第四时间T4与所述第三时间T3的第二差值;
确定单元,用于将所述第一差值与所述第二差值作差后除以2,得到每次服务器网络校时的校时时间点对应的校时差值。
可选的,所述计算模块,包括:
判断子模块,用于获取并根据自适应校时标志,判断是否已进行过自适应校时;
第二确定子模块,用于如果未进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加,得到每次历史校时时间点对应的历史校时总差值;
第三确定子模块,用于如果已进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加后的到的数据、与已进行过自适应校时的校时差值相加,得到每次历史校时时间点对应的历史校时总差值。
可选的,所述第一确定模块,包括:
平均校时时间点确定子模块,用于根据每次历史校时时间点,确定所有 历史校时时间点的平均校时时间点;
平均校时总差值确定子模块,用于根据每次历史校时时间点对应的历史校时总差值,确定所有历史校时时间点的平均校时总差值;
第一参数确定子模块,用于根据每次历史校时时间点、每次历史校时时间点对应的历史校时总差值、所述平均校时时间点及所述平均校时总差值,通过第一计算公式,得到第一参数,其中,第一计算公式为:
Figure PCTCN2018078699-appb-000007
所述b为所述第一参数,所述x i为第i次历史校时时间点,所述y i为所述第i次历史校时时间点的校时差值,所述n为历史校时时间点的总次数,所述
Figure PCTCN2018078699-appb-000008
为所述平均校时时间点,所述
Figure PCTCN2018078699-appb-000009
为所述平均校时总差值;
第二参数确定子模块,用于根据所述平均校时时间点、所述平均校时总差值及所述第一参数,通过第二计算公式,得到第二参数,其中,第二计算公式为:
Figure PCTCN2018078699-appb-000010
所述a为所述第二参数,所述
Figure PCTCN2018078699-appb-000011
为所述平均校时总差值,所述b为所述第一参数,所述
Figure PCTCN2018078699-appb-000012
为所述平均校时时间点;
当前校时总差值确定子模块,用于将所述第一参数及所述第二参数代入线性拟合方程,得到所述当前时刻的当前校时总差值y,其中,所述线性拟合方程为:
y=bx+a,
其中,所述y为所述当前时刻的当前校时总差值,所述b为所述第一参数,所述x为所述当前时刻的校时时间点,所述a为所述第二参数。
可选的,所述调整模块,包括:
目标校时时间确定子模块,用于将所述当前时刻与所述当前时刻的校时差值相加,得到所述当前时刻的目标校时时间;
调整子模块,用于调整所述当前时刻的时间至所述目标校时时间,完成本次自适应校时。
第三方面,本申请实施例提供了一种存储介质,用于存储可执行代码,所述可执行代码用于在运行时执行:本申请实施例第一方面所提供的网络校时方法。
第四方面,本申请实施例提供了一种应用程序,用于在运行时执行:本申请实施例第一方面所提供的网络校时方法。
第五方面,本申请实施例提供了一种网络设备,包括:处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行:本申请实施例第一方面所提供的网络校时方法。
本申请实施例提供的一种网络校时方法及装置,通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为相关技术的NTP协议的具体流程示意图;
图2为本申请实施例的网络校时方法的流程示意图;
图3为本申请实施例的每次历史校时数据的记录过程示意图;
图4为本申请实施例的线性拟合曲线示意图;
图5为本申请实施例的网络校时装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了在保证设备时间的准确性的基础上,降低网络中的冗余数据量,本申请实施例提供了一种网络校时方法及装置。
下面首先对本申请实施例所提供的一种网络校时方法进行介绍。
本申请实施例所提供的一种网络校时方法的执行主体可以为网络设备,该网络设备中包括用于校时的芯片,例如DSP(Digital Signal Processor,数字信号处理器)、ARM(Advanced Reduced Instruction Set Computer Machines,精简指令集计算机微处理器)或者FPGA(Field-Programmable Gate Array,现场可编程门阵列)等,这里不作限定。其中,实现本申请实施例所提供的一种网络校时方法的方式可以为设置于校时设备中的芯片的软件、硬件电路和逻辑电路中的至少一种。
如图2所示,本申请实施例所提供的一种网络校时方法,可以包括如下步骤:
S201,当接收到自适应校时指令,获得当前时刻之前的历史校时数据。
其中,历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值。历史校时时间点可以为:按照历史校时的先后顺序确定的历史校时的次序,例如第一次历史校时、第二次历史校时、第三次历史校时等,为了保证校时的准确性,一般情况下,需要记录一定次数校时时间点 的校时数据,比如16次或者32次的校时数据。历史校时时间点还可以为:每一次进行历史校时的时刻。历史校时数据可以是周期性记录的,也可以是非周期性记录的,这里不作限定。
本申请实施例的网络校时方法主要分为两个部分,第一部分为历史校时数据的积累,第二部分为自适应校时。该网络校时方法前期需要积累一部分历史校时数据用于统计分析,然后针对做出自适应的校时。
可选的,自适应校时指令可以为根据用户输入产生的,或者,也可以为按预设自适应校时周期生成的。
自适应校时是指采用线性回归技术,对历史校时数据进行统计分析,并计算出未来某一时间的校时数据。需要自适应校时指令启动自适应校时,该自适应校时指令可以是用户自己判断需要进行自适应校时时输入启动指示所产生的,也可以是预先就已经设置好了校时周期,按周期生成的,例如,预先设置积累16次历史校时数据开始自适应校时,则积累的历史校时数据达到16次时,自动生成自适应校时指令。
可选的,该网络校时方法还可以包括:
在接收到第一个自适应校时指令之前,按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
其中,预设第一网络校时周期为预先设置的记录历史校时数据的周期。在接收到第一个自适应校时指令之前,需要积累历史校时数据,本实施例是根据预设周期记录历史校时数据,历史校时数据的积累是通过与校时服务器进行交互得到的,具体的交互过程可以为:待校时设备向网络中的校时服务器发送校时请求,校时服务器在接收到校时请求后,将校时数据发送至待校时设备,待校时设备在接收到校时数据后,根据校时数据重新配置设备时间,并向校时服务器发送校时完成指令。除上述实现待校时设备与校时服务器交互的实施方式以外,能够实现待校时设备与校时服务器交互的其他可实现方式均属于本申请实施例的保护范围,在此不一一列举。
具体的,按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器校时的校时时间点对应的校时差值,作为历史校时数据保存的步骤,可以包括:
第一步,获得多组校时信息。
校时信息为时间信息,即待校时网络设备发送校时请求的时间及校时服务器接收到校时请求并发送校时数据的时间。其中,校时信息具体包括:待校时网络设备向校时服务器发送校时请求时的第一时间T1、校时服务器接收到校时请求的第二时间T2、校时服务器向待校时网络设备发送校时数据时的第三时间T3、及待校时网络设备接收到校时数据的第四时间T4,校时数据包括:校时服务器对校时请求进行分析后得到的校时后时间。
第二步,获得每组校时信息中第二时间T2或第三时间T3对应的服务器网络校时的校时时间点。
为了保证历史校时数据的记录次序,通常将校时服务器接收到校时请求的第二时间T2或者校时服务器发送校时数据的第三时间T3设置为校时时间点,或者将T2或T3对应的校时次序设置为校时时间点。
第三步,根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值。
可选的,根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值的步骤,可以包括:
计算每组校时信息中第二时间T2与第一时间T1的第一差值,及每组校时信息中第四时间T4与第三时间T3的第二差值;
将第一差值与第二差值作差后除以2,得到每次服务器网络校时的校时时间点对应的校时差值。
具体的,可以通过公式(1)计算每次服务器网络校时的校时时间点对应的校时差值。
Figure PCTCN2018078699-appb-000013
其中,θ为每次服务器网络校时的校时时间点对应的校时差值,T2为校时服务器接收到校时请求的第二时间,T1为待校时网络设备向校时服务器发送校时请求时的第一时间,T4为待校时网络设备接收到校时数据的第四时间,T3为校时服务器向待校时网络设备发送校时数据时的第三时间。
第四步,将每次服务器网络校时的校时时间点及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
历史校时数据包括每次服务器网络校时的校时时间点以及对应的校时差值,也就是将第几次校时时的校时差值,作为历史校时数据保存。
可选的,本申请实施例的网络校时方法,还可以包括:
在接收到第一个自适应校时指令之后,将预设第一网络校时周期延长至预设时长,并按预设时长通过校时服务器进行服务器网络校时,得到该次服务器校时对应的第一校时时间点及第一校时时间点对应的校时差值;
若历史校时数据的次数小于预设次数,则将第一校时时间点及第一校时时间点对应的校时差值作为历史校时数据保存;
若历史校时数据的次数等于所述预设次数,则删除历史校时数据中最早一次的历史校时时间点及对应的校时差值,并将第一校时时间点及第一校时时间点对应的校时差值作为历史校时数据保存。
在积累历史校时数据的基础上对待校时网络设备进行自适应校时,这样可以延长待校时网络设备与校时服务器之间的校时周期,也就是在之后的服务器网络校时时,所产生的数据量小于相关的校时方法产生的数据量,从而减小网络冗余。
作为历史校时数据的次数一般设定为预设次数,如果是用户输入的自适应校时指令启动自适应校时,则记录的历史校时数据有可能达到不了预设次数。如果记录的历史校时数据没有达到预设次数,则可以将新记录的服务器网络校时数据作为历史校时数据保存;如果记录的历史校时数据已经达到预设次数,则需要删除原历史校时数据中最早一次的历史校时数据,然后将新记录的服务器网络校时数据作为历史校时数据保存。
S202,计算得到每次历史校时时间点对应的历史校时总差值。
每次历史校时时间点都对应有该历史校时时间点的校时差值,为了后续通过自适应计算未来某个时刻的校时差值,需要先计算得到每次历史校时时间点对应的历史校时总差值。
可选的,计算得到每次历史校时时间点对应的历史校时总差值的步骤,可以包括:
获取并根据自适应校时标志,判断是否已进行过自适应校时;
如果未进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加,得到每次历史校时时间点对应的历史校时总差值;
如果已进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加后的到的数据、与已进行过自适应校时的校时差值相加,得到每次历史校时时间点对应的历史校时总差值。
自适应校时影响着校时时间点的历史校时总差值,因此在计算校时总差值时,需要判断是否已进行过自适应校时,如果没有进行过自适应校时,则根据公式(2)计算每次历史校时时间点对应的历史校时总差值;如果已进行过自适应校时,则根据公式(3)计算每次历史校时时间点对应的历史校时总差值。
Figure PCTCN2018078699-appb-000014
其中,T n为第n次历史校时时间点对应的历史校时总差值,t i为第i次历史校时时间点的校时差值,
Figure PCTCN2018078699-appb-000015
为第n次历史校时时间点之前的所有历史校时时间点的校时差值的总和。
Figure PCTCN2018078699-appb-000016
其中,T n为第n次历史校时时间点对应的历史校时总差值,t i为第i次历史校时时间点的校时差值,
Figure PCTCN2018078699-appb-000017
为第n次历史校时时间点之前的所有历史校时时间点的校时差值的总和,t′为已进行过自适应校时的校时差值。
S203,根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值。
本实施例采用线性回归技术对历史校时数据进行统计分析,计算当前时刻的校时数据。由于计算当前时刻的校时差值时,需要根据当前时刻的当前校时总差值T m与上一时刻的历史校时总差值T m-1作差得到,即当前时刻的校时差值t m=T m-T m-1,将该计算的结果在待校时网络设备中校时即可。因此,在进行待校时网络设备的重新配置之前,需要得到当前时刻的当前校时总差值。
本实施例中统计分析历史校时数据的方法为线性拟合的方法,最常用的线性拟合的方法为最小二乘法,当然,其它线性拟合的方法也属于本申请实施例的保护范围。
可选的,以最小二乘法为例,根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值的步骤,可以包括:
第一步,根据每次历史校时时间点,确定所有历史校时时间点的平均校时时间点。
假设总共有n次历史校时时间点,平均校时时间点可以为所有历史校时的次序的平均值,则平均校时时间点为
Figure PCTCN2018078699-appb-000018
其中,
Figure PCTCN2018078699-appb-000019
为所有历史校时时间点的平均校时时间点,
Figure PCTCN2018078699-appb-000020
为所有历史校时时间点的总和,i为第i次历史校时时 间点。
第二步,根据每次历史校时时间点对应的历史校时总差值,确定所有历史校时时间点的平均校时总差值。
假设总共有n次历史校时时间点,则平均校时总差值为
Figure PCTCN2018078699-appb-000021
其中,
Figure PCTCN2018078699-appb-000022
为所有历史校时时间点的平均校时总差值,
Figure PCTCN2018078699-appb-000023
为所有历史校时时间点的历史校时总差值的总和,i为第i次历史校时时间点。
第三步,根据每次历史校时时间点、每次历史校时时间点对应的历史校时总差值、平均校时时间点及平均校时总差值,通过公式(4),得到第一参数。
其中,公式(4)为:
Figure PCTCN2018078699-appb-000024
b为第一参数,x i为第i次历史校时时间点,y i为第i次历史校时时间点的校时差值,n为历史校时时间点的总次数,
Figure PCTCN2018078699-appb-000025
为平均校时时间点,
Figure PCTCN2018078699-appb-000026
为平均校时总差值。
第四步,根据平均校时时间点、平均校时总差值及第一参数,通过公式(5),得到第二参数。
其中,公式(5)为:
Figure PCTCN2018078699-appb-000027
a为第二参数,
Figure PCTCN2018078699-appb-000028
为平均校时总差值,b为第一参数,
Figure PCTCN2018078699-appb-000029
为所述平均校时时间点。
第五步,将第一参数及第二参数代入公式(6),根据当前时刻的校时时间点,通过公式(6),得到当前时刻的当前校时总差值。
具体的,公式(6)为线性拟合方程,具体为:
y=bx+a    (6)
其中,y为当前时刻的当前校时总差值,b为第一参数,x为当前时刻的校时时间点,a为第二参数。
S204,将当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值。
本实施例采用线性回归技术对历史校时数据进行统计分析,计算为当前时刻的校时数据。由于计算当前时刻的校时差值时,需要根据当前时刻的当前校时总差值T m与上一时刻的历史校时总差值T m-1作差得到,即当前时刻的校时差值t m=T m-T m-1,将该计算的结果在待校时网络设备中校时即可。
S205,根据当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
当前时刻的校时差值,也就是当前时刻,待校时网络设备与校时服务器之间的时间差值,该时间差值可能为正也可能为负,在时间差值为正时,调整当前时刻的时间就是在当前时刻待校时网络设备的时间的基础上加上该校时差值,在时间差值为负时,调整当前时刻的时间就是在当前时刻待校时网络设备的时间的基础上减去该校时差值的绝对值。
可选的,所述根据当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时的步骤,可以包括:
将当前时刻与当前时刻的校时差值相加,得到当前时刻的目标校时时间;
调整当前时刻的时间至所述目标校时时间,完成本次自适应校时。
不论当前时刻的校时差值为正还是为负,当前时刻的目标校时时间均为当前时刻的时间与当前时刻的校时差值相加,校时差值的符号为正时加的是正数,校时差值的符号为负时加的是负数。调整当前时刻的时间,就是将待 校时网络设备当前时刻的时间调整为目标校时时间,这里不再赘述。
本申请实施例所提供的网络校时方法的执行主体还可以为校时服务器中的芯片,或者是独立于校时设备和校时服务器的校时控制器,校时服务器中的芯片或者校时控制器也可以在一定程度上减少网络中的冗余数据量。
应用本实施例,通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。并且,在积累历史校时数据的基础上对待校时网络设备进行自适应校时,这样可以延长待校时网络设备与校时服务器之间的校时周期,也就是在下一次服务器网络校时时,可以缩短校时频率,从而减小网络冗余;对于网络中包含有多个待校时网络设备的情况,减小网络中多个待校时网络设备之间的时间差距,提升所有待校时网络设备时间的准确性和同步性。
下面结合具体的应用实例,对本申请实施例所提供的网络校时方法进行介绍。
如图3所示为本申请实施例的每次历史校时数据的记录过程,待校时网络设备101发送校时请求至校时服务器102,记录发送校时请求的时间T1,校时服务器102接收该校时请求,记录接收到校时请求的时间T2,校时服务器102对校时请求进行分析,发送校时校时数据至待校时网络设备101,记录发送校时数据的时间T3,待校时网络设备101接收该校时数据,记录接收到校时数据的时间T4,由于待校时网络设备101与校时服务器之间的时间数据满足公式(7),即
Figure PCTCN2018078699-appb-000030
其中,T2为校时服务器102接收到待校时网络设备101发送的校时请求的 时间,T1为待校时网络设备101发送校时请求的时间,θ为待校时网络设备101相对于校时服务器102在T1时间的校时差值,δ1为校时请求在网络中传播所消耗的时间,T4为校时服务器102发送校时数据的时间,T3为待校时网络设备101接收到校时服务器102发送的校时数据的时间,δ2为校时数据在网络中传播所消耗的时间,δ为待校时网络设备101与校时服务器102之间的往返传输延迟。校时数据中包含有待校时网络设备101相对于校时服务器102在T1时间的校时差值。
假设校时请求和校时数据在网络中传播的时间相同,即δ1=δ2,则解得:
Figure PCTCN2018078699-appb-000031
可以看出,待校时网络设备101相对于校时服务器102在T1时间的校时差值θ及待校时网络设备101与校时服务器102之间的往返传输延迟δ只与校时服务器102接收到待校时网络设备101发送的校时请求的时间T2、和待校时网络设备101发送校时请求的时间T1的差值、以及校时服务器102发送校时数据的时间T4、和待校时网络设备101接收到校时服务器102发送的校时数据的时间T3的差值相关。
假设,记录的历史校时数据为:总共记录了32次历史校时时间点的校时数据,每次历史校时时间点的校时差值均为2.1秒,设定历史校时时间为按照历史校时的先后顺序确定的历史校时的次序,历史校时时间点的平均校时时间点为所有历史校时的次序的平均值,则所有历史校时时间点的平均校时时间点为:
Figure PCTCN2018078699-appb-000032
所有历史校时时间点的平均校时总差值为:
Figure PCTCN2018078699-appb-000033
则通过计算可以得到,第一参数b=2.1,第二参数a=0,则可以得到线性拟合方程为:y=2.1x,得到线性拟合曲线如图4所示。图4所 示曲线的横坐标为历史校时时间点的次序、纵坐标为每次历史校时时间点对应的历史校时总差值。
则通过自适应校时计算当前时刻的当前校时总差值为:y=2.1×11=23.1秒,当前时刻的校时差值即为:23.1-21=2.1秒,因此,当前时刻待校时网络设备的目标时间为当前时刻的时间加上2.1秒。
与相关技术相比,本方案通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。
相应于上述实施例,本申请实施例提供了一种网络校时装置,如图5所示,网络校时装置可以包括:
获得模块510,用于当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
计算模块520,用于计算得到每次历史校时时间点对应的历史校时总差值;
第一确定模块530,用于根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
第二确定模块540,用于将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
调整模块550,用于根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
应用本实施例,通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时 刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。
可选的,所述自适应校时指令可以为根据用户输入产生的;或,按预设自适应校时周期生成的。
可选的,所述装置还可以包括:
第一存储模块,用于在接收到第一个自适应校时指令之前,按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存;
第三确定模块,用于在接收到第一个自适应校时指令之后,将所述预设第一网络校时周期延长至预设时长,并按所述预设时长通过校时服务器进行服务器网络校时,得到该次服务器校时对应的第一校时时间点及所述第一校时时间点对应的校时差值;
第二存储模块,用于若所述历史校时数据的次数小于预设次数,则将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存;
第三存储模块,用于若所述历史校时数据的次数等于所述预设次数,则删除所述历史校时数据中最早一次的历史校时时间点及对应的校时差值,并将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存。
可选的,所述第一存储模块,可以包括:
第一获得子模块,用于获得多组校时信息,其中,所述校时信息包括:待校时网络设备向校时服务器发送校时请求时的第一时间T1、所述校时服务器接收到所述校时请求的第二时间T2、所述校时服务器向所述待校时网络设 备发送校时数据时的第三时间T3、及所述待校时网络设备接收到所述校时数据的第四时间T4,所述校时数据包括:所述校时服务器对所述校时请求进行分析后得到的校时后时间;
第二获得子模块,用于获得每组校时信息中所述第二时间T2或所述第三时间T3对应的服务器网络校时的校时时间点;
第一确定子模块,用于根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值;
存储子模块,用于将每次服务器网络校时的校时时间点及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
可选的,所述第一确定子模块,可以包括:
计算单元,用于计算每组校时信息中所述第二时间T2与所述第一时间T1的第一差值,及每组校时信息中所述第四时间T4与所述第三时间T3的第二差值;
确定单元,用于将所述第一差值与所述第二差值作差后除以2,得到每次服务器网络校时的校时时间点对应的校时差值。
可选的,所述计算模块520,可以包括:
判断子模块,用于获得并根据自适应校时标志,判断是否已进行过自适应校时;
第二确定子模块,用于如果未进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加,得到每次历史校时时间点对应的历史校时总差值;
第三确定子模块,用于如果已进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加后的到的数据、与已进行过自适应校时的校时差值相加,得到每次历史校时时间点对应的历史校时总差值。
可选的,所述第一确定模块530,可以包括:
平均校时时间点确定子模块,用于根据每次历史校时时间点,确定所有历史校时时间点的平均校时时间点;
平均校时总差值确定子模块,用于根据每次历史校时时间点对应的历史校时总差值,确定所有历史校时时间点的平均校时总差值;
第一参数确定子模块,用于根据每次历史校时时间点、每次历史校时时间点对应的历史校时总差值、所述平均校时时间点及所述平均校时总差值,通过第一计算公式,得到第一参数,其中,第一计算公式为:
Figure PCTCN2018078699-appb-000034
所述b为所述第一参数,所述x i为第i次历史校时时间点,所述y i为所述第i次历史校时时间点的校时差值,所述n为历史校时时间点的总次数,所述
Figure PCTCN2018078699-appb-000035
为所述平均校时时间点,所述
Figure PCTCN2018078699-appb-000036
为所述平均校时总差值;
第二参数确定子模块,用于根据所述平均校时时间点、所述平均校时总差值及所述第一参数,通过第二计算公式,得到第二参数,其中,第二计算公式为:
Figure PCTCN2018078699-appb-000037
所述a为所述第二参数,所述
Figure PCTCN2018078699-appb-000038
为所述平均校时总差值,所述b为所述第一参数,所述
Figure PCTCN2018078699-appb-000039
为所述平均校时时间点;
当前校时总差值确定子模块,用于将所述第一参数及所述第二参数代入线性拟合方程,得到所述当前时刻的当前校时总差值y,其中,所述线性拟合方程为:
y=bx+a,
其中,所述y为所述当前时刻的当前校时总差值,所述b为所述第一参数,所述x为所述当前时刻的校时时间点,所述a为所述第二参数。
可选的,所述调整模块550,可以包括:
目标校时时间确定子模块,用于将所述当前时刻与所述当前时刻的校时差值相加,得到所述当前时刻的目标校时时间;
调整子模块,用于调整所述当前时刻的时间至所述目标校时时间,完成本次自适应校时。
本申请实施例的网络校时装置为应用上述网络校时方法的装置,则上述网络校时方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。
另外,相应于上述实施例所提供的网络校时方法,本申请实施例提供了一种存储介质,用于存储可执行代码,所述可执行代码用于在运行时执行:本申请实施例所提供的网络校时方法;具体的,所述网络校时方法,包括:
当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
计算得到每次历史校时时间点对应的历史校时总差值;
根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
本实施例中,存储介质存储有在运行时执行本申请实施例所提供的网络校时方法的应用程序,因此能够实现:通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少 量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。
另外,相应于上述实施例所提供的网络校时方法,本申请实施例提供了一种应用程序,用于在运行时执行:本申请实施例所提供的网络校时方法;具体的,本申请实施例所提供的网络校时方法,包括:
当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
计算得到每次历史校时时间点对应的历史校时总差值;
根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
本实施例中,应用程序在运行时执行本申请实施例所提供的网络校时方法,因此能够实现:通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。
另外,相应于上述实施例提供的网络校时方法,本申请实施例提供了一种网络设备,包括:处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行:本申请实施例所提供的网络校时方法;具体的,本申请实施例所提供的网络校时方法,包括:
当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
计算得到每次历史校时时间点对应的历史校时总差值;
根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
本实施例中,该网络设备的处理器通过读取存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,该程序在运行时执行本申请实施例所提供的网络校时方法,因此能够实现:通过积累历史校时数据,对历史校时数据中的校时差值进行累加得到每个历史校时时间点的校时总差值,通过预设算法得到当前时刻的校时差值,根据该校时差值对当前时刻的时间进行调整,具有较高的实时性,保证了设备时间的准确性,并且由于只需要积累少量的历史数据,即校时设备与服务器之间只传输较少的校时数据包,从而降低了网络中的冗余数据量。
对于网络设备、应用程序以及存储介质实施例而言,由于其所涉及的方法内容基本相似于前述的方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示 这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (19)

  1. 一种网络校时方法,其特征在于,所述方法包括:
    当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
    计算得到每次历史校时时间点对应的历史校时总差值;
    根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
    将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
    根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
  2. 根据权利要求1所述的方法,其特征在于,所述自适应校时指令为根据用户输入产生的;或,按预设自适应校时周期生成的。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在接收到第一个自适应校时指令之前,按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存;
    在接收到第一个自适应校时指令之后,将所述预设第一网络校时周期延长至预设时长,并按所述预设时长通过校时服务器进行服务器网络校时,得到该次服务器校时对应的第一校时时间点及所述第一校时时间点对应的校时差值;
    若所述历史校时数据的次数小于预设次数,则将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存;
    若所述历史校时数据的次数等于所述预设次数,则删除所述历史校时数据中最早一次的历史校时时间点及对应的校时差值,并将所述第一校时时间 点及所述第一校时时间点对应的校时差值作为历史校时数据保存。
  4. 根据权利要求3所述的方法,其特征在于,所述按预设第一网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器校时的校时时间点对应的校时差值,作为历史校时数据保存,包括:
    获得多组校时信息,其中,所述校时信息包括:待校时网络设备向校时服务器发送校时请求时的第一时间T1、所述校时服务器接收到所述校时请求的第二时间T2、所述校时服务器向所述待校时网络设备发送校时数据时的第三时间T3、及所述待校时网络设备接收到所述校时数据的第四时间T4,所述校时数据包括:所述校时服务器对所述校时请求进行分析后得到的校时后时间;
    获得每组校时信息中所述第二时间T2或所述第三时间T3对应的服务器网络校时的校时时间点;
    根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值;
    将每次服务器网络校时的校时时间点及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
  5. 根据权利要求4所述的方法,其特征在于,所述根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值,包括:
    计算每组校时信息中所述第二时间T2与所述第一时间T1的第一差值,及每组校时信息中所述第四时间T4与所述第三时间T3的第二差值;
    将所述第一差值与所述第二差值作差后除以2,得到每次服务器网络校时的校时时间点对应的校时差值。
  6. 根据权利要求1所述的方法,其特征在于,所述计算得到每次历史校时时间点对应的历史校时总差值,包括:
    获取并根据自适应校时标志,判断是否已进行过自适应校时;
    如果未进行过自适应校时,则将每次历史校时时间点的校时差值与该历 史校时时间点之前的所有历史校时时间点的校时差值进行累加,得到每次历史校时时间点对应的历史校时总差值;
    如果已进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加后的到的数据、与已进行过自适应校时的校时差值相加,得到每次历史校时时间点对应的历史校时总差值。
  7. 根据权利要求1所述的方法,其特征在于,所述根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值,包括:
    根据每次历史校时时间点,确定所有历史校时时间点的平均校时时间点;
    根据每次历史校时时间点对应的历史校时总差值,确定所有历史校时时间点的平均校时总差值;
    根据每次历史校时时间点、每次历史校时时间点对应的历史校时总差值、所述平均校时时间点及所述平均校时总差值,通过第一计算公式,得到第一参数,其中,第一计算公式为:
    Figure PCTCN2018078699-appb-100001
    所述b为所述第一参数,所述x i为第i次历史校时时间点,所述y i为所述第i次历史校时时间点的校时差值,所述n为历史校时时间点的总次数,所述
    Figure PCTCN2018078699-appb-100002
    为所述平均校时时间点,所述
    Figure PCTCN2018078699-appb-100003
    为所述平均校时总差值;
    根据所述平均校时时间点、所述平均校时总差值及所述第一参数,通过第二计算公式,得到第二参数,其中,第二计算公式为:
    Figure PCTCN2018078699-appb-100004
    所述a为所述第二参数,所述
    Figure PCTCN2018078699-appb-100005
    为所述平均校时总差值,所述b为所述第一参数,所述
    Figure PCTCN2018078699-appb-100006
    为所述平均校时时间点;
    将所述第一参数及所述第二参数代入线性拟合方程,得到所述当前时刻的当前校时总差值y,其中,所述线性拟合方程为:
    y=bx+a,
    其中,所述y为所述当前时刻的当前校时总差值,所述b为所述第一参数,所述x为所述当前时刻的校时时间点,所述a为所述第二参数。
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时,包括:
    将所述当前时刻与所述当前时刻的校时差值相加,得到所述当前时刻的目标校时时间;
    调整所述当前时刻的时间至所述目标校时时间,完成本次自适应校时。
  9. 一种网络校时装置,其特征在于,所述装置包括:
    获得模块,用于当接收到自适应校时指令,获得当前时刻之前的历史校时数据,其中,所述历史校时数据包括:每次历史校时时间点、及每次历史校时时间点对应的校时差值;
    计算模块,用于计算得到每次历史校时时间点对应的历史校时总差值;
    第一确定模块,用于根据每次历史校时时间点对应的历史校时总差值,通过预设算法得到当前时刻的当前校时总差值;
    第二确定模块,用于将所述当前校时总差值与最近一次历史校时时间点的历史校时总差值之间的差值,确定为当前时刻的校时差值;
    调整模块,用于根据所述当前时刻的校时差值,调整当前时刻的时间,完成本次自适应校时。
  10. 根据权利要求9所述的装置,其特征在于,所述自适应校时指令为根据用户输入产生的;或,按预设自适应校时周期生成的。
  11. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    第一存储模块,用于在接收到第一个自适应校时指令之前,按预设第一 网络校时周期,通过校时服务器进行服务器网络校时,并将每次服务器网络校时的校时时间点、及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存;
    第三确定模块,用于在接收到第一个自适应校时指令之后,将所述预设第一网络校时周期延长至预设时长,并按所述预设时长通过校时服务器进行服务器网络校时,得到该次服务器校时对应的第一校时时间点及所述第一校时时间点对应的校时差值;
    第二存储模块,用于若所述历史校时数据的次数小于预设次数,则将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存;
    第三存储模块,用于若所述历史校时数据的次数等于所述预设次数,则删除所述历史校时数据中最早一次的历史校时时间点及对应的校时差值,并将所述第一校时时间点及所述第一校时时间点对应的校时差值作为历史校时数据保存。
  12. 根据权利要求11所述的装置,其特征在于,所述第一存储模块,包括:
    第一获得子模块,用于获得多组校时信息,其中,所述校时信息包括:待校时网络设备向校时服务器发送校时请求时的第一时间T1、所述校时服务器接收到所述校时请求的第二时间T2、所述校时服务器向所述待校时网络设备发送校时数据时的第三时间T3、及所述待校时网络设备接收到所述校时数据的第四时间T4,所述校时数据包括:所述校时服务器对所述校时请求进行分析后得到的校时后时间;
    第二获得子模块,用于获得每组校时信息中所述第二时间T2或所述第三时间T3对应的服务器网络校时的校时时间点;
    第一确定子模块,用于根据每组校时信息,确定每次服务器网络校时的校时时间点对应的校时差值;
    存储子模块,用于将每次服务器网络校时的校时时间点及每次服务器网络校时的校时时间点对应的校时差值,作为历史校时数据保存。
  13. 根据权利要求12所述的装置,其特征在于,所述第一确定子模块,包括:
    计算单元,用于计算每组校时信息中所述第二时间T2与所述第一时间T1的第一差值,及每组校时信息中所述第四时间T4与所述第三时间T3的第二差值;
    确定单元,用于将所述第一差值与所述第二差值作差后除以2,得到每次服务器网络校时的校时时间点对应的校时差值。
  14. 根据权利要求9所述的装置,其特征在于,所述计算模块,包括:
    判断子模块,用于获取并根据自适应校时标志,判断是否已进行过自适应校时;
    第二确定子模块,用于如果未进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加,得到每次历史校时时间点对应的历史校时总差值;
    第三确定子模块,用于如果已进行过自适应校时,则将每次历史校时时间点的校时差值与该历史校时时间点之前的所有历史校时时间点的校时差值进行累加后的到的数据、与已进行过自适应校时的校时差值相加,得到每次历史校时时间点对应的历史校时总差值。
  15. 根据权利要求9所述的装置,其特征在于,所述第一确定模块,包括:
    平均校时时间点确定子模块,用于根据每次历史校时时间点,确定所有历史校时时间点的平均校时时间点;
    平均校时总差值确定子模块,用于根据每次历史校时时间点对应的历史校时总差值,确定所有历史校时时间点的平均校时总差值;
    第一参数确定子模块,用于根据每次历史校时时间点、每次历史校时时间点对应的历史校时总差值、所述平均校时时间点及所述平均校时总差值,通过第一计算公式,得到第一参数,其中,第一计算公式为:
    Figure PCTCN2018078699-appb-100007
    所述b为所述第一参数,所述x i为第i次历史校时时间点,所述y i为所述第i次历史校时时间点的校时差值,所述n为历史校时时间点的总次数,所述
    Figure PCTCN2018078699-appb-100008
    为所述平均校时时间点,所述
    Figure PCTCN2018078699-appb-100009
    为所述平均校时总差值;
    第二参数确定子模块,用于根据所述平均校时时间点、所述平均校时总差值及所述第一参数,通过第二计算公式,得到第二参数,其中,第二计算公式为:
    Figure PCTCN2018078699-appb-100010
    所述a为所述第二参数,所述
    Figure PCTCN2018078699-appb-100011
    为所述平均校时总差值,所述b为所述第一参数,所述
    Figure PCTCN2018078699-appb-100012
    为所述平均校时时间点;
    当前校时总差值确定子模块,用于将所述第一参数及所述第二参数代入线性拟合方程,得到所述当前时刻的当前校时总差值y,其中,所述线性拟合方程为:
    y=bx+a,
    其中,所述y为所述当前时刻的当前校时总差值,所述b为所述第一参数,所述x为所述当前时刻的校时时间点,所述a为所述第二参数。
  16. 根据权利要求9所述的装置,其特征在于,所述调整模块,包括:
    目标校时时间确定子模块,用于将所述当前时刻与所述当前时刻的校时差值相加,得到所述当前时刻的目标校时时间;
    调整子模块,用于调整所述当前时刻的时间至所述目标校时时间,完成本次自适应校时。
  17. 一种存储介质,其特征在于,用于存储可执行代码,所述可执行代码用于在运行时执行:权利要求1-8任一项所述的网络校时方法。
  18. 一种应用程序,其特征在于,用于在运行时执行:权利要求1-8任一项所述的网络校时方法。
  19. 一种网络设备,其特征在于,包括:处理器、存储器、通信接口和总线;
    所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
    所述存储器存储可执行程序代码;
    所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行:权利要求1-8任一项所述的网络校时方法。
PCT/CN2018/078699 2017-03-17 2018-03-12 一种网络校时方法及装置 WO2018166418A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/494,906 US10708033B2 (en) 2017-03-17 2018-03-12 Network time correction method and apparatus
EP18766773.8A EP3598247B1 (en) 2017-03-17 2018-03-12 Network time correction method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710161466.3A CN108631897B (zh) 2017-03-17 2017-03-17 一种网络校时方法及装置
CN201710161466.3 2017-03-17

Publications (1)

Publication Number Publication Date
WO2018166418A1 true WO2018166418A1 (zh) 2018-09-20

Family

ID=63523740

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/078699 WO2018166418A1 (zh) 2017-03-17 2018-03-12 一种网络校时方法及装置

Country Status (4)

Country Link
US (1) US10708033B2 (zh)
EP (1) EP3598247B1 (zh)
CN (1) CN108631897B (zh)
WO (1) WO2018166418A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381486B (zh) * 2018-12-28 2022-02-08 北京金风科创风电设备有限公司 控制器校时方法、装置、控制器及风力发电机组
CN111865462B (zh) * 2020-05-26 2023-04-07 石化盈科信息技术有限责任公司 基于物联网的时间同步方法、装置、计算机和存储介质
CN111865465B (zh) * 2020-07-03 2022-09-02 火星人厨具股份有限公司 一种物联网设备精准校时方法
CN112068414B (zh) * 2020-07-31 2022-08-05 深圳市优必选科技股份有限公司 多系统校时方法、装置、设备及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2300255A1 (en) * 1999-08-09 2001-02-09 Power Measurement Ltd. Power system time synchronization device and method for sequence of event recording
CN101022639A (zh) * 2007-03-15 2007-08-22 中兴通讯股份有限公司 一种提高移动终端测量能力的方法
CN106154814A (zh) * 2016-07-20 2016-11-23 中国计量科学研究院 时间信号产生系统、校准控制装置及校准控制方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005002100A1 (en) 2003-06-30 2005-01-06 Koninklijke Philips Electronics N.V. High accuracy network clock synchronization
CN101729180A (zh) * 2008-10-21 2010-06-09 华为技术有限公司 精准时钟同步方法及系统、精准时钟频率/时间同步装置
CN102104475B (zh) * 2011-01-31 2013-07-03 上海交通大学 基于ieee1588的同步系统及其同步方法
CN102231907B (zh) * 2011-06-27 2017-03-22 中兴通讯股份有限公司 传输系统中的时钟同步方法和装置
WO2013078100A1 (en) * 2011-11-23 2013-05-30 Vitesse Semiconductor Corporation Packet-based timing measurement
JP5840467B2 (ja) * 2011-11-24 2016-01-06 株式会社メガチップス 通信システムおよび通信装置
JP6079879B2 (ja) * 2013-06-12 2017-02-15 富士電機株式会社 配信装置、配信システム及び配信方法
IN2015CH03249A (zh) * 2015-06-27 2015-07-10 Wipro Ltd
US20180203516A1 (en) * 2015-07-14 2018-07-19 Hitachi Systems, Ltd. Sense shared system, operation device, and sense shared method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2300255A1 (en) * 1999-08-09 2001-02-09 Power Measurement Ltd. Power system time synchronization device and method for sequence of event recording
CN101022639A (zh) * 2007-03-15 2007-08-22 中兴通讯股份有限公司 一种提高移动终端测量能力的方法
CN106154814A (zh) * 2016-07-20 2016-11-23 中国计量科学研究院 时间信号产生系统、校准控制装置及校准控制方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3598247A4

Also Published As

Publication number Publication date
EP3598247B1 (en) 2022-05-04
CN108631897A (zh) 2018-10-09
EP3598247A1 (en) 2020-01-22
US20200036505A1 (en) 2020-01-30
EP3598247A4 (en) 2020-03-04
US10708033B2 (en) 2020-07-07
CN108631897B (zh) 2019-10-22

Similar Documents

Publication Publication Date Title
WO2018166418A1 (zh) 一种网络校时方法及装置
US8370675B2 (en) Precise clock synchronization
US20080294769A1 (en) Efficient synchronization of agents starting a task where the agents poll a server to learn the task start time
WO2021136149A1 (zh) 时钟同步方法、装置、计算机设备和存储介质
US20220248353A1 (en) Synchronization method and device
WO2020168933A1 (zh) 一种网络请求的处理方法、装置、终端及存储介质
WO2022205734A1 (zh) 图像时间同步方法、装置、电子设备及存储介质
WO2019057193A1 (zh) 数据删除方法及分布式存储系统
TWI632461B (zh) 獲取時間戳記的方法以及使用該方法的電腦裝置
US20210223816A1 (en) Clock skew correction method, device and system
WO2022077224A1 (zh) 时钟同步方法和装置、芯片系统、无人机和终端
US10671113B2 (en) Technologies for synchronized sampling of counters based on a global clock
US20160344537A1 (en) Communication apparatus, communication method, and computer readable medium
WO2020119821A1 (zh) 延时抖动补偿方法、装置及计算机存储介质
US20230236624A1 (en) Clock error-bound tracker
US20220393888A1 (en) Method for distributed and secure timekeeping
WO2019169727A1 (zh) 网络流量测试方法、装置、设备以及计算机可读存储介质
JP4080397B2 (ja) 並列計算機
US8825441B2 (en) Information processing apparatus and time measurement method
KR101674324B1 (ko) 실시간 제어 응용에 적용되는 태스크 스케쥴링 장치 및 방법
US11509411B2 (en) Method and system for correcting clock skew using precision time protocol
US11263112B2 (en) Method and apparatus for evaluating quality of software running environment of device
US8379643B2 (en) Method for controlling transmission speed of multi-cast packets
US9258819B2 (en) Femtocell and method of adjusting frequency
KR20050075486A (ko) Snmp를 이용한 망관리 응용에 있어서 시간값 보정방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18766773

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2018766773

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2018766773

Country of ref document: EP

Effective date: 20191017