Clock skew processing method and device, computer readable medium and electronic equipment
By receiving and adding timestamps to data packets in a 5G system, calculating the latency information and link type of the transmission link, and estimating the clock deviation, the problem of increased hardware costs is solved, and low-cost clock synchronization is achieved.
Patent Information
- Application Number
- CN202310509056.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
When introducing Time-Sensitive Communication (TSN) into 5G systems, existing technologies require additional hardware to implement clock skew strategies, increasing hardware costs and implementation complexity.
By receiving and adding timestamps to data packets, the system calculates the latency and link type of the transmission link, estimates the clock skew, and achieves clock synchronization without increasing hardware costs.
Without increasing hardware costs, low-cost clock synchronization was achieved, meeting the clock synchronization requirements of industrial automation manufacturing applications.
Smart Images

Figure CN118921728A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer and communication technology, and in particular to a clock deviation processing method, device, computer-readable medium and electronic device. Background Art
[0002] TSN (Time Sensitive Network) is a network technology defined by IEEE (Institute of Electrical and Electronics Engineers) to achieve time synchronization and deterministic communication between nodes. It is mainly used for real-time communication and network control. And TSN's time-sensitive communication (TSC) is also introduced in the 5G (5th Generation) system to enable the 5G system to support industrial automation manufacturing applications with precise time control. However, in related technologies, additional hardware devices need to be introduced to implement clock deviation strategies, which undoubtedly increases the hardware cost and implementation complexity. Summary of the invention
[0003] The embodiments of the present application provide a clock deviation processing method, device, computer-readable medium and electronic device, which can realize the measurement of clock deviation without increasing hardware costs, thereby meeting the demand for low-cost clock synchronization.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] In a first aspect, an embodiment of the present application provides a clock deviation processing method, comprising: receiving a data packet from a first device, wherein the data packet is transmitted by the first device to a third device via a second device, and the data packet includes a first timestamp when the first device sends the data packet, and a second timestamp when the second device receives the data packet; obtaining a local timestamp when the third device receives the data packet; calculating delay information of a specified link portion in a transmission link between the third device and the first device based on the first timestamp, the second timestamp and the local timestamp; calculating the clock deviation corresponding to the specified link portion based on the delay information of the specified link portion and the link type of the specified link portion.
[0006] In the second aspect, an embodiment of the present application provides a clock deviation processing method, including: receiving a data packet sent by a first device, the data packet containing a first timestamp when the first device sends the data packet; adding a second timestamp in the data packet, the second timestamp being the timestamp of the second device that receives the data packet; sending the data packet with the first timestamp and the second timestamp added thereto to a third device; the first timestamp and the second timestamp are used to calculate the delay information of a specified link portion in the transmission link between the third device and the first device, the delay information being used to calculate the clock deviation corresponding to the specified link portion according to the link type of the specified link portion.
[0007] In the third aspect, an embodiment of the present application provides a clock deviation processing device, including: a receiving unit, configured to receive a data packet from a first device, wherein the data packet is transmitted by the first device to a third device via a second device, and the data packet includes a first timestamp when the first device sends the data packet, and a second timestamp when the second device receives the data packet; an acquisition unit, configured to acquire a local timestamp when the third device receives the data packet; a calculation unit, configured to calculate the delay information of a specified link part in the transmission link between the third device and the first device based on the first timestamp, the second timestamp and the local timestamp, and calculate the clock deviation corresponding to the specified link part based on the delay information of the specified link part and the link type of the specified link part.
[0008] In a fourth aspect, an embodiment of the present application provides a clock deviation processing device, comprising: a receiving unit, configured to receive a data packet sent by a first device, the data packet containing a first timestamp when the first device sends the data packet; a processing unit, configured to add a second timestamp in the data packet, the second timestamp being a timestamp of a second device that receives the data packet; a sending unit, configured to send the data packet to which the first timestamp and the second timestamp are added to a third device; the first timestamp and the second timestamp are used to calculate the delay information of a specified link portion in a transmission link between the third device and the first device, and the delay information is used to calculate the clock deviation corresponding to the specified link portion according to the link type of the specified link portion.
[0009] In a fifth aspect, an embodiment of the present application provides a computer-readable medium on which a computer program is stored. When the computer program is executed by a processor, the clock deviation processing method described in the above embodiment is implemented.
[0010] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the clock deviation processing method as described in the above embodiments.
[0011] In a seventh aspect, an embodiment of the present application provides a computer program product, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the clock deviation processing method provided in the above-mentioned various optional embodiments.
[0012] In the technical solutions provided in some embodiments of the present application, the delay information of the specified link part in the transmission link between the third device and the first device is calculated based on the first timestamp when the first device sends the data packet, the second timestamp when the second device receives the data packet, and the local timestamp when the third device receives the data. Then, the clock deviation corresponding to the specified link part is calculated based on the delay information of the specified link part and the link type of the specified link part. This allows the clock deviation to be estimated through the time nodes in the transmission process of the data packet between the first device, the second device and the third device. This allows the measurement of the clock deviation to be achieved without increasing the hardware cost, thereby meeting the demand for low-cost clock synchronization.
[0013] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 Schematic diagram showing the architecture of the 5G system supporting time synchronization in the external time domain
[0015] Figure 2 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;
[0016] Figure 3 A flowchart of a clock deviation processing method according to an embodiment of the present application is shown;
[0017] Figure 4 A flowchart of a clock deviation processing method according to an embodiment of the present application is shown;
[0018] Figure 5 A schematic diagram of an uplink transmission process between a UE, a 5G network element and an AS according to an embodiment of the present application is shown;
[0019] Figure 6A schematic diagram of a downlink transmission process between a UE, a 5G network element and an AS according to an embodiment of the present application is shown;
[0020] Figure 7 A block diagram of a clock deviation processing device according to an embodiment of the present application is shown;
[0021] Figure 8 A block diagram of a clock deviation processing device according to an embodiment of the present application is shown;
[0022] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] The exemplary embodiments are now described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to these examples; on the contrary, the purpose of providing these embodiments is to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0024] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, there are many specific details so that the embodiments of the present application can be fully understood. However, those skilled in the art will appreciate that when implementing the technical scheme of the present application, all the detailed features in the embodiments may not be needed, one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be adopted.
[0025] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0026] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0027] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0028] With the development of technology, TSN time-sensitive communication is introduced in 5G systems to enable 5G systems to support industrial automation manufacturing applications with precise time control. Figure 1 As shown, in a system architecture where the 5G system is integrated with TSN, the 5G system is integrated into the TSN system as a TSN bridge. This "logical" TSN bridge includes a TSN converter for user plane interaction between the TSN system and the 5G system. The 5GS (5G system) TSN converter function includes DS-TT (DeviceSide TSN Translator) and NW-TT (Network TSN Translator). The UE (User Equipment) in the 5G system is connected to one or more ES (End Station, which is a device connected to a local area network or a metropolitan area network, acting as the source and / or destination of traffic carried on the local area network or the metropolitan area network) in the TSN DN (Data Network) outside the 5G system through DS-TT. The UPF (User Plane Function) is connected to one or more ES in the TSN DN (Data Network) through NW-TT.
[0029] In order to implement the TSN synchronization mechanism, the entire end-to-end 5G system can be regarded as an IEEE 802.1AS time aware system. Figure 1 As shown in the figure, there are two time synchronization domains, namely the 5G time domain and the TSN time domain. The 5G system has its own time system (such as GPS (Global Positioning System) time). Figure 1 5G GM (5G Grand Master, 5G internal master clock) is used to represent the clock domain of the 5G system (i.e., the 5G time domain).
[0030] Figure 1 The gNB in the 5G system represents a 5G base station. All devices in the 5G system are synchronized to the 5G clock domain. The devices in the 5G system include: UPF, SMF (Session Management Function), UE (User Equipment), DS-TT, NW-TT, NG RAN (NG Radio Access Network), etc. The NG interface is the interface between the radio access network and the 5G core network.
[0031] like Figure 1 As shown in the figure, the clock source of the external TSN Time Domain is outside the UPF. The ES device on the UE side of TSN is connected to the UE through DS-TT, accessed to the 5G network, and then accessed to the external TSN network through the UPF and the NW-TT on the UPF to synchronize time with the TSN clock source.
[0032] Figure 1 In the 5G network, the time synchronization message is sent by TSN GM through downlink (DL) data, that is, it is sent through the user plane of the UE. The downlink data including the time synchronization message of TSN GM first reaches the NW-TT / UPF, enters the 5G system, then reaches the UE and its DS-TT, and finally reaches the ES on the UE side.
[0033] TSN GM marks its current time in the originTimestamp field of the time synchronization message it sends. When the user plane of UE transmits this time synchronization message, NW-TT marks the reception time of the received downlink data on this time synchronization message, and updates the CorrectionField field value in this data packet to the original CorrectionField field value plus the transmission delay value between NW-TT and the Ethernet Bridge Port (port) that sends this message to NW-TT. Before forwarding the downlink data to ES, DS-TT subtracts the reception time added by NW-TT on the downlink data from its current time to obtain the transmission delay value of this time synchronization message in the entire 5G system, and accumulates this delay value with the previous transmission time from TSN master clock to NW-TT (in the CorrectionField field of the received time synchronization message) to obtain the updated transmission delay value, and marks this updated transmission delay value in the CorrectionField field of the time synchronization message (i.e. the total transmission delay of this message), and deletes the reception time marked by NW-TT before. Then this modified time synchronization message is sent to ES.
[0034] ES adds the delay value on the time synchronization message directly to the transmission delay between DS-TT and ES based on the delay value marked on the time synchronization message by DS-TT (i.e., the CorrectionField field value on the time synchronization message), and the total transmission delay of the time synchronization message from the TSN master clock to the ES can be obtained. This total transmission delay plus the originTimestamp field value on the time synchronization message can obtain a calculated time value, and then its clock is set to this calculated time value, thereby realizing the time synchronization between the ES and the TSN GM on the UE side.
[0035] In the above-mentioned time synchronization process, specific hardware and network equipment, such as TSN converters, need to be added. This requirement for hardware or dedicated equipment limits the flexibility of actual deployment and increases costs. Based on this, the technical solution of the embodiment of the present application proposes a new clock deviation processing method, which can realize the measurement of clock deviation without increasing hardware costs, meeting the demand for low-cost clock synchronization.
[0036] Specifically, in Figure 2 In the system architecture shown, the terminal device 201, the network element device of the mobile communication system, and the application server 202 are connected in communication, and the terminal device 201 transmits data with the application server 202 through the network element device of the mobile communication system. Taking the transmission of data from the terminal device 201 to the application server 202 as an example, the terminal device 201 adds a first timestamp when sending the data packet to the data packet to be sent, and then sends it to the network element device. After receiving the data packet with the first timestamp added, the network element device adds a second timestamp when the data packet is received to the data packet, and then sends it to the application server 202.
[0037] When the application server 202 receives the data packet, it can obtain the local timestamp when the data packet is received, and then can calculate the delay information of the specified link part in the transmission link between the application server 202 and the terminal device 201 based on the first timestamp, the second timestamp and the local timestamp when the application server receives the data packet, and then calculate the clock deviation corresponding to the specified link part based on the delay information of the specified link part and the link type of the specified link part.
[0038] For example, if the designated link portion is a link between the terminal device 201 and the network element device, and the designated link portion is an asymmetric link, the transmission delay of the data packet in the designated link portion can be determined by the difference between the second timestamp and the first timestamp. In order to calculate the clock deviation corresponding to the designated link portion, the delay reference value of the designated link portion can be inferred by measuring the transmission delay of the designated link portion multiple times, and then the clock deviation corresponding to the designated link portion can be obtained by calculating the difference between the transmission delay in each measurement and the delay reference value.
[0039] If the designated link portion is a link between the terminal device 201 and the network element device, and the designated link portion is a symmetric link, the transmission delay of the data packet in the designated link portion can be determined by the difference between the second timestamp and the first timestamp. Then, the delay information of the data packet when it is transmitted from the network element device to the terminal device 201 is calculated, and then the clock deviation corresponding to the designated link portion is calculated through the transmission delay from the terminal device 201 to the network element device and the delay information from the network device to the terminal device 201.
[0040] It should be noted that: the terminal device 201 can be a smart phone, tablet computer, laptop computer, desktop computer, smart TV, smart home, vehicle terminal, aircraft, etc.; the application server 202 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The network element device can be UPF or PSA (PDU Session Anchor).
[0041] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0042] Figure 3 A flowchart of a clock deviation processing method according to an embodiment of the present application is shown. The clock deviation processing method is applied to a system including a first device, a second device and a third device. The clock deviation processing method can be executed by the third device or by other devices with computing and processing functions. Figure 3 As shown, the clock deviation processing method at least includes S310 to S340, which are described in detail as follows:
[0043] In S310, a data packet is received from a first device, where the data packet is transmitted from the first device to a third device via a second device, and the data packet includes a first timestamp when the first device sends the data packet and a second timestamp when the second device receives the data packet.
[0044] In some optional embodiments, the first device may add a local timestamp (i.e., a first timestamp) to a data packet when sending data. When the second device receives the data packet, it may also add a local timestamp (i.e., a second timestamp) at the time of receiving the data packet to the data packet and then send it to a third device.
[0045] In S320, a local timestamp when the third device receives the data packet is obtained.
[0046] Optionally, because the second device adds the second timestamp to the data packet and then sends it to the third device, the local timestamp of the third device can be acquired when the third device receives the data packet.
[0047] In S330, delay information of a designated link portion in a transmission link between the third device and the first device is calculated according to the first timestamp, the second timestamp, and a local timestamp when the third device receives the data packet.
[0048] In some optional embodiments, the designated link portion represents a segment of a transmission link between the third device and the first device, such as a link between the first device and the second device, a link between the second device and the third device, or a link between the first device and the third device.
[0049] In some optional embodiments, the delay information of the specified link portion can be calculated by subtracting the sending time of the data packet from the receiving time of the data packet. For example, the delay information of the transmission link between the first device and the second device can be obtained by subtracting the first timestamp from the second timestamp; the delay information of the transmission link between the second device and the third device can be obtained by subtracting the second timestamp from the local timestamp when the third device receives the data packet; the delay information of the transmission link between the first device and the third device can be obtained by subtracting the first timestamp from the local timestamp when the third device receives the data packet.
[0050] In S340, a clock deviation corresponding to the designated link portion is calculated according to the delay information of the designated link portion and the link type of the designated link portion.
[0051] In some optional embodiments, the link type of the specified link portion may include an asymmetric link and a symmetric link. A symmetric link means that the communication link between the two communicating parties is symmetric, that is, the transmission link for sending data to one party to the other party and the communication link for receiving data sent by the other party are the same communication link, or the communication distance, line length and other parameters are the same, so that the delays in the two data transmission directions (i.e. sending data and receiving data) are basically the same. An asymmetric link means that the paths to and from a certain node are inconsistent, and the delays in the two data transmission directions (i.e. sending data and receiving data) are different, resulting in an asymmetric communication path for sending data to one party and receiving data sent by the other party.
[0052] In some optional embodiments, if the link type of the specified link portion is an asymmetric link, then the process of calculating the clock deviation corresponding to the specified link portion based on the delay information of the specified link portion and the link type of the specified link portion may be: calculating the clock deviation corresponding to the specified link portion based on the delay information statistics of the specified link portion in different data transmission directions.
[0053] Specifically, for example, the delay reference information of the specified link part in the specified data transmission direction (such as the uplink transmission direction or the downlink transmission direction) can be obtained, and the delay reference information is obtained by statistically analyzing the historical delay information of the specified link part in the specified data transmission direction; then, the first difference between the delay information of the specified link part in the specified data transmission direction and the delay reference information in the specified data transmission direction is calculated, and the first difference is used as the clock deviation corresponding to the specified link part in the specified data transmission direction.
[0054] Optionally, the delay reference information in the specified data transmission direction is obtained by inferring through a certain algorithm after obtaining multiple historical delay information of the specified link part in the specified data transmission direction. For example, the average value of multiple historical delay information is calculated and the average value is used as the delay reference information; or the delay reference information can be inferred based on multiple historical delay information by machine learning.
[0055] In some optional embodiments, in the case of an asymmetric link, the first device may be a terminal device, the second device may be a network element device of a mobile communication system, and the third device may be an application server; that is, the terminal device sends a data packet to the application server through the network element device. In this application scenario, the designated data transmission direction of the designated link portion may include at least one of the following: a transmission link from the terminal device to the network element device, a transmission link from the network element device to the application server, and a transmission link from the terminal device to the application server.
[0056] In some optional embodiments, in the case of an asymmetric link, the first device may be an application server, the second device may be a network element device of a mobile communication system, and the third device may be a terminal device; that is, the application server sends a data packet to the terminal device through the network element device. In this application scenario, the designated data transmission direction of the designated link portion may include at least one of the following: a transmission link from the application server to the network element device, a transmission link from the network element device to the terminal device, and a transmission link from the application server to the terminal device.
[0057] In some optional embodiments, if the link type of the designated link portion is an asymmetric link, then the process of calculating the clock deviation corresponding to the designated link portion based on the delay information of the designated link portion and the link type of the designated link portion may be: obtaining the delay information of the designated link portion when transmitting data in the reverse direction; and calculating the clock deviation corresponding to the designated link portion based on the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction.
[0058] Optionally, the process of calculating the clock deviation corresponding to the designated link portion according to the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction may be: calculating the second difference between the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction, and then using half of the second difference as the clock deviation corresponding to the designated link portion. Alternatively, the second difference may be compensated accordingly (such as increasing or decreasing a certain value) to serve as the clock deviation corresponding to the designated link portion.
[0059] In some optional embodiments, in the case of a symmetric link, one of the first device and the third device is a terminal device, and the other is an application server; the second device may be a network element device of a mobile communication system. In this application scenario, the designated link portion includes at least one of the following: a transmission link between the terminal device and the network element device, a transmission link between the network element device and the application server, and a transmission link between the terminal device and the application server.
[0060] In some optional embodiments, after calculating the clock deviation corresponding to the designated link portion, the transmission node corresponding to the designated link portion may be subjected to clock synchronization processing according to the clock deviation. For example, if the clock deviation between the first device and the second device is calculated, the clock synchronization processing may be performed on the first device and the second device according to the clock deviation between the first device and the second device.
[0061] The following combination Figure 4 From the perspective of the second device, the implementation details of the technical solution of the embodiment of the present application are explained again:
[0062] Figure 4 A flowchart of a clock deviation processing method according to an embodiment of the present application is shown. The clock deviation processing method is applied to a system including a first device, a second device and a third device. The clock deviation processing method can be executed by the second device. Figure 4 As shown, the clock deviation processing method at least includes S410 to S430, which are described in detail as follows:
[0063] In S410, a data packet sent by a first device is received, where the data packet includes a first timestamp when the first device sends the data packet.
[0064] In some optional embodiments, when sending data, the first device may add a local timestamp (ie, the first timestamp) to the data packet and then send it to the second device.
[0065] In S420, a second timestamp is added to the data packet, where the second timestamp is a timestamp of the second device receiving the data packet.
[0066] In some optional embodiments, when the second device receives a data packet sent by the first device, it may add a local timestamp (ie, a second timestamp) to the data packet and then send it to the third device.
[0067] In S430, a data packet to which a first timestamp and a second timestamp are added is sent to a third device; the first timestamp and the second timestamp are used to calculate the delay information of a specified link portion in the transmission link between the third device and the first device, and the delay information is used to calculate the clock deviation corresponding to the specified link portion according to the link type of the specified link portion.
[0068] In some optional embodiments, the process of calculating the delay information of a specified link portion in the transmission link between the third device and the first device, and calculating the clock deviation corresponding to the specified link portion based on the delay information and the link type of the specified link portion can refer to the technical solutions of the aforementioned embodiments and will not be repeated here.
[0069] In some optional embodiments, the second device may also obtain the clock deviation corresponding to the specified link portion, and then perform clock synchronization processing with the transmission node corresponding to the specified link portion according to the clock deviation. For example, if the clock deviation between the first device and the second device is calculated, the clock synchronization processing of the first device and the second device may be performed according to the clock deviation between the first device and the second device.
[0070] The following combination Figures 5 to 7 , taking a specific application scenario as an example, the implementation details of the technical solution of the embodiment of the present application are elaborated in detail:
[0071] In a specific application scenario, a node can be selected as the master clock node among UE (User Equipment), 5G network element, and AS (Application Server), and the clocks of other nodes are used as slave clocks to achieve time synchronization. Optionally, the 5G network element can be UPF or PSA.
[0072] In some optional embodiments, the UE and the AS record the time information of the data packet transmission by sending data packets and inserting timestamp information into the data packets at different nodes, and determine the clock error by calculating the timestamp. Considering the asymmetry of the cellular network, the uplink and downlink can be detected and counted separately. For example, the calculation process of the uplink (i.e., the UE sends a data packet to the AS) can be placed in the AS, and the calculation process of the downlink (i.e., the AS sends a data packet to the UE) can be placed in the UE.
[0073] like Figure 5 As shown in FIG. 1 , the uplink transmission process between the UE, the 5G network element and the AS includes:
[0074] S501, UE, 5G network element and AS establish an IP data connection.
[0075] S502, the UE generates a data packet and adds a timestamp T1 when sending the packet.
[0076] S503, a data packet is sent from the UE to the AS.
[0077] S504, the 5G network element detects the data packet sent by the UE to the AS, adds the local timestamp T2 to it, and continues to send it to the AS.
[0078] S505, the data packet is sent from the 5G network element to the AS.
[0079] S506, after receiving the data packet, the AS calculates the delay information T2-T1 and T3-T2 according to the local timestamp T3.
[0080] Among them, T2-T1 represents the latency in the uplink direction within the 5G network; T3-T2 represents the latency in the uplink direction between the 5G network gateway and AS.
[0081] like Figure 6 As shown in FIG. 1 , the downlink transmission process between the UE, the 5G network element and the AS includes:
[0082] S601, UE, 5G network element and AS establish an IP data connection.
[0083] S602, the AS generates a data packet and adds a timestamp T4 when the packet is sent.
[0084] S603: A data packet is sent from the AS to the UE.
[0085] S604, the 5G network element detects the data packet sent by the AS to the UE, adds a local timestamp T5 to it, and continues to send it to the UE.
[0086] S605, the data packet is sent from the 5G network element to the UE.
[0087] S606, after receiving the data packet, the UE calculates delay information T6-T5 and T5-T4 according to the local timestamp T6.
[0088] Among them, T5-T4 represents the delay in the downlink direction between AS and 5G network gateway; T6-T5 represents the delay in the downlink direction within the 5G network.
[0089] S607, after calculating the delay information T6-T5 and T5-T4, the UE returns the delay information T6-T5 and T5-T4 to the AS to facilitate the calculation of the clock deviation.
[0090] In some optional embodiments, based on Figure 5 and Figure 6 The technical solution of the embodiment shown can distinguish between asymmetric links and symmetric links when calculating clock deviation, as follows:
[0091] For an asymmetric link:
[0092] The delay information of the corresponding link can be collected multiple times in the above manner, and then the delay value of the link can be obtained by statistical analysis, etc. After the delay value of the link is obtained, the deviation between the delay information obtained each time and the delay value can be calculated as the clock deviation.
[0093] For example, for the link between the UE and the 5G network element, the delay information (i.e., T2-T1) of the corresponding link is collected multiple times through the above method, and then the delay value △t1 of the link is obtained through statistical analysis and other methods. Then, after the delay information T2-T1 of the link is detected each time, the deviation from the delay value △t1 can be calculated as the clock deviation of the link between the UE and the 5G network element.
[0094] Similarly, for the link between the 5G network element and the AS, the delay information (i.e., T3-T2) of the corresponding link is collected multiple times through the above method, and then the delay value △t2 of the link is obtained through statistical analysis and other methods. After each time the delay information T3-T2 of the link is detected, the deviation from the delay value △t2 can be calculated as the clock deviation of the link between the 5G network element and the AS.
[0095] For the link between UE and AS, the delay information (i.e., T3-T1) of the corresponding link is collected multiple times through the above method, and then the delay value △t3 of the link is obtained through statistical analysis and other methods. Then, after the delay information T3-T1 of the link is detected each time, the deviation from the delay value △t3 can be calculated as the clock deviation of the link between UE and AS.
[0096] For the link between AS and 5G network elements, the delay information (i.e., T5-T4) of the corresponding link is collected multiple times through the above method, and then the delay value △t4 of the link is obtained through statistical analysis and other methods. Then, after the delay information T5-T4 of the link is detected each time, the deviation from the delay value △t4 can be calculated as the clock deviation of the link between AS and 5G network elements.
[0097] For the link between the 5G network element and the UE, the delay information (i.e., T6-T5) of the corresponding link is collected multiple times through the above method, and then the delay value △t5 of the link is obtained through statistical analysis and other methods. Then, after the delay information T6-T5 of the link is detected each time, the deviation from the delay value △t5 can be calculated as the clock deviation of the link between the 5G network element and the UE.
[0098] For the link between AS and UE, the delay information (i.e., T6-T4) of the corresponding link is collected multiple times through the above method, and then the delay value △t6 of the link is obtained through statistical analysis and other methods. Then, after the delay information T6-T4 of the link is detected each time, the deviation from the delay value △t6 can be calculated as the clock deviation of the link between AS and UE.
[0099] For symmetric links:
[0100] Assume that the communication link between end A and end B is a symmetric link. The local timestamp when end A sends data packet 1 is t1, and the local timestamp when end B receives data packet 1 is t2. The local timestamp when end B sends data packet 2 is t3, and the local timestamp when end A receives data packet 2 is t4. Assume that the clock deviation between end A and end B is x, then theoretically, the local timestamp when end B receives data packet 1 is t2'=t2+x, and the local timestamp when end B sends data packet 2 is t3'=t3+x.
[0101] Considering that end A and end B are symmetrical links, t2'-t1=t4-t3', substituting t2'=t2+x and t3'=t3+x into the equation, we can get: t2-t1+x=t4-t3-x, and then we can get x=1 / 2[(t4-t3)-(t2-t1)].
[0102] Combined with this Figure 5 and Figure 6 It can be obtained that the clock error between the UE and the 5G network element is estimated to be 1 / 2[(T6-T5)-(T2-T1)]; the clock error between the UE and the AS is estimated to be 1 / 2[(T6-T4)-(T3-T1)]; the clock error between the 5G network element and the AS is estimated to be 1 / 2[(T5-T4)-(T3-T2)].
[0103] The technical solution of the above embodiment of the present application does not need to rely on dedicated hardware equipment for clock synchronization measurement, but is estimated based on the time point information of the data packet during the transmission process between "terminal-network-application server". This solution can achieve synchronization between UE-network-server without relying on TSN dedicated hardware and network equipment, meeting the demand for low-cost clock synchronization (such as the need for millimeter-level lightweight and low-cost synchronization solutions in scenarios such as smart transportation).
[0104] The following describes an apparatus embodiment of the present application, which can be used to execute the clock deviation processing method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the clock deviation processing method of the present application.
[0105] Figure 7 A block diagram of a clock deviation processing device according to an embodiment of the present application is shown. The clock deviation processing device is applied to a system including a first device, a second device and a third device. The clock deviation processing device can be set in the third device and can also be applied to other devices with computing and processing functions.
[0106] Reference Figure 7 As shown, a clock deviation processing device 800 according to an embodiment of the present application includes: a receiving unit 802 , an acquiring unit 804 and a calculating unit 806 .
[0107] Among them, the receiving unit 802 is configured to receive a data packet from a first device, which is transmitted by the first device to a third device via a second device, and the data packet includes a first timestamp when the first device sends the data packet, and a second timestamp when the second device receives the data packet; the acquiring unit 804 is configured to acquire a local timestamp when the third device receives the data packet; the calculating unit 806 is configured to calculate the delay information of a specified link portion in the transmission link between the third device and the first device based on the first timestamp, the second timestamp and the local timestamp, and calculate the clock deviation corresponding to the specified link portion based on the delay information of the specified link portion and the link type of the specified link portion.
[0108] In some embodiments of the present application, based on the foregoing solution, the link type includes an asymmetric link; the calculation unit 806 calculates the clock deviation corresponding to the specified link part according to the delay information of the specified link part and the link type of the specified link part, including:
[0109] If the link type of the designated link portion is the asymmetric link, the clock deviation corresponding to the designated link portion is calculated according to the delay information statistics of the designated link portion in different data transmission directions.
[0110] In some embodiments of the present application, based on the foregoing solution, the process in which the calculation unit 806 calculates the clock deviation corresponding to the specified link part according to the delay information statistics of the specified link part in different data transmission directions includes: obtaining delay reference information of the specified link part in the specified data transmission direction, where the delay reference information is obtained by statistically analyzing historical delay information of the specified link part in the specified data transmission direction;
[0111] A first difference between the delay information of the designated link portion in the designated data transmission direction and the delay reference information in the designated data transmission direction is calculated, and the first difference is used as the clock deviation corresponding to the designated link portion in the designated data transmission direction.
[0112] In some embodiments of the present application, based on the aforementioned scheme, the first device includes a terminal device, the second device includes a network element device of a mobile communication system, and the third device includes an application server; the specified data transmission direction of the specified link part includes at least one of the following: a transmission link from the terminal device to the network element device, a transmission link from the network element device to the application server, and a transmission link from the terminal device to the application server.
[0113] In some embodiments of the present application, based on the aforementioned scheme, the first device includes an application server, the second device includes a network element device of a mobile communication system, and the third device includes a terminal device; the specified data transmission direction of the specified link part includes at least one of the following: a transmission link from the application server to the network element device, a transmission link from the network element device to the terminal device, and a transmission link from the application server to the terminal device.
[0114] In some embodiments of the present application, based on the aforementioned scheme, the link type includes a symmetric link; the calculation unit 806 calculates the clock deviation corresponding to the specified link part according to the delay information of the specified link part and the link type of the specified link part, including: if the link type of the specified link part is the symmetric link, then obtaining the delay information of the specified link part when transmitting data in reverse; calculating the clock deviation corresponding to the specified link part according to the delay information of the specified link part and the delay information of the specified link part when transmitting data in reverse.
[0115] In some embodiments of the present application, based on the foregoing solution, the calculation unit 806 calculates the clock deviation corresponding to the designated link portion according to the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction, including:
[0116] Calculating a second difference between the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction;
[0117] Half of the second difference is used as the clock deviation corresponding to the designated link portion.
[0118] In some embodiments of the present application, based on the aforementioned scheme, one of the first device and the third device is a terminal device, and the other is an application server; the second device includes a network element device of a mobile communication system; the designated link part includes at least one of the following: a transmission link between the terminal device and the network element device, a transmission link between the network element device and the application server, and a transmission link between the terminal device and the application server.
[0119] In some embodiments of the present application, based on the aforementioned scheme, the clock deviation processing device 800 also includes: a processing unit, configured to, after calculating the clock deviation corresponding to the specified link part, perform clock synchronization processing on the transmission node corresponding to the specified link part according to the clock deviation.
[0120] Figure 8 A block diagram of a clock deviation processing apparatus according to an embodiment of the present application is shown. The clock deviation processing apparatus is applied to a system including a first device, a second device, and a third device. The clock deviation processing apparatus can be arranged in the second device.
[0121] Reference Figure 8 As shown, a clock deviation processing device 900 according to an embodiment of the present application includes: a receiving unit 902 , a processing unit 904 and a sending unit 906 .
[0122] Among them, the receiving unit 902 is configured to receive a data packet sent by a first device, and the data packet contains a first timestamp when the first device sends the data packet; the processing unit 904 is configured to add a second timestamp in the data packet, and the second timestamp is the timestamp of the second device that receives the data packet; the sending unit 906 is configured to send the data packet with the first timestamp and the second timestamp added to a third device; wherein the first timestamp and the second timestamp are used to calculate the delay information of a specified link part in the transmission link between the third device and the first device, and the delay information is used to calculate the clock deviation corresponding to the specified link part according to the link type of the specified link part.
[0123] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 904 is further configured to: obtain the clock deviation corresponding to the specified link portion; and perform clock synchronization processing with the transmission node corresponding to the specified link portion according to the clock deviation.
[0124] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0125] It should be noted that Fig. 9 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0126] like Fig. 9 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003, such as executing the method described in the above embodiment. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002 and the RAM 1003 are connected to each other through the bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.
[0127] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0128] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.
[0129] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0130] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0131] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0132] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more computer programs, and when the above one or more computer programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0133] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0134] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0135] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0136] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A clock deviation processing method, characterized in that: include: receiving a data packet from a first device, wherein the data packet is transmitted by the first device to a third device via a second device, and the data packet includes a first timestamp when the first device sends the data packet and a second timestamp when the second device receives the data packet; Obtaining a local timestamp when the third device receives the data packet; Calculate, according to the first timestamp, the second timestamp and the local timestamp, delay information of a specified link portion in a transmission link between the third device and the first device; According to the delay information of the designated link portion and the link type of the designated link portion, a clock deviation corresponding to the designated link portion is calculated.
2. The clock deviation processing method according to claim 1, characterized in that: The link type includes an asymmetric link; Calculating a clock deviation corresponding to the designated link portion according to the delay information of the designated link portion and the link type of the designated link portion includes: If the link type of the designated link portion is the asymmetric link, the clock deviation corresponding to the designated link portion is calculated according to the delay information statistics of the designated link portion in different data transmission directions.
3. The clock deviation processing method according to claim 2, characterized in that: Calculating a clock deviation corresponding to the designated link portion according to the delay information statistics of the designated link portion in different data transmission directions, including: Acquire delay reference information of the specified link portion in a specified data transmission direction, where the delay reference information is obtained by statistically analyzing historical delay information of the specified link portion in the specified data transmission direction; A first difference between the delay information of the designated link portion in the designated data transmission direction and the delay reference information in the designated data transmission direction is calculated, and the first difference is used as the clock deviation corresponding to the designated link portion in the designated data transmission direction.
4. The clock deviation processing method according to claim 3, characterized in that: The first device includes a terminal device, the second device includes a network element device of a mobile communication system, and the third device includes an application server; The designated data transmission direction of the designated link part includes at least one of the following: a transmission link from the terminal device to the network element device, a transmission link from the network element device to the application server, and a transmission link from the terminal device to the application server.
5. The clock deviation processing method according to claim 3, characterized in that: The first device includes an application server, the second device includes a network element device of a mobile communication system, and the third device includes a terminal device; The designated data transmission direction of the designated link part includes at least one of the following: a transmission link from the application server to the network element device, a transmission link from the network element device to the terminal device, and a transmission link from the application server to the terminal device.
6. The clock deviation processing method according to claim 1, characterized in that: The link type includes a symmetric link; Calculating a clock deviation corresponding to the designated link portion according to the delay information of the designated link portion and the link type of the designated link portion includes: If the link type of the designated link portion is the symmetric link, obtaining delay information of the designated link portion when transmitting data in the reverse direction; The clock deviation corresponding to the designated link portion is calculated according to the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction.
7. The clock deviation processing method according to claim 6, characterized in that: Calculating a clock deviation corresponding to the designated link portion according to the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction includes: Calculating a second difference between the delay information of the designated link portion and the delay information of the designated link portion when transmitting data in the reverse direction; Half of the second difference is used as the clock deviation corresponding to the designated link portion.
8. The clock deviation processing method according to claim 6, characterized in that: One of the first device and the third device is a terminal device, and the other is an application server; the second device includes a network element device of a mobile communication system; The designated link portion includes at least one of the following: a transmission link between the terminal device and the network element device, a transmission link between the network element device and the application server, and a transmission link between the terminal device and the application server.
9. The clock deviation processing method according to any one of claims 1 to 8, characterized in that: The method further comprises: After calculating the clock deviation corresponding to the designated link portion, clock synchronization processing is performed on the transmission node corresponding to the designated link portion according to the clock deviation.
10. A clock deviation processing method, characterized in that: include: Receive a data packet sent by a first device, wherein the data packet includes a first timestamp when the first device sends the data packet; Adding a second timestamp in the data packet, where the second timestamp is a timestamp of a second device that receives the data packet; A data packet to which the first timestamp and the second timestamp are added is sent to a third device; the first timestamp and the second timestamp are used to calculate the delay information of a specified link portion in a transmission link between the third device and the first device, and the delay information is used to calculate the clock deviation corresponding to the specified link portion according to the link type of the specified link portion.
11. The clock deviation processing method according to claim 10, characterized in that: The method further comprises: Obtaining a clock deviation corresponding to the specified link portion; Perform clock synchronization processing on the transmission node corresponding to the designated link portion according to the clock deviation.
12. A clock deviation processing device, characterized in that: include: a receiving unit, configured to receive a data packet from a first device, wherein the data packet is transmitted from the first device to a third device via a second device, and the data packet includes a first timestamp when the first device sends the data packet and a second timestamp when the second device receives the data packet; an acquiring unit, configured to acquire a local timestamp when the third device receives the data packet; A calculation unit is configured to calculate the delay information of a specified link portion in the transmission link between the third device and the first device based on the first timestamp, the second timestamp and the local timestamp, and to calculate the clock deviation corresponding to the specified link portion based on the delay information of the specified link portion and the link type of the specified link portion.
13. A clock deviation processing device, characterized in that: include: A receiving unit, configured to receive a data packet sent by a first device, wherein the data packet includes a first timestamp when the first device sends the data packet; A processing unit configured to add a second timestamp to the data packet, wherein the second timestamp is a timestamp of a second device that receives the data packet; A sending unit is configured to send a data packet to which the first timestamp and the second timestamp are added to a third device; the first timestamp and the second timestamp are used to calculate delay information of a specified link portion in a transmission link between the third device and the first device, and the delay information is used to calculate a clock deviation corresponding to the specified link portion according to a link type of the specified link portion.
14. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the clock deviation processing method according to any one of claims 1 to 11 is implemented.
15. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the clock deviation processing method as described in any one of claims 1 to 11.
