Message processing method, apparatus and system, device and storage medium

The message processing method addresses the challenge of disabling 1588 features in one-to-many port communication systems by having network devices in a non-master state refrain from responding with certain messages, ensuring uninterrupted 1588 message transmission and time synchronization.

JP7666824B2Active Publication Date: 2025-04-22HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023514869
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-09-04
Filing Date
2021-08-25
Publication Date
2025-04-22
Estimated Expiration
2041-08-25

AI Technical Summary

Technical Problem

Current IEEE 1588 protocol standards face challenges in supporting 1588 message exchange in one-to-many port communication systems, leading to disabling of the 1588 feature on local ports when receiving multiple pdelay_resp and pdelay_resp_follow_up messages.

Method used

A message processing method where a network device in a non-master state stops responding with pdelay_resp and pdelay_resp_follow_up messages, preventing the 1588 feature from being disabled on the local port, by determining the port state based on clock ID, MAC address, or IP address mismatch.

Benefits of technology

This method ensures successful 1588 message transmission in one-to-many port communication systems, preventing the disabling of the 1588 feature and maintaining time synchronization functionality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007666824000004
    Figure 0007666824000004
  • Figure 0007666824000005
    Figure 0007666824000005
  • Figure 0007666824000006
    Figure 0007666824000006
Patent Text Reader

Abstract

The present application provides a message processing method, apparatus, device, and storage medium. In a communication system including at least three network devices, the port state of one of the at least three network devices is a master state, and the port states of the other network devices are non-master states. A first network device in the communication system receives, via a first port, a first message transmitted by a second port and used to measure delay, the second port being a port of the second network device in the communication system. The first network device stops responding with a second message based on the port state of the first port being non-master, to prevent the second port from receiving multiple second messages and disabling the 1588 function. Alternatively, the first network device responds to the second port via the first port with a second message conveying the port state of the first port, so that the second network device can determine that the first port is in a non-master state and does not process the second message, thereby preventing the 1588 function of the second port from being disabled.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202010924424.2, entitled “Message Processing Method, Apparatus and System, Device and Storage Medium,” filed on September 4, 2020, the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of clock technology, and in particular to a message processing method, apparatus and system, device, and storage medium. [Background technology]

[0003] To meet the requirements for higher accuracy of time synchronization, the Institute of Electronics and Electrical Engineers (IEEE) 1588 protocol standard has been developed. The official name of the IEEE 1588 protocol standard is IEEE 1588 precision clock synchronization protocol for networked measurement and control systems, and it is abbreviated as precision time protocol (PTP).

[0004] The scope of application of the IEEE 1588 protocol standard is becoming wider and wider, and there are more scenarios for time synchronization by using 1588 messages. In a point-to-multipoint port communication system, applying 1588 messages for time synchronization is one of the application scenarios. The point-to-multipoint port includes one master port and multiple slave ports, and each port corresponds to one network device.

[0005] How to support 1588 message exchange in a point-to-multipoint communication system is currently an urgent problem to be solved. Summary of the Invention

[0006] The present application provides a message processing method, an apparatus and system, a device and a storage medium to solve the problems in the related art. The technical solutions are as follows:

[0007] According to a first aspect, a message processing method is provided. In a communication system including at least three network devices, a port state of one of the at least three network devices is a master state, and a port state of the other network devices is a non-master state. For example, the method is applied to a first network device of the communication system. The first network device receives a first message sent by a second port through a first port, the first port being a port of the first network device, the second port being a port of the second network device of the communication system, and the first message is used to measure delay. Based on the port state of the first port being a non-master state, the first network device stops responding with a second message, and the second message includes a response message and a follow_up message.

[0008] For example, the first message is a peer delay request (pdelay_req) message, and the second message includes a peer delay response (pdelay_resp) message and a peer delay response follow_up (pdelay_resp_follow_up) message. According to the current 802.1AS protocol, when a node receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, the node disables the 1588 function of the local port. However, in this message processing method, if the first port that receives the first message is in a non-master state, the first network device stops responding with the second message to prevent the second port's 1588 function from being disabled by receiving multiple second messages.

[0009] In a possible implementation, after the first network device receives a first message transmitted by the second port via the first port, the first network device responds with a second message to the second port via the first port based on the port state of the first port being a non-master state.

[0010] Because the second message conveys the port state of the first port, the second network device can determine that the first port is in a non-master state and therefore does not process the second message to prevent disabling the 1588 functionality of the second port of the second network device.

[0011] In a possible implementation, the port state of the first port being a non-master state includes the port state of the first port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state. Since multiple port states such as listening state, pre_master state, unregulated state, passive state, and slave state are all used as non-master states, the message processing method is applied to a more comprehensive scenario.

[0012] In a possible implementation, stopping the first network device from responding with the second message based on the port state of the first port being a non-master state includes stopping the first network device from responding with the second message based on the port state of the first port being a non-master state and the first condition.

[0013] If the port state of the first port is a non-master state and the first condition is met, it will be stopped from responding with the second message, making the scenario of stopping from responding with the second message more accurate.

[0014] In a possible implementation, the first condition includes that the clock ID in the first message does not match the clock ID of the master node. The clock ID of the master node is obtained from an announce message, a sync message, or a follow_up message sent by the master node, i.e., a port in the master state. If the first network device is a master node, the clock ID of the first network device is the clock ID of the master node.

[0015] Whether the clock ID in the first message matches the clock ID of the master node can reflect whether the port state of the second port is in a non-master state. The mismatch between the clock ID in the first message and the clock ID of the master node is used as the first condition, so that when the port states of the first port and the second port are both in a non-master state, the response in the second message is stopped. The first condition can be obtained effectively and conveniently without carrying additional information in the first message.

[0016] In a possible implementation, the first condition includes that a source media access control (MAC) address in the first message does not match the MAC address of the master node.

[0017] Whether the MAC address in the first message matches the MAC address of the master node can reflect whether the port state of the second port is in a non-master state. Since the mismatch between the MAC address in the first message and the MAC address of the master node is used as the first condition, when the port states of the first port and the second port are both in a non-master state, the response in the second message is stopped. The first condition can be obtained effectively and conveniently without carrying additional information in the first message.

[0018] In a possible implementation, the first condition includes that a source Internet protocol (IP) address in the first message does not match an IP address of the master node.

[0019] Whether the IP address in the first message matches the IP address of the master node can reflect whether the port state of the second port is in a non-master state. Since the mismatch between the IP address in the first message and the IP address of the master node is used as the first condition, when the port states of the first port and the second port are both in a non-master state, the response in the second message is stopped. The first condition can be obtained effectively and conveniently without carrying additional information in the first message.

[0020] In a possible implementation, the first message conveys a port state of the second port, and the first condition includes that the port state of the second port conveyed by the first message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state.

[0021] Since the first message carries the port state of the second port, the first network device can directly obtain the first condition based on the first message.

[0022] According to a second aspect, a message processing method is provided. In a communication system including at least three network devices, a port state of one of the at least three network devices is a master state, and a port state of the other network devices is a non-master state. In an example in which the method is applied to a second network device of the communication system, the second network device transmits a first message to a first port via a second port, the second port being a port of the second network device, the first port being a port of the first network device, the first message is used to measure delay, the second network device receives a second message replied to via the first port via the second port, the second network device stops processing the second message based on the port state of the first port being a non-master state, and the second message includes a reply message and a follow_up message.

[0023] Stopping processing the second message may also be understood as skipping processing the second message.

[0024] For example, the first message is a peer pdelay_req message, and the second message includes a peer pdelay_resp message and a peer pdelay_resp_follow_up message. According to the current 802.1AS protocol, when a node receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, the node disables the 1588 function of the local port. However, in this message processing method, when the first port that transmits the second message is in a non-master state, the second network device stops processing the second message to prevent the 1588 function of the second port of the second network device from being disabled.

[0025] In a possible implementation, if the clock ID in the second message does not match the clock ID of the master node, the port state of the first port is a non-master state.

[0026] Whether the port state of the first port is a non-master state is obtained by using the clock ID without carrying additional information in the second message. The method of determining the port state is relatively effective and convenient.

[0027] In a possible implementation, if the source media access control MAC address in the second message does not match the MAC address of the master node, the port state of the first port is a non-master state.

[0028] Whether the port state of the first port is a non-master state is obtained by using the source MAC address without carrying additional information in the second message, and the method of determining the port state is relatively effective and convenient.

[0029] In a possible implementation, if the source Internet Protocol IP address in the second message does not match the IP address of the master node, the port state of the first port is a non-master state.

[0030] Whether the port state of the first port is a non-master state is obtained by using the source IP address without carrying additional information in the second message, and the method of determining the port state is relatively effective and convenient.

[0031] In a possible implementation, the second message conveys a port state of the first port, and if the port state of the first port conveyed in the second message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state, the port state of the first port is a non-master state.

[0032] Since the second message carries the port state of the first port, the second network device can directly determine the port state of the first port based on the second message, and the method of determining the port state is more direct.

[0033] In a possible implementation, stopping the second network device from processing the second message based on the port state of the first port being a non-master state includes stopping the second network device from processing the second message based on the port state of the first port being a non-master state and the second condition.

[0034] When the port state of the first port is a non-master state and the second condition is met, processing of the second message is stopped, making the scenario of stopping processing the second message more accurate.

[0035] In a possible implementation, the second condition includes the port state of the second port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state.

[0036] The port state of the second port being listening, pre_master, uncoordinated, passive or slave is used as the second condition, so that the message processing method is applied to a more comprehensive scenario.

[0037] In a possible implementation, the first message conveys a port state of the second port, and since the first message conveys the port state of the second port, the first network device receiving the first message can directly determine the port state of the second port based on the first message.

[0038] According to a third aspect, there is provided a message processing apparatus, the apparatus comprising: a receiving module configured to receive via a first port a first message transmitted by a second port, the first port being a port of a first network device and the second port being a port of a second network device, the first message being used to measure delay; a processing module configured to either stop responding with a second message or respond with a second message to the second port via the first port based on a port state of the first port being a non-master state, the second message conveying a port state of the first port, the second message including a reply message and a follow_up message; Includes.

[0039] In possible implementations, the port state of the first port being a non-master state includes the port state of the first port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state.

[0040] In a possible implementation, the processing module is configured to stop responding with the second message based on the port state of the first port being a non-master state and the first condition.

[0041] In a possible implementation, the first condition includes that the clock ID in the first message does not match the clock ID of the master node.

[0042] In a possible implementation, the first condition includes that the source media access control MAC address in the first message does not match the MAC address of the master node.

[0043] In a possible implementation, the first condition includes that the source Internet Protocol IP address in the first message does not match the IP address of the master node.

[0044] In a possible implementation, the first message conveys a port state of the second port, and the first condition includes that the port state of the second port conveyed by the first message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state.

[0045] According to a fourth aspect, there is provided a message processing apparatus, the apparatus comprising: a transmitting module configured to transmit a first message to a first port via a second port, the second port being a port of a second network device and the first port being a port of a first network device, the first message being used to measure delay; a receiving module configured to receive, via a second port, a second message replied to via the first port, the second message including a reply message and a follow_up message; a processing module configured to stop processing the second message based on a port state of the first port being a non-master state; Includes.

[0046] In a possible implementation, if the clock ID in the second message does not match the clock ID of the master node, the port state of the first port is a non-master state.

[0047] In a possible implementation, if the source media access control MAC address in the second message does not match the MAC address of the master node, the port state of the first port is a non-master state.

[0048] In a possible implementation, if the source Internet Protocol IP address in the second message does not match the IP address of the master node, the port state of the first port is a non-master state.

[0049] In a possible implementation, the second message conveys a port state of the first port, and if the port state of the first port conveyed in the second message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state, the port state of the first port is a non-master state.

[0050] In a possible implementation, the processing module is configured to stop processing the second message based on the port state of the first port being a non-master state and the second condition.

[0051] In a possible implementation, the second condition includes the port state of the second port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state.

[0052] In a possible implementation, the first message conveys the port state of the second port.

[0053] There is further provided a network device comprising a memory and a processor, the memory storing at least one instruction which, when loaded and executed by the processor, causes the network device to implement the message processing method according to either the first or second aspect.

[0054] There is further provided a computer readable storage medium storing at least one instruction which, when loaded and executed by the processor, performs a method for processing messages according to any one of the above descriptions.

[0055] Another communication device is provided. The device includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other by using an internal connection path. The memory is configured to store instructions. The processor is configured to execute the instructions stored in the memory to control the transceiver to receive signals and to control the transceiver to transmit signals. Additionally, when the processor executes the instructions stored in the memory, the processor performs or is capable of performing the first aspect or any possible implementation method of the first aspect.

[0056] In an exemplary embodiment, there are one or more processors and one or more memories.

[0057] In an exemplary embodiment, the memory may be integrated with the processor or the memory may be located separately from the processor.

[0058] In a particular implementation process, the memory may be a non-transitory memory such as a read-only memory (ROM). The memory and the processor may be integrated into one chip or may be located on separate chips. The type of memory and the arrangement of the memory and the processor are not limited in this embodiment of the present application.

[0059] A computer program product is provided, the computer program product comprising computer program code which, when executed on a computer, enables the computer to carry out a method according to the above aspects.

[0060] A chip is provided, the chip including a processor and configured to retrieve from a memory and execute instructions stored in the memory such that a communications device in which the chip is mounted performs the method of the above aspect.

[0061] Another chip is provided, the chip including an input interface, an output interface, a processor and a memory, the input interface, the output interface, the processor and the memory being connected to each other via an interconnect channel, the processor being configured to execute code in the memory, the code being configured to, when executed, perform the method of the above aspect. [Brief description of the drawings]

[0062] [Figure 1] FIG. 1 is a schematic diagram of a PTP message header structure according to an embodiment of the present application. [Diagram 2] FIG. 2 is a schematic diagram of a structure of a pdelay_req message according to an embodiment of the present application. [Diagram 3] FIG. 3 is a schematic diagram of a structure of a pdelay_resp message according to an embodiment of the present application. [Figure 4] FIG. 4 is a schematic diagram of a structure of a pdelay_resp_follow_up message according to an embodiment of the present application. [Diagram 5] FIG. 5 is a schematic diagram of the structure of a communication system according to an embodiment of the present application. [Figure 6] FIG. 6 is a schematic diagram of a message exchange procedure according to an embodiment of the present application. [Figure 7] FIG. 7 is a schematic flowchart of a message processing method according to an embodiment of the present application. [Figure 8] FIG. 8 is a schematic diagram of a 1588 message format according to an embodiment of the present application. [Figure 9] FIG. 9 is a schematic diagram of another 1588 message format according to an embodiment of the present application. [Figure 10] FIG. 10 is a flowchart of a message processing method according to an embodiment of the present application. [Figure 11] FIG. 11 is a schematic diagram of the structure of a message processing device according to an embodiment of the present application. [Figure 12] FIG. 12 is a schematic diagram of the structure of a message processing device according to an embodiment of the present application. [Figure 13] FIG. 13 is a schematic diagram of the structure of a network device according to an embodiment of the present application. [Figure 14] FIG. 14 is a schematic diagram of the structure of a network device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0063] The terms used in the implementation section of this application are merely used to describe the embodiments of this application and are not intended to limit the application.

[0064] As more and more communication systems have high-precision time synchronization requirements, the scope of application of the IEEE1588 protocol is becoming wider and wider. The IEEE1588 standard is called precision time protocol (PTP). The PTP protocol defines two transmission delay measurement mechanisms: the request_response mechanism and the peer delay mechanism. In IEEE1588v2, the peer-delay mechanism includes three types of PTP messages: the peer-delay request message, the peer-delay response message, and the peer-delay response follow_up message. In addition, the signaling message and the announce message are further added.

[0065] IEEE802.1AS-2020 is a profile of IEEE1588v2 and is mainly used in the industrial and automotive fields. Various PTP messages defined in IEEE802.1AS-2020 include a PTP message header. For example, the structure of a PTP message header is shown in Figure 1. The PTP message header includes a major standard organization ID (majorSdoID) field, a message type field, a minor PTP version field, a PTP version field, a message length field, a PTP domain sequence number field, a minor standard organization ID (minorSdoID) field, a flags field, a correction field, a message type specific field, a source port ID field, a sequence ID field, a control field, and a log message interval field. The fields of the PTP message header are described below.

[0066] For message type, different values ​​represent different PTP messages. For PTP version, if the PTP version is PTP version 1, the value of version PTP is 1, and if the version PTP is PTP version 2, the value of version PTP is 2. For PTP domain sequence number, the value of the PTP domain number field is the default DS domain number, which is a variable. The flags carry various marks. The correction field carries the residence time of the transparent clock, the link delay of the point-to-point transparent clock, the asymmetric compensation, etc. The source port identity is an associated attribute of the sending port. The sequence ID is used to distinguish multiple messages of the same type on the same sending port. For the control field, the value of the control field is determined by the value of the message type field. That is, the value of the control field changes with the message type. The log message interval carries the logarithmic interval for sending messages, and the value of the log message interval is the logarithm of 2.

[0067] The structure of the pdelay_req message is shown in Figure 2 and includes a header field (see 11.4.2 for details) and a reserved field. The structure of the pdelay_resp message is shown in Figure 3 and includes a header field (see 11.4.2 for details), a request receipt timestamp field, and a requesting port identity field. As shown in Figure 4, the pdelay_resp_follow_up message includes a header field (see 11.4.2 for details), a response origin timestamp field, and a requesting port identity field.

[0068] With the expanding scope of application of the IEEE 1588 protocol standard, there are more and more scenarios where clock synchronization is performed by using 1588 messages. 1588 messages can be applied not only to one-to-one port communication systems but also to one-to-many port communication systems. A one-to-one port includes one master port and one slave port, and a one-to-many port includes one master port and multiple slave ports. Whether the port is a one-to-one port or a one-to-many port, each port corresponds to one network device. In the embodiment of the present application, the network device corresponding to the master port is called a master node, and the network device corresponding to the slave port is called a slave node.

[0069] An application scenario of 1588 message in 10BASE-T1S scenario is used as an example to apply to the automotive field. 10BASE-T1S is a technology that uses a single unshielded twisted pair bus line to connect multiple Ethernet devices. 10Base represents the speed level of 10Mbps, T1 represents the physical layer is a single twisted pair (unshielded), and S represents short range. 10BASE-T1S can be applied to one-to-multiple port communication systems.

[0070] For example, the one-to-multiple port communication system shown in FIG. 5 is used as an example. One master node communicates with four slave nodes, respectively, and the four slave nodes are slave node 1, slave node 2, slave node 3, and slave node 4. In the one-to-multiple port communication system, 10BASE-T1S uses the IEEE 802.1AS protocol to implement 1588 function. The IEEE 802.1AS protocol defines a precision clock synchronization system in a broad sense. As the basis of the Time Sensitive Networking (TSN) standard cluster, the IEEE 802.1AS protocol provides basic time synchronization function for other standards in TSN. In understanding TSN, it is important to implement and test the IEEE 802.1AS protocol.

[0071] FIG. 6 shows the message exchange procedure between the master node and the slave node defined in the current 802.1AS protocol, including the exchange process of the following messages:

[0072] (1) A master node sends announce messages and sync messages to slave nodes.

[0073] If the master node is configured to operate in 2-step mode, it will send follow_up messages to the slave nodes as well. If the master node is configured to operate in 1-step mode, it does not need to send follow_up messages to the slave nodes.

[0074] (2) Peer delay (pdelay) messages are sent between the master and slave nodes. The sending of pdelay messages is independent of the port state.

[0075] For example, the master node may send a peer delay request (pdelay_req) message to the slave node, and the slave node may respond with a peer delay response (pdelay_resp) message and a peer delay response follow_up (pdelay_resp_follow_up) message to the master node. In this case, the master node may calculate the link delay between the master node and the slave node, and the frequency offset of the master node relative to the slave node.

[0076] As another example, the slave node may also send a pdelay_req message to the master node, and the master node may respond to the slave node with a pdelay_resp message and a pdelay_resp_follow_up message. In this case, the slave node may calculate the link delay between the master node and the slave node, and the frequency offset of the slave node relative to the master node.

[0077] For a typical one-to-one Ethernet interface, the port state of the port switches. For example, the port of the master node switches from master state to slave state, and the port of the slave node switches from slave state to master state. Therefore, in a typical Ethernet interface scenario, the master node needs to send a pdelay_req message to the slave node to calculate the delay between the master node and the slave node and the frequency offset of the master node relative to the slave node. After the switch is completed, the time can be locked quickly.

[0078] IEEE1588 messages defined in the 802.1AS protocol are encapsulated in multicast mode. In the case of 10BASE-T1S, when the master node sends announce, sync and follow_up messages, the announce, sync and follow_up messages can be received by multiple slave nodes. However, when the master node sends a pdelay_req message, multiple slave nodes receive the pdelay_req message. Then, each slave node responds to the master node with a pdelay_resp message and a pdelay_resp_follow_up message. Therefore, the master node receives multiple pdelay_req messages and multiple pdelay_resp_follow_up messages.

[0079] However, according to the current 802.1AS protocol, when a node receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, the node disables the 1588 function of the local port. Therefore, the master node disables the 1588 function of the local port, so other slave nodes cannot obtain the 1588 time from the master node.

[0080] After sending the pdelay_req message, the slave node also receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, which results in the 1588 functionality of the slave node's local port being disabled.

[0081] In 10BASE-T1S, the port states of the master node and the slave node are fixed. Therefore, the master node does not need to calculate the delay between the master node and the slave node and the frequency offset of the master node relative to the slave node by using the pdelay message. Therefore, the master node's pdelay message transmission interval is set to 127 (see section 10.6.4.3.6 of the IEEE 802.1AS-2020 protocol). In this way, the master node does not send a pdelay_req message to the slave node, and the master node does not receive multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages to process. The 1588 function of the master node's port is not disabled. However, if the slave node sends a pdelay_req message, multiple Pdelay_resp messages and multiple Pdelay_resp_follow_up messages will be received. As a result, the problem persists.

[0082] For example, when a target slave node among the multiple slave nodes transmits a pdelay_req message, the master node and all other slave nodes among the multiple slave nodes receive the pdelay_req message. The master node and each slave node that receives the pdelay_req message respond to the target slave node with a pdelay_resp message and a pdelay_resp_follow_up message. As a result, the target slave node receives multiple pdelay_req messages and multiple pdelay_resp_follow_up messages. According to the current 802.1AS protocol, when a node receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, the node disables the 1588 function of the local port. Therefore, according to the 1588 function defined in the current 802.1AS protocol, the 1588 function of 10BASE-T1S cannot be used normally.

[0083] In view of this, an embodiment of the present application provides a message processing method so that a slave node can normally send a 1588 message in a 10BASE-T1S scenario. The method is applied to a communication system including at least three network devices, and the port state of a port of one network device among the at least three network devices is a master state, and the port state of a port of the other network device is a non-master state. For example, in this embodiment of the present application, an interaction process between a first network device and a second network device among the at least three network devices is used as an example to describe the message processing method provided in this embodiment of the present application. Please refer to FIG. 7. The method includes several processes as follows:

[0084] 701: A second network device sends a first message to a first port via a second port, the second port being a port of the second network device, the first port being a port of the first network device, and the first message is used to measure delay.

[0085] The second network device and the first network device are located in the same communication system. In the embodiment of the present application, the port states of the first port and the second port are not limited. In the IEEE1588 protocol, the following port states are included:

[0086] (1) Initializing state: The port is in the initializing state. After the initialization is completed, the port state changes to the listening state. A port in the initializing state cannot send 1588 messages.

[0087] (2) Faulty state: If a port has a fault, the port is set to the faulty state. A port in the faulty state cannot send 1588 messages, but can respond to received 1588 management messages.

[0088] (3) Disabled State: A port in the disabled state cannot send 1588 messages. A disabled port discards received 1588 messages except for 1588 management messages.

[0089] (4) Listening: A port in this state can receive messages and send pdelay_req messages, pdelay_resp messages, pdelay_resp_follow_up messages, signaling messages, and management messages, but cannot send other messages.

[0090] (5) Pre_master (pre_master) state: The pre_master state is similar to the master state, and is a state in which only pdelay_req messages, pdelay_resp messages, pdelay_resp_follow_up messages, signaling messages, and management messages can be transmitted.

[0091] (6) Master state: A port in the master state can transmit messages that need to be transmitted, such as announce messages, synchronization messages, follow_up messages, pdelay_req messages, pdelay_resp messages, pdelay_resp_follow_up messages, signaling messages, and management messages.

[0092] (7) Passive state: A port in the passive state can only transmit pdelay_req messages, pdelay_resp messages, pdelay_resp_follow_up messages, signaling messages, and management messages.

[0093] (8) Uncalibrated State: The uncalibrated state is a transition state. The uncalibrated state indicates that a master clock source has been selected and is synchronizing. A port in the uncalibrated state can send pdelay_req messages, pdelay_resp messages, pdelay_resp_follow_up messages, signaling messages, and management messages.

[0094] (9) Slave state: The slave state is the state that a device is in after it has been synchronized and stabilized. A port in the slave state can send pdelay_req messages, pdelay_resp messages, pdelay_resp_follow_up messages, signaling messages, and management messages.

[0095] A first message sent by the second network device to the first port via the second port is used for delay measurement, for example, the first message is a pdelay_req message.

[0096] 702: A first network device receives a first message via a first port, the first message being transmitted by a second port.

[0097] In an exemplary embodiment, the first message is a pdelay_req message. After receiving the pdelay_req message, the first network device responds to the second network device with a pdelay_resp message and a pdelay_resp_follow_up message. However, since the first network device and the second network device are in a one-to-many port communication system, according to the current 802.1AS protocol, if the network device receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, the network device will disable the 1588 function of the port receiving the message. In this case, after receiving the first message sent from the second port through the first port, the first network device further determines whether to respond with a pdelay_resp message and a pdelay_resp_follow_up message based on the state of the first port.

[0098] In this embodiment of the present application, if the port state of the first port is a listening state, a pre_master state, an unregulated state, a passive state, or a slave state, the port state of the first port is a non-master state.

[0099] In an example embodiment, in addition to determining whether to respond with a second message based on the port state of the first port, the first network device needs to take into account the port state of the second port and determine whether to respond with a second message, i.e., a pdelay_resp message and a pdelay_resp_follow_up message, based on the port state of the first port and the first condition.

[0100] The first condition is not limited to the embodiment of the present application, and includes, but is not limited to, any one of the following four cases:

[0101] In a first case, the first condition includes that the clock ID in the first message does not match the clock ID of the master node.

[0102] When each network device in the 10BASE-T1S scenario receives the pdelay_req message, the pdelay_req message includes a clock identity. If the clock identity in the first message does not match the clock identity of the master node, it indicates that the second port that transmits the first message is not in the master state. For example, the first 8 bytes of the source port ID field in the message header of the pdelay_req message is the clock identity. If the clock identity in the message header of the pdelay_req message does not match the clock identity of the master clock, the first network device determines that the second port is in a non-master state. That is, the first condition is obtained. If the clock identity in the message header of the pdelay_req message matches the clock identity of the master clock, the first network device determines that the second port is in the master state.

[0103] The clock ID of the master node is obtained from the announce message, sync message, or follow_up message sent by the master node, i.e., a port in the master state, or if the local node is the master node, the clock ID of the local node is the clock ID of the master node.

[0104] In a second case, the first condition includes that a source media access control (MAC) address in the first message does not match the MAC address of the master node.

[0105] In addition to identifying the port state of the second port by using the clock ID of the master node, the method provided in this embodiment of the present application further supports identifying the port state of the second port by using the source MAC address of the master node. For example, when the 1588 message format is transmitted via Ethernet encapsulation, for example, when the 1588 standard 802.1AS used in the current in-vehicle standard is Ethernet encapsulation, the complete 1588 message format is shown in Figure 8. The 1588 message includes a destination MAC (DMAC) field, a source MAC (SMAC) field, an Ethernet type field, a PTP message header field, and a PTP message payload field.

[0106] The first network device determines whether the port state of the second port is a non-master state by comparing whether the source MAC address of the first message matches the MAC address of the master node. For example, the first network device determines that the port state of the second port is a non-master state by comparing whether the source MAC address of the first message does not match the MAC address of the master node. That is, the first condition is obtained. The first network device determines that the port state of the second port is a master state by comparing whether the source MAC address of the first message matches the MAC address of the master node.

[0107] The MAC address of the master node can be obtained from an announce message, a sync message, or a follow_up message sent by the master node, i.e., a port in the master state, or if the local node is the master node, the MAC address of the local node is the MAC address of the master node.

[0108] In a third case, the first condition includes that a source Internet Protocol IP address in the first message does not match an IP address of the master node.

[0109] The method provided in this embodiment of the present application further supports identifying the port state of the second port by using the source IP address of the master node. For example, when the 1588 message format is sent via IP encapsulation, the complete 1588 message format is shown in Figure 9. The 1588 message includes a DMAC field, a SMAC field, an Ethernet type field, an IP header field, a source internet protocol (SIP) field, a destination internet protocol (DIP) field, a source port number (SPN) field, a destination port number (DPN) field, a UDP length field, a UDP checksum field, a PTP message header field, and a PTP message payload field.

[0110] The first network device determines whether the port state of the second port is a non-master state by comparing whether the source IP address in the first message matches the IP address of the master node. For example, the first network device determines that the port state of the second port is a non-master state by comparing whether the source IP address of the first message does not match the IP address of the master node. That is, the first condition is obtained. The first network device determines that the port state of the second port is a master state by comparing whether the source IP address of the first message matches the IP address of the master node.

[0111] The IP address of the master node can be obtained from an announce message, a sync message, or a follow_up message sent by the master node, i.e., a port in the master state, or if the local node is the master node, the IP address of the local node is the IP address of the master node.

[0112] In a fourth case, the first message conveys a port state of the second port, and the first condition includes that the port state of the second port conveyed in the first message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state. For a manner in which the first message conveys the port state of the second port, please refer to the manner in which the second message conveys the port state of the first port in 1003 below.

[0113] For example, if the port state of the second port conveyed in the first message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state, the first network device determines that the second port is in a non-master state and obtains the first condition. If the port state of the second port conveyed in the first message is a master state, the first network device determines that the second port is in a master state.

[0114] 703: The first network device stops responding with the second message based on the port state of the first port being in a non-master state.

[0115] By determining the port state of the first port that receives the first message, if the port state of the first port is a non-master state, the first network device stops responding with a second message, and prevents the second network device from receiving multiple second messages. For example, the second message includes a pdelay_resp message and a pdelay_resp_follow_up message. That is, a network device whose port state is a non-master state does not respond with a pdelay_resp message and a pdelay_resp_follow_up message, and only a network device having a master port responds with a pdelay_resp message and a pdelay_resp_follow_up message. Therefore, a network device that transmits a pdelay_req message does not receive multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, and the network device that transmits the pdelay_req message does not fail. Note that in the 10BASE-T1S interface in this embodiment of the present application, there is only one port whose port state is a master state.

[0116] In an exemplary embodiment of this embodiment of the present application, the first network device stops responding with the second message based on the port state of the first port being in a non-master state and the first condition, to prevent the second network device from receiving multiple second messages. That is, when the port that transmits the pdelay_req message is in a non-master state and the port that receives the pdelay_req message is in a non-master state, the network device of the receiving port does not respond with a pdelay_resp message and a pdelay_resp_follow_up message. Thus, the network device that transmits the pdelay_req message does not receive multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, and the network device that transmits the pdelay_req message does not fail.

[0117] Therefore, according to the message processing method provided in this embodiment of the present application, 1588 messages can be normally transmitted in a 10BASE-T1S scenario, ensuring that 1588 time synchronization can be normally obtained when 10BASE-T1S is used in the automotive field and other fields.

[0118] In addition, when the port state of the second port is a non-master state and the port state of the first port is a master state, the first network device responds to the second port through the first port with a pdelay_resp message and a pdelay_resp_follow_up message, so that the second network device where the second port is located can perform time synchronization normally. In an exemplary embodiment, when the port state of the first port is a master state, the first port of the first network device normally responds to the second port of the second network device with a pdelay_resp message and a pdelay_resp_follow_up message, but the port of the network device whose port state is a non-master state does not respond with a pdelay_resp message and a pdelay_resp_follow_up message to prevent the port of the network device that transmits the pdelay_req message from receiving multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages.

[0119] According to the port state defined in the IEEE1588v2 protocol, if a port is in a master / slave / unaggregated / pre_master / listening / passive state, the port needs to send a pdelay_req message and respond with a pdelay_resp message and a pdelay_resp_follow_up message. However, according to the method provided in this embodiment of the present application, only the port whose port state is in a master state needs to respond with a pdelay_resp message and a pdelay_resp_follow_up message. Therefore, it can be specified that if the port state is in a slave / unaggregated / pre_master / listening / passive state, the port does not need to respond with a pdelay_resp message and a pdelay_resp_follow_up message.

[0120] In an exemplary embodiment, in addition to the method in which the first network device stops responding with the second message if the port state of the first port that receives the first message is a non-master state, the method provided in this embodiment of the present application further supports another way in which 1588 messages are usually sent in 10BASE-T1S scenarios, see Figure 10. The message processing method provided in one embodiment of the present application includes several processes as follows:

[0121] 1001: A second network device sends a first message to a first port via a second port, the second port being a port of the second network device, the first port being a port of a first network device, and the first message is used to measure delay.

[0122] The second network device and the first network device are in the same communication system. The communication system includes at least three network devices, and the port state of one port of the at least three network devices is a master state, and the port state of the port of the other network devices is a non-master state. For example, in this embodiment of the present application, the interaction process between the first network device and the second network device in the at least three network devices is used as an example to describe the message processing method provided in this embodiment of the present application. The port states of the first port and the second port are not limited in the embodiment of the present application. For the port states, please refer to the related description of 701 above. For example, the first message is used to measure delay, for example, a pdelay_req message.

[0123] 1002: A first network device receives, via a first port, a first message transmitted by a second port.

[0124] For example, the first message is a pdelay_req message. After receiving the pdelay_req message, the first network device responds to the second network device with a second message, for example, a pdelay_resp message and a pdelay_resp_follow_up message. However, since the first network device and the second network device are in a one-to-many port communication system, according to the current 802.1AS protocol, if the network device receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages, the network device will disable the 1588 function of the port that receives multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages. Therefore, after receiving the first message sent by the second port through the first port, the first network device needs to determine the port status of the first port, and determine whether to respond with a pdelay_resp message and a pdelay_resp_follow_up message based on the port status of the first port. In an example embodiment, in addition to determining whether to respond with the second message based on the port state of the first port, the first network device may further consider the first condition and further determine whether to respond with a pdelay_resp message and a pdelay_resp_follow_up message based on the port state of the first port and the first condition.

[0125] For how the first network device determines the port state of the first port and the first condition, please refer to the related description of 702. The details will not be described again here.

[0126] 1003: The first network device responds with a second message to the second port via the first port based on the port state of the first port being a non-master state, where the second message includes a response message and a follow_up message.

[0127] In an example embodiment, after determining that the port state of the first port is a non-master state, the first network device may not respond with a second message, for example, may not respond with a pdelay_resp message and a pdelay_resp_follow_up message, to prevent the network device sending the pdelay_req message from receiving multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages. Otherwise, the network device sending the pdelay_req message disables the 1588 function of the port receiving the multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages. In addition, the method provided in this embodiment of the present application further supports implementing the function of the 1588 message when the second message is successfully responded to. However, in order to prevent the network device of the port that transmits the pdelay_req message from receiving multiple pdelay_resp messages and pdelay_resp_follow_up messages and thus disabling the port, in the method provided in this embodiment of the present application, the port state of the first port is conveyed in the second message, so that the second network device can determine the port state of the first port to determine whether to process the received pdelay_resp message and the received pdelay_resp_follow_up message.

[0128] In an example embodiment, in addition to determining the port state of the first port, the first network device may further determine whether a first condition is satisfied. Based on the port state of the first port being a non-master state and the first condition, the first network device may not respond with a second message, for example, not respond with a pdelay_resp message and a pdelay_resp_follow_up message, to prevent the network device sending the pdelay_req message from receiving multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages. The network device sending the pdelay_req message disables the 1588 function of the port receiving the multiple pdelay_resp messages and multiple pdelay_resp_follow_up messages. In addition, the method provided in this embodiment of the present application further supports implementing the function of the 1588 message when the second message is successfully responded to. However, in order to prevent a network device that sends a pdelay_req message and whose port is in a non-master state from having its port disabled by receiving multiple pdelay_resp and pdelay_resp_follow_up messages, the method provided in this embodiment of the present application conveys the port state of the first port in the second message. In this way, the second network device can determine the port state of the first port to determine whether to process the received pdelay_resp and pdelay_resp_follow_up messages.

[0129] For example, the first message may also convey the port state of the second port. The manner in which the first message conveys the port state of the second port and the second message conveys the port state of the first port is not limited in the embodiment of the present application. For example, in the case of the above-mentioned nine states, the state of the port may be conveyed by using four bits. For example, based on the message header of the PTP message shown in FIG. 1, the flag field of the PTP message header is defined in the IEEE 802.1AS protocol as shown in Table 1 below. Bits 3 / 4 / 7 of the 0th byte and bits 6 / 7 of the 1st byte are reserved fields, and in this embodiment of the present application, four bits may be selected to convey the port state.

[0130] [Table 1] TIFF0007666824000002.tif248166 TIFF0007666824000003.tif183169

[0131] In addition to the above method of selecting 4 bits from the flags field to convey the port status, the method provided in this embodiment of the present application further supports the method of adding one byte to the pdelay_req message, the pdelay_resp message, and the pdelay_resp_follow_up message, so that 4 bits of the added byte are used to convey the port status.

[0132] 1004: The second network device receives, via a second port, a second message responded to via the first port, and the second network device stops processing the second message based on the port state of the first port being a non-master state.

[0133] After receiving the second message responded to through the first port through the second port, the second network device needs to further determine the port state of the first port to determine whether to process the second message responded to through the first port. The port state of the first port is a non-master state, including but not limited to the following four cases:

[0134] Case 1: If the second message conveys the port state of the first port, and the port state of the first port conveyed in the second message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state, the port state of the first port is a non-master state.

[0135] In case 1, since the second message conveys the port state of the first port, the second network device stops processing the second message after determining that the port state of the first port is a non-master state according to the port state of the first port conveyed in the second message. In this way, the second network device does not process second messages sent by other slave nodes, and processes only second messages responded to via the master node, thereby preventing the second port of the second network device from being disabled due to processing multiple second messages.

[0136] If the second message does not convey the port status of the first port, the method further includes determining the port status of the first port by, but not limited to, any of the following methods 2 to 4 after the second network device receives, via the second port, the second message responded to via the first port.

[0137] Case 2: If the clock ID in the second message does not match the clock ID of the master node, the port state of the first port is a non-master state.

[0138] When each network device in the 10BASE-T1S scenario receives the pdelay_resp message and the pdelay_resp_follow_up message, the pdelay_resp message and the pdelay_resp_follow_up message include a clock ID. If the clock ID in the second message does not match the clock ID of the master node, it indicates that the port state of the first port that transmits the second message is not a master state. For example, the first 8 bytes of the source port ID field of the message header of the pdelay_resp message and the pdelay_resp_follow_up message is the clock identity. If the clock ID in the message header of the pdelay_resp message and the pdelay_resp_follow_up message does not match the clock ID of the master clock, the second network device determines that the first port is in a non-master state. If the clock ID in the message header of the pdelay_resp message and the pdelay_resp_follow_up message matches the clock ID of the master clock, the second network device determines that the first port is in a master state.

[0139] The clock ID of the master clock can be obtained from an announce message, a sync message, or a follow_up message sent by the master node, i.e., a port in the master state, or if the local node is the master node, the clock ID of the local node is the clock ID of the master node.

[0140] Case 3: If the source MAC address in the second message does not match the MAC address of the master node, the port state of the first port is a non-master state.

[0141] In addition to identifying the port state of the first port by using the clock ID of the master node, the method provided in this embodiment of the present application further supports identifying the port state of the first port by using the source MAC address of the master node. For example, when the 1588 message format is transmitted via Ethernet encapsulation, for example, when the 1588 standard 802.1AS used in the current in-vehicle standard is Ethernet encapsulation, the complete 1588 message format is shown in Figure 8. The 1588 message includes a destination MAC (DMAC) field, a source MAC (SMAC) field, an Ethernet type field, a PTP message header field, and a PTP message payload field.

[0142] The second network device determines whether the port state of the first port is a non-master state by comparing whether the source MAC address of the second message matches the MAC address of the master node. For example, the second network device determines that the port state of the first port is a non-master state by comparing whether the source MAC address of the second message does not match the MAC address of the master node. The second network device determines that the port state of the first port is a master state by comparing whether the source MAC address of the second message matches the MAC address of the master node.

[0143] The MAC address of the master node can be obtained from an announce message, a sync message, or a follow_up message sent by the master node, i.e., a port in the master state, or if the local node is the master node, the MAC address of the local node is the MAC address of the master node.

[0144] Case 4: If the source IP address in the second message does not match the IP address of the master node, the port state of the first port is a non-master state.

[0145] The method provided in this embodiment of the present application further supports identifying the port state of the first port by using the source IP address of the master node. For example, when the 1588 message format is sent via IP encapsulation, the complete 1588 message format is shown in Figure 9. The 1588 message includes a DMAC field, a SMAC field, an Ethernet type field, an IP header field, a source internet protocol (SIP) field, a destination internet protocol (DIP) field, a source port number (SPN) field, a destination port number (DPN) field, a UDP length field, a UDP checksum field, a PTP message header field, and a PTP message payload field.

[0146] The second network device determines whether the port state of the first port is a non-master state by comparing whether the source IP address of the second message matches the IP address of the master node. For example, the second network device determines that the port state of the first port is a non-master state by comparing whether the source IP address of the second message does not match the IP address of the master node. The second network device determines that the port state of the first port is a master state by comparing whether the source IP address of the second message matches the IP address of the master node.

[0147] The IP address of the master node can be obtained from an announce message, a sync message, or a follow_up message sent by the master node, i.e., a port in the master state, or if the local node is the master node, the IP address of the local node is the IP address of the master node.

[0148] Optionally, in an example embodiment, the second network device stops processing the second message based on the port state of the first port being a non-master state and the second condition.

[0149] For example, the second condition includes the port state of the second port being a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state. Even if the second network device receives the second message responded to via the first port based on the first port being a non-master state and the second condition, the second network device stops processing the second message to prevent the network device from disabling the 1588 function of the second port receiving the message when multiple second messages are received.

[0150] For example, if a second network device in which the second port is located determines that the port state of the first port is a non-master state based on the port state of the first port conveyed in the pdelay_resp message and the pdelay_resp_follow_up message being a non-master state or based on the source clock ID, source MAC address or source IP address conveyed in the pdelay_resp message and the pdelay_resp_follow_up message, and the port state of the second port is also a non-master state, the second network device may not process the pdelay_resp message and the pdelay_resp_follow_up message.

[0151] It should be noted that if a network device (a network device whose port is in master or non-master state) does not send a pdelay_req message, but can receive a pdelay_resp message and a pdelay_resp_follow_up message responded to by another network device, and the requested port ID field in the pdelay_resp message and the pdelay_resp_follow_up message is different from the port ID of the port receiving the message on the network device, then the network device does not have to process the message according to the current 802.1AS protocol.

[0152] In addition, the method provided in this embodiment of the present application has only been described using an example in which 1588 messages are transmitted in a 10BASE-T1S scenario. The method provided in this embodiment of the present application is not only applicable to transmitting 1588 messages in a 10BASE-T1S scenario, but also applicable to other possible point-to-multiple port communication systems. In the embodiment of the present application, the application scenario of the method is not limited.

[0153] The above describes a message processing method in an embodiment of the present application. Corresponding to the above method, an embodiment of the present application further provides a message processing device. FIG. 11 is a schematic diagram of the structure of a message processing device according to an embodiment of the present application. The device is applied to a first network device, which is the first network device shown in either FIG. 7 or FIG. 10. Based on the following modules shown in FIG. 11, the message processing device shown in FIG. 11 can perform all or part of the operations performed by the first network device. It should be understood that the device may include more additional modules than the modules shown, or some of the modules shown may be omitted. This is not limited in the embodiment of the present application. As shown in FIG. 11, the device includes: a receiving module 1101 configured to receive, via a first port, a first message transmitted by a second port, the first port being a port of a first network device, the second port being a port of a second network device, the first message being used to measure delay; a processing module 1102 configured to stop responding with a second message or respond with a second message to the second port via the first port based on a port state of the first port being a non-master state, the second message conveying a port state of the first port, the second message including a response message and a follow_up message; Includes.

[0154] In possible implementations, the port state of the first port being a non-master state includes the port state of the first port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state.

[0155] In a possible implementation, the processing module 1102 is configured to stop responding with the second message based on the port state of the first port being a non-master state and the first condition.

[0156] In a possible implementation, the first condition includes that the clock ID in the first message does not match the clock ID of the master node.

[0157] In a possible implementation, the first condition includes that the source media access control MAC address in the first message does not match the MAC address of the master node.

[0158] In a possible implementation, the first condition includes that the source Internet Protocol IP address in the first message does not match the IP address of the master node.

[0159] In a possible implementation, the first message conveys a port state of the second port, and the first condition includes that the port state of the second port conveyed by the first message is a listening state, a pre_master state, an unadjusted state, a passive state, or a slave state.

[0160] FIG. 12 is a schematic diagram of the structure of a message processing device according to an embodiment of the present application. The device is applied to a second network device, which is the second network device shown in either FIG. 7 or FIG. 10. Based on the following modules shown in FIG. 12, the message processing device shown in FIG. 12 can perform all or part of the operations performed by the second network device. It should be understood that the device may include more additional modules than the modules shown, or some of the modules shown may be omitted. This is not limited in the embodiment of the present application. As shown in FIG. 12, the device includes: a transmitting module 1201 configured to transmit a first message to a first port via a second port, the second port being a port of a second network device, the first port being a port of a first network device, the first message being used to measure delay; a receiving module 1202 configured to receive, via a second port, a second message that is responded to via the first port, the second message including a response message and a follow_up message; a processing module 1203 configured to stop processing the second message based on a port state of the first port being a non-master state; Includes.

[0161] In a possible implementation, if the clock ID in the second message does not match the clock ID of the master node, the port state of the first port is a non-master state.

[0162] In a possible implementation, if the source media access control MAC address in the second message does not match the MAC address of the master node, the port state of the first port is a non-master state.

[0163] In a possible implementation, if the source Internet Protocol IP address of the second message does not match the IP address of the master node, the port state of the first port is a non-master state.

[0164] In a possible implementation, a second message conveys a port state of a first port, and if the port state of the first port conveyed in the second message is a listening state, a pre_master state, an unadjusted state, a passive state or a slave state, the port state of the first port is a non-master state.

[0165] In a possible implementation, the processing module is configured to stop processing the second message based on the port state of the first port being a non-master state and the second condition.

[0166] In a possible implementation, the second condition includes the port state of the second port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state.

[0167] In a possible implementation, the first message conveys the port state of the second port.

[0168] It should be understood that when the device shown in FIG. 11 or FIG. 12 implements the functions of the device, the above division into functional modules is only used as an example for explanation. In practical application, the above functions can be assigned to different functional modules for implementation based on requirements. That is, the internal structure of the device is divided into different functional modules to implement all or part of the above functions. In addition, the device and method embodiments provided in the above embodiments relate to the same concept. For the specific implementation process of the device, please refer to the method embodiment. The details will not be described again here.

[0169] Please refer to Fig. 13. Fig. 13 is a schematic diagram of the structure of a network device 2000 according to an exemplary embodiment of the present application. The network device 2000 shown in Fig. 13 is configured to perform operations related to the message processing method shown in Fig. 7 or Fig. 10. The network device 2000 is, for example, a switch or a router, and the network device 2000 can be implemented by using a general bus architecture.

[0170] As shown in FIG. 13, the network device 2000 includes at least one processor 2001 , a memory 2003 and at least one communication interface 2004 .

[0171] The processor 2001 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits configured to implement the solutions of the present application. For example, the processor 2001 may include an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or another programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor may implement or execute various logic blocks, modules, and circuits described with reference to the contents disclosed in the embodiments of the present invention. Alternatively, the processor may be a combination of processors that implement computing functions, such as a combination of one or more microprocessors or a combination of a DSP and a microprocessor.

[0172] Optionally, the network device 2000 further includes a bus. The bus is configured to transmit information between components of the network device 2000. The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be classified into an address bus, a data bus, a control bus, etc. For clarity, only one thick line is used to represent the bus in FIG. 13, but this does not mean that there is only one bus or only one type of bus.

[0173] The memory 2003 may be, for example, but not limited to, a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other compact disc storage device, an optical disc storage device (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying and storing program code in the form of instructions or data structures and accessible by a computer. For example, the memory 2003 exists independently and is connected to the processor 2001 by using a bus. Alternatively, the memory 2003 may be integrated with the processor 2001.

[0174] The communication interface 2004 is any device, such as a transceiver, for communicating with other devices or communication networks. The communication network may be an Ethernet, a Radio Access Network (RAN), a wireless local area network (WLAN), or the like. The communication interface 2004 may include a wired communication interface, or alternatively may include a wireless communication interface. Specifically, the communication interface 2004 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. In this embodiment of the present application, the communication interface 2004 may be used by the network device 2000 to communicate with another device.

[0175] Among particular implementations, in one embodiment, the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 13. Each processor may be a single-core (single-CPU) processor or a multi-core (multiple-CPU) processor. A processor herein may be one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0176] Among particular implementations, in one embodiment, network device 2000 may include multiple processors, such as processor 2001 and processor 2005 shown in FIG. 13. Each processor may be a single-core processor (single CPU) or a multi-core processor (multiple CPUs). A processor herein may be one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0177] During a particular implementation, in one embodiment, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and may display information in a number of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display, a cathode ray tube (CRT) display, or a projector. The input device communicates with the processor 2001 and may receive input by a user in a number of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensing device.

[0178] In some embodiments, the memory 2003 is configured to store a program code 2010 for executing the solution of the present application, and the processor 2001 may execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the message processing method provided in the method embodiment by using the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 may also store program code or instructions for executing the solution of the present application.

[0179] In a particular embodiment, the network device 2000 in this embodiment of the present application may correspond to the first network device in the above method embodiment. The processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in FIG. 13 can perform all or part of the operations performed by the first network device.

[0180] In a specific embodiment, the network device 2000 in this embodiment of the present application may correspond to the second network device in the above method embodiment. The processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in FIG. 13 can perform all or part of the operations performed by the second network device.

[0181] The network device 2000 may further correspond to the devices shown in Figures 11 and 12. Each functional module in the devices shown in Figures 11 and 12 is implemented by using software of the network device 2000. That is, the functional modules included in the devices shown in Figures 11 and 12 are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.

[0182] The steps of the message processing method shown in Figures 7 and 10 are completed by using instructions in the form of software in the processor of the network device 2000 or in a hardware integrated logic circuit. Each step of the method disclosed with reference to the embodiments of the present application can be performed directly by a hardware processor or by using a combination of hardware and software modules in the processor. The software modules can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with the hardware in the processor. To avoid repetition, the details will not be described again here.

[0183] Please refer to Fig. 14. Fig. 14 is a schematic diagram of the structure of a network device 2100 according to another exemplary embodiment of the present application. The network device 2100 shown in Fig. 14 is configured to perform all or part of the operations of the message processing method shown in Fig. 7 and Fig. 10. The network device 2100 is, for example, a switch or a router, and the network device 2100 can be implemented by using a general-purpose bus architecture.

[0184] As shown in FIG. 14, the network device 2100 includes a main control board 2110 and an interface board 2130 .

[0185] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is configured to control and manage the components in the network device 2100, including route calculation, device management, device maintenance, and protocol-based processing. The main control board 2110 includes a central processing unit 2111 and a memory 2112.

[0186] The interface board 2130 is also called a line processing unit (LPU), a line card, or a service board. The interface board 2130 provides various service interfaces and is configured to forward data packets. The service interfaces include, but are not limited to, an Ethernet interface, a Packet over SONET / SDH (POS) interface, etc. The Ethernet interface is, for example, a Flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients). The interface board 2130 includes a central processing unit 2131, a network processor 2132, a forwarding entry memory 2134, and a physical interface card (PIC) 2133.

[0187] A central processing unit 2131 on the interface board 2130 is configured to control and manage the interface board 2130 and to communicate with a central processing unit 2111 on the main control board 2110 .

[0188] The network processor 2132 is configured to perform message forwarding processing. One form of the network processor 2132 may be a forwarding chip. The forwarding chip may be a network processor (NP). In some embodiments, the forwarding chip may be implemented by using an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is configured to forward a received message based on a forwarding table stored in the forwarding entry memory 2134. If the destination address of the message is an address of the network device 2100, the network processor 2132 sends the message to a CPU (e.g., central processing unit 2131) for processing. If the destination address of the message is not an address of the network device 2100, the network processor 2132 searches for a next hop and an outbound interface corresponding to the destination address in the forwarding table based on the destination address, and forwards the message to the outbound interface corresponding to the destination address. Processing for uplink messages may include processing at the message input interface and a forwarding table lookup, while processing for downlink messages may include a forwarding table lookup, etc. In some embodiments, the central processing unit may also perform the functionality of a forwarding chip, e.g., software forwarding based on a general purpose CPU, such that the interface board does not require a forwarding chip.

[0189] The physical interface card 2133 is configured to implement a physical layer interconnection function. Original traffic enters the interface board 2130 from the physical interface card 2133, and processed messages are sent out from the physical interface card 2133. The physical interface card 2133, also called a subcard, may be installed in the interface board 2130, and is responsible for converting optical and electronic signals into messages, performing validity checks on the messages, and then forwarding the messages to the network processor 2132 for processing. In some embodiments, the central processing unit 2131 alternatively performs the functions of the network processor 2132, for example, implementing software forwarding based on a general-purpose CPU. Therefore, the physical interface card 2133 does not require the network processor 2132.

[0190] Optionally, the network device 2100 includes multiple interface boards. For example, the network device 2100 further includes an interface board 2140, which includes a central processing unit 2141, a network processor 2142, a forwarding entry memory 2144, and a physical interface card 2143. The functions and implementations of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and the details will not be described again here.

[0191] Optionally, the network device 2100 further includes a switching board 2120. The switching board 2120 may also be called a switch fabric unit (SFU). When the network device has multiple interface boards, the switching board 2120 is configured to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate with each other through the switching board 2120.

[0192] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140 and the switching board 2120 are connected to the system backboard by using a system bus for interworking. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and between the main control board 2110 and the interface board 2140, and the communication between the main control board 2110 and the interface board 2130 and between the main control board 2110 and the interface board 2140 is performed by using the IPC channel.

[0193] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes components used for forwarding, such as a forwarding entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol messages, and setting and maintaining the state of the network device. The control plane delivers the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 2132 searches the forwarding tables delivered by the control plane and forwards messages received by the physical interface card 2133 based on the tables. The forwarding tables delivered by the control plane may be stored in the forwarding entry memory 2134. In some embodiments, the control plane and the forwarding plane may be completely separate and are not on the same network device.

[0194] However, there may be one or more main control boards. When there are multiple main control boards, the main control board may include an active main control board and a standby main control board. There may be one or more interface boards. A network device with stronger data processing capability provides more interface boards. There may be one or more physical interface cards on the interface board. There may be no switching board, or there may be one or more switching boards. When there are multiple switching boards, both load balancing and redundancy backup may be implemented. In a centralized forwarding architecture, the network device may not require a switching board, and the interface board provides the function of processing service data in the entire system. In a distributed forwarding architecture, the network device has at least one switching board, and uses the switching board to implement data exchange between multiple interface boards to provide large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the network device in the distributed architecture are superior to those of the network device in the centralized architecture. Optionally, the network device may alternatively have a form with only one card. Specifically, there is no switching board, and the functions of the interface board and the main control board are integrated into the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board are combined to form one central processing unit on the card, and the functions obtained by combining two central processing units can be performed. This type of network device (e.g., a network device such as a low-end switch or router) has weak data switching and processing capabilities. The specific architecture to be used depends on the specific network deployment scenario. This specification is not limited thereto.

[0195] In a particular embodiment, the network device 2100 corresponds to the message processing device applied to the first network device shown in Fig. 11. In some embodiments, the receiving module 1101 of the message processing device shown in Fig. 11 is equivalent to the physical interface card 2133 of the network device 2100. The processing module 1102 of the message processing device shown in Fig. 11 is equivalent to the central processing unit 2111 or the network processor 2132 of the network device 2100.

[0196] In some embodiments, the network device 2100 further corresponds to the message processing device applied in the second network device shown in Fig. 12. In some embodiments, the sending module 1201 and the receiving module 1202 of the message processing device shown in Fig. 12 are equivalent to the physical interface card 2133 of the network device 2100. The processing module 1203 of the message processing device shown in Fig. 12 is equivalent to the central processing unit 2111 or the network processor 2132 of the network device 2100.

[0197] Based on the network devices shown in Fig. 13 and Fig. 14, an embodiment of the present application further provides a communication system. The communication system includes a first network device and a second network device. Optionally, the first network device is the network device 2000 shown in Fig. 13 or the network device 2100 shown in Fig. 14, and the second network device is the network device 2000 shown in Fig. 13 or the network device 2100 shown in Fig. 14.

[0198] For the methods performed by the first network device and the second network device, please refer to the relevant descriptions of the embodiments shown in Figures 7 and 10, and the details will not be described again here.

[0199] It should be understood that the processor may be a central processing unit (CPU) or other general purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general purpose processor may be a microprocessor or any conventional processor, etc. Additionally, the processor may be a processor supporting the advanced reduced instruction set computer (ARM) architecture.

[0200] Also, in any embodiment, the memory may include read-only memory and random access memory to provide instructions and data for the processor. The memory may further include non-volatile random access memory. For example, the memory may further store device type information.

[0201] The memory may be volatile or nonvolatile memory or may include both volatile and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of example and not limitation, many types of RAM are used, including static random access memory (static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synclink DRAM, SLDRAM), and direct rambus random access memory (direct rambus RAM, DR RAM).

[0202] There is further provided a computer readable storage medium having stored thereon at least one instruction, which when loaded and executed by a processor performs a message processing method according to any one of the above descriptions.

[0203] The present application provides a computer program, which, when executed by a computer, enables a processor or computer to perform corresponding steps and / or procedures in the above method embodiments.

[0204] A chip is provided, the chip including a processor and configured to retrieve from the memory and execute instructions stored in the memory, such that a communications device in which the chip is implemented performs the method in the above aspect.

[0205] Another chip is provided, the chip including an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory being connected to each other via an interconnect channel, the processor being configured to execute code in the memory, the code being executed to configure the processor to perform the method of the above aspect.

[0206] All or part of the above embodiments may be implemented by using software, hardware, firmware or any combination thereof. When software is used to implement the embodiments, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the procedures or functions of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, optical fiber, or digital subscriber line) or wirelessly (e.g., infrared, radio, microwave). The computer-readable storage medium may be any available medium accessible by a computer or may be a data storage device, such as a server or data center that integrates one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, or a magnetic tape), an optical medium (eg, a DVD), a semiconductor medium (eg, a solid-state drive), or the like.

[0207] The objectives, technical solutions and beneficial effects of the present application are described in more detail in the above specific implementations. It should be understood that the above description is only a specific implementation of the present application, and is not intended to limit the protection scope of the present application. Any modifications, equivalent replacements or improvements made based on the technical solutions of the present application shall be included in the protection scope of the present application.

[0208] Those skilled in the art will recognize that the implementation can be performed by using software, hardware, firmware, or a combination thereof with reference to the method steps and modules described in the embodiments disclosed herein. In order to clearly describe the compatibility between hardware and software, the above generally describes the steps and configurations of each embodiment based on functions. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the functions described for each specific application, but such implementation should not be considered as going beyond the scope of the present application.

[0209] Those skilled in the art will understand that all or part of the steps of the embodiment can be implemented by hardware or a program instructing related hardware. The program can be stored in a computer-readable storage medium. The storage medium can include a read-only memory, a magnetic disk, or an optical disk.

[0210] When software is used to implement the embodiments, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer program instructions. For example, the methods in the embodiments of the present application may be described in the context of machine-executable instructions. Machine-executable instructions are program modules that execute on devices, such as target real or virtual processors. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., that perform particular tasks or implement particular abstract data structures. In various embodiments, the functionality of the program modules may be combined or split among the described program modules. Machine-executable instructions for a program module may be executed locally or in a distributed device. In a distributed device, the program modules may be located in both local and remote storage media.

[0211] The computer program code used to implement the methods of the embodiments of the present application may be written in one or more programming languages. The computer program code may be provided for a processor of a general purpose computer, a special purpose computer, or another programmable data processing apparatus, so that when the program code is executed by the computer or another programmable data processing apparatus, the functions / operations specified in the flowcharts and / or block diagrams are performed. The program code may be executed entirely on the computer, partially on the computer, as a separate software package, partially on the computer, partially on a remote computer, or entirely on a remote computer or server.

[0212] In the context of the embodiments of the present application, the computer program code or associated data may be carried by any suitable carrier to enable a device, an apparatus or a processor to perform the various processes and operations described above. Examples of the carrier include a signal, a computer readable medium, etc.

[0213] Examples of signals include electrical, optical, radio, audio or other types of signal propagation signals, such as carrier waves and infrared signals.

[0214] A computer-readable medium may be any tangible medium that contains or stores a program used for or associated with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0215] For convenience and simplicity of description, those skilled in the art can clearly understand that the detailed work processes of the above systems, devices and modules may be referred to the corresponding processes in the above method embodiments, and the details will not be described again here.

[0216] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is only an example. For example, the module division is only a logical functional division, and there may be other divisions during actual implementation. For example, multiple modules or components may be combined or integrated into another system, or some functions may be ignored or not performed. In addition, the shown or discussed interconnections or direct connections or communication connections may be implemented using some interfaces. Indirect connections or communication connections between devices or modules may be electrical connections, mechanical connections, or other forms of connections.

[0217] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one location or distributed across multiple network modules. Some or all of the modules may be selected based on actual requirements to achieve the objectives of the solutions in the embodiments of the present application.

[0218] In addition, the functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The integrated module may be implemented in the form of hardware or in the form of a software functional module.

[0219] When the integrated module is implemented in the form of a software function module and sold or used as an independent product, the integrated module may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be implemented in the form of a software product, either essentially or in part contributing to the prior art, or in whole or in part of the technical solution. The computer software product is stored in a storage medium and includes some instructions that cause a computer device (which may be a personal computer, a server or a network device) to perform all or part of the steps of the method described in the embodiments of the present application. The above storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0220] In this application, terms such as "first", "second", etc. are used to distinguish between the same or similar items whose effects and functions are basically the same. It should be understood that there is no logical or chronological dependency between "first", "second", and "nth", and the number and execution order are not limited. In the following description, various elements are described using terms such as "first", "second", etc., but it should also be understood that these elements should not be limited by the terms. These terms are only used to distinguish one element from another element. For example, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image, without departing from the scope of various examples. Both the first image and the second image may be images, but in some cases may be separate and different images.

[0221] It should be further understood that the sequence numbers of the processes do not mean the execution sequence in the embodiments of the present application. The execution sequence of the processes should be determined based on the functions and internal logic of the processes, and should not be construed as any limitation on the implementation process of the embodiments of the present application.

[0222] As used herein, the term "at least one" means one or more, and the term "plurality" means two or more. For example, a plurality of second messages means two or more second messages. As used herein, the terms "system" and "network" may be used interchangeably.

[0223] It should be understood that the terminology used in the description of the various examples herein is intended to describe particular examples only and is not intended to be limiting. The singular forms "a" and "an" and "the" used in the description of the various examples and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise.

[0224] It should be further understood that the term "comprising" (also referred to as "including", "including", "including" and "including") as used herein specifies the presence of stated features, integers, steps, operations, elements and / or components and does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or components thereof.

[0225] It should be further understood that the term "if" may be interpreted to mean "when" or "upon," "when determining," or "when detecting." Similarly, depending on the context, the phrase "if determined" or "if (a described condition or event) is detected" may be interpreted to mean "when determined" or "when determined" or "if (a described condition or event) is detected" or "when (a described condition or event) is detected" or "when (a described condition or event) is detected."

[0226] Determining B based on A does not mean determining B based only on A; B may alternatively be determined based on A and / or other information.

[0227] References throughout this specification to "one embodiment," "an embodiment," or "possible implementations" should be understood to mean that a particular feature, structure, or characteristic associated with an embodiment or implementation is included in at least one embodiment of the present application. Thus, the appearances of "in one embodiment," "in an embodiment," or "in a possible implementation" throughout this specification do not necessarily refer to the same embodiment. In addition, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0228] The above description is only an arbitrary embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement or improvement made without departing from the principle of the present application shall be within the protection scope of the present application.

Claims

1. 1. A method of message processing for a point-to-multipoint communication system, the point-to-multipoint communication system including at least a first network device and a second network device, the method comprising: receiving, by the first network device via a first port, a first message transmitted by a second port, the first port being a port of the first network device and the second port being a port of a second network device, the first message being used to measure delay, the first message being a peer delay request message; based on a port state of the first port being a non-master state, not sending a second message by the first network device, the second message including a peer delayed response message and a peer delayed follow_up message; Including, The method, wherein the port state of the first port being a non-master state includes the port state of the first port being a listening state, a pre_master state, an unregulated state, a passive state, or a slave state.

2. Not transmitting a second message, by the first network device, based on a port state of the first port being a non-master state, not transmitting, by the first network device, the second message based on a port state of the first port being a non-master state and a first condition; The method of claim 1 , comprising:

3. The method of claim 2 , wherein the first condition includes a clock ID in the first message not matching a clock ID of a master node.

4. The method of claim 2 , wherein the first condition includes a source media access control (MAC) address in the first message not matching a MAC address of a master node.

5. 3. The method of claim 2, wherein the first condition includes a source Internet Protocol IP address in the first message not matching an IP address of a master node.

6. 3. The method of claim 2, wherein the first message conveys a port state of the second port, and the first condition includes that the port state of the second port conveyed by the first message is a listening state, a pre_master state, an uncoordinated state, a passive state, or a slave state.

7. The method according to claim 1 , wherein the method is implemented with a peer delay mechanism.

8. A message processing device, the device being adapted to implement a method for processing messages according to any one of claims 1 to 7.

9. A network device, Memory and processor, Including, A network device, the memory storing at least one instruction which, when loaded and executed by the processor, causes the network device to implement a method for processing messages according to any one of claims 1 to 7.

10. A message processing system comprising a first network device and a second network device, the first network device being configured to implement a message processing method according to any one of claims 1 to 7.

11. A computer readable storage medium storing at least one instruction which, when loaded and executed by a processor, performs a method for processing messages according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Measurement device, protection relay, and program

    JP2012065445A

  • Time synchronization method and time synchronization system

    JP2016036060A

  • Latency determination in substation networks

    US20150222520A1