Relay device

The relay device automatically determines port connections in L2 networks to construct time distribution trees, addressing collision issues and loop formation, ensuring accurate time synchronization without manual configuration and new protocols.

WO2025158543A1PCT designated stage expired Publication Date: 2025-07-31NT T INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/001900
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

In Layer 2 (L2) networks, collisions between Precision Time Protocol (PTP) frames and Spanning Tree Protocol (STP) frames can deteriorate time distribution accuracy, and existing methods for constructing time distribution trees are cumbersome and require manual port configuration, leading to complexity and potential loop formation.

Method used

A relay device with a control unit that analyzes messages for time synchronization to automatically determine whether ports are connected to higher-level or lower-level devices, allowing for the construction of a time distribution tree without manual configuration and preventing loop formation by discarding or rerouting messages as necessary.

Benefits of technology

Enables accurate and efficient automatic construction of time distribution trees in complex networks, preventing loop formation and maintaining time synchronization accuracy without introducing new protocols, thus avoiding collisions and simplifying network management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024001900_31072025_PF_FP_ABST
    Figure JP2024001900_31072025_PF_FP_ABST
Patent Text Reader

Abstract

This relay device includes a plurality of ports and a control unit. Upon receiving a message for time synchronization through any one of the plurality of ports, the control unit determines, on the basis of the received message, whether the port that has received the message is connected to an upper device or connected to a lower device.
Need to check novelty before this filing date? Find Prior Art

Description

Relay device

[0001] The present disclosure relates to a relay device.

[0002] Conventionally, as a protocol in the layer 2 (hereinafter also referred to as "L2") network of the OSI reference model, the Spanning Tree Protocol (STP) is known (see Non-Patent Document 1). STP is a control method for preventing data traffic from continuously circulating in an L2 network formed in a loop, that is, a control method for making data traffic acyclic. By using STP, a distribution tree in which data traffic becomes acyclic can be constructed by designating a port that becomes a point for blocking data transfer.

[0003] “IEEE 802.1D-2004 IEEE Standard for Local and metropolitan area networks: Media Access Control (MAC) Bridges”, [online], [searched on January 9, 2023], Internet <https: / / ieeexplore.ieee.org / document / <1309630>

[0004] By the way, as a protocol for communication devices to perform time synchronization on a network, the Precision Time Protocol (PTP) is known. There are cases where PTP frames such as Sync messages in this PTP and STP frames such as BPDU (Bridge Protocol Data Unit) in STP collide in the L2 network. When a PTP frame and an STP frame collide, the time distribution accuracy by PTP may deteriorate. Therefore, a method for automatically constructing a time distribution tree is desired.

[0005] An object of the present disclosure made in view of such a point is to automatically construct a time distribution tree.

[0006] ​A relay device according to one embodiment of the present disclosure comprises: a plurality of ports; and a control unit that, when receiving a message for time synchronization via any one of the plurality of ports, determines, based on the received message, whether the port that received the message is connected to a higher-level device or a lower-level device.

[0007] According to an embodiment of the present disclosure, a time distribution tree can be automatically constructed.

[0008] FIG. 1 is a diagram illustrating a schematic configuration of a time distribution system according to a first embodiment of the present disclosure. FIG. 2 is a diagram illustrating messages transmitted and received between a master and a slave. FIG. 3 is a diagram illustrating an upper port and a lower port. FIG. 4 is a block diagram of the relay device shown in FIG. 1. FIG. 5 is a flowchart illustrating the operation of the relay device according to the first embodiment of the present disclosure. FIG. 6 is a diagram illustrating a relay device according to a comparative example. FIG. 7 is a flowchart illustrating the operation of the relay device according to a second embodiment of the present disclosure. FIG. 8 is a flowchart illustrating the operation of the relay device according to the second embodiment of the present disclosure. FIG. 9 is a flowchart illustrating the operation of the relay device according to a third embodiment of the present disclosure. FIG. 10 is a flowchart illustrating the operation of the relay device according to a fourth embodiment of the present disclosure.

[0009] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.

[0010] First Embodiment As shown in Fig. 1, a time distribution system 1 according to a first embodiment of the present disclosure includes a time source 10, a relay device 20, and a receiving device 30. The time distribution system 1 can construct a time distribution network. The time distribution network is a network for distributing time information. The time distribution system 1 employs PTP as a protocol.

[0011] The time source 10 , the relay device 20 , and the receiving device 30 are connected via an L2 network 2 .

[0012] The time source 10 is a source of time information in the time distribution network. The time source 10 is, for example, a Grandmaster Clock (GMC) in PTP. The time source 10 generates time information. The time source 10 transmits the generated time information as a time signal to a relay device 20 connected to the time source 10 via an L2 network 2.

[0013] The relay device 20 includes a plurality of ports 21. The relay device 20 is connected to a higher-level device via one of the plurality of ports 21. The relay device 20 is also connected to a lower-level device via another of the plurality of ports 21.

[0014] The upper device is the relay device 20 connected to the time source 10 side among the other relay devices 20 connected to the relay device 20. However, if the time source 10 is connected to the relay device 20, the upper device becomes the time source 10. Here, in the time distribution network, a time signal, i.e., time information, is transmitted from the upper device to the lower device. If there are multiple upper devices for the relay device 20, the relay device 20 will not be able to determine which of the time information transmitted from the multiple upper devices is correct. Therefore, one upper device is set for one relay device 20.

[0015] A lower-level device is a relay device 20 that is connected to the receiving device 30 side among other relay devices 20 connected to the relay device 20. However, when a receiving device 30 is connected to the relay device 20, the lower-level device becomes the receiving device 30. Multiple lower-level devices may be set for one relay device 20.

[0016] The relay device 20 receives a time signal from a higher-level device via port 21. The relay device 20 corrects the time information that is the received time signal. The relay device 20 transmits the corrected time signal to a lower-level device via port 21. The relay device 20 is, for example, a boundary clock (BC) in PTP.

[0017] The receiving device 30 receives the time signal from the relay device 20. The receiving device 30 may only receive the time signal. In other words, the receiving device 30 does not need to redistribute the time signal. The receiving device 30 is, for example, an OC (Ordinary Clock) in PTP. The receiving device 30 is also called a "slave" or a "client device."

[0018] In a time distribution network employing PTP, predetermined time synchronization messages are transmitted and received between a master and a slave for time synchronization. This will be described with reference to FIG. 2. As shown in FIG. 2, from the perspective of the relay device 20, a higher-level device is the "master," and the relay device 20 is the "slave." Also, from the perspective of the relay device 20, a lower-level device is the "slave," and the relay device 20 is the "master." In this embodiment, two-step mode is employed as the PTP operation mode. However, one-step mode may also be employed as the PTP operation mode.

[0019] As shown in Fig. 2, in PTP, a Sync message is sent from a master to a slave. When the master is a higher-level device than the relay device 20, the Sync message includes, for example, a timestamp T1. In this case, the relay device 20, which is the slave, stores the time T2 when it received the Sync message. Also, when the master is the relay device 20, the Sync message includes, for example, a timestamp T5. In this case, the lower-level device, which is the slave, stores the time T6 when it received the Sync message. After the Sync message is sent, a Follow-up message is sent from the master to the slave.

[0020] As shown in Fig. 2, in PTP, a Delay_Request message is transmitted from a slave to a master. When the slave is a relay device 20, the Delay_Request message includes, for example, a timestamp T3. In this case, the upper device, which is the master, stores the time T4 when the Delay_Request message is received. When the slave is a lower device, the Delay_Request message includes, for example, a timestamp T7. In this case, the relay device 20, which is the master, stores the time T8 when the Delay_Request message is received.

[0021] As shown in FIG. 2, in PTP, a Delay_Response message is sent from the master to the slave.

[0022] In this way, in PTP, messages for time synchronization transmitted and received between the master and slave are predetermined. Therefore, by analyzing the time synchronization message received via port 21, relay device 20 determines whether port 21 is connected to a master, i.e., a higher-level device, or a slave, i.e., a lower-level device, from the perspective of relay device 20.

[0023] Hereinafter, among the multiple ports 21 provided in the relay device 20, a port 21 connected to a higher-level device will be referred to as an "upper-level port." Also, among the multiple ports 21 provided in the relay device 20, a port 21 connected to a lower-level device will be referred to as a "lower-level port."

[0024] 3, when the relay device 20 receives a Sync message, a Follow-up message, or a Delay_Response message via port 21, it determines that port 21 is an upper port. Also, when the relay device 20 receives a Delay_Request message via port 21, it determines that port 21 is a lower port.

[0025] In this way, the relay device 20 determines whether the port 21 is an upper port or a lower port. With this configuration, a time distribution tree can be automatically constructed.

[0026] Hereinafter, a message for time synchronization transmitted from a master to a slave, i.e., a message for time synchronization transmitted from upstream to downstream in the time distribution network, will also be referred to as a "first message." In the examples shown in FIGS. 2 and 3, the first message includes at least one of a Sync message, a Follow-up message, and a Delay_Response message. The first message may include an Announce message, which will be described later. Furthermore, a message for time synchronization transmitted from a slave to a master, i.e., a message for time synchronization transmitted from downstream to upstream in the time distribution network, will also be referred to as a "second message." In the examples shown in FIGS. 2 and 3, the second message is a Delay_Request message. Hereinafter, when there is no particular distinction between the first message and the second message, they will also be simply referred to as a "message."

[0027] 4, the relay device 20 includes ports 21-1, 21-2, ..., 21-n (n is an integer satisfying 2≦n) as a plurality of ports 21. The relay device 20 further includes a control unit 22 and a storage unit 27.

[0028] The port 21 is connected to a higher-level device or a lower-level device. The relay device 20 receives a message from the higher-level device or the lower-level device via the port 21. The port 21 is registered as a higher-level port or a lower-level port by a process described below. Before being registered as a higher-level port or a lower-level port, the port 21 can receive both a first message and a second message.

[0029] The control unit 22 includes at least one processor, at least one programmable circuit, at least one dedicated circuit, or any combination thereof. The processor is a general-purpose processor such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP), or a dedicated processor specialized for a specific process. The programmable circuit is, for example, a field-programmable gate array (FPGA). The dedicated circuit is, for example, an application-specific integrated circuit (ASIC). The control unit 22 controls each unit of the relay device 20 and executes processes related to the operation of the relay device 20.

[0030] The control unit 22 includes an analysis unit 23 , a determination unit 24 , a first setting unit 25 , and a second setting unit 26 .

[0031] The analysis unit 23 receives a message from a higher-level device or a lower-level device via the port 21. The analysis unit 23 analyzes the content of the received message. The analysis unit 23 outputs the analysis result of the message content to the determination unit 24.

[0032] The determination unit 24 receives the analysis result of the message content from the analysis unit 23. Based on the analysis result of the message content, the determination unit 24 determines the attribute of the port 21 that received the message. The attribute of the port 21 indicates whether the port 21 is an upper port or a lower port.

[0033] When the determination unit 24 determines the attribute of the port 21, it outputs the attribute information of the port 21 to the first setting unit 25 and the second setting unit 26. Furthermore, when the determination unit 24 determines the attribute of the port 21, it reflects the determination result of the attribute of the port 21 in the holding table 28 of the storage unit 27.

[0034] The first setting unit 25 sets the upper port. For example, attribute information of the port 21 is input to the first setting unit 25 from the determination unit 24. The first setting unit 25 identifies the port 21 that has been determined to be the upper port by the determination unit 24 based on the attribute information of the port 21. The first setting unit 25 sets the identified port 21 as the upper port.

[0035] The second setting unit 26 sets a downstream port. For example, attribute information of the port 21 is input to the second setting unit 26 from the determination unit 24. The second setting unit 26 identifies the port 21 that has been determined to be a downstream port by the determination unit 24 based on the attribute information of the port 21. The second setting unit 26 sets the identified port 21 as a downstream port.

[0036] The storage unit 27 includes at least one semiconductor memory, at least one magnetic memory, at least one optical memory, or any combination thereof. The semiconductor memory is, for example, a random access memory (RAM), a read-only memory (ROM), or a flash memory. The RAM is, for example, a static random access memory (SRAM) or a dynamic random access memory (DRAM). The ROM is, for example, an electrically erasable programmable read-only memory (EEPROM). The flash memory is, for example, a solid-state drive (SSD). The magnetic memory is, for example, a hard disk drive (HDD). The storage unit 27 functions as, for example, a main storage device, an auxiliary storage device, or a cache memory. The storage unit 27 stores data used in the operation of the relay device 20 and data obtained by the operation of the relay device 20. For example, the storage unit 27 stores at least one of a system program, an application program, and embedded software.

[0037] The storage unit 27 stores a retention table 28. The retention table 28 is a table for retaining port attribute information of the ports 21. For example, the retention table 28 includes information on the ports 21 registered as upper ports and information on the ports 21 registered as lower ports.

[0038] FIG. 5 is a flowchart showing the operation of the relay device 20 according to the first embodiment of the present disclosure.

[0039] The control unit 22 determines whether any of the multiple ports 21 has received the first message (step S1). If the control unit 22 determines that any of the multiple ports 21 has received the first message (step S1: YES), the control unit 22 proceeds to the processing of step S2. If the control unit 22 does not determine that any of the multiple ports 21 has received the first message (step S1: NO), the control unit 22 executes the processing of step S1 again.

[0040] In the process of step S2, the control unit 22 determines whether or not a message with the same content as the first message received in the process of step S1 has been received previously. As an example of the process of step S2, the analysis unit 23 analyzes the content of the first message to obtain the identifier and domain number of the time source 10 that is the sender of the first message. The analysis unit 23 determines whether or not a message with the same content as the first message has been received previously by referring to the identifier and domain number of the time source 10.

[0041] If the control unit 22 determines that a message with the same content as the first message received in the process of step S1 has been previously received (step S2: YES), the control unit 22 proceeds to the process of step S5. On the other hand, if the control unit 22 does not determine that a message with the same content as the first message received in the process of step S1 has been previously received (step S2: NO), the control unit 22 proceeds to the process of step S3.

[0042] In the processing of step S3, the determination unit 24 determines that the port 21 that received the first message in the processing of step S1 is an upper port. The determination unit 24 registers the port 21 that it determined to be an upper port as an upper port. The determination unit 24 also determines, among the multiple ports 21, the ports 21 other than the port 21 that received the first message as lower ports. The determination unit 24 registers the port 21 that it determined to be a lower port as a lower port. The determination unit 24 reflects the registration results of the ports 21 in the holding table 28 of the memory unit 27.

[0043] By the processing of step S3, one of the ports 21 that received the first message is registered as an upper port. Here, there are cases where the relay device 20 is unable to perform time synchronization with multiple time sources 10 at a certain moment. By registering only one port 21 as an upper port, the relay device 20 can reliably perform time synchronization with one time source 10.

[0044] In the process of step S4, the control unit 22 broadcasts the first message received in the process of step S1 from the lower port. After the process of step S4, the control unit 22 returns to the process of step S1.

[0045] In the process of step S5, the determination unit 24 refers to the holding table 28 in the storage unit 27 and checks the attributes of the port 21 that received the first message in the process of step S1. That is, the determination unit 24 refers to the holding table 28 and checks whether the port 21 that received the first message is registered as an upper port or a lower port. Here, there are cases where the attributes of the port 21 that received the first message are not registered in the holding table 28 due to an error or the like. In this case, the determination unit 24 treats the port 21 that received the first message as being in an unregistered state.

[0046] In the process of step S6, the determining unit 24 determines, based on the process result of step S5, whether or not the port 21 that received the first message in the process of step S1 is registered as an upper port.

[0047] If the determination unit 24 determines in step S1 that the port 21 that received the first message is registered as an upper port (step S6: YES), the process proceeds to step S7. In step S7, the control unit 22 broadcasts the first message received in step S1 from a lower port. If the port 21 that received the first message is registered as an upper port in this way, there is no need to change the attributes of the port 21 that received the first message. This is because, in the current process of step S1, it is considered that the port 21 registered as an upper port has simply received the first message again. Therefore, if the port 21 that received the first message is registered as an upper port, the first message is broadcast from a lower port without changing the attributes of the port 21. After the process of step S7, the control unit 22 returns to the process of step S1.

[0048] If the determining unit 24 does not determine in step S1 that the port 21 that received the first message is registered as an upper port (step S6: NO), the process proceeds to step S8.

[0049] In the process of step S8, the determination unit 24 determines, based on the process result of step S5, whether the port 21 that received the first message in the process of step S1 is registered as a downstream port or is unregistered.

[0050] If the determination unit 24 determines that the port 21 that received the first message is registered as a lower port (step S8: YES), the process proceeds to step S9. In step S9, the control unit 22 discards the first message received in step S1. Here, if the port 21 that received the first message is registered as a lower port, it is considered that another port 21 has already been registered as an upper port by previously receiving the first message. Therefore, the determination unit 24 does not change the attribute of the port 21 that received the first message to an upper port in step S1. Furthermore, it is considered that the first message received in step S1 was transmitted to this relay device 20 via another relay device 20. Therefore, the control unit 22 discards the first message. This configuration prevents the route for distributing the time signal from continuing to circulate. After step S9, the control unit 22 returns to step S1.

[0051] If the determination unit 24 does not determine that the port 21 that received the first message is registered as a lower port, that is, if it determines that the port 21 is in an unregistered state (step S8: NO), the process proceeds to step S10. In the process of step S10, the determination unit 24 determines that the port 21 that received the first message in the process of step S1 is an upper port. The determination unit 24 registers the port 21 that it determined to be an upper port as an upper port. Furthermore, the determination unit 24 determines that, among the multiple ports 21, the ports 21 other than the port 21 that received the first message are lower ports. The determination unit 24 registers the port 21 that it determined to be a lower port as a lower port. The determination unit 24 reflects the registration result of the port 21 in the holding table 28 of the memory unit 27.

[0052] In the process of step S11, the control unit 22 broadcasts the first message received in the process of step S1 from the lower port. After the process of step S11, the control unit 22 returns to the process of step S1.

[0053] In the process of step S9 described above, the control unit 22 discards the first message received in the process of step S1. However, instead of discarding the first message, the control unit 22 may send a message unnecessary notification to the sender of the first message via the port 21. The message unnecessary notification is a message notifying the relay device 20 that it is unnecessary to send the first message. With this configuration, the sender of the first message can understand that the relay device 20 does not need to send the first message, and can avoid sending the first message to the relay device 20.

[0054] Furthermore, the processes of steps S10 and S11 described above are provided from a fail-safe perspective. That is, the processes of steps S10 and S11 are provided assuming a case where the port 21 that received the first message in the process of step S5 is not registered due to an error or the like, and its attribute information cannot be confirmed. Therefore, the processes of steps S10 and S11 do not need to be provided. If the processes of steps S10 and S11 are not provided, the determination unit 24 may determine in the process of step S6 whether the port 21 that received the first message is registered as an upper port or a lower port. If the determination unit 24 determines that the port 21 is registered as a lower port (step S6: NO), the determination unit 24 may proceed to the process of step S9.

[0055] Here, to explain the effects of the relay device 20 according to this embodiment, a relay device 20X according to a comparative example will be described. The relay device 20X according to the comparative example is shown on the left side of FIG. 6. The relay device 20 according to this embodiment is shown on the right side of FIG. 6. The time distribution system 1 may have a configuration in which a time source 10, relay devices 20 and 20X, and a receiving device 30 are connected in series as shown in FIG. 6. In the configuration shown in FIG. 6, the relay devices 20 and 20X have multiple ports 21, namely ports 21-1, 21-2, 21-3, and 21-4. Ports 21-1 and 21-2 are connected to the time source 10, i.e., the higher-level device. Ports 21-3 and 21-4 are connected to the receiving device 30, i.e., the lower-level device.

[0056] In the comparative example, it is assumed that the relay device 20X receives the first message via port 21-1. In this case, it is desirable for the relay device 20X to forward the first message from ports 21-3 and 21-4. However, in the comparative example, the relay device 20X forwards the first message from ports 21-2, 21-3, and 21-4. In the configuration shown in FIG. 6, the first message forwarded from port 21-2 is only sent to the time source 10. Therefore, forwarding the first message from port 21-2 does not pose any particular problem in the configuration shown in FIG. 6. However, in a configuration more complex than the configuration shown in FIG. 6, such as the complex configuration shown in FIG. 1, if the first message is forwarded from port 21-2, a loop may be formed in which time information is continuously distributed. Furthermore, the relay device 20 may receive the first message from the time source 10 via port 21-2.

[0057] In contrast, when the relay device 20 according to this embodiment receives a first message via port 21-1, it determines that port 21-1 is an upper port and that ports 21-2 to 21-4 are lower ports. Furthermore, the relay device 20 broadcasts the first message from the lower ports. Even if the relay device 20 forwards the first message from port 21-2, as described above, there is no particular problem in the configuration shown in FIG. 6 . Furthermore, in a more complex configuration than the configuration shown in FIG. 6 , such as the configuration shown in FIG. 1 , the first message forwarded from port 21-2 is forwarded to another relay device 20 that is a higher-level device of the relay device 20. Furthermore, since the other higher-level relay device 20 receives the first message from a lower port, it discards the first message. As a result, this embodiment can prevent the formation of a loop in which time information is continuously distributed. Furthermore, even if the relay device 20 receives a first message from the time source 10 via port 21-2, it can discard the first message after it has been determined that port 21-2 is a lower-level port.

[0058] Furthermore, in conventional time distribution networks that use PTP, when constructing a time distribution tree, the network administrator or designer must specify each of the multiple ports of a relay device as an upper port or a lower port. As the time distribution network becomes more complex, it becomes difficult to easily determine whether each of the multiple ports of a relay device should be set as an upper port or a lower port. Furthermore, the network administrator or designer must make appropriate settings for each of the multiple ports.

[0059] In contrast, when the relay device 20 according to this embodiment receives the first message via a port 21, it determines that the port 21 that received the first message is an upper port, and determines that the other ports 21 are lower ports. With this configuration, according to this embodiment, it is possible to automatically construct a time distribution tree without taking into account the physical connection configuration of the multiple relay devices 20, etc.

[0060] Furthermore, in this embodiment, there is no need to adopt a new protocol for time synchronization that is different from PTP. Therefore, there is no risk of collision between PTP frames and frames of the new protocol. As a result, it is possible to prevent a decrease in the accuracy of time distribution.

[0061] Second Embodiment A relay device according to a second embodiment may have the same or similar configuration as the relay device 20 according to the first embodiment, as shown in Fig. 4. Therefore, the second embodiment will be described with reference to Fig. 4.

[0062] In the first embodiment, when the determination unit 24 receives the first message, it determines whether each of the multiple ports 21 of the relay device 20 is an upper port or a lower port based on the received first message.

[0063] In the second embodiment, when the determination unit 24 receives a first message, it provisionally registers the port 21 that received the first message as an upper port, and provisionally registers the ports 21 other than the port that received the first message as lower ports. Furthermore, when a port provisionally registered as a lower port receives a second message, the determination unit 24 officially registers the port 21 provisionally registered as an upper port as an upper port, and officially registers the port 21 provisionally registered as a lower port as a lower port. With this configuration, it is possible to more accurately determine whether each of the multiple ports 21 of the relay device 20 is an upper port or a lower port.

[0064] 7 and 8 are flowcharts showing the operation of the relay device 20 according to the second embodiment of the present disclosure.

[0065] The control unit 22 determines whether any of the multiple ports 21 has received a message (step S21). If the control unit 22 determines that any of the multiple ports 21 has received a message (step S21: YES), the control unit 22 proceeds to the process of step S22. If the control unit 22 does not determine that any of the multiple ports 21 has received a message (step S21: NO), the control unit 22 executes the process of step S21 again.

[0066] In the process of step S22, the control unit 22 determines whether the message received in the process of step S21 is the first message. If the control unit 22 determines that the received message is the first message (step S22: YES), the control unit 22 proceeds to the process of step S23. If the control unit 22 determines that the received message is not the first message, that is, if the received message is the second message (step S22: NO), the control unit 22 proceeds to the process of step S33 shown in FIG. 8.

[0067] In the process of step S23, the control unit 22 determines whether or not a message with the same content as the first message received in the process of step S21 has been previously received. The control unit 22 may execute the process of step S23 in the same manner as or similar to the process of step S2 described above. If the control unit 22 determines that a message with the same content as the first message received in the process of step S21 has been previously received (step S23: YES), the control unit 22 proceeds to the process of step S26. If the control unit 22 does not determine that a message with the same content as the first message received in the process of step S21 has been previously received (step S23: NO), the control unit 22 proceeds to the process of step S24.

[0068] In the process of step S24, the determination unit 24 provisionally registers the port 21 that received the first message in the process of step S21 as an upper port. The determination unit 24 also provisionally registers the ports 21 other than the port 21 that received the first message among the multiple ports 21 as lower ports. The determination unit 24 reflects the results of the provisional registration of the ports 21 in the holding table 28 of the storage unit 27.

[0069] In the process of step S25, the control unit 22 broadcasts the first message received in the process of step S11 from the provisionally registered or permanently registered lower port. After the process of step S25, the control unit 22 returns to the process of step S21.

[0070] In the process of step S26, the determination unit 24 refers to the holding table 28 in the storage unit 27 and checks the attributes of the port 21 that received the first message in the process of step S21. That is, the determination unit 24 refers to the holding table 28 and checks whether the port 21 that received the first message is provisionally registered or registered as an upper port, or whether it is provisionally registered or registered as a lower port. Here, there are cases where the attributes of the port 21 that received the first message are not registered in the holding table 28 due to an error or the like. In this case, the determination unit 24 treats the port 21 that received the first message as being in an unregistered state.

[0071] In the process of step S27, the determination unit 24 determines, based on the process result of step S26, whether the port 21 that received the first message in the process of step S21 has been provisionally registered or registered as an upper port.

[0072] If the determination unit 24 determines in the process of step S21 that the port 21 that received the first message is provisionally registered or registered as an upper port (step S27: YES), the process proceeds to step S28. The control unit 22 executes the process of step S28 in the same manner as or similar to the process of step S25. If the determination unit 24 does not determine in the process of step S21 that the port 21 that received the first message is provisionally registered or registered as an upper port (step S27: NO), the process proceeds to step S29.

[0073] In the process of step S29, the determination unit 24 determines, based on the process result of step S26, whether the port 21 that received the first message in the process of step S21 is provisionally registered or registered as a downstream port.

[0074] If the determination unit 24 determines in the process of step S21 that the port 21 that received the first message is provisionally registered or registered as a lower port (step S29: YES), the process proceeds to step S30. If the determination unit 24 does not determine in the process of step S21 that the port 21 that received the first message is provisionally registered or registered as a lower port, that is, if the determination unit 24 determines that the port 21 is in an unregistered state (step S29: NO), the process proceeds to step S31.

[0075] In the process of step S30, the determination unit 24 discards the first message received in the process of step S21 in the same or similar manner as the process of step S9. Also, as described above in the process of step S9, if the port 21 that received the first message is provisionally registered or registered as a lower port, it is considered that another port 21 has previously received the first message and therefore provisionally registered or registered as an upper port. Therefore, the determination unit 24 does not change the attribute of the port 21 that received the first message to an upper port in the process of step S21. After the process of step S30, the control unit 22 returns to the process of step S21.

[0076] In the process of step S31, the determination unit 24 provisionally registers the port 21 that received the first message in the process of step S21 as an upper port. The determination unit 24 also provisionally registers the ports 21 other than the port 21 that received the first message among the multiple ports 21 as lower ports. The determination unit 24 reflects the results of the provisional registration of the ports 21 in the holding table 28 of the storage unit 27.

[0077] In the process of step S32, the control unit 22 broadcasts the first message received in the process of step S11 from the provisionally registered or permanently registered lower port. After the process of step S32, the control unit 22 returns to the process of step S21.

[0078] 8 , the determination unit 24 refers to the holding table 28 in the storage unit 27 and checks the attributes of the port 21 that received the second message in the processing of step S21. That is, the determination unit 24 refers to the holding table 28 and checks whether the port 21 that received the second message is provisionally registered or registered as an upper port, or whether it is provisionally registered or registered as a lower port. Here, there are cases where the attributes of the port 21 that received the second message are not registered in the holding table 28 due to an error or the like. In this case, the determination unit 24 treats the port 21 that received the second message as being in an unregistered state.

[0079] In the process of step S34, the determination unit 24 determines, based on the process result of step S33, whether the port 21 that received the second message in the process of step S21 has been provisionally registered or registered as an upper port. If the determination unit 24 determines that the port 21 that received the second message has been provisionally registered or registered as an upper port (step S34: YES), the process proceeds to step S35. If the determination unit 24 does not determine that the port 21 that received the first message has been provisionally registered or registered as an upper port (step S34: NO), the process proceeds to step S36.

[0080] In the process of step S35, the control unit 22 executes abnormality processing. Here, if the port 21 that received the second message in the process of step S21 is provisionally registered or registered as an upper port, it is presumed that an abnormality has occurred in the time distribution network. Therefore, the control unit 22 executes abnormality processing. As an example of the abnormality processing, the control unit 22 may issue an alert or execute initialization of the relay device 20. After the process of step S35, the control unit 22 returns to the process of step S21.

[0081] In the process of step S36, the determination unit 24 determines, based on the process result of step S33, whether the port 21 that received the second message in the process of step S21 has been provisionally registered or registered as a lower port. If the determination unit 24 determines that the port 21 that received the second message has been provisionally registered or registered as a lower port (step S36: YES), the process proceeds to step S37. If the determination unit 24 does not determine that the port 21 that received the second message has been provisionally registered or registered as a lower port, that is, if the determination unit 24 determines that the port 21 is in an unregistered state (step S36: NO), the process proceeds to step S40.

[0082] In the process of step S37, the determination unit 24 determines whether the port 21 that received the second message in the process of step S21 is provisionally registered as a lower port, based on the process result of step S33. If the determination unit 24 determines that the port 21 that received the second message is provisionally registered as a lower port (step S37: YES), the process proceeds to the process of step S38. If the determination unit 24 does not determine that the port 21 that received the second message is provisionally registered as a lower port, that is, if the determination unit 24 determines that the port 21 that received the second message is officially registered (step S37: NO), the process proceeds to the process of step S39.

[0083] In the process of step S38, the determination unit 24 officially registers the port 21 that received the second message as a lower port. Furthermore, if the upper port is provisionally registered, the determination unit 24 officially registers the port 21 provisionally registered as the upper port as the upper port. The determination unit 24 reflects the result of the official registration of the port 21 in the holding table 28 of the storage unit 27.

[0084] In the process of step S39, the control unit 22 executes normal processing. Here, if the port 21 that received the second message is registered as a lower port, it is presumed that the time distribution network is normal. Therefore, the control unit 22 executes normal processing. After the process of step S39, the control unit 22 returns to the process of step S21.

[0085] In the process of step S40, the control unit 22 executes abnormality processing. If the port 21 that received the second message is in an unregistered state despite having received the second message, it is considered that the relay device 20 did not receive the first message. In this case, it is estimated that an abnormality has occurred in the time distribution network. Therefore, the control unit 22 executes abnormality processing. The control unit 22 may execute processing that is the same as or similar to the processing of step S35. After the processing of step S40, the control unit 22 returns to the processing of step S21.

[0086] While repeatedly executing the processes of steps S21 to S40, the control unit 22 may stop the transfer of the first message from a certain port 21 if that port 21 remains in the provisionally registered state for a predetermined time. The predetermined time may be set based on the scale of the time distribution system 1. If a certain port 21 remains in the provisionally registered state for a predetermined time, it is highly likely that no lower-level device is connected to that port 21. Therefore, by stopping the transfer of the first message from a port 21 that remains in the lower-level registered state for a predetermined time, unnecessary time signal traffic can be suppressed.

[0087] (Third embodiment) A relay device according to a third embodiment may have the same or similar configuration as the relay device 20 according to the first embodiment as shown in Fig. 4. Therefore, the third embodiment will be described with reference to Fig. 4.

[0088] Even if time information, i.e., a time signal, is transmitted from one time source 10, it may be received by the relay device 20 via different routes. For example, a time signal may be transmitted from the time source 10 to the relay device 20 via routes R1 and R2. Route R1: Time source 10 → relay device 20 Route R2: Time source 10 → relay device 20A → relay device 20B → relay device 20 The relay devices 20A and 20B on route R2 are other relay devices 20.

[0089] In route R1, the time signal is transmitted directly from the time source 10 to the relay device 20. In route R2, unlike route R1, the time signal is transmitted from the time source 10 to the relay device 20 via relay devices 20A and 20B. That is, route R2 passes through more relay devices 20 than route R1. In the examples of routes R1 and R2, the relay device 20 includes a port 21 connected to the time source 10 in route R1 and a port 21 connected to the relay device 20B in route R2. The time signal received by the relay device 20 via the port 21 connected to the relay device 20B in route R2 is more degraded than the time signal received by the relay device 20 via the port 21 connected to the time source 10 in route R1. In other words, receiving a time signal at the relay device 20 via the port 21 connected to the time source 10 in route R1 enables more accurate time synchronization than receiving a time signal via the port 21 connected to the relay device 20Y in route R2.

[0090] Therefore, in the third embodiment, when a port 21 determined to be connected to a lower-level device newly receives a first message (step S8: YES), as shown in FIG. 5 , the determination unit 24 executes a process different from that of the first embodiment. Specifically, the determination unit 24 determines whether the port 21 that newly received the first message is capable of more accurate time synchronization than the port 21 that previously received the first message. Furthermore, if the port 21 that newly received the first message is capable of more accurate time synchronization than the port 21 that previously received the first message, the determination unit 24 changes the determination result when the port 21 determined to be connected to a lower-level device is connected to a higher-level device. This configuration enables a more accurate time distribution tree to be constructed. This process will be described with reference to FIG. 9 .

[0091] 9 is a flowchart illustrating the operation of the relay device 20 according to the third embodiment of the present disclosure. When the determination unit 24 determines that the port 21 that received the first message in FIG. 5 is registered as a lower port (step S8: YES), the process proceeds to step S41.

[0092] In the processing of step S41, the discrimination unit 24 determines whether the port 21 that newly received the first message in the processing of step S1 shown in Figure 5 is capable of time synchronization with higher accuracy than the port 21 that previously received the first message.

[0093] As an example of the processing of step S41, the determination unit 24 may use an Announce message. The Announce message is one of the messages transmitted and received using PTP. The Announce message is used to complement the information of the Sync message. This Announce message has a field that indicates priority. In this field, parameters called Priority 1 and Priority 2 that can be freely specified by the user can be set. As an example of Priority 1, Priority 1 of the time source 10 may be set to an initial value such as "10", and a fixed value such as "1" may be added to Priority 1 each time the signal passes through another relay device 20. As another example of Priority1, Priority1 of the time source 10 may be set to an initial value such as "10," and a set value determined based on the transmission distance or the maximum error in the time information that the relay device 20 can correct may be added to Priority1. For example, if the other relay device 20 is a BC (Boundary Clock) device corresponding to Class A, an error of 100 [ns] may occur. For example, if the other relay device 20 is a device corresponding to Class B, an error of 70 [ns] may occur. Therefore, this set value may be set to "70." The determination unit 24 may determine that the smaller Priority1 is, the higher the priority. The determination unit 24 may determine that the port 21 that received the Announce message with Priority1, which has a higher priority, is capable of time synchronization with a higher degree of accuracy. Announce messages may be transmitted and received at any timing. The transmission and reception of Announce messages may be performed simultaneously with the transmission and reception of Sync messages. Since Announce messages are used to complement the information of Sync messages, the frequency of transmission and reception of Announce messages may be lower than the frequency of transmission and reception of Sync messages.

[0094] If the determination unit 24 determines that the port 21 that newly received the first message is capable of more accurate time synchronization than the port 21 that previously received the first message (YES in step S41), the process proceeds to step S42. On the other hand, if the determination unit 24 does not determine that the port 21 that newly received the first message is capable of more accurate time synchronization than the port 21 that previously received the first message (NO in step S41), the process proceeds to step S43.

[0095] In the process of step S42, the determination unit 24 changes the attribute of the port 21 that newly received the first message in the process of step S1 from a lower port to an upper port. That is, the determination unit 24 changes the determination result when the port 21, which was determined to be connected to a lower device, is connected to an upper device. The determination unit 24 also changes the attribute of the port 21 that was registered as an upper port due to the previous reception of the first message to a lower port. The determination unit 24 reflects the change in the attribute of the port 21 in the retention table 28 of the storage unit 27. Here, in the example of the above-mentioned routes R1 and R2, it is assumed that the previously received first message was transmitted from the time source 10 to the relay device 20 via route R2, and the newly received first message was transmitted from the time source 10 to the relay device 20 via route R1. In this case, the process of step S42 allows the relay device 20 to switch the upper port from the port 21 connected to route R2 to the port 21 connected to route R1.

[0096] In the process of step S43, the determination unit 24 discards the first message received in the process of step S1 in the same or similar manner as in the process of step S9. Furthermore, as described above, the determination unit 24 does not change the attribute of the port 21 that received the first message in the process of step S1 to an upper port. After the process of step S43, the control unit 22 returns to the process of step S1.

[0097] (Fourth embodiment) A relay device according to a fourth embodiment may have the same or similar configuration as the relay device 20 according to the first embodiment as shown in Fig. 4. Therefore, the fourth embodiment will be described with reference to Fig. 4.

[0098] In the first embodiment, as described above with reference to Figure 5, if the discrimination unit 24 determines that the port 21 that received the first message is registered as a lower port (step S8: YES), the control unit 22 discards the first message (step S9).

[0099] In the fourth embodiment, after the control unit 22 discards the first message (step S9), the determination unit 24 pre-registers the port 21 that received the first message as an upper port. Furthermore, if reception of the first message via the port 21 registered as an upper port is interrupted for a predetermined period of time or longer, the determination unit 24 registers the port 21 pre-registered as an upper port as an upper port. This configuration makes it possible to respond even if the distribution path of time information is changed. It also makes it possible to provide a time distribution system 1 with excellent redundancy. This process will be described with reference to FIG. 10.

[0100] 10 is a flowchart showing the operation of the relay device 20 according to the fourth embodiment of the present disclosure. After discarding the first message in the process of step S9 shown in FIG. 5, the control unit 22 proceeds to the process of step S51.

[0101] In the process of step S51, the determination unit 24 pre-registers the port 21 that received the first message in the process of step S1 as an upper port. The determination unit 24 reflects the pre-registration result of the port 21 in the holding table 28 of the storage unit 27.

[0102] In the process of step S52, the control unit 22 transmits, via the port 21, a notification that the message is unnecessary to the sender of the first message received in the process of step S1.

[0103] After the process of step S52, the control unit 22 returns to the process of step S1 shown in Fig. 5. Furthermore, the control unit 22 proceeds to the process of step S53 in parallel with the flow shown in Fig. 5.

[0104] In the process of step S53, the determination unit 24 determines whether reception of the first message via the port 21 registered as the upper port has been interrupted for a predetermined time or longer. If the determination unit 24 determines that reception of the first message via the port 21 registered as the upper port has been interrupted for a predetermined time or longer (step S53: YES), the process proceeds to step S54. If the determination unit 24 does not determine that reception of the first message via the port 21 registered as the upper port has been interrupted for a predetermined time or longer (step S53: NO), the process of step S53 is executed again.

[0105] In the process of step S54, the determining unit 24 changes the port 21 registered as an upper port to an unregistered state. The determining unit 24 reflects this change of the port 21 in the holding table 28 of the storage unit 27.

[0106] In the process of step S55, the determination unit 24 registers the port 21 that has been pre-registered as an upper port as the upper port. If there are multiple ports 21 that have been pre-registered as an upper port, the determination unit 24 may register any one of the multiple ports 21 that have been pre-registered as an upper port as the upper port. The determination unit 24 may select the port 21 to be registered as the upper port according to a priority based on the time synchronization accuracy information. The determination unit 24 reflects the registration result of the port 21 in the holding table 28 of the storage unit 27.

[0107] In the process of step S56, control unit 22 transmits a message resumption notification to the upper device via port 21 newly registered as an upper port in the process of step S55. The message resumption notification is a notification requesting the relay device 20 to resume transmission of the first message. With this configuration, the sender of the first message can understand that the relay device 20 has requested the resumption of transmission of the first message, and can resume transmission of the first message to relay device 20.

[0108] The following additional notes are provided regarding the above-described embodiments.

[0109] [Supplementary Item 1] A relay device comprising: a plurality of ports; and a control unit that, when a message for time synchronization is received via any one of the plurality of ports, determines whether the port that received the message is connected to a higher-level device or a lower-level device based on the received message.

[0110] [Supplementary Item 2] The relay device described in Supplementary Item 1, wherein the control unit, when the received message is a first message transmitted from upstream to downstream in a time distribution network, determines that the port that received the first message is connected to a higher-level device, determines that a port among the plurality of ports other than the port that received the first message is connected to a lower-level device, and when the port determined to be connected to the lower-level device receives the first message, discards the received first message.

[0111] [Supplementary Item 3] The message for time synchronization includes a first message transmitted from upstream to downstream in the time distribution network and a second message transmitted from downstream to upstream in the time distribution network, and the control unit provisionally registers, among the plurality of ports, the port that received the first message as the upper port to which the upper device is connected, and provisionally registers ports other than the port that received the first message as the lower port to which the lower device is connected, and when the port provisionally registered as the lower port receives the second message, officially registers the port provisionally registered as the upper port as the upper port, and officially registers the port provisionally registered as the lower port as the lower port. This is the relay device described in Supplementary Item 1.

[0112] [Supplementary Item 4] The relay device described in Supplementary Item 2, wherein the control unit changes the determination result when the port determined to be connected to the lower device is connected to the upper device if the port that has been determined to be connected to the lower device newly receives the first message and the port that has newly received the first message is capable of more accurate time synchronization than the port that previously received the first message.

[0113] [Supplementary Item 5] A relay device as described in any one of Supplementary Items 2 to 4, wherein when the port determined to be connected to the lower device receives a first message, instead of discarding the received first message, the control unit sends a message unnecessary notification to the sender of the first message notifying that it is unnecessary to send the first message to the relay device.

[0114] [Supplementary Item 6] The relay device described in any one of Supplementary Items 2 to 5, wherein the control unit: among the plurality of ports, registers a port that received the first message as an upper port connected to the upper device; registers ports other than the port that received the first message as lower ports connected to the lower device; if a port registered as a lower port receives the first message, pre-registers the port registered as the lower port as the upper port; and if reception of the first message via the port registered as the upper port is interrupted for more than a predetermined time, registers the port pre-registered as the upper port as the upper port.

[0115] The present disclosure is not limited to the above-described embodiments. For example, two or more blocks shown in the block diagram may be integrated, or one block may be divided. Two or more steps shown in the flowchart may be executed in parallel or in a different order, instead of being executed in chronological order as described, depending on the processing capabilities of the device executing each step, or as needed. Other modifications are possible within the scope of the present disclosure.

[0116] For example, the receiving device 30 may execute the processing of the relay device 20 according to the above-described embodiment. As an example, if the receiving device 30 includes multiple ports, the receiving device 30 may register the port that received the first message as an upper port and the other ports as lower ports. In this case, when the receiving device 30 receives the first message through a port registered as a lower port, the receiving device 30 may transmit the message unnecessity notification to the sender of the first message via the port that received the first message. Here, it is assumed that the receiving device 30 is connected to the same relay device 20 via its upper port and lower port. It is also assumed that the relay device 20 transmitted the first message to the receiving device 30. In this case, the receiving device 30 can transmit the message unnecessity notification to the relay device 20 via the lower port that received the first message. With this configuration, the relay device 20 can prevent the first message from being transmitted from the port 21 connected to the lower port of the receiving device 30. As a result, the relay device 20 uses only one port 21 out of the multiple ports 21 connected to the receiving device 30.

[0117] The relay device of the present disclosure can also be realized by a computer and a program, and the program can be recorded on a recording medium or provided via a network.

[0118] For example, an embodiment is also possible in which a general-purpose computer functions as the relay device 20 according to the above-described embodiment. Specifically, a program describing the processing content for realizing each function of the relay device 20 according to the above-described embodiment is stored in the memory of the general-purpose computer, and the program is read and executed by a processor. Therefore, the present disclosure can also be realized as a program executable by a processor or a non-transitory computer-readable medium storing the program.

[0119] 1: Time distribution system 2: L2 network 10: Time source 20: Relay device 21: Port 22: Control unit 23: Analysis unit 24: Discrimination unit 25: First setting unit 26: Second setting unit 27: Storage unit 28: Retention table 30: Receiving device

Claims

1. A relay device comprising: a plurality of ports; and a control unit that, when receiving a message for time synchronization via any one of the plurality of ports, determines whether the port that received the message is connected to a host device or a subordinate device based on the received message.

2. When the received message is a first message transmitted from the upstream to the downstream of the time distribution network, the control unit determines that the port that received the first message is connected to a host device, determines that ports other than the port that received the first message among the plurality of ports are connected to subordinate devices, and discards the received first message when the port determined to be connected to the subordinate device receives the first message. The relay device according to claim 1.

3. The message for time synchronization includes a first message transmitted from the upstream to the downstream of the time distribution network and a second message transmitted from the downstream to the upstream of the time distribution network. The control unit temporarily registers the port that received the first message among the plurality of ports as an upper port to which the host device is connected, and temporarily registers ports other than the port that received the first message as lower ports to which the subordinate devices are connected. When the port temporarily registered as the lower port receives the second message, the control unit permanently registers the port temporarily registered as the upper port as the upper port and permanently registers the port temporarily registered as the lower port as the lower port. The relay device according to claim 1.

4. When the port determined to be connected to the subordinate device newly receives the first message, and the port that newly received the first message can achieve more accurate time synchronization than the port that previously received the first message, the control unit changes the determination result that the port determined to be connected to the subordinate device is connected to the host device. The relay device according to claim 2.

5. When the port determined to be connected to the lower device receives the first message, instead of discarding the received first message, the control unit transmits a message notifying the source of the first message that it is unnecessary to transmit the first message to the relay device. The relay device according to claim 2.

6. Among the plurality of ports, the control unit registers the port that received the first message as an upper port connected to the upper device, and registers ports other than the port that received the first message as lower ports connected to the lower device. When the port registered as the lower port receives the first message, the port registered as the lower port is provisionally registered as the upper port. When the reception of the first message via the port registered as the upper port has been interrupted for a predetermined time or more, the port provisionally registered as the upper port is registered as the upper port. The relay device according to claim 2.

Citation Information

Patent Citations

  • relay device

    JP2022177172A

  • Method of routing within network, and node apparatus

    WO2012039040A1

  • Relay device and communication system

    WO2021117270A1