Communication system, communication method, and communication program
The communication system addresses the precision limitations of NTP by incorporating a time stamp rewriting device that uses high-precision time protocols to enhance NTP client devices' synchronization accuracy, eliminating the need for PTP slave functions and reducing costs.
Patent Information
- Application Number
- PCT/JP2023/039099
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-08
AI Technical Summary
Existing communication systems using NTP for time synchronization lack the precision of PTP, especially in NTP client devices without a PTP slave function, leading to inferior time synchronization accuracy.
A communication system that includes a time stamp rewriting device capable of acquiring reference time information using a high-precision time protocol, rewriting the time stamp of NTP responses, and transmitting these rewritten responses to NTP client devices for synchronization, thereby achieving high-precision time synchronization without the need for a PTP slave function.
The proposed solution enables high-precision time synchronization in NTP client devices without PTP functionality, surpassing the accuracy limitations of traditional NTP systems and reducing costs by eliminating the need for PTP slave devices.
Smart Images

Figure JP2023039099_08052025_PF_FP_ABST
Abstract
Description
COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
[0001] The present disclosure relates to a communication system, a communication method, and a communication program.
[0002] In order to synchronize the operation timing of each system and device connected within the same network, it is necessary to perform time synchronization processing to synchronize the time information held by each device.
[0003] Patent Document 1 discloses an invention of a communication device that, in time synchronization within the device, always maintains the absolute time in the device's time information generating section with high precision regardless of the state of the network.
[0004] An example of a time synchronization function is the Network Time Protocol (NTP) described in Non-Patent Document 1. The NTP function basically queries an NTP server at a higher level in a hierarchical structure via a network for time information, transmits the time information to lower levels, and performs time synchronization processing on the client device. Related to NTP is the Simple Network Time Protocol (SNTP), which is a simplified version of NTP and functions to obtain time information from a single, non-hierarchical server. NTP achieves time synchronization accuracy on the order of milliseconds. The NTP time information exchange is based on the assumption that the round-trip delay time on the transmission network is equal for both the outbound and return paths, which has the disadvantage of being susceptible to delays in communication devices such as switches that transfer time information.
[0005] Non-Patent Document 2 describes PTP (Precision Time Protocol) as another time synchronization function. PTP is a communication protocol that synchronizes clocks across an entire network by performing time synchronization processing using synchronization messages exchanged between a master device, called a grandmaster (GM), which synchronizes with a reference time, and PTP slave devices. PTP has a function of stamping timestamps using hardware, thereby achieving synchronization accuracy on the order of microseconds.
[0006] JP 2014-82599 A
[0007] RFC5905 (Network Time Protocol Version 4: Protocol and Algorithms Specification, June 2010) IEEE1588-2008 (IEEE Standard (for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems, 2008)
[0008] However, the technology described in Patent Document 1 uses the PTP described in Non-Patent Document 2 as the network time synchronization protocol, which necessitates the application of a PTP slave device having a PTP function between the network and the NTP client device. Also, the time synchronization using NTP described in Non-Patent Document 1 has the problem of being less accurate than the time synchronization using PTP.
[0009] The present disclosure aims to provide a communication system, a communication method, and a communication program that achieve highly accurate time synchronization in an NTP client device that does not have a PTP slave function.
[0010] The communication system disclosed herein includes a timestamp rewriting device having a time synchronization unit that acquires reference time information from a grandmaster device using a high precision time protocol, a timestamp rewriting unit that rewrites the timestamp of a response from a Network Time Protocol server device in response to a time synchronization request using the Network Time Protocol from a client device that is the target of time synchronization, to the reference time, and an output control unit that sends the response with the rewritten timestamp to the client device, and the client device performs time synchronization based on the timestamp of the response received from the output control unit of the timestamp rewriting device.
[0011] The communication method disclosed herein is a communication method executed by a computer, and is characterized by comprising the steps of: acquiring reference time information from a grandmaster device using a high precision time protocol; rewriting a timestamp of a response from a Network Time Protocol server device in response to a time synchronization request using the Network Time Protocol from a client device that is the target of time synchronization, to the reference time; transmitting the response with the rewritten timestamp to the client device; and performing time synchronization by the client device based on the timestamp of the response with the rewritten timestamp.
[0012] The communication program disclosed herein is characterized in that it causes a computer to execute the steps of: acquiring reference time information from a grandmaster device using a high precision time protocol; rewriting the timestamp of a response from a network time protocol server device in response to a time synchronization request using the network time protocol from a client device that is the target of time synchronization, to the reference time; and transmitting the response with the rewritten timestamp to the client device.
[0013] According to the present disclosure, it is possible to provide a communication system, a communication method, and a communication program that achieve highly accurate time synchronization in an NTP client device that does not have a PTP slave function.
[0014] FIG. 1 is a system configuration diagram including an NTP timestamp rewriting device according to a first embodiment. FIG. 1 is a system configuration diagram in which time synchronization by PTP and time synchronization by NTP are mixed. FIG. 2 is a block diagram of an NTP timestamp rewriting device according to the first embodiment. FIG. 3 is a block diagram of an NTP timestamp rewriting unit according to the first embodiment. FIG. 4 is an explanatory diagram of an NTP format. FIG. 5 is a sequence diagram showing time synchronization according to the first embodiment. FIG. 1 is a system configuration diagram including an NTP timestamp rewriting device according to a second embodiment. FIG. 2 is a block diagram of an NTP timestamp rewriting device according to the second embodiment. FIG. 3 is a sequence diagram showing time synchronization according to the second embodiment. FIG. 4 is a block diagram of an NTP timestamp rewriting device according to a third embodiment. FIG. 5 is a block diagram of a local NTP server unit according to the third embodiment. FIG. 6 is a sequence diagram showing time synchronization according to the third embodiment. FIG. 7 is a system configuration diagram including an NTP timestamp rewriting device according to a fourth embodiment. FIG. 8 is a block diagram of an NTP timestamp rewriting device according to the fourth embodiment. FIG. 9 is a system configuration diagram including an NTP timestamp rewriting device according to a fifth embodiment. FIG. 10 is a block diagram of an NTP timestamp rewriting device according to the fifth embodiment.
[0015] Hereinafter, a communication system according to an embodiment will be described with reference to the drawings. The following embodiments are merely examples, and the embodiments can be appropriately combined and modified.
[0016] 1 is a system configuration diagram showing a communication system 100 according to embodiment 1. The communication system 100 includes a network system configured of an NTP timestamp rewriting device 1, a grandmaster device 2, an NTP server device 3, an NTP client device 4, and a network 5 such as an IP (Internet Protocol) network.
[0017] 2 is a system configuration diagram showing an example of a communication system 102 in which time synchronization based on PTP and time synchronization based on NTP are mixed. The communication system 102 differs from the communication system 100 of the first embodiment in that a PTP slave device 30 is provided between the network 5 and the NTP client device 4P. The communication system 100 of the first embodiment is configured such that the PTP slave device 30 of the communication system 102 shown in FIG. 2 is replaced with an NTP timestamp rewriting device 1 having an NTP timestamp rewriting function.
[0018] The NTP timestamp rewriting device 1 is a device equipped with a PTP slave function and capable of rewriting the timestamp portion of an NTP message. The grandmaster device 2 is the highest-level master device via the network 5 and is a device that synchronizes with a highly accurate reference time such as GPS (Global Positioning System). The NTP server device 3 is a device that performs time synchronization using GPS or the like and provides time information to various communication devices that refer to the time information in NTP time synchronization via the network 5. The NTP client device 4, which is the target of time synchronization, is a device that receives current time information from the NTP server device 3 using the NTP protocol over an IP network.
[0019] 3 is a block diagram showing an example of the configuration of the NTP timestamp rewriting device 1 in embodiment 1. The NTP timestamp rewriting device 1 is made up of the following blocks: an input unit 11, a frame identification unit 12, a PTP time synchronization unit 13, an NTP request transfer unit 14, an NTP request transfer time holding unit 15, an NTP response transfer unit 16, an NTP timestamp rewriting unit 17, and an output control unit 18.
[0020] The input unit 11 refers to a physical port connected to the network 5 and inputting signals from the transmission path. The frame identification unit 12 has the function of identifying the destination MAC address (Media Access Control address) and VLAN (Virtual Local Area Network) information from the signal frame information sent from the input unit 11 and transferring the information to a subsequent processing block. The PTP time synchronization unit 13, as the slave side in PTP time synchronization, performs time synchronization by exchanging time synchronization messages with the master side grandmaster device 2. It also sends PTP transmission frames to subsequent blocks and distributes time information to other blocks. The NTP request transfer unit 14 performs transfer processing when an NTP request frame is input. The NTP request transfer time retention unit 15 has the function of retaining the time information synchronized by PTP in its own device when transferring an NTP request frame. Specifically, the NTP request transfer time holding unit 15 holding time information synchronized by PTP means that, as will be described later with reference to FIG. 6 , the NTP request transfer time holding unit 15 holds (temporarily stores) information on the PTP request transfer time (t20 described later) when the NTP timestamp rewriting device 1 receives a request from the NTP client device 4. The NTP response transfer unit 16 performs transfer processing when an NTP response frame is input. The NTP timestamp rewriting unit 17 is connected to the NTP response transfer unit 16 and has the function of rewriting the timestamp portion of the response frame of the NTP message transmitted and received between the NTP server device 3 and the NTP client device 4. The response frame with the rewritten timestamp portion is transferred to the output control unit 18 at the subsequent stage. The output control unit 18 has the function of identifying frames transferred from each block, prioritizing the identified frames, and transmitting a signal to an arbitrary destination.
[0021] The NTP timestamp rewriting device 1 is configured as a computer in which a CPU (Central Processing Unit), main memory, input / output interface, and memory unit are each connected to a system bus. The CPU is an IC (Integrated Circuit) that performs arithmetic processing. In addition to the CPU, arithmetic elements such as a DSP (Digital Signal Processor), a GPU (Graphics Processing Unit), a Network Processor, or an FPGA (Field Programmable Gate Array) may also be used. By executing the communication program according to the first embodiment, the CPU functions as a frame identification function, a PTP time synchronization function, an NTP request transfer function, an NTP request transfer time retention function, an NTP response transfer function, an NTP timestamp rewriting function, and an output control function. As a result, by executing the communication program, the CPU functions as a frame identification unit 12, a PTP time synchronization unit 13, an NTP request transfer unit 14, an NTP request transfer time holding unit 15, an NTP response transfer unit 16, an NTP timestamp rewriting unit 17, and an output control unit 18. The communication program is provided, for example, on a recording medium on which it is recorded.
[0022] The main memory is composed of a volatile storage device such as a RAM (Random Access Memory) or a non-volatile storage device such as a ROM (Read Only Memory), and the storage unit is composed of a non-volatile storage device such as a HDD (Hard Disk Drive) or a flash memory.
[0023] The input / output interface is a port to which the network 5 and the NTP client device 4 are connected, etc. A specific example of the input / output interface is a communication interface such as Ethernet (registered trademark).
[0024] 4 is a block diagram showing an example of the configuration of the NTP timestamp rewriting unit 17. The NTP timestamp rewriting unit 17 is made up of the following blocks: NTP request transfer time information 171, PTP synchronization time information 172, pre-rewrite checksum check unit 173, NTP timestamp rewriting processing unit 174, and post-rewrite checksum calculation / rewriting unit 175.
[0025] The NTP request transfer time information 171 has a function of transferring the time information input from the NTP request transfer time holding unit 15 as transfer time information of the NTP request frame to the subsequent NTP timestamp rewriting processing unit 174. The PTP synchronization time information 172 is a part that transfers PTP time information time-synchronized with the master side as the PTP slave side by the PTP time synchronization unit 13 to the subsequent NTP timestamp rewriting processing unit 174. The pre-rewrite checksum check unit 173 has a function of checking the checksum of the NTP response frame input from the NTP response transfer unit 16. The NTP timestamp rewriting unit 174 has a function of rewriting the timestamp part in the response frame of the NTP message transferred from the pre-rewrite checksum checking unit 173, using time information (t20 described later) transferred from the NTP request transfer time information 171 and time information (t30 described later) transferred from the PTP synchronization time information 172. The post-rewrite checksum calculation / rewriting unit 175 has a function of calculating the checksum of the frame transferred from the NTP timestamp rewriting unit 174, rewriting the checksum information, and transferring it to the output control unit 18 at the downstream stage.
[0026] Next, the operation of the NTP timestamp rewriting device 1 according to the first embodiment and the time synchronization operation of the NTP client device 4 will be described with reference to FIGS. 1, 3 and 4. FIG.
[0027] First, the PTP time synchronization unit 13 of the NTP time stamp rewriting device 1 performs PTP time synchronization with the master-side grandmaster device 2 as the slave side of PTP time synchronization. A signal frame containing a PTP message received via the network 5 is received by the input unit 11, and the frame transferred from the input unit 11 is input to the frame identification unit 12. The frame identification unit 12 identifies the destination MAC address, VLAN information, etc. of the input frame, and upon receiving a frame containing a PTP message, transfers it to the PTP time synchronization unit 13. The PTP time synchronization unit 13 exchanges PTP messages with the grandmaster device 2. The slave-side PTP time synchronization unit 13 performs synchronization by correcting the time information of its own block using a synchronization message sent from the master-side grandmaster device 2.
[0028] Next, we will explain the operation of NTP time synchronization between the NTP client device 4 and the NTP server device 3. The NTP client device 4 sends a request frame including a transmission timestamp to the NTP server device 3 to synchronize the time of its own device. The NTP server device 3 receives the request and generates another timestamp for response. The NTP client device 4 receives the destination timestamp and attempts to synchronize the time of its own device.
[0029] A request frame from the NTP client device 4 to the NTP server device 3 is input from the NTP client device 4 to the input unit 11 of the NTP timestamp rewriting device 1 and transferred to the frame identification unit 12. The NTP request frame input to the input unit 11 is identified by the frame identification unit 12 and transferred to the NTP request transfer unit 14. The NTP request transfer unit 14 stamps the time synchronized by the PTP time synchronization unit 13 (t20 described later) as the transfer time of the request frame and holds the transfer time of the request frame in the NTP request transfer time holding unit 15. The request frame transferred from the NTP request transfer unit 14 is output-controlled by the output control unit 18 and input to the NTP server device 3 via the network 5.
[0030] On the other hand, an NTP response frame from the NTP server device 3 to the NTP client device 4 is input to the input unit 11 of the NTP timestamp rewriting device 1 from the NTP server device 3 via the network 5 and transferred to the frame identification unit 12. The NTP response frame is identified by the frame identification unit 12 and transferred to the NTP response transfer unit 16, and then transferred to the NTP timestamp rewriting unit 17 of the next block.
[0031] Next, the operation of the NTP timestamp rewriting unit 17 will be described using Figure 4. A response frame input to the NTP timestamp rewriting unit 17 has its frame checksum portion before the NTP timestamp is rewritten checked by a pre-rewrite checksum check unit 173, and is then input to an NTP timestamp rewriting processing unit 174. The NTP timestamp rewriting processing unit 174 uses information on the NTP request transfer time (t20, described later) stamped with the PTP time information and information on the response time (t30, described later) from the PTP synchronization time information 172, which are held in the NTP request transfer time information 171, to rewrite the Receive Timestamp portion and the Transmit Timestamp portion of the timestamp in the NTP frame format. A post-rewrite checksum calculation / rewriting unit 175 recalculates the checksum and rewrites the checksum portion of the response frame having the rewritten timestamp. The response frame processed by the NTP timestamp rewriting unit 17 is transferred to the output control unit 18, where output control for transmission to the NTP client device 4 is performed.
[0032] 5 shows the NTP format defined in RFC 5905 etc. NTP basically uses UDP (User Datagram Protocol). When the NTP client device 4 accesses the NTP server device 3, it uses UDP port number 123 as the destination port number and also uses UDP port number 123 as the source port number.
[0033] FIG. 6 shows a time synchronization sequence diagram between the NTP client device 4 and the NTP server device 3 according to the first embodiment. Since NTP information is transmitted over a network, delays occur. The NTP client device 4 synchronizes its own time by calculating and reflecting these delays. As shown in FIG. 6 , the time when the NTP client device 4 sends a request is designated as time t1, and the request is relayed by the NTP timestamp rewriting device 1 and forwarded to the NTP server device 3 via the network 5. In the forwarding process in the NTP timestamp rewriting device 1, the NTP request forwarding unit 14 stamps the NTP request forwarding time t20 based on the PTP time synchronization information within the NTP timestamp rewriting device 1 (PTP synchronization time information when the NTP timestamp rewriting device 1 receives a request from the NTP client device 4), and the NTP request forwarding time retaining unit 15 retains this time. The time when the request forwarded from the NTP timestamp rewriting device 1 is received by the NTP server device 3 is designated as t2. In addition, in the NTP format of FIG. 5, the transmission timestamp received by the NTP server device 3 is t1.
[0034] The time when the request is input to the NTP server device 3 is assumed to be t2, and the time when the response is transmitted from the NTP server device 3 after the request and response have been processed is assumed to be t3. Therefore, the Origin Timestamp of the timestamp information in the NTP format shown in Figure 5 is t1, the Receive Timestamp is t2, and the Transmit Timestamp is t3. The NTP response frame from the NTP server device 3 is transferred to the NTP client device 4 via the NTP timestamp rewrite device 1. The timestamp for the response frame transfer in the NTP timestamp rewrite device 1 is assumed to be t30. This t30 is stamped with highly accurate time information synchronized with PTP time by the NTP timestamp rewrite device 1.
[0035] Furthermore, the NTP timestamp rewriting unit 17 of the NTP timestamp rewriting device 1 rewrites the Receive Timestamp of the timestamp in the NTP format shown in Figure 5 from t2 to t20 stamped with the PTP time information, and rewrites the Transmit Timestamp from t3 to t30 stamped with the PTP time information. After being relayed by the NTP timestamp rewriting device 1, the time at which the response is received at the NTP client device 4 is set to t4.
[0036] Therefore, the NTP synchronization time in the NTP client device 4 is calculated using the following formula (1). In the following formula (1), it is assumed that the delay times in the network and system are equal for transmission and reception. The first term t30 on the right side of formula (1) is the PTP time information when the NTP response frame is transferred from the NTP timestamp rewriting device 1 to the NTP client device 4. The second term on the right side of formula (1) is the delay time from the time t30 until the NTP response frame reaches the NTP client device 4, which is the one-way round trip time between the NTP client device 4 and the NTP timestamp rewriting device 1. The NTP client device 4 calculates the NTP synchronization time shown in the following formula (1) based on the timestamp in the NTP format rewritten as described above, and synchronizes its own time.
[0037] NTP synchronization time = t30+{(t4-t1)-(t30-t20)} / 2...(1)
[0038] In the first embodiment, the NTP client device 4 is synchronized with the PTP-synchronized time information rewritten by the NTP time stamp rewriting device 1, thereby achieving time synchronization with higher accuracy than NTP time synchronization.
[0039] In the above description, the grandmaster device 2 and the NTP server device 3 are configured to be connected to the same port of the NTP timestamp rewriting device 1, but the grandmaster device 2 and the NTP server device 3 may also be configured to be connected to different ports of the NTP timestamp rewriting device 1.
[0040] The grandmaster device 2 in this embodiment can also be connected to a device that has an NTP server function in addition to a PTP master function. While this embodiment has been described as being applied to an NTP client device 4, it can also be applied to an SNTP client device. The PTP time synchronization in the first embodiment can also be applied to a gPTP (generalized Precision Time Protocol) profile.
[0041] As explained above, in the first embodiment, in the communication system including the PTP slave device 30 and the NTP client device 4P shown in Figure 2, by replacing the PTP slave device 30 with the NTP timestamp rewriting device 1, highly accurate time synchronization is possible even for the NTP client device 4 that does not have the PTP time synchronization function and is subordinate to the NTP timestamp rewriting device 1, thereby achieving the effect of highly accurate time synchronization for the entire communication system. In addition, the ability to use an NTP client device 4 that does not have the PTP function has the effect of reducing costs.
[0042] In the first embodiment, the NTP timestamp rewriting device 1 rewrites the Receive timestamp and Transmit timestamp of the NTP response frame with the reference time based on the PTP time synchronization, and transmits the frame to the NTP client device 4. The NTP client device 4 that receives the NTP response frame performs time synchronization of its own device with the NTP synchronization time obtained by substituting the rewritten Receive timestamp and Transmit timestamp, as well as the Origin timestamp indicating the time when the NTP client device 4 transmitted the NTP request frame, into the above-mentioned formula (1).
[0043] The timestamp of a normal NTP request frame has the Receive Timestamp indicating the time when the NTP server device 3 received the NTP request frame, and the Transmit Timestamp indicating the time when the NTP server device 3 transmitted the NTP response frame. In the first embodiment, the NTP timestamp rewriting device 1 rewrites the Receive Timestamp to the reference time according to PTP time synchronization when the NTP timestamp rewriting device 1 received the NTP request frame, and the Transmit Timestamp to the reference time according to PTP time synchronization when the NTP timestamp rewriting device 1 transmitted the NTP response frame, thereby enabling an NTP client device 4 that does not have a PTP slave function to perform highly accurate time synchronization in accordance with PTP using normal NTP communication procedures.
[0044] Second Embodiment Next, a communication system 110 according to the second embodiment will be described. Fig. 7 is a system configuration diagram including an NTP timestamp rewriting device 6 according to the second embodiment. The communication system 110 according to the second embodiment is composed of an NTP timestamp rewriting device 6, a grandmaster device 2, an NTP client device 4, and a network 5, and represents, for example, a network system that is separated from the network of a higher-level NTP server device 3. In the first embodiment, the NTP server device 3 on the higher-level network is indicated as the NTP server, but in the second embodiment, a form will be described in which a local NTP server function is provided inside the NTP timestamp rewriting device 6.
[0045] 8 is a block diagram showing an example of the configuration of the NTP timestamp rewriting device 6 constituting the communication system 110 according to the second embodiment. The NTP timestamp rewriting device 6 according to the second embodiment has a configuration in which a local NTP server unit 19 is added to the NTP timestamp rewriting device 1 according to the first embodiment shown in FIG. 3. The local NTP server unit 19 is connected to the NTP request transfer unit 14 and the NTP response transfer unit 16, and has the function of an NTP server. However, the configuration of the NTP timestamp rewriting device 6 other than the local NTP server unit 19 is the same as that of the NTP timestamp rewriting device 1 according to the first embodiment, and therefore the same components as those in the first embodiment are denoted by the same reference numerals as those in the first embodiment, and detailed description thereof will be omitted.
[0046] The operation of the NTP timestamp rewriting device 6 according to the second embodiment and the operation of the NTP client device 4 will be described with reference to Figures 7, 8, and 4. First, the NTP client device 4 transmits a request frame including a transmission timestamp to the NTP server in order to synchronize the time of its own device.
[0047] A request frame from the NTP client device 4 to the NTP server is input to the input unit 11 of the NTP timestamp rewriting device 6 and transferred to the frame identification unit 12. The NTP request frame input to the input unit 11 is identified by the frame identification unit 12 and transferred to the NTP request transfer unit 14. The NTP request transfer unit 14 stamps the time synchronized by the PTP time synchronization unit 13 (t20, described later) as the transfer time of the request frame and stores the transfer time of the request frame in the NTP request transfer time storage unit 15. The NTP request frame is transferred to the local NTP server unit 19, which processes the signal as an NTP server. After receiving the request frame, the local NTP server unit 19 performs a process to send a response frame. The NTP response frame is input to the NTP response transfer unit 16, and the response frame is further transferred to the NTP timestamp rewriting unit 17 of the next block.
[0048] Next, the operation of the NTP timestamp rewriting unit 17 will be described using Figure 4. A response frame input to the NTP timestamp rewriting unit 17 has its frame checksum portion before the NTP timestamp is rewritten checked by a pre-rewrite checksum check unit 173, and is then input to an NTP timestamp rewriting processing unit 174. The NTP timestamp rewriting processing unit 174 uses information on the NTP request transfer time (t20, described later) stamped with the PTP time information and information on the response time (t30, described later) from the PTP synchronization time information 172, which are held in the NTP request transfer time information 171, to rewrite the Receive Timestamp and Transmit Timestamp portions of the timestamp in the NTP frame format. A post-rewrite checksum calculation / rewriting unit 175 recalculates the checksum of the response frame having the rewritten timestamp, thereby rewriting the checksum portion. The response frame processed by the NTP timestamp rewriting unit 17 is transferred to the output control unit 18, where output control for transmission to the NTP client device 4 is performed.
[0049] 9 shows a time synchronization sequence diagram for the NTP client device 4, the NTP request transfer unit 14 and the NTP response transfer unit 16 in the NTP timestamp rewriting device 6, and the local NTP server unit 19 in the second embodiment. When exchanging information via NTP, in addition to transmission delays on the network, delays in transfer within the NTP timestamp rewriting device 6 occur. In this embodiment, the NTP client device 4 attempts to synchronize its own time by calculating and reflecting these delays.
[0050] As shown in Figure 9, the time when the request is sent by the NTP client device 4 is set to time t1, and the NTP request transfer time t20 based on the PTP time synchronization information is stamped by the NTP request transfer unit 14 and stored in the NTP request transfer time storage unit 15 in the NTP timestamp rewriting device 6. The reception time at the local NTP server unit 19 is set to t2, and the transmission time of the response when the local NTP server unit 19 performs response processing is set to t3. As a result, the Origin Timestamp of the timestamp information in the NTP format of Figure 5 is set to t1, the Receive Timestamp to t2, and the Transmit Timestamp to t3. Thereafter, the timestamp of the response frame in the NTP timestamp rewriting unit 17 is set to t30. This t30 is stamped with highly accurate time information synchronized with PTP time by the PTP time synchronization unit 13.
[0051] 5 from t2 to t20 stamped with the PTP time information, and rewrites the Transmit Timestamp from t3 to t30 stamped with the PTP time information.Then, the NTP client device 4 sets the time of reception of the response as t4.
[0052] Therefore, the NTP synchronization time in the NTP client device 4 is calculated using the following formula (2). In formula (2), the delay times in the network and system are considered to be equal for transmission and reception. The first term t30 on the right side of formula (2) is the time it takes for the NTP response frame to be transferred from the NTP timestamp rewriting device 6 to the NTP client device 4. In the second embodiment, this is the PTP time information when the NTP response frame is transferred from the NTP response transfer unit 16 to the NTP timestamp rewriting unit 17. The second term on the right side of formula (2) is the delay time from the time t30 until the NTP response frame reaches the NTP client device 4, which is the one-way round trip time between the NTP client device 4 and the NTP timestamp rewriting device 6. The NTP client device 4 references the timestamp in the NTP format rewritten as described above, calculates the NTP synchronization time shown in formula (2) below, and synchronizes its own time.
[0053] NTP synchronization time = t30+{(t4-t1)-(t30-t20)} / 2...(2)
[0054] In the second embodiment, the NTP client device 4 is synchronized with the PTP-synchronized time information rewritten by the NTP timestamp rewriting device 6, thereby achieving time synchronization with higher accuracy than NTP time synchronization.
[0055] In the second embodiment, the case where the present invention is applied to the NTP client device 4 has been described, but the present invention can also be applied to an SNTP client device. The PTP time synchronization of the present embodiment can also be applied to a gPTP profile.
[0056] As described above, by applying the NTP time stamp rewriting device 6 having the PTP time synchronization function, NTP time stamp rewriting function, and local NTP server function shown in Figure 8, it is possible to achieve highly accurate time synchronization for the entire communication system 110, including the NTP client device 4, in a network system that is separated from the NTP server on a higher-level network. Furthermore, since time synchronization is performed without relying on the NTP server device 3 on an external network, it can be applied to a robust network that is separated from the network of the higher-level NTP server device 3, and can achieve both enhanced security and highly accurate time synchronization. Furthermore, by not going through the network of the higher-level NTP server device 3, network delays due to an increase in the number of network connections can be avoided.
[0057] <<Embodiment 3>> Next, a communication system according to embodiment 3 will be described. In embodiment 2, the NTP timestamp was rewritten outside the local NTP server unit 19 of the NTP timestamp rewriting device 6, but embodiment 3 differs from embodiment 2 in that the PTP synchronization time information is reflected in the NTP timestamp by the local NTP server unit 20 of the NTP timestamp rewriting device 7. However, the configuration other than the local NTP server unit 20 in the NTP timestamp rewriting device 7 is the same as in embodiment 2, and therefore the same components as in embodiment 2 are assigned the same reference numerals as in embodiment 2 and detailed description thereof will be omitted.
[0058] 10 is a block diagram showing an example of the configuration of an NTP timestamp rewriting device 7 constituting a communication system according to embodiment 3. The NTP timestamp rewriting device 7 according to embodiment 3 includes an input unit 11, a frame identification unit 12, a PTP time synchronization unit 13, a local NTP server unit 20, and an output control unit 18.
[0059] 11 is a block diagram showing an example of the configuration of the local NTP server unit 20 according to embodiment 3. The local NTP server unit 20 is composed of blocks including PTP synchronization time information 201, a checksum check unit 202, a local NTP server processing unit 203, and a checksum calculation / rewriting unit 204.
[0060] Next, the operation of the NTP timestamp rewriting device 7 according to the third embodiment and the operation of the NTP client device 4 will be described with reference to Figures 10 and 11. A request frame from the NTP client device 4 to the NTP server is input to the input unit 11 of the NTP timestamp rewriting device 7 and transferred to the frame identification unit 12. The NTP request frame input to the input unit 11 is identified by the frame identification unit 12 and transferred to the local NTP server unit 20. The local NTP server unit 20 reflects the time information (t20, described later) synchronized by the PTP time synchronization unit 13 in the timestamp of the input NTP request frame.
[0061] Next, the operation of the local NTP server unit 20 will be described using FIG. 11 . A request frame transferred to the local NTP server unit 20 undergoes a checksum check in the checksum check unit 202 to check the checksum portion of the response frame, and is then input to the local NTP server processing unit 203, where the signal is processed as an NTP server. The reception time of the request frame is stamped using the PTP synchronization time information 201. After receiving the request frame, the local NTP server processing unit 203 transmits the response frame. Specifically, the local NTP server processing unit 203 obtains information about the response time (t30, described later) from the PTP synchronization time information 201 and rewrites the Receive Timestamp and Transmit Timestamp timestamps in the NTP frame format. The checksum calculation / rewriting unit 204 recalculates the checksum of the response frame with the rewritten timestamp, thereby rewriting the checksum portion. The response frame generated by the local NTP server unit 20 is transferred to the output control unit 18, where output control for sending it to the NTP client device 4 is performed.
[0062] 12 shows a time synchronization sequence diagram between the NTP client device 4 and the NTP timestamp rewriting device 7 in the third embodiment. When exchanging information via NTP, in addition to transmission delays on the network, delays in transfer within the NTP timestamp rewriting device 7 occur. The NTP client device 4 attempts to synchronize its own time by calculating and reflecting this delay time.
[0063] As shown in Fig. 12, the time when the request is sent by the NTP client device 4 is taken as time t1, and the arrival time of the NTP request frame in the NTP timestamp rewriting device 7 is taken as t20 stamped in the PTP synchronized time information 201. After the response process is sent to the local NTP server unit 20, the transmission time of the response is taken as t30 stamped in the PTP synchronized time information 201. In the timestamp information in the NTP format of Fig. 5, Origin Timestamp is taken as t1, Receive Timestamp is taken as t20, and Transmit Timestamp is taken as t30. The reception time of the response at the NTP client device 4 is taken as t4.
[0064] Therefore, the NTP synchronization time in the NTP client device 4 is calculated using the following formula (3). In formula (3), the delay times in the network and system are considered to be equal for transmission and reception. The first term t30 on the right side of formula (3) is the time it takes for the NTP response frame to be transferred from the NTP timestamp rewriting device 7 to the NTP client device 4. In the third embodiment, this is the PTP time information when the local NTP server unit 20 performs the transmission process of the NTP response frame. The second term on the right side of formula (3) is the delay time from the time t30 until the NTP response frame reaches the NTP client device 4, which is the one-way round trip time between the NTP client device 4 and the NTP timestamp rewriting device 7. The NTP client device 4 references the timestamp in the NTP format rewritten as described above, calculates the NTP synchronization time shown in formula (3) below, and synchronizes its own time.
[0065] NTP synchronization time = t30+{(t4-t1)-(t30-t20)} / 2...(3)
[0066] In the third embodiment, the NTP client device 4 is synchronized with the PTP-synchronized time information rewritten by the NTP timestamp rewriting device 7, thereby achieving time synchronization with higher accuracy than NTP time synchronization.
[0067] As explained above, by applying the NTP timestamp rewriting device 7 having a PTP time synchronization function, an NTP timestamp rewriting function, and a local NTP server function, as shown in Figure 10, it is possible to achieve highly accurate time synchronization for the entire system, including the NTP client device 4, in a network system separated from the NTP server of the upper network.
[0068] Next, a communication system 120 according to embodiment 4 will be described. In embodiment 1, a configuration was shown in which one NTP client device 4 is connected to one port of the NTP timestamp rewriting device, but in embodiment 4, a configuration will be described in which the NTP timestamp rewriting device 8 has multiple ports and multiple NTP client devices 4 are connected.
[0069] 13 is an example of a system configuration diagram of a communication system 120 including an NTP timestamp rewriting device 8 according to embodiment 4. The communication system 120 according to embodiment 4 differs from embodiment 1 in that a plurality of NTP client devices 4 are connected to an NTP timestamp rewriting device 8 equipped with a plurality of ports. However, other than the NTP timestamp rewriting device 8 equipped with a plurality of ports and the plurality of NTP client devices 4 connected, the system is the same as embodiment 1, and therefore the same components as embodiment 1 are assigned the same reference numerals and detailed description thereof will be omitted.
[0070] 14 is a block diagram showing an example of the configuration of an NTP timestamp rewriting device 8 according to embodiment 4. Unlike the NTP timestamp rewriting device 1 according to embodiment 1 shown in FIG. 3, the NTP timestamp rewriting device 8 according to embodiment 4 has a configuration including multiple input / output ports. The NTP timestamp rewriting device 8 includes, for each input port, an input unit 11, a frame identification unit 12, an NTP request transfer unit 14, an NTP request transfer time holding unit 15, an NTP response transfer unit 16, an NTP timestamp rewriting unit 17, and an output control unit 18. However, the NTP timestamp rewriting device 8 includes only one PTP time synchronization unit 13, and this single PTP time synchronization unit 13 supplies time information synchronized by PTP to each of the multiple NTP request transfer units 14 and NTP timestamp rewriting units 17.
[0071] 13 and 14, the operation of the NTP timestamp rewriting device 8 and the NTP client device 4 according to the fourth embodiment will be described. Each of the NTP client devices 4 transmits a request frame including a transmission timestamp to the NTP server in order to synchronize the time of the device itself.
[0072] Request frames from multiple NTP client devices 4 to the NTP server are input to each input unit 11 of the NTP timestamp rewriting device 8 and transferred to the frame identification unit 12. The NTP request frames input to the input unit 11 are identified by the frame identification unit 12 and transferred to the NTP request transfer unit 14. The NTP request transfer unit 14 stamps the time synchronized by the PTP time synchronization unit 13 (t20 mentioned above in the first embodiment) as the transfer time of the request frame and holds the transfer time of the request frame in the NTP request transfer time holding unit 15. The output of each request frame transferred from the NTP request transfer unit 14 is controlled by the output control unit 18 and input to the NTP server device 3 via the network 5.
[0073] On the other hand, NTP response frames from the NTP server device 3 to the multiple NTP client devices 4 are input to the input unit 11 of each of the NTP timestamp rewriting devices 8 from the NTP server device 3 via the network 5 and transferred to the frame identification unit 12. The NTP response frame is identified by the frame identification unit 12 and transferred to the NTP response transfer unit 16, and then transferred to the NTP timestamp rewriting unit 17 of the next block.
[0074] The operation of each NTP timestamp rewriting unit 17, output control, time synchronization sequence, timestamp rewriting in the NTP format diagram, and time synchronization operation in the NTP client device 4 are the same as those in the first embodiment.
[0075] In embodiment 4, the NTP timestamp rewriting device 8 rewrites the timestamp of the response frame with PTP-synchronized time information, thereby synchronizing each NTP client device 4 and achieving more accurate time synchronization than NTP time synchronization.
[0076] As explained above, in the communication system including the PTP slave device 30 and NTP client device 4 shown in Figure 2, by configuring the PTP slave device 30 to be replaced with the NTP timestamp rewriting device 8, highly accurate time synchronization becomes possible even for multiple NTP client devices 4 that do not have the PTP time synchronization function and are connected to multiple ports of the NTP timestamp rewriting device 8, thereby achieving highly accurate time synchronization throughout the communication system 120. Furthermore, the ability to use multiple NTP client devices 4 that do not have the PTP function has the effect of reducing costs.
[0077] Next, a description will be given of a communication system 130 according to embodiment 5. In embodiment 1, a configuration was shown in which one NTP client device 4 was connected downstream of the NTP timestamp rewriting device 1, but in embodiment 5, a configuration will be described in which a PTP master function is provided within the NTP timestamp rewriting device 9, and an NTP client device 4 and a PTP slave device 10 are each connected to the NTP timestamp rewriting device 9.
[0078] 15 is an example of a system configuration diagram of a communication system 130 including an NTP timestamp rewriting device 9 according to embodiment 5. The communication system 130 according to embodiment 5 differs from embodiment 1 in that, compared to the system configuration of the communication system 100 according to embodiment 1 shown in FIG. 1, a PTP slave device 10 and an NTP client device 4 are connected to the NTP timestamp rewriting device 9. However, since the other configurations are the same as those of embodiment 1, the same reference numerals are used for the same configurations as those of embodiment 1, and detailed description thereof will be omitted.
[0079] 16 is a block diagram showing an example of the configuration of an NTP timestamp rewriting device 9 according to embodiment 5. The NTP timestamp rewriting device 9 is configured by adding a PTP master function unit 21 and a PTP / NTP port identification unit 22 to the NTP timestamp rewriting device 1 according to embodiment 1 shown in FIG. 3, and by including a PTP frame identification unit 12A and an NTP frame identification unit 12B instead of the frame identification unit 12. The PTP / NTP port identification unit 22 is connected to the input unit 11, the PTP frame identification unit 12A, and the NTP frame identification unit 12B, and identifies either the PTP or NTP connection port of a signal frame input from the input unit 11, and inputs a signal frame identified as a PTP port to the PTP frame identification unit 12A, and a signal frame identified as an NTP port to the NTP frame identification unit 12B. The PTP frame identification unit 12A is connected to the PTP master function unit 21 and the PTP time synchronization unit 13, and outputs a signal frame identified as a PTP port to the PTP master function unit 21 and the PTP time synchronization unit 13.
[0080] Next, the operations of the NTP timestamp rewriting device 9, the NTP client device 4, and the PTP slave device 10 according to the fifth embodiment will be described with reference to FIGS.
[0081] In order to synchronize the time of the NTP client device 4, the NTP client device 4 transmits a request frame including a transmission timestamp to the NTP server device 3 via the NTP timestamp rewriting device 9. The request frame from the NTP client device 4 to the NTP server device 3 is input to the input unit 11 of the NTP timestamp rewriting device 9 and identified as an NTP port by the PTP / NTP port identification unit 22. The input unit 11 is not limited to a single port and may also have multiple ports. The operation of the NTP frame identification unit 12B and subsequent units, the operation of the NTP timestamp rewriting unit 17, output control, time synchronization sequence, timestamp rewriting in the NTP format diagram, and time synchronization operation in the NTP client device 4 are all the same as in the first embodiment, so detailed description will be omitted. In the fifth embodiment, the NTP client device 4 is synchronized using PTP-synchronized time information rewritten by the NTP timestamp rewriting device 9, allowing the NTP client device 4 to achieve more accurate time synchronization than NTP time synchronization.
[0082] In a communication system 130 according to a fifth embodiment, an NTP timestamp rewriting device 9 is provided with a PTP master function unit 21, and has the function of a PTP master side using time information obtained through PTP time synchronization. As the slave side of PTP time synchronization, a PTP slave device 10 performs PTP time synchronization with the NTP timestamp rewriting device 9, which has a PTP master function. A signal frame including a PTP message is received by an input unit 11, and the frame transferred from the input unit 11 undergoes port identification by a PTP / NTP port identification unit 22 and is input to a PTP frame identification unit 12A. Following frame identification by the PTP frame identification unit 12A, the PTP message from the slave side is transferred to the PTP master function unit 21. The PTP master function unit 21 transmits a PTP message response using time information obtained through PTP time synchronization in the PTP time synchronization unit 13. The transmitted response PTP message is output to the output control unit 18, which exchanges PTP messages with the PTP slave device 10. The slave-side PTP slave device 10 synchronizes by correcting its own time information using the synchronization message transmitted from the master-side NTP timestamp rewriting device 9.
[0083] As described above, in the communication system including the PTP slave device 30 and NTP client device 4P shown in Figure 2, by replacing the PTP slave device 30 with the NTP timestamp rewriting device 9, highly accurate time synchronization is possible even for NTP client devices 4 that do not have PTP time synchronization functionality and are connected to the port of the NTP timestamp rewriting device 9, thereby achieving highly accurate time synchronization for the entire system. The ability to use multiple NTP client devices 4 that do not have PTP functionality has the effect of reducing costs. Furthermore, because the NTP timestamp rewriting device 9 also has a PTP master functionality, it also has the effect of being able to achieve PTP time synchronization with the PTP slave device 10 connected to the port.
[0084] In addition, the "time synchronization unit" in the claims corresponds to the "PTP time synchronization unit 13" in the detailed description of the invention, the "client device" in the claims corresponds to the "NTP client device 4" in the detailed description of the invention, the "Network Time Protocol server device" in the claims corresponds to the "NTP server device 3" in the detailed description of the invention, the "timestamp rewriting unit" in the claims corresponds to the "NTP timestamp rewriting unit 17" in the detailed description of the invention, and the "timestamp rewriting device" in the claims corresponds to the "NTP timestamp rewriting devices 1, 6, 7, 8, 9" in the detailed description of the invention.
[0085] 1 NTP timestamp rewriting device, 2 Grandmaster device, 3 NTP server device, 4, 4P NTP client device, 5 Network, 6, 7, 8, 9 NTP timestamp rewriting device, 10, 30 PTP slave device, 11 Input unit, 12 Frame identification unit, 12A PTP frame identification unit, 12B NTP frame identification unit, 13 PTP time synchronization unit, 14 NTP request transfer unit, 15 NTP request transfer time holding unit, 16 NTP response transfer unit, 17 NTP timestamp rewriting unit, 18 Output control unit, 19, 20 Local NTP server unit, 21 PTP master function unit, 22 PTP / NTP port identification unit, 100, 110, 120, 130 Communication system, 171 NTP request transfer time information, 172 PTP synchronization time information, 173 Pre-rewrite checksum check unit, 174 NTP timestamp rewrite processing unit, 175 Post-rewrite checksum calculation / rewriting unit, 201 PTP synchronization time information, 202 Checksum check unit, 203 Local NTP server processing unit, 204 Checksum calculation / rewriting unit
Claims
1. A communications system including a time stamp rewriting device having a time synchronization unit that acquires reference time information from a grandmaster device using a high precision time protocol; a time stamp rewriting unit that rewrites the time stamp of a response from a network time protocol server device in response to a time synchronization request using the network time protocol from a client device that is the target of time synchronization, to the reference time; and an output control unit that transmits the response with the rewritten time stamp to the client device, wherein the client device performs time synchronization based on the time stamp of the response received from the output control unit of the time stamp rewriting device.
2. A communication system according to claim 1, wherein the time synchronization unit is a slave in time synchronization based on a high precision time protocol, and acquires information about the reference time through time synchronization communication with the grandmaster device, which is the master.
3. The communication system according to claim 2, characterized in that the time stamp rewriting unit includes an NTP time stamp rewriting processing unit that relays the signal of the time synchronization communication between the client device and the Network Time Protocol server device and rewrites the time stamp of the response to the reference time, and a checksum calculation / rewriting unit that recalculates the checksum check portion of the response whose time stamp has been rewritten.
4. A communication system as described in claim 3, wherein the timestamp rewriting unit rewrites the reception timestamp of the response to the reference time acquired by the time synchronization unit when the request is received from the client device, and rewrites the transmission timestamp of the response to the reference time acquired by the time synchronization unit when the response is sent to the client device.
5. A communication system according to any one of claims 1 to 4, characterized in that the time stamp rewriting device includes the network time protocol server device within its own device.
6. A communication system according to any one of claims 1 to 4, characterized in that the time stamp rewriting device transmits a response in which the time stamp has been rewritten to a plurality of connected client devices.
7. A communication system as claimed in any one of claims 1 to 4, characterized in that the time stamp rewriting device further comprises a frame identification unit which identifies the protocol of the input signal as either the High Precision Time Protocol or the Network Time Protocol, and a slave device of the High Precision Time Protocol is connected together with the client device.
8. A communication method executed by a computer, comprising the steps of: acquiring reference time information from a grandmaster device using the High Precision Time Protocol; rewriting a timestamp of a response from a Network Time Protocol server device to a time synchronization request from a client device to be time synchronized using the Network Time Protocol to the reference time; transmitting the response with the rewritten timestamp to the client device; and the client device performing time synchronization based on the timestamp of the response with the rewritten timestamp.
9. A communications program that causes a computer to execute the steps of: acquiring reference time information from a grandmaster device using the High Precision Time Protocol; rewriting the timestamp of a response from a Network Time Protocol server device to a time synchronization request from a client device that is the target of time synchronization, to the reference time; and transmitting the response with the rewritten timestamp to the client device.
Citation Information
Patent Citations
Clock synchronizing method for NTP network and PTP network
CN102710410A
Network time protocol conversion method and system
CN108667547A