Clock synchronization method and electronic equipment

By receiving clock difference notification messages and obtaining the current clock domain clock, clock synchronization in the TSN clock domain is directly solved, and the DS-TT implementation complexity is simplified, and the clock synchronization process is reduced and the system complexity is reduced.

CN119729744APending Publication Date: 2025-03-28SHENZHEN AI LINK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411853465.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

在时间敏感型网络和5G网络融合的架构中,设备侧TSN转换器(DS-TT)需要进行复杂的矫正字段计算和多次交互,以实现时钟同步,导致实现复杂性增加。

Method used

By receiving the clock difference notification message sent by the network side TSN converter built-in UPF network element, the current clock of the communication clock domain is obtained, and the TSN master clock device and slave clock device in the TSN clock domain are clocked according to the target clock difference, simplifying the DS-TT calculation process.

Benefits of technology

This method does not require DS-TT to calculate the correction field, simplifies the implementation process, avoids cumbersome interactions with TSN network cards, and reduces system complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729744A_ABST
    Figure CN119729744A_ABST
Patent Text Reader

Abstract

Provided are a clock synchronization method and an electronic device, the method comprising: a device-side TSN converter receiving a clock difference notification message sent by a network-side TSN converter built in a UPF network element, the clock difference notification message comprising a target clock difference, the target clock difference being a clock difference of the UPF network element in a TSN clock domain and a communication clock domain, and the target clock difference being a clock difference of the UPF network element in a communication clock domain; and acquiring a current clock of the communication clock domain, and performing clock synchronization on the TSN master clock device and the TSN slave clock device in the TSN clock domain according to the difference between the current clock and the target clock. According to the scheme, the equipment side TSN converter does not need to calculate the correction field, the implementation process is simplified, and the tedious interaction process between the equipment side TSN converter and the TSN network card is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a clock synchronization method and electronic equipment. Background Art

[0002] In the network architecture that integrates time-sensitive networking (TSN) and 5G networks, there are two independent time synchronization systems: 5G system time synchronization and TSN domain time synchronization. For TSN domain time synchronization, the TSN end device needs to be synchronized with the TSN Grand Master (GM).

[0003] In the related technology, for TSN domain time synchronization, the precision time protocol ((g)PTP) message is transmitted by the TSN GM to the network-side TSN translator (NW-TT), and NW-TT adds an entry timestamp (TSi) to it. After the UPF passes the (g)PTP message to the 5G base station (next generation node B, gNB), it passes it to the user equipment (User Equipment, UE) through the air interface. After receiving the (g)PTP message, the user equipment forwards it to the device-side TSN translator (DS-TT), and DS-TT creates an exit timestamp (TSe) for it, where the difference between TSe and TSi is the residence time of the (g)PTP message in the 5G system. Subsequently, DS-TT converts the residence time of the (g)PTP message in the 5G system into TSN domain time, adds the calculated residence time in the correction field, and sends the (g)PTP message carrying the correction field to the TNS end device to reduce the impact of the 5G system delay on the TSN end device.

[0004] However, in the above scheme, the DS-TT module needs to calculate the correction field in the gPTP message according to different timestamps (TSe and TSi), which requires the DS-TT module to interact with the built-in TSN network card multiple times, and also to perform tedious correction field compensation during the calculation process, making the implementation of DS-TT more complicated. Summary of the invention

[0005] In view of this, an embodiment of the present application provides a clock synchronization method and an electronic device to solve the problem that the implementation of DS-TT is relatively complex.

[0006] In a first aspect, an embodiment of the present application provides a clock synchronization method, which is applied to a device-side TSN converter, and the method includes:

[0007] Receive a clock difference notification message sent by a network-side TSN converter built into a UPF network element, wherein the clock difference notification message includes: a target clock difference, where the target clock difference is the clock difference between the UPF network element in the TSN clock domain and the communication clock domain;

[0008] Obtaining the current clock of the communication clock domain;

[0009] According to the current clock of the communication clock domain and the target clock difference, clock synchronization is performed on the TSN master clock device and the slave clock device in the TSN clock domain.

[0010] In an optional implementation, the device-side TSN converter is integrated in the slave clock device, and the clock synchronization of the TSN master clock device and the slave clock device in the TSN clock domain according to the current clock of the communication clock domain and the target clock difference includes:

[0011] According to the current clock of the communication clock domain and the sum of the target clock difference, the local clock of the slave clock device in the TSN clock domain is updated to perform clock synchronization on the TSN master clock device and the slave clock device.

[0012] In an optional implementation, the device-side TSN converter is integrated in a communication terminal connected to the slave clock device, and the clock synchronization of the TSN master clock device and the slave clock device in the TSN clock domain according to the current clock of the communication clock domain and the target clock difference includes:

[0013] Generate a first clock synchronization message according to the target clock difference and the current clock of the communication clock domain, wherein the first clock synchronization message includes: the target clock difference and the current clock of the communication clock domain;

[0014] The first clock synchronization message is sent to the slave clock device, and the second clock synchronization message sent by the slave clock device is received, so that the slave clock device updates the local clock of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference, so as to synchronize the clocks of the TSN master clock device and the slave clock device.

[0015] In an optional implementation, the local clock of the slave clock device in the TSN clock domain is updated in the following manner:

[0016] Determine the clock deviation of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference;

[0017] The local clock of the slave clock device in the TSN clock domain is updated according to the clock deviation and the reception timestamp of the first clock synchronization message.

[0018] In an optional implementation, the acquiring the current clock of the communication clock domain includes:

[0019] A communication clock synchronization message of the communication clock domain sent by a base station is received, wherein the communication clock synchronization message includes: a current clock of the communication clock domain.

[0020] In a second aspect, an embodiment of the present application provides a clock synchronization method, which is applied to a UPF network element, and the method includes:

[0021] Obtaining a sending and receiving timestamp of a first sending and receiving clock synchronization message between the UPF network element and the TSN master clock device, and a sending and receiving timestamp of a second sending and receiving clock synchronization message between the UPF network element and the base station;

[0022] Determine a first local clock of the UPF network element in the TSN clock domain according to a sending and receiving timestamp of the first sending and receiving clock synchronization message;

[0023] Determine a second local clock of the UPF network element in the communication clock domain according to the receiving and sending timestamp of the second receiving and sending clock synchronization message;

[0024] Determine a target clock difference between the UPF network element in the TSN clock domain and the communication clock domain according to the first local clock and the second local clock;

[0025] A built-in network-side TSN converter is used to send a clock difference notification message to a device-side TSN converter, wherein the clock difference notification message includes: the target clock difference, so that the device-side TSN converter performs clock synchronization on the TSN master clock device and the slave clock device according to the current clock of the communication clock domain and the target clock difference.

[0026] In an optional implementation, determining the first local clock of the UPF network element in the TSN clock domain according to the transceiver timestamp of the first transceiver clock synchronization message includes:

[0027] Determine a first clock deviation of the UPF network element in the TSN clock domain according to a sending and receiving timestamp of the first sending and receiving clock synchronization message;

[0028] The first local clock is determined according to the first clock deviation.

[0029] In an optional implementation, determining the second local clock of the UPF network element in the communication clock domain according to the transceiver timestamp of the second transceiver clock synchronization message includes:

[0030] Determining a second clock deviation of the UPF network element in the communication clock domain according to a sending and receiving timestamp of the second sending and receiving clock synchronization message;

[0031] The second local clock is determined according to the second clock deviation.

[0032] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to execute any one of the methods described in the first aspect.

[0033] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the first aspects is executed.

[0034] The present application provides a clock synchronization method and electronic device, wherein the method includes: the device-side TSN converter receives the clock difference notification message sent by the network-side TSN converter built into the UPF network element, and the clock difference notification message includes: the target clock difference, the target clock difference is the clock difference between the UPF network element in the TSN clock domain and the communication clock domain, obtains the current clock in the communication clock domain, and performs clock synchronization on the TSN master clock device and the slave clock device in the TSN clock domain according to the current clock and the target clock difference. This solution does not require the device-side TSN converter to calculate the correction field, simplifies the implementation process, and avoids the cumbersome interaction process between the TSN network card. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A schematic diagram of the network architecture for the integration of TSN and 5G networks;

[0037] Figure 2is a schematic diagram of a clock synchronization system;

[0038] Figure 3 A system architecture diagram of a clock synchronization method provided in an embodiment of the present application;

[0039] Figure 4 Schematic diagram of the clock synchronization method provided in the embodiment of the present application Figure 1 ;

[0040] Figure 5 Schematic diagram of the clock synchronization method provided in the embodiment of the present application Figure 2 ;

[0041] Figure 6 Schematic diagram of the clock synchronization method provided in the embodiment of the present application Figure 3 ;

[0042] Figure 7 A schematic diagram of the structure of the clock synchronization device provided in the embodiment of the present application Figure 1 ;

[0043] Figure 8 A schematic diagram of the structure of the clock synchronization device provided in the embodiment of the present application Figure 2 ;

[0044] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0046] First, let’s explain the professional terms involved:

[0047] The SIB9 (System Information Block Type 9) message is a key system information block used for time synchronization and calibration in the 5G system. It ensures that the UE can maintain accurate time synchronization with the network. Its main functions and contents include:

[0048] Information related to GPS time and Coordinated Universal Time (UTC): The SIB9 message contains parameters related to GPS time (Global Positioning System time) and Coordinated Universal Time (UTC), such as daylight saving time (DaylightSaving Time), leap second offset (Leap Seconds) between GPS time and UTC, deviation between UTC and local time (Local Time Offset), and Coordinated Universal Time (TimeInfoUTC) corresponding to the subframe number (SFN) boundary.

[0049] Time information acquisition: The UE can use the parameters provided in SIB9 to obtain UTC, GPS and local time. This time information can be used for a variety of purposes, including assisting GPS initialization and synchronizing the UE clock.

[0050] Transmission method of system information: SIB9 messages are mapped to the Broadcast Control Channel (BCCH) and can be broadcast periodically or on demand on the Downlink Shared Channel (DL-SCH), that is, according to the request of the UE in the Radio Resource Control Idle state (RRC_IDLE) or the Radio Resource Control Inactive state (RRC_INACTIVE), or sent to the UE in RRC_CONNECTED in a dedicated manner on the Downlink Shared Channel (DL-SCH).

[0051] Cell or area specific configuration: SIB9 can be configured as cell specific or area specific by indication of SIB1. Cell specific SIB is applicable only to the cell where the SIB is provided, while area specific system information block SIB is applicable to an area called SI area, which consists of one or more cells and is identified by systemInformationAreaID.

[0052] Message content: The SIB9 message mainly includes field information such as Universal Time (UTC) and time offset, which are crucial for the UE because they can be used to calibrate the UE clock and perform other time-related functions.

[0053] The communication system involved in the present application may be, for example, a fifth generation (5G) communication system or a future new radio access technology (NR), and the 5G communication system may be an industrial 5G private network system.

[0054] Taking the 5G system as an example, Figure 1 This is a schematic diagram of the network architecture that integrates TSN and 5G networks. Figure 1 As shown, the network architecture may include:

[0055] 1. User equipment (UE): It can also be called terminal, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user device. UE can also be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network or a terminal device in a public land mobile network (PLMN) to be evolved in the future, etc. It can also be an end device, a logical entity, an intelligent device, such as a mobile phone, an intelligent terminal and other terminal devices, or a server, a gateway, a base station, a controller and other communication devices, or an Internet of Things device, such as a sensor, an electric meter, a water meter and other Internet of Things (IoT) devices. The embodiments of the present application are not limited to this.

[0056] 2. Access network (Radio access network, AN): Provides network access functions for authorized users in a specific area, and can use transmission tunnels of different qualities according to the user level, business requirements, etc. The access network can be an access network that uses different access technologies. There are currently two types of wireless access technologies: 3rd Generation Partnership Project (3GPP) access technology (such as the wireless access technology used in 3G, 4G or 5G systems) and non-3GPP access technology. 3GPP access technology refers to access technology that complies with 3GPP standards and specifications. The access network that uses 3GPP access technology is called a radio access network (Radio Access Network, RAN), where the access network equipment in the 5G system is called the next generation Node Base station (next generation Node Base station, gNB). Non-3GPP access technology refers to access technology that does not comply with 3GPP standards and specifications, for example, air interface technology represented by access points (APs) in wifi.

[0057] The access network that implements access network functions based on wireless communication technology can be called a radio access network (RAN), where NG-RAN represents 5G access network. The radio access network can manage wireless resources, provide access services to terminals, and then complete the forwarding of control signals and user data between terminals and the core network.

[0058] The access network equipment may include equipment in the access network that communicates with the wireless terminal over the air interface through one or more sectors. The access network system may be used to convert received air frames to and from Internet Protocol (IP) packets, acting as a router between the wireless terminal and the rest of the access network, which may include an IP network. The wireless access network system may also coordinate the management of attributes of the air interface. It should be understood that the access network equipment includes but is not limited to: evolved NodeB (eNB), Radio Network Controller (RNC), Node B (NB), Base Station Controller (BSC), Base Transceiver Station (BTS), home base station (for example, Home evolved NodeB, or HomeNodeB, HNB), baseband unit (BBU), access point (AP) in wireless fidelity (WIFI) system, wireless relay node, wireless backhaul node, transmission point (TRP or transmission point, TP), etc., and can also be a gNB in ​​5G, such as NR, system, or a transmission point (TRP or TP), one or a group of (including multiple antenna panels) antenna panels of a base station in a 5G system, or, it can also be a network node constituting a gNB or a transmission point, such as a baseband unit (BBU), or a distributed unit (DU), etc.

[0059] In some deployments, the gNB may include a centralized unit (CU) and a DU. The gNB may also include a radio unit (RU). The CU implements some functions of the gNB, and the DU implements some functions of the gNB, for example, the CU implements the functions of the radio resource control (RRC) and packet data convergence protocol (PDCP) layers, and the DU implements the functions of the radio link control (RLC), media access control (MAC) and physical (PHY) layers. Since the information of the RRC layer will eventually become the information of the PHY layer, or be converted from the information of the PHY layer, therefore, under this architecture, high-level signaling, such as RRC layer signaling, can also be considered to be sent by the DU, or by the DU+CU. It can be understood that the access network device can be a CU node, a DU node, or a device including a CU node and a DU node. In addition, the CU may be classified as an access network device in a radio access network (RAN), or the CU may be classified as an access network device in a core network (CN), and no limitation is made here.

[0060] 3. User Plane Function (UPF) network element, whose main functions include: packet routing and forwarding, quality of service (QoS) flow mapping, session point for interconnection between external PDU and data network, packet routing and forwarding, for example, supporting uplink classifier to route service flow to data network instance, supporting branch point to support multi-host PDU session, packet inspection, for example, application flow detection based on service data flow template and optional PFD received from SMF, user plane partial policy rule implementation, for example, gating, redirection, traffic steering, lawful interception (UP collection), traffic usage reporting, QoS processing in user plane, for example, upload (UL) / download (DL) rate implementation, reflective QoS marking in DL), uplink traffic verification (for example, service data flow (SDF) to QoS flow mapping), transport level packet marking in uplink and downlink, downlink packet buffering and downlink data notification triggering, sending and forwarding one or more "end markers" to the source NG-RAN node.

[0061] 4. Device-side TSN translator (DS-TT): mainly responsible for protocol conversion, time synchronization, and traffic management. It ensures that time-sensitive applications such as industrial automation and intelligent transportation can smoothly access the TSN network and obtain the required real-time performance.

[0062] 4. Network-side TSN translator (NW-TT): Connect and convert traditional Ethernet devices to TSN networks to ensure that traditional devices can adapt to the high determinism and low latency requirements of TSN networks. TSN converters achieve compatibility between traditional Ethernet devices and TSN networks through technologies such as protocol conversion, time synchronization, and traffic management, thereby meeting the time-sensitive application requirements of industrial automation, intelligent transportation, etc.

[0063] 5. TSN Bridge: An Ethernet-based technology designed to provide low-latency, high-reliability network communications. TSN Bridge is part of TSN technology and is mainly used to implement functions such as time synchronization and traffic scheduling to meet the needs of time-sensitive applications.

[0064] 6. Unified Data Manager (UDM) network element, whose main functions are: generating 3GPP authentication certificates / authentication parameters, storing and managing permanent user IDs of the 5G system, such as Subscription Permanent Identifier (SUPI), subscription information management, downlink short message service (Mobile originate-Short Messaging Service, MT-SMS) delivery, SMS management, and user service network element registration management, such as AMF and SMF that currently provide services to the terminal.

[0065] 7. Network Exposure Function (NEF) network element. Its main functions include: 3GPP network elements present their capabilities to other network elements through NEF; NEF stores relevant information in UDR and can also obtain relevant information from UDR. NEF can only access UDR of the same PLMN; NEF provides corresponding security guarantees to ensure the security of external applications to 3GPP network, conversion of relevant information within and outside 3GPP, such as conversion of AF-Service-Identifier and data network name (DNN) and S-NSSAI within 5G core network. In particular, network and user sensitive information must be hidden from external network elements; NEF can obtain relevant information of other network elements by accessing UDR. NEF can only access UDR of the same PLMN.

[0066] 8. Access and Mobility Management Function (AMF) network element is the termination point of the RAN signaling interface (N2) and the termination point of the MM message interface (N1) of the non-access stratum (NAS) signaling. Its main functions include: encryption and integrity protection of NAS messages, and it is responsible for registration, access, mobility management, authentication, SMS and other functions.

[0067] 9. The Session Management Function (SMF) network element is the termination point of the SM message of the NAS message. Its main functions include: establishment, modification, and release of sessions, allocation management of UE Internet Protocol Address (IP), Dynamic Host Configuration Protocol (DHCP) function, Address Resolution Protocol (ARP) proxy or Internet Protocol Version 6 (IPv6) neighbor request agent in Ethernet Protocol Data Unit (PDU) scenarios, selection and control of the User Port Function (UPF) for a session, collection of billing data and support for billing interfaces, determination of the Session and Service Continuity Mode (SSC) of a session, and downlink data indication.

[0068] 10. Policy Control Function (PCF) network element supports a unified policy framework and manages network behavior, provides policy rules to network entities, and accesses subscription information of the Universal Data Repository (UDR). PCF can only access the UDR of the same Public Land Mobile Network (PLMN) and can also be used for packet routing and forwarding, or quality of service (QoS) processing of user plane data.

[0069] 11. Centralized User Configuration (CUC): responsible for translating user network requirements and coordinating network information and device configuration between domains.

[0070] 12. Centralized Network Configuration (CNC): technologies for equipment monitoring and management, network topology discovery, traffic monitoring and optimization, business modeling, and scheduling model delivery.

[0071] 13. TSN Master Clock (Time-Sensitive Network Grand Master, TSN GM): It is one of the core devices in TSN and is responsible for providing high-precision clock synchronization services.

[0072] 14. 5G Grand Master (5G GM): It is one of the core devices in the 5G system and is responsible for providing high-precision clock synchronization services.

[0073] 15. Terminal device: slave clock device.

[0074] See also Figure 1 In the network architecture of the convergence of Time-Sensitive Networking (TSN) and 5G network, the 5G system is integrated into the TSN with a fully centralized model as a logical bridge. The bridge is specifically composed of the UPF supporting the TSN converter function on the network side, the user plane tunnel between the UE and the UPF, and the TSN converter on the device side. The 5G system interacts with TSN through DS-TT and NW-TT.

[0075] In addition, the 5G system implements interaction and collaborative management with TSN CUC through the core network's TSNAF, where TSNAF stores the binding relationships between DS-TT, NW-TT, and PDU sessions.

[0076] It should be understood that the above naming is only used to distinguish different functions, and does not mean that these network elements are independent physical devices. This application does not limit the specific form of the above network elements. For example, they can be integrated in the same physical device, or they can be different physical devices. In addition, the above naming is only for the convenience of distinguishing different functions, and should not constitute any limitation on this application. This application does not exclude the possibility of using other names in 5G networks and other future networks. For example, in a 6G network, some or all of the above network elements may use the terminology in 5G, or other names may be used. A unified explanation is given here, and no further details are given below.

[0077] In the above-mentioned network architecture of TSN and 5G network integration, there are two independent time synchronization systems: 5G system time synchronization and TSN domain time synchronization. In the 5G system, DS-TT, UE, 5G base station (gNB), UPF and NW-TT need to be synchronized with the 5G master clock (5GGM), among which the TSN converters (NW-TT and DS-TT) at the edge of the 5G system need to support IEEE 802.1AS related functions.

[0078] For TSN domain synchronization, the TSN terminal (end device) needs to be synchronized with the TSNGM. Figure 2 is a schematic diagram of a clock synchronization system, such as Figure 2 As shown in the figure, the precision time protocol (g)PTP) message used for clock synchronization is passed from the TSN GM to the NW-TT, and the NW-TT adds an entry timestamp (TSi) to it; after the UPF passes the (g)PTP message to the gNB, it passes it to the UE through the air interface. After receiving the (g)PTP message, the UE forwards it to the DS-TT, and the DS-TT creates an exit timestamp (TSe) for it, where the difference between TSe and TSi is the residence time of the (g)PTP message in the 5G system.

[0079] Subsequently, DS-TT converts the residence time of the (g)PTP message in the 5G system into TSN domain time by adding the calculated residence time in the correction field (writing the residence time into the correction field), and carries the correction field in the (g)PTP message and sends it to the end device, so that the end device synchronizes the clock with the TSN GM based on the residence time. In addition, since DS-TT needs time to parse the (g)PTP message and calculate the residence time, it is also necessary to compensate the correction field (write the parsing time, calculation time and residence time into the correction field), so that the end device synchronizes the clock with the TSN GM based on the parsing time, calculation time and residence time to reduce the impact of the 5G system delay on the end device.

[0080] It can be seen that in the existing solution, the DS-TT module needs to calculate the correction field in the gPTP message based on TSe and TSi, which requires the DS-TT module to interact with the built-in TSN network card multiple times, and also to perform tedious correction field compensation during the calculation process, making the implementation of DS-TT more complicated.

[0081] Based on this, the present application provides a clock synchronization method that simplifies the DS-TT calculation process. It does not require the device-side TSN converter to calculate the correction field, simplifies the implementation process, and avoids the cumbersome interaction process between the TSN network card.

[0082] Figure 3 The system architecture diagram of the clock synchronization method provided in the embodiment of the present application is as follows: Figure 3 As shown, the system architecture may include:

[0083] 1. The Network Slice Selection Function (NSSF) network element is used to manage network slice related information.

[0084] 2. Network Repository Function (NRF) network element: responsible for the registration, discovery and selection of network functions.

[0085] 3. Policy Control Function (PCF) network element supports a unified policy framework and manages network behavior, provides policy rules to network entities, and accesses subscription information of the Universal Data Repository (UDR). PCF can only access the UDR of the same Public Land Mobile Network (PLMN) and can also be used for packet routing and forwarding, or quality of service (QoS) processing of user plane data.

[0086] 4. Unified Data Manager (UDM) network element, whose main functions are: generating 3GPP authentication certificates / authentication parameters, storing and managing permanent user IDs of the 5G system, such as Subscription Permanent Identifier (SUPI), subscription information management, downlink short message service (Mobile originate-Short Messaging Service, MT-SMS) delivery, SMS management, and user service network element registration management, such as AMF and SMF that currently provide services to the terminal.

[0087] 5. Application function (AF) network element, which is used to perform data routing affected by the application, access network open function network elements, or interact with the policy framework for policy control.

[0088] 6. Authentication Server Function (AUSF) network element, supporting authentication of 3GPP access and authentication of untrusted non3GPP access.

[0089] 7. NEF, AMF, SMF, NG-RAN, DS-TT, UE, UPF, NW-TT: For specific function descriptions, please refer to the above content.

[0090] It should be noted that the N1 interface is the reference point between the UE and the AMF network element; the N2 interface is the reference point between the NG-RAN and the AMF network element, which is used for sending NAS messages, etc.; the N3 interface is the reference point between the NG-RAN and the UPF network element, which is used for transmitting user plane data, etc.; the N4 interface is the reference point between the SMF network element and the UPF network element, which is used to transmit information such as the tunnel identification information of the N3 connection, data cache indication information, and downlink data notification messages. The Uu interface is the reference point between the NG-RAN and the UE, which is used to realize data transmission and control signal exchange.

[0091] The Nnef interface is the service access interface provided by the AMF network element to the outside; the Nnrf interface is the service access interface provided by the NRF network element to the outside; the Npef interface is the service access interface provided by the PCF network element to the outside; the Nudm interface is the service access interface provided by the UDM network element to the outside; the Naf interface is the service access interface provided by the AF network element to the outside; the Nausf interface is the service access interface provided by the AUSF network element to the outside; the Namf interface is the service access interface provided by the AMF network element to the outside; the Nsmf interface is the service access interface provided by the SMF network element to the outside; and the Nnssf interface is the service access interface provided by the NSSF network element to the outside.

[0092] See also Figure 3 The slave clock devices include two categories: slave clock devices without integrated 5G communication capabilities and slave clock devices with integrated 5G communication capabilities. For the slave clock devices without integrated 5G communication capabilities, the DS-TT is integrated in the communication terminal connected to the slave clock device, and the communication terminal (5G terminal) includes the DS-TT and the UE. For the slave clock devices with integrated 5G communication capabilities, the slave clock devices are integrated with the DS-TT and the UE.

[0093] Figure 4Schematic diagram of the clock synchronization method provided in the embodiment of the present application Figure 1 , the execution entity of this embodiment may be a device-side TSN converter (DS-TT).

[0094] like Figure 1 As shown, the method may include:

[0095] S101. Receive a clock difference notification message sent by the network-side TSN converter built into the UPF network element.

[0096] See also Figure 3 The network-side TSN converter can send a clock difference notification message to the device-side TSN converter through NG-RAN and UE in turn. The clock difference notification message includes: the target clock difference, which is the clock difference between the UPF network element in the TSN clock domain and the communication clock domain.

[0097] S102: Acquire the current clock of the communication clock domain.

[0098] Among them, the communication clock domain is the clock area of ​​the communication system (such as the 5G system), and the current clock of the communication clock domain is the current master clock (GPS clock) provided by the communication master clock device (such as the 5G master clock device) in the communication clock domain. The communication master clock device provides the master clock to the communication clock domain. Therefore, the current clock of the communication clock domain can be obtained from the communication master clock device.

[0099] In an optional implementation, obtaining the current clock of the communication clock domain includes:

[0100] A communication clock synchronization message of the communication clock domain sent by the receiving base station is received, wherein the communication clock synchronization message includes: a current clock of the communication clock domain.

[0101] Among them, the base station establishes the master clock (GPS clock) of the communication clock domain by receiving the GPS signal (communication master clock signal) sent by the communication master clock device, that is, the base station is used to provide the master clock for the communication clock domain. Therefore, the base station can send a communication clock synchronization message to the device-side TSN converter through the UE, and the communication clock synchronization message includes: the current clock of the communication clock domain.

[0102] As an example, the communication clock synchronization message may be a SIB9 (System Information Block Type 9) message, in which the current clock of the communication clock domain is the difference between the universal time and the time offset. In other words, the SIB9 message sent by the base station establishes a clock synchronization relationship with the communication master clock device.

[0103] S103: Perform clock synchronization on the TSN master clock device and the slave clock device in the TSN clock domain according to the difference between the current clock and the target clock in the communication clock domain.

[0104] The device-side TSN converter determines the local clock of the slave clock device in the TSN clock domain based on the difference between the current clock and the target clock in the communication clock domain, so as to synchronize the clocks of the TSN master clock device and the slave clock device in the TSN clock domain, so that the local clock of the slave clock device in the TSN clock domain is consistent with the current clock of the TSN master clock device.

[0105] In this embodiment, the device-side TSN converter receives the clock difference notification message sent by the network-side TSN converter built into the UPF network element, obtains the current clock of the communication clock domain, and performs clock synchronization on the TSN master clock device and the slave clock device in the TSN clock domain according to the difference between the current clock and the target clock. This solution does not require the device-side TSN converter to calculate the correction field, which simplifies the implementation process and avoids the cumbersome interaction process between the TSN network card.

[0106] Figure 5 Schematic diagram of the clock synchronization method provided in the embodiment of the present application Figure 2 ,like Figure 5 As shown, in an optional implementation, the device-side TSN converter is integrated in the slave clock device, and the above step S103, according to the current clock and the target clock difference of the communication clock domain, performs clock synchronization on the TSN master clock device and the slave clock device in the TSN clock domain, including:

[0107] S201. Update the local clock of the slave clock device in the TSN clock domain according to the current clock in the communication clock domain and the sum of the target clock differences, so as to perform clock synchronization on the master clock device and the slave clock device.

[0108] Among them, the device-side TSN converter is integrated in the slave clock device, that is, the slave clock device integrates communication capabilities (such as 5G communication capabilities), and the slave clock device integrates: the device-side TSN converter and the UE.

[0109] The device-side TSN converter calculates the sum of the current clock of the current communication clock domain and the target clock difference, and updates the local clock of the slave clock device in the TSN clock domain based on the current clock of the current communication clock domain and the target clock difference, so as to synchronize the clocks of the TSN master clock device and the slave clock device in the TSN clock domain, wherein the local clock of the slave clock device in the TSN clock domain is the current clock of the master clock device.

[0110] Among them, ta is the current clock of the communication clock domain, Δ is the target clock difference, and the updated local clock of the slave clock device in the TSN clock domain is expressed as: ta+Δ.

[0111] With regard to the existing solutions for slave clock devices with integrated communication capabilities, it is necessary to construct an additional clock recovery function outside the TSN converter on the device side to achieve clock synchronization with the TSN master clock device, which leads to the problem of further increased complexity of device implementation. This embodiment provides a solution for supporting the clock synchronization of slave clock devices with integrated communication capabilities with the TSN master clock device in the TSN time domain, simplifies the implementation process of the TSN converter on the device side, and reduces the complexity of device implementation.

[0112] In an optional implementation, the device-side TSN converter is integrated in a communication terminal connected to the slave clock device. The above step S103 performs clock synchronization on the TSN master clock device and the slave clock device in the TSN clock domain according to the difference between the current clock and the target clock in the communication clock domain, including:

[0113] S202: Generate a first clock synchronization message according to the target clock difference and the current clock of the communication clock domain.

[0114] Among them, the device-side TSN converter is integrated with a communication terminal (such as a 5G terminal) connected to a slave clock device, that is, the slave clock device does not integrate communication capabilities, the slave clock device and the communication terminal are connected, and the communication terminal integrates: the device-side TSN converter and the UE.

[0115] The first clock synchronization message includes: the target clock difference and the current clock of the communication clock domain. The device-side TSN converter writes the target clock difference into the correction field (correctionField) and generates a first clock synchronization message so that the first clock synchronization message carries the correction field and the current clock of the communication clock domain.

[0116] S203. Send a first clock synchronization message to the slave clock device, and receive a second clock synchronization message sent by the slave clock device, so that the slave clock device updates the local clock of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference, so as to synchronize the clocks of the TSN master clock device and the slave clock device.

[0117] Among them, the receiving timestamp of the first clock synchronization message is the timestamp of the first clock synchronization message sent by the TSN converter on the device side received from the clock device, denoted as tb, and the sending and receiving timestamp of the second clock synchronization message includes: the sending timestamp and receiving timestamp of the second clock synchronization message, denoted as tc and td, which respectively represent the timestamp of the second clock synchronization message sent from the clock device to the TSN converter on the device side and the timestamp of the second clock synchronization message sent from the clock device received by the TSN converter on the device side.

[0118] In some embodiments, the first clock synchronization message may be a gPTP Sync message, and the second clock synchronization message may be a Delay_Req message, wherein gPTP is a generalized precision time protocol (Generalized Precision Time Protocol), Sync represents a synchronization message, and Pdelay_Req represents a precision delay request message.

[0119] In the specific implementation process, the device-side TSN converter sends a gPTP Sync message to the slave clock device and records the sending time t7 of the first clock synchronization message. After receiving the gPTP Sync message, the slave clock device records the receiving time tb of the gPTP Sync message. The slave clock device sends a Delay_Req message to the device-side TSN converter and records the sending time tc of the Delay_Req message. After receiving the Delay_Req message, the device-side TSN converter records the receiving time td of the Delay_Req message. The device-side TSN converter replies to the slave clock device with a Delay_Resp message carrying td, where Delay_Resp represents a delayed response message. In this way, the device-side TSN converter can obtain the receiving timestamp td of the Delay_Req message.

[0120] The slave clock device updates the local clock of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference, so as to synchronize the clocks of the TSN master clock device and the slave clock device, so that the local clock of the slave clock device in the TSN clock domain is consistent with the current clock of the TSN master clock device.

[0121] In an optional implementation, the local clock of the slave clock device in the TSN clock domain is updated in the following manner:

[0122] Determine the clock deviation of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference;

[0123] The local clock of the slave clock device in the TSN clock domain is updated according to the clock deviation and the receiving timestamp of the first clock synchronization message.

[0124] The slave clock device can use the following formula to determine the clock offset (Offset) of the slave clock device in the TSN clock domain:

[0125] Offset=[(tb-ta)-(td-tc)] / 2+Δ

[0126] Among them, tb represents the receiving timestamp of the first clock synchronization message, ta represents the current clock in the communication time domain, td represents the receiving timestamp of the second clock synchronization message, tc represents the sending timestamp of the second clock synchronization message, and Δ represents the target clock difference.

[0127] Next, the slave clock device may update the local clock of the slave clock device in the TSN clock domain according to the clock deviation and the reception timestamp of the first clock synchronization message. The updated local clock of the slave clock device in the TSN clock domain is expressed as: tb+Offset.

[0128] It is worth noting that the device-side TSN converter exchanges clock synchronization messages with the slave clock device through the TSN network card.

[0129] This embodiment provides a solution for a slave clock device that does not support integrated communication capabilities to synchronize clocks with a TSN master clock device in the TSN time domain. No DS-TT is required for correction field calculation, which simplifies the implementation process and avoids the cumbersome interaction process between the slave clock device and the TSN network card.

[0130] Figure 6 Schematic diagram of the clock synchronization method provided in the embodiment of the present application Figure 3 The executing entity of this embodiment may be a UPF network element.

[0131] like Figure 6 As shown, the method may include:

[0132] S301. Obtain the receiving and sending timestamps of the first receiving and sending clock synchronization message between the UPF network element and the TSN master clock device, and the receiving and sending timestamps of the second receiving and sending clock synchronization message between the UPF network element and the base station.

[0133] Among them, the TSN master clock device is used to provide a master clock for the TSN clock domain. The TSN clock domain is the clock area of ​​the time-sensitive network. The first transceiver clock synchronization message includes: the UPF network element receives the first receive clock synchronization message sent by the TSN master clock device and the first transmit clock synchronization message sent to the TSN master clock device.

[0134] The receiving and sending timestamps of the first receiving and sending clock synchronization message include: a receiving timestamp and a sending timestamp of the first receiving clock synchronization message, and a receiving timestamp and a sending timestamp of the first sending clock synchronization message.

[0135] In some embodiments, the first received clock synchronization message may include: gPTP Sync message, Pdelay_Resp message, Pdelay_Resp_Follow_Up message, wherein gPTP is a generalized precision time protocol (Generalized Precision Time Protocol), Sync represents a synchronization message, Follow_Up represents a follow message, Pdelay_Resp represents a precision delay response message, and Pdelay_Resp_Follow_Up represents a follow message of a precision delay response message.

[0136] In some embodiments, the first transmitted clock synchronization message may include: a Pdelay_Req message, wherein Pdelay_Req represents a precise delay request message.

[0137] In the specific implementation process, the TSN master clock device sends a gPTP Sync message to the UPF network element and records the sending timestamp t1, and the gPTP Sync message carries the timestamp t1. After the UPF network element receives the gPTP Sync message, it records the receiving timestamp t2. Then, the TSN master clock device sends a Follow_Up message carrying t1 to the UPF network element. The UPF network element sends a Pdelay_Req message to the TSN master clock device and records the sending timestamp t3. After the TSN master clock device receives the message, it records the receiving timestamp t4 of the Pdelay_Req message. The TSN master clock device sends a Pdelay_Resp message carrying t4 to the UPF network element and records the sending timestamp t4. After the UPF network element receives the Pdelay_Resp message, it records the receiving timestamp t6. Then, the TSN master clock device sends a Pdelay_Resp_Follow_Up message carrying t5 to the UPF network element.

[0138] Among them, the base station establishes the master clock (GPS clock) of the communication clock domain by receiving the GPS signal (communication master clock signal) sent by the communication master clock device. That is, the base station is used to provide the master clock for the communication clock domain, and the communication clock domain is the clock area of ​​the communication system (such as the 5G system).

[0139] The second receiving and transmitting clock synchronization message includes: the UPF network element receives the second receiving clock synchronization message sent by the base station and sends the second transmitting clock synchronization message to the base station.

[0140] The receiving and sending timestamps of the second receiving and sending clock synchronization message include: a receiving timestamp and a sending timestamp of the second receiving clock synchronization message, and a receiving timestamp and a sending timestamp of the second sending clock synchronization message.

[0141] In some embodiments, the second received clock synchronization message may include: gPTP Sync message, Pdelay_Resp message, Pdelay_Resp_Follow_Up message, wherein gPTP is a generalized precision time protocol (Generalized Precision Time Protocol), Sync represents a synchronization message, Follow_Up represents a follow message, Pdelay_Resp represents a precision delay response message, and Pdelay_Resp_Follow_Up represents a follow message of a precision delay response message.

[0142] In some embodiments, the second transmitted clock synchronization message may include: a Pdelay_Req message, wherein Pdelay_Req represents a precise delay request message.

[0143] During the specific implementation process, the base station sends a gPTP Sync message to the UPF network element and records the sending timestamp t1, and the gPTP Sync message carries the timestamp t1. After the UPF network element receives the gPTP Sync message, it records the receiving timestamp t2. Then, the base station sends a Follow_Up message carrying t1 to the UPF network element. The UPF network element sends a Pdelay_Req message to the base station and records the sending timestamp t3. After the base station receives the message, it records the receiving timestamp t4 of the Pdelay_Req message. The base station sends a Pdelay_Resp message carrying t4 to the UPF network element and records the sending timestamp t4. After receiving the Pdelay_Resp message, the UPF network element records the receiving timestamp t6. Then, the base station sends a Pdelay_Resp_Follow_Up message carrying t5 to the UPF network element.

[0144] Through the above method, the UPF network element can obtain the sending and receiving timestamp of the first sending and receiving clock synchronization message and the sending and receiving timestamp of the second sending and receiving clock synchronization message.

[0145] In an optional embodiment, the method may further include:

[0146] According to the receiving and sending timestamps of the first receiving and sending clock synchronization message, the total round-trip delay between the UPF network element and the TSN master clock device is determined.

[0147] The UPF network element can calculate the total round-trip delay between the UPF network element and the TSN master clock device based on the sending and receiving timestamp of the first sending and receiving clock synchronization message and the sending and receiving timestamp of the second sending and receiving clock synchronization message using the following formula, which is expressed as:

[0148] [(t4-t3)+(t6-t5)]

[0149] S302. Determine the first local clock of the UPF network element in the TSN clock domain according to the receiving and sending timestamp of the first receiving and sending clock synchronization message.

[0150] Among them, the first local clock is the local clock of the UPF network element in the TSN clock domain. The UPF network element determines the first local clock of the UPF network element in the TSN clock domain based on the sending and receiving timestamp of the first sending and receiving clock synchronization message, so as to establish a clock synchronization relationship with the TSN master clock device in the TSN clock domain, that is, the first local clock of the UPF network element is consistent with the current clock of the TSN master clock device.

[0151] In an optional implementation, determining a first local clock of the UPF network element in the TSN clock domain according to a transceiver timestamp of the first transceiver clock synchronization message includes:

[0152] Determine a first clock deviation of the UPF network element in the TSN clock domain according to a sending and receiving timestamp of the first sending and receiving clock synchronization message;

[0153] A first local clock is determined according to the first clock deviation.

[0154] Among them, the first clock deviation is the clock deviation of the UPF network element in the TSN clock domain. The UPF network element determines the first clock deviation of the UPF network element in the TSN clock domain based on the sending and receiving timestamp of the first sending and receiving clock synchronization message, and corrects the current clock of the UPF network element in the TSN clock domain according to the first clock deviation to obtain the first local clock of the UPF network element in the TSN clock domain, so that the UPF network element establishes a clock synchronization relationship with the TSN master clock device in the TSN clock domain, wherein the first local clock is also the current clock of the TSN master clock device.

[0155] In some embodiments, the first clock offset (Offset) is expressed as:

[0156] Offset=(t2-t1)-[(t4-t3)+(t6-t5)] / 2

[0157] The first local clock (T tsn ) is expressed as:

[0158] T tsn =t2+Offset

[0159] It is worth noting that the parameters involved in the calculation formula of the first clock deviation and the first local clock are both the sending and receiving timestamps of the first sending and receiving clock synchronization messages.

[0160] S303. Determine the second local clock of the UPF network element in the communication clock domain according to the receiving and sending timestamp of the second receiving and sending clock synchronization message.

[0161] Among them, the second local clock is the local clock of the UPF network element in the communication clock domain. The UPF network element determines the second local clock of the UPF network element in the communication clock domain based on the sending and receiving timestamp of the second sending and receiving clock synchronization message, so as to establish a clock synchronization relationship with the communication master clock device in the communication clock domain, that is, the second local clock of the UPF network element is consistent with the current clock of the communication master clock device.

[0162] In an optional implementation, determining a second local clock of the UPF network element in the communication clock domain according to a transceiver timestamp of a second transceiver clock synchronization message includes:

[0163] Determine a second clock deviation of the UPF network element in the communication clock domain according to a sending and receiving timestamp of the second sending and receiving clock synchronization message;

[0164] A second local clock is determined according to the second clock deviation.

[0165] Among them, the second clock deviation is the clock deviation of the UPF network element in the communication clock domain. The UPF network element determines the second clock deviation of the UPF network element in the communication clock domain according to the receiving and sending timestamp of the second receiving and sending clock synchronization message, and corrects the current clock of the UPF network element in the communication clock domain according to the second clock deviation to obtain the second local clock of the UPF network element in the communication clock domain, so that the UPF network element establishes a clock synchronization relationship with the communication master clock device in the communication clock domain, wherein the second local clock is also the current clock of the communication master clock device.

[0166] In some embodiments, the second clock offset (Offset) is expressed as:

[0167] Offset=(t2-t1)-[(t4-t3)+(t6-t5)] / 2

[0168] The second local clock (T 5GS ) is expressed as:

[0169] T 5GS =t2+Offset

[0170] It is worth noting that the parameters involved in the calculation formula of the second clock deviation and the second local clock are both the sending and receiving timestamps of the second sending and receiving clock synchronization messages.

[0171] S304. Determine the target clock difference between the UPF network element in the TSN clock domain and the communication clock domain according to the first local clock and the second local clock.

[0172] The UPF network element calculates the clock difference between the second local clock and the first local clock, and determines the clock difference as the target clock difference of the UPF network element in the TSN clock domain and the communication clock domain.

[0173] In some embodiments, the UPF network element may use a built-in network-side TSN converter (NW-TT) to calculate the target clock difference, and the target clock difference (Δ) may be expressed as:

[0174] Δ=T 5GS -T tsn

[0175] S305. Use the built-in network-side TSN converter to send a clock difference notification message to the device-side TSN converter, so that the device-side TSN converter synchronizes the clocks of the TSN master clock device and the slave clock device according to the current clock and target clock difference of the communication clock domain.

[0176] The UPF network element uses the built-in network-side TSN converter to send a clock difference notification message to the device-side TSN converter (DS-TT). The clock difference notification message includes: the target clock difference. After receiving the clock difference notification message, the device-side TSN converter extracts the target clock difference from the clock difference notification message and obtains the current clock of the communication clock domain. According to the current clock of the communication clock domain and the target clock difference, the TSN master clock device and the slave clock device are synchronized.

[0177] In this embodiment, when performing clock synchronization on a TSN master clock device and a slave clock device, there is no need for a device-side TSN converter to calculate a correction field, which simplifies the implementation process and avoids the cumbersome interaction process with the TSN network card.

[0178] Based on the above embodiment, a specific clock synchronization process is described below by taking a slave clock device accessed by a 5G terminal as an example:

[0179] 1) The TSN master clock device sends a gPTP Sync message to the UPF through the N6 interface and records the sending time t1, and the Sync message carries the timestamp t1.

[0180] 2) After receiving the gPTP Sync message, UPF records the receiving time t2.

[0181] 3) After the TSN master clock device sends the Sync message, it immediately sends a Follow_Up message carrying t1.

[0182] 4) UPF sends a Pdelay_Req message to the TSN master clock and records the sending time t3; after the master clock device receives the message, it records the receiving time t4.

[0183] 5) After receiving the Pdelay_Req message, the TSN master clock device replies with a Pdelay_Resp message carrying t4 and records the sending time t5.

[0184] 6) After receiving the message, UPF records the receiving time t6.

[0185] 7) After the TSN master clock device replies to the Pdelay_Resp message, it immediately sends a Pdelay_Resp_Follow_Up message carrying t5.

[0186] 8) Based on the six timestamps t1 to t6 obtained, UPF calculates the total round-trip delay between the TSN master clock device and UPF as [(t4-t3)+(t6-t5)], and obtains the clock deviation of UPF in the TSN clock domain as: Offset=(t2-t1)-[(t4-t3)+(t6-t5)] / 2.

[0187] 9) UPF corrects its local clock in the TSN clock domain to T according to the calculated clock deviation in the TSN clock domain. tsn =t2+Offset.

[0188] 10) UPF uses a method similar to steps 1 to 9 to obtain the local clock T in the 5G clock domain by exchanging gPTP data messages with the base station. 5GS。

[0189] 11) The NW-TT module in UPF calculates the difference between the 5G clock domain clock and the TSN clock domain clock Δ = T 5GS -T tsn。

[0190] 12) The NW-TT module in the UPF sends a clock difference notification message to the DS-TT module in the 5G terminal, informing the DS-TT module of the clock difference Δ.

[0191] 13) After receiving the clock difference notification message, the DS-TT module in the 5G terminal extracts the clock difference Δ therein.

[0192] 14) The DS-TT module in the 5G terminal generates a gPTP Sync message and writes the clock difference Δ into the correctionField.

[0193] 15) The DS-TT module in the 5G terminal sends a Sync message to the slave clock device and records the sending time t7, and the Sync message carries a timestamp ta. Among them, ta is the current clock value of the 5G clock domain, which is obtained by the UE through the SIB9 message from the base station.

[0194] 16) After receiving the Sync message from the clock device, record the receiving time tb.

[0195] 17) Send a Delay_Req message from the clock device to the 5G terminal and record the sending time tc.

[0196] 18) After receiving the Delay_Req message, the DS-TT module in the 5G terminal records the receiving time td.

[0197] 19) The DS-TT module in the 5G terminal replies with a Delay_Resp message, which carries a timestamp td.

[0198] 20) After receiving the Delay_Resp message from the clock device, the four timestamps ta~td and the clock difference Δ are obtained, and the clock deviation of the TSN clock domain is calculated as: Offset = [(tb-ta)-(td-tc)] / 2+Δ.

[0199] 21) The slave clock device corrects the local clock to tb+Offset based on the calculated clock deviation.

[0200] Based on the above embodiment, a specific clock synchronization process of a slave clock device integrating 5G communication capability is described below:

[0201] 1) The TSN master clock device sends a gPTP Sync message to the UPF through the N6 interface and records the sending time t1, and the Sync message carries the timestamp t1.

[0202] 2) After receiving the gPTP Sync message, UPF records the receiving time t2.

[0203] 3) After the TSN master clock device sends the Sync message, it immediately sends a Follow_Up message carrying t1.

[0204] 4) UPF sends a Pdelay_Req message to the TSN master clock and records the sending time t3; after the master clock device receives the message, it records the receiving time t4.

[0205] 5) After receiving the Pdelay_Req message, the TSN master clock device replies with a Pdelay_Resp message carrying t4 and records the sending time t5.

[0206] 6) After receiving the message, UPF records the receiving time t6.

[0207] 7) After the TSN master clock device replies to the Pdelay_Resp message, it immediately sends a Pdelay_Resp_Follow_Up message carrying t5.

[0208] 8) Based on the six timestamps t1 to t6 obtained, UPF calculates the total round-trip delay between the TSN master clock device and UPF as [(t4-t3)+(t6-t5)], and obtains the clock deviation of UPF in the TSN clock domain as: Offset=(t2-t1)-[(t4-t3)+(t6-t5)] / 2.

[0209] 9) UPF corrects its local clock in the TSN clock domain to T according to the calculated clock deviation in the TSN clock domain. tsn =t2+Offset.

[0210] 10) UPF uses a method similar to steps 1 to 9 to obtain the local clock T in the 5G clock domain by exchanging gPTP data messages with the base station. 5GS。

[0211] 11) The NW-TT module in UPF calculates the difference between the 5G clock domain clock and the TSN clock domain clock Δ = T 5GS -T tsn。

[0212] 12) The NW-TT module in the UPF sends a clock difference notification message to the DS-TT module in the 5G terminal, informing the DS-TT module of the clock difference Δ.

[0213] 13) After receiving the clock difference notification message, the DS-TT module in the 5G terminal extracts the clock difference Δ therein.

[0214] 14) After receiving the clock difference notification message from the DS-TT module in the clock device, the clock difference Δ is extracted.

[0215] 15) The DS-TT module corrects the clock value of the local TSN clock domain to ta+Δ, where ta is the current clock value of the 5G clock domain, which is obtained by the UE through the SIB9 message from the base station.

[0216] 16) The DS-TT module sets the local system clock to ta+Δ.

[0217] Figure 7 A schematic diagram of the structure of the clock synchronization device provided in the embodiment of the present application Figure 1 , which can be integrated in the device-side TSN converter.

[0218] like Figure 7 As shown, the device comprises:

[0219] The receiving module 401 is used to receive a clock difference notification message sent by a network-side TSN converter built into a UPF network element, where the clock difference notification message includes: a target clock difference, where the target clock difference is the clock difference between the UPF network element in the TSN clock domain and the communication clock domain;

[0220] An acquisition module 402 is used to acquire the current clock of the communication clock domain;

[0221] The synchronization module 403 is used to perform clock synchronization on the TSN master clock device and the slave clock device in the TSN clock domain according to the difference between the current clock and the target clock in the communication clock domain.

[0222] In an optional implementation, the device-side TSN converter is integrated in the slave clock device, and the synchronization module 403 is specifically used for:

[0223] According to the sum of the current clock in the communication clock domain and the target clock difference, the local clock of the slave clock device in the TSN clock domain is updated to synchronize the clocks of the TSN master clock device and the slave clock device.

[0224] In an optional implementation, the device-side TSN converter is integrated in a communication terminal connected to the slave clock device, and the synchronization module 403 is specifically used to:

[0225] Generate a first clock synchronization message according to the target clock difference and the current clock of the communication clock domain, wherein the first clock synchronization message includes: the target clock difference and the current clock of the communication clock domain;

[0226] A first clock synchronization message is sent to a slave clock device, and a second clock synchronization message sent by the slave clock device is received, so that the slave clock device updates the local clock of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference, so as to synchronize the clocks of the TSN master clock device and the slave clock device.

[0227] In an optional implementation, the local clock of the slave clock device in the TSN clock domain is updated in the following manner:

[0228] Determine the clock deviation of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference;

[0229] The local clock of the slave clock device in the TSN clock domain is updated according to the clock deviation and the receiving timestamp of the first clock synchronization message.

[0230] In an optional implementation, the acquisition module 402 is specifically configured to:

[0231] A communication clock synchronization message of the communication clock domain sent by the receiving base station is received, wherein the communication clock synchronization message includes: a current clock of the communication clock domain.

[0232] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0233] Figure 8 A schematic diagram of the structure of the clock synchronization device provided in the embodiment of the present application Figure 2 , the device can be integrated in the UPF network element.

[0234] like Figure 8 As shown, the device comprises:

[0235] The acquisition module 501 is used to obtain the sending and receiving timestamp of the first sending and receiving clock synchronization message between the UPF network element and the TSN master clock device, and the sending and receiving timestamp of the second sending and receiving clock synchronization message between the UPF network element and the base station;

[0236] A determination module 502, configured to determine a first local clock of the UPF network element in the TSN clock domain according to a transceiver timestamp of the first transceiver clock synchronization message;

[0237] The determination module 502 is further used to determine the second local clock of the UPF network element in the communication clock domain according to the transceiver timestamp of the second transceiver clock synchronization message;

[0238] The determination module 502 is further used to determine the target clock difference of the UPF network element in the TSN clock domain and the communication clock domain according to the first local clock and the second local clock;

[0239] The sending module 503 is used to use the built-in network-side TSN converter to send a clock difference notification message to the device-side TSN converter, where the clock difference notification message includes: a target clock difference, so that the device-side TSN converter can synchronize the clocks of the TSN master clock device and the slave clock device according to the current clock of the communication clock domain and the target clock difference.

[0240] In an optional implementation, the determination module 502 is specifically configured to:

[0241] Determine a first clock deviation of the UPF network element in the TSN clock domain according to a sending and receiving timestamp of the first sending and receiving clock synchronization message;

[0242] A first local clock is determined according to the first clock deviation.

[0243] In an optional implementation, the determination module 502 is specifically configured to:

[0244] Determine a second clock deviation of the UPF network element in the communication clock domain according to a sending and receiving timestamp of the second sending and receiving clock synchronization message;

[0245] A second local clock is determined according to the second clock deviation.

[0246] In an optional implementation, the determination module 502 is further configured to:

[0247] According to the receiving and sending timestamps of the first receiving and sending clock synchronization message, the total round-trip delay between the UPF network element and the TSN master clock device is determined.

[0248] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0249] Fig. 9 This is a structural diagram of an electronic device provided in an embodiment of the present application. The device can be implemented by the above-mentioned device-side TSN converter or UPF network element.

[0250] like Fig. 9 As shown, the device may include: a processor 601, a memory 602 and a bus 603. The memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus 603, and the processor 601 executes the machine-readable instructions to perform the above method.

[0251] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is executed.

[0252] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.

[0253] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0254] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0255] In addition, each functional unit in the embodiments provided in the present application 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.

[0256] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0257] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0258] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A clock synchronization method, characterized in that: Applied to a device-side TSN converter, the method comprises: Receive a clock difference notification message sent by a network-side TSN converter built into a UPF network element, wherein the clock difference notification message includes: a target clock difference, where the target clock difference is the clock difference between the UPF network element in the TSN clock domain and the communication clock domain; Obtaining the current clock of the communication clock domain; According to the current clock of the communication clock domain and the target clock difference, clock synchronization is performed on the TSN master clock device and the slave clock device in the TSN clock domain.

2. The method according to claim 1, characterized in that The device-side TSN converter is integrated in the slave clock device, and the clock synchronization of the TSN master clock device and the slave clock device in the TSN clock domain is performed according to the current clock of the communication clock domain and the target clock difference, including: According to the current clock of the communication clock domain and the sum of the target clock difference, the local clock of the slave clock device in the TSN clock domain is updated to perform clock synchronization on the TSN master clock device and the slave clock device.

3. The method according to claim 1, characterized in that The device-side TSN converter is integrated in a communication terminal connected to the slave clock device, and the clock synchronization of the TSN master clock device and the slave clock device in the TSN clock domain is performed according to the current clock of the communication clock domain and the target clock difference, including: Generate a first clock synchronization message according to the target clock difference and the current clock of the communication clock domain, wherein the first clock synchronization message includes: the target clock difference and the current clock of the communication clock domain; The first clock synchronization message is sent to the slave clock device, and the second clock synchronization message sent by the slave clock device is received, so that the slave clock device updates the local clock of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference, so as to synchronize the clocks of the TSN master clock device and the slave clock device.

4. The method according to claim 3, characterized in that The local clock of the slave clock device in the TSN clock domain is updated in the following manner: Determine the clock deviation of the slave clock device in the TSN clock domain according to the reception timestamp of the first clock synchronization message, the transmission and reception timestamp of the second clock synchronization message, the current clock of the communication clock domain, and the target clock difference; The local clock of the slave clock device in the TSN clock domain is updated according to the clock deviation and the reception timestamp of the first clock synchronization message.

5. The method according to claim 1, characterized in that The obtaining of the current clock of the communication clock domain comprises: A communication clock synchronization message of the communication clock domain sent by a base station is received, wherein the communication clock synchronization message includes: a current clock of the communication clock domain.

6. A clock synchronization method, characterized in that: Applied to a UPF network element, the method comprises: Obtaining a sending and receiving timestamp of a first sending and receiving clock synchronization message between the UPF network element and the TSN master clock device, and a sending and receiving timestamp of a second sending and receiving clock synchronization message between the UPF network element and the base station; Determine a first local clock of the UPF network element in the TSN clock domain according to a sending and receiving timestamp of the first sending and receiving clock synchronization message; Determine a second local clock of the UPF network element in the communication clock domain according to the sending and receiving timestamp of the second sending and receiving clock synchronization message; Determine a target clock difference between the UPF network element in the TSN clock domain and the communication clock domain according to the first local clock and the second local clock; A built-in network-side TSN converter is used to send a clock difference notification message to a device-side TSN converter, wherein the clock difference notification message includes: the target clock difference, so that the device-side TSN converter performs clock synchronization on the TSN master clock device and the slave clock device according to the current clock of the communication clock domain and the target clock difference.

7. The method according to claim 6, characterized in that The determining, according to the receiving and sending timestamp of the first receiving and sending clock synchronization message, a first local clock of the UPF network element in the TSN clock domain includes: Determine a first clock deviation of the UPF network element in the TSN clock domain according to a sending and receiving timestamp of the first sending and receiving clock synchronization message; The first local clock is determined according to the first clock deviation.

8. The method according to claim 6, characterized in that The determining, according to the receiving and sending timestamp of the second receiving and sending clock synchronization message, the second local clock of the UPF network element in the communication clock domain comprises: Determining a second clock deviation of the UPF network element in the communication clock domain according to a sending and receiving timestamp of the second sending and receiving clock synchronization message; The second local clock is determined according to the second clock deviation.

9. The method according to claim 6, characterized in that The method further comprises: According to the receiving and sending timestamps of the first receiving and sending clock synchronization message, the total round-trip delay between the UPF network element and the TSN master clock device is determined.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1 to 9.