WO2018177320A1 - Clock processing method, access network device and terminal device - Google Patents

Clock processing method, access network device and terminal device Download PDF

Info

Publication number
WO2018177320A1
WO2018177320A1 PCT/CN2018/080836 CN2018080836W WO2018177320A1 WO 2018177320 A1 WO2018177320 A1 WO 2018177320A1 CN 2018080836 W CN2018080836 W CN 2018080836W WO 2018177320 A1 WO2018177320 A1 WO 2018177320A1
Authority
WO
WIPO (PCT)
Prior art keywords
timestamp
signal
data packet
terminal device
access network
Prior art date
Application number
PCT/CN2018/080836
Other languages
French (fr)
Chinese (zh)
Inventor
杨坤
温容慧
于光炜
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018177320A1 publication Critical patent/WO2018177320A1/en

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
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a clock processing method, an access network device, and a terminal device.
  • multiple intelligent robots work together. At this time, multiple robots need to have unified clock information to achieve coordinated work.
  • Multiple robots typically perform clock synchronization using the Precision Clock Synchronization Protocol standard of the Network Measurement and Control System (Institute of Electrical and Electronics Engineers 1588, IEEE 1588).
  • the IEEE 1588 protocol is a clock synchronization scheme designed for the application layer of a wired network.
  • the IEEE1588 protocol uses the data packets of the application layer to transmit synchronization information, and needs to be performed multiple times in the synchronization process.
  • the data packet interaction therefore, can not effectively utilize the time-frequency resources of the wireless network, thereby leading to the inability to achieve high-accuracy clock synchronization.
  • the embodiment of the invention provides a clock processing method, an access network device and a terminal device, so as to realize efficient use of time-frequency resources of the wireless network and provide high-precision clock synchronization.
  • an embodiment of the present invention provides a clock processing method, including: determining a first timestamp for transmitting a first signal to a terminal device; and receiving, by the terminal device, a second signal corresponding to the first signal, determining Receiving a fourth timestamp of the second signal; transmitting, to the terminal device, a data packet including the first timestamp and the fourth timestamp, where the data packet is used to cause the terminal device to adjust the local clock of the terminal device.
  • the two time stamps are combined into one transmission, and the time-frequency resources of the wireless network are utilized efficiently, thereby improving the accuracy of clock synchronization.
  • the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process
  • the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process.
  • the configuration information of the first signal to be transmitted and the configuration information of the second signal are configured; the first signal is sent to the terminal device according to the configuration information of the first signal; and the detection is performed according to the configuration information of the second signal.
  • the second signal to be received, configuring the configuration information of the first signal and the second signal ensures the certainty of the first signal and the second signal and the uniqueness of the second signal.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the fourth timestamp is corrected for time processing, the recording time deviation of the timestamp is corrected, and the accuracy of the fourth timestamp is improved.
  • the first time stamp and the fourth time stamp are compensated for time processing, which increases the hardware processing time of signal reception and/or transmission, improves the accuracy of the time stamp, and prevents leakage of device information.
  • the correction time processing includes: correcting the time offset between the recording of the fourth timestamp and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
  • the first timestamp and the fourth timestamp are used to generate a first type of data packet, and the first type of data packet is sent to the terminal device; or the first timestamp and the fourth timestamp are weighted Processing to generate a second type of data packet, and sending a second type of data packet to the terminal device; or performing differential processing on the first timestamp and the fourth timestamp to generate a third type of data packet, and sending the third type to the terminal device
  • the data packet processes the first timestamp and the fourth timestamp in various forms, which increases the reliability of the timestamp, thereby improving the accuracy of clock synchronization.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match and verifying whether the third timestamp and the fourth timestamp are
  • the second timestamp is a timestamp of the second signal received by the terminal device
  • the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device to ensure the authenticity of the timestamp, thereby improving the accuracy of the clock synchronization. degree.
  • an embodiment of the present invention provides a clock processing method, including: receiving a first signal sent by an access network device, determining a second timestamp for receiving the first signal, and transmitting a first signal to the access network device. Corresponding second signal, determining a third timestamp for transmitting the second signal; receiving a data packet sent by the access network device and including the first timestamp and the fourth timestamp; adjusting the local clock according to the data packet; wherein, A timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
  • the two time stamps are combined into one transmission, and the time-frequency resources of the wireless network are utilized efficiently, thereby improving the accuracy of clock synchronization.
  • the configuration information of the first signal and the configuration information of the second signal sent by the access network device are received; the first signal to be received is detected according to the configuration information of the first signal; and the configuration according to the second signal
  • the information transmits a second signal corresponding to the first signal to the access network device, and configures configuration information of the first signal and the second signal to ensure the certainty of the first signal and the second signal and the uniqueness of the second signal.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process;
  • the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process.
  • the second time stamp is corrected for time processing, the time stamp recording deviation is corrected, and the accuracy of the fourth time stamp is improved.
  • the second time stamp and the third time stamp are compensated for time processing, the hardware processing time of signal reception and/or transmission is increased, the time stamp accuracy is improved, and device information leakage is also prevented.
  • the correction time processing includes: correcting the time offset between the recording of the second timestamp and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
  • the data packet is parsed to determine the type and timestamp information corresponding to the data packet; wherein, the type of the data packet is one of the following types: the first type generated by the first timestamp and the fourth timestamp a data packet, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; timestamp information
  • the information processed by the first timestamp and the fourth timestamp is included, the type of the data packet is determined, and the formula for calculating the clock deviation is conveniently determined.
  • the data packet further includes verification information; parsing the data packet to obtain verification information; and verifying whether the timestamp information matches according to the verification information; wherein the verification information is used to verify at least one of: verifying the first timestamp and Whether the second timestamp matches, and verifying whether the third timestamp and the fourth timestamp match, ensuring the authenticity of the timestamp, thereby improving the accuracy of clock synchronization.
  • the calculation formula of the corresponding clock deviation is determined according to the type of the data packet; the local clock is determined relative to the access network based on the calculation formula, the timestamp information, the second timestamp and the third timestamp.
  • a third aspect of the present invention provides a clock processing method, including: determining a first timestamp for transmitting a first signal to a terminal device; receiving a second signal corresponding to the first signal sent by the terminal device, determining Receiving a fourth timestamp of the second signal; receiving a data packet that is sent by the terminal device and including the second timestamp and the third timestamp; determining, according to the data packet, the first timestamp, and the fourth timestamp, the terminal device relative to the access network
  • the clock deviation of the device is sent to the terminal device, and the clock deviation is used to instruct the terminal device to adjust the local clock of the terminal device according to the clock deviation; wherein, the second timestamp is a timestamp of the terminal device receiving the first signal, and the third time
  • the time stamp is used to send the second signal to the terminal device, and the two time stamps are combined into one transmission, thereby effectively utilizing the time-frequency resources of the wireless network, thereby improving the accuracy of the clock synchronization.
  • the data packet is parsed to determine the type and timestamp information corresponding to the data packet; wherein the data packet type is one of the following types: the first type generated by the first timestamp and the fourth timestamp a data packet, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp;
  • the information includes information processed by the second timestamp and the third timestamp, determining the type of the data packet, and facilitating determination of a formula for calculating the clock deviation.
  • the data packet further includes verification information; parsing the data packet to obtain verification information; and verifying whether the timestamp information matches according to the verification information; wherein the verification information is used to verify at least one of: verifying the first timestamp and Whether the second timestamp matches, and verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is the terminal device transmitting the first time to the access network device
  • the time stamp of the two signals ensures the authenticity of the time stamp, thereby improving the accuracy of clock synchronization.
  • the calculation formula of the corresponding clock deviation is determined according to the type of the data packet; and the clock of the terminal device is determined based on the calculation formula, the timestamp information, the first timestamp and the fourth timestamp.
  • the clock deviation of the clock of the network access device determines the corresponding clock deviation formula according to different packet types, thereby improving the accuracy of calculating the clock deviation.
  • the configuration information of the first signal to be transmitted and the configuration information of the second signal are configured; the first signal is sent to the terminal device according to the configuration information of the first signal; and the detection is performed according to the configuration information of the second signal.
  • the second signal to be received, configuring the configuration information of the first signal and the second signal ensures the certainty of the first signal and the second signal and the uniqueness of the second signal.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process
  • the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process.
  • the fourth timestamp is corrected for time processing, the recording time deviation of the timestamp is corrected, and the accuracy of the fourth timestamp is improved.
  • the first time stamp and the fourth time stamp are compensated for time processing, which increases the hardware processing time of signal reception and/or transmission, improves the accuracy of the time stamp, and prevents leakage of device information.
  • the correction time processing includes correcting the time offset of the fourth timestamp from which the second signal record is received and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
  • a fourth aspect of the present invention provides a clock processing method, including: receiving a first signal sent by an access network device, determining a second timestamp for receiving the first signal, and transmitting the first time to the access network device. Determining a second signal corresponding to the signal, determining a third timestamp for transmitting the second signal; transmitting, to the access network device, a data packet including the second timestamp and the third timestamp; and determining, by the receiving access network device, the data packet according to the data packet Clock skew, adjusting the local clock based on the clock skew.
  • receiving configuration information of the first signal and the second signal sent by the access network device detecting, according to the configuration information of the first signal, whether there is a first signal to be received; and arranging according to the configuration information of the second signal
  • the network access device sends the second signal corresponding to the first signal, and combines the two time stamps into one transmission, thereby efficiently utilizing the time-frequency resources of the wireless network, thereby improving the accuracy of the clock synchronization.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process;
  • the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process.
  • the second time stamp is corrected for time processing, the time stamp recording deviation is corrected, and the accuracy of the fourth time stamp is improved.
  • the second time stamp and the third time stamp are compensated for time processing, the hardware processing time of signal reception and/or transmission is increased, the time stamp accuracy is improved, and device information leakage is also prevented.
  • the correction time processing includes correcting the time offset of the second timestamp from which the first signal record is received and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
  • the second timestamp and the third timestamp generate a first type of data packet, and send a first type of data packet to the access network device; or, for the second timestamp and the third timestamp Performing a weighting process to generate a second type of data packet, and transmitting a second type of data packet to the access network device; or performing differential processing on the second timestamp and the third timestamp to generate a third type of data packet, and accessing
  • the network device sends the third type of data packet, and processes the first timestamp and the fourth timestamp in various forms, which increases the reliability of the timestamp, thereby improving the accuracy of clock synchronization.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying the third timestamp and the fourth timestamp Whether the first timestamp is the timestamp of the first signal sent by the access network device, and the fourth timestamp is the timestamp of the second signal received by the access network device, ensuring the authenticity of the timestamp, thereby improving the accuracy of the clock synchronization. degree.
  • a fifth aspect of the present invention is an access network device, where the access network device includes: a processing unit, configured to determine a first timestamp for transmitting a first signal to the terminal device; and a receiving unit, configured to receive, by the terminal device, a second signal corresponding to the first signal; the processing unit is further configured to determine a fourth timestamp for receiving the second signal, and the sending unit is configured to send, to the terminal device, the first timestamp and the fourth timestamp A data packet, which is used to enable the terminal device to adjust the local clock of the terminal device.
  • the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process; the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process. .
  • the processing unit is further configured to configure configuration information of the first signal and the second signal to be sent, and the sending unit is further configured to send the first signal to the terminal device according to the configuration information of the first signal;
  • the processing unit is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the processing unit is further configured to perform a modified time processing on the fourth time stamp.
  • the processing unit is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  • the correction time processing includes: correcting the time offset between the recording of the fourth timestamp and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
  • the processing unit is further configured to generate the first type of data packet by using the first timestamp and the fourth timestamp, and control the sending unit to send the first type of data packet to the terminal device; or Performing a weighting process on the first timestamp and the fourth timestamp to generate a second type of data packet, and controlling the sending unit to send the second type of data packet to the terminal device; or performing differential processing on the first timestamp and the fourth timestamp
  • the third type of data packet and controls the sending unit to send a third type of data packet to the terminal device.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying the third timestamp and the fourth timestamp Whether the second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
  • a terminal device includes: a receiving unit, configured to receive a first signal sent by an access network device, where the processing unit is configured to determine a second timestamp for receiving the first signal; a sending unit, configured to send a second signal corresponding to the first signal to the access network device; the processing unit is further configured to determine a third timestamp for transmitting the second signal, and the receiving unit is further configured to receive, by the access network device, a data packet including a first timestamp and a fourth timestamp; the processing unit is further configured to adjust the local clock according to the data packet; wherein the first timestamp is a timestamp of the first signal sent by the access network device, and fourth The timestamp is a timestamp of the access network device receiving the second signal.
  • the receiving unit is further configured to receive the configuration information of the first signal and the configuration information of the second signal that are sent by the access network device
  • the processing unit is further configured to detect, according to the configuration information of the first signal, whether
  • the transmitting unit is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process.
  • the processing unit is further configured to perform a modified time processing on the second time stamp.
  • the processing unit is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  • the correction time processing includes: correcting the time offset between the recording of the second timestamp and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
  • the processing unit is further configured to parse the data packet, and determine the type and timestamp information corresponding to the data packet; wherein the data packet type is one of the following types: by the first timestamp and the fourth time Stamping the generated first type of data packet, weighting the first time stamp and the fourth time stamp to generate a second type of data packet, and performing a differential processing on the first time stamp and the fourth time stamp to generate a third type
  • the timestamp information includes information processed after the first timestamp and the fourth timestamp.
  • the data packet further includes verification information; the processing unit is further configured to parse the data packet to obtain verification information; and the processing unit is further configured to verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used for Verify at least one of the following: verify that the first timestamp and the second timestamp match, and verify that the third timestamp and the fourth timestamp match.
  • the processing unit is further configured to determine, when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; and determine, based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp.
  • the clock skew of the local clock relative to the access network device clock; the local clock is adjusted based on the clock skew.
  • a seventh aspect of the present invention provides an access network device, where the access network device includes: a processing unit, configured to determine a first timestamp for transmitting a first signal to the terminal device; and a receiving unit, configured to receive, by the terminal device, a second signal corresponding to the first signal; the processing unit is further configured to determine a fourth timestamp for receiving the second signal, and the receiving unit is further configured to receive, by the terminal device, the second timestamp and the third timestamp a processing unit, configured to determine, according to the data packet, the first timestamp and the fourth timestamp, a clock offset of the terminal device relative to the access network device; and a sending unit, configured to send the clock offset to the terminal device, the clock The deviation is used to instruct the terminal device to adjust the local clock of the terminal device according to the clock offset; wherein the second timestamp is a timestamp of the terminal device receiving the first signal, and the third timestamp is a timestamp of the second signal sent by the terminal device.
  • the processing unit is further configured to parse the data packet, and determine the type and timestamp information corresponding to the data packet; wherein the type of the data packet is one of the following types: the first timestamp and the fourth time a first type of data packet generated by the timestamp, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third time generated by differential processing of the first timestamp and the fourth timestamp A type of data packet; the timestamp information includes information processed for the second timestamp and the third timestamp.
  • the data packet further includes verification information; the processing unit is further configured to parse the data packet to obtain verification information; and the processing unit is further configured to verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used for Verifying at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal, and the third The timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
  • the processing unit is further configured to: when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine the terminal based on the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp.
  • the processing unit is further configured to configure configuration information of the first signal to be sent and configuration information of the second signal
  • the sending unit is further configured to send the first signal to the configuration information according to the first signal.
  • the processing unit is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process; the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process. .
  • the processing unit is further configured to perform a modified time processing on the fourth time stamp.
  • the processing unit is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  • the correction time processing includes correcting the time offset of the fourth timestamp from which the second signal record is received and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
  • a terminal device includes: a receiving unit, configured to receive a first signal sent by an access network device; and a processing unit, configured to determine a second timestamp for receiving the first signal; a sending unit, configured to send a second signal corresponding to the first signal to the access network device; the processing unit is further configured to determine a third timestamp for transmitting the second signal; and the receiving unit is further configured to access the network device Transmitting a data packet including a second timestamp and a third timestamp; the processing unit is further configured to receive a clock offset determined by the access network device according to the data packet, and adjust the local clock according to the clock offset.
  • the receiving unit is further configured to receive the configuration information of the first signal and the configuration information of the second signal that are sent by the access network device
  • the processing unit is further configured to detect, according to the configuration information of the first signal, whether
  • the transmitting unit is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process.
  • the processing unit is further configured to perform a modified time processing on the second time stamp.
  • the processing unit is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  • the correction time processing includes correcting the time offset of the second timestamp from which the first signal record is received and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
  • the processing unit is further configured to generate a first type of data packet by using the second timestamp and the third timestamp, and control the sending unit to send the first type of data packet to the access network device; or Weighting the second timestamp and the third timestamp to generate a second type of data packet, and controlling the sending unit to send the second type of data packet to the access network device; or, for the second timestamp and the third timestamp Performing differential processing to generate a third type of data packet, and controlling the transmitting unit to send a third type of data packet to the access network device.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying the third timestamp and the fourth timestamp Whether the first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
  • an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement the steps of the method described in the above aspects.
  • an embodiment of the present invention provides a communication system, where the system includes the terminal device and the access network device.
  • an embodiment of the present invention provides a computer readable storage medium, configured to store computer software instructions used by the access network device, where the method includes: configured to control the access network device to perform the foregoing aspects. program of.
  • an embodiment of the present invention provides a computer readable storage medium for storing computer software instructions for the terminal device, which includes a program designed to control the terminal device to perform the above aspects.
  • the clock processing scheme provided by the embodiment of the present invention sends the first timestamp and the fourth timestamp to the terminal device in a combined manner, and the terminal device calculates the clock offset, or uses the second timestamp and the third timestamp to The combined mode is sent to the access network device in one time, and the access network device calculates the clock offset; the utilization of the time-frequency resource is improved, and the time-frequency resources of the wireless network are more efficiently utilized to implement clock synchronization.
  • FIG. 1 is a scene diagram of an application of a clock processing scheme according to an embodiment of the present invention
  • FIG. 2 is a schematic interaction diagram of a method for clock processing according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for clock processing according to an embodiment of the present invention.
  • FIG. 4 is a schematic interaction diagram of another method for clock processing according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of another method for clock processing according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of an access network device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an entity of an access network device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a physical structure of a terminal device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of an application scenario of a clock processing scheme according to an embodiment of the present invention. As shown in FIG. 1, specifically, an access network device and one or more terminal devices are included.
  • the access network device and the terminal device may be connected in a wireless manner; wherein the access network device has a standard clock, and the access network device is responsible for providing a standard clock reference to the terminal device.
  • the clock processing method of the embodiment of the present invention can be applied to a wireless cellular communication network system (such as a Global System of Mobile communication (GSM) system, a Wideband Code Division Multiple Access (WCDMA) system, and a long-term In a Long Term Evolution (LTE), 5G communication system, a high-precision standard clock is provided for a terminal device connected to the wireless cellular communication network system.
  • GSM Global System of Mobile communication
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • 5G communication system a high-precision standard clock is provided for a terminal device connected to the wireless cellular communication network system.
  • the access network device in the embodiment of the present invention may have multiple types, but the access network device must have a standard clock, such as an Evolved Node B (eNB), a relay station, etc.; the terminal device may include any type of Equipment, such as User Equipment (UE), robots, etc.
  • eNB Evolved Node B
  • UE User Equipment
  • the robot first accesses the access network device, and then obtains the standard clock information through the access network device.
  • the step of the robot acquiring the standard clock information through the access network device is as follows:
  • the access network device sends a signal to the robot and records the transmission timestamp T 1 of the signal; the robot receives the signal and records the reception time stamp T 2 , and returns a signal to the access network device, and records the transmission of the signal. Time stamp T 3 ; the access network device receives the signal and records the reception timestamp T 4 .
  • the access network device Between the access network device sends a signal to the robot and the robot returns a signal to the access network device, the access network device needs to send the signal transmission timestamp T 1 recorded by the access network device to the robot; the access network device records After receiving the time stamp T 4 , the time stamp T 4 is also sent to the robot.
  • the robot calculates the clock deviation of the robot from the access network device according to the received time stamp T 1 and the time stamp T 4 and the time stamp T 2 and the time stamp T 3 recorded by the robot end, and then adjusts the robot local according to the clock deviation. clock.
  • FIG. 2 is a schematic interaction diagram of a method for clock processing according to an embodiment of the present invention. As shown in Figure 2, the method includes the following steps:
  • the access network device determines a first timestamp for transmitting the first signal to the terminal device.
  • the terminal device establishes information interaction with the access network device by accessing the access network device.
  • the access network device transmits a first signal to the terminal device, transmitting a first recording signal to make a first timestamp T 1, wherein the access network device may be, but is not limited to: a base station, a relay station; first signal may be , but not limited to timing reference signals such as Sync Signal.
  • the terminal device receives the first signal, and determines a second timestamp for receiving the first signal.
  • the terminal device After transmitting a first signal to the device the access network terminal device, the terminal device receives the first signal, and determining a second timestamp of the first received signal for T 2, wherein the first signal may be, but is not limited to a timing reference signal, Such as Sync Signal.
  • the terminal device sends a second signal corresponding to the first signal to the access network device, and determines a third timestamp for transmitting the second signal.
  • a terminal device to a second signal corresponding to a first access network device transmits a signal, transmits a second signal to determine a third time stamp as T 3, wherein the second signal may be, but is not limited to a timing reference signal, such as Delay_req Signal.
  • the first signal is a downlink signal, that is, a signal sent by the access network device to the terminal device
  • the second signal is an uplink signal, that is, the terminal device sends the signal to the access network device.
  • the timing relationship between the downlink signal and the uplink signal can be set according to the actual situation, such as in the order of S201-S202-S203, and in the order of S201-S203-S202 (ie, issued on the access network device)
  • the terminal device sends the second signal to the access network device, which is not specifically limited in this embodiment.
  • the access network device receives the second signal sent by the terminal device, and determines a fourth timestamp for receiving the second signal.
  • the terminal device to the access network device transmits a second signal, the second access network device receives the signal, and determines a fourth time stamp the received second signal for T 4, wherein the second signal may be, but is not limited to the timing reference Signal, such as Delay_req Signal.
  • the access network device sends, to the terminal device, a data packet that includes a first timestamp and a fourth timestamp.
  • the terminal device adjusts a local clock of the terminal device according to the data packet.
  • the first timestamp and the fourth timestamp are sent to the terminal device in the form of a data packet, and the data packet may be processed in multiple manners, such as directly
  • the first timestamp and the fourth timestamp are combined, and the first timestamp and the fourth timestamp are weighted and combined, and the like.
  • the terminal device After receiving the data packet, the terminal device processes the data packet, determines timestamp information that includes the first timestamp and the fourth timestamp in the data packet, and combines the second timestamp and the third timestamp recorded by the terminal device.
  • the terminal device determines a processing result of the local clock and the access network device clock, and the terminal device adjusts the local clock according to the processing result to synchronize the local clock with the clock of the access network device.
  • the clock processing method provided by the embodiment of the present invention sends the first timestamp and the fourth timestamp to the terminal device in a combined manner in one time, thereby improving the utilization rate of the time-frequency resource, thereby using the wireless more efficiently.
  • the method shown in FIG. 3 further includes:
  • the access network device configures configuration information of the first signal to be sent and configuration information of the second signal.
  • the access network device configures the first signal to be sent according to the information of the terminal device (such as the device parameter of the terminal device).
  • the configuration information of the two signals includes at least one of a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the period of the signal is the transmission period of the first signal or the second signal, such as 50 ms;
  • the type of the signal may be, but not limited to, a Cell-Specific Reference Signal (CRS), and a Demodulation Reference Signal (DeModulation Reference Signal) , DMRS), Sounding Reference Signal (SRS), LTE/LTE-A system signals such as Random Access CHannel (RACH), or reference signals that can be multiplexed in 5G NR, or A specially designed reference signal for clock synchronization;
  • the type of the antenna port for transmitting the signal may be, but not limited to, a signal transmission port 0 to 3 corresponding to the CRS, a signal transmission port 7 to 14 corresponding to the DMRS, and a signal transmission port corresponding to the SRS. 10, 20, 21, 40, 41, 42, 43;
  • the frame information corresponding to the signal is the frame number and the subframe number corresponding to the signal, such as the CRS transmitted when the 5th subframe of each even frame is configured as the Sync Signal
  • the CRS can be used as the first signal (ie, the downlink signal), the SRS and the RACH can be used as the second signal (ie, the uplink signal), and other forms of the signal can be used as the first signal or the first signal.
  • the second signal is not specifically limited in this embodiment.
  • the access network device after configuring the configuration information of the first signal and the second signal, sends the configuration information to the terminal device accessing the access network device, where the type of the configuration information may be, but is not limited to,
  • the initial message where the initial message is the dynamic or semi-static scheduling information, may be, but is not limited to, broadcast, multicast, or unicast by the access network device to send the configuration information to the terminal device.
  • the access network device sends the first signal to the terminal device according to the configuration information of the first signal.
  • the access network device determines, according to the configuration information of the first signal, the sending period of the first signal, the type of the signal, the sending port, and the frame information corresponding to the signal, and sends the first signal to the terminal device according to the convention, such as the first signal Sync Signal
  • the CRS the transmission period is 50 ms
  • the transmission port is 0 to 3.
  • the frame information corresponding to the appointment signal is that the CRS is transmitted in the fifth subframe of the even frame.
  • the manner in which the access network device sends the first signal may be, but is not limited to, broadcast or multicast.
  • configuring the configuration information of the first signal and the second signal can ensure the certainty of the first signal and the second signal, that is, ensuring that the access network device sends the first signal to the terminal device, and the terminal device accesses
  • the flow and signal characteristics of the network device returning the second signal are clearly defined; the uniqueness of the second signal can also be ensured, that is, a second signal is uniquely corresponding to a first signal.
  • the access network device in S204 may perform detection according to the configured configuration information of the second signal, that is, whether the second signal sent by the terminal device is to be received. If the second signal to be received is determined according to the frame information, when the second signal to be received is detected, S204 is performed.
  • S207 and S208 can be performed before S201.
  • the access network device determines a first timestamp and a fourth timestamp, and the terminal device determines that the second timestamp and the third timestamp are as follows:
  • the determining, by the access network device, the first timestamp and the fourth timestamp may be performed by: when the first signal is sent by the access network device, the time point corresponding to the setting step in the first signal start or completion sending process is recorded as the first time A timestamp; when the access network device receives the second signal, the time point corresponding to the setting step in the receiving or completing the receiving process is recorded as the fourth timestamp.
  • the determining, by the terminal device, the second timestamp and the third timestamp may be specifically as follows:
  • the time point corresponding to the setting step in the first signal start or completion receiving process is recorded as the second timestamp; when the terminal device sends the second signal, the second signal starts or completes in the sending process.
  • the time point corresponding to the setting step is recorded as the third time stamp.
  • the sending or receiving process of the signal includes multiple steps, such as grouping, symbol generation, conversion, frequency conversion, etc.; therefore, the timestamp corresponding to the first signal starting or completing the setting step may be determined in multiple ways, for example, It is agreed that when the first signal completes the digital to analog (D/A) processing step, the marked point (time point) is recorded as the first time stamp, and other processing steps may be performed in addition to the digital to analog conversion processing step. Such as grouping, symbol generation, conversion, frequency conversion, etc.
  • the manner of determining the second timestamp, the third timestamp, and the fourth timestamp is similar to that of the first timestamp, and is not described herein.
  • the method shown in FIG. 3 further includes:
  • the access network device performs a modified time processing on the fourth timestamp.
  • the correction time processing includes: correcting the time deviation between the fourth time stamp and the actual arrival time of the second signal, and specifically determining the time deviation e by:
  • the signal received by the access network device is:
  • Estimating channel impulse response by frequency domain correlation detection Determine the true arrival time of the signal x(n).
  • the deviation e of the start time of the received signal from the true arrival time of the signal can be determined, and the time deviation e 4 when the fourth time stamp is recorded can be determined.
  • the method shown in FIG. 3 further includes:
  • the access network device performs compensation time processing on the first timestamp and the fourth timestamp.
  • the step of compensating time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to recording the fourth timestamp. Average time.
  • the compensation time processing is the hardware processing time of the signal, which can be determined according to the specific model of the device by means of table lookup, that is, the hardware processing time is a set value, which is determined when the device is shipped from the factory.
  • T 1,fixed T 1 +T tx,m
  • T tx,m is the average time from the recording of the first timestamp to the access signal of the access network device.
  • T 4,fixed T 4 -T rx,m
  • T rx,m is the average time from receiving the second signal to the access network device to recording the fourth timestamp.
  • the priority of the correction time processing and the compensation time processing may be set, for example, the time processing is performed on the time stamp first, and then the time stamp is compensated for the time processing; here, it is not specifically limited.
  • processing steps of S205 specifically include the following:
  • the first timestamp and the fourth timestamp are processed to generate a data packet, and the type of the data packet includes: the first type, the second type, and the third type, and the access
  • the process of generating a data packet by the network device and sending the data packet to the terminal device is as follows: generating a first type of data packet by using the first timestamp and the fourth timestamp, and sending the first type of data packet to the terminal device; or The first time stamp and the fourth time stamp perform a weighting process to generate a second type of data packet, and send a second type of data packet to the terminal device; or perform differential processing on the first time stamp and the fourth time stamp to generate a third type of data packet A data packet that transmits a third type of data packet to the terminal device.
  • the setting can be set according to actual needs.
  • the manner of generating the foregoing three types of data packets may be selected according to actual needs, which is not specifically limited in this embodiment of the present invention.
  • the manner in which the data packet is sent may be, but is not limited to, unicast or multicast, and the data packet may be a message, such as follow_up Message.
  • the data packet of the previous cycle can be sent together with the timing reference signal of the current cycle.
  • the verification information may be further added to the data packet, where the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, or Verifying that the third timestamp and the fourth timestamp match; the verification information may be, but is not limited to, an ID (Identification) number, a frame number, or a subframe number of the terminal device, eg, a frame number verification according to the first signal.
  • the first timestamp and the second timestamp may be further added to the data packet, where the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, or Verifying that the third timestamp and the fourth timestamp match; the verification information may be, but is not limited to, an ID (Identification) number, a frame number, or a subframe number of the terminal device, eg, a frame number verification according to the first signal.
  • the first timestamp and the second timestamp may be further added to the data packet, where the verification information
  • the method shown in FIG. 3 further includes:
  • the terminal device performs a modified time processing on the second timestamp.
  • the step of correcting the time processing includes: correcting the time deviation between the recording of the second timestamp and the actual arrival time of the first signal, as follows:
  • the terminal device performs compensation time processing on the second timestamp and the third timestamp.
  • the terminal device performs compensation time processing on the second timestamp T 2 and the third time stamp T 3 , that is, compensates for hardware processing time of the first signal and the second signal, such as reducing reception of the first signal from the terminal device to recording the second time stamp.
  • the average time, and the average time from the recording of the third timestamp to the transmission of the second signal by the terminal device as follows:
  • T 2,fixed T 2 -T rx,s
  • T rx,s is an average time from receiving the first signal to the terminal device to recording the second time stamp
  • T 3,fixed T 3 +T tx,s
  • T tx s is the average time from the recording of the third timestamp to the transmission of the second signal by the terminal device.
  • the terminal device performs compensation time processing on the second timestamp and the third timestamp, and performs correction time processing on the second timestamp, and performs compensation time processing on the first timestamp and the fourth timestamp by referring to the access network device, and The correction time processing is performed on the fourth time stamp, and the specific principle is not described herein.
  • S211-S212 may be executed in any order between S202-S216, which is not specifically limited in this embodiment.
  • the method may also be performed separately, for example, the access network device performs compensation time processing on the first timestamp immediately after determining the first timestamp, and then determines the fourth timestamp and then the fourth time.
  • the stamping is performed by the compensation time processing and the correction time processing; for details, the processing steps of the compensation time processing and the correction time may be referred to by the access network device, and details are not described herein.
  • the method shown in FIG. 3 further includes:
  • the terminal device receives a data packet that is sent by the access network device and includes a first timestamp and a fourth timestamp.
  • the terminal device parses the data packet, and determines a type and timestamp information corresponding to the data packet.
  • the terminal device After receiving the data packet, the terminal device parses the data packet to determine a corresponding type and timestamp information.
  • the data packet type includes: a first type, a second type, and a third type; the timestamp information includes The first timestamp and the fourth timestamp processed information.
  • the weighting factor is expressed.
  • the setting of the weighting factor can be set according to actual needs.
  • the parsed data packet when it is determined that the parsed data packet contains the verification information, it is also required to verify whether the time stamp matches according to the verification information, such as verifying whether the first timestamp and the second timestamp match, and Verifying that the third timestamp and the fourth timestamp match, may be verified according to the ID number of the terminal device, the frame number of the first signal, or the subframe number of the second signal, and when the verification does not match, the timestamp will not match. Delete, re-acquire new timestamp data as the detection object.
  • S206 specifically includes the following:
  • the terminal device determines a calculation formula of the corresponding clock offset according to the type of the data packet.
  • the terminal device determines a clock offset of the local clock relative to the access network device based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp.
  • Each type of data packet corresponds to one or more calculation formulas for calculating the clock offset. Therefore, it is necessary to determine the corresponding data according to the type of the data packet.
  • the formula for calculating the clock deviation is as follows:
  • the timestamp information, the second timestamp, and the third timestamp are substituted into the corresponding calculation formula, and the clock deviation of the local clock of the terminal device relative to the access network device is calculated.
  • the terminal device adjusts the local clock according to the clock offset.
  • the terminal device adjusts the local clock according to the calculated clock offset to synchronize the local clock of the terminal device with the access network device. For example, when the clock deviation is positive, the terminal device slows down the local clock. When the clock deviation is negative, The terminal device speeds up the local clock.
  • the deviation when recording the timestamp is corrected, and the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp are corrected.
  • compensation time processing increasing signal hardware processing time and recording time deviation, so that the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp are more accurate, thereby improving the accuracy of the clock synchronization scheme;
  • the hardware processing time is added, and the hardware parameters of the access network device or the terminal device are also prevented from being leaked; the access network device combines the first timestamp and the fourth timestamp into one data packet and sends the data packet to the terminal device, which can save the wireless network.
  • Time-frequency resources simplify scheduling overhead, shorten the completion time of a single process, improve the efficiency of clock synchronization, and add verification information to the data packet to ensure the matching degree of the first timestamp and the second timestamp, the third timestamp and the fourth
  • the matching of time stamps reduces errors and improves the accuracy of clock synchronization.
  • FIG. 4 is a schematic interaction diagram of another method for clock processing according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:
  • the access network device determines a first timestamp for transmitting the first signal to the terminal device.
  • the terminal device receives the first signal sent by the access network device, and determines a second timestamp for receiving the first signal.
  • the terminal device sends a second signal corresponding to the first information to the access network device, and determines a third timestamp for transmitting the second signal.
  • the access network device receives the second signal sent by the terminal device, and determines a fourth timestamp for receiving the second signal.
  • the access network device receives a data packet that is sent by the terminal device and includes a second timestamp and a third timestamp.
  • the access network device determines, according to the data packet, the first timestamp, and the fourth timestamp, a clock offset of the terminal device relative to the access network device.
  • the access network device sends a clock offset to the terminal device.
  • the terminal device adjusts a local clock of the terminal device according to a clock offset.
  • the computing power of the access network device is stronger than that of the terminal device. Therefore, the access network device calculates a fast speed and the calculation accuracy is high.
  • the embodiment sends a data packet to the terminal device.
  • the calculation scheme for calculating the clock deviation by the network access device is similar to the calculation scheme for the terminal device to calculate the clock offset in the above embodiment.
  • S405 is the same as the principle of S205 in the foregoing embodiment, except that the execution subject is different from the data packet, and S205 is that the access network device sends the data packet including the first timestamp and the fourth timestamp, and S405 is sent by the terminal device.
  • the data packet includes the second timestamp and the third timestamp, because S405 can refer to S205 here, and no further description is made.
  • S406 is different from S214 in the foregoing embodiment in that S214 calculates a clock offset for the terminal device, and S406 calculates a clock offset for the access network device, and the calculation formulas and parameters of the two are the same. Therefore, S406 can refer to S214, where , do not repeat.
  • the access network device needs to send the clock offset to the terminal device through S407, to instruct the terminal device to perform S408 to adjust the local clock of the terminal device according to the clock offset.
  • the local clock of the terminal device is synchronized with the access network device.
  • the terminal device sends the first timestamp and the third timestamp to the access network device in a combined manner, thereby improving the utilization of the time-frequency resource and further improving the efficiency.
  • the time-frequency resources of the wireless network are utilized, and the access network device is faster than the terminal device, and the calculation accuracy is high.
  • the method shown in FIG. 5 further includes:
  • the access network device configures configuration information of the first signal to be sent and configuration information of the second signal.
  • the access network device sends the first signal to the terminal device according to the configuration information of the first signal.
  • S409 and S410 may be performed before S401, and S409 and S410 may refer to S207 and S208 in the foregoing embodiment, and details are not described herein.
  • the method shown in FIG. 5 further includes:
  • the terminal device performs correction time processing on the second timestamp.
  • the terminal device performs compensation time processing on the second timestamp and the third timestamp.
  • S411 can refer to S211 in the foregoing embodiment, and S412 can refer to S212 in the foregoing embodiment, and details are not described herein.
  • the method shown in FIG. 5 further includes:
  • the access network device performs a modified time processing on the fourth timestamp.
  • the access network device performs compensation time processing on the first timestamp and the fourth timestamp.
  • S406 may include the following processing steps:
  • the access network device parses the data packet, and determines a type and timestamp information corresponding to the data packet.
  • the access network device determines a calculation formula of the corresponding clock offset according to the type of the data packet.
  • the access network device determines a clock offset of the local clock relative to the access network device based on the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp.
  • the S415-S417 is different from the S214-S216 in the foregoing embodiment in that the executor is different, and the foregoing embodiment is performed by the terminal.
  • This embodiment is implemented by the access network device, and the principle of the processing is the same, and details are not described herein.
  • the access network device sends a clock offset to the terminal device.
  • the terminal device adjusts a local clock of the terminal device according to a clock offset.
  • the terminal device sends the first timestamp and the third timestamp to the access network device in a combined manner, thereby improving the utilization of the time-frequency resource and further improving the efficiency.
  • the time-frequency resources of the wireless network are utilized, and the access network device is faster than the terminal device, and the time stamp is compensated for time processing and corrected time processing, thereby improving the accuracy of the time stamp, thereby improving the accuracy of the time deviation.
  • the compensation time processing can also prevent the leakage of the parameters of the access network device and the terminal device, and the verification information added in the data packet can ensure the matching degree of the first timestamp and the second timestamp, the third timestamp and the fourth timestamp.
  • the degree of matching reduces errors and improves the accuracy of clock synchronization.
  • the solution of the embodiment of the present invention is mainly introduced from the perspective of interaction between the access network device and the terminal device.
  • the access network device, the terminal device, and the like in order to implement the above functions, include hardware structures and/or software modules corresponding to each function.
  • the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the embodiments of the present invention may perform functional unit division on an access network device, a terminal device, and the like according to the foregoing method.
  • each functional unit may be divided according to each function, or two or more functions may be integrated into one processing.
  • the above integrated unit can be implemented either in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 6 shows a possible structural diagram of the access network device involved in the above embodiment.
  • the access network device 600 may include a processing unit 601, a receiving unit 602, and a sending unit 603.
  • the processing unit 601 is configured to determine a first timestamp for transmitting the first signal to the terminal device, and the receiving unit 602 is configured to receive, by the terminal device, a second signal corresponding to the first signal, where the processing unit 601 is further configured to determine to receive a fourth timestamp of the second signal; the sending unit 603 is configured to send, to the terminal device, a data packet that includes the first timestamp and the fourth timestamp, where the data packet is used to enable the terminal device to adjust the local clock of the terminal device.
  • the access network device 600 of this embodiment has the function of the access network device in FIG. 2, and can implement the operations performed by the access network device in S201-S205 in FIG. 2, thereby implementing the technical effect of the S201-S205 corresponding clock processing method.
  • S201-S205 in FIG. 2 for a brief description, and details are not described herein.
  • the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
  • the processing unit 601 is further configured to configure the configuration information of the first signal to be sent and the configuration information of the second signal
  • the sending unit 603 is further configured to send the first signal to the terminal according to the configuration information of the first signal.
  • the processing unit 601 is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the processing unit 601 is further configured to perform a modified time processing on the fourth timestamp.
  • the processing unit 601 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  • the modifying the time processing comprises: correcting a time deviation between the recording of the fourth timestamp and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device to transmit the first signal, or reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
  • the processing unit 601 is configured to generate a first type of data packet by using the first timestamp and the fourth timestamp, and control the sending unit 603 to send the first type of data packet to the terminal device; or, for the first time And performing a weighting process on the stamp and the fourth timestamp to generate a second type of data packet, and controlling the sending unit 603 to send the second type of data packet to the terminal device; or performing differential processing on the first timestamp and the fourth timestamp to generate the first Three types of data packets, and the control transmitting unit 603 transmits a third type of data packet to the terminal device.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match;
  • the second timestamp is a timestamp of the terminal device receiving the second signal
  • the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
  • the access network device 600 including the foregoing unit has the function of the access network device in the clock processing method shown in FIG. 3, and can perform the operations performed by the access network device in S207-S217, thereby implementing the S207-S217 corresponding clock processing method.
  • S207-S217 in FIG. 3 for the sake of brevity, and details are not described herein.
  • processing unit 601, the receiving unit 602, and the sending unit 603 in the access network device 600 are also used to perform other operations, as follows:
  • the processing unit 601 is configured to determine a first timestamp for transmitting the first signal to the terminal device, and the receiving unit 602 is configured to receive a second signal that is sent by the terminal device and corresponding to the first signal.
  • the processing unit 601 is further configured to determine Receiving a fourth timestamp of the second signal;
  • the receiving unit 602 is further configured to receive a data packet that is sent by the terminal device and includes the second timestamp and the third timestamp;
  • the processing unit 601 is further configured to use the data packet, the first time
  • the stamp and the fourth timestamp determine the clock offset of the terminal device relative to the access network device;
  • the sending unit 603 is configured to send the clock offset to the terminal device, and the clock offset is used to instruct the terminal device to adjust the local clock of the terminal device according to the clock offset.
  • the second timestamp is a timestamp of the terminal device receiving the first signal
  • the third timestamp is a timestamp of the second signal sent by the terminal device.
  • the access network device 600 of the present embodiment has the functions of the access network device in S401-S408 in the foregoing embodiment, and can perform all the actions of the access network device in S401-S408, thereby implementing the technology of the S401-S408 corresponding clock processing method.
  • S401-S408 in FIG. 4 for the sake of brevity, and details are not described herein.
  • the processing unit 601 is further configured to parse the data packet, and determine a type and timestamp information corresponding to the data packet;
  • the type of the data packet is one of the following types: a first type of data packet generated by the first timestamp and the fourth timestamp, and a second type generated by weighting the first timestamp and the fourth timestamp.
  • the data packet is a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; the timestamp information includes information processed after the second timestamp and the third timestamp.
  • the data packet further includes verification information; the processing unit 601 is further configured to parse the data packet to obtain the verification information, and the processing unit 601 is further configured to verify, according to the verification information, whether the timestamp information matches;
  • the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; the second timestamp is that the terminal device receives the second signal.
  • the timestamp, the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
  • the processing unit 601 is further configured to: when the verification is matched, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine, according to the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp, the terminal device The clock skew of the clock relative to the access network device clock.
  • the processing unit 601 is further configured to configure configuration information of the first signal and the second signal to be sent, and the sending unit 603 is further configured to send the first signal to the terminal device according to the configuration information of the first signal;
  • the unit 601 is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
  • the processing unit 601 is further configured to perform a modified time processing on the fourth timestamp.
  • the processing unit 601 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  • the correcting time processing comprises: correcting a time offset of the fourth timestamp from which the second signal recording is started to be received and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
  • the access network device 600 including the foregoing unit has the function of the access network device in the clock processing method shown in FIG. 5, and can perform all actions of the access network device in S409-S408, thereby implementing the S409-S408 corresponding clock processing method.
  • S409-S408 in FIG. 5 for a brief description, and details are not described herein.
  • the processing unit 601 in the access network device 600 can be a processor/controller, the receiving unit 602 can be a receiver, and the sending unit 603 can be a transmitter. As shown in FIG. 7, the connection involved in the foregoing embodiment is shown in FIG. A physical schematic diagram of one possible design structure of a networked device.
  • Access network device 600 includes a transmitter 701, a receiver 702, a controller/processor 703, a memory 704, and a modem processor 705.
  • the controller/processor 703 can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (ASIC). Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the program or instructions for executing FIG. 2 or FIG. 4 are stored in the memory 704, and the specific steps in FIG. 2 or FIG. 4 are performed by the controller/processor 703; as determined by the controller/processor 703 to transmit the first to the terminal device a first timestamp of the signal; the receiver 702 receives a second signal corresponding to the first signal transmitted by the terminal device, the controller/processor 703 determines a fourth timestamp for receiving the second signal; the transmitter 701 transmits to the terminal device
  • the data packet includes a first timestamp and a fourth timestamp, and the data packet is used to enable the terminal device to adjust the local clock of the terminal device.
  • the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
  • controller/processor 703 is further configured to configure configuration information of the first signal and the second signal to be sent, and the transmitter 701 is further configured to send the first signal to the terminal according to the configuration information of the first signal.
  • the device 702 is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • controller/processor 703 is further configured to perform a modified time processing on the fourth timestamp.
  • controller/processor 703 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  • the modifying the time processing comprises: correcting a time deviation between the recording of the fourth timestamp and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device to transmit the first signal, or reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
  • the controller/processor 703 is further configured to generate the first type of data packet by using the first timestamp and the fourth timestamp, and control the transmitter 701 to send the first type of data packet to the terminal device; or Weighting the first timestamp and the fourth timestamp to generate a second type of data packet, and controlling the transmitter 701 to send the second type of data packet to the terminal device; or, performing the first timestamp and the fourth timestamp
  • the differential processing generates a third type of data packet and controls the transmitter 701 to transmit a third type of data packet to the terminal device.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match;
  • the second timestamp is a timestamp of the terminal device receiving the second signal
  • the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
  • the first timestamp of transmitting the first signal to the terminal device is determined by the controller/processor 703; the receiver 702 receives the second signal corresponding to the first signal sent by the terminal device; the controller/processor 703 determines Receiving a fourth timestamp of the second signal; the receiver 702 receives the data packet that is sent by the terminal device and includes the second timestamp and the third timestamp; the controller/processor 703 is based on the data packet, the first timestamp, and the fourth time Determining a clock offset of the terminal device relative to the access network device; the transmitter 701 sends the clock offset to the terminal device to instruct the terminal device to adjust the local clock of the terminal device according to the clock offset; wherein the second timestamp is the terminal device receiving the first The timestamp of a signal, and the third timestamp is a timestamp of the second signal sent by the terminal device.
  • the controller/processor 703 is further configured to parse the data packet, determine a type and timestamp information corresponding to the data packet, where the type of the data packet is one of the following types: the first timestamp and the first The first type of data packet generated by the fourth timestamp, the second type of data packet generated by weighting the first timestamp and the fourth timestamp, and the first timestamp and the fourth timestamp are differentially processed to generate the first Three types of data packets; the timestamp information includes information processed after the second timestamp and the third timestamp.
  • the data packet further includes verification information; the controller/processor 703 is further configured to parse the data packet to obtain verification information; and verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify at least one of the following: : verifying whether the first timestamp and the second timestamp match or verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is the terminal device direction The timestamp of the second signal sent by the access network device.
  • the controller/processor 703 is further configured to parse the data packet to obtain verification information; and verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify at least one of the following: : verifying whether the first timestamp and the second timestamp match or verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal,
  • the controller/processor 703 is configured to: when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine the terminal based on the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp.
  • controller/processor 703 is further configured to configure configuration information of the first signal and the second signal to be sent, and the transceiver is further configured to send the first signal to the terminal device according to the configuration information of the first signal. And detecting, according to the configuration information of the second signal, whether there is a second signal to be received.
  • the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  • the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
  • controller/processor 703 is further configured to perform a modified time processing on the fourth timestamp.
  • controller/processor 703 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  • the correcting time processing comprises: correcting a time offset of the fourth timestamp from which the second signal recording is started to be received and the actual arrival time of the second signal.
  • the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device to transmit the first signal, or reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
  • modem processor 705 is used for encoding and modulating signals, and demodulating and decoding the signals.
  • the foregoing access network device 700 can be used as an access network device in the clock processing method shown in FIG. 3, and executes S207-S217, which can implement the technical effect of the S207-S217 corresponding clock processing method; and can also be used as the clock shown in FIG.
  • the access network device in the processing method performs S409-S408, and the technical effects of the S409-S408 corresponding clock processing method can be implemented, and details are not described herein.
  • FIG. 8 is a schematic diagram showing a possible structure of a terminal device involved in the foregoing embodiment.
  • the terminal device 800 includes a receiving unit 801, a processing unit 802, and a sending unit 803.
  • the receiving unit 801 is configured to receive a first signal sent by the access network device, the processing unit 802 is configured to determine a second timestamp for receiving the first signal, and the sending unit 803 is configured to send the first signal to the access network device. a corresponding second signal; the processing unit 802 is further configured to determine a third timestamp for transmitting the second signal, and the receiving unit 801 is further configured to receive, by the access network device, the first timestamp and the fourth timestamp
  • the processing unit 802 is further configured to adjust the local clock according to the data packet, where the first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is the second timestamp of the access network device receiving the second signal. Timestamp.
  • the terminal device 800 of the present embodiment has the functions of the terminal device in S201-S205 in the foregoing embodiment, and can perform all the actions of the terminal device in S201-S205, thereby implementing the technical effects of the S201-S205 corresponding clock processing method.
  • 2 S201-S205 for the sake of brevity, hereby, no further description is given.
  • the receiving unit 801 is further configured to receive the configuration information of the first signal and the configuration information of the second signal that are sent by the access network device, and the processing unit 802 is further configured to detect, according to the configuration information of the first signal, whether it is to be received.
  • the first signal; the sending unit 803 is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process
  • the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
  • the processing unit 802 is further configured to perform a modified time processing on the second timestamp.
  • the processing unit 802 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  • the correcting time processing includes: correcting a time deviation between the recording of the second timestamp and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of: reducing an average time from receiving the first signal from the terminal device to recording the second timestamp, and increasing from transmitting the third timestamp to transmitting the second signal by the terminal device Average time.
  • the processing unit 802 is further configured to parse the data packet, and determine a type and timestamp information corresponding to the data packet;
  • the type of the data packet is one of the following types: a first type of data packet generated by the first timestamp and the fourth timestamp, and a second type generated by weighting the first timestamp and the fourth timestamp.
  • the data packet is a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; the timestamp information includes information processed after the first timestamp and the fourth timestamp.
  • the data packet further includes verification information; the processing unit 802 is further configured to parse the data packet to obtain verification information; and the processing unit 802 is configured to verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify the following At least one of: verifying whether the first timestamp and the second timestamp match, or verifying whether the third timestamp and the fourth timestamp match.
  • the processing unit 802 is further configured to: determine, when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine the local clock based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp. Clock skew relative to the access network device clock; local clock is adjusted based on clock skew.
  • the terminal device 800 including the above unit has the function of the terminal device in the clock processing method shown in FIG. 3, and can perform all the actions of the terminal device in S207-S217, thereby implementing the technical effects of the S207-S217 corresponding clock processing method. Referring to S207-S217 in FIG. 3, for the sake of brevity, no further description is provided herein.
  • the receiving unit 801, the processing unit 802, and the sending unit 803 in the terminal device 800 shown in FIG. 8 can also be used to perform other operations, as follows:
  • the receiving unit 801 is configured to receive a first signal sent by the access network device, the processing unit 802 is configured to determine a second timestamp for receiving the first signal, and the sending unit 803 is configured to send the first signal to the access network device. a corresponding second signal; the processing unit 802 is further configured to determine a third timestamp for transmitting the second signal, and the receiving unit 801 is further configured to send, to the access network device, the second timestamp and the third timestamp. a data packet; a processing unit 802, configured to receive a clock offset determined by the access network device according to the data packet, and adjust the local clock according to the clock offset.
  • the terminal device 800 of the present embodiment has the functions of the terminal device in S401-S408 in the foregoing embodiment, and can perform all the actions of the terminal device in S401-S408, thereby implementing the technical effects of the S401-S408 corresponding clock processing method.
  • S401-S408 in 4 for the sake of brevity, hereby is not described.
  • the receiving unit 801 is further configured to receive configuration information of the first signal and the second signal sent by the access network device, where the processing unit 802 is configured to detect, according to the configuration information of the first signal, whether the first signal to be received is received.
  • the sending unit 803 is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process
  • the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
  • the processing unit 802 is further configured to perform a modified time processing on the second timestamp.
  • the processing unit 802 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  • the correcting time processing comprises: correcting a time offset of the second timestamp from which the first signal record is received and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of: reducing an average time from receiving the first signal to the second time stamp by the terminal device, and increasing an average time from recording the third time stamp to transmitting the second signal by the terminal device .
  • the processing unit 802 is configured to generate a first type of data packet by using the second timestamp and the third timestamp, and control the sending unit 803 to send the first type of data packet to the access network device; or
  • the second timestamp and the third timestamp perform a weighting process to generate a second type of data packet, and control the sending unit 803 to send a second type of data packet to the access network device; or, perform the second timestamp and the third timestamp
  • the differential processing generates a third type of data packet, and the control transmitting unit 803 transmits a third type of data packet to the access network device.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, or verifying whether the third timestamp and the fourth timestamp match;
  • the first timestamp is a timestamp of the first signal sent by the access network device
  • the fourth timestamp is a timestamp of the second signal received by the access network device.
  • the terminal device 800 including the above-mentioned unit has the function of the terminal device in the clock processing method shown in FIG. 5, and can perform all the actions of the terminal device in S409-S408, thereby implementing the technical effect of the S409-S408 corresponding clock processing method. Referring to S409-S408 in FIG. 5, for the sake of brevity, no further details are provided herein.
  • the processing unit 801 in the terminal device 800 shown in FIG. 8 may be a controller/processor, the receiving unit 801 may be a receiver, and the sending unit 803 may be a transmitter.
  • the terminal involved in the foregoing embodiment is shown.
  • the controller/processor 903 is a processor or a controller, and may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application- Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the program or instruction for executing FIG. 2 or FIG. 4 is stored in the memory 904, and the specific steps in FIG. 2 or FIG. 4 are performed by the controller/processor 903; for example, the first signal transmitted by the access network device is received by the receiver 902.
  • the controller/processor 903 determines a second timestamp to receive the first signal; the transmitter 901 transmits a second signal corresponding to the first signal to the access network device; the controller/processor 903 determines to transmit the second signal a third timestamp; the receiver 902 receives the data packet that is sent by the access network device and includes the first timestamp and the fourth timestamp; the controller/processor 903 adjusts the local clock according to the data packet; wherein the first timestamp is The timestamp of the first signal sent by the network access device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
  • the receiver 902 is further configured to receive configuration information of the first signal sent by the access network device and configuration information of the second signal, and detect whether the first signal to be received is received according to the configuration information of the first signal; 901.
  • the 901 is further configured to send, according to configuration information of the second signal, a second signal corresponding to the first signal to the access network device.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process
  • the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
  • controller/processor 903 is further configured to perform a modified time processing on the second timestamp.
  • controller/processor 903 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  • the correcting time processing includes: correcting a time deviation between the recording of the second timestamp and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of: reducing an average time from receiving the first signal to the second timestamp from the terminal device or increasing an average from recording the third timestamp to transmitting the second signal by the terminal device time.
  • the controller/processor 903 is further configured to parse the data packet, determine a type and timestamp information corresponding to the data packet, where the type of the data packet is one of the following types: the first timestamp and the fourth a first type of data packet generated by the timestamp, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third time generated by differential processing of the first timestamp and the fourth timestamp A type of data packet; the timestamp information includes information processed for the first timestamp and the fourth timestamp.
  • the data packet further includes verification information; the controller/processor 903 is further configured to parse the data packet to obtain verification information; and verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify at least one of the following: : Verify that the first timestamp and the second timestamp match, or verify that the third timestamp and the fourth timestamp match.
  • the controller/processor 903 is configured to determine, according to the type of the data packet, a calculation formula for determining a corresponding clock offset when the verification is matched; determining, based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp.
  • the clock skew of the local clock relative to the access network device clock; the local clock is adjusted based on the clock skew.
  • the first signal sent by the access network device is received by the receiver 902; the controller/processor 903 determines a second timestamp for receiving the first signal; and the transmitter 901 sends the first signal corresponding to the access network device.
  • the network device determines the clock offset based on the data packet; the controller/processor 903 adjusts the local clock based on the clock offset.
  • the receiver 902 is further configured to receive configuration information of the first signal and the second signal sent by the access network device, and detect whether there is a first signal to be received according to the configuration information of the first signal, and the transmitter 901 further And configured to send, according to the configuration information of the second signal, a second signal corresponding to the first signal to the access network device.
  • the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process
  • the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
  • controller/processor 903 is further configured to perform a modified time processing on the second timestamp.
  • controller/processor 903 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  • the modifying the time processing comprises: correcting a time deviation of the recording of the second timestamp of the first signal record and the actual arrival time of the first signal.
  • the compensation time processing includes at least one of: reducing an average time from receiving the first signal to the second time stamp by the terminal device, or increasing an average time from recording the third time stamp to transmitting the second signal by the terminal device .
  • the controller/processor 903 is configured to generate a first type of data packet by using the second timestamp and the third timestamp, and control the transmitter 901 to send the first type of data packet to the access network device; or And weighting the second timestamp and the third timestamp to generate a second type of data packet, and controlling the transmitter 901 to send the second type of data packet to the access network device; or, for the second timestamp and the third timestamp
  • the time stamp performs differential processing to generate a third type of data packet, and controls the transmitter 901 to transmit a third type of data packet to the access network device.
  • the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match;
  • the first timestamp is a timestamp of the first signal sent by the access network device
  • the fourth timestamp is a timestamp of the second signal received by the access network device.
  • modem processor 805 is used for encoding and modulating signals, and demodulating and decoding the signals.
  • the terminal device 900 can be used as the terminal device in the clock processing method shown in FIG. 3, and S207-S217 can be implemented to implement the technical effects of the S207-S217 corresponding clock processing method; and can also be used as the clock processing method in FIG.
  • the terminal device, executing S409-S408, can implement the technical effects of the S409-S408 corresponding clock processing method, and details are not described herein.
  • An embodiment of the present invention provides a computer readable storage medium for storing computer software instructions used by an access network device as described in FIG. 3 or FIG. 5, which is configured to control an access network device to perform the foregoing aspects. program.
  • An embodiment of the present invention provides a computer readable storage medium for storing computer software instructions for a terminal device as described in FIG. 3 or FIG. 5, which includes a program designed to control a terminal device to perform the above aspects.
  • Embodiments of the present invention provide a computer program product comprising instructions for causing a computer to perform functions performed by an access network device in a method design as described in FIG. 3 or FIG. 5 when the program is executed by a computer.
  • Embodiments of the present invention provide a computer program product comprising instructions that, when executed by a computer, cause a computer to perform functions performed by a terminal device in a method design as described in FIG. 3 or FIG.
  • the embodiment of the invention provides a communication system, which includes the above access network device and terminal device.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Provided are a clock processing method, an access network device and a terminal device, the method comprising: determining a first timestamp of sending a first signal to a terminal device; receiving a second signal, sent by the terminal device, corresponding to the first signal, and determining a fourth timestamp of receiving the second signal; and sending a data packet including the first timestamp and the fourth timestamp to the terminal device, wherein the data packet is used for enabling the terminal device to adjust a local clock of the terminal device. The first timestamp and the fourth timestamp are sent to the terminal device once in a merged manner, thereby improving the utilization rate of a time frequency resource, thus utilizing the time frequency resource of a wireless network more efficiently and realizing clock synchronization.

Description

一种时钟处理方法、接入网设备和终端设备Clock processing method, access network device and terminal device
本申请要求于2017年3月29日提交中国专利局、申请号为201710197591.6、申请名称为“一种时钟处理方法、接入网设备和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on March 29, 2017, the Chinese Patent Office, the application number is 201710197591.6, and the application name is "a clock processing method, access network equipment and terminal equipment". The citations are incorporated herein by reference.
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种时钟处理方法、接入网设备和终端设备。The present invention relates to the field of communications technologies, and in particular, to a clock processing method, an access network device, and a terminal device.
背景技术Background technique
将无线通信技术控制终端进行自动化作业的技术应用到传统的生产控制业中代替人工作业已经成为主流,例如自动驾驶技术,远程医疗技术,智能机器人作业技术。The application of wireless communication technology control terminal automation technology to the traditional production control industry has become the mainstream instead of manual work, such as automatic driving technology, telemedicine technology, and intelligent robot operation technology.
如,在高精度工业控制领域,多个智能机器人协同工作,此时多个机器人需要具有统一的时钟信息才能实现协同工作。多个机器人通常使用网络测量和控制系统的精密时钟同步协议标准(Institute of Electrical and Electronics Engineers1588,IEEE1588)进行时钟同步。IEEE1588协议是针对有线网络的应用层设计的时钟同步方案。For example, in the field of high-precision industrial control, multiple intelligent robots work together. At this time, multiple robots need to have unified clock information to achieve coordinated work. Multiple robots typically perform clock synchronization using the Precision Clock Synchronization Protocol standard of the Network Measurement and Control System (Institute of Electrical and Electronics Engineers 1588, IEEE 1588). The IEEE 1588 protocol is a clock synchronization scheme designed for the application layer of a wired network.
但是,在采用无线通信网络的工业控制系统时,IEEE1588协议与无线通信接入网络底层协议的兼容性不好,IEEE1588协议使用应用层的数据包传递同步信息,并且在同步流程中需要进行多次的数据包交互,因此,不能高效的利用无线网络的时频资源,进而导致无法实现高精准度的时钟同步。However, in the industrial control system using the wireless communication network, the compatibility between the IEEE1588 protocol and the underlying protocol of the wireless communication access network is not good. The IEEE1588 protocol uses the data packets of the application layer to transmit synchronization information, and needs to be performed multiple times in the synchronization process. The data packet interaction, therefore, can not effectively utilize the time-frequency resources of the wireless network, thereby leading to the inability to achieve high-accuracy clock synchronization.
发明内容Summary of the invention
本发明实施例提供了一种时钟处理方法、接入网设备和终端设备,以实现高效的利用无线网络的时频资源,提供高精准度的时钟同步。The embodiment of the invention provides a clock processing method, an access network device and a terminal device, so as to realize efficient use of time-frequency resources of the wireless network and provide high-precision clock synchronization.
第一方面,本发明实施例提供一种时钟处理方法,该方法包括:确定向终端设备发送第一信号的第一时间戳;接收终端设备发送的与第一信号相对应的第二信号,确定接收第二信号的第四时间戳;向终端设备发送包含有第一时间戳和第四时间戳的数据包,所示数据包用于使终端设备调整终端设备的本地时钟。将两次时间戳合并为一次发送,高效的利用无线网络的时频资源,进而提高了时钟同步的精准度。In a first aspect, an embodiment of the present invention provides a clock processing method, including: determining a first timestamp for transmitting a first signal to a terminal device; and receiving, by the terminal device, a second signal corresponding to the first signal, determining Receiving a fourth timestamp of the second signal; transmitting, to the terminal device, a data packet including the first timestamp and the fourth timestamp, where the data packet is used to cause the terminal device to adjust the local clock of the terminal device. The two time stamps are combined into one transmission, and the time-frequency resources of the wireless network are utilized efficiently, thereby improving the accuracy of clock synchronization.
在一个可能的设计中,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点,明确了信号的具体接收和/或发送的时间点,提高了时钟同步的精准度。In a possible design, the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process; the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process. The time point at which the signal is specifically received and/or transmitted is clarified, and the accuracy of clock synchronization is improved.
在一个可能的设计中,配置待发送的第一信号的配置信息和第二信号的配置信息;根据第一信号的配置信息将第一信号发送给终端设备;根据第二信号的配置信息检测是否有待接收的第二信号,配置第一信号和第二信号的配置信息,保证了第一信号和第二信号的确定性和第二信号的唯一性。In one possible design, the configuration information of the first signal to be transmitted and the configuration information of the second signal are configured; the first signal is sent to the terminal device according to the configuration information of the first signal; and the detection is performed according to the configuration information of the second signal. The second signal to be received, configuring the configuration information of the first signal and the second signal, ensures the certainty of the first signal and the second signal and the uniqueness of the second signal.
在一个可能的设计中,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。In one possible design, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
在一个可能的设计中,对第四时间戳进行修正时间处理,修正时间戳的记录偏差,提高第四时间戳的精准度。In a possible design, the fourth timestamp is corrected for time processing, the recording time deviation of the timestamp is corrected, and the accuracy of the fourth timestamp is improved.
在一个可能的设计中,对第一时间戳和第四时间戳进行补偿时间处理,增加信号接收和/或发送的硬件处理时间,提高时间戳的精准度,还可以防止设备信息的泄露。In a possible design, the first time stamp and the fourth time stamp are compensated for time processing, which increases the hardware processing time of signal reception and/or transmission, improves the accuracy of the time stamp, and prevents leakage of device information.
在一个可能的设计中,修正时间处理包括:修正记录第四时间戳与第二信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes: correcting the time offset between the recording of the fourth timestamp and the actual arrival time of the second signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,以及减少从接入网设备接收第二信号到记录第四时间戳的平均时间。In one possible design, the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
在一个可能的设计中,将第一时间戳和第四时间戳生成第一类型的数据包,向终端设备发送第一类型的数据包;或,对第一时间戳和第四时间戳进行加权处理生成第二类型的数据包,向终端设备发送第二类型的数据包;或,对第一时间戳和第四时间戳进行差分处理生成第三类型的数据包,向终端设备发送第三类型的数据包,以多种形式对第一时间戳和第四时间戳进行处理,增加了时间戳的可靠性,进而提高时钟同步的精准度。In a possible design, the first timestamp and the fourth timestamp are used to generate a first type of data packet, and the first type of data packet is sent to the terminal device; or the first timestamp and the fourth timestamp are weighted Processing to generate a second type of data packet, and sending a second type of data packet to the terminal device; or performing differential processing on the first timestamp and the fourth timestamp to generate a third type of data packet, and sending the third type to the terminal device The data packet processes the first timestamp and the fourth timestamp in various forms, which increases the reliability of the timestamp, thereby improving the accuracy of clock synchronization.
在一个可能的设计中,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的时间戳,保证时间戳的真实性,进而提高时钟同步的精准度。In one possible design, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match and verifying whether the third timestamp and the fourth timestamp are The second timestamp is a timestamp of the second signal received by the terminal device, and the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device to ensure the authenticity of the timestamp, thereby improving the accuracy of the clock synchronization. degree.
第二方面,本发明实施例提供一种时钟处理方法,该方法包括:接收接入网设备发送的第一信号,确定接收第一信号的第二时间戳;向接入网设备发送第一信号相对应的第二信号,确定发送第二信号的第三时间戳;接收接入网设备发送的包含有第一时间戳和第四时间戳的数据包;根据数据包调整本地时钟;其中,第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。将两次时间戳合并为一次发送,高效的利用无线网络的时频资源,进而提高了时钟同步的精准度。In a second aspect, an embodiment of the present invention provides a clock processing method, including: receiving a first signal sent by an access network device, determining a second timestamp for receiving the first signal, and transmitting a first signal to the access network device. Corresponding second signal, determining a third timestamp for transmitting the second signal; receiving a data packet sent by the access network device and including the first timestamp and the fourth timestamp; adjusting the local clock according to the data packet; wherein, A timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the second signal received by the access network device. The two time stamps are combined into one transmission, and the time-frequency resources of the wireless network are utilized efficiently, thereby improving the accuracy of clock synchronization.
在一个可能的设计中,接收接入网设备发送的第一信号的配置信息和第二信号的配置信息;根据第一信号的配置信息检测是否有待接收的第一信号;根据第二信号的配置信息向接入网设备发送与第一信号相对应的第二信号,配置第一信号和第二信号的配置信息,保证了第一信号和第二信号的确定性和第二信号的唯一性。In a possible design, the configuration information of the first signal and the configuration information of the second signal sent by the access network device are received; the first signal to be received is detected according to the configuration information of the first signal; and the configuration according to the second signal The information transmits a second signal corresponding to the first signal to the access network device, and configures configuration information of the first signal and the second signal to ensure the certainty of the first signal and the second signal and the uniqueness of the second signal.
在一个可能的设计中,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点,明确了信号的具体接收和/或发送的时间点,提高了时钟同步的精准度。In a possible design, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process. At the moment, the specific point of reception and/or transmission of the signal is clarified, and the accuracy of clock synchronization is improved.
在一个可能的设计中,对第二时间戳进行修正时间处理,修正时间戳的记录偏差,提高第四时间戳的精准度。In a possible design, the second time stamp is corrected for time processing, the time stamp recording deviation is corrected, and the accuracy of the fourth time stamp is improved.
在一个可能的设计中,对第二时间戳和第三时间戳进行补偿时间处理,增加信号接收和/或发送的硬件处理时间,提高时间戳的精准度,还可以防止设备信息的泄露。In a possible design, the second time stamp and the third time stamp are compensated for time processing, the hardware processing time of signal reception and/or transmission is increased, the time stamp accuracy is improved, and device information leakage is also prevented.
在一个可能的设计中,修正时间处理包括:修正记录第二时间戳与第一信号实际到达 时刻的时间偏差。In one possible design, the correction time processing includes: correcting the time offset between the recording of the second timestamp and the actual arrival time of the first signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将第二信号发送的平均时间。In one possible design, the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
在一个可能的设计中,解析数据包,确定数据包对应的类型和时间戳信息;其中,数据包的类型以下类型中的一个:由第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第一时间戳和第四时间戳处理后的信息,确定数据包的类型,便于确定计算时钟偏差的公式。In one possible design, the data packet is parsed to determine the type and timestamp information corresponding to the data packet; wherein, the type of the data packet is one of the following types: the first type generated by the first timestamp and the fourth timestamp a data packet, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; timestamp information The information processed by the first timestamp and the fourth timestamp is included, the type of the data packet is determined, and the formula for calculating the clock deviation is conveniently determined.
在一个可能的设计中,数据包还包括验证信息;解析数据包,得到验证信息;根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配,保证时间戳的真实性,进而提高时钟同步的精准度。In a possible design, the data packet further includes verification information; parsing the data packet to obtain verification information; and verifying whether the timestamp information matches according to the verification information; wherein the verification information is used to verify at least one of: verifying the first timestamp and Whether the second timestamp matches, and verifying whether the third timestamp and the fourth timestamp match, ensuring the authenticity of the timestamp, thereby improving the accuracy of clock synchronization.
在一个可能的设计中,当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备时钟的时钟偏差;根据时钟偏差调整本地时钟,根据不同的数据包类型,确定对应的时钟偏差公式,进而提高计算时钟偏差的精准度。In a possible design, when the verification matches, the calculation formula of the corresponding clock deviation is determined according to the type of the data packet; the local clock is determined relative to the access network based on the calculation formula, the timestamp information, the second timestamp and the third timestamp. The clock skew of the device clock; the local clock is adjusted according to the clock offset, and the corresponding clock deviation formula is determined according to different packet types, thereby improving the accuracy of calculating the clock deviation.
第三方面、本发明实施例提供一种时钟处理方法,该方法包括:确定向终端设备发送第一信号的第一时间戳;接收终端设备发送的与第一信号相对应的第二信号,确定接收第二信号的第四时间戳;接收终端设备发送的包含第二时间戳和第三时间戳的数据包;基于数据包、第一时间戳和第四时间戳确定终端设备相对于接入网设备的时钟偏差;将时钟偏差发送给终端设备,时钟偏差用于指示终端设备根据时钟偏差调整终端设备的本地时钟;其中,第二时间戳为终端设备接收第一信号的时间戳,第三时间戳为终端设备发送第二信号的时间戳,将两次时间戳合并为一次发送,高效的利用无线网络的时频资源,进而提高了时钟同步的精准度。A third aspect of the present invention provides a clock processing method, including: determining a first timestamp for transmitting a first signal to a terminal device; receiving a second signal corresponding to the first signal sent by the terminal device, determining Receiving a fourth timestamp of the second signal; receiving a data packet that is sent by the terminal device and including the second timestamp and the third timestamp; determining, according to the data packet, the first timestamp, and the fourth timestamp, the terminal device relative to the access network The clock deviation of the device is sent to the terminal device, and the clock deviation is used to instruct the terminal device to adjust the local clock of the terminal device according to the clock deviation; wherein, the second timestamp is a timestamp of the terminal device receiving the first signal, and the third time The time stamp is used to send the second signal to the terminal device, and the two time stamps are combined into one transmission, thereby effectively utilizing the time-frequency resources of the wireless network, thereby improving the accuracy of the clock synchronization.
在一个可能的设计中,解析数据包,确定数据包对应的类型和时间戳信息;其中,数据包的类型为以下类型中的一个:将第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第二时间戳和第三时间戳处理后的信息,确定数据包的类型,便于确定计算时钟偏差的公式。In one possible design, the data packet is parsed to determine the type and timestamp information corresponding to the data packet; wherein the data packet type is one of the following types: the first type generated by the first timestamp and the fourth timestamp a data packet, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; The information includes information processed by the second timestamp and the third timestamp, determining the type of the data packet, and facilitating determination of a formula for calculating the clock deviation.
在一个可能的设计中,数据包还包括验证信息;解析数据包,得到验证信息;根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的时间戳,保证时间戳的真实性,进而提高时钟同步的精准度。In a possible design, the data packet further includes verification information; parsing the data packet to obtain verification information; and verifying whether the timestamp information matches according to the verification information; wherein the verification information is used to verify at least one of: verifying the first timestamp and Whether the second timestamp matches, and verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is the terminal device transmitting the first time to the access network device The time stamp of the two signals ensures the authenticity of the time stamp, thereby improving the accuracy of clock synchronization.
在一个可能的设计中,当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第一时间戳和第四时间戳确定终端设备的时钟相对于接入网设备时钟的时钟偏差,根据不同的数据包类型,确定对应的时钟偏差公式,进而提高 计算时钟偏差的精准度。In a possible design, when the verification is matched, the calculation formula of the corresponding clock deviation is determined according to the type of the data packet; and the clock of the terminal device is determined based on the calculation formula, the timestamp information, the first timestamp and the fourth timestamp. The clock deviation of the clock of the network access device determines the corresponding clock deviation formula according to different packet types, thereby improving the accuracy of calculating the clock deviation.
在一个可能的设计中,配置待发送的第一信号的配置信息和第二信号的配置信息;根据第一信号的配置信息将第一信号发送给终端设备;根据第二信号的配置信息检测是否有待接收的第二信号,配置第一信号和第二信号的配置信息,保证了第一信号和第二信号的确定性和第二信号的唯一性。In one possible design, the configuration information of the first signal to be transmitted and the configuration information of the second signal are configured; the first signal is sent to the terminal device according to the configuration information of the first signal; and the detection is performed according to the configuration information of the second signal. The second signal to be received, configuring the configuration information of the first signal and the second signal, ensures the certainty of the first signal and the second signal and the uniqueness of the second signal.
在一个可能的设计中,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。In one possible design, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
在一个可能的设计中,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点,明确了信号的具体接收和/或发送的时间点,提高了时钟同步的精准度。In a possible design, the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process; the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process. The time point at which the signal is specifically received and/or transmitted is clarified, and the accuracy of clock synchronization is improved.
在一个可能的设计中,对第四时间戳进行修正时间处理,修正时间戳的记录偏差,提高第四时间戳的精准度。In a possible design, the fourth timestamp is corrected for time processing, the recording time deviation of the timestamp is corrected, and the accuracy of the fourth timestamp is improved.
在一个可能的设计中,对第一时间戳和第四时间戳进行补偿时间处理,增加信号接收和/或发送的硬件处理时间,提高时间戳的精准度,还可以防止设备信息的泄露。In a possible design, the first time stamp and the fourth time stamp are compensated for time processing, which increases the hardware processing time of signal reception and/or transmission, improves the accuracy of the time stamp, and prevents leakage of device information.
在一个可能的设计中,修正时间处理包括:修正开始接收第二信号记录的第四时间戳与第二信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes correcting the time offset of the fourth timestamp from which the second signal record is received and the actual arrival time of the second signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,以及减少从接入网设备接收第二信号到记录第四时间戳的平均时间。In one possible design, the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
第四方面、本发明实施例提供一种时钟处理方法,该方法包括:接收接入网设备发送的第一信号,确定接收第一信号的第二时间戳;向接入网设备发送与第一信号相对应的第二信号,确定发送第二信号的第三时间戳;向接入网设备发送包含有第二时间戳和第三时间戳的数据包;接收接入网设备根据数据包确定的时钟偏差,根据时钟偏差调整本地时钟。A fourth aspect of the present invention provides a clock processing method, including: receiving a first signal sent by an access network device, determining a second timestamp for receiving the first signal, and transmitting the first time to the access network device. Determining a second signal corresponding to the signal, determining a third timestamp for transmitting the second signal; transmitting, to the access network device, a data packet including the second timestamp and the third timestamp; and determining, by the receiving access network device, the data packet according to the data packet Clock skew, adjusting the local clock based on the clock skew.
在一个可能的设计中,接收接入网设备发送的第一信号和第二信号的配置信息;根据第一信号的配置信息检测是否有待接收的第一信号;根据第二信号的配置信息向接入网设备发送与第一信号相对应的第二信号,将两次时间戳合并为一次发送,高效的利用无线网络的时频资源,进而提高了时钟同步的精准度。In a possible design, receiving configuration information of the first signal and the second signal sent by the access network device; detecting, according to the configuration information of the first signal, whether there is a first signal to be received; and arranging according to the configuration information of the second signal The network access device sends the second signal corresponding to the first signal, and combines the two time stamps into one transmission, thereby efficiently utilizing the time-frequency resources of the wireless network, thereby improving the accuracy of the clock synchronization.
在一个可能的设计中,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点,明确了信号的具体接收和/或发送的时间点,提高了时钟同步的精准度。In a possible design, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process. At the moment, the specific point of reception and/or transmission of the signal is clarified, and the accuracy of clock synchronization is improved.
在一个可能的设计中,对第二时间戳进行修正时间处理,修正时间戳的记录偏差,提高第四时间戳的精准度。In a possible design, the second time stamp is corrected for time processing, the time stamp recording deviation is corrected, and the accuracy of the fourth time stamp is improved.
在一个可能的设计中,对第二时间戳和第三时间戳进行补偿时间处理,增加信号接收和/或发送的硬件处理时间,提高时间戳的精准度,还可以防止设备信息的泄露。In a possible design, the second time stamp and the third time stamp are compensated for time processing, the hardware processing time of signal reception and/or transmission is increased, the time stamp accuracy is improved, and device information leakage is also prevented.
在一个可能的设计中,修正时间处理包括:修正开始接收第一信号记录的第二时间戳与第一信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes correcting the time offset of the second timestamp from which the first signal record is received and the actual arrival time of the first signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将第二信号发送 的平均时间。In one possible design, the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
在一个可能的设计中,将第二时间戳和第三时间戳生成第一类型的数据包,向接入网设备发送第一类型的数据包;或,对第二时间戳和第三时间戳进行加权处理生成第二类型的数据包,向接入网设备发送第二类型的数据包;或,对第二时间戳和第三时间戳进行差分处理生成第三类型的数据包,向接入网设备发送第三类型的数据包,以多种形式对第一时间戳和第四时间戳进行处理,增加了时间戳的可靠性,进而提高时钟同步的精准度。In a possible design, the second timestamp and the third timestamp generate a first type of data packet, and send a first type of data packet to the access network device; or, for the second timestamp and the third timestamp Performing a weighting process to generate a second type of data packet, and transmitting a second type of data packet to the access network device; or performing differential processing on the second timestamp and the third timestamp to generate a third type of data packet, and accessing The network device sends the third type of data packet, and processes the first timestamp and the fourth timestamp in various forms, which increases the reliability of the timestamp, thereby improving the accuracy of clock synchronization.
在一个可能的设计中,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳,保证时间戳的真实性,进而提高时钟同步的精准度。In one possible design, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying the third timestamp and the fourth timestamp Whether the first timestamp is the timestamp of the first signal sent by the access network device, and the fourth timestamp is the timestamp of the second signal received by the access network device, ensuring the authenticity of the timestamp, thereby improving the accuracy of the clock synchronization. degree.
第五方面、本发明实施例一种接入网设备,该接入网设备包括:处理单元,用于确定向终端设备发送第一信号的第一时间戳;接收单元,用于接收终端设备发送的与第一信号相对应的第二信号;处理单元,还用于确定接收第二信号的第四时间戳;发送单元,用于向终端设备发送包含有第一时间戳和第四时间戳的数据包,数据包用于使终端设备调整终端设备的本地时钟。A fifth aspect of the present invention is an access network device, where the access network device includes: a processing unit, configured to determine a first timestamp for transmitting a first signal to the terminal device; and a receiving unit, configured to receive, by the terminal device, a second signal corresponding to the first signal; the processing unit is further configured to determine a fourth timestamp for receiving the second signal, and the sending unit is configured to send, to the terminal device, the first timestamp and the fourth timestamp A data packet, which is used to enable the terminal device to adjust the local clock of the terminal device.
在一个可能的设计中,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点。In a possible design, the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process; the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process. .
在一个可能的设计中,处理单元,还用于配置待发送的第一信号和第二信号的配置信息;发送单元,还用于根据第一信号的配置信息将第一信号发送给终端设备;处理单元,还用于根据第二信号的配置信息检测是否有待接收的第二信号。In a possible design, the processing unit is further configured to configure configuration information of the first signal and the second signal to be sent, and the sending unit is further configured to send the first signal to the terminal device according to the configuration information of the first signal; The processing unit is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
在一个可能的设计中,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。In one possible design, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
在一个可能的设计中,处理单元,还用于对第四时间戳进行修正时间处理。In one possible design, the processing unit is further configured to perform a modified time processing on the fourth time stamp.
在一个可能的设计中,处理单元,还用于对第一时间戳和第四时间戳进行补偿时间处理。In a possible design, the processing unit is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
在一个可能的设计中,修正时间处理包括:修正记录第四时间戳与第二信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes: correcting the time offset between the recording of the fourth timestamp and the actual arrival time of the second signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,以及减少从接入网设备接收第二信号到记录第四时间戳的平均时间。In one possible design, the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
在一个可能的设计中,处理单元,还用于将第一时间戳和第四时间戳生成第一类型的数据包,并控制发送单元向终端设备发送第一类型的数据包;或,对第一时间戳和第四时间戳进行加权处理生成第二类型的数据包,并控制发送单元向终端设备发送第二类型的数据包;或,对第一时间戳和第四时间戳进行差分处理生成第三类型的数据包,并控制发送单元向终端设备发送第三类型的数据包。In a possible design, the processing unit is further configured to generate the first type of data packet by using the first timestamp and the fourth timestamp, and control the sending unit to send the first type of data packet to the terminal device; or Performing a weighting process on the first timestamp and the fourth timestamp to generate a second type of data packet, and controlling the sending unit to send the second type of data packet to the terminal device; or performing differential processing on the first timestamp and the fourth timestamp The third type of data packet, and controls the sending unit to send a third type of data packet to the terminal device.
在一个可能的设计中,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送 第二信号的时间戳。In one possible design, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying the third timestamp and the fourth timestamp Whether the second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
第六方面,本发明实施例一种终端设备,该终端设备包括:接收单元,用于接收接入网设备发送的第一信号,处理单元,用于确定接收第一信号的第二时间戳;发送单元,用于向接入网设备发送第一信号相对应的第二信号;处理单元,还用于确定发送第二信号的第三时间戳;接收单元,还用于接收接入网设备发送的包含有第一时间戳和第四时间戳的数据包;处理单元,还用于根据数据包调整本地时钟;其中,第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。According to a sixth aspect, a terminal device includes: a receiving unit, configured to receive a first signal sent by an access network device, where the processing unit is configured to determine a second timestamp for receiving the first signal; a sending unit, configured to send a second signal corresponding to the first signal to the access network device; the processing unit is further configured to determine a third timestamp for transmitting the second signal, and the receiving unit is further configured to receive, by the access network device, a data packet including a first timestamp and a fourth timestamp; the processing unit is further configured to adjust the local clock according to the data packet; wherein the first timestamp is a timestamp of the first signal sent by the access network device, and fourth The timestamp is a timestamp of the access network device receiving the second signal.
在一个可能的设计中,接收单元,还用于接收接入网设备发送的第一信号的配置信息和第二信号的配置信息;处理单元,还用于根据第一信号的配置信息检测是否有待接收的第一信号;发送单元,还用于根据第二信号的配置信息向接入网设备发送与第一信号相对应的第二信号。In a possible design, the receiving unit is further configured to receive the configuration information of the first signal and the configuration information of the second signal that are sent by the access network device, and the processing unit is further configured to detect, according to the configuration information of the first signal, whether And the transmitting unit is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
在一个可能的设计中,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点。In a possible design, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process. At the moment.
在一个可能的设计中,处理单元,还用于对第二时间戳进行修正时间处理。In one possible design, the processing unit is further configured to perform a modified time processing on the second time stamp.
在一个可能的设计中,处理单元,还用于对第二时间戳和第三时间戳进行补偿时间处理。In one possible design, the processing unit is further configured to perform compensation time processing on the second timestamp and the third timestamp.
在一个可能的设计中,修正时间处理包括:修正记录第二时间戳与第一信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes: correcting the time offset between the recording of the second timestamp and the actual arrival time of the first signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将第二信号发送的平均时间。In one possible design, the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
在一个可能的设计中,处理单元,还用于解析数据包,确定数据包对应的类型和时间戳信息;其中,数据包的类型为以下类型中的一个:由第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第一时间戳和第四时间戳处理后的信息。In a possible design, the processing unit is further configured to parse the data packet, and determine the type and timestamp information corresponding to the data packet; wherein the data packet type is one of the following types: by the first timestamp and the fourth time Stamping the generated first type of data packet, weighting the first time stamp and the fourth time stamp to generate a second type of data packet, and performing a differential processing on the first time stamp and the fourth time stamp to generate a third type The data packet; the timestamp information includes information processed after the first timestamp and the fourth timestamp.
在一个可能的设计中,数据包还包括验证信息;处理单元,还用于解析数据包,得到验证信息;处理单元,还用于根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配。In a possible design, the data packet further includes verification information; the processing unit is further configured to parse the data packet to obtain verification information; and the processing unit is further configured to verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used for Verify at least one of the following: verify that the first timestamp and the second timestamp match, and verify that the third timestamp and the fourth timestamp match.
在一个可能的设计中,处理单元,还用于确定当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备时钟的时钟偏差;根据时钟偏差调整本地时钟。In a possible design, the processing unit is further configured to determine, when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; and determine, based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp. The clock skew of the local clock relative to the access network device clock; the local clock is adjusted based on the clock skew.
第七方面、本发明实施例一种接入网设备,该接入网设备包括:处理单元,用于确定向终端设备发送第一信号的第一时间戳;接收单元,用于接收终端设备发送的与第一信号相对应的第二信号;处理单元,还用于确定接收第二信号的第四时间戳;接收单元,还用于接收终端设备发送的包含第二时间戳和第三时间戳的数据包;处理单元,还用于基于数 据包、第一时间戳和第四时间戳确定终端设备相对于接入网设备的时钟偏差;发送单元,用于将时钟偏差发送给终端设备,时钟偏差用于指示终端设备根据时钟偏差调整终端设备的本地时钟;其中,第二时间戳为终端设备接收第一信号的时间戳,第三时间戳为终端设备发送第二信号的时间戳。A seventh aspect of the present invention provides an access network device, where the access network device includes: a processing unit, configured to determine a first timestamp for transmitting a first signal to the terminal device; and a receiving unit, configured to receive, by the terminal device, a second signal corresponding to the first signal; the processing unit is further configured to determine a fourth timestamp for receiving the second signal, and the receiving unit is further configured to receive, by the terminal device, the second timestamp and the third timestamp a processing unit, configured to determine, according to the data packet, the first timestamp and the fourth timestamp, a clock offset of the terminal device relative to the access network device; and a sending unit, configured to send the clock offset to the terminal device, the clock The deviation is used to instruct the terminal device to adjust the local clock of the terminal device according to the clock offset; wherein the second timestamp is a timestamp of the terminal device receiving the first signal, and the third timestamp is a timestamp of the second signal sent by the terminal device.
在一个可能的设计中,处理单元,还用于解析数据包,确定数据包对应的类型和时间戳信息;其中,述数据包的类型为以下类型中的一个:将第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第二时间戳和第三时间戳处理后的信息。In a possible design, the processing unit is further configured to parse the data packet, and determine the type and timestamp information corresponding to the data packet; wherein the type of the data packet is one of the following types: the first timestamp and the fourth time a first type of data packet generated by the timestamp, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third time generated by differential processing of the first timestamp and the fourth timestamp A type of data packet; the timestamp information includes information processed for the second timestamp and the third timestamp.
在一个可能的设计中,数据包还包括验证信息;处理单元,还用于解析数据包,得到验证信息;处理单元,还用于根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的时间戳。In a possible design, the data packet further includes verification information; the processing unit is further configured to parse the data packet to obtain verification information; and the processing unit is further configured to verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used for Verifying at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal, and the third The timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
在一个可能的设计中,处理单元,还用于当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第一时间戳和第四时间戳确定终端设备的时钟相对于接入网设备时钟的时钟偏差。In a possible design, the processing unit is further configured to: when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine the terminal based on the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp. The clock skew of the device's clock relative to the access network device's clock.
在一个可能的设计中,处理单元,还用于配置待发送的第一信号的配置信息和第二信号的配置信息;发送单元,还用于根据第一信号的配置信息将第一信号发送给终端设备;处理单元,还用于根据第二信号的配置信息检测是否有待接收的第二信号。In a possible design, the processing unit is further configured to configure configuration information of the first signal to be sent and configuration information of the second signal, and the sending unit is further configured to send the first signal to the configuration information according to the first signal. The processing unit is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
在一个可能的设计中,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。In one possible design, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
在一个可能的设计中,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点。In a possible design, the first timestamp is the time point at which the first signal starts or completes the setting step in the sending process; the fourth timestamp is the time point at which the second signal starts or completes the setting step in the receiving process. .
在一个可能的设计中,处理单元,还用于对第四时间戳进行修正时间处理。In one possible design, the processing unit is further configured to perform a modified time processing on the fourth time stamp.
在一个可能的设计中,处理单元,还用于对第一时间戳和第四时间戳进行补偿时间处理。In a possible design, the processing unit is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
在一个可能的设计中,修正时间处理包括:修正开始接收第二信号记录的第四时间戳与第二信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes correcting the time offset of the fourth timestamp from which the second signal record is received and the actual arrival time of the second signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,以及减少从接入网设备接收第二信号到记录第四时间戳的平均时间。In one possible design, the compensation time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to the record The average time of the fourth timestamp.
第八方面、本发明实施例一种终端设备,该终端设备包括:接收单元,用于接收接入网设备发送的第一信号;处理单元,用于确定接收第一信号的第二时间戳;发送单元,用于向接入网设备发送与第一信号相对应的第二信号;处理单元,还用于确定发送第二信号的第三时间戳;接收单元,还用于向接入网设备发送包含有第二时间戳和第三时间戳的数据包;处理单元,还用于接收接入网设备根据数据包确定的时钟偏差,根据时钟偏差调整本地时钟。According to an eighth aspect of the present invention, a terminal device includes: a receiving unit, configured to receive a first signal sent by an access network device; and a processing unit, configured to determine a second timestamp for receiving the first signal; a sending unit, configured to send a second signal corresponding to the first signal to the access network device; the processing unit is further configured to determine a third timestamp for transmitting the second signal; and the receiving unit is further configured to access the network device Transmitting a data packet including a second timestamp and a third timestamp; the processing unit is further configured to receive a clock offset determined by the access network device according to the data packet, and adjust the local clock according to the clock offset.
在一个可能的设计中,接收单元,还用于接收接入网设备发送的第一信号的配置信息和第二信号的配置信息;处理单元,还用于根据第一信号的配置信息检测是否有待接收的第一信号;发送单元,还用于根据第二信号的配置信息向接入网设备发送第一信号相对应的第二信号。In a possible design, the receiving unit is further configured to receive the configuration information of the first signal and the configuration information of the second signal that are sent by the access network device, and the processing unit is further configured to detect, according to the configuration information of the first signal, whether And the transmitting unit is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
在一个可能的设计中,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点。In a possible design, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is the start of the sending of the second signal or the completion of the setting step in the sending process. At the moment.
在一个可能的设计中,处理单元,还用于对第二时间戳进行修正时间处理。In one possible design, the processing unit is further configured to perform a modified time processing on the second time stamp.
在一个可能的设计中,处理单元,还用于对第二时间戳和第三时间戳进行补偿时间处理。In one possible design, the processing unit is further configured to perform compensation time processing on the second timestamp and the third timestamp.
在一个可能的设计中,修正时间处理包括:修正开始接收第一信号记录的第二时间戳与第一信号实际到达时刻的时间偏差。In one possible design, the correction time processing includes correcting the time offset of the second timestamp from which the first signal record is received and the actual arrival time of the first signal.
在一个可能的设计中,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将第二信号发送的平均时间。In one possible design, the compensation time processing includes at least one of reducing the average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the transmission of the second signal from recording the third timestamp to the terminal device Average time.
在一个可能的设计中,处理单元,还用于将第二时间戳和第三时间戳生成第一类型的数据包,并控制发送单元向接入网设备发送第一类型的数据包;或,对第二时间戳和第三时间戳进行加权处理生成第二类型的数据包,并控制发送单元向接入网设备发送第二类型的数据包;或,对第二时间戳和第三时间戳进行差分处理生成第三类型的数据包,并控制发送单元向接入网设备发送第三类型的数据包。In a possible design, the processing unit is further configured to generate a first type of data packet by using the second timestamp and the third timestamp, and control the sending unit to send the first type of data packet to the access network device; or Weighting the second timestamp and the third timestamp to generate a second type of data packet, and controlling the sending unit to send the second type of data packet to the access network device; or, for the second timestamp and the third timestamp Performing differential processing to generate a third type of data packet, and controlling the transmitting unit to send a third type of data packet to the access network device.
在一个可能的设计中,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。In one possible design, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying the third timestamp and the fourth timestamp Whether the first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
第九方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述各个方面所述方法的步骤。In a ninth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement the steps of the method described in the above aspects.
第十方面,本发明实施例提供了一种通信系统,该系统包括上述方面所述的终端设备和接入网设备。According to a tenth aspect, an embodiment of the present invention provides a communication system, where the system includes the terminal device and the access network device.
第十一方面、本发明实施例提供了一种计算机可读存储介质,用于储存为上述接入网设备所用的计算机软件指令,其包含用于控制所述接入网设备执行上述方面所设计的程序。In an eleventh aspect, an embodiment of the present invention provides a computer readable storage medium, configured to store computer software instructions used by the access network device, where the method includes: configured to control the access network device to perform the foregoing aspects. program of.
第十二方面,本发明实施例提供了一种计算机可读存储介质,用于储存为上述终端设备所用的计算机软件指令,其包含用于控制所述终端设备执行上述方面所设计的程序。According to a twelfth aspect, an embodiment of the present invention provides a computer readable storage medium for storing computer software instructions for the terminal device, which includes a program designed to control the terminal device to perform the above aspects.
本发明实施例提供的时钟处理方案,将第一时间戳和第四时间戳以合并的方式一次性的发送给终端设备,终端设备计算时钟偏差,或将第二时间戳和第三时间戳以合并的方式一次性的发送给接入网设备,接入网设备计算时钟偏差;提升了时频资源的利用率,进而 更高效的利用无线网络的时频资源,实现时钟同步。The clock processing scheme provided by the embodiment of the present invention sends the first timestamp and the fourth timestamp to the terminal device in a combined manner, and the terminal device calculates the clock offset, or uses the second timestamp and the third timestamp to The combined mode is sent to the access network device in one time, and the access network device calculates the clock offset; the utilization of the time-frequency resource is improved, and the time-frequency resources of the wireless network are more efficiently utilized to implement clock synchronization.
附图说明DRAWINGS
图1是本发明实施例的时钟处理的方案应用的场景图;1 is a scene diagram of an application of a clock processing scheme according to an embodiment of the present invention;
图2是本发明实施例提供的一种时钟处理的方法示意性交互图;2 is a schematic interaction diagram of a method for clock processing according to an embodiment of the present invention;
图3是本发明实施例提供的一种时钟处理的方法示意性流程图;FIG. 3 is a schematic flowchart of a method for clock processing according to an embodiment of the present invention; FIG.
图4是本发明实施例提供的另一种时钟处理的方法示意性交互图;FIG. 4 is a schematic interaction diagram of another method for clock processing according to an embodiment of the present invention; FIG.
图5是本发明实施例提供的另一种时钟处理的方法示意性流程图;FIG. 5 is a schematic flowchart of another method for clock processing according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的一种接入网设备的结构示意图;FIG. 6 is a schematic structural diagram of an access network device according to an embodiment of the present disclosure;
图7是本发明实施例提供的一种接入网设备的实体结构示意图;FIG. 7 is a schematic structural diagram of an entity of an access network device according to an embodiment of the present disclosure;
图8是本发明实施例提供的一种终端设备的结构示意图;FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure;
图9是本发明实施例提供的一种终端设备的实体结构示意图。FIG. 9 is a schematic diagram of a physical structure of a terminal device according to an embodiment of the present invention.
具体实施方式detailed description
图1是本发明实施例提供的一种时钟处理方案的应用场景示意图。如图1所示,具体包括接入网设备和一个或多个终端设备。FIG. 1 is a schematic diagram of an application scenario of a clock processing scheme according to an embodiment of the present invention. As shown in FIG. 1, specifically, an access network device and one or more terminal devices are included.
接入网设备和终端设备可以采用无线的方式连接;其中,接入网设备具有标准时钟,接入网设备负责向终端设备提供标准的时钟参考。The access network device and the terminal device may be connected in a wireless manner; wherein the access network device has a standard clock, and the access network device is responsible for providing a standard clock reference to the terminal device.
本发明实施例的时钟处理的方法可应用于无线蜂窝通信网络系统(如全球移动通讯(Global System of Mobile communication,GSM)系统、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)系统、长期演进(Long Term Evolution,LTE)、5G通信系统)中,为连接该无线蜂窝通信网络系统的终端设备提供高精度的标准时钟。The clock processing method of the embodiment of the present invention can be applied to a wireless cellular communication network system (such as a Global System of Mobile communication (GSM) system, a Wideband Code Division Multiple Access (WCDMA) system, and a long-term In a Long Term Evolution (LTE), 5G communication system, a high-precision standard clock is provided for a terminal device connected to the wireless cellular communication network system.
需要说明的是,本发明实施例的接入网设备可以有多种类型,但接入网设备必须具备标准时钟,如基站(Evolved Node B,eNB)、中继站等;终端设备可以包括任意类型的设备,如用户设备(User Equipment,UE),机器人等设备。It should be noted that the access network device in the embodiment of the present invention may have multiple types, but the access network device must have a standard clock, such as an Evolved Node B (eNB), a relay station, etc.; the terminal device may include any type of Equipment, such as User Equipment (UE), robots, etc.
譬如:机器人先接入接入网设备,再通过接入网设备获取标准时钟信息,现有技术中机器人通过接入网设备获取标准时钟信息的步骤,具体如下:For example, the robot first accesses the access network device, and then obtains the standard clock information through the access network device. In the prior art, the step of the robot acquiring the standard clock information through the access network device is as follows:
接入网设备向机器人发送一信号,并记录该信号的发送时间戳T 1;机器人接收该信号且记录接收时间戳T 2,同时再向接入网设备返回一信号,并记录该信号的发送时间戳T 3;接入网设备接收该信号并记录接收时间戳T 4The access network device sends a signal to the robot and records the transmission timestamp T 1 of the signal; the robot receives the signal and records the reception time stamp T 2 , and returns a signal to the access network device, and records the transmission of the signal. Time stamp T 3 ; the access network device receives the signal and records the reception timestamp T 4 .
在接入网设备向机器人发送一信号与机器人向接入网设备返回一信号之间,接入网设备需要将接入网设备记录的信号发送时间戳T 1发送给机器人;接入网设备记录到接收时间戳T 4后,还需将时间戳T 4发送给机器人。机器人根据接收到的时间戳T 1和时间戳T 4再结合机器人端记录的时间戳T 2和时间戳T 3计算出机器人相对于接入网设备的时钟偏差,进而根据该时钟偏差调整机器人本地时钟。 Between the access network device sends a signal to the robot and the robot returns a signal to the access network device, the access network device needs to send the signal transmission timestamp T 1 recorded by the access network device to the robot; the access network device records After receiving the time stamp T 4 , the time stamp T 4 is also sent to the robot. The robot calculates the clock deviation of the robot from the access network device according to the received time stamp T 1 and the time stamp T 4 and the time stamp T 2 and the time stamp T 3 recorded by the robot end, and then adjusts the robot local according to the clock deviation. clock.
上述方法,需要接入网设备发送两次时间戳信息给机器人(一次T 1,一次T 4),故不能高效的利用无线网络的时频资源,因此本发明实施例提出一种时钟处理方案解决不能高效的利用无线网络时频资源的问题,如下进行详细介绍。 The above method, requires two access network device sends timestamp information to the robot (time T 1, time T 4), it can not be efficient use of frequency resources in a wireless network, embodiments of the invention thus provides a solution to clock processing The problem of not being able to efficiently utilize the time-frequency resources of the wireless network is described in detail below.
图2是本发明实施例提供的一种时钟处理的方法示意性交互图。如图2所示该方法包 括如下步骤:FIG. 2 is a schematic interaction diagram of a method for clock processing according to an embodiment of the present invention. As shown in Figure 2, the method includes the following steps:
S201、接入网设备确定向终端设备发送第一信号的第一时间戳。S201. The access network device determines a first timestamp for transmitting the first signal to the terminal device.
在本实施例中,终端设备通过接入接入网设备,进而与接入网设备建立信息交互。接入网设备向终端设备发送第一信号时,记录发送第一信号的第一时间戳记作T 1,其中,接入网设备可以是,但不限于:基站、中继站等;第一信号可以是,但不限于定时参考信号,如Sync Signal。 In this embodiment, the terminal device establishes information interaction with the access network device by accessing the access network device. When the access network device transmits a first signal to the terminal device, transmitting a first recording signal to make a first timestamp T 1, wherein the access network device may be, but is not limited to: a base station, a relay station; first signal may be , but not limited to timing reference signals such as Sync Signal.
S202、终端设备接收第一信号,并确定接收第一信号的第二时间戳。S202. The terminal device receives the first signal, and determines a second timestamp for receiving the first signal.
接入网设备向终端设备发送第一信号后,终端设备接收第一信号,并确定接收第一信号的第二时间戳记作T 2,其中,第一信号可以是,但不限于定时参考信号,如Sync Signal。 After transmitting a first signal to the device the access network terminal device, the terminal device receives the first signal, and determining a second timestamp of the first received signal for T 2, wherein the first signal may be, but is not limited to a timing reference signal, Such as Sync Signal.
S203、终端设备向接入网设备发送与第一信号相对应的第二信号,并确定发送第二信号的第三时间戳。S203. The terminal device sends a second signal corresponding to the first signal to the access network device, and determines a third timestamp for transmitting the second signal.
终端设备向接入网设备发送与第一信号相对应的第二信号,确定发送第二信号的第三时间戳记作T 3,其中,第二信号可以是,但不限于定时参考信号,如Delay_req Signal。 A terminal device to a second signal corresponding to a first access network device transmits a signal, transmits a second signal to determine a third time stamp as T 3, wherein the second signal may be, but is not limited to a timing reference signal, such as Delay_req Signal.
需要说明的是,在本实施例中,第一信号为下行信号,(即由接入网设备向终端设备发送的信号),第二信号为上行信号(即由终端设备向接入网设备发送的信号),下行信号和上行信号的时序关系可根据实际情况进行设定,如按照S201-S202-S203的顺序执行,又如按照S201-S203-S202的顺序执行(即在接入网设备发出第一信号且终端设备未收到第一信号时,终端设备就将第二信号发送给接入网设备),对此,本实施例不作具体限定。It should be noted that, in this embodiment, the first signal is a downlink signal, that is, a signal sent by the access network device to the terminal device, and the second signal is an uplink signal, that is, the terminal device sends the signal to the access network device. Signal), the timing relationship between the downlink signal and the uplink signal can be set according to the actual situation, such as in the order of S201-S202-S203, and in the order of S201-S203-S202 (ie, issued on the access network device) When the first signal is not received by the terminal device, the terminal device sends the second signal to the access network device, which is not specifically limited in this embodiment.
S204、接入网设备接收终端设备发送的第二信号,并确定接收第二信号的第四时间戳。S204. The access network device receives the second signal sent by the terminal device, and determines a fourth timestamp for receiving the second signal.
终端设备向接入网设备发送第二信号后,接入网设备接收第二信号,并确定接收第二信号的第四时间戳记作T 4,其中,第二信号可以是,但不限于定时参考信号,如Delay_req Signal。 The terminal device to the access network device transmits a second signal, the second access network device receives the signal, and determines a fourth time stamp the received second signal for T 4, wherein the second signal may be, but is not limited to the timing reference Signal, such as Delay_req Signal.
S205、接入网设备向终端设备发送包含有第一时间戳和第四时间戳的数据包。S205. The access network device sends, to the terminal device, a data packet that includes a first timestamp and a fourth timestamp.
S206、终端设备根据数据包调整终端设备的本地时钟。S206. The terminal device adjusts a local clock of the terminal device according to the data packet.
在接入网设备确定第一时间戳和第四时间戳后,将第一时间戳和第四时间戳以数据包的形式发送给终端设备,生成数据包的处理方式可以有多种,如直接将第一时间戳和第四时间戳进行合并,又如将第一时间戳和第四时间戳进行加权合并等。After the first timestamp and the fourth timestamp are determined by the access network device, the first timestamp and the fourth timestamp are sent to the terminal device in the form of a data packet, and the data packet may be processed in multiple manners, such as directly The first timestamp and the fourth timestamp are combined, and the first timestamp and the fourth timestamp are weighted and combined, and the like.
终端设备接收到数据包后,对数据包进行处理,确定与数据包中包含第一时间戳和第四时间戳的时间戳信息,再结合终端设备记录的第二时间戳和第三时间戳,终端设备确定本地时钟与接入网设备时钟的处理结果,终端设备根据处理结果调整本地时钟以使本地时钟与接入网设备的时钟同步。After receiving the data packet, the terminal device processes the data packet, determines timestamp information that includes the first timestamp and the fourth timestamp in the data packet, and combines the second timestamp and the third timestamp recorded by the terminal device. The terminal device determines a processing result of the local clock and the access network device clock, and the terminal device adjusts the local clock according to the processing result to synchronize the local clock with the clock of the access network device.
因此,本发明实施例提供的时钟处理的方法,将第一时间戳和第四时间戳以合并的方式一次性的发送给终端设备,提升了时频资源的利用率,进而更高效的利用无线网络的时频资源,实现时钟同步。Therefore, the clock processing method provided by the embodiment of the present invention sends the first timestamp and the fourth timestamp to the terminal device in a combined manner in one time, thereby improving the utilization rate of the time-frequency resource, thereby using the wireless more efficiently. Time-frequency resources of the network to achieve clock synchronization.
可选地,作为本发明的一实施例,如图3所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 3 further includes:
S207、接入网设备配置待发送的第一信号的配置信息和第二信号的配置信息。S207. The access network device configures configuration information of the first signal to be sent and configuration information of the second signal.
当接入当前接入网设备的终端设备需要从接入网设备获取标准的时钟信息时,接入网设备根据终端设备的信息(如终端设备的设备参数)配置待发送的第一信号和第二信号的配置信息,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口 类型和信号对应的帧信息。When the terminal device accessing the current access network device needs to obtain standard clock information from the access network device, the access network device configures the first signal to be sent according to the information of the terminal device (such as the device parameter of the terminal device). The configuration information of the two signals includes at least one of a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
信号的周期为第一信号或第二信号的发送周期,如50ms;信号的类型可以是,但不限于:小区指定参考信号(Cell-specific Reference Signal,CRS),解调参考信号(DeModulation Reference Signal,DMRS),探测参考信号(Sounding Reference Signal,SRS),随机接入信道(Random Access CHannel,RACH)等LTE/LTE-A系统的信号,或者是5G NR中可以复用的参考信号,或者是特别设计的用于时钟同步的参考信号;发送信号的天线端口类型可以是,但不限于:CRS对应的信号发送端口0~3,DMRS对应的信号发送端口7~14,SRS对应的信号发送端口10,20,21,40,41,42,43;信号对应的帧信息为该信号对应的帧号、子帧号,如配置在每个偶数帧的第5子帧时发送的CRS作为Sync Signal。The period of the signal is the transmission period of the first signal or the second signal, such as 50 ms; the type of the signal may be, but not limited to, a Cell-Specific Reference Signal (CRS), and a Demodulation Reference Signal (DeModulation Reference Signal) , DMRS), Sounding Reference Signal (SRS), LTE/LTE-A system signals such as Random Access CHannel (RACH), or reference signals that can be multiplexed in 5G NR, or A specially designed reference signal for clock synchronization; the type of the antenna port for transmitting the signal may be, but not limited to, a signal transmission port 0 to 3 corresponding to the CRS, a signal transmission port 7 to 14 corresponding to the DMRS, and a signal transmission port corresponding to the SRS. 10, 20, 21, 40, 41, 42, 43; the frame information corresponding to the signal is the frame number and the subframe number corresponding to the signal, such as the CRS transmitted when the 5th subframe of each even frame is configured as the Sync Signal .
需要说明的是,在本实施例中,CRS可作为第一信号(即下行信号),SRS和RACH可作为第二信号(即上行信号),还可以采用其它形式的信号作为第一信号或第二信号,对此,本实施例不作具体限定。It should be noted that, in this embodiment, the CRS can be used as the first signal (ie, the downlink signal), the SRS and the RACH can be used as the second signal (ie, the uplink signal), and other forms of the signal can be used as the first signal or the first signal. The second signal is not specifically limited in this embodiment.
在本实施例中,接入网设备配置完第一信号和第二信号的配置信息后,将该配置信息发送给接入接入网设备的终端设备,配置信息的类型可以是,但不限于:Initial Message,其中,Initial Message为动态或半静态的调度信息,由接入网设备向终端设备发送配置信息的方式可以是,但不限于:广播、组播或单播。In this embodiment, after configuring the configuration information of the first signal and the second signal, the access network device sends the configuration information to the terminal device accessing the access network device, where the type of the configuration information may be, but is not limited to, The initial message, where the initial message is the dynamic or semi-static scheduling information, may be, but is not limited to, broadcast, multicast, or unicast by the access network device to send the configuration information to the terminal device.
S208、接入网设备根据第一信号的配置信息将第一信号发送给终端设备。S208. The access network device sends the first signal to the terminal device according to the configuration information of the first signal.
接入网设备根据第一信号的配置信息确定第一信号的发送周期、信号的类型、发送端口和信号对应的帧信息,并将第一信号按照约定发送给终端设备,如第一信号Sync Signal为CRS、发送周期为50ms、发送端口为0~3,约定信号对应的帧信息为在偶数帧第5子帧时发送CRS。The access network device determines, according to the configuration information of the first signal, the sending period of the first signal, the type of the signal, the sending port, and the frame information corresponding to the signal, and sends the first signal to the terminal device according to the convention, such as the first signal Sync Signal The CRS, the transmission period is 50 ms, and the transmission port is 0 to 3. The frame information corresponding to the appointment signal is that the CRS is transmitted in the fifth subframe of the even frame.
需要说明的是,接入网设备发送第一信号的方式可以是,但不限于:广播或组播。It should be noted that the manner in which the access network device sends the first signal may be, but is not limited to, broadcast or multicast.
在本实施例中,配置第一信号和第二信号的配置信息,可以保证第一信号和第二信号的确定性,即保证接入网设备向终端设备发送第一信号,终端设备向接入网设备返回第二信号的流程和信号特征定义明确;还可以保证第二信号的唯一性,即保证一个第二信号唯一地对应于一个第一信号。In this embodiment, configuring the configuration information of the first signal and the second signal can ensure the certainty of the first signal and the second signal, that is, ensuring that the access network device sends the first signal to the terminal device, and the terminal device accesses The flow and signal characteristics of the network device returning the second signal are clearly defined; the uniqueness of the second signal can also be ensured, that is, a second signal is uniquely corresponding to a first signal.
可选地,S204中接入网设备接收终端设备的第二信号前,接入网设备可根据配置的第二信号的配置信息进行检测,即检测是否有待接收的、终端设备发送的第二信号,如根据帧信息进行判断是否有待接收的第二信号,当检测到有待接收的第二信号时,执行S204。Optionally, before the access network device in S204 receives the second signal of the terminal device, the access network device may perform detection according to the configured configuration information of the second signal, that is, whether the second signal sent by the terminal device is to be received. If the second signal to be received is determined according to the frame information, when the second signal to be received is detected, S204 is performed.
需要说明的是,S207和S208可在S201之前执行。It should be noted that S207 and S208 can be performed before S201.
可选地,作为本发明一实施例,在S201-S204中,接入网设备确定第一时间戳和第四时间戳,终端设备确定第二时间戳和第三时间戳具体如下:Optionally, as an embodiment of the present invention, in S201-S204, the access network device determines a first timestamp and a fourth timestamp, and the terminal device determines that the second timestamp and the third timestamp are as follows:
接入网设备确定第一时间戳和第四时间戳具体可通过如下方式:将接入网设备发送第一信号时,第一信号开始或完成发送流程中设定步骤对应的时刻点记录为第一时间戳;将接入网设备接收第二信号时,第二信号开始或完成接收流程中设定步骤对应的时刻点记录为第四时间戳。The determining, by the access network device, the first timestamp and the fourth timestamp may be performed by: when the first signal is sent by the access network device, the time point corresponding to the setting step in the first signal start or completion sending process is recorded as the first time A timestamp; when the access network device receives the second signal, the time point corresponding to the setting step in the receiving or completing the receiving process is recorded as the fourth timestamp.
对应的,终端设备确定第二时间戳和第三时间戳具体可通过如下方式:Correspondingly, the determining, by the terminal device, the second timestamp and the third timestamp may be specifically as follows:
将终端设备接收第一信号时,第一信号开始或完成接收流程中设定步骤对应的时刻点记录为第二时间戳;将终端设备发送第二信号时,第二信号开始或完成发送流程中设定步 骤对应的时刻点记录为第三时间戳。When the terminal device receives the first signal, the time point corresponding to the setting step in the first signal start or completion receiving process is recorded as the second timestamp; when the terminal device sends the second signal, the second signal starts or completes in the sending process. The time point corresponding to the setting step is recorded as the third time stamp.
需要说明的是,信号的发送或接收流程包括多个步骤,如组包、符号生成、转换、变频等;因此第一信号开始或完成设定步骤对应的时间戳可多种确定方式,如,约定当第一信号完成数模转换(Digital to Analog,D/A)的处理步骤时的标记点(时刻点)记作第一时间戳,除数模转换处理步骤外还可以有其它处理步骤,如组包、符号生成、转换、变频等。第二时间戳、第三时间戳和第四时间戳的确定方式与第一时间戳的确定方式类似,在此不作赘述。It should be noted that the sending or receiving process of the signal includes multiple steps, such as grouping, symbol generation, conversion, frequency conversion, etc.; therefore, the timestamp corresponding to the first signal starting or completing the setting step may be determined in multiple ways, for example, It is agreed that when the first signal completes the digital to analog (D/A) processing step, the marked point (time point) is recorded as the first time stamp, and other processing steps may be performed in addition to the digital to analog conversion processing step. Such as grouping, symbol generation, conversion, frequency conversion, etc. The manner of determining the second timestamp, the third timestamp, and the fourth timestamp is similar to that of the first timestamp, and is not described herein.
可选地,作为本发明的一实施例,如图3所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 3 further includes:
S209、接入网设备对第四时间戳进行修正时间处理。S209. The access network device performs a modified time processing on the fourth timestamp.
修正时间处理包括:修正记录第四时间戳与第二信号实际到达时刻的时间偏差,具体可通过如下方式确定时间偏差e:The correction time processing includes: correcting the time deviation between the fourth time stamp and the actual arrival time of the second signal, and specifically determining the time deviation e by:
假设终端设备发送的第二信号为x(n),信道冲击响应h(n),接入网设备接收的信号为:Assuming that the second signal sent by the terminal device is x(n) and the channel impulse response h(n), the signal received by the access network device is:
Figure PCTCN2018080836-appb-000001
Figure PCTCN2018080836-appb-000001
通过频域相关检测估计信道冲击响应
Figure PCTCN2018080836-appb-000002
判断信号x(n)的真实到达时刻。
Estimating channel impulse response by frequency domain correlation detection
Figure PCTCN2018080836-appb-000002
Determine the true arrival time of the signal x(n).
Figure PCTCN2018080836-appb-000003
Figure PCTCN2018080836-appb-000003
通过上式,可确定接收信号的起始时刻与信号的真实到达时刻的偏差e,即可确定记录第四时间戳时的时间偏差e 4By the above formula, the deviation e of the start time of the received signal from the true arrival time of the signal can be determined, and the time deviation e 4 when the fourth time stamp is recorded can be determined.
增加记录第四时间戳与第二信号实际到达时的时间偏差,具体如下:Increase the time deviation between the fourth timestamp and the actual arrival of the second signal, as follows:
T 4=T′ 4+e 4 T 4 =T' 4 +e 4
可选地,作为本发明的一实施例,如图3所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 3 further includes:
S210、接入网设备对第一时间戳和第四时间戳进行补偿时间处理。S210. The access network device performs compensation time processing on the first timestamp and the fourth timestamp.
补偿时间处理的步骤包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,以及减少从接入网设备接收第二信号到记录第四时间戳的平均时间。The step of compensating time processing includes at least one of increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to recording the fourth timestamp. Average time.
需要说明的是,补偿时间处理为信号的硬件处理时间,可根据具体型号的设备以查表的方式确定,即硬件处理时间为一设定值,在该设备出厂时已确定。在本实施中,还需要对第一时间戳T 1和第四时间戳T 4进行补偿时间处理,即增加第一信号和第二信号的硬件处理时间,具体如下: It should be noted that the compensation time processing is the hardware processing time of the signal, which can be determined according to the specific model of the device by means of table lookup, that is, the hardware processing time is a set value, which is determined when the device is shipped from the factory. In the present embodiment, it is also necessary to first time stamp and a fourth time stamp T 1 T 4 time compensating process, i.e. increasing hardware processing time of the first signal and the second signal, as follows:
T 1,fixed=T 1+T tx,m T 1,fixed =T 1 +T tx,m
其中,T tx,m为从记录第一时间戳到接入网设备将第一信号发送的平均时间。 Where T tx,m is the average time from the recording of the first timestamp to the access signal of the access network device.
T 4,fixed=T 4-T rx,m T 4,fixed =T 4 -T rx,m
其中,T rx,m为从接入网设备接收第二信号到记录第四时间戳的平均时间。 Where T rx,m is the average time from receiving the second signal to the access network device to recording the fourth timestamp.
需要说明的是,在本实施例,可以设置修正时间处理和补偿时间处理的优先级,如先对时间戳进行修正时间处理,再对时间戳进行补偿时间处理;在此,不作具体限定。It should be noted that, in this embodiment, the priority of the correction time processing and the compensation time processing may be set, for example, the time processing is performed on the time stamp first, and then the time stamp is compensated for the time processing; here, it is not specifically limited.
可选地,作为本发明的一实施例,S205的处理步骤具体包括如下:Optionally, as an embodiment of the present invention, the processing steps of S205 specifically include the following:
接入网设备向终端设备发送数据包前,需要对第一时间戳和第四时间戳进行处理,生成数据包,数据包的类型包括:第一类型、第二类型和第三类型,接入网设备生成数据包并向终端设备发送数据包的过程具体如下:将第一时间戳和第四时间戳生成第一类型的数 据包,向终端设备发送第一类型的数据包;或,对第一时间戳和第四时间戳进行加权处理生成第二类型的数据包,向终端设备发送第二类型的数据包;或,对第一间戳和第四时间戳进行差分处理生成第三类型的数据包,向终端设备发送第三类型的数据包。Before the access network device sends the data packet to the terminal device, the first timestamp and the fourth timestamp are processed to generate a data packet, and the type of the data packet includes: the first type, the second type, and the third type, and the access The process of generating a data packet by the network device and sending the data packet to the terminal device is as follows: generating a first type of data packet by using the first timestamp and the fourth timestamp, and sending the first type of data packet to the terminal device; or The first time stamp and the fourth time stamp perform a weighting process to generate a second type of data packet, and send a second type of data packet to the terminal device; or perform differential processing on the first time stamp and the fourth time stamp to generate a third type of data packet A data packet that transmits a third type of data packet to the terminal device.
第一数据包对应的时间戳信息为:T 1和T 4;第二数据包对应的时间戳信息为T=α(T 1+T 4),其中,α表示加权因子,对于加权因子的设定可根据实际需要进行设定本实施不作具体限定,如α=1,0.5;第二数据包对应的时间戳信息为T 1和τ m(T 4和-τ m),其中,τ m=T 4-T 1The first time stamp information corresponding to the data packet is: T 1 and T 4; corresponding to the time stamp information of the second data packet is T = α (T 1 + T 4), where, [alpha] represents a weighting factor, the weighting factor provided for The setting can be set according to actual needs. The implementation is not specifically limited, such as α=1, 0.5; the timestamp information corresponding to the second data packet is T 1 and τ m (T 4 and -τ m ), where τ m = T 4 -T 1 .
在本实施中,可根据实际需要对上述三种数据包的生成方式进行选择,对此本发明实施例不作具体限定。In this implementation, the manner of generating the foregoing three types of data packets may be selected according to actual needs, which is not specifically limited in this embodiment of the present invention.
需要说明的是,数据包的发送方式可以是,但不限于:单播或组播,数据包可以为一消息,如Follow_up Message。对于周期执行的时钟同步方案,可以将上一个周期的数据包与当前周期的定时参考信号一起发送。It should be noted that the manner in which the data packet is sent may be, but is not limited to, unicast or multicast, and the data packet may be a message, such as Follow_up Message. For a clock synchronization scheme that is periodically executed, the data packet of the previous cycle can be sent together with the timing reference signal of the current cycle.
可选地,作为本发明的一实施例,在数据包中添中还可以加验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,或验证第三时间戳和第四时间戳是否匹配;验证信息可以是,但不限于:终端设备的ID(Identification,识别)号、帧号或子帧号,如,根据第一信号的帧号验证第一时间戳和第二时间戳。Optionally, as an embodiment of the present invention, the verification information may be further added to the data packet, where the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, or Verifying that the third timestamp and the fourth timestamp match; the verification information may be, but is not limited to, an ID (Identification) number, a frame number, or a subframe number of the terminal device, eg, a frame number verification according to the first signal. The first timestamp and the second timestamp.
可选地,作为本发明的一实施例,如图3所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 3 further includes:
S211、终端设备对第二时间戳进行修正时间处理。S211. The terminal device performs a modified time processing on the second timestamp.
修正时间处理的步骤包括:修正记录第二时间戳与第一信号实际到达时刻的时间偏差,具体如下:The step of correcting the time processing includes: correcting the time deviation between the recording of the second timestamp and the actual arrival time of the first signal, as follows:
T 2=T′ 2+e 2 T 2 =T' 2 +e 2
S212、终端设备对第二时间戳和第三时间戳进行补偿时间处理。S212. The terminal device performs compensation time processing on the second timestamp and the third timestamp.
终端设备对第二时间戳T 2和第三时间戳T 3进行补偿时间处理,即补偿第一信号和第二信号的硬件处理时间,如减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将所述第二信号发送的平均时间,具体如下: The terminal device performs compensation time processing on the second timestamp T 2 and the third time stamp T 3 , that is, compensates for hardware processing time of the first signal and the second signal, such as reducing reception of the first signal from the terminal device to recording the second time stamp. The average time, and the average time from the recording of the third timestamp to the transmission of the second signal by the terminal device, as follows:
T 2,fixed=T 2-T rx,s T 2,fixed =T 2 -T rx,s
其中,T rx,s为从终端设备接收第一信号到记录第二时间戳的平均时间; Wherein, T rx,s is an average time from receiving the first signal to the terminal device to recording the second time stamp;
T 3,fixed=T 3+T tx,s T 3,fixed =T 3 +T tx,s
其中,T tx,s为从记录第三时间戳到终端设备将第二信号发送的平均时间。 Where T tx,s is the average time from the recording of the third timestamp to the transmission of the second signal by the terminal device.
终端设备对第二时间戳和第三时间戳进行补偿时间处理,以及对第二时间戳进行修正时间处理,可参照接入网设备对第一时间戳和第四时间戳进行补偿时间处理,以及对第四时间戳进行修正时间处理,具体原理,在此,不作赘述。The terminal device performs compensation time processing on the second timestamp and the third timestamp, and performs correction time processing on the second timestamp, and performs compensation time processing on the first timestamp and the fourth timestamp by referring to the access network device, and The correction time processing is performed on the fourth time stamp, and the specific principle is not described herein.
需要说明的是,S211-S212可在S202-S216之间的任意顺序执行,对此本实施例不作具体限定。It should be noted that S211-S212 may be executed in any order between S202-S216, which is not specifically limited in this embodiment.
可选地,在S209和S210中,还可以分开执行,如接入网设备在确定第一时间戳后立即对第一时间戳进行补偿时间处理,当确定第四时间戳后再对第四时间戳进行补偿时间处理和修正时间处理;具体可参照上述接入网设备进行补偿时间处理和修正时间的处理步骤,在此,不作赘述。Optionally, in S209 and S210, the method may also be performed separately, for example, the access network device performs compensation time processing on the first timestamp immediately after determining the first timestamp, and then determines the fourth timestamp and then the fourth time. The stamping is performed by the compensation time processing and the correction time processing; for details, the processing steps of the compensation time processing and the correction time may be referred to by the access network device, and details are not described herein.
可选地,作为本发明的一实施例,如图3所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 3 further includes:
S213、终端设备接收接入网设备发送的包含有第一时间戳和第四时间戳的数据包。S213. The terminal device receives a data packet that is sent by the access network device and includes a first timestamp and a fourth timestamp.
S214、终端设备解析数据包,确定数据包对应的类型和时间戳信息。S214. The terminal device parses the data packet, and determines a type and timestamp information corresponding to the data packet.
终端设备接收到数据包后,对数据包进行解析处理,确定对应的类型和时间戳信息;其中,数据包的类型包括:第一类型、第二类型和第三包类型;时间戳信息包括对第一时间戳和第四时间戳处理后的信息。After receiving the data packet, the terminal device parses the data packet to determine a corresponding type and timestamp information. The data packet type includes: a first type, a second type, and a third type; the timestamp information includes The first timestamp and the fourth timestamp processed information.
需要说明的是,第一类型的数据包对应的时间戳信息为:T 1和T 4;第二类型的数据包对应的时间戳信息为T=α(T 1+T 4),其中,α表示加权因子,对于加权因子的设定可根据实际需要进行设定本实施不作具体限定,如α=1,0.5;第三类型的数据包对应的时间戳信息为T 1和τ m(T4和-τ m),其中,τ m=T 4-T 1Incidentally, the time stamp information of the first type of packet corresponds to: T 1 and T 4; timestamp information of the second type of the packet corresponds to T = α (T 1 + T 4), wherein, α The weighting factor is expressed. The setting of the weighting factor can be set according to actual needs. The implementation is not specifically limited, such as α=1, 0.5; the timestamp information corresponding to the third type of data packet is T 1 and τ m (T4 and -τ m ), where τ m =T 4 -T 1 .
需要说的是,在解析数据包后,当确定解析后的数据包中包含验证信息时,还需要根据验证信息验证时间戳是否匹配,如验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配,可根据终端设备的ID号、第一信号的帧号或第二信号的子帧号进行验证,当验证不匹配时,将不匹配的时间戳删除,重新获取新的时间戳数据作为检测对象。It should be noted that after parsing the data packet, when it is determined that the parsed data packet contains the verification information, it is also required to verify whether the time stamp matches according to the verification information, such as verifying whether the first timestamp and the second timestamp match, and Verifying that the third timestamp and the fourth timestamp match, may be verified according to the ID number of the terminal device, the frame number of the first signal, or the subframe number of the second signal, and when the verification does not match, the timestamp will not match. Delete, re-acquire new timestamp data as the detection object.
可选地,作为本发明的一实施例,S206具体包括如下:Optionally, as an embodiment of the present invention, S206 specifically includes the following:
S215、终端设备根据数据包的类型确定对应时钟偏差的计算公式。S215. The terminal device determines a calculation formula of the corresponding clock offset according to the type of the data packet.
S216、终端设备基于计算公式、时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备的时钟偏差。S216. The terminal device determines a clock offset of the local clock relative to the access network device based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp.
接入网设备生成数据包的方式有三种,即有三种类型的数据包,每种类型的数据包对应有一种或多种计算时钟偏差的计算公式,因此,需要根据数据包的类型确定对应的时钟偏差的计算公式,具体如下:There are three ways for the access network device to generate data packets. There are three types of data packets. Each type of data packet corresponds to one or more calculation formulas for calculating the clock offset. Therefore, it is necessary to determine the corresponding data according to the type of the data packet. The formula for calculating the clock deviation is as follows:
当数据包为第一类型时,可采用如下时钟偏差的计算公式:When the data packet is of the first type, the following formula for calculating the clock deviation can be used:
Figure PCTCN2018080836-appb-000004
Figure PCTCN2018080836-appb-000004
当数据包为第二类型时,可采用如下时钟偏差的计算公式:When the data packet is of the second type, the following formula for calculating the clock deviation can be used:
Figure PCTCN2018080836-appb-000005
Figure PCTCN2018080836-appb-000005
当数据包为第三类型时,可采用如下时钟偏差的计算公式:When the data packet is of the third type, the following formula for calculating the clock deviation can be used:
Figure PCTCN2018080836-appb-000006
Figure PCTCN2018080836-appb-000006
或,or,
Figure PCTCN2018080836-appb-000007
Figure PCTCN2018080836-appb-000007
将时间戳信息、第二时间戳和第三时间戳代入对应的计算公式,计算得出终端设备定本地时钟相对于接入网设备的时钟偏差。The timestamp information, the second timestamp, and the third timestamp are substituted into the corresponding calculation formula, and the clock deviation of the local clock of the terminal device relative to the access network device is calculated.
S217、终端设备根据时钟偏差调整本地时钟。S217. The terminal device adjusts the local clock according to the clock offset.
终端设备根据计算得出的时钟偏差调整本地时钟以使终端设备的本地时钟与接入网设备同步,如当时钟偏差为正值时,终端设备调慢本地时钟,当时钟偏差为负值时,终端设备调快本地时钟。The terminal device adjusts the local clock according to the calculated clock offset to synchronize the local clock of the terminal device with the access network device. For example, when the clock deviation is positive, the terminal device slows down the local clock. When the clock deviation is negative, The terminal device speeds up the local clock.
本实施例,通过对第二时间戳和第四时间戳进行修正时间处理,修正了记录时间戳时 的偏差,以及对第一时间戳、第二时间戳、第三时间戳和第四时间戳进行补偿时间处理,增加信号硬件处理时间和记录时间偏差,使得第一时间戳、第二时间戳、第三时间戳和第四时间戳更加准确,从而提高时钟同步方案的精准度;在时间戳中加入硬件处理时间,还可以防止接入网设备或终端设备的硬件参数泄露;接入网设备将第一时间戳和第四时间戳合并为一个数据包发送给终端设备,可以节省无线网络的时频资源,简化调度开销,缩短单次流程的完成时间,提高时钟同步的效率,在数据包添加验证信息可以保证第一时间戳和第二时间戳的匹配度、第三时间戳和第四时间戳的匹配度,减少误差,提高时钟同步的精准度。In this embodiment, by performing correction time processing on the second timestamp and the fourth timestamp, the deviation when recording the timestamp is corrected, and the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp are corrected. Performing compensation time processing, increasing signal hardware processing time and recording time deviation, so that the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp are more accurate, thereby improving the accuracy of the clock synchronization scheme; The hardware processing time is added, and the hardware parameters of the access network device or the terminal device are also prevented from being leaked; the access network device combines the first timestamp and the fourth timestamp into one data packet and sends the data packet to the terminal device, which can save the wireless network. Time-frequency resources, simplify scheduling overhead, shorten the completion time of a single process, improve the efficiency of clock synchronization, and add verification information to the data packet to ensure the matching degree of the first timestamp and the second timestamp, the third timestamp and the fourth The matching of time stamps reduces errors and improves the accuracy of clock synchronization.
图4是本发明实施例提供的另一种时钟处理的方法示意性交互图。如图4所示,该方法包括如下步骤:FIG. 4 is a schematic interaction diagram of another method for clock processing according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:
S401、接入网设备确定向终端设备发送第一信号的第一时间戳。S401. The access network device determines a first timestamp for transmitting the first signal to the terminal device.
S402、终端设备接收接入网设备发送的第一信号,确定接收第一信号的第二时间戳。S402. The terminal device receives the first signal sent by the access network device, and determines a second timestamp for receiving the first signal.
S403、终端设备向接入网设备发送与第一信息相对应的第二信号,确定发送第二信号的第三时间戳。S403. The terminal device sends a second signal corresponding to the first information to the access network device, and determines a third timestamp for transmitting the second signal.
S404、接入网设备接收终端设备发送的第二信号,确定接收第二信号的第四时间戳。S404. The access network device receives the second signal sent by the terminal device, and determines a fourth timestamp for receiving the second signal.
S405、接入网设备接收终端设备发送的包含第二时间戳和第三时间戳的数据包。S405. The access network device receives a data packet that is sent by the terminal device and includes a second timestamp and a third timestamp.
S406、接入网设备基于数据包、第一时间戳和第四时间戳确定终端设备相对于接入网设备的时钟偏差。S406. The access network device determines, according to the data packet, the first timestamp, and the fourth timestamp, a clock offset of the terminal device relative to the access network device.
S407、接入网设备将时钟偏差发送给终端设备。S407. The access network device sends a clock offset to the terminal device.
S408、终端设备根据时钟偏差调整终端设备的本地时钟。S408. The terminal device adjusts a local clock of the terminal device according to a clock offset.
需要说明的是,接入网设备的计算能力比终端设备强,因此相对于终端设备,接入网设备计算的速度快,且计算的精准度高,本实施例为终端设备发送数据包,接入网设备计算时钟偏差的计算方案,与上述实施例接入网设备发送数据包,终端设备计算时钟偏差的计算方案类似。It should be noted that the computing power of the access network device is stronger than that of the terminal device. Therefore, the access network device calculates a fast speed and the calculation accuracy is high. The embodiment sends a data packet to the terminal device. The calculation scheme for calculating the clock deviation by the network access device is similar to the calculation scheme for the terminal device to calculate the clock offset in the above embodiment.
S401和S404,可参照上述实施例中的S201和S204,在此,不作赘述。For S401 and S404, refer to S201 and S204 in the foregoing embodiment, and details are not described herein.
S405和上述实施例中的S205的原理相同,区别仅在于执行主体不同和数据包不同,S205是接入网设备发送包含第一时间戳和第四时间戳的数据包,而S405是终端设备发送包含第二时间戳和第三时间戳的数据包,因为,S405可参照S205在此,不作赘述。S405 is the same as the principle of S205 in the foregoing embodiment, except that the execution subject is different from the data packet, and S205 is that the access network device sends the data packet including the first timestamp and the fourth timestamp, and S405 is sent by the terminal device. The data packet includes the second timestamp and the third timestamp, because S405 can refer to S205 here, and no further description is made.
S406和上述实施例中的S214的区别在于,S214为终端设备计算时钟偏差,而S406为接入网设备计算时钟偏差,二者的计算公式和参数均相同,因此,S406可参照S214,在此,不作赘述。S406 is different from S214 in the foregoing embodiment in that S214 calculates a clock offset for the terminal device, and S406 calculates a clock offset for the access network device, and the calculation formulas and parameters of the two are the same. Therefore, S406 can refer to S214, where , do not repeat.
需要说明的是,接入网设备确定终端设备相对于接入网设备的时钟偏差后,还需要通过S407将时钟偏差发送给终端设备,以指示终端设备执行S408根据时钟偏差调整终端设备的本地时钟,使得终端设备的本地时钟与接入网设备同步。It should be noted that, after determining the clock offset of the terminal device relative to the access network device, the access network device needs to send the clock offset to the terminal device through S407, to instruct the terminal device to perform S408 to adjust the local clock of the terminal device according to the clock offset. The local clock of the terminal device is synchronized with the access network device.
因此,本实施例提供的时钟处理的方法,终端设备将第一时间戳和第三时间戳以合并的方式一次性的发送给接入网设备,提升了时频资源的利用率,进而更高效的利用无线网络的时频资源,而且接入网设备比终端设备的计算速度快,计算的精准度高。Therefore, in the clock processing method provided by the embodiment, the terminal device sends the first timestamp and the third timestamp to the access network device in a combined manner, thereby improving the utilization of the time-frequency resource and further improving the efficiency. The time-frequency resources of the wireless network are utilized, and the access network device is faster than the terminal device, and the calculation accuracy is high.
可选地,作为本发明的一实施例,如图5所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 5 further includes:
S409、接入网设备配置待发送的第一信号的配置信息和第二信号的配置信息。S409. The access network device configures configuration information of the first signal to be sent and configuration information of the second signal.
S410、接入网设备根据第一信号的配置信息将第一信号发送给终端设备。S410. The access network device sends the first signal to the terminal device according to the configuration information of the first signal.
S409和S410可在S401之前执行,S409和S410可参照上述实施例中的S207和S208,在此,不作赘述。S409 and S410 may be performed before S401, and S409 and S410 may refer to S207 and S208 in the foregoing embodiment, and details are not described herein.
可选地,作为本发明的一实施例,如图5所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 5 further includes:
S411、终端设备对第二时间戳进行修正时间处理S411. The terminal device performs correction time processing on the second timestamp.
S412、终端设备对第二时间戳和第三时间戳进行补偿时间处理。S412. The terminal device performs compensation time processing on the second timestamp and the third timestamp.
S411可参照上述实施例中的S211,S412可参照上述实施例中的S212,在此,不作赘述。S411 can refer to S211 in the foregoing embodiment, and S412 can refer to S212 in the foregoing embodiment, and details are not described herein.
可选地,作为本发明的一实施例,如图5所示方法还包括:Optionally, as an embodiment of the present invention, the method shown in FIG. 5 further includes:
S413、接入网设备对第四时间戳进行修正时间处理。S413. The access network device performs a modified time processing on the fourth timestamp.
S414、接入网设备对第一时间戳和第四时间戳进行补偿时间处理。S414. The access network device performs compensation time processing on the first timestamp and the fourth timestamp.
S413可参照上述实施例中的S209,S414可参照上述实施例中的S210,在此,不作赘述。For reference to S209 in the foregoing embodiment, reference may be made to S210 in the foregoing embodiment, and S219 is not described herein.
可选地,作为本发明的一实施例,S406可包括如下处理步骤:Optionally, as an embodiment of the present invention, S406 may include the following processing steps:
S415、接入网设备解析数据包,确定数据包对应的类型和时间戳信息。S415. The access network device parses the data packet, and determines a type and timestamp information corresponding to the data packet.
S416、接入网设备根据数据包的类型确定对应时钟偏差的计算公式。S416. The access network device determines a calculation formula of the corresponding clock offset according to the type of the data packet.
S417、接入网设备基于计算公式、时间戳信息、第一时间戳和第四时间戳确定本地时钟相对于接入网设备的时钟偏差。S417. The access network device determines a clock offset of the local clock relative to the access network device based on the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp.
S415-S417与上述实施例中的S214-S216的区别在于执行主体不同,上述实施例为终端执行,本实施例为接入网设备执行,其处理过程的原理相同,在此,不作赘述。The S415-S417 is different from the S214-S216 in the foregoing embodiment in that the executor is different, and the foregoing embodiment is performed by the terminal. This embodiment is implemented by the access network device, and the principle of the processing is the same, and details are not described herein.
S407、接入网设备将时钟偏差发送给终端设备。S407. The access network device sends a clock offset to the terminal device.
S408、终端设备根据时钟偏差调整终端设备的本地时钟。S408. The terminal device adjusts a local clock of the terminal device according to a clock offset.
因此,本实施例提供的时钟处理的方法,终端设备将第一时间戳和第三时间戳以合并的方式一次性的发送给接入网设备,提升了时频资源的利用率,进而更高效的利用无线网络的时频资源,而且接入网设备比终端设备的计算速度快,且对时间戳进行补偿时间处理和修正时间处理,提高了时间戳的准确性,进而提高了时间偏差的精准度,通过补偿时间处理还可以防止接入网设备和终端设备参数的泄露,在数据包添加验证信息可以保证第一时间戳和第二时间戳的匹配度、第三时间戳和第四时间戳的匹配度,减少误差,提高时钟同步的精准度。Therefore, in the clock processing method provided by the embodiment, the terminal device sends the first timestamp and the third timestamp to the access network device in a combined manner, thereby improving the utilization of the time-frequency resource and further improving the efficiency. The time-frequency resources of the wireless network are utilized, and the access network device is faster than the terminal device, and the time stamp is compensated for time processing and corrected time processing, thereby improving the accuracy of the time stamp, thereby improving the accuracy of the time deviation. Degree, the compensation time processing can also prevent the leakage of the parameters of the access network device and the terminal device, and the verification information added in the data packet can ensure the matching degree of the first timestamp and the second timestamp, the third timestamp and the fourth timestamp. The degree of matching reduces errors and improves the accuracy of clock synchronization.
上述主要从接入网设备和终端设备交互的角度对本发明实施例的方案进行了介绍。可以理解的是,接入网设备、终端设备等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The solution of the embodiment of the present invention is mainly introduced from the perspective of interaction between the access network device and the terminal device. It can be understood that the access network device, the terminal device, and the like, in order to implement the above functions, include hardware structures and/or software modules corresponding to each function. Those skilled in the art will readily appreciate that the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
本发明实施例可以根据上述方法示例对接入网设备和终端设备等进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软 件功能单元的形式实现。需要说明的是,本发明实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiments of the present invention may perform functional unit division on an access network device, a terminal device, and the like according to the foregoing method. For example, each functional unit may be divided according to each function, or two or more functions may be integrated into one processing. In the unit. The above integrated unit can be implemented either in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
在采用集成的单元的情况下,图6示出了上述实施例中所涉及的接入网设备的一种可能的结构示意图。如图6所示,接入网设备600可以包括:处理单元601、接收单元602和发送单元603。In the case of employing an integrated unit, FIG. 6 shows a possible structural diagram of the access network device involved in the above embodiment. As shown in FIG. 6, the access network device 600 may include a processing unit 601, a receiving unit 602, and a sending unit 603.
处理单元601,用于确定向终端设备发送第一信号的第一时间戳;接收单元602,用于接收终端设备发送与第一信号相对应的第二信号;处理单元601,还用于确定接收第二信号的第四时间戳;发送单元603,用于向终端设备发送包含有第一时间戳和第四时间戳的数据包,数据包用于使终端设备调整终端设备的本地时钟。The processing unit 601 is configured to determine a first timestamp for transmitting the first signal to the terminal device, and the receiving unit 602 is configured to receive, by the terminal device, a second signal corresponding to the first signal, where the processing unit 601 is further configured to determine to receive a fourth timestamp of the second signal; the sending unit 603 is configured to send, to the terminal device, a data packet that includes the first timestamp and the fourth timestamp, where the data packet is used to enable the terminal device to adjust the local clock of the terminal device.
本实施例的接入网设备600具有图2中接入网设备的功能,可实现图2中S201-S205中接入网设备所完成的动作,进而实现S201-S205对应时钟处理方法的技术效果,具体请参照图2中S201-S205,为简介描述,在此,不作赘述。The access network device 600 of this embodiment has the function of the access network device in FIG. 2, and can implement the operations performed by the access network device in S201-S205 in FIG. 2, thereby implementing the technical effect of the S201-S205 corresponding clock processing method. For details, please refer to S201-S205 in FIG. 2 for a brief description, and details are not described herein.
可选地,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点。Optionally, the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
可选地,处理单元601,还用于配置待发送的第一信号的配置信息和第二信号的配置信息;发送单元603,还用于根据第一信号的配置信息将第一信号发送给终端设备;处理单元601,还用于根据第二信号的配置信息检测是否有待接收的第二信号。Optionally, the processing unit 601 is further configured to configure the configuration information of the first signal to be sent and the configuration information of the second signal, and the sending unit 603 is further configured to send the first signal to the terminal according to the configuration information of the first signal. The processing unit 601 is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
可选地,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。Optionally, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
可选地,处理单元601,还用于对第四时间戳进行修正时间处理。Optionally, the processing unit 601 is further configured to perform a modified time processing on the fourth timestamp.
可选地,处理单元601,还用于对第一时间戳和第四时间戳进行补偿时间处理。Optionally, the processing unit 601 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
可选地,修正时间处理包括:修正记录第四时间戳与第二信号实际到达时刻的时间偏差。Optionally, the modifying the time processing comprises: correcting a time deviation between the recording of the fourth timestamp and the actual arrival time of the second signal.
可选地,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,或减少从接入网设备接收第二信号到记录第四时间戳的平均时间。Optionally, the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device to transmit the first signal, or reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
可选地,处理单元601,用于将第一时间戳和第四时间戳生成第一类型的数据包,并控制发送单元603向终端设备发送第一类型的数据包;或,对第一时间戳和第四时间戳进行加权处理生成第二类型的数据包,并控制发送单元603向终端设备发送第二类型的数据包;或,对第一时间戳和第四时间戳进行差分处理生成第三类型的数据包,并控制发送单元603向终端设备发送第三类型的数据包。Optionally, the processing unit 601 is configured to generate a first type of data packet by using the first timestamp and the fourth timestamp, and control the sending unit 603 to send the first type of data packet to the terminal device; or, for the first time And performing a weighting process on the stamp and the fourth timestamp to generate a second type of data packet, and controlling the sending unit 603 to send the second type of data packet to the terminal device; or performing differential processing on the first timestamp and the fourth timestamp to generate the first Three types of data packets, and the control transmitting unit 603 transmits a third type of data packet to the terminal device.
可选地,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的时间戳。Optionally, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; The second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
包含上述单元的接入网设备600具有如图3所示时钟处理方法中接入网设备的功能,可执行S207-S217中接入网设备所完成的动作,进而实现S207-S217对应时钟处理方法的技术效果,具体请参考图3中S207-S217,为简洁描述,在此,不作赘述。The access network device 600 including the foregoing unit has the function of the access network device in the clock processing method shown in FIG. 3, and can perform the operations performed by the access network device in S207-S217, thereby implementing the S207-S217 corresponding clock processing method. For details of the technical effects, please refer to S207-S217 in FIG. 3 for the sake of brevity, and details are not described herein.
在本发明的一实施例中,如图6所示接入网设备600中的处理单元601、接收单元602和发送单元603还可用于执行其它操作,具体如下:In an embodiment of the present invention, the processing unit 601, the receiving unit 602, and the sending unit 603 in the access network device 600 are also used to perform other operations, as follows:
处理单元601,用于确定向终端设备发送第一信号的第一时间戳;接收单元602,用于接收终端设备发送的与第一信号相对应的第二信号;处理单元601,还用于确定接收第二信号的第四时间戳;接收单元602,还用于接收终端设备发送的包含第二时间戳和第三时间戳的数据包;处理单元601,还用于基于数据包、第一时间戳和第四时间戳确定终端设备相对于接入网设备的时钟偏差;发送单元603,用于将时钟偏差发送给终端设备,时钟偏差用于指示终端设备根据时钟偏差调整终端设备的本地时钟。The processing unit 601 is configured to determine a first timestamp for transmitting the first signal to the terminal device, and the receiving unit 602 is configured to receive a second signal that is sent by the terminal device and corresponding to the first signal. The processing unit 601 is further configured to determine Receiving a fourth timestamp of the second signal; the receiving unit 602 is further configured to receive a data packet that is sent by the terminal device and includes the second timestamp and the third timestamp; the processing unit 601 is further configured to use the data packet, the first time The stamp and the fourth timestamp determine the clock offset of the terminal device relative to the access network device; the sending unit 603 is configured to send the clock offset to the terminal device, and the clock offset is used to instruct the terminal device to adjust the local clock of the terminal device according to the clock offset.
其中,第二时间戳为终端设备接收第一信号的时间戳,第三时间戳为终端设备发送第二信号的时间戳。The second timestamp is a timestamp of the terminal device receiving the first signal, and the third timestamp is a timestamp of the second signal sent by the terminal device.
本实施例的接入网设备600具有上述实施例中S401-S408中接入网设备的功能,可执行S401-S408中接入网设备的所有动作,进而实现S401-S408对应时钟处理方法的技术效果,具体请参照图4中S401-S408,为简洁描述,在此,不作赘述。The access network device 600 of the present embodiment has the functions of the access network device in S401-S408 in the foregoing embodiment, and can perform all the actions of the access network device in S401-S408, thereby implementing the technology of the S401-S408 corresponding clock processing method. For details, please refer to S401-S408 in FIG. 4 for the sake of brevity, and details are not described herein.
可选地,处理单元601,还用于解析数据包,确定数据包对应的类型和时间戳信息;Optionally, the processing unit 601 is further configured to parse the data packet, and determine a type and timestamp information corresponding to the data packet;
其中,数据包的类型为以下类型中的一个:将第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第二时间戳和第三时间戳处理后的信息。The type of the data packet is one of the following types: a first type of data packet generated by the first timestamp and the fourth timestamp, and a second type generated by weighting the first timestamp and the fourth timestamp. The data packet is a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; the timestamp information includes information processed after the second timestamp and the third timestamp.
可选地,数据包还包括验证信息;处理单元601,还用于解析数据包,得到验证信息;处理单元601,还用于根据验证信息验证时间戳信息是否匹配;Optionally, the data packet further includes verification information; the processing unit 601 is further configured to parse the data packet to obtain the verification information, and the processing unit 601 is further configured to verify, according to the verification information, whether the timestamp information matches;
其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的时间戳。The verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; the second timestamp is that the terminal device receives the second signal. The timestamp, the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
可选地,处理单元601,还用于当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第一时间戳和第四时间戳确定终端设备的时钟相对于接入网设备时钟的时钟偏差。Optionally, the processing unit 601 is further configured to: when the verification is matched, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine, according to the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp, the terminal device The clock skew of the clock relative to the access network device clock.
可选地,处理单元601,还用于配置待发送的第一信号和第二信号的配置信息;发送单元603,还用于根据第一信号的配置信息将第一信号发送给终端设备;处理单元601,还用于根据第二信号的配置信息检测是否有待接收的第二信号。Optionally, the processing unit 601 is further configured to configure configuration information of the first signal and the second signal to be sent, and the sending unit 603 is further configured to send the first signal to the terminal device according to the configuration information of the first signal; The unit 601 is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
可选地,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。Optionally, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
可选地,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点。Optionally, the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
可选地,处理单元601,还用于对第四时间戳进行修正时间处理。Optionally, the processing unit 601 is further configured to perform a modified time processing on the fourth timestamp.
可选地,处理单元601,还用于对第一时间戳和第四时间戳进行补偿时间处理。Optionally, the processing unit 601 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
可选地,修正时间处理包括:修正开始接收第二信号记录的第四时间戳与第二信号实际到达时刻的时间偏差。Optionally, the correcting time processing comprises: correcting a time offset of the fourth timestamp from which the second signal recording is started to be received and the actual arrival time of the second signal.
可选地,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,以及减少从接入网设备接收第二信号到记录第四时间戳的平均时间。Optionally, the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device transmitting the first signal, and reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
包含上述单元的接入网设备600具有如图5所示时钟处理方法中的接入网设备的 功能,可执行S409-S408中接入网设备的所有动作,进而实现S409-S408对应时钟处理方法的技术效果,具体请参照图5中S409-S408,为简洁描述,在此,不作赘述。The access network device 600 including the foregoing unit has the function of the access network device in the clock processing method shown in FIG. 5, and can perform all actions of the access network device in S409-S408, thereby implementing the S409-S408 corresponding clock processing method. For details, please refer to S409-S408 in FIG. 5 for a brief description, and details are not described herein.
图6接入网设备600中的处理单元601可以为处理器/控制器,接收单元602可以为接收器,发送单元603可以为发射器,如图7示出了上述实施例中所涉及的接入网设备的一种可能的设计结构的实体示意图。接入网设备600包括:发射器701,接收器702,控制器/处理器703,存储器704和调制解调处理器705。The processing unit 601 in the access network device 600 can be a processor/controller, the receiving unit 602 can be a receiver, and the sending unit 603 can be a transmitter. As shown in FIG. 7, the connection involved in the foregoing embodiment is shown in FIG. A physical schematic diagram of one possible design structure of a networked device. Access network device 600 includes a transmitter 701, a receiver 702, a controller/processor 703, a memory 704, and a modem processor 705.
控制器/处理器703可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。The controller/processor 703 can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (ASIC). Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
在存储器704存储有用于执行图2或图4的程序或指令,通过控制器/处理器703执行图2或图4中的具体步骤;如通过控制器/处理器703确定向终端设备发送第一信号的第一时间戳;接收器702接收终端设备发送的与第一信号相对应的第二信号,控制器/处理器703确定接收第二信号的第四时间戳;发射器701向终端设备发送包含有第一时间戳和第四时间戳的数据包,数据包用于使终端设备调整终端设备的本地时钟。The program or instructions for executing FIG. 2 or FIG. 4 are stored in the memory 704, and the specific steps in FIG. 2 or FIG. 4 are performed by the controller/processor 703; as determined by the controller/processor 703 to transmit the first to the terminal device a first timestamp of the signal; the receiver 702 receives a second signal corresponding to the first signal transmitted by the terminal device, the controller/processor 703 determines a fourth timestamp for receiving the second signal; the transmitter 701 transmits to the terminal device The data packet includes a first timestamp and a fourth timestamp, and the data packet is used to enable the terminal device to adjust the local clock of the terminal device.
可选地,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点。Optionally, the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
可选地,控制器/处理器703,还用于配置待发送的第一信号和第二信号的配置信息;发射器701,还用于根据第一信号的配置信息将第一信号发送给终端设备;接收器702,还用于根据第二信号的配置信息检测是否有待接收的第二信号。Optionally, the controller/processor 703 is further configured to configure configuration information of the first signal and the second signal to be sent, and the transmitter 701 is further configured to send the first signal to the terminal according to the configuration information of the first signal. The device 702 is further configured to detect, according to the configuration information of the second signal, whether there is a second signal to be received.
可选地,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。Optionally, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
可选地,控制器/处理器703,还用于对第四时间戳进行修正时间处理。Optionally, the controller/processor 703 is further configured to perform a modified time processing on the fourth timestamp.
可选地,控制器/处理器703,还用于对第一时间戳和第四时间戳进行补偿时间处理。Optionally, the controller/processor 703 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
可选地,修正时间处理包括:修正记录第四时间戳与第二信号实际到达时刻的时间偏差。Optionally, the modifying the time processing comprises: correcting a time deviation between the recording of the fourth timestamp and the actual arrival time of the second signal.
可选地,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,或减少从接入网设备接收第二信号到记录第四时间戳的平均时间。Optionally, the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device to transmit the first signal, or reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
可选地,控制器/处理器703,还用于将第一时间戳和第四时间戳生成第一类型的数据包,并控制发射器701向终端设备发送第一类型的数据包;或,对第一时间戳和第四时间戳进行加权处理生成第二类型的数据包,并控制发射器701向终端设备发送第二类型的数据包;或,对第一时间戳和第四时间戳进行差分处理生成第三类型的数据包,并控制发射器701向终端设备发送第三类型的数据包。Optionally, the controller/processor 703 is further configured to generate the first type of data packet by using the first timestamp and the fourth timestamp, and control the transmitter 701 to send the first type of data packet to the terminal device; or Weighting the first timestamp and the fourth timestamp to generate a second type of data packet, and controlling the transmitter 701 to send the second type of data packet to the terminal device; or, performing the first timestamp and the fourth timestamp The differential processing generates a third type of data packet and controls the transmitter 701 to transmit a third type of data packet to the terminal device.
可选地,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的 时间戳。Optionally, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; The second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is a timestamp of the second signal sent by the terminal device to the access network device.
又如:通过控制器/处理器703确定向终端设备发送第一信号的第一时间戳;接收器702接收终端设备发送的与第一信号相对应的第二信号;控制器/处理器703确定接收第二信号的第四时间戳;接收器702接收终端设备发送的包含第二时间戳和第三时间戳的数据包;控制器/处理器703基于数据包、第一时间戳和第四时间戳确定终端设备相对于接入网设备的时钟偏差;发射器701将时钟偏差发送给终端设备,以指示终端设备根据时钟偏差调整终端设备的本地时钟;其中,第二时间戳为终端设备接收第一信号的时间戳,第三时间戳为终端设备发送第二信号的时间戳。For another example, the first timestamp of transmitting the first signal to the terminal device is determined by the controller/processor 703; the receiver 702 receives the second signal corresponding to the first signal sent by the terminal device; the controller/processor 703 determines Receiving a fourth timestamp of the second signal; the receiver 702 receives the data packet that is sent by the terminal device and includes the second timestamp and the third timestamp; the controller/processor 703 is based on the data packet, the first timestamp, and the fourth time Determining a clock offset of the terminal device relative to the access network device; the transmitter 701 sends the clock offset to the terminal device to instruct the terminal device to adjust the local clock of the terminal device according to the clock offset; wherein the second timestamp is the terminal device receiving the first The timestamp of a signal, and the third timestamp is a timestamp of the second signal sent by the terminal device.
可选地,控制器/处理器703,还用于解析数据包,确定数据包对应的类型和时间戳信息;其中,述数据包的类型为以下类型中的一个:将第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第二时间戳和第三时间戳处理后的信息。Optionally, the controller/processor 703 is further configured to parse the data packet, determine a type and timestamp information corresponding to the data packet, where the type of the data packet is one of the following types: the first timestamp and the first The first type of data packet generated by the fourth timestamp, the second type of data packet generated by weighting the first timestamp and the fourth timestamp, and the first timestamp and the fourth timestamp are differentially processed to generate the first Three types of data packets; the timestamp information includes information processed after the second timestamp and the third timestamp.
可选地,数据包还包括验证信息;控制器/处理器703,还用于解析数据包,得到验证信息;根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配或验证第三时间戳和第四时间戳是否匹配;第二时间戳为终端设备接收第二信号的时间戳,第三时间戳为终端设备向接入网设备发送第二信号的时间戳。Optionally, the data packet further includes verification information; the controller/processor 703 is further configured to parse the data packet to obtain verification information; and verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify at least one of the following: : verifying whether the first timestamp and the second timestamp match or verifying whether the third timestamp and the fourth timestamp match; the second timestamp is a timestamp of the terminal device receiving the second signal, and the third timestamp is the terminal device direction The timestamp of the second signal sent by the access network device.
可选地,控制器/处理器703,用于当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第一时间戳和第四时间戳确定终端设备的时钟相对于接入网设备时钟的时钟偏差。Optionally, the controller/processor 703 is configured to: when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine the terminal based on the calculation formula, the timestamp information, the first timestamp, and the fourth timestamp. The clock skew of the device's clock relative to the access network device's clock.
可选地,控制器/处理器703,还用于配置待发送的第一信号和第二信号的配置信息;收发器,还用于根据第一信号的配置信息将第一信号发送给终端设备;根据第二信号的配置信息检测是否有待接收的第二信号。Optionally, the controller/processor 703 is further configured to configure configuration information of the first signal and the second signal to be sent, and the transceiver is further configured to send the first signal to the terminal device according to the configuration information of the first signal. And detecting, according to the configuration information of the second signal, whether there is a second signal to be received.
可选地,配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。Optionally, the configuration information includes at least one of the following: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
可选地,第一时间戳为第一信号开始或完成发送流程中设定步骤对应的时刻点;第四时间戳为第二信号开始或完成接收流程中设定步骤对应的时刻点。Optionally, the first timestamp is a time point corresponding to the first signal starting or completing the setting step in the sending process; the fourth timestamp is a time point corresponding to the second signal starting or completing the setting step in the receiving process.
可选地,控制器/处理器703,还用于对第四时间戳进行修正时间处理。Optionally, the controller/processor 703 is further configured to perform a modified time processing on the fourth timestamp.
可选地,控制器/处理器703,还用于对第一时间戳和第四时间戳进行补偿时间处理。Optionally, the controller/processor 703 is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
可选地,修正时间处理包括:修正开始接收第二信号记录的第四时间戳与第二信号实际到达时刻的时间偏差。Optionally, the correcting time processing comprises: correcting a time offset of the fourth timestamp from which the second signal recording is started to be received and the actual arrival time of the second signal.
可选地,补偿时间处理包括以下至少之一:增加从记录第一时间戳到接入网设备将第一信号发送的平均时间,或减少从接入网设备接收第二信号到记录第四时间戳的平均时间。Optionally, the compensation time processing includes at least one of: increasing an average time from recording the first timestamp to the access network device to transmit the first signal, or reducing receiving the second signal from the access network device to recording the fourth time The average time of the stamp.
需要说明的是:调制解调处理器705用于对信号进行编码和调制处理,以及对信号进行解调和解码处理。It should be noted that the modem processor 705 is used for encoding and modulating signals, and demodulating and decoding the signals.
上述接入网设备700可作为如图3所示时钟处理方法中的接入网设备,执行S207-S217,可实现S207-S217对应时钟处理方法的技术效果;还可作为如图5所示时钟处理方法中的接入网设备,执行S409-S408,可实现S409-S408对应时钟处理方法 的技术效果,在此,不作赘述。The foregoing access network device 700 can be used as an access network device in the clock processing method shown in FIG. 3, and executes S207-S217, which can implement the technical effect of the S207-S217 corresponding clock processing method; and can also be used as the clock shown in FIG. The access network device in the processing method performs S409-S408, and the technical effects of the S409-S408 corresponding clock processing method can be implemented, and details are not described herein.
在采用集成的单元的情况下,图8示出了上述实施例中所涉及的终端设备的一种可能的结构示意图,终端设备800包括:接收单元801、处理单元802和发送单元803。FIG. 8 is a schematic diagram showing a possible structure of a terminal device involved in the foregoing embodiment. The terminal device 800 includes a receiving unit 801, a processing unit 802, and a sending unit 803.
接收单元801,用于接收接入网设备发送的第一信号,处理单元802,用于确定接收第一信号的第二时间戳;发送单元803,用于向接入网设备发送与第一信号相对应的第二信号;处理单元802,还用于确定发送第二信号的第三时间戳;接收单元801,还用于接收接入网设备发送的包含有第一时间戳和第四时间戳的数据包;处理单元802,还用于根据数据包调整本地时钟;其中,第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。The receiving unit 801 is configured to receive a first signal sent by the access network device, the processing unit 802 is configured to determine a second timestamp for receiving the first signal, and the sending unit 803 is configured to send the first signal to the access network device. a corresponding second signal; the processing unit 802 is further configured to determine a third timestamp for transmitting the second signal, and the receiving unit 801 is further configured to receive, by the access network device, the first timestamp and the fourth timestamp The processing unit 802 is further configured to adjust the local clock according to the data packet, where the first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is the second timestamp of the access network device receiving the second signal. Timestamp.
本实施例的终端设备800具有上述实施例中S201-S205中终端设备的功能,可执行S201-S205中终端设备的所有动作,进而实现S201-S205对应时钟处理方法的技术效果,具体请参照图2中S201-S205,为简洁描述,在此,不作赘述。The terminal device 800 of the present embodiment has the functions of the terminal device in S201-S205 in the foregoing embodiment, and can perform all the actions of the terminal device in S201-S205, thereby implementing the technical effects of the S201-S205 corresponding clock processing method. 2 S201-S205, for the sake of brevity, hereby, no further description is given.
可选地,接收单元801,还用于接收接入网设备发送的第一信号的配置信息和第二信号的配置信息;处理单元802,还用于根据第一信号的配置信息检测是否有待接收的第一信号;发送单元803,还用于根据第二信号的配置信息向接入网设备发送第一信号相对应的第二信号。Optionally, the receiving unit 801 is further configured to receive the configuration information of the first signal and the configuration information of the second signal that are sent by the access network device, and the processing unit 802 is further configured to detect, according to the configuration information of the first signal, whether it is to be received. The first signal; the sending unit 803 is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
可选地,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点。Optionally, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
可选地,处理单元802,还用于对第二时间戳进行修正时间处理。Optionally, the processing unit 802 is further configured to perform a modified time processing on the second timestamp.
可选地,处理单元802,还用于对第二时间戳和第三时间戳进行补偿时间处理。Optionally, the processing unit 802 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
可选地,修正时间处理包括:修正记录第二时间戳与第一信号实际到达时刻的时间偏差。Optionally, the correcting time processing includes: correcting a time deviation between the recording of the second timestamp and the actual arrival time of the first signal.
可选地,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将所述第二信号发送的平均时间。Optionally, the compensation time processing includes at least one of: reducing an average time from receiving the first signal from the terminal device to recording the second timestamp, and increasing from transmitting the third timestamp to transmitting the second signal by the terminal device Average time.
可选地,处理单元802,还用于解析数据包,确定数据包对应的类型和时间戳信息;Optionally, the processing unit 802 is further configured to parse the data packet, and determine a type and timestamp information corresponding to the data packet;
其中,数据包的类型为以下类型中的一个:将第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第一时间戳和第四时间戳处理后的信息。The type of the data packet is one of the following types: a first type of data packet generated by the first timestamp and the fourth timestamp, and a second type generated by weighting the first timestamp and the fourth timestamp. The data packet is a third type of data packet generated by differentially processing the first timestamp and the fourth timestamp; the timestamp information includes information processed after the first timestamp and the fourth timestamp.
可选地,数据包还包括验证信息;处理单元802,还用于解析数据包,得到验证信息;处理单元802,用于根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,或验证第三时间戳和第四时间戳是否匹配。Optionally, the data packet further includes verification information; the processing unit 802 is further configured to parse the data packet to obtain verification information; and the processing unit 802 is configured to verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify the following At least one of: verifying whether the first timestamp and the second timestamp match, or verifying whether the third timestamp and the fourth timestamp match.
可选地,处理单元802,还用于确定当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备时钟的时钟偏差;根据时钟偏差调整本地时钟。Optionally, the processing unit 802 is further configured to: determine, when the verification matches, determine a calculation formula of the corresponding clock deviation according to the type of the data packet; determine the local clock based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp. Clock skew relative to the access network device clock; local clock is adjusted based on clock skew.
包含上述单元的终端设备800具有如图3所示时钟处理方法中的终端设备的功能,可执行S207-S217中终端设备的所有动作,进而实现S207-S217对应时钟处理方法的 技术效果,具体请参照图3中S207-S217,为简洁描述,在此,不作赘述。The terminal device 800 including the above unit has the function of the terminal device in the clock processing method shown in FIG. 3, and can perform all the actions of the terminal device in S207-S217, thereby implementing the technical effects of the S207-S217 corresponding clock processing method. Referring to S207-S217 in FIG. 3, for the sake of brevity, no further description is provided herein.
在本发明的一实施例中,图8所示终端设备800中的接收单元801、处理单元802和发送单元803还可用于执行其它操作,具体如下:In an embodiment of the present invention, the receiving unit 801, the processing unit 802, and the sending unit 803 in the terminal device 800 shown in FIG. 8 can also be used to perform other operations, as follows:
接收单元801,用于接收接入网设备发送的第一信号;处理单元802,用于确定接收第一信号的第二时间戳;发送单元803,用于向接入网设备发送与第一信号相对应的第二信号;处理单元802,还用于确定发送第二信号的第三时间戳;接收单元801,还用于向接入网设备发送包含有第二时间戳和第三时间戳的数据包;处理单元802,用于接收接入网设备根据数据包确定的时钟偏差,根据时钟偏差调整本地时钟。The receiving unit 801 is configured to receive a first signal sent by the access network device, the processing unit 802 is configured to determine a second timestamp for receiving the first signal, and the sending unit 803 is configured to send the first signal to the access network device. a corresponding second signal; the processing unit 802 is further configured to determine a third timestamp for transmitting the second signal, and the receiving unit 801 is further configured to send, to the access network device, the second timestamp and the third timestamp. a data packet; a processing unit 802, configured to receive a clock offset determined by the access network device according to the data packet, and adjust the local clock according to the clock offset.
本实施例的终端设备800具有上述实施例中S401-S408中终端设备的功能,可执行S401-S408中终端设备的所有动作,进而实现S401-S408对应时钟处理方法的技术效果,具体请参照图4中S401-S408,为简洁描述,在此,不作赘述。The terminal device 800 of the present embodiment has the functions of the terminal device in S401-S408 in the foregoing embodiment, and can perform all the actions of the terminal device in S401-S408, thereby implementing the technical effects of the S401-S408 corresponding clock processing method. S401-S408 in 4, for the sake of brevity, hereby is not described.
可选地,接收单元801,还用于接收接入网设备发送的第一信号和第二信号的配置信息;处理单元802,用于根据第一信号的配置信息检测是否有待接收的第一信号;发送单元803,还用于根据第二信号的配置信息向接入网设备发送第一信号相对应的第二信号。Optionally, the receiving unit 801 is further configured to receive configuration information of the first signal and the second signal sent by the access network device, where the processing unit 802 is configured to detect, according to the configuration information of the first signal, whether the first signal to be received is received. The sending unit 803 is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
可选地,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点。Optionally, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
可选地,处理单元802,还用于对第二时间戳进行修正时间处理。Optionally, the processing unit 802 is further configured to perform a modified time processing on the second timestamp.
可选地,处理单元802,还用于对第二时间戳和第三时间戳进行补偿时间处理。Optionally, the processing unit 802 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
可选地,修正时间处理包括:修正开始接收第一信号记录的第二时间戳与第一信号实际到达时刻的时间偏差。Optionally, the correcting time processing comprises: correcting a time offset of the second timestamp from which the first signal record is received and the actual arrival time of the first signal.
可选地,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将第二信号发送的平均时间。Optionally, the compensation time processing includes at least one of: reducing an average time from receiving the first signal to the second time stamp by the terminal device, and increasing an average time from recording the third time stamp to transmitting the second signal by the terminal device .
可选地,处理单元802,用于将第二时间戳和第三时间戳生成第一类型的数据包,并控制发送单元803向接入网设备发送第一类型的数据包;或,对第二时间戳和第三时间戳进行加权处理生成第二类型的数据包,并控制发送单元803向接入网设备发送第二类型的数据包;或,对第二时间戳和第三时间戳进行差分处理生成第三类型的数据包,并控制发送单元803向接入网设备发送第三类型的数据包。Optionally, the processing unit 802 is configured to generate a first type of data packet by using the second timestamp and the third timestamp, and control the sending unit 803 to send the first type of data packet to the access network device; or The second timestamp and the third timestamp perform a weighting process to generate a second type of data packet, and control the sending unit 803 to send a second type of data packet to the access network device; or, perform the second timestamp and the third timestamp The differential processing generates a third type of data packet, and the control transmitting unit 803 transmits a third type of data packet to the access network device.
可选地,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,或验证第三时间戳和第四时间戳是否匹配;第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。Optionally, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, or verifying whether the third timestamp and the fourth timestamp match; The first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
包含上述单元的终端设备800具有如图5所示时钟处理方法中的终端设备的功能,可执行S409-S408中终端设备的所有动作,进而实现S409-S408对应时钟处理方法的技术效果,具体请参照图5中S409-S408,为简洁描述,在此,不作赘述。The terminal device 800 including the above-mentioned unit has the function of the terminal device in the clock processing method shown in FIG. 5, and can perform all the actions of the terminal device in S409-S408, thereby implementing the technical effect of the S409-S408 corresponding clock processing method. Referring to S409-S408 in FIG. 5, for the sake of brevity, no further details are provided herein.
图8所示终端设备800中的处理单元801可以为控制器/处理器,接收单元801可以为接收器,发送单元803可以为发射器,如图9示出了上述实施例中所涉及的终端设备的一种可能的设计结构的实体示意图。包括:发射器901,接收器902,控制器/处理器903,存储器904和调制解调处理器905。The processing unit 801 in the terminal device 800 shown in FIG. 8 may be a controller/processor, the receiving unit 801 may be a receiver, and the sending unit 803 may be a transmitter. As shown in FIG. 9, the terminal involved in the foregoing embodiment is shown. A physical schematic of a possible design structure of a device. It includes a transmitter 901, a receiver 902, a controller/processor 903, a memory 904, and a modem processor 905.
控制器/处理器903以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP), 专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。The controller/processor 903 is a processor or a controller, and may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application- Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
在存储器904存储有用于执行图2或图4的程序或指令,通过控制器/处理器903执行图2或图4中的具体步骤;如通过接收器902接收接入网设备发送的第一信号;控制器/处理器903确定接收第一信号的第二时间戳;发射器901向接入网设备发送第一信号相对应的第二信号;控制器/处理器903确定发送第二信号的第三时间戳;接收器902接收接入网设备发送的包含有第一时间戳和第四时间戳的数据包;控制器/处理器903根据数据包调整本地时钟;其中,第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。The program or instruction for executing FIG. 2 or FIG. 4 is stored in the memory 904, and the specific steps in FIG. 2 or FIG. 4 are performed by the controller/processor 903; for example, the first signal transmitted by the access network device is received by the receiver 902. The controller/processor 903 determines a second timestamp to receive the first signal; the transmitter 901 transmits a second signal corresponding to the first signal to the access network device; the controller/processor 903 determines to transmit the second signal a third timestamp; the receiver 902 receives the data packet that is sent by the access network device and includes the first timestamp and the fourth timestamp; the controller/processor 903 adjusts the local clock according to the data packet; wherein the first timestamp is The timestamp of the first signal sent by the network access device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
可选地,接收器902,还用于接收接入网设备发送的第一信号的配置信息和第二信号的配置信息,根据第一信号的配置信息检测是否有待接收的第一信号;发射器901,还用于根据第二信号的配置信息向接入网设备发送第一信号相对应的第二信号。Optionally, the receiver 902 is further configured to receive configuration information of the first signal sent by the access network device and configuration information of the second signal, and detect whether the first signal to be received is received according to the configuration information of the first signal; 901. The 901 is further configured to send, according to configuration information of the second signal, a second signal corresponding to the first signal to the access network device.
可选地,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点。Optionally, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
可选地,控制器/处理器903,还用于对第二时间戳进行修正时间处理。Optionally, the controller/processor 903 is further configured to perform a modified time processing on the second timestamp.
可选地,控制器/处理器903,还用于对第二时间戳和第三时间戳进行补偿时间处理。Optionally, the controller/processor 903 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
可选地,修正时间处理包括:修正记录第二时间戳与第一信号实际到达时刻的时间偏差。Optionally, the correcting time processing includes: correcting a time deviation between the recording of the second timestamp and the actual arrival time of the first signal.
可选地,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间或增加从记录第三时间戳到终端设备将所述第二信号发送的平均时间。Optionally, the compensation time processing includes at least one of: reducing an average time from receiving the first signal to the second timestamp from the terminal device or increasing an average from recording the third timestamp to transmitting the second signal by the terminal device time.
可选地,控制器/处理器903,还用于解析数据包,确定数据包对应的类型和时间戳信息;其中,数据包的类型为以下类型中的一个:将第一时间戳和第四时间戳生成的第一类型的数据包,将第一时间戳和第四时间戳进行加权处理生成的第二类型的数据包,将第一时间戳和第四时间戳进行差分处理生成的第三类型的数据包;时间戳信息包括对第一时间戳和第四时间戳处理后的信息。Optionally, the controller/processor 903 is further configured to parse the data packet, determine a type and timestamp information corresponding to the data packet, where the type of the data packet is one of the following types: the first timestamp and the fourth a first type of data packet generated by the timestamp, a second type of data packet generated by weighting the first timestamp and the fourth timestamp, and a third time generated by differential processing of the first timestamp and the fourth timestamp A type of data packet; the timestamp information includes information processed for the first timestamp and the fourth timestamp.
可选地,数据包还包括验证信息;控制器/处理器903,还用于解析数据包,得到验证信息;根据验证信息验证时间戳信息是否匹配;其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,或验证第三时间戳和第四时间戳是否匹配。Optionally, the data packet further includes verification information; the controller/processor 903 is further configured to parse the data packet to obtain verification information; and verify, according to the verification information, whether the timestamp information matches; wherein the verification information is used to verify at least one of the following: : Verify that the first timestamp and the second timestamp match, or verify that the third timestamp and the fourth timestamp match.
可选地,控制器/处理器903,用于确定当验证匹配时,根据数据包的类型确定对应时钟偏差的计算公式;基于计算公式、时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备时钟的时钟偏差;根据时钟偏差调整本地时钟。Optionally, the controller/processor 903 is configured to determine, according to the type of the data packet, a calculation formula for determining a corresponding clock offset when the verification is matched; determining, based on the calculation formula, the timestamp information, the second timestamp, and the third timestamp. The clock skew of the local clock relative to the access network device clock; the local clock is adjusted based on the clock skew.
又如:通过接收器902接收接入网设备发送的第一信号;控制器/处理器903确定接收第一信号的第二时间戳;发射器901向接入网设备发送第一信号相对应的第二信号;控制器/处理器903确定发送第二信号的第三时间戳;发射器901向接入网设备发送包含有第二时间戳和第三时间戳的数据包;接收器902接收接入网设备根据数据包确定的时钟偏差;控制器/处理器903根据时钟偏差调整本地时钟。For another example, the first signal sent by the access network device is received by the receiver 902; the controller/processor 903 determines a second timestamp for receiving the first signal; and the transmitter 901 sends the first signal corresponding to the access network device. a second signal; the controller/processor 903 determines a third timestamp to transmit the second signal; the transmitter 901 transmits a data packet including the second timestamp and the third timestamp to the access network device; the receiver 902 receives the connection The network device determines the clock offset based on the data packet; the controller/processor 903 adjusts the local clock based on the clock offset.
可选地,接收器902,还用于接收接入网设备发送的第一信号和第二信号的配置信息;根据第一信号的配置信息检测是否有待接收的第一信号;发射器901,还用于根据第二信号的配置信息向接入网设备发送第一信号相对应的第二信号。Optionally, the receiver 902 is further configured to receive configuration information of the first signal and the second signal sent by the access network device, and detect whether there is a first signal to be received according to the configuration information of the first signal, and the transmitter 901 further And configured to send, according to the configuration information of the second signal, a second signal corresponding to the first signal to the access network device.
可选地,第二时间戳为接收第一信号开始或完成接收流程中设定步骤对应的时刻点;第三时间戳为发送第二信号开始或完成发送流程中设定步骤对应的时刻点。Optionally, the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is a time point corresponding to the step of transmitting the second signal or completing the setting step in the sending process.
可选地,控制器/处理器903,还用于对第二时间戳进行修正时间处理。Optionally, the controller/processor 903 is further configured to perform a modified time processing on the second timestamp.
可选地,控制器/处理器903,还用于对第二时间戳和第三时间戳进行补偿时间处理。Optionally, the controller/processor 903 is further configured to perform compensation time processing on the second timestamp and the third timestamp.
可选地,修正时间处理包括:修正开始接收第一信号记录的记录第二时间戳与第一信号实际到达时刻的时间偏差。Optionally, the modifying the time processing comprises: correcting a time deviation of the recording of the second timestamp of the first signal record and the actual arrival time of the first signal.
可选地,补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,或增加从记录第三时间戳到终端设备将第二信号发送的平均时间。Optionally, the compensation time processing includes at least one of: reducing an average time from receiving the first signal to the second time stamp by the terminal device, or increasing an average time from recording the third time stamp to transmitting the second signal by the terminal device .
可选地,控制器/处理器903,用于将第二时间戳和第三时间戳生成第一类型的数据包,并控制发射器901向接入网设备发送第一类型的数据包;或,对第二时间戳和第三时间戳进行加权处理生成第二类型的数据包,并控制发射器901向接入网设备发送第二类型的数据包;或,对第二时间戳和第三时间戳进行差分处理生成第三类型的数据包,并控制发射器901向接入网设备发送第三类型的数据包。Optionally, the controller/processor 903 is configured to generate a first type of data packet by using the second timestamp and the third timestamp, and control the transmitter 901 to send the first type of data packet to the access network device; or And weighting the second timestamp and the third timestamp to generate a second type of data packet, and controlling the transmitter 901 to send the second type of data packet to the access network device; or, for the second timestamp and the third timestamp The time stamp performs differential processing to generate a third type of data packet, and controls the transmitter 901 to transmit a third type of data packet to the access network device.
可选地,数据包还包括验证信息,其中,验证信息用于验证以下至少之一:验证第一时间戳和第二时间戳是否匹配,以及验证第三时间戳和第四时间戳是否匹配;第一时间戳为接入网设备发送第一信号的时间戳,第四时间戳为接入网设备接收第二信号的时间戳。Optionally, the data packet further includes verification information, wherein the verification information is used to verify at least one of: verifying whether the first timestamp and the second timestamp match, and verifying whether the third timestamp and the fourth timestamp match; The first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the second signal received by the access network device.
需要说明的是:调制解调处理器805用于对信号进行编码和调制处理,以及对信号进行解调和解码处理。It should be noted that the modem processor 805 is used for encoding and modulating signals, and demodulating and decoding the signals.
上述终端设备900可作为如图3所示时钟处理方法中的终端设备,执行S207-S217,可实现S207-S217对应时钟处理方法的技术效果;还可作为如图5所示时钟处理方法中的终端设备,执行S409-S408,可实现S409-S408对应时钟处理方法的技术效果,在此,不作赘述。The terminal device 900 can be used as the terminal device in the clock processing method shown in FIG. 3, and S207-S217 can be implemented to implement the technical effects of the S207-S217 corresponding clock processing method; and can also be used as the clock processing method in FIG. The terminal device, executing S409-S408, can implement the technical effects of the S409-S408 corresponding clock processing method, and details are not described herein.
本发明实施例提供一种计算机可读存储介质,用于储存如图3或图5所述的接入网设备所用的计算机软件指令,其包含用于控制接入网设备执行上述方面所设计的程序。An embodiment of the present invention provides a computer readable storage medium for storing computer software instructions used by an access network device as described in FIG. 3 or FIG. 5, which is configured to control an access network device to perform the foregoing aspects. program.
本发明实施例提供一种计算机可读存储介质,用于储存如图3或图5所述的终端设备所用的计算机软件指令,其包含用于控制终端设备执行上述方面所设计的程序。An embodiment of the present invention provides a computer readable storage medium for storing computer software instructions for a terminal device as described in FIG. 3 or FIG. 5, which includes a program designed to control a terminal device to perform the above aspects.
本发明实施例提供一种计算机程序产品,其包含指令,当所述程序被计算机所执行时,该指令使得计算机执行如图3或图5所述方法设计中接入网设备所执行的功能。Embodiments of the present invention provide a computer program product comprising instructions for causing a computer to perform functions performed by an access network device in a method design as described in FIG. 3 or FIG. 5 when the program is executed by a computer.
本发明实施例提供一种计算机程序产品,其包含指令,当所述程序被计算机所执行时,该指令使得计算机执行如图3或图5所述方法设计中终端设备所执行的功能。Embodiments of the present invention provide a computer program product comprising instructions that, when executed by a computer, cause a computer to perform functions performed by a terminal device in a method design as described in FIG. 3 or FIG.
本发明实施例提供一种通信系统,该系统包括上述接入网设备和终端设备。The embodiment of the invention provides a communication system, which includes the above access network device and terminal device.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业 技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any equivalent person can be easily conceived within the technical scope of the present invention by any person skilled in the art. Modifications or substitutions are intended to be included within the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。A person skilled in the art should further appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, in order to clearly illustrate hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments of the present invention have been described in detail with reference to the preferred embodiments of the present invention. All modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (36)

  1. 一种时钟处理方法,其特征在于,包括:A clock processing method, comprising:
    确定向终端设备发送第一信号的第一时间戳;Determining a first timestamp for transmitting the first signal to the terminal device;
    接收所述终端设备发送的与所述第一信号相对应的第二信号,确定接收所述第二信号的第四时间戳;Receiving, by the terminal device, a second signal corresponding to the first signal, and determining a fourth timestamp for receiving the second signal;
    向所述终端设备发送包含有所述第一时间戳和所述第四时间戳的数据包,所述数据包用于使所述终端设备调整所述终端设备的本地时钟。Transmitting, to the terminal device, a data packet including the first timestamp and the fourth timestamp, where the data packet is used to enable the terminal device to adjust a local clock of the terminal device.
  2. 根据权利要求1所述的方法,其特征在于,所述第一时间戳为所述第一信号开始或完成发送流程中设定步骤对应的时刻点;所述第四时间戳为所述第二信号开始或完成接收流程中设定步骤对应的时刻点。The method according to claim 1, wherein the first timestamp is a time point at which the first signal starts or completes a setting step in a sending process; and the fourth timestamp is the second timestamp The signal starts or completes the time point corresponding to the setting step in the receiving process.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    配置待发送的所述第一信号的配置信息和所述第二信号的配置信息;And configuring configuration information of the first signal to be sent and configuration information of the second signal;
    根据所述第一信号的配置信息将所述第一信号发送给所述终端设备;Transmitting the first signal to the terminal device according to the configuration information of the first signal;
    根据所述第二信号的配置信息检测是否有待接收的所述第二信号。And detecting, according to the configuration information of the second signal, whether the second signal is to be received.
  4. 根据权利要求3所述的方法,其特征在于,所述配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。The method according to claim 3, wherein the configuration information comprises at least one of: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  5. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:
    对所述第四时间戳进行修正时间处理。The fourth time stamp is subjected to correction time processing.
  6. 根据权利要求2或5所述的方法,其特征在于,所述方法还包括:The method according to claim 2 or 5, wherein the method further comprises:
    对所述第一时间戳和所述第四时间戳进行补偿时间处理。Performing compensation time processing on the first timestamp and the fourth timestamp.
  7. 根据权利要求5所述的方法,其特征在于,所述修正时间处理包括:修正记录所述第四时间戳与所述第二信号实际到达时刻的时间偏差。The method according to claim 5, wherein said correcting time processing comprises: correcting a time offset of said fourth time stamp and said actual arrival time of said second signal.
  8. 根据权利要求6所述的方法,其特征在于,所述补偿时间处理包括以下至少之一:增加从记录所述第一时间戳到接入网设备将所述第一信号发送的平均时间,以及减少从接入网设备接收所述第二信号到记录所述第四时间戳的平均时间。The method according to claim 6, wherein the compensation time processing comprises at least one of increasing an average time from recording the first timestamp to an access network device transmitting the first signal, and The average time from receipt of the second signal by the access network device to recording of the fourth timestamp is reduced.
  9. 根据权利要求7或8所述的方法,其特征在于,所述向所述终端设备发送包含有所述第一时间戳和所述第四时间戳的数据包,包括:The method according to claim 7 or 8, wherein the transmitting the data packet including the first timestamp and the fourth timestamp to the terminal device comprises:
    将所述第一时间戳和所述第四时间戳生成第一类型的数据包,向所述终端设备发送所述第一类型的数据包;Generating, by the first timestamp and the fourth timestamp, a first type of data packet, and sending the first type of data packet to the terminal device;
    或,or,
    对所述第一时间戳和所述第四时间戳进行加权处理生成第二类型的数据包,向所述终端设备发送所述第二类型的数据包;Performing a weighting process on the first timestamp and the fourth timestamp to generate a second type of data packet, and sending the second type of data packet to the terminal device;
    或,or,
    对所述第一时间戳和所述第四时间戳进行差分处理生成第三类型的数据包,向所述终端设备发送所述第三类型的数据包。And performing differential processing on the first timestamp and the fourth timestamp to generate a third type of data packet, and sending the third type of data packet to the terminal device.
  10. 一种时钟处理方法,其特征在于,包括:A clock processing method, comprising:
    接收接入网设备发送的第一信号,确定接收所述第一信号的第二时间戳;Receiving a first signal sent by the access network device, and determining a second timestamp for receiving the first signal;
    向接入网设备发送所述第一信号相对应的第二信号,确定发送所述第二信号的第三时 间戳;Transmitting, to the access network device, a second signal corresponding to the first signal, and determining a third timestamp for transmitting the second signal;
    接收所述接入网设备发送的包含有第一时间戳和第四时间戳的数据包;Receiving, by the access network device, a data packet that includes a first timestamp and a fourth timestamp;
    根据所述数据包调整本地时钟;Adjusting the local clock according to the data packet;
    其中,所述第一时间戳为所述接入网设备发送所述第一信号的时间戳,所述第四时间戳为所述接入网设备接收所述第二信号的时间戳。The first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the access network device receiving the second signal.
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, wherein the method further comprises:
    接收接入网设备发送的所述第一信号的配置信息和所述第二信号的配置信息;Receiving, by the access network device, configuration information of the first signal and configuration information of the second signal;
    根据所述第一信号的配置信息检测是否有待接收的所述第一信号;Detecting whether the first signal to be received is detected according to the configuration information of the first signal;
    所述向接入网设备发送所述第一信号相对应的第二信号,包括:Transmitting, by the access network device, the second signal corresponding to the first signal, including:
    根据所述第二信号的配置信息向所述接入网设备发送与所述第一信号相对应的所述第二信号。And transmitting, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
  12. 根据权利要求10所述的方法,其特征在于,所述第二时间戳为接收所述第一信号开始或完成接收流程中设定步骤对应的时刻点;所述第三时间戳为发送所述第二信号开始或完成发送流程中设定步骤对应的时刻点。The method according to claim 10, wherein the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is sending the The second signal starts or completes the time point corresponding to the setting step in the transmission flow.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method of claim 12, wherein the method further comprises:
    对所述第二时间戳进行修正时间处理。The second time stamp is subjected to correction time processing.
  14. 根据权利要求12或13所述的方法,其特征在于,所述方法还包括:The method according to claim 12 or 13, wherein the method further comprises:
    对所述第二时间戳和所述第三时间戳进行补偿时间处理。Performing compensation time processing on the second timestamp and the third timestamp.
  15. 根据权利要求13所述的方法,其特征在于,所述修正时间处理包括:修正记录第二时间戳与所述第一信号实际到达时刻的时间偏差。The method according to claim 13, wherein said correcting time processing comprises: correcting a time offset between the recorded second time stamp and the actual arrival time of said first signal.
  16. 根据权利要求14所述的方法,其特征在于,所述补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将所述第二信号发送的平均时间。The method according to claim 14, wherein said compensation time processing comprises at least one of: reducing an average time from receiving a first signal from a terminal device to recording a second time stamp, and increasing a third time stamp from recording The average time to transmit the second signal to the terminal device.
  17. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, wherein the method further comprises:
    解析所述数据包,确定所述数据包的类型和包含的时间戳信息;Parsing the data packet, determining a type of the data packet and time stamp information included;
    其中,所述数据包为以下类型中的一个:由所述第一时间戳和所述第四时间戳生成的第一类型的数据包,将所述第一时间戳和所述第四时间戳进行加权处理生成的第二类型的数据包,将所述第一时间戳和所述第四时间戳进行差分处理生成的第三类型的数据包;所述时间戳信息包括对所述第一时间戳和所述第四时间戳处理后的信息。The data packet is one of the following types: a first type of data packet generated by the first timestamp and the fourth timestamp, the first timestamp and the fourth timestamp And performing a weighting process on the second type of data packet, performing differential processing on the first timestamp and the fourth timestamp to generate a third type of data packet; the timestamp information including the first time Poke and the information processed by the fourth timestamp.
  18. 根据权利要求17所述的方法,其特征在于,所述根据所述数据包调整本地时钟,包括:The method according to claim 17, wherein the adjusting the local clock according to the data packet comprises:
    根据所述数据包的类型确定对应时钟偏差的计算公式;Determining a calculation formula corresponding to the clock deviation according to the type of the data packet;
    基于所述计算公式、所述时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备时钟的时钟偏差;Determining, according to the calculation formula, the timestamp information, the second timestamp, and the third timestamp, a clock offset of the local clock relative to the access network device clock;
    根据所述时钟偏差调整本地时钟。The local clock is adjusted according to the clock deviation.
  19. 一种接入网设备,其特征在于,包括:An access network device, comprising:
    处理单元,用于确定向终端设备发送第一信号的第一时间戳;a processing unit, configured to determine a first timestamp for transmitting the first signal to the terminal device;
    接收单元,用于接收所述终端设备发送的与所述第一信号相对应的第二信号;a receiving unit, configured to receive a second signal that is sent by the terminal device and that corresponds to the first signal;
    所述处理单元,还用于确定接收所述第二信号的第四时间戳;The processing unit is further configured to determine a fourth timestamp for receiving the second signal;
    发送单元,用于向所述终端设备发送包含有所述第一时间戳和所述第四时间戳的数据包,所述数据包用于使所述终端设备调整所述终端设备的本地时钟。And a sending unit, configured to send, to the terminal device, a data packet that includes the first timestamp and the fourth timestamp, where the data packet is used to enable the terminal device to adjust a local clock of the terminal device.
  20. 根据权利要求19所述的接入网设备,其特征在于,所述第一时间戳为所述第一信号开始或完成发送流程中设定步骤对应的时刻点;所述第四时间戳为所述第二信号开始或完成接收流程中设定步骤对应的时刻点。The access network device according to claim 19, wherein the first timestamp is a time point corresponding to the setting step in the sending or ending of the first signal; the fourth timestamp is The second signal starts or completes the time point corresponding to the setting step in the receiving process.
  21. 根据权利要求19所述的接入网设备,其特征在于:The access network device according to claim 19, characterized in that:
    所述处理单元,还用于配置待发送的所述第一信号的配置信息和所述第二信号的配置信息;The processing unit is further configured to configure configuration information of the first signal to be sent and configuration information of the second signal;
    所述发送单元,还用于根据所述第一信号的配置信息将所述第一信号发送给所述终端设备;The sending unit is further configured to send the first signal to the terminal device according to the configuration information of the first signal;
    所述处理单元,还用于根据所述第二信号的配置信息检测是否有待接收的所述第二信号。The processing unit is further configured to detect, according to the configuration information of the second signal, whether the second signal is to be received.
  22. 根据权利要求21所述的接入网设备,其特征在于,所述配置信息包括以下至少之一:信号的周期、信号的类型、发送信号的天线端口类型和信号对应的帧信息。The access network device according to claim 21, wherein the configuration information comprises at least one of: a period of the signal, a type of the signal, an antenna port type of the transmitted signal, and frame information corresponding to the signal.
  23. 根据权利要求20所述的接入网设备,其特征在于:The access network device of claim 20, wherein:
    所述处理单元,还用于对所述第四时间戳进行修正时间处理。The processing unit is further configured to perform a modified time processing on the fourth timestamp.
  24. 根据权利要求20或23所述的接入网设备,其特征在于:The access network device according to claim 20 or 23, characterized in that:
    所述处理单元,还用于对所述第一时间戳和所述第四时间戳进行补偿时间处理。The processing unit is further configured to perform compensation time processing on the first timestamp and the fourth timestamp.
  25. 根据权利要求23所述的接入网设备,其特征在于,所述修正时间处理包括:修正记录所述第四时间戳与所述第二信号实际到达时刻的时间偏差。The access network device according to claim 23, wherein the correction time processing comprises: correcting a time deviation of recording the fourth timestamp and the actual arrival time of the second signal.
  26. 根据权利要求24所述的接入网设备,其特征在于,所述补偿时间处理包括以下至少之一:增加从记录所述第一时间戳到接入网设备将所述第一信号发送的平均时间,以及减少从接入网设备接收所述第二信号到记录所述第四时间戳的平均时间。The access network device according to claim 24, wherein the compensation time processing comprises at least one of: increasing an average of transmitting the first signal from recording the first timestamp to an access network device Time, and reducing an average time from receiving the second signal from the access network device to recording the fourth timestamp.
  27. 根据权利要求25或26所述的接入网设备,其特征在于:The access network device according to claim 25 or 26, characterized in that:
    所述处理单元,还用于将所述第一时间戳和所述第四时间戳生成第一类型的数据包,并控制所述发送单元向所述终端设备发送所述第一类型的数据包;或,对所述第一时间戳和所述第四时间戳进行加权处理生成第二类型的数据包,并控制所述发送单元向所述终端设备发送所述第二类型的数据包;或,对所述第一时间戳和所述第四时间戳进行差分处理生成第三类型的数据包,并控制所述发送单元向所述终端设备发送所述第三类型的数据包。The processing unit is further configured to generate the first type of data packet by using the first timestamp and the fourth timestamp, and control the sending unit to send the first type of data packet to the terminal device Or performing weighting processing on the first timestamp and the fourth timestamp to generate a second type of data packet, and controlling the sending unit to send the second type of data packet to the terminal device; or And performing differential processing on the first timestamp and the fourth timestamp to generate a third type of data packet, and controlling the sending unit to send the third type of data packet to the terminal device.
  28. 一种终端设备,其特征在于,包括:A terminal device, comprising:
    接收单元,用于接收接入网设备发送的第一信号;a receiving unit, configured to receive a first signal sent by the access network device;
    处理单元,用于确定接收所述第一信号的第二时间戳;a processing unit, configured to determine a second timestamp for receiving the first signal;
    发送单元,用于向接入网设备发送所述第一信号相对应的第二信号;a sending unit, configured to send, to the access network device, a second signal corresponding to the first signal;
    所述处理单元,还用于确定发送所述第二信号的第三时间戳;The processing unit is further configured to determine a third timestamp for sending the second signal;
    所述接收单元,还用于接收所述接入网设备发送的包含有第一时间戳和第四时间戳的数据包;The receiving unit is further configured to receive a data packet that is sent by the access network device and includes a first timestamp and a fourth timestamp;
    所述处理单元,还用于根据所述数据包调整本地时钟;The processing unit is further configured to adjust a local clock according to the data packet;
    其中,所述第一时间戳为所述接入网设备发送所述第一信号的时间戳,所述第四时间戳为所述接入网设备接收所述第二信号的时间戳。The first timestamp is a timestamp of the first signal sent by the access network device, and the fourth timestamp is a timestamp of the access network device receiving the second signal.
  29. 根据权利要求28所述的终端设备,其特征在于:The terminal device according to claim 28, characterized in that:
    所述接收单元,还用于接收接入网设备发送的所述第一信号的配置信息和所述第二信号的配置信息;The receiving unit is further configured to receive configuration information of the first signal and configuration information of the second signal that are sent by the access network device;
    所述处理单元,还用于根据所述第一信号的配置信息检测是否有待接收的所述第一信号;The processing unit is further configured to detect, according to the configuration information of the first signal, whether the first signal is to be received;
    所述发送单元,还用于根据所述第二信号的配置信息向所述接入网设备发送与所述第一信号相对应的所述第二信号。The sending unit is further configured to send, according to the configuration information of the second signal, the second signal corresponding to the first signal to the access network device.
  30. 根据权利要求28所述的终端设备,其特征在于,所述第二时间戳为接收所述第一信号开始或完成接收流程中设定步骤对应的时刻点;所述第三时间戳为发送所述第二信号开始或完成发送流程中设定步骤对应的时刻点。The terminal device according to claim 28, wherein the second timestamp is a time point corresponding to the step of receiving the first signal or completing the setting step in the receiving process; the third timestamp is a sending station The second signal starts or completes the time point corresponding to the setting step in the sending process.
  31. 根据权利要求30所述的终端设备,其特征在于:The terminal device according to claim 30, characterized in that:
    所述处理单元,还用于对所述第二时间戳进行修正时间处理。The processing unit is further configured to perform a modified time processing on the second timestamp.
  32. 根据权利要求30或31所述的终端设备,其特征在于:The terminal device according to claim 30 or 31, characterized in that:
    所述处理单元,还用于对所述第二时间戳和所述第三时间戳进行补偿时间处理。The processing unit is further configured to perform compensation time processing on the second timestamp and the third timestamp.
  33. 根据权利要求31所述的终端设备,其特征在于,所述修正时间处理包括:修正记录第二时间戳与所述第一信号实际到达时刻的时间偏差。The terminal device according to claim 31, wherein the correction time processing comprises: correcting a time deviation between the recording of the second time stamp and the actual arrival time of the first signal.
  34. 根据权利要求32所述的终端设备,其特征在于,所述补偿时间处理包括以下至少之一:减少从终端设备接收第一信号到记录第二时间戳的平均时间,以及增加从记录第三时间戳到终端设备将所述第二信号发送的平均时间。The terminal device according to claim 32, wherein said compensation time processing comprises at least one of: reducing an average time from receiving the first signal from the terminal device to recording the second time stamp, and increasing the third time from recording Pokes to the average time that the terminal device will send the second signal.
  35. 根据权利要求28所述的终端设备,其特征在于:The terminal device according to claim 28, characterized in that:
    所述处理单元,还用于解析所述数据包,确定所述数据包的类型和包含的时间戳信息;The processing unit is further configured to parse the data packet, determine a type of the data packet, and include timestamp information;
    其中,所述数据包的类型为以下类型中的一个:由所述第一时间戳和所述第四时间戳生成的第一类型的数据包,将所述第一时间戳和所述第四时间戳进行加权处理生成的第二类型的数据包,将所述第一时间戳和所述第四时间戳进行差分处理生成的第三类型的数据包;所述时间戳信息包括对所述第一时间戳和所述第四时间戳处理后的信息。The type of the data packet is one of the following types: a first type of data packet generated by the first timestamp and the fourth timestamp, and the first timestamp and the fourth time Transmitting, by the timestamp, the second type of data packet generated by the weighting process, and performing the differential processing on the first timestamp and the fourth timestamp to generate a third type of data packet; the timestamp information includes A time stamp and information processed by the fourth time stamp.
  36. 根据权利要求35所述的终端设备,其特征在于,所述处理单元,还用于根据所述数据包的类型确定对应时钟偏差的计算公式;基于所述计算公式、所述时间戳信息、第二时间戳和第三时间戳确定本地时钟相对于接入网设备时钟的时钟偏差;根据所述时钟偏差调整本地时钟。The terminal device according to claim 35, wherein the processing unit is further configured to determine a calculation formula of the corresponding clock deviation according to the type of the data packet; based on the calculation formula, the timestamp information, The second timestamp and the third timestamp determine a clock offset of the local clock relative to the access network device clock; the local clock is adjusted based on the clock offset.
PCT/CN2018/080836 2017-03-29 2018-03-28 Clock processing method, access network device and terminal device WO2018177320A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710197951.6 2017-03-29
CN201710197951.6A CN108667543B (en) 2017-03-29 2017-03-29 Clock processing method, access network equipment and terminal equipment

Publications (1)

Publication Number Publication Date
WO2018177320A1 true WO2018177320A1 (en) 2018-10-04

Family

ID=63674262

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080836 WO2018177320A1 (en) 2017-03-29 2018-03-28 Clock processing method, access network device and terminal device

Country Status (2)

Country Link
CN (1) CN108667543B (en)
WO (1) WO2018177320A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114731205A (en) * 2019-11-21 2022-07-08 华为技术有限公司 Clock synchronization method and device
CN112600639A (en) * 2020-12-17 2021-04-02 珠海市一微半导体有限公司 Timestamp correction method and system
CN116700094B (en) * 2023-06-21 2024-03-01 哈尔滨博尼智能技术有限公司 Data driving control system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7496686B2 (en) * 2005-01-28 2009-02-24 Gencsus Localizing a remote event timestamp from a network device with an independent clock method and apparatus
CN102833062A (en) * 2012-09-25 2012-12-19 广东电网公司珠海供电局 Time synchronization method and system for synchronous messages of IEEE1588 (Precision Time Protocol) master-slave clocks of intelligent transformer substation
CN103929263A (en) * 2014-04-30 2014-07-16 北京华力创通科技股份有限公司 Network communication method, network communication delay determining method and network communication local time synchronizing method
CN104918319A (en) * 2014-03-13 2015-09-16 北方工业大学 Clock synchronization simplified information exchange method applied to wireless sensor network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7577169B1 (en) * 2005-11-30 2009-08-18 The United States Of America As Represented By The Secretary Of The Navy Time stamping
US10772055B2 (en) * 2015-04-08 2020-09-08 Alcatel Lucent Base station synchronization
CN104993900B (en) * 2015-07-06 2018-03-09 江苏省电力公司南京供电公司 A kind of synchronization correction method based on IEEE1588 clock models
CN106488550B (en) * 2016-12-20 2019-11-12 华为技术有限公司 Determine the method and apparatus of terminal Yu base station clock time deviation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7496686B2 (en) * 2005-01-28 2009-02-24 Gencsus Localizing a remote event timestamp from a network device with an independent clock method and apparatus
CN102833062A (en) * 2012-09-25 2012-12-19 广东电网公司珠海供电局 Time synchronization method and system for synchronous messages of IEEE1588 (Precision Time Protocol) master-slave clocks of intelligent transformer substation
CN104918319A (en) * 2014-03-13 2015-09-16 北方工业大学 Clock synchronization simplified information exchange method applied to wireless sensor network
CN103929263A (en) * 2014-04-30 2014-07-16 北京华力创通科技股份有限公司 Network communication method, network communication delay determining method and network communication local time synchronizing method

Also Published As

Publication number Publication date
CN108667543B (en) 2019-12-13
CN108667543A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
EP3550899B1 (en) Method and apparatus for determining clock time deviation between terminal and base station
CN102457371B (en) Time synchronization method and related equipment and system
WO2018137413A1 (en) Time service method, terminal device and network device
WO2020001585A1 (en) Clock synchronisation method and apparatus
CN111165032B (en) Timing advance range adaptation in new radio
WO2020063535A1 (en) Reference time determination method and apparatus
WO2018177320A1 (en) Clock processing method, access network device and terminal device
WO2020001367A1 (en) Time information correction method and device
JP2019523390A (en) Method, user equipment, radio transmitter and network node for managing positioning reference signals
WO2018120173A1 (en) Method for exchanging time synchronisation message, and network device
WO2017076195A1 (en) Clock synchronization method, and synchronization information transmission method and apparatus
WO2019228221A1 (en) Clock synchronization method and apparatus, terminal device, chip, and readable storage medium
CN105325037A (en) Synchronization method, synchronization device and base station
WO2017181384A1 (en) Synchronization information sending or receiving method, base station, and communication node
US20240172160A1 (en) Solutions to timing reference for detection and report of ul rsat asynch nodes or nodes without a time frame structure
WO2016115695A1 (en) Synchronization method, apparatus and system
WO2021017523A1 (en) Method for authenticating access network device and related device
WO2015042955A1 (en) Synchronization method and apparatus
WO2016000324A1 (en) Method and apparatus for implementing time synchronization
TW202226875A (en) Method of propagation delay compensation and related devices
WO2021097769A1 (en) Clock synchronization method and apparatus
WO2014019151A1 (en) Channel boundary locating method, user terminal and base station
WO2020164324A1 (en) Method for generating prs sequence, terminal device, and positioning device
US10554319B2 (en) Wireless communications with time synchronization processing
WO2021033114A1 (en) Timing advance enhancement

Legal Events

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

Ref document number: 18776390

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18776390

Country of ref document: EP

Kind code of ref document: A1