Communication device, communication system, determination method, and program
The communication device determines grandmaster stations based on hop number and priority calculation to construct redundant paths, ensuring reliable time synchronization by designating devices far from existing GMs, addressing the lack of redundancy in IEEE 802.1AS protocols.
Patent Information
- Application Number
- PCT/JP2024/011952
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-10-02
AI Technical Summary
Existing time synchronization protocols, such as IEEE 802.1AS, do not specify how to construct redundant time synchronization paths, making it difficult to ensure continuous time information distribution in case of path failures.
A communication device that determines a grandmaster station using hop number and priority calculation to construct redundant time synchronization paths, ensuring that communication devices far from existing GMs are designated as new GMs to maximize redundancy.
Enables continuous time information distribution even in case of path failures by constructing redundant paths, enhancing the reliability of time synchronization.
Smart Images

Figure JP2024011952_02102025_PF_FP_ABST
Abstract
Description
COMMUNICATION DEVICE, COMMUNICATION SYSTEM, DETERMINATION METHOD, AND PROGRAM
[0001] The present disclosure relates to a communication device, a communication system, a determination method, and a program.
[0002] In a time synchronization protocol, a communication device acting as a grandmaster station distributes time information to other communication devices. One example of a time synchronization protocol is IEEE 802.1AS, which is defined in Non-Patent Document 1.
[0003] IEEE 802.1AS describes the construction of a primary time synchronization path and a redundant hot standby time synchronization path, making it possible to distribute time information via either path. Different communication devices are selected as grandmaster stations for the primary and hot standby systems. This increases the likelihood that time information can be distributed via another path if, for example, a failure occurs on one path.
[0004] The term "system" used here refers to a group of communication devices centered around a grandmaster station, with each group being identifiable.
[0005] In this way, in the time synchronization protocol, a grandmaster station is determined in multiple systems, and a time synchronization path is constructed in each system, thereby making it possible to obtain redundancy in the time synchronization path.
[0006] IEEE Std 802.1AS-2020: “IEEE Standard for Local and Metropolitan Area Networks--Timing and Synchronization for Time-Sensitive Applications,” June 2020.
[0007] However, although IEEE 802.1AS specifies that it is possible to construct a time synchronization path using a hot standby system, it does not specifically specify how to construct a time synchronization path using a hot standby system.
[0008] Therefore, there is a need for a technology to determine a grandmaster station in time synchronization protocols so that redundant paths can be constructed.
[0009] In view of the above circumstances, an object of the present disclosure is to provide a communication device or the like that can determine a grandmaster station so that a redundant path can be constructed in a time synchronization protocol.
[0010] In order to achieve the above object, a communication device according to the present disclosure is a communication device that communicates with other communication devices using a time synchronization protocol, and includes: a hop number determination means that determines the number of hops from a communication device that will be the grandmaster station of the i-th system (i is a positive integer) to the communication device itself; and a grandmaster determination means that determines a communication device that will be the grandmaster station of the i+1-th system based on the number of hops determined by the hop number determination means and the number of hops from the communication device that will be the grandmaster station of the i-th system to the other communication devices.
[0011] According to the present disclosure, a grandmaster station can be determined so that a redundant path can be constructed in a time synchronization protocol.
[0012] 1 is a diagram showing the overall configuration of a communication system according to a first embodiment of the present disclosure; 2 is a diagram showing an example of determination of a grandmaster station and a route failure in a communication system according to a first embodiment of the present disclosure; 3 is a diagram showing an example of determination of a grandmaster station and a route failure in a communication system according to a first embodiment of the present disclosure; 4 is a diagram showing the functional configuration of a communication device according to a first embodiment of the present disclosure; 5 is a diagram showing an example of a frame transmitted by a communication device according to a first embodiment of the present disclosure; 6 is a diagram showing an example of a hardware configuration of a communication device according to a first embodiment of the present disclosure;
[0013] Hereinafter, a communication system according to an embodiment of the present disclosure will be described with reference to the drawings. In each drawing, the same or equivalent parts are denoted by the same reference numerals.
[0014] (First Embodiment) A communication system 1 according to a first embodiment will be described with reference to Fig. 1 . The communication system 1 includes a plurality of communication devices 10. In Fig. 1 , the communication devices 10 are respectively referred to as communication devices 10a, 10b, 10c, 10d, and 10e. Hereinafter, when there is no need to distinguish between the communication devices 10, they will be simply referred to as communication devices 10. The communication system 1 is an example of a communication system according to the present disclosure.
[0015] 1, the communication network is configured with a network topology in which the communication devices 10 are connected in a daisy chain. However, the communication network may be configured with a network topology other than a daisy chain. For example, the communication network may be constructed with a network topology such as a star network or a ring network.
[0016] Each communication device 10 communicates using a time synchronization protocol. IEEE 802.1AS, for example, can be used as the time synchronization protocol. Alternatively, a unique protocol may be used. In the time synchronization protocol, one communication device 10 is determined as a grandmaster station (hereinafter referred to as GM), and the GM distributes time information to the other communication devices 10. The other communication devices 10 that receive the time information from the GM perform time synchronization based on the time information. The communication device 10 is an example of a communication device according to the present disclosure.
[0017] In the communication system 1, multiple systems are constructed, and one communication device 10 is designated as the GM for each system, and a communication path for distributing time information is constructed. The multiple systems are designated as system 1, system 2, ..., system N. Here, N is a positive integer, the maximum number of communication devices 10 included in the communication system 1, and is set in advance for each communication device 10 by the user. Furthermore, system 1 is designated as the primary system, and systems 2 to N are designated as hot standby systems. By constructing multiple systems, even if a failure occurs in part of the communication path and some communication devices 10 are unable to receive time information from the GM of the primary system, there is a possibility that the communication devices 10 can still receive time information from the GM of another system. In other words, by making the systems redundant, each communication device 10 is more likely to be able to receive time information.
[0018] However, as will be explained below, depending on how the GM is determined, whether or not time information can be distributed from the GM of another system when a failure occurs will vary.
[0019] For example, consider a case where a failure occurs in the communication path between the communication device 10b and the communication device 10c as shown in Figures 2 and 3. The location of the failure is the same in Figures 2 and 3, and the only difference is which communication device 10 is determined as the GM.
[0020] First, consider the case where communication device 10a is determined as the GM of system 1 and communication device 10b is determined as the GM of system 2, as shown in Figure 2. In this case, if a failure occurs in the communication path between communication device 10b and communication device 10c, communication devices 10c, 10d, and 10e cannot receive time information from communication device 10a, which is the GM of system 1, and cannot receive time information from communication device 10b, which is the GM of system 2. In other words, communication devices 10c, 10d, and 10e cannot benefit from the redundant systems. This is because communication device 10a, which is the GM of system 1, and communication device 10b, which is the GM of system 2, are adjacent to each other in terms of the network.
[0021] Next, consider the case where the communication device 10a is determined as the GM of system 1 and the communication device 10e is determined as the GM of system 2, as shown in Figure 3. In this case, even if a failure occurs in the communication path between the communication device 10b and the communication device 10c, the communication devices 10c and 10d can receive time information from the communication device 10e, which is the GM of system 2. Therefore, the communication devices 10c and 10d can benefit from the redundant systems. This is because the communication device 10a, which is the GM of system 1, and the communication device 10e, which is the GM of system 2, are far apart in terms of the network.
[0022] In the communication system 1, as will be described later, a communication device 10 that is far from the existing GM in terms of the network is determined as the new GM, so that the GM of each system can be determined so as to maximize the benefit of redundancy.
[0023] The functional configuration of the communication device 10 will be described with reference to Fig. 4. The communication device 10 includes a communication control unit 100 and a communication unit 110.
[0024] The communication unit 110 communicates with other communication devices 10. The communication unit 110 communicates with other communication devices 10 using the time synchronization protocol by transmitting and receiving frames that comply with the time synchronization protocol. Frames received by the communication unit 110 from other communication devices 10 are processed by the communication control unit 100. The communication unit 110 transmits frames created by a frame creation unit 104 of the communication control unit 100, which will be described later.
[0025] The communication control unit 100 processes frames that the communication unit 110 receives from other communication devices 10. The communication control unit 100 creates frames to be transmitted to other communication devices 10. The communication control unit 100 causes the communication unit 110 to transmit the created frames.
[0026] The communication control unit 100 includes a storage unit (not shown) that stores the maximum number N of communication devices 10 preset by the user. The communication control unit 100 also stores frames created by a frame creation unit 104 (described later).
[0027] The communication control unit 100 includes a GM determination unit 101 , a hop count specification unit 102 , a priority calculation unit 103 , and a frame creation unit 104 .
[0028] The GM determination unit 101 determines which of the communication devices 10, including itself, is the GM of system i. How this determination is made will be described later after explaining the priority. The GM determination unit 101 is an example of a grandmaster determination means according to the present disclosure.
[0029] The hop count determination unit 102 determines the number of hops from the communication device 10 that serves as the GM of system i to the communication device 10 itself. The hop count refers to the number of forwardings required for a frame to be received by a communication device. Therefore, when a source communication device transmits a frame, the hop count is 0, and the hop count increases by 1 each time another communication device forwards the frame. As will be described later, a frame transmitted by each communication device 10 includes information indicating the source communication device 10 and information indicating the hop count. The hop count determination unit 102 refers to a frame received by the communication unit 110, and if the frame was transmitted by the GM of system i, determines the hop count indicated by the frame as the number of hops from the communication device 10 that serves as the GM of system i to the communication device 10 itself. Hereinafter, this hop count will be referred to as the "hop count in system i," etc. The hop count determination unit 102 is an example of a hop count determination means according to the present disclosure.
[0030] The priority calculation unit 103 calculates the priority of the communication device 10 itself in system i+1 based on the number of hops in each of systems 1 to i identified by the hop count identification unit 102. As will be described later, the higher the priority, the higher the possibility that the device will be determined as the GM in system i+1. The priority calculation unit 103 is an example of a priority calculation means according to the present disclosure.
[0031] Depending on how the priority is calculated, the higher the priority number, the higher the order of priority, or the lower the priority number, the higher the order of priority.
[0032] For example, when calculating the priority using the following formula (1), the larger the total number of hops, the farther the device is from each GM in terms of the network, so the larger the priority number, the higher the priority ranking.
[0033] Priority in system i+1=(number of hops in system 1+number of hops in system 2+ . . . +number of hops in system i) / i (1)
[0034] On the other hand, in IEEE 802.1AS, the smaller the priority number, the higher the priority. Therefore, when IEEE 802.1AS is adopted as the time synchronization protocol, the priority is calculated using, for example, the following formula (2).
[0035] Priority in system i+1={(Pmax−number of hops in system 1)+(Pmax−number of hops in system 2)+ . . . +(Pmax−number of hops in system i)} / i (2)
[0036] Here, Pmax is a constant that represents the upper limit of priority defined by IEEE 802.1AS, and its value is 255. Also, in IEEE 802.1AS, the lower limit of priority is defined as 1, so when the result of equation (2) is less than 1, the result is treated as 1.
[0037] Note that although both formula (1) and formula (2) may result in a decimal, the result may be rounded to an integer as necessary by rounding down, rounding up, rounding off, etc. Furthermore, when the distances from the GM are approximately the same, the values derived by formula (1) and formula (2) may be weighted by the accuracy of the time to calculate the priority, thereby giving a higher priority to the communication device 10 with higher time accuracy.
[0038] Here, the time accuracy of the communication device 10 refers to the accuracy of the clock used by the communication device 10 to derive the time, and refers to the amount of time deviation within a fixed period of time. For example, time accuracy is expressed as "within a mean monthly deviation of +-15 seconds." Regarding weighting, IEEE 1588, which defines a time-synchronized communication protocol, describes maintaining and referencing weights for clock accuracy. Specifically, a logarithmic weight is defined for the amount of time deviation that may occur during periodic time correction. IEEE 1588 also describes a simpler approach, defining weights according to the type of crystal used in the clock.
[0039] Therefore, by multiplying the value calculated by the above formula (1) or formula (2) by a weight based on the accuracy of the time, or by adding a value that is a constant multiple of the weight, the value calculated by formula (1) or formula (2) can be weighted based on the accuracy of the time.
[0040] The GM determination unit 101 will be described again. As will be described later, a frame transmitted by each communication device 10 includes information indicating the priority of the communication device 10, which is the sender, in system i+1. The GM determination unit 101 refers to the frame received by the communication unit 110 from each communication device 10, and identifies the priority of each communication device 10 in system i+1. The GM determination unit 101 determines the communication device 10 corresponding to the highest priority among the priority of the communication device 10 itself in system i+1 calculated by the priority calculation unit 103 and the priority of each communication device 10 in system i+1, as the GM in system i+1. As a result, the communication device 10 that is considered to be farthest from all GMs from system 1 to system i can be determined as the GM in system i+1.
[0041] Since the priority is calculated using the above formula (1), formula (2), etc., there is a possibility that the priority will be the same value. In this case, the GM determination unit 101 determines the communication device 10 with the smallest unique identifier for each communication device, for example, the smallest MAC address (Media Access Control address), as the GM. This is adopted in IEEE 802.1AS.
[0042] Note that the determination of the GM of the above system i+1 requires the priority of each communication device 10 in the system i. Therefore, the above method cannot be used as is when determining the GM of the system 1. To address this, for example, it is possible for the user to set an appropriate priority for each communication device 10 in the system 1. In this case, the user sets a priority individually for each communication device 10, and the GM for the system 1 is determined based on the set priority.
[0043] By repeating the above-described determination of GM up to system N, GM can be determined for N systems. In other words, N systems are obtained.
[0044] Although each communication device 10 will individually determine the GM using the GM determination unit 101, the information used to determine the GM is common to each communication device 10, and therefore the result of the determination by the GM determination unit 101 will be the same for each communication device 10.
[0045] The frame creation unit 104 creates a frame to be transmitted to another communication device 10 via the communication unit 110. As shown in Fig. 5, the frame created by the frame creation unit 104 includes at least information indicating a source MAC address, information indicating the number of hops, information indicating a system number x, and information indicating a priority in system x. The system number x indicates which system the frame includes information about. Furthermore, the information indicating the source MAC address is information indicating the communication device 10 that is the sender.
[0046] The frame creation unit 104 can create two types of frames: the frame creation unit 104 creates frames for transferring frames received by the communication unit 110 to other communication devices 10, and the frame creation unit 104 creates frames for informing other communication devices 10 of information about the communication device 10 itself.
[0047] When the communication unit 110 receives a frame, the frame creation unit 104 creates a new frame by duplicating the received frame and increasing the hop count by 1. The communication unit 110 transmits this frame to another communication device 10, so that the received frame can be forwarded to the other communication device 10 with the hop count increased by 1.
[0048] When the priority calculation unit 103 calculates the priority of the communication device 10 itself in system i+1, the frame creation unit 104 creates a frame in which the source MAC address is the MAC address of the communication device 10 itself, the number of hops is 0, the system number x is i+1, and the priority in system x is the priority calculated by the priority calculation unit 103. By the communication unit 110 transmitting this frame to another communication device 10, it is possible to notify the other communication device 10 of the priority of the communication device 10 itself in system i+1 and the number of hops from the communication device 10 itself to the other communication device 10.
[0049] An example of the hardware configuration of the communication device 10 will be described with reference to Fig. 6. The communication device 10 shown in Fig. 6 is realized by a computer such as a personal computer or a microcontroller.
[0050] The communication device 10 includes a processor 1001 , a memory 1002 , an interface 1003 , and a secondary storage device 1004 , which are connected to each other via a bus 1000 .
[0051] The processor 1001 is, for example, a CPU (Central Processing Unit). The processor 1001 loads an operating program stored in the secondary storage device 1004 into the memory 1002 and executes the program, thereby realizing each function of the communication device 10.
[0052] The memory 1002 is a main storage device configured, for example, by a RAM (Random Access Memory). The memory 1002 stores the operating program that the processor 1001 reads from the secondary storage device 1004. The memory 1002 also functions as a working memory when the processor 1001 executes the operating program.
[0053] The interface 1003 is an I / O (Input / Output) interface such as a serial port, a USB (Universal Serial Bus) port, or a network interface.
[0054] The secondary storage device 1004 is, for example, a flash memory, a hard disk drive (HDD), or a solid state drive (SSD). The secondary storage device 1004 stores the operating programs executed by the processor 1001.
[0055] An example of the operation of determining a GM by the communication device 10 will be described with reference to Fig. 7. At the start of the operation shown in Fig. 7, it is assumed that the priority of system 1 is appropriately set for each communication device 10. It is also assumed that, in parallel with the operation shown in Fig. 7, frames are received from other communication devices 10 and the received frames are forwarded. In the operation shown in Fig. 7, N systems are obtained.
[0056] The communication control unit 100 of the communication device 10 sets the number i of the current system to 1 (step S101). The operations from steps S102 to S108 are repeated until i becomes N.
[0057] The communication unit 110 of the communication device 10 transmits a frame including information indicating the priority of the communication device 10 in the system i to the other communication device 10 (step S102). Specifically, the frame creation unit 104 of the communication control unit 100 creates a frame including information indicating the priority of the communication device 10 itself in the system i, and the communication control unit 100 causes the communication unit 110 to transmit the frame.
[0058] After step S102, the process waits until a predetermined period has elapsed (step S103). This period is set to a time sufficient for all communication devices 10 to transmit frames containing information indicating their own priority in system i. This period becomes the frame transmission period.
[0059] The GM determination unit 101 of the communication control unit 100 determines the communication device 10 with the highest priority among the priorities in system i indicated by the frames received from each communication device 10 before the waiting in step S103 ends and the priority of the communication device 10 itself in system i as the GM of system i (step S104).
[0060] The communication control unit 100 determines whether i is equal to N (step S105). When i is equal to N (step S105: Yes), the GM determination operation of step S104 has been executed for all cases of i from 1 to N, and the GM has been determined for all systems 1 to N, so the communication control unit 100 ends the GM determination operation.
[0061] When i is not equal to N (step S105: No), the hop count determination unit 102 of the communication control unit 100 determines the number of hops indicated in the frame received from the communication device 10 determined as the GM in step S104 as the number of hops from the GM of system i to its own device (step S106).
[0062] The priority calculation unit 103 of the communication control unit 100 calculates the priority of its own device in system i+1 using the above equations (1), (2), etc., based on the number of hops identified in step S106 for each of systems 1 to i (step S107).
[0063] The communication control unit 100 adds 1 to the number i of the current system (step S108), and repeats the operations from step S102.
[0064] If it is known that the network configuration is a line topology as shown in Fig. 1, the GM may be determined as described below. An example of the operation of determining the GM by the communication device 10 in this case will be described with reference to Fig. 8. However, among the steps shown in Fig. 8, the steps assigned the same reference numerals as those shown in Fig. 7, i.e., the steps other than step S200, are generally similar to the case of Fig. 7, and therefore description thereof will be omitted or simplified.
[0065] The communication control unit 100 refers to the number of hops from the GM of system i identified by the hop count identification unit 102 to its own device and the number of hops from the GM of system i-2 received by the communication unit 110 to its own device, and determines whether the number of hops from the GM of system i to its own device is equal to the number of hops from the GM of system i-2 to its own device (step S200).
[0066] When the number of hops from the GM of system i to the device itself is equal to the number of hops from the GM of system i-2 to the device itself (step S200: Yes), if the GM determination operation is continued, the same GM will be selected again in a different system, so the communication control unit 100 terminates the GM determination operation.
[0067] When the number of hops from the GM of system i to the own device is not equal to the number of hops from the GM of system i-2 to the own device (step S200: No), the priority calculation unit 103 of the communication control unit 100 calculates the priority of the own device in system i+1 using the above formula (1), formula (2), etc. based on the number of hops identified in step S106 for each of systems 1 to i (step S107). Note that since the network configuration is a line topology, in step S107, instead of the above formula (1), formula (2), the number of hops from the GM of system i identified in step S106 to the own device may be used as the priority of the own device in system i+1.
[0068] In the example shown in FIG. 8 , when the communication control unit 100 ends the GM determination operation, the frame creation unit 104 creates a frame indicating that the GM determination operation has been completed, and controls the communication unit 110 to transmit the frame to the other communication devices 10. The other communication devices 10 that receive the frame cancel subsequent GM determination operations. For example, if the GM of system i becomes the communication device 10 that was previously determined as the GM, the frame creation unit 104 adds a GM determination completion flag to a frame for system i+1 that notifies the other communication devices 10 of information about the communication device 10 itself and transmits the frame. When the other communication devices 10 receive the frame for system i+1 that includes the GM determination completion flag, they cancel GM determination operations for system i+1 and onward.
[0069] The above has described the communication system 1 according to embodiment 1. According to the communication system 1, when a new GM is determined, a communication device 10 that is far from other previously determined GMs in terms of the network is determined as the GM, so that a grandmaster station can be determined so that a redundant path can be constructed in the time synchronization protocol.
[0070] (First Modification of First Embodiment) In the first embodiment, the user appropriately assigns priorities to each communication device 10 for system 1. As a result, the GM for system 1 is appropriately determined. Here, after the GM for system 2 is determined based on the appropriately determined GM for system 1, the GM for system 1 may be re-determined based on the GM for system 2. In other words, the communication device 10 that is farthest from the GM for system 2 in terms of the network may be newly designated as the GM for system 1. In this case, the GM for system 3 is determined based on the GM for system 2 and the re-determined GM for system 1.
[0071] (Second Modification of First Embodiment) As described above, when determining the GM of each system, a communication device 10 that is far from the existing GM in terms of the network is determined as the new GM, so in a specific network configuration, for example, a network with branch lines such as the tree topology shown in Fig. 9, the GMs of different systems may be the same communication device 10. For example, in the network configuration shown in Fig. 9, if communication device 10c is the GM of system 1, communication device 10e will be the GM of system 2 and the GM of system 5.
[0072] In such a case, even if the number N of systems is set to "the maximum number of communication devices 10 included in the communication system 1," some systems do not contribute to improving redundancy because the GMs are overlapping. Therefore, in order to stop processing of systems that do not improve redundancy, if the GM of system i becomes the communication device 10 that was previously determined as the GM, the determination of the GM for system i+1 and subsequent systems may be omitted.
[0073] Specifically, a communication device 10 that was previously determined as the GM of system i suspends the process of determining the GM for system i+1 and thereafter, and adds a GM determination completion flag to the frame for system i+1 that is created by the frame creation unit 104 to inform the other communication devices 10 of information about itself, and transmits the frame to the other communication devices 10. The other communication devices 10 that receive the frame for system i+1 with the GM determination completion flag added will suspend the process of determining the GM for system i+1 and thereafter.
[0074] Consider a case where the network configuration subsequently changes and the GM of system i is no longer the communication device previously determined as the GM. For example, in Figure 9, if a new communication device 10f is added and communication device 10f becomes the GM of system 5, communication device 10e will no longer be the GM of system 5. In this case, each communication device 10 deletes the GM determination completion flag and resumes the process of determining the GM for system i+1 and onwards.
[0075] Also, for example, if the communication path between communication device 10c and communication device 10d is cut off and the GM determination completion flag from communication device 10e does not arrive, communication device 10 that has not received a frame with the GM determination completion flag added within a predetermined period will re-determine the GM from system 1.
[0076] To determine whether the communication device 10 has been determined as a GM in the past, the communication device 10 stores the smallest system number of the GM (hereinafter referred to as the GM smallest system number) in the communication control unit 100. The initial value of the GM smallest system number is set to N. The communication device 10 that has become a GM compares the system number of the GM with the GM smallest system number, and adopts the smaller value as the GM smallest system number.
[0077] Whenever a communication device 10 that has become a GM creates a frame before transmission using the frame creation unit 104 to notify other communication devices 10 of information about itself, the communication control unit 100 compares the system number that caused the GM to be created with the smallest GM system number, and if the system number that caused the GM to be created is larger, the communication device 10 is determined to be a communication device 10 that was previously determined to be a GM. Also, a communication device 10 that is no longer a GM in a certain system is determined to be a GM in order from system 1 to system N, and the smallest GM system number is reset. As a result, if the smallest GM system number changes and the system number that caused the GM to be created matches the smallest GM system number, the communication device 10 is determined to be no longer a communication device 10 that was previously determined to be a GM for that system number.
[0078] Second Embodiment A communication system 1 according to a second embodiment will be described with reference to Fig. 10. The communication system 1 according to the second embodiment differs from the first embodiment in that it further includes a setting device 20 that communicates with the communication device 10.
[0079] In the first embodiment, each communication device 10 calculated the priority, but in the second embodiment, the setting device 20 calculates the priority of each system based on the network topology and notifies each communication device 10 of the calculated priority.
[0080] The functional configuration of the setting device 20 will be described with reference to Fig. 11. The setting device 20 includes a priority calculation unit 200, a topology storage unit 210, a notification unit 220, and a communication unit 230.
[0081] The priority calculation unit 200 refers to information indicating the network topology of the communication network of the communication system 1, which is stored in the topology storage unit 210. The priority calculation unit 200 identifies the number of hops from the communication device 10 that is the GM of system i to another communication device 10 based on the network topology, and calculates the priority in system i+1 based on the identified number of hops. The priority calculation unit 200 is an example of a priority calculation means according to the present disclosure.
[0082] The setting device 20 does not determine the GM of each system by itself. On the other hand, the priority calculation unit 200 cannot determine the number of hops unless the GM of each system is known. Therefore, as will be described later, each communication device 10 transmits information indicating the GM of each system to the setting device 20. This allows the priority calculation unit 200 to determine the number of hops from the communication device 10 that is the GM of system i to another communication device 10.
[0083] As described above, the topology storage unit 210 stores information indicating the network topology of the communication network of the communication system 1. The information indicating the network topology of the communication network of the communication system 1 is created and stored, for example, by a user. Alternatively, the topology storage unit 210 may derive information indicating the network topology of the communication network by collecting, from each communication device 10, adjacent communication device information obtained by LLDP (Link Layer Discovery Protocol).
[0084] The notification unit 220 notifies each communication device 10 of information indicating the calculated priority via the communication unit 230. The notification unit 220 is an example of a notification unit according to the present disclosure.
[0085] The communication unit 230 communicates with each communication device 10 .
[0086] As described above, in the second embodiment, the setting device 20 calculates the priority and notifies each communication device 10 of information indicating the calculated priority. Therefore, the communication device 10 according to the second embodiment does not need to calculate the priority by itself. Therefore, the communication device according to the second embodiment does not need the communication control unit 100 as in the first embodiment, and only needs to be able to respond to notifications from the setting device 20.
[0087] The functional configuration of the communication device 10 according to the second embodiment will be described with reference to Fig. 12. The communication device 10 according to the second embodiment differs from the first embodiment shown in Fig. 4 in that it does not include the hop count identification unit 102 and includes a priority acquisition unit 103A instead of the priority calculation unit 103.
[0088] The priority acquisition unit 103A acquires, via the communication unit 110, information indicating the priority of each communication device 10 notified by the setting device 20.
[0089] The GM determination unit 101 according to the second embodiment determines the GM in the same manner as in the first embodiment, based on the information indicating the priority of each communication device 10 acquired by the priority acquisition unit 103A.
[0090] The frame creation unit 104 according to the second embodiment creates a frame including information indicating the GM determined by the GM determination unit 101. This frame is transmitted by the communication control unit 100 to the setting device 20 via the communication unit 110. This allows the setting device 20 to know the GM in each system.
[0091] An example of the flow of GM determination in embodiment 2 will be described with reference to Fig. 13. Fig. 13 focuses on one system i, but the operations from T1 to T5 shown in Fig. 13 are repeated starting from system 1. Also, Fig. 13 shows only one communication device 10, but the setting device 20 communicates with all communication devices 10 in the communication system 1.
[0092] The priority calculation unit 200 of the setting device 20 identifies the number of hops from the communication device 10 that is the GM of system i to other communication devices for all communication devices 10 based on the network topology (step T1).
[0093] The priority calculation unit 200 calculates the priority in the system i+1 for all communication devices 10 based on the identified number of hops (step T2).
[0094] The notification unit 220 of the setting device 20 notifies each communication device 10 of information indicating the calculated priority of all communication devices 10 in system i+1, and the priority acquisition unit 103A of each communication device 10 acquires the information indicating the priority of all communication devices 10 in system i+1 notified by the setting device 20 (step T3).
[0095] The GM determination unit 101 of each communication device 10 determines the GM of the system i+1 based on the priority of each communication device 10 (step T4).
[0096] The communication control unit 100 of each communication device 10 controls the communication unit 110 to transmit a frame including information indicating the determined GM to the setting device 20 (step T5). This allows the setting device 20 to execute the operations from step T1 onwards in the system i+1.
[0097] As in the first embodiment, if the GM matches the previous GM when it is determined, the GM determination is terminated at that point. Also, if the network configuration is a line topology, or if the network configuration is a tree topology as shown in Fig. 9, when the GM determination is terminated due to a match with the previous GM, the setting device 20, which is aware of the state of the entire network, notifies each communication device 10 that the GM determination operation is terminated from system i+1 onwards, instead of notifying the priority.
[0098] The communication system 1 according to the second embodiment has been described above. According to the communication system 1 according to the second embodiment, the setting device 20 calculates the priority, which simplifies the configuration of the communication device 10. Furthermore, since the user can change the priority by operating the setting device 20, the GM can be switched even while the communication system 1 is in operation.
[0099] (Variation 1 of Embodiment 2) In Embodiment 2, the setting device 20 notifies each communication device 10 of information indicating the priority of all communication devices, and the communication device 10 acquires the information indicating the priority of all communication devices notified by the setting device 20. Alternatively, the setting device 20 may notify the communication device 10 of information indicating the priority of the communication device 10 to be notified, and each communication device 10 may acquire information indicating the priority of each communication device 10 within its range of communication over the network by transmitting a frame including information indicating the priority of its own device in system i to other communication devices 10, as in Embodiment 1. In this variation, the communication unit 110 of the communication device 10 is an example of communication means according to the present disclosure.
[0100] The priority acquisition unit 103A of the communication device 10 in this modified example acquires, via the communication unit 110, information indicating the priority of the communication device 10 itself that received the notification from the setting device 20 and information indicating the priority of the communication device 10 that is the source of the notification sent by each of the other communication devices 10.
[0101] The frame creation unit 104 of the communication device 10 according to this modification can create three types of frames. First, the frame creation unit 104 creates a frame for transferring a frame received by the communication unit 110 to another communication device 10. Second, the frame creation unit 104 creates a frame for informing the other communication device 10 of information about the communication device 10 itself. Third, the frame creation unit 104 creates a frame including information indicating the GM determined by the GM determination unit 101. These frames are transmitted by the communication control unit 100 to the other communication device 10 or the setting device 20 via the communication unit 110. In particular, by transmitting the third frame to the setting device 20, the setting device 20 can know the GM in each system.
[0102] With reference to Figure 14, an example of the flow of GM determination in this modified example will be described, focusing on differences from the case of embodiment 2 shown in Figure 13. In the sequence diagram shown in Figure 14, compared to Figure 13 for embodiment 2, T1, T2, T4, and T5 are the same, T3 is replaced by T3V, and T3V-1 is added between T3V and T4. Figure 14 focuses on one system i, but the setting device 20 repeatedly performs the operations from T1 to T3V shown in Figure 14 for each system. For each system, each communication device 10 first waits for a priority notification at T3V, and then repeatedly performs T3V-1 to T5.
[0103] Steps T1 and T2 are the same as those in embodiment 2. The difference from embodiment 2 is that the notification unit 220 of the setting device 20 notifies each communication device 10 of information indicating the priority of the communication device 10 to be notified, among the calculated priorities of all communication devices 10, and the priority acquisition unit 103A of each communication device 10 acquires the information indicating the priority of its own device notified by the setting device 20 (step T3V).
[0104] The communication unit 110 of the communication device 10 transmits a frame including information indicating the priority of the device itself in the system i to the other communication devices 10, and receives a frame including information indicating the priority of the communication device transmitted from the other communication devices 10 (step T3V-1). The subsequent steps T4 and T5 are the same as those in the second embodiment.
[0105] According to the communication system 1 of this modification, as in the second embodiment, the setting device 20 calculates the priority, so that the configuration of the communication device 10 can be simplified. Furthermore, since the user can change the priority by operating the setting device 20, the GM can be switched even during operation of the communication system 1. Furthermore, the setting device 20 itself calculates the priority but does not determine the GM, and the determination of the GM is left to each communication device 10. By doing so, even if the network is divided and a communication device 10 is unable to communicate with the setting device 20, each communication device 10 can determine the GM within each divided network.
[0106] (Variation 2 of Embodiment 2) In Embodiment 2, the priority calculation unit 200 collects information indicating the GM of each system to identify the number of hops. On the other hand, it is also possible to estimate the communication device 10 that will be the GM of each system from information indicating the network topology of the communication network stored in the topology storage unit 210. In this case, the above-mentioned mechanism for notifying the setting device 20 of information indicating the GM determined by the communication device 10 becomes unnecessary. This will be described below.
[0107] As in the second embodiment, an example of the flow of GM determination in this modified example will be described with reference to Fig. 13. Fig. 13 focuses on one system i, and after the operations from T1 to T2 shown in Fig. 13 are repeated for systems 1 to N, the operations of T3 and T4 are performed. Also, although Fig. 13 shows only one communication device 10, the setting device 20 communicates with all communication devices 10 in the communication system 1.
[0108] The priority calculation unit 200 of the setting device 20 identifies the number of hops from the communication device 10 that is the GM of the system i to other communication devices based on the network topology (step T1).
[0109] The priority calculation unit 200 calculates the priority in the system i+1 based on the identified number of hops and estimates the communication device that will be the GM of the system i+1 (step T2). The operations of steps T1 and T2 are repeated until estimation of the communication device that will be the GM up to the system N is completed.
[0110] The notification unit 220 of the setting device 20 notifies each communication device 10 of information indicating the calculated priorities of all communication devices 10 up to system N, and the priority acquisition unit 103A of each communication device 10 acquires the information indicating the priorities of all communication devices 10 up to system N notified by the setting device 20 (step T3).
[0111] The GM determination unit 101 of each communication device 10 determines the GM for each system based on the priority of each communication device 10 (step T4).
[0112] (Third Modification of Second Embodiment) In the second embodiment, the priority calculation unit 200 collects information indicating the GM of each system to identify the number of hops. On the other hand, it is also possible to estimate the communication device 10 that will be the GM of each system from information indicating the network topology of the communication network stored in the topology storage unit 210. In this case, the above-mentioned mechanism for notifying the setting device 20 of information indicating the GM determined by the communication device 10 becomes unnecessary. This will be explained below.
[0113] As in the case of Modification 1 of Embodiment 2, an example of the flow of GM determination in this modification will be described with reference to Fig. 14. Compared to Modification 1 of Embodiment 2 shown in Fig. 14, the operations of T1 and T2 are different, T3V, T3V-1, and T4 are the same, and T5 is not executed.
[0114] The priority calculation unit 200 of the setting device 20 determines the number of hops from the communication device 10 that will be the GM of system i to the other communication devices 10 for all communication devices 10 based on the network topology (step T1). The priority calculation unit 200 calculates the priority for system i+1 based on the determined number of hops and estimates the communication device that will be the GM for system i+1 (step T2). The operations of steps T1 and T2 are repeated until estimation of the communication devices 10 that will be the GM up to system N is completed. As in the case of Modification 2 of Embodiment 2, in steps T1 and T2, the priorities of all communication devices 10 up to system N are determined before step T3V of Modification 1. Steps T3V, T3V-1, and T4 are the same as in Modification 1 of Embodiment 2. Furthermore, since the setting device 20 estimates the communication device 10 that will be the GM in step T2, step T5 is unnecessary and is not executed.
[0115] (Variation 4 of Embodiment 2) The setting device 20 in Embodiment 2 may be further provided in Embodiment 1 and used when determining the GM of system 1. In Embodiment 1, the user individually sets the priority of system 1 for each communication device 10. However, this may be set collectively for each communication device 10 from the setting device 20, for example. In this case, in Embodiment 1, the setting device 20 is further provided, and after the user sets the priority of system 1 in the setting device 20, the setting device 20 notifies each communication device 10 of the set priority of system 1, thereby setting the priority of system 1 for each communication device 10. After the priority of system 1 is set, the GM in system 1 is determined based on the set priority. From then on, the priority of each system is set by each communication device 10, as in Embodiment 1. In this way, the priority of system 1 can be set collectively for each communication device 10 from the setting device 20, thereby saving the user the trouble of individually setting the priority of system 1 for each communication device 10.
[0116] (Fifth Modification of Second Embodiment) The communication device 10 according to the second embodiment may still include the hop count identification unit 102 and the priority calculation unit 103 as in the first embodiment, and the priority calculation unit may be provided redundancy between the communication device 10 and the setting device 20. Specifically, first, the setting device 20 calculates a priority and notifies the communication device 10 of information indicating the calculated priority at intervals of T. When the communication device 10 receives the first notification, the priority acquisition unit 103A acquires the priority. Thereafter, if the communication device 10 does not receive a notification even after the time T has elapsed since the previous notification was received, the communication device 10 determines that a failure has occurred and performs priority calculation by the priority calculation unit 103 instead of priority acquisition by the priority acquisition unit 103A. Furthermore, when notifications begin to be received, the communication device 10 determines that the failure has been recovered and returns from priority calculation by the priority calculation unit 103 to priority acquisition by the priority acquisition unit 103A.
[0117] 6, the communication device 10 includes a secondary storage device 1004. However, the present invention is not limited to this. The secondary storage device 1004 may be provided outside the communication device 10, and the communication device 10 and the secondary storage device 1004 may be connected via the interface 1003. In this configuration, removable media such as a USB flash drive or a memory card may also be used as the secondary storage device 1004.
[0118] 6, the communication device 10 may be configured with a dedicated circuit using an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), etc. In the hardware configuration shown in FIG. 6, some of the functions of the communication device 10 may be realized by a dedicated circuit connected to the interface 1003, for example.
[0119] The program used in the communication device 10 can be stored and distributed on a computer-readable recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD (Digital Versatile Disc), a USB flash drive, a memory card, or a HDD. By installing such a program on a specific or general-purpose computer, the computer can function as the communication device 10.
[0120] Furthermore, the above-mentioned program may be stored in a storage device owned by another server on the Internet, and the program may be downloaded from that server.
[0121] The present disclosure allows various embodiments and modifications without departing from the broad spirit and scope of the present disclosure. Furthermore, the above-described embodiments are intended to explain the present disclosure and do not limit the scope of the present disclosure. In other words, the scope of the present disclosure is defined by the claims, not the embodiments. Various modifications made within the scope of the claims and the meaning of equivalent disclosures are considered to be within the scope of the present disclosure.
[0122] 1 Communication system, 10, 10a, 10b, 10c, 10d, 10e Communication device, 20 Setting device, 100 Communication control unit, 101 GM determination unit, 102 Hop count identification unit, 103 Priority calculation unit, 103A Priority acquisition unit, 104 Frame creation unit, 110 Communication unit, 200 Priority calculation unit, 210 Topology storage unit, 220 Notification unit, 230 Communication unit, 1000 Bus, 1001 Processor, 1002 Memory, 1003 Interface, 1004 Secondary storage device.
Claims
1. A communication device that communicates with other communication devices using a time synchronization protocol, comprising: a hop number determination means that determines the number of hops from a communication device that will be the grandmaster station of the i-th system (i is a positive integer) to the communication device itself; and a grandmaster determination means that determines a communication device that will be the grandmaster station of the i+1-th system based on the number of hops determined by the hop number determination means and the number of hops from the communication device that will be the grandmaster station of the i-th system to the other communication devices.
2. The communication device according to claim 1, further comprising a priority calculation means for calculating a priority of the communication device in the i+1 system based on the number of hops identified by the hop number identification means, wherein the grandmaster determination means determines the communication device to become the grandmaster station of the i+1 system based on the priority of the communication device in the i+1 system calculated by the priority calculation means and the priority of the other communication device in the i+1 system calculated based on the number of hops from the communication device to become the grandmaster station of the i system to the other communication device.
3. The communication device described in claim 2, wherein the hop count determination means determines the number of hops from the communication device that will become the grandmaster station to the communication device itself for all systems from the first system to the i-th system, and the priority calculation means calculates the priority of the communication device itself in the i+1th system based on the hop counts in all systems from the first system to the i-th system.
4. The communication device according to claim 2, wherein the grandmaster determination means, when the communication device determined as the grandmaster station for the i-th system (i is a positive integer) is a communication device that has been determined as a grandmaster station in the past, stops determining grandmaster stations for the i+1th system and onwards.
5. A communication system comprising a plurality of communication devices according to any one of claims 1 to 4, wherein each of the plurality of communication devices communicates according to the time synchronization protocol.
6. A communication system as described in claim 5, further comprising a setting device, said setting device having a notification means for notifying each of said plurality of communication devices of information indicating the priority of a first system set by a user for each of said communication devices, and said grandmaster determination means of each of said communication devices determines a communication device to be a grandmaster station for a second system or later based on the information notified by said notification means of said setting device.
7. A communication system comprising a setting device and a plurality of communication devices that communicate using a time synchronization protocol, wherein the setting device comprises: priority calculation means that identifies the number of hops from a communication device that will be the grandmaster station of the i-th system (i is a positive integer) to each of the plurality of communication devices based on the network topology of a network constructed by the plurality of communication devices, and calculates a priority of each of the i+1-th communication devices based on the identified number of hops; and notification means that notifies each of the communication devices of information indicating the priority calculated by the priority calculation means, and each of the communication devices comprises grandmaster determination means that determines the communication device that will be the grandmaster station of the i+1-th system based on the priority of each of the communication devices calculated by the priority calculation means of the setting device.
8. The communication system according to claim 7, wherein the notification means of the setting device notifies each of the plurality of communication devices of information indicating the priority of all of the communication devices, and the grandmaster determination means of each of the communication devices determines the communication device to be the grandmaster station of the i+1 system based on the information indicating the priority of all of the communication devices notified by the notification means.
9. The communication system described in claim 7, wherein the notification means of the setting device notifies each of the plurality of communication devices of information indicating the priority of a communication device to be notified, and each of the communication devices further comprises communication means for transmitting to another communication device the information indicating the priority of its own device notified by the notification means of the setting device and receiving from the other communication device the information indicating the priority of the other communication device, and the grandmaster determination means of each of the communication devices determines the communication device to be the grandmaster station of the i+1 system based on the information indicating the priority of its own device notified by the notification means of the setting device and the information indicating the priority of the other communication devices received by the communication means.
10. A method for determining a grandmaster station in a communication system having multiple communication devices that communicate using a time synchronization protocol, comprising: determining the number of hops from a communication device that will be the grandmaster station of the i-th system (i is a positive integer) to each of the multiple communication devices; and determining a communication device that will be the grandmaster station of the i+1-th system based on the number of hops determined for each of the communication devices.
11. A program that causes a communication device that communicates with other communication devices using a time synchronization protocol to function as: a hop number determination means that determines the number of hops from the communication device that will be the grandmaster station of the i-th system (i is a positive integer) to the communication device itself; and a grandmaster determination means that determines the communication device that will be the grandmaster station of the i+1-th system based on the number of hops determined by the hop number determination means and the number of hops from the communication device that will be the grandmaster station of the i-th system to the other communication devices.
Citation Information
Patent Citations
Time synchronization device via network
JP2012023654A
Intelligent, load adaptive, and self optimizing master node selection in an extended bridge
US20170085488A1
Enhancing synchronization in computer network
WO2016198102A1
Forwarding device and time synchronization system
WO2023105777A1