CN108574547B - Time calibration method and device - Google Patents

Time calibration method and device Download PDF

Info

Publication number
CN108574547B
CN108574547B CN201710147218.3A CN201710147218A CN108574547B CN 108574547 B CN108574547 B CN 108574547B CN 201710147218 A CN201710147218 A CN 201710147218A CN 108574547 B CN108574547 B CN 108574547B
Authority
CN
China
Prior art keywords
time
side data
data
difference
terminal
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710147218.3A
Other languages
Chinese (zh)
Other versions
CN108574547A (en
Inventor
黄艳华
高东辉
种璟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710147218.3A priority Critical patent/CN108574547B/en
Publication of CN108574547A publication Critical patent/CN108574547A/en
Application granted granted Critical
Publication of CN108574547B publication Critical patent/CN108574547B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/004Synchronisation arrangements compensating for timing error of reception due to propagation delay

Abstract

The invention discloses a time calibration method and a device, wherein the method comprises the following steps: acquiring time values of N pieces of terminal side data and M pieces of network side data generated by communication between a terminal and a network side; n and M are integers; calculating to obtain a time error coefficient corresponding to the communication between the terminal equipment and the network side based on the time values of the N pieces of terminal side data and the time values of the M pieces of network side data; and calibrating the time values of N pieces of terminal side data generated by the communication between the terminal equipment and the network side or calibrating the time values of M pieces of network side data generated by the communication between the terminal equipment and the network side based on the time error coefficients.

Description

Time calibration method and device
Technical Field
The present invention relates to information synchronization technologies in the field of communications, and in particular, to a time calibration method and apparatus.
Background
In the process of the correlation analysis of the multi-interface data of the communication network signaling and the service flow, the data of the terminal, the air interface and the network side are respectively collected by different devices, so that the time of the multi-interface data is asynchronous, the logic of the signaling/service flow is out of order, and the correlation analysis cannot be performed. The existing time synchronization technology generally comprises GPS synchronization based on satellite data and NTP synchronization based on network protocol, and the synchronization is carried out by timestamp of multi-source data according to the front and back relation of business logic.
Disclosure of Invention
The invention discloses a time calibration method and a time calibration device, and aims to solve some problems in the prior art.
For example, the time synchronization means such as GPS/NTP have the problem of synchronization failure due to insufficient clock accuracy of various data acquisition devices, such as:
due to the existence of various data sources with different hardware such as mobile phones, the relative time of the data timestamp is different from the actual elapsed time. If the actual time of the two pieces of signaling data is 1000 seconds, if the deviation between the crystal oscillator of the mobile phone clock and the standard clock is one hundred thousandth, the difference of the time stamps is 1000 × 0.00001 — 0.01 seconds — 10 milliseconds. An error of this magnitude is sufficient for signaling with a signaling interval of only millisecond magnitude to cause a problem that the traffic flow logic cannot recover.
The invention provides a time calibration method, which comprises the following steps:
acquiring time values of N pieces of terminal side data and M pieces of network side data generated by communication between a terminal and a network side; n and M are integers; the terminal side data is data received or sent by the terminal, and the network side data is data received or sent by the network side;
calculating to obtain a time error coefficient corresponding to the communication between the terminal equipment and the network side based on the time values of the N pieces of terminal side data and the time values of the M pieces of network side data;
and calibrating the time values of N pieces of terminal side data generated by the communication between the terminal equipment and the network side or calibrating the time values of M pieces of network side data generated by the communication between the terminal equipment and the network side based on the time error coefficients.
An embodiment of the present invention further provides a time calibration apparatus, including:
the information acquisition unit is used for acquiring time values of N pieces of terminal side data and M pieces of network side data generated by communication between the terminal and the network side; n and M are integers; the terminal side data is data received or sent by the terminal, and the network side data is data received or sent by the network side;
a coefficient calculating unit, configured to calculate a time error coefficient corresponding to communication between the terminal device and the network side based on the time values of the N pieces of terminal-side data and the time values of the M pieces of network-side data;
and the calibration unit is used for calibrating the time values of N pieces of terminal side data generated by the communication between the terminal equipment and the network side or calibrating the time values of M pieces of network side data generated by the communication between the terminal equipment and the network side based on the time error coefficient.
According to the time calibration method and device provided by the invention, the time difference of the uplink data and the downlink data is obtained based on the data generated by the communication between the terminal and the network, then the time error coefficient is obtained by calculation based on the time difference, and then the data at the terminal or the network side is calibrated by using the time error coefficient. In this way, by analyzing and calibrating data on one side one by one, problems such as data misordering due to long-term error accumulation can be avoided.
Drawings
FIG. 1 is a schematic flow chart of a time calibration method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a communication scenario according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a time alignment calculation process according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of information collection according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a time alignment apparatus according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples.
The first embodiment,
An embodiment of the present invention provides a time calibration method, as shown in fig. 1, including:
step 101: acquiring time values of N pieces of terminal side data and M pieces of network side data generated by communication between terminal equipment and a network side; n and M are integers; the terminal side data is data received or sent by the terminal, and the network side data is data received or sent by the network side;
step 102: calculating to obtain a time error coefficient corresponding to the communication between the terminal equipment and the network side based on the time values of the N pieces of terminal side data and the time values of the M pieces of network side data;
step 103: and calibrating the time values of N pieces of terminal side data generated by the communication between the terminal equipment and the network side or calibrating the time values of M pieces of network side data generated by the communication between the terminal equipment and the network side based on the time error coefficients.
As to the time value of the terminal-side data and the time value of the network-side data, see fig. 2, where data TAi sent by the terminal device is the time value corresponding to the terminal-side data, and TBj is the time value corresponding to the network-side data. Wherein i and j are integers. Generally, N and M may be the same, that is, when a service flow is executed, the total amount of data transmitted and received by the terminal and the total amount of data received and transmitted by the network side may be the same, which certainly does not exclude a special case, for example, when the terminal does not receive data transmitted by the network side, a corresponding response message may not be sent, and in this case, N and M are different values. The specific communication cases are not exhaustive in this embodiment.
It can be understood that when the communication data is acquired, in addition to the time values of the N pieces of terminal side data and the M pieces of network side data, a sending or receiving direction of each piece of terminal side data and each piece of network side data should also be acquired, for example, whether the ith piece of terminal side data is uplink data sent or downlink data received. The specific obtaining manner may be obtained from a management device side of a network side, and may also be reported by a terminal, which is not exhaustive in this embodiment.
The calculating, based on the time values of the N pieces of terminal-side data and the time values of the M pieces of network-side data, a time error coefficient corresponding to communication between the terminal device and the network side includes:
acquiring a first piece of terminal side data from the N pieces of terminal side data; the first piece of terminal side data represents the earliest piece of data in the N pieces of terminal side data;
acquiring a first piece of network side data from the M pieces of terminal side data; the first piece of network side data represents the earliest piece of data in the M pieces of network side data;
and determining a calculation mode based on the time error coefficient based on the time values respectively corresponding to the first piece of terminal side data and the first piece of network side data, and calculating to obtain the time error coefficient based on the calculation mode.
Specifically, the determining a calculation method based on the time error coefficient based on the time values respectively corresponding to the first piece of terminal-side data and the first piece of network-side data includes:
when the time value of the first piece of network side data is larger than the time value of the first piece of terminal side data, determining to adopt a first calculation mode to calculate the time error coefficient, otherwise, determining to adopt a second calculation mode to calculate the time error coefficient; the generation scenario that the time value of the first piece of network-side data is greater than the time value of the first piece of terminal-side data may be generated by a certain service flow triggered by the terminal side, for example, when the terminal initiates a call service, the terminal may send a request to the network, and then in this service, the time value of the first piece of terminal data is less than the time value of the first piece of network-side data; otherwise, a service scenario triggered by the network side may be possible, and details are not described here.
Correspondingly, the calculating the time error coefficient based on the calculation method includes:
when a first calculation mode is determined to be adopted, calculating to obtain a maximum downlink time difference and a minimum uplink time difference based on the N pieces of terminal side data and the M pieces of network side data, and calculating to obtain the time error coefficient at least based on the maximum downlink time difference and the minimum uplink time difference;
when the second calculation mode is determined to be adopted, the maximum uplink time difference and the minimum downlink time difference are calculated and obtained based on the N pieces of terminal side data and the M pieces of network side data, and the time error coefficient is calculated and obtained based on at least the maximum uplink time difference and the minimum downlink time difference.
Calculating the time error coefficient at least based on the maximum downlink time difference and the minimum uplink time difference, and further comprising:
and subtracting the minimum uplink time difference from the maximum downlink time difference to obtain a first difference value, subtracting the last downlink data receiving time value from the first uplink data sending time value at the terminal side to obtain a second difference value, and taking the ratio of the first difference value to the second difference value as the time error coefficient.
Further, in the present calculation, it may be further determined whether the maximum downlink time difference is not greater than the minimum uplink time difference, if so, the calculation may not be performed, otherwise, the calculation of the time error coefficient is performed based on at least the maximum uplink time difference and the minimum downlink time difference.
Regarding the above calculation method for calculating the time error coefficient based on at least the maximum uplink time difference and the minimum downlink time difference, specifically, when the first data time value in the network side is greater than the first data time value in the terminal side, the maximum downlink time difference downlink vlauemax and the minimum uplink time difference UpVlaueMin are calculated, and since downlink vlauemax is less than or equal to UpVlaueMin, time synchronization can be performed, the calculation method of the time error coefficient is as follows:
k ═ is (DownVlaueMax-UpVlaueMin)/(UpMinUETime-DownMaxUETime) so that the adjusted time difference ensures that DownVlaueMax is less than or equal to UpVlaueMin;
wherein, UpMinUETime represents the first uplink data transmission time value at the terminal side; the down maxtuetime indicates the last downlink data reception time value at the terminal side.
In addition, the calculating the time error coefficient at least based on the maximum uplink time difference and the minimum downlink time difference further includes:
and subtracting the minimum downlink time difference from the maximum uplink time difference to obtain a third difference value, subtracting the last uplink data sending time value from the first downlink data receiving time value at the terminal side to obtain a fourth difference value, and taking the ratio of the third difference value to the fourth difference value as the time error coefficient.
When the time value of the first piece of data in the network side is smaller than the time value of the first piece of data in the terminal side, calculating UpVlaueMax and DownVlaueMin, and when the UpVlaueMax is smaller than or equal to the DownVlaueMin, time synchronization can be carried out, so that a time error coefficient k is (UpVlaueMax-DownVlaueMin)/(DownInUETime-UpMaxUETime);
the DownLink UETime represents a first downlink data receiving time value at the terminal side; UpMaxUETime indicates the last uplink data transmission time value at the terminal side.
The calibrating the time values of the N pieces of terminal side data generated by the communication between the terminal equipment and the network side comprises:
calculating to obtain a time difference i between the ith piece of terminal side data and the first piece of terminal side data; wherein i is an integer of 0 or more and N or less; based on the result obtained by multiplying the time difference i by the time error coefficient and adding the time difference i to the time value of the ith piece of terminal side data, the result is used as the time value of the ith piece of terminal side data after calibration;
calibrating time values of M pieces of network side data generated by the communication between the terminal equipment and the network side, wherein the calibration comprises the following steps:
calculating to obtain a time difference j between the jth network side data and the first network side data; wherein j is an integer greater than or equal to 0 and less than or equal to M; and based on the result obtained by multiplying the time difference j by the time error coefficient and then adding the result to the time value of the jth network side data, the result is used as the time value of the ith network side data after calibration.
And calibrating all the time of the data on one side based on the time error coefficient to ensure relative synchronization with the data clock on the other side. For example, time-align all data on the UE side:
Time=TAi-TA0;
new TAi=TAi+(Time_hour*3600+Time_minute*60+Time_second)*k;
and calculating the parameters of time, minute and second and the time error coefficient respectively and then calibrating the TAi to obtain a new TAi.
And carrying out time synchronization on the UE side data or the network side data after clock calibration, so that the service flow logic is integrally restored.
Referring to fig. 3, a calculation flow is provided for the processing method provided in the present embodiment: firstly, calculating to obtain time difference between uplink data and downlink data to obtain a list of time difference between the uplink data and the downlink data, wherein the list of time difference is DownValueList and UpValueList;
judging whether the time value of the first piece of data at the terminal side is greater than the time value of the first piece of data at the network side;
if yes, extracting the uplink maximum time difference and the downlink minimum time difference from the uplink and downlink data time difference list; then, judging whether the uplink maximum time difference is larger than the downlink minimum time difference, if so, calculating to obtain a time error coefficient based on k ═ down vlauemax-UpVlaueMin)/(UpMinUETime-down maxuetime), and then calculating to obtain a calibrated time value based on the time error coefficient;
otherwise, extracting the downlink maximum time difference and the uplink minimum time difference from the uplink and downlink data time difference list, judging whether the downlink maximum time difference is not smaller than the uplink minimum time difference, if so, calculating to obtain a time error coefficient based on k ═ UpVlaueMax-DownVlaueMin)/(DownInUEtime-UpMaxUEtime), and then calculating to obtain a calibrated time value based on the time error coefficient.
Finally, how to obtain data generated by communication at the terminal and the network side is introduced, and referring to fig. 4, commercial drive tests and open source tools are applied to extract original signaling data, air interface measurement data and user plane data at the terminal side, standard format data is derived, a mainstream signaling monitoring system/instrument is applied to synchronously acquire original signaling and user plane data of a core network and filter and extract the original signaling and user plane data, and the standard format data is derived; then, clock compensation multi-source data synchronization equipment carries out clock relative calibration on the signaling/service data to obtain the signaling/service data after clock compensation; then, the signaling/service flow matching device and the time synchronization device are used for processing, so that the signaling and service flow logic of the terminal and the network side are integrally restored.
Therefore, by adopting the scheme, the time difference of the uplink data and the downlink data can be obtained based on the data generated by the communication between the terminal and the network, then the time error coefficient is obtained by calculation based on the time difference, and then the data at the terminal or the network side is calibrated by using the time error coefficient. In this way, by analyzing and calibrating data on one side one by one, problems such as data misordering due to long-term error accumulation can be avoided.
Example II,
An embodiment of the present invention provides a time calibration apparatus, as shown in fig. 5, including:
an information obtaining unit 51, configured to obtain time values of N pieces of terminal-side data and time values of M pieces of network-side data generated by communication between a terminal and a network side; n and M are integers; the terminal side data is data received or sent by the terminal, and the network side data is data received or sent by the network side;
a coefficient calculating unit 52, configured to calculate a time error coefficient corresponding to communication between the terminal device and the network side based on the time values of the N pieces of terminal-side data and the time values of the M pieces of network-side data;
a calibration unit 53, configured to calibrate, based on the time error coefficient, time values of N pieces of terminal-side data generated by the terminal device communicating with the network side, or calibrate time values of M pieces of network-side data generated by the terminal device communicating with the network side.
The apparatus provided in the embodiment of the present invention may be configured on a network side, and specifically may be configured in a management device in a network, where the specific configuration location is not exhaustive in this embodiment.
As to the time value of the terminal-side data and the time value of the network-side data, see fig. 2, where data TAi sent by the terminal device is the time value corresponding to the terminal-side data, and TBj is the time value corresponding to the network-side data. Wherein i and j are integers. Generally, N and M may be the same, that is, when a service flow is executed, the total amount of data transmitted and received by the terminal and the total amount of data received and transmitted by the network side may be the same, which certainly does not exclude a special case, for example, when the terminal does not receive data transmitted by the network side, a corresponding response message may not be sent, and in this case, N and M are different values. The specific communication cases are not exhaustive in this embodiment.
It can be understood that when the communication data is acquired, in addition to the time values of the N pieces of terminal side data and the M pieces of network side data, a sending or receiving direction of each piece of terminal side data and each piece of network side data should also be acquired, for example, whether the ith piece of terminal side data is uplink data sent or downlink data received. The specific obtaining manner may be obtained from a management device side of a network side, and may also be reported by a terminal, which is not exhaustive in this embodiment.
The coefficient calculation unit is configured to obtain a first piece of terminal-side data from the N pieces of terminal-side data; the first piece of terminal side data represents the earliest piece of data in the N pieces of terminal side data;
acquiring a first piece of network side data from the M pieces of terminal side data; the first piece of network side data represents the earliest piece of data in the M pieces of network side data;
and determining a calculation mode based on the time error coefficient based on the time values respectively corresponding to the first piece of terminal side data and the first piece of network side data, and calculating to obtain the time error coefficient based on the calculation mode.
Specifically, the coefficient calculating unit is configured to determine to calculate the time error coefficient by using a first calculation method when the time value of the first piece of network-side data is greater than the time value of the first piece of terminal-side data, and determine to calculate the time error coefficient by using a second calculation method if the time value of the first piece of network-side data is not greater than the time value of the first piece of terminal-side data; the generation scenario that the time value of the first piece of network-side data is greater than the time value of the first piece of terminal-side data may be generated by a certain service flow triggered by the terminal side, for example, when the terminal initiates a call service, the terminal may send a request to the network, and then in this service, the time value of the first piece of terminal data is less than the time value of the first piece of network-side data; otherwise, a service scenario triggered by the network side may be possible, and details are not described here.
Correspondingly, the coefficient calculating unit is configured to calculate, when it is determined that the first calculation method is adopted, a maximum downlink time difference and a minimum uplink time difference based on the N pieces of terminal-side data and the M pieces of network-side data, and calculate, at least based on the maximum downlink time difference and the minimum uplink time difference, the time error coefficient;
when the second calculation mode is determined to be adopted, the maximum uplink time difference and the minimum downlink time difference are calculated and obtained based on the N pieces of terminal side data and the M pieces of network side data, and the time error coefficient is calculated and obtained based on at least the maximum uplink time difference and the minimum downlink time difference.
And the coefficient calculation unit is used for subtracting the minimum uplink time from the maximum downlink time difference to obtain a first difference value, subtracting the last downlink data receiving time value from the first uplink data sending time value at the terminal side to obtain a second difference value, and taking the ratio of the first difference value to the second difference value as the time error coefficient.
Further, in the present calculation, it may be further determined whether the maximum downlink time difference is not greater than the minimum uplink time difference, if so, the calculation may not be performed, otherwise, the calculation of the time error coefficient is performed based on at least the maximum uplink time difference and the minimum downlink time difference.
Specifically, when the time value of the first piece of data in the network side is greater than the time value of the first piece of data in the terminal side, the maximum downlink time difference downlaue max and the minimum uplink time difference UpVlaueMin are calculated, and time synchronization cannot be performed because the downlink time max is less than or equal to the UpVlaueMin, so that the time error coefficient k is (downlink time max-UpVlaueMin)/(UpMinUETime-downlink time) so that the adjusted time difference ensures that the downlink time max is less than or equal to the UpVlaueMin.
In addition, the coefficient calculating unit is configured to subtract the minimum downlink time difference from the maximum uplink time difference to obtain a third difference, subtract the last uplink data sending time value from the first downlink data receiving time value at the terminal side to obtain a fourth difference, and use a ratio of the third difference to the fourth difference as the time error coefficient.
When the time value of the first piece of data in the network side is smaller than the time value of the first piece of data in the terminal side, calculating UpVlaueMax and Down VlaueMin, and when the UpVlaueMax is smaller than or equal to the Down VlaueMin, the time synchronization can be carried out, so that the time error coefficient k is (UpVlaueMax-Down VlaueMin)/(DownInUETime-UpMaxUETime).
The calibration unit is specifically configured to calculate a time difference i between the ith piece of terminal-side data and the first piece of terminal-side data; wherein i is an integer of 0 or more and N or less; based on the result obtained by multiplying the time difference i by the time error coefficient and adding the time difference i to the time value of the ith piece of terminal side data, the result is used as the time value of the ith piece of terminal side data after calibration;
and/or the presence of a gas in the gas,
calculating to obtain a time difference j between the jth network side data and the first network side data; wherein j is an integer greater than or equal to 0 and less than or equal to M; and based on the result obtained by multiplying the time difference j by the time error coefficient and then adding the result to the time value of the jth network side data, the result is used as the time value of the ith network side data after calibration.
And calibrating all the time of the data on one side based on the time error coefficient to ensure relative synchronization with the data clock on the other side. For example, time-align all data on the UE side:
Time=TAi-TA0
new TAi=TAi+(Time_hour*3600+Time_minute*60+Time_second)*k;
and calculating the parameters of time, minute and second and the time error coefficient respectively and then calibrating the TAi to obtain a new TAi.
And carrying out time synchronization on the UE side data or the network side data after clock calibration, so that the service flow logic is integrally restored.
Referring to fig. 3, a calculation flow is provided for the processing method provided in the present embodiment: firstly, calculating to obtain an uplink and downlink data time difference list, namely a DownValueList and a UpValueList; then judging whether the time value of the first piece of data at the terminal side is greater than the time value of the first piece of data at the network side;
if yes, extracting the uplink maximum time difference and the downlink minimum time difference from the uplink and downlink data time difference list; then, judging whether the uplink maximum time difference is larger than the downlink minimum time difference, if so, calculating to obtain a time error coefficient based on k ═ down vlauemax-UpVlaueMin)/(UpMinUETime-down maxuetime), and then calculating to obtain a calibrated time value based on the time error coefficient;
otherwise, extracting the downlink maximum time difference and the uplink minimum time difference from the uplink and downlink data time difference list, judging whether the downlink maximum time difference is not smaller than the uplink minimum time difference, if so, calculating to obtain a time error coefficient based on k ═ UpVlaueMax-DownVlaueMin)/(DownInUEtime-UpMaxUEtime), and then calculating to obtain a calibrated time value based on the time error coefficient.
Finally, how to obtain data generated by communication at a terminal and a network side is introduced, and referring to fig. 4, commercial drive test and open source tools are applied to extract original signaling data, air interface measurement data and user plane data at the terminal side, standard format data is derived, a mainstream signaling monitoring system/instrument is applied to synchronously acquire original signaling and user plane data of a core network and filter and extract the original signaling and user plane data, standard format data is derived, clock relative calibration is carried out on the signaling/service data through clock compensation multi-source data synchronization equipment, and the signaling/service flow matching equipment and time synchronization equipment are used for processing, so that the signaling and service flow logic overall restoration is realized.
Therefore, by adopting the scheme, the time difference of the uplink data and the downlink data can be obtained based on the data generated by the communication between the terminal and the network, then the time error coefficient is obtained by calculation based on the time difference, and then the data at the terminal or the network side is calibrated by using the time error coefficient. In this way, by analyzing and calibrating data on one side one by one, problems such as data misordering due to long-term error accumulation can be avoided.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or server that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or server. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or server that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (4)

1. A method of time calibration, the method comprising:
acquiring time values of N pieces of terminal side data received or sent by a terminal and time values of M pieces of network side data received or sent by a network side, wherein the N pieces of terminal side data are generated by communication between terminal equipment and the network side; n and M are integers;
calculating to obtain a time error coefficient corresponding to the communication between the terminal equipment and the network side based on the time values of the N pieces of terminal side data and the time values of the M pieces of network side data; wherein, the calculating, based on the time values of the N pieces of terminal side data and the time values of the M pieces of network side data, a time error coefficient corresponding to communication between the terminal device and the network side includes:
when the time value of the first piece of network side data is larger than the time value of the first piece of terminal side data, determining to calculate the time error coefficient by adopting a first calculation mode; otherwise, determining to adopt a second calculation mode to calculate the time error coefficient; the first piece of terminal side data represents the earliest piece of data in the N pieces of terminal side data; the first piece of network side data represents the earliest piece of data in the M pieces of network side data;
when a first calculation mode is determined, calculating to obtain a maximum downlink time difference and a minimum uplink time difference based on the N pieces of terminal side data and the M pieces of network side data, subtracting the minimum uplink time difference from the maximum downlink time difference to obtain a first difference value, subtracting a last downlink data receiving time value at the terminal side from a first uplink data sending time value at the terminal side to obtain a second difference value, and taking a ratio of the first difference value to the second difference value as the time error coefficient;
when a second calculation mode is determined, calculating to obtain a maximum uplink time difference and a minimum downlink time difference based on the N pieces of terminal side data and the M pieces of network side data, subtracting the minimum downlink time difference from the maximum uplink time difference to obtain a third difference value, subtracting a last uplink data sending time value at the terminal side from a first downlink data receiving time value at the terminal side to obtain a fourth difference value, and taking a ratio of the third difference value to the fourth difference value as the time error coefficient;
calculating to obtain a time difference i between the ith piece of terminal side data and the first piece of terminal side data based on the time error coefficient; wherein i is an integer of 0 or more and N or less; based on the result obtained by multiplying the time difference i by the time error coefficient and adding the time difference i to the time value of the ith piece of terminal side data, the result is used as the time value of the ith piece of terminal side data after calibration;
or calculating to obtain the time difference j between the jth network side data and the first network side data based on the time error coefficient; wherein j is an integer greater than or equal to 0 and less than or equal to M; and based on the result obtained by multiplying the time difference j by the time error coefficient and then adding the result to the time value of the jth network side data, the result is used as the time value of the calibrated jth network side data.
2. The method of claim 1, wherein before subtracting the minimum downlink time difference from the maximum uplink time difference to obtain a third difference value, the method further comprises:
judging whether the maximum uplink time difference is larger than the minimum downlink time difference; if so, calculating to obtain the time error coefficient at least based on the maximum uplink time difference and the minimum downlink time difference, otherwise, not calculating the time error coefficient;
before subtracting the minimum uplink time difference from the maximum downlink time difference to obtain a first difference, the method further includes:
judging whether the maximum downlink time difference is greater than the minimum uplink time difference; and if so, calculating to obtain the time error coefficient at least based on the maximum downlink time difference and the minimum uplink time difference, otherwise, not calculating the time error coefficient.
3. A time alignment apparatus, comprising:
the information acquisition unit is used for acquiring time values of N pieces of terminal side data received or sent by a terminal and time values of M pieces of network side data received or sent by a network side, wherein the N pieces of terminal side data are generated by communication between the terminal equipment and the network side; n and M are integers;
a coefficient calculating unit, configured to calculate a time error coefficient corresponding to communication between the terminal device and the network side based on the time values of the N pieces of terminal-side data and the time values of the M pieces of network-side data;
a calibration unit, configured to calibrate time values of N pieces of terminal-side data generated by communication between the terminal device and the network side, or calibrate time values of M pieces of network-side data generated by communication between the terminal device and the network side, based on the time error coefficient;
the coefficient calculation unit is specifically configured to determine to calculate the time error coefficient in a first calculation manner when the time value of the first piece of network-side data is greater than the time value of the first piece of terminal-side data; otherwise, determining to adopt a second calculation mode to calculate the time error coefficient; the first piece of terminal side data represents the earliest piece of data in the N pieces of terminal side data; the first piece of network side data represents the earliest piece of data in the M pieces of network side data;
when the first calculation mode is determined to be adopted, calculating to obtain a maximum downlink time difference and a minimum uplink time difference based on the N pieces of terminal side data and the M pieces of network side data, subtracting the minimum uplink time difference from the maximum downlink time difference to obtain a first difference value, subtracting a last downlink data receiving time value at the terminal side from a first uplink data sending time value at the terminal side to obtain a second difference value, and taking a ratio of the first difference value to the second difference value as the time error coefficient;
when a second calculation mode is determined, calculating to obtain a maximum uplink time difference and a minimum downlink time difference based on the N pieces of terminal side data and the M pieces of network side data, subtracting the minimum downlink time difference from the maximum uplink time difference to obtain a third difference value, subtracting a last uplink data sending time value at the terminal side from a first downlink data receiving time value at the terminal side to obtain a fourth difference value, and taking a ratio of the third difference value to the fourth difference value as the time error coefficient;
the calibration unit is specifically configured to calculate a time difference i between the ith piece of terminal-side data and the first piece of terminal-side data; wherein i is an integer of 0 or more and N or less; based on the result obtained by multiplying the time difference i by the time error coefficient and adding the time difference i to the time value of the ith piece of terminal side data, the result is used as the time value of the ith piece of terminal side data after calibration;
and/or calculating to obtain the time difference j between the jth network side data and the first network side data; wherein j is an integer greater than or equal to 0 and less than or equal to M; and based on the result obtained by multiplying the time difference j by the time error coefficient and then adding the result to the time value of the jth network side data, the result is used as the time value of the calibrated jth network side data.
4. The apparatus of claim 3,
the coefficient calculating unit is configured to determine whether the maximum uplink time difference is greater than the minimum downlink time difference before calculating the time error coefficient based on at least the maximum uplink time difference and the minimum downlink time difference; if so, executing the calculation of the time error coefficient obtained by calculation at least based on the maximum uplink time difference and the minimum downlink time difference, otherwise, not calculating the time error coefficient;
the time error coefficient calculating unit is further configured to determine whether the maximum downlink time difference is greater than the minimum uplink time difference at least before calculating the time error coefficient based on the maximum downlink time difference and the minimum uplink time difference; and if so, executing the calculation of the time error coefficient obtained by calculation at least based on the maximum downlink time difference and the minimum uplink time difference, otherwise, not calculating the time error coefficient.
CN201710147218.3A 2017-03-13 2017-03-13 Time calibration method and device Active CN108574547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710147218.3A CN108574547B (en) 2017-03-13 2017-03-13 Time calibration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710147218.3A CN108574547B (en) 2017-03-13 2017-03-13 Time calibration method and device

Publications (2)

Publication Number Publication Date
CN108574547A CN108574547A (en) 2018-09-25
CN108574547B true CN108574547B (en) 2020-07-03

Family

ID=63578329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710147218.3A Active CN108574547B (en) 2017-03-13 2017-03-13 Time calibration method and device

Country Status (1)

Country Link
CN (1) CN108574547B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111132302B (en) * 2019-12-27 2022-05-03 京信网络系统股份有限公司 Time synchronization method, device, base station equipment and computer readable storage medium
CN112019289B (en) * 2020-08-28 2023-05-16 帷幄匠心科技(杭州)有限公司 Time synchronization method of time sharing system
CN112286039A (en) * 2020-12-30 2021-01-29 深圳市越芯电子有限责任公司 Clock calibration method and device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431385A (en) * 2008-08-26 2009-05-13 中兴通讯股份有限公司 Frequency and time synchronization method for passive optical network
KR20090128654A (en) * 2008-06-11 2009-12-16 삼성전자주식회사 Appratus and method for acquting uplink transmit timing in wireless mobile communication

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990746B (en) * 2009-12-01 2015-07-01 高通股份有限公司 Method and apparatus using uplink synchronous shift commond bit in td-scdma uplink transmission
CN102664698A (en) * 2011-12-27 2012-09-12 华为技术有限公司 Method, device and system for providing synchronous deviation time
CN105827350B (en) * 2015-01-04 2018-09-25 中国移动通信集团公司 A kind of information synchronization method and the network equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090128654A (en) * 2008-06-11 2009-12-16 삼성전자주식회사 Appratus and method for acquting uplink transmit timing in wireless mobile communication
CN101431385A (en) * 2008-08-26 2009-05-13 中兴通讯股份有限公司 Frequency and time synchronization method for passive optical network

Also Published As

Publication number Publication date
CN108574547A (en) 2018-09-25

Similar Documents

Publication Publication Date Title
CN105027536B (en) The bandwidth and time delay of inertial sensor match
CN108574547B (en) Time calibration method and device
EP1961186B1 (en) Using travel-time as means for improving the accuracy of simple network time protocol
EP3009897B1 (en) Distribution device, distribution system, and distribution method
CN105187148A (en) ARM-based network clock synchronization system and method
EP2288070A1 (en) Time synchronizing method, device and system of master clock side and slave clock side in synchronous network
US9007929B2 (en) Correlating communication transactions across communication networks
CN101621713B (en) Method for calculating synchronous time of passive optical network, system and optical network equipment
JP2002318276A (en) Method, apparatus, and system for gps time synchronization using cellular signal burst
EP2833683A1 (en) Time synchronization method and system using wifi-direct
CN109687927B (en) Method for determining timestamp, communication equipment and communication system
CN103546267A (en) Time synchronization monitoring method and system
CN102257861A (en) Synchronization indication in networks
JP2008070177A (en) Test system for protection relay device
CN113992297B (en) Method and device for determining network time delay, electronic equipment and storage medium
EP2736194A1 (en) Latency monitoring point
CN111711948B (en) Method and system for acquiring high-precision time from 5G base station through air interface
CN113075710B (en) Positioning difference information acquisition method, device, equipment and computer storage medium
CN108111365B (en) Time delay measurement processing method and system
EP2106052A2 (en) Communication system, transmitting apparatus, receiving apparatus, communication method and record medium for transferring a clock in a packet network
KR101274629B1 (en) Hardware bias calculating system and method
US9306695B2 (en) Frame transmitting apparatus, frame receiving apparatus, and frame transmission/reception system and method
CN106506136A (en) A kind of network time transmission method and device based on atomic clock group
EP3748389A1 (en) Method for providing position information in a secure manner, and a terminal device and a computer program product thereto
CN111212432B (en) Method, device, equipment and medium for positioning pseudo base station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant