Time service method, terminal device, and network device
11178632 · 2021-11-16
Assignee
Inventors
Cpc classification
H04W56/0045
ELECTRICITY
International classification
Abstract
Embodiments of the present disclosure provide a time service method, a terminal device, and a network device. The method includes: determining, by a terminal device, a first moment of a first downlink message, and determining a second moment of the first downlink message; determining, by the terminal device, a third moment of a first uplink message, and determining a fourth moment of the first uplink message; and determining, by the terminal device, a time offset between the terminal device and the network device based on the first moment, the second moment, the third moment, and the fourth moment. According to the method provided, a time service error is effectively reduced.
Claims
1. A time service method comprising: determining, by a terminal device, a first moment of a first downlink message, and determining a second moment of the first downlink message, the first moment being a start moment of a time unit used by a network device to send the first downlink message, and the second moment being a start moment of a time unit used by the terminal device to receive the first downlink message; the determining the first moment comprising determining, by the terminal device, an expected moment of the first moment based on an initial timestamp of the network device and according to the following formula:
T.sub.1exp=T+n×t.sub.1+m×t.sub.2, wherein T.sub.1exp represents the expected moment of the first moment, T represents the initial timestamp, n represents a frame number of the first downlink message, m represents a subframe number of the first downlink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe; determining, by the terminal device, a third moment of a first uplink message, and determining a fourth moment of the first uplink message, the third moment being a start moment of a time unit used by the terminal device to send the first uplink message, and the fourth moment being a start moment of a time unit used by the network device to receive the first uplink message; and determining, by the terminal device, a time offset between the terminal device and the network device based on the first moment, the second moment, the third moment, and the fourth moment.
2. The method according to claim 1, wherein, before the determining, by the terminal device, the first moment of the first downlink message, the method further comprises: receiving, by the terminal device, cell time service information sent by the network device, the cell time service information comprising downlink resource information of the first downlink message; and receiving, by the terminal device based on the downlink resource information, the first downlink message sent by the network device.
3. The method according to claim 2, wherein the receiving, by the terminal device, the cell time service information sent by the network device comprises: receiving, by the terminal device, system information block (SIB) information broadcast by the network device, the SIB information comprising the cell time service information.
4. The method according to claim 2, wherein the cell time service information further comprises a temporary group network temporary identifier (TG-RNTI) of a second message; and the determining, by the terminal device, the first moment of the first downlink message comprises: receiving, by the terminal device based on the TG-RNTI, the second message sent by the network device, the second message comprising the first moment.
5. The method according to claim 2, wherein the cell time service information further comprises the initial timestamp of the network device, and the initial timestamp is a start moment corresponding to an initial time unit of a frame period.
6. The method according to claim 5, wherein the cell time service information further comprises a temporary group network temporary identifier (TG-RNTI) of a second message; and the determining, by the terminal device, the first moment further comprises: receiving, by the terminal device based on the TG-RNTI, the second message sent by the network device, the second message comprising a value of an offset between the first moment and the expected moment of the first moment; and determining, by the terminal device, the first moment according to the following formula:
T.sub.1=T.sub.1exp+ΔT.sub.1, wherein T.sub.1 represents the first moment, and ΔT.sub.1 represents the value of the offset between the first moment and the expected moment of the first moment.
7. The method according to claim 5, wherein the determining, by the terminal device, the first moment comprises: determining, by the terminal device, the expected moment of the first moment as the first moment.
8. The method according to claim 1, wherein determining the second moment is based on a detection moment of the first downlink message, and the detection moment of the first downlink message is a start moment of receiving, by the terminal device, the first downlink message, and the determining, by the terminal device, the second moment of the first downlink message comprises: determining, by the terminal device, a value of an offset between the detection moment of the first downlink message and the second moment; and determining, by the terminal device, the second moment according to the following formula:
T.sub.2=T.sub.2′−Δt.sub.d, wherein T.sub.2 represents the second moment, T.sub.2′ represents the detection moment of the first downlink message, and Δt.sub.d represents the value of the offset between the detection moment of the first downlink message and the second moment.
9. The method according to claim 8, wherein before the determining, by the terminal device, the fourth moment of the first uplink message, the method further comprises: receiving, by the terminal device, a response message that is of the first uplink message and that is sent by the network device, the response message of the first uplink message comprising the fourth moment, or the response message of the first uplink message comprises a value of an offset between an expected moment of the fourth moment and the fourth moment.
10. The method according to claim 9, wherein the response message of the first uplink message comprises the value of the offset between the expected moment of the fourth moment and the fourth moment; and the determining, by the terminal device, the fourth moment of the first uplink message comprises: determining, by the terminal device, the fourth moment according to the following formula:
T.sub.4=T.sub.4exp+ΔT.sub.4, wherein T.sub.4exp represents the expected moment of the fourth moment, T.sub.4 represents the fourth moment, and ΔT.sub.4 represents the value of the offset between the expected moment of the fourth moment and the fourth moment.
11. The method according to claim 9, wherein before the determining, by the terminal device, the fourth moment of the first uplink message, the method further comprises: determining, by the terminal device, the expected moment of the fourth moment according to the following formula:
T.sub.4exp=T+a×t.sub.1+b×t.sub.2, wherein T represents the initial timestamp, a represents a frame number of the first uplink message, b represents a subframe number of the first uplink message, t.sub.1 represents the time length of a frame, and t.sub.2 represents the time length of a subframe.
12. The method according to claim 1, wherein before the determining, by the terminal device, the third moment of the first uplink message, the method further comprises: sending, by the terminal device, a resource request message to the network device, the resource request message being used to request the network device to allocate a resource location to the first uplink message; receiving, by the terminal device, response information that is of the resource request message and that is sent by the network device, the response information of the resource request message comprising uplink resource information of the first uplink message; and sending, by the terminal device, the first uplink message to the network device based on the uplink resource information.
13. The method according to claim 1, wherein the determining, by the terminal device, the time offset between the terminal device and the network device based on the first moment, the second moment, the third moment, and the fourth moment comprises: determining, by the terminal device, the time offset according to the following formula:
O=(T.sub.1−T.sub.2−T.sub.3+T.sub.4)/2, wherein O represents the time offset, T.sub.1 represents the first moment, T.sub.2 represents the second moment, T.sub.3 represents the third moment, and T.sub.4 represents the fourth moment.
14. The method according to claim 1, wherein the first downlink message is a cell-specific reference signal CRS.
15. An apparatus, comprising: one or more processors, and a non-transitory storage medium configure to store program instructions; wherein, when executed by the one or more processors, the instructions cause the apparatus to perform a method that comprises: determining a first moment of a first downlink message, and determining a second moment of the first downlink message, wherein the first moment is a start moment of a time unit used by a network device to send the first downlink message, and the second moment is a start moment of a time unit used by a terminal device to receive the first downlink message; wherein the determining the first moment comprises determining an expected moment of the first moment based on an initial timestamp of the network device and according to the following formula:
T.sub.1exp=T+n×t.sub.1+m×t.sub.2, wherein T.sub.1exp represents the expected moment of the first moment, T represents the initial timestamp, n represents a frame number of the first downlink message, m represents a subframe number of the first downlink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe; determining a third moment of a first uplink message, and determining a fourth moment of the first uplink message, wherein the third moment is a start moment of a time unit used by the terminal device to send the first uplink message, and the fourth moment is a start moment of a time unit used by the network device to receive the first uplink message; and determining a time offset between the terminal device and the network device based on the first moment, the second moment, the third moment, and the fourth moment.
16. The apparatus according to claim 15, wherein the method further comprises, before the determining the first moment of the first downlink message: receiving cell time service information sent by the network device, wherein the cell time service information comprises downlink resource information of the first downlink message; and receiving, based on the downlink resource information, the first downlink message sent by the network device.
17. The apparatus according to claim 16, wherein the cell time service information further comprises a temporary group network temporary identifier (TG-RNTI) of a second message.
18. The apparatus according to claim 15, wherein the determining the second moment is based on a detection moment of the first downlink message, and the detection moment of the first downlink message is a start moment of receiving the first downlink message, and the determining the second moment of the first downlink message comprises: determining a value of an offset between the detection moment of the first downlink message and the second moment; and determining the second moment according to the following formula:
T.sub.2=T.sub.2′−Δt.sub.d, wherein T.sub.2 represents the second moment, T.sub.2′ represents the detection moment of the first downlink message, and Δt.sub.d represents the value of the offset between the detection moment of the first downlink message and the second moment.
19. An apparatus, comprising: one or more processors, and a non-transitory storage medium configure to store program instructions; wherein, when executed by the one or more processors, the instructions cause the apparatus to perform a method that comprises: determining a first moment of a first downlink message, wherein the first moment is a start moment of a time unit used by a network device to send the first downlink message; determining a value of an offset between an expected moment of the first moment and the first moment according to the following formula:
ΔT.sub.1=T.sub.1−T.sub.1exp, wherein ΔT.sub.1 represents the value of the offset between the expected moment of the first moment and the first moment, T.sub.1 represents the first moment, and T.sub.1exp represents the expected moment of the first moment according to the following formula:
T.sub.1exp=T+n×t.sub.1+m×t.sub.2, wherein T represents an initial timestamp of the network device, n represents a frame number of the first downlink message, m represents a subframe number of the first downlink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe; generating a second message based on the first moment, wherein the second message comprises the value of the offset between the expected moment of the first moment and the first moment; and sending the second message to a terminal device.
20. The apparatus according to claim 19, wherein the method further comprises: determining a fourth moment of a first uplink message, wherein the fourth moment is a start moment of a time unit used by the network device to receive the first uplink message; generating a response message of the first uplink message based on the fourth moment, wherein the response message of the first uplink message comprises the fourth moment, or the response message of the first uplink message comprises a value of an offset between an expected moment of the fourth moment and the fourth moment; and sending the response message of the first uplink message to the terminal device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
(9) The following describes technical solutions of this application with reference to accompanying drawings.
(10)
(11) The embodiments of the present disclosure may be applied to a cellular network communications system in which a terminal needs a time service based on absolute time. The system may include at least one network device and at least one terminal device. Some or all of the at least one terminal device needs a time service based on absolute time. For example, as shown in
(12) It should be understood that the embodiments of the present disclosure are described by using a cellular network communications system as an example, but the present disclosure is not limited thereto. In other words, technical solutions of the embodiments of the present disclosure may be applied to various communications systems in which a terminal needs a time service based on absolute time, for example, a global system for mobile communications (Global System of Mobile communication, GSM) system, a code division multiple access (Code Division Multiple Access, CDMA) system, a wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA) system, a general packet radio service (General Packet Radio Service, GPRS) system, a 5G communications system, a long term evolution (Long Term Evolution, LTE) system, an LTE frequency division duplex (Frequency Division Duplex, FDD) system, an LTE time division duplex (Time Division Duplex, TDD) system, a universal mobile telecommunications system (Universal Mobile Telecommunication system, UMTS), and the like.
(13) The present disclosure describes the embodiments with reference to a network device and a terminal device. The terminal device includes but is not limited to user equipment (User Equipment, UE), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile console, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communications device, a user agent, or a user apparatus. The terminal device may communicate with one or more core networks through a radio access network. For example, the terminal device may be a cellular phone, a cordless phone, a session initiation protocol (Session Initiation Protocol, SIP) phone, a wireless local loop (Wireless Local Loop, WLL) station, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device having a wireless communication function, a computing device or another processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a future 5G network, a terminal device in a future evolved PLMN network, or the like.
(14) The network device may be a device configured to communicate with the terminal device, and the network device may be a base station or a network side device having a base station function. For example, the network device may be a base transceiver station (Base Transceiver Station, BTS) in the GSM system or the CDMA system, or may be a NodeB (NodeB, NB) in the WCDMA system, or may be an evolved NodeB (Evolved Node B, eNB or eNodeB) in the LTE system, or the network device may be a relay station, an access point, a vehicle-mounted device, a wearable device, a network side device in the future 5G network, or the like.
(15) In the LTE system, downlink time synchronization is implemented by detecting a synchronization signal or a cell-specific reference signal. The terminal device detects a synchronization signal to implement frame boundary alignment of a received signal. Once the terminal device successfully gets access, the terminal device can perform time offset estimation and tracking on a received signal by using a cell-specific reference signal.
(16) However, relative to a frame boundary of the received signal, the time offset estimation is mainly for data demodulation and belongs to relative time synchronization. A time service based on absolute time cannot be implemented for the terminal device. In addition, a delay in an uplink or downlink data transmission process is not considered, and a time service error exists.
(17) For an uplink timing adjustment (Timing Adjustment, TA), the network device measures an uplink time offset based on a signal sent by the terminal, such as a physical random access channel (Physical Random Access Channel, PRACH), a demodulation reference signal (Demodulation Reference Signal, DMRS), or a sounding reference signal (Sounding Reference Signal, SRS), to obtain a time offset between a terminal signal received by the network device and a frame boundary, uses the time offset as a TA, and sends the TA to the terminal device for time adjustment.
(18) However, in the LTE system, considering performance tolerance of data demodulation, a TA is quantized by using 16 Ts, and a quantization error exists. Therefore, absolute time synchronization with the network device cannot be implemented. In addition, a delay in an uplink or downlink data transmission process is not considered, and a time service error exists.
(19) Therefore, an embodiment of the present disclosure provides a time service method. Uplink and downlink propagation delays are considered for the terminal device, and a time service based on absolute time can be provided for the terminal device by using a first moment and a second moment of a first downlink message and a third moment and a fourth moment of a first uplink message, thereby effectively reducing a time service error.
(20) It should be noted that, in this embodiment of the present disclosure, a moment at which the first downlink message is detected may be different from a start moment of a time unit in which the first downlink message is located.
(21) For example, the first downlink message may be a sequence mapped to a middle location of the time unit. When the terminal device receives the first downlink message, a recorded moment is a detection moment at which the first downlink message is detected rather than a start moment of a time unit used by the terminal device to receive the first downlink message.
(22) It should be further noted that, to be close to an existing standard, when sending the first downlink message to the terminal device, the network device records a start moment of a time unit used to send the first downlink message. Similarly, when the terminal device sends the first uplink message to the network device, a start moment of a time unit used to send the first uplink message is recorded.
(23) For ease of description, the following describes in detail physical meanings of various moments of the first downlink message and the first uplink message in this embodiment of the present disclosure.
(24) The first moment is the start moment of the time unit used by the network device to send the first downlink message.
(25) The second moment is the start moment of the time unit used by the terminal device to receive the first downlink message.
(26) The detection moment of the first downlink message is a moment at which the terminal device detects the first downlink message.
(27) The third moment is the start moment of the time unit used by the terminal device to send the first uplink message.
(28) The fourth moment is a start moment of a time unit used by the network device to receive the first uplink message.
(29) A detection moment of the first uplink message is a moment at which the network device detects the first uplink message.
(30) In other words, in this embodiment of the present disclosure, the second moment may be different from the detection moment of the first downlink message. Similarly, in this embodiment of the present disclosure, the fourth moment may be different from the detection moment of the first uplink message.
(31) In addition to moments related to the recorded moments of the first downlink message and the first uplink message, this embodiment of the present disclosure further involves an expected moment of the first moment and an expected moment of the fourth moment.
(32) It should be understood that, if the first downlink message and the first uplink message are transmitted in a same radio frame cycle, and there is no error between radio frames in the cycle, an ideal moment at which the first downlink message arrives at a base station may be calculated by using a resource location of the first downlink message and an absolute moment of a start frame. In this embodiment of the present disclosure, the ideal moment at which the first downlink message arrives at the base station is defined as the expected moment of the first moment. Similarly, an ideal moment at which the first uplink message arrives at the base station is defined as the expected moment of the fourth moment.
(33) Optionally, the first downlink message in this embodiment of the present disclosure is a cell-specific reference signal (Cell-specific Reference Signal, CRS) to reduce downlink signaling overheads.
(34) Optionally, the first uplink message in this embodiment of the present disclosure is a sounding reference signal (Sounding Reference Signal, SRS), or the first uplink message is a physical random access channel (Physical Random Access Channel, PRACH) to reduce uplink signaling overheads.
(35) It should be understood that a time unit in this embodiment of the present disclosure may be a unit time length to which the first downlink message or the first uplink message is mapped in time domain. A specific form of the time unit is not limited in this embodiment of the present disclosure.
(36) For example, in the LTE system, when the first downlink message is a CRS, the time unit may be a frame.
(37) It should be further understood that, in this embodiment of the present disclosure, terms “downlink” and “uplink” are used to indicate signal or data transmission directions. “Downlink” is used to indicate that a signal or data transmission direction is a direction from the network device to the terminal device, and “uplink” is used to indicate that the signal or data transmission direction is a direction from the terminal device to the network device. Terms “first moment”, “second moment”, “third moment”, and “fourth moment” are merely used to distinguish between different moments, and a sequence, lengths, types, and the like of the times are not limited.
(38) Optionally, after determining the first moment, the second moment, and the third moment, the terminal device may determine a time offset between the terminal device and the network device according to the following formula:
O=(T.sub.1−T.sub.2−T.sub.3+T.sub.4)/2 (1)
(39) where O represents the time offset, T.sub.1 represents the first moment, T.sub.2 represents the second moment, T.sub.3 represents the third moment, and T.sub.4 represents the fourth moment.
(40) Specifically, in this embodiment of the present disclosure, if an uplink delay and a downlink delay are symmetric, the following formulas may be obtained when the uplink and downlink propagation delays are considered:
T.sub.2−T.sub.1=delay−O (2) and
T.sub.4−T.sub.3=delay+O (3)
(41) where delay is a delay in uplink or downlink transmission. It can be learned that the formula (1) may be obtained through calculation by using the formula (2) and the formula (3).
(42) It should be noted that, in this embodiment of the present disclosure, transmission of the first downlink message is based on the network device, and transmission of the first uplink message is based on the terminal device. In other words, a time reference of the formula (2) is a time of the network device, and a time reference of the formula (3) is a time of the terminal device.
(43) Therefore, the time offset between the terminal device and the network device can be determined by using the formula (2) and the formula (3).
(44) Therefore, according to the time service method provided in this embodiment of the present disclosure, the uplink and downlink propagation delays are considered for the terminal device, and a time service based on absolute time can be provided for the terminal device by using the first moment and the second moment of the first downlink message and the third moment and the fourth moment of the first uplink message, thereby effectively reducing a time service error.
(45) The following describes, with reference to
(46)
(47) 110. A terminal device determines a first moment of a first downlink message, and determines a second moment of the first downlink message.
(48) Specifically, the terminal device determines the first moment of the first downlink message, and determines the second moment of the first downlink message, where the first moment is a start moment of a time unit used by a network device to send the first downlink message, and the second moment is a start moment of a time unit used by the terminal device to receive the first downlink message.
(49)
(50) The following describes, with reference to
(51) Optionally, as shown in
(52) 111. Send cell time service information.
(53) Specifically, the network device sends the cell time service information to the terminal device, where the cell time service information includes downlink resource information of the first downlink message. In other words, the terminal device receives the cell time service information sent by the network device, to receive the first downlink message.
(54) Optionally, the terminal device receives system information block SIB information broadcast by the network device, where the SIB information includes the cell time service information.
(55) Optionally, the downlink resource information includes information about the first downlink message, such as a resource location, a resource period, a subframe number, a quantity of bits in a mask of a frame number (different masks correspond to different periods), a value of a masked frame number, and a base station clock precision level.
(56) 112. Send the first downlink message.
(57) Specifically, the network device sends the first downlink message to the terminal device based on the downlink resource information. In other words, the terminal device may receive, based on the downlink resource information, the first downlink message sent by the network device.
(58) 113. Determine the second moment of the first downlink message.
(59) Specifically, the terminal device may determine a detection moment of the first downlink message by detecting the first downlink message, and determine the first moment based on the detection moment of the first downlink message.
(60) Optionally, the terminal device determines the detection moment of the first downlink message, where the detection moment of the first downlink message is a start moment of receiving, by the terminal device, the first downlink message. The terminal device determines a value of an offset between the detection moment of the first downlink message and the second moment. The terminal device determines the second moment according to the following formula:
T.sub.2=T.sub.2′−Δt.sub.d (4)
(61) where T.sub.2 represents the second moment, T.sub.2′ represents the detection moment of the first downlink message, and Δt.sub.d represents the value of the offset between the detection moment of the first downlink message and the second moment.
(62) Specifically, the terminal obtains the detection moment of the first downlink message based on a subframe that is specified for the first downlink message in the cell time service information. Optionally, there is a fixed time offset Δt.sub.d between the detection moment of the first downlink message and the second moment. The terminal device determines the second moment according to the formula (4).
(63) The following describes, with reference to step 114 to step 117 in
(64) 114. Determine the first moment of the first downlink message, and generate a second message based on the first moment.
(65) Specifically, the network device may record the first moment of the first downlink message when sending the first downlink message to the terminal device.
(66) In other words, the network device may generate the second message based on the first moment. The second message may include the first moment, or the second message may include time information used by the terminal device to determine the first moment.
(67) 115. Send the second message.
(68) The network device sends the second message to the terminal device, so that the terminal device determines the first moment of the first downlink message based on information in the second message.
(69) 116. Determine the first moment based on the second message.
(70) Specifically, the terminal device receives the second message sent by the network device, and determines the first moment of the first downlink message based on the information in the second message.
(71) Optionally, the cell time service information further includes a multicast-radio network temporary identifier TG-RNTI of the second message. The terminal device receives, based on the TG-RNTI, the second message sent by the network device, where the second message includes the first moment.
(72) Specifically, the network device sends the first downlink message on the resource location that is of the first downlink message and that is indicated in the cell time service information, and records the first moment. After broadcasting the first downlink message, the network device broadcasts or multicasts the second message to a terminal device that needs a time service. The second message carries the first moment. The terminal device receives the second message and obtains the first moment.
(73) Optionally, the cell granting information further includes an initial timestamp of the network device, and the initial timestamp is a start moment corresponding to an initial time unit of a frame period. In other words, after determining the initial timestamp of the first downlink message, the terminal device can accurately calculate an expected moment of the first moment.
(74) Specifically, the terminal device determines the expected moment of the first moment based on the initial timestamp of the first downlink message, so that the terminal device determines the first moment based on the expected moment of the first moment.
(75) Optionally, the terminal device determines the expected moment of the first moment based on the start absolute time and according to the following formula, and the terminal device determines the first moment based on the expected moment of the first moment:
T.sub.1exp=T+n×t.sub.1+m×t.sub.2 (5)
(76) where T.sub.1exp represents the expected moment of the first moment, T represents the initial timestamp, n represents a frame number of the first downlink message, m represents a subframe number of the first downlink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe.
(77) Optionally, in an LTE system, the initial timestamp may be a start absolute time of a subframe #0 in a frame #0.
(78) It should be understood that specific values of t.sub.1 and t.sub.2 are not limited in this embodiment of the present disclosure. For example, in the long term evolution system, t.sub.1=10 ms, t.sub.2=1 ms, and T.sub.1exp=T+(frame number×10 ms)+(subframe number×1 ms). For another example, in a frame structure that may appear in the future, a time length of a frame is 20 ms, and a time length of a subframe is 5 ms. Then, in this embodiment of the present disclosure, t.sub.1=20 ms, and t.sub.2=5 ms.
(79) In an embodiment, the cell time service information further includes a multicast-radio network temporary identifier TG-RNTI of the second message. The terminal device receives, based on the TG-RNTI, the second message sent by the network device, where the second message includes a value of an offset between the first moment and the expected moment of the first moment. The terminal device determines the first moment based on the expected moment of the first moment and according to the following formula:
T.sub.1=T.sub.1exp+ΔT.sub.1 (6)
(80) where T.sub.1 represents the first moment, and ΔT.sub.1 represents the value of the offset between the first moment and the expected moment of the first moment.
(81) In other words, the network device may alternatively deduce the expected moment of the first moment based on the initial timestamp of the first downlink message and according to the formula (5), then determine the value of the offset (ΔT.sub.1) between T.sub.1exp and T.sub.1, and finally, send ΔT.sub.1 to the terminal device in a form of the second message.
(82) In this embodiment of the present disclosure, it is avoided that the network device sends the complete T.sub.1 to the terminal device, and the network device only needs to send ΔT.sub.1 to the terminal device, so that the first moment of the first downlink message can be determined. This effectively reduces transmission overheads of an air interface.
(83) To further reduce information exchange between the network device and the terminal device, it is avoided that the network device sends the second message to the terminal device.
(84) Optionally, the terminal device determines the expected moment of the first moment as the first moment.
(85) It should be understood that
(86) For example, the second message may alternatively include only index information. The terminal device determines the first moment based on the index information, or determines the value of the offset between the first moment and the expected moment of the first moment based on the index information, or the like.
(87) As shown in
(88) 120. The terminal device determines a third moment of a first uplink message, and determines a fourth moment of the first uplink message.
(89) Specifically, the terminal device determines the third moment of the first uplink message, and determines the fourth moment of the first uplink message, where the third moment is a start moment of a time unit used by the terminal device to send the first uplink message, and the fourth moment is a start moment of a time unit used by the network device to receive the first uplink message.
(90)
(91) Optionally, as shown in
(92) 121. Send the first uplink message.
(93) Specifically, the terminal device sends the first uplink message to the network device.
(94) Optionally, before step 121, the network device receives a resource request message sent by the terminal device, where the request message is used to request the network device to allocate a resource location to the first uplink message. The network device sends response information to the terminal device based on the resource request message, where the response information includes uplink resource information of the first uplink message. The network device receives, based on the uplink resource information, the first uplink message sent by the terminal device.
(95) 122. Determine the third moment of the first uplink message.
(96) Specifically, for the first uplink message, the terminal device sends the first uplink message on an uplink resource indicated in the response message of the resource request message, and records a sending moment, namely, the third moment.
(97) In other words, the terminal device can record the third moment of the first uplink message when sending the first uplink message, and the terminal device only needs to determine the fourth moment of the first uplink message.
(98) 123. Determine the fourth moment of the first uplink message, and generate a response message of the first uplink message based on the fourth moment.
(99) Specifically, the network device determines the fourth moment of the first uplink message, and generates the response message of the first uplink message based on the fourth moment, so that the terminal device can determine the fourth moment based on the received response message of the first uplink message.
(100) Specifically, the network device determines a detection moment of the first uplink message and a value of an offset between the detection moment of the first uplink message and the fourth moment, and determines the fourth moment according to the following formula (7):
T.sub.4=T.sub.4′−Δt.sub.u (7)
(101) where T.sub.4 represents the fourth moment, T.sub.4′ represents the detection moment of the first uplink message, and Δt.sub.u represents the value of the offset between the detection moment of the first uplink message and the fourth moment.
(102) Optionally, the response message of the first uplink message includes the fourth moment, or the response message of the first uplink message includes a value of an offset between an expected moment of the fourth moment and the fourth moment.
(103) Specifically, the network device sends the fourth moment or the value of the offset between the expected moment of the fourth moment and the fourth moment to the terminal device in a form of the response message of the first uplink message.
(104) Optionally, the response message of the first uplink message includes the fourth moment.
(105) Specifically, the network device listens to the first uplink message, records the detection moment of the fourth moment of the first uplink message, and determines the fourth moment based on the detection moment of the fourth moment. The network device sends the response message of the first uplink message to the terminal device, where the response message of the first uplink message carries the fourth moment. The terminal device receives the response message of the first uplink message, and learns the fourth moment.
(106) Optionally, the response message of the first uplink message includes the value of the offset between the expected moment of the fourth moment and the fourth moment.
(107) Specifically, the network device may determine the expected moment of the fourth moment according to the following formula (8), and determine the value of the offset between the expected moment of the fourth moment and the fourth moment according to the following formula (9):
T.sub.4exp=T+a×t.sub.1+b×t.sub.2 (8) and
ΔT.sub.4=T.sub.4−T.sub.4exp (9)
(108) where T represents the initial timestamp, a represents a frame number of the first uplink message, b represents a subframe number of the first uplink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe; ΔT.sub.4 represents the value of the offset between the expected moment of the fourth moment and the fourth moment, T.sub.4 represents the fourth moment, and T.sub.4exp represents the expected moment of the fourth moment.
(109) In other words, when receiving the response message that includes the value of the offset between the expected moment of the fourth moment and the fourth moment, the terminal device may determine the expected moment of the fourth moment according to the formula (8), and determine the fourth moment according to the following formula (10):
T.sub.4=T.sub.4exp+T.sub.4 (10)
(110) It should be understood that, in this embodiment of the present disclosure, the initial timestamp corresponding to the first downlink message is equal to the initial timestamp corresponding to the first uplink message, but this embodiment of the present disclosure is not limited there to. For example, the first downlink message and the first uplink message may be carried in different radio frame periods. In other words, the initial timestamp corresponding to the first downlink message may be unequal to the initial timestamp corresponding to the first uplink message.
(111) 124. Send the response message of the first uplink message.
(112) Specifically, the network device sends the response message of the first uplink message to the terminal device.
(113) 125. Determine the fourth moment based on the response message of the first uplink message.
(114) Specifically, the network device sends the response message of the first uplink message to the terminal device, and the terminal device determines the fourth moment based on the received response message of the first uplink message.
(115) It should be understood that
(116) For example, the response message of the first uplink message may alternatively include only index information. The terminal device determines the fourth moment based on the index information, or determines the value of the offset between the fourth moment and the expected time of the fourth moment based on the index information, or the like.
(117) As shown in
(118) 130. The terminal device determines a time offset between the terminal device and the network device based on the first moment, the second moment, the third moment, and the fourth moment.
(119) Specifically, the terminal device can determine the time offset between the terminal device and the network device after determining the first moment, the second moment, the third moment, and the fourth moment.
(120) Optionally, the terminal device adjusts a clock of the terminal device based on the time offset.
(121) It should be understood that sequence numbers in
(122) The foregoing describes the time service method in the embodiment of the present disclosure with reference to
(123)
(124) As shown in
(125) a first determining unit 210, configured to: determine a first moment of a first downlink message, and determine a second moment of the first downlink message, where the first moment is a start moment of a time unit used by a network device to send the first downlink message, and the second moment is a start moment of a time unit used by the terminal device to receive the first downlink message;
(126) a second determining unit 220, configured to: determine a third moment of a first uplink message, and determine a fourth moment of the first uplink message, where the third moment is a start moment of a time unit used by the terminal device to send the first uplink message, and the fourth moment is a start moment of a time unit used by the network device to receive the first uplink message; and
(127) a third determining unit 230, configured to determine a time offset between the terminal device and the network device based on the first moment, the second moment, the third moment, and the fourth moment.
(128) According to the time service method provided in this embodiment of the present disclosure, uplink and downlink propagation delays are considered for the terminal device, and a time service based on absolute time can be provided for the terminal device by using the first moment and the second moment of the first downlink message and the third moment and the fourth moment of the first uplink message, thereby effectively reducing a time service error.
(129) Optionally, the terminal device 200 further includes:
(130) a transceiver unit, configured to: before the terminal device determines the first moment and the second moment of the first downlink message, receive cell time service information sent by the network device, where the cell time service information includes downlink resource information of the first downlink message; and receive, based on the downlink resource information, the first downlink message sent by the network device.
(131) Optionally, the transceiver unit is specifically configured to receive system information block SIB information broadcast by the network device, where the SIB information includes the cell time service information.
(132) Optionally, the cell time service information further includes a multicast-radio network temporary identifier TG-RNTI of a second message, and the first determining unit 210 is specifically configured to receive, based on the TG-RNTI, the second message sent by the network device, where the second message includes the first moment.
(133) Optionally, the cell granting information further includes an initial timestamp of the network device, and the initial timestamp is a start moment corresponding to an initial time unit of a frame period.
(134) Optionally, the first determining unit 210 is specifically configured to: determine an expected moment of the first moment based on the start absolute time and according to the following formula (11); and determine the first moment based on the expected moment of the first moment:
T.sub.1exp=T+n×t.sub.1+m×t.sub.2 (11), where
(135) T.sub.1exp represents the expected moment of the first moment, T represents the initial timestamp, n represents a frame number of the first downlink message, m represents a subframe number of the first downlink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe.
(136) Optionally, the cell time service information further includes a multicast-radio network temporary identifier TG-RNTI of a second message, and the first determining unit 210 is specifically configured to: receive, based on the TG-RNTI, the second message sent by the network device, where the second message includes a value of an offset between the first moment and the expected moment of the first moment; and determine the first moment based on the expected moment of the first moment and according to the following formula (12):
T.sub.1=T.sub.1exp+ΔT.sub.1 (12), where
(137) T.sub.1 represents the first moment, and ΔT.sub.1 represents the value of the offset between the first moment and the expected moment of the first moment.
(138) In this embodiment of the present disclosure, it is avoided that the network device sends a complete first moment to the terminal device, and the network device only needs to send the value of the offset between the first moment and the expected moment of the first moment to the terminal device, so that the first moment of the first downlink message can be determined. This effectively reduces transmission overheads of an air interface.
(139) Optionally, the first determining unit 210 is specifically configured to determine the expected moment of the first moment as the first moment.
(140) In this embodiment of the present disclosure, to further reduce information exchange between the network device and the terminal device, it is avoided that the network device sends the second message to the terminal device.
(141) Optionally, the second determining unit 220 is specifically configured to: determine a detection moment of the first downlink message, where the detection moment of the first downlink message is a start moment of receiving, by the terminal device, the first downlink message; determine a value of an offset between the detection moment of the first downlink message and the second moment; and determine the second moment according to the following formula (13):
T.sub.2=T.sub.2′−Δt.sub.d (13), where
(142) T.sub.2 represents the second moment, T.sub.2′ represents the detection moment of the first downlink message, and Δt.sub.d represents the value of the offset between the detection moment of the first downlink message and the second moment.
(143) Optionally, the transceiver unit is further configured to receive a response message that is of the first uplink message and that is sent by the network device, where the response message of the first uplink message includes the fourth moment, or the response message of the first uplink message includes a value of an offset between an expected moment of the fourth moment and the fourth moment.
(144) Optionally, the response message of the first uplink message includes the value of the offset between the expected moment of the fourth moment and the fourth moment, and the second determining unit 220 is specifically configured to determine the fourth moment according to the following formula (14):
T.sub.4=T.sub.4exp+ΔT.sub.4 (14), where
(145) T.sub.4exp represents the expected moment of the fourth moment, T.sub.4 represents the fourth moment, and ΔT.sub.4 represents the value of the offset between the expected moment of the fourth moment and the fourth moment.
(146) In this embodiment of the present disclosure, it is avoided that the network device sends a complete fourth moment to the terminal device, and the network device only needs to send the value of the offset between the fourth moment and the expected moment of the fourth moment to the terminal device, so that the fourth moment of the first uplink message can be determined. This effectively reduces transmission overheads of the air interface.
(147) Optionally, before the second determining unit 220 determines the fourth moment, the second determining unit 220 is specifically configured to determine the expected moment of the fourth moment according to the following formula (15):
T.sub.4exp=T+a×t+b×t.sub.2 (15), where
(148) T represents the initial timestamp, a represents a frame number of the first uplink message, b represents a subframe number of the first uplink message, t.sub.1 represents a time length of a frame, and t.sub.2 represents a time length of a subframe.
(149) Optionally, before the second determining unit 220 determines the third moment of the first uplink message, the transceiver unit is further configured to: send a resource request message to the network device, where the request message is used to request the network device to allocate a resource location to the first uplink message; receive response information that is of the resource request message and that is sent by the network device, where the response information of the resource request message includes uplink resource information of the first uplink message; and send the first uplink message to the network device based on the uplink resource information.
(150) Optionally, the third determining unit 230 is specifically configured to determine the time offset according to the following formula (16):
O=(T.sub.1−T.sub.2−T.sub.3+T.sub.4)/2 (16), where
(151) O represents the time offset, T.sub.1 represents the first moment, T.sub.2 represents the second moment, T.sub.3 represents the third moment, and T.sub.4 represents the fourth moment.
(152) Optionally, the terminal device further includes a setting unit, configured to adjust a clock of the terminal device based on the time offset.
(153) It should be noted that, in this embodiment of the present disclosure, the first determining unit 210, the second determining unit 220, and the third determining unit 230 all may be implemented by using a processor. As shown in
(154) The terminal device 300 shown in
(155)
(156) As shown in
(157) a processing unit 410, configured to: determine a first moment of a first downlink message, where the first moment is a start moment of a time unit used by the network device to send the first downlink message; and generate a second message based on the first moment, where the second message includes the first moment, or the second message includes a value of an offset between an expected moment of the first moment and the first moment; and
(158) a transceiver unit 420, configured to send the second message to a terminal device.
(159) Optionally, before the processing unit 410 determines the first moment of the first downlink message, the transceiver unit 420 is further configured to: send cell time service information to the terminal device, where the cell granting information includes downlink resource information of the first downlink message; and send the first downlink message to the terminal device based on the downlink resource information.
(160) Optionally, the transceiver unit 420 is specifically configured to broadcast system information block SIB information to the terminal device, where the SIB information includes the cell time service information.
(161) Optionally, the second message includes the value of the offset between the expected moment of the first moment and the first moment. The processing unit 410 is specifically configured to: determine the value of the offset between the expected moment of the first moment and the first moment according to the following formula (17); and generate the second message, where the second message includes the value of the offset between the expected moment of the first moment and the first moment:
ΔT.sub.1=T.sub.1−T.sub.1exp (17), where
(162) ΔT.sub.1 represents the value of the offset between the expected moment of the first moment and the first moment, T.sub.1 represents the first moment, and T.sub.1exp represents the expected moment of the first moment.
(163) Optionally, the processing unit 410 is further configured to: determine a fourth moment of a first uplink message, where the fourth moment is a start moment of a time unit used by the network device to receive the first uplink message; and generate a response message of the first uplink message based on the fourth moment, where the response message of the first uplink message includes the fourth moment, or the response message of the first uplink message includes a value of an offset between an expected moment of the fourth moment and the fourth moment; and
(164) the transceiver unit 420 is further configured to send the response message of the first uplink message to the terminal device.
(165) Optionally, the processing unit 410 is specifically configured to: determine a detection moment of the first uplink message, where the detection moment of the first uplink message is a start moment of receiving, by the terminal device, the first uplink message; determine a value of an offset between the detection moment of the first uplink message and the fourth moment; and determine the fourth moment according to the following formula (18):
T.sub.4=T.sub.4′−Δt.sub.u (18), where
(166) T.sub.4 represents the fourth moment, T.sub.4′ represents the detection moment of the first uplink message, and Δt.sub.u represents the value of the offset between the detection moment of the first uplink message and the fourth moment.
(167) Optionally, the processing unit 410 is specifically configured to: determine the value of the offset between the expected moment of the fourth moment and the fourth moment according to the following formula (19); the network device generates a response message of the first uplink message, where the response message of the first uplink message includes the value of the offset between the expected moment of the fourth moment and the fourth moment:
ΔT.sub.4=T.sub.4−T.sub.4exp (19), where
(168) ΔT.sub.4 represents the value of the offset between the expected moment of the fourth moment and the fourth moment, T.sub.4 represents the fourth moment, and T.sub.4exp represents the expected moment of the fourth moment.
(169) Optionally, before the processing unit 410 determines the fourth moment of the first uplink message, the transceiver unit 420 is further configured to: receive a resource request message sent by the terminal device, where the request message is used to request the network device to allocate a resource location to the first uplink message; send response information to the terminal device based on the resource request message, where the response information includes uplink resource information of the first uplink message; and receive, based on the uplink resource information, the first uplink message sent by the terminal device.
(170) It should be noted that in this embodiment of the present disclosure, the processing unit 410 may be implemented by a processor. As shown in
(171) The network device 500 shown in
(172) It should be further understood that terms used in the embodiments and the appended claims of the present disclosure are merely used to describe specific embodiments rather than limiting the embodiments of the present disclosure.
(173) For example, the term “and/or” in the embodiments of the present disclosure describes only an association relationship for describing associated objects and represents that three relationships may exist. Specifically, A and/or B may represent the following three cases: Only A exists, both A and B exist, and only B exists. In addition, the character “/” in this specification generally indicates an “or” relationship between the associated objects.
(174) For another example, the terms “a”, “the”, and “this” of singular forms used in the embodiments and the appended claims of the present disclosure are also intended to include plural forms, unless otherwise specified in the context clearly.
(175) A person of ordinary skill in the art may be aware that units and algorithm steps in the examples described with reference to the embodiments disclosed in this specification may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the embodiments of the present disclosure.
(176) It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, reference may be made to a corresponding process in the foregoing method embodiment, and details are not described herein again.
(177) In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
(178) The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual requirements to achieve the objectives of the embodiments of the present disclosure. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.
(179) When the functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the embodiments of the present disclosure essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in the embodiments of the present disclosure. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disc.
(180) The foregoing content is merely specific implementations of the embodiments of the present disclosure, but the protection scope of the embodiments of the present disclosure is not limited thereto. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the embodiments of the present disclosure shall fall within the protection scope of the embodiments of the present disclosure. Therefore, the protection scope of the embodiments of present disclosure shall be subject to the protection scope of the claims.