Communication method, device and system
By obtaining and adding retention timestamps in the forwarding nodes of power equipment, the problem of unstable transmission time of relay protection services between power equipment is solved, the accuracy and stability of transmission time are achieved, and power grid accidents are avoided.
Patent Information
- Application Number
- CN201910996343.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-18
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2039-10-18
AI Technical Summary
In the power industry, the transmission time of relay protection services between power equipment is unstable. Existing technologies rely on the same clock source for time synchronization, but the clock source is vulnerable to attacks, resulting in synchronization failures. There is no guarantee that the time variation value of the service message in the transmission tunnel does not exceed the preset threshold.
By obtaining and adding the retention timestamp in the forwarding node of the transmission tunnel, the accurate time calculation of the service message on the transmission tunnel is ensured, including saving the correspondence between the receiving timestamp and the retention timestamp in the forwarding node, or directly adding the timestamp in the message to simplify the storage requirements, and controlling the message sending time according to the total retention time and the time threshold at the end node.
The accuracy of business message transmission time is improved, ensuring that the time change value of each message received by the power equipment on the transmission tunnel does not exceed the preset threshold, avoiding power grid accidents caused by time instability.
Smart Images

Figure CN112688751B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a communication method, device, and system. Background Art
[0002] In the electric power industry, relay protection services between electric power equipment can be transmitted through a communication network. The communication network is composed of forwarding nodes, and electric power equipment can be connected to the forwarding nodes in the communication network. For two electric power equipment that need to transmit relay protection services, for the sake of convenience, they are referred to as the first electric power equipment and the second electric power equipment. A first transmission tunnel and a second transmission tunnel are established between the first forwarding node connected to the first electric power equipment and the second forwarding node connected to the second electric power equipment. The first transmission tunnel has the first forwarding node as the first node and the second forwarding node as the end node, and is used to transmit the relay protection services sent by the first electric power equipment to the second electric power equipment. The second transmission tunnel has the second forwarding node as the first node and the first forwarding node as the end node, and is used to transmit the relay protection services sent by the second electric power equipment to the first electric power equipment.
[0003] The power industry places high demands on the stability of the transmission time of relay protection services within transmission tunnels. This requirement requires that the transmission time of relay protection services sent from a first power device to a second power device within the first transmission tunnel must not vary by more than a preset threshold. This requirement also applies to relay protection services sent from the second power device to the first power device. To meet this requirement, the first and second forwarding nodes receive clock signals from the same clock source and synchronize their time based on this clock signal. Upon receiving a service message for relay protection services from the first power device, the first forwarding node obtains a timestamp from its local clock and appends it to the service message. The first forwarding node then transmits the service message over the first transmission tunnel to the second forwarding node. The second forwarding node receives the service message, obtains a timestamp from its local clock, and calculates the transmission time of the service message over the first transmission tunnel based on the obtained timestamp and the timestamp included in the service message. The second forwarding node calculates the time difference between this transmission time and a preset time threshold, then buffers the service message and, when the buffered time reaches the time difference, transmits the service message to the second power device. This ensures that the transmission time of each service message received by the second power device on the first transmission tunnel is equal to the preset time threshold. Similarly, for the service message sent by the second power device to the first power device, the transmission time of the service message on the second transmission tunnel is also saved in the above manner to be equal to the preset time threshold.
[0004] In the process of implementing this application, the inventors discovered that the related art has at least the following problems:
[0005] The first forwarding node and the second forwarding node need to receive clock signals from the same clock source to achieve time synchronization, but the clock source is easily attacked, resulting in the clock signal sent to the first forwarding node and the clock signal sent to the second forwarding node being different, making it impossible for the first forwarding node and the second forwarding node to achieve time synchronization. In this way, the transmission time of the business message calculated by the second forwarding node is inaccurate, and it is impossible to ensure that the change value of the transmission time of the business message received by the power equipment each time on the transmission tunnel does not exceed the preset threshold. Summary of the Invention
[0006] The embodiments of the present application provide a communication method, device, and system that can improve the accuracy of calculating the transmission time of service messages, thereby ensuring that the change in the transmission time of each service message received by the power equipment on the transmission tunnel does not exceed a preset threshold. The technical solution is as follows:
[0007] In a first aspect, the present application provides a communication method, in which: a first forwarding node receives a first service message, the first forwarding node being a node other than the end node through which a transmission tunnel passes, the transmission tunnel being a tunnel used to transmit the first service message; the first forwarding node obtains the retention time of the first service message in the first forwarding node; the first forwarding node sends a second service message, the second service message including the retention time. Because the first forwarding node can accurately obtain the retention time and add the retention time to the second service message, when the end node of the transmission tunnel receives the second service message, it can accurately obtain the transmission time of the second service message in the transmission tunnel based on the retention time added by each forwarding node in the second service message, thereby improving the accuracy of calculating the transmission time of the service message, and ensuring that the change value of the transmission time of the service message received by the power equipment on the transmission tunnel each time does not exceed a preset threshold.
[0008] In one possible implementation, the first forwarding node obtains a reception timestamp and a current timestamp of the first service packet; and obtains the retention time of the first service packet in the first forwarding node based on the reception timestamp and the current timestamp. Because both the reception timestamp and the current timestamp are timestamps read from the local clock of the first forwarding node, the retention time can be accurately obtained based on the reception timestamp and the current timestamp.
[0009] In another possible implementation, when receiving the first service message, the first forwarding node saves the correspondence between the message identification information of the first service message and the reception timestamp of the first service message. The first forwarding node then obtains the reception timestamp of the first service message from the correspondence between the message identification information and the reception timestamp based on the message identification information of the first service message. In this manner, when the first forwarding node determines to send the first service message, it can obtain the reception timestamp of the first service message, and thus accurately obtain the retention time of the first service message based on the reception timestamp.
[0010] In another possible implementation, upon receiving the first service message, the first forwarding node adds a reception timestamp of the first service message to the first service message and extracts the reception timestamp from the first service message. Adding the reception timestamp to the first service message simplifies the implementation and reduces storage space usage compared to the aforementioned method of extracting message identification information from the first service message and then storing the correspondence between the message identification information and the reception timestamp.
[0011] In another possible implementation, when the first forwarding node is a non-head node of the transmission tunnel, the first service message includes a total retention time, which is the sum of the retention times of the first service message at each forwarding node it has passed through. The first forwarding node adds the total retention time included in the first service message to the retention time to obtain a cumulative value, and replaces the total retention time included in the first service message with the cumulative value to obtain a second service message. Because the second service message includes a total retention time, the amount of data carried in the second service message can be reduced.
[0012] In a second aspect, the present application provides a communication method, in which: a second forwarding node receives a second service message, the second service message includes the residence time of the second service message on each forwarding node before the second forwarding node, the second forwarding node is the end node of a transmission tunnel, and the transmission tunnel is a tunnel used to transmit the second service message, and each forwarding node before the second forwarding node is a node through which the transmission tunnel passes. The second forwarding node obtains the allowed residence time of the second service message in the second forwarding node based on the residence time of the second service message in each forwarding node and a time threshold. The second forwarding node sends the second service message when the residence time of the second service message in the second forwarding node reaches the allowed residence time. Since the second business message includes the residence time of the second business message on each forwarding node before the second forwarding node, for any forwarding node, the forwarding node can accurately obtain the residence time of the second business message on itself. In this way, the second forwarding node can accurately obtain the allowed residence time of the second business message in the second forwarding node based on the residence time of each forwarding node, and send the second business message when the residence time of the second business message in the second forwarding node reaches the allowed residence time. In this way, it can be ensured that the change value of the transmission time of the business message received by the power equipment each time on the transmission tunnel does not exceed the preset threshold.
[0013] In one possible implementation, the second forwarding node obtains the retention time of the second service message in the second forwarding node. The retention time of the second service message in the second forwarding node refers to the time from when the second forwarding node receives the second service message to when the second service message is cached in a jitter buffer. The jitter buffer is a buffer in the second forwarding node. The second forwarding node obtains the allowed cache time of the second service message in the jitter buffer based on the retention time of the second service message in each forwarding node, the retention time in the second forwarding node, and a time threshold. In this way, the second service message is sent when the storage time in the jitter buffer reaches the allowed cache time, which can ensure that the change in the transmission time of each service message received by the power equipment on the transmission tunnel does not exceed a preset threshold.
[0014] In another possible implementation, the second forwarding node obtains a reception timestamp of the second service packet and a first timestamp when the second service packet is buffered in the jitter buffer. Based on the reception timestamp and the first timestamp, the second forwarding node obtains the retention time of the second service packet in the second forwarding node. Because both the reception timestamp and the first timestamp are timestamps read from the local clock of the second forwarding node, the retention time can be accurately obtained based on the reception timestamp and the first timestamp.
[0015] In another possible implementation, when receiving the second service message, the second forwarding node saves the correspondence between the message identification information of the second service message and the reception timestamp of the second service message. Based on the message identification information of the second service message, the second forwarding node obtains the reception timestamp of the second service message from the correspondence between the message identification information and the reception timestamp. In this way, the second forwarding node can obtain the reception timestamp of the second service message and, based on the reception timestamp, accurately obtain the retention time of the second service message.
[0016] In another possible implementation, upon receiving the second service message, the second forwarding node adds a reception timestamp of the second service message to the second service message. The second forwarding node extracts the reception timestamp from the second service message. Adding the reception timestamp to the second service message simplifies the implementation and reduces storage space usage compared to the aforementioned method of extracting message identification information from the second service message and then storing the correspondence between the message identification information and the reception timestamp.
[0017] In a third aspect, the present application provides a communication device for executing the method in the first aspect or any possible implementation of the first aspect. Specifically, the device includes a unit for executing the method in the first aspect or any possible implementation of the first aspect.
[0018] In a fourth aspect, the present application provides a communication device for executing the method in the second aspect or any possible implementation of the second aspect. Specifically, the device includes a unit for executing the method in the second aspect or any possible implementation of the second aspect.
[0019] In a fifth aspect, embodiments of the present application provide a communications device comprising: a processor, a memory, and a transceiver. The processor, the memory, and the transceiver may be connected via a bus system. The memory is configured to store one or more programs, and the processor is configured to execute the one or more programs in the memory to perform the method of the first aspect or any possible implementation of the first aspect.
[0020] In a sixth aspect, embodiments of the present application provide a communications device comprising: a processor, a memory, and a transceiver. The processor, the memory, and the transceiver may be connected via a bus system. The memory is configured to store one or more programs, and the processor is configured to execute the one or more programs in the memory to perform the method of the second aspect or any possible implementation of the second aspect.
[0021] In the seventh aspect, the present application provides a computer-readable storage medium, which stores a program. When the program is run on a computer, the computer executes the method in the above-mentioned first aspect, second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0022] In an eighth aspect, the present application provides a computer program product comprising a program, which, when run on a computer, enables the computer to execute the method in the above-mentioned first aspect, second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0023] In a ninth aspect, the present application provides a communication system, comprising: the apparatus described in the third aspect and the apparatus described in the fourth aspect, or the apparatus described in the fifth aspect and the apparatus described in the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0025] Figure 2 This is a schematic diagram of the structure of a service message provided in an embodiment of the present application;
[0026] Figure 3 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0027] Figure 4 This is a schematic diagram of the structure of a forwarding node provided in an embodiment of the present application;
[0028] Figure 5 This is another network architecture diagram provided by an embodiment of the present application;
[0029] Figure 6 This is a flow chart of a communication method provided by an embodiment of the present application;
[0030] Figure 7 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0031] Figure 8 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0032] Figure 9 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0033] Figure 10 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0034] Figure 11This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0035] Figure 12 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0036] Figure 13 This is a schematic diagram of the structure of another service message provided in an embodiment of the present application;
[0037] Figure 14 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0038] Figure 15 This is a schematic diagram of another communication device structure provided in an embodiment of the present application;
[0039] Figure 16 This is a schematic diagram of the structure of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] See also Figure 1 , an embodiment of the present application provides a communication architecture, which includes multiple forwarding nodes 1 and multiple terminals 2. A communication network includes multiple forwarding nodes 1, and each terminal 2 can be connected to a forwarding node 1 of the communication network.
[0041] Terminals 2 can transmit service messages between each other via a communication network. For example, for ease of explanation, for two terminals 2 requiring service transmission, these two terminals 2 are referred to as a first terminal and a second terminal. The forwarding node connected to the first terminal is a first forwarding node, and the forwarding node connected to the second terminal is a second forwarding node. The first terminal can establish a network connection with the second terminal. This network connection includes a connection between the first terminal and the first forwarding node, a transmission tunnel between the first forwarding node and the second forwarding node, and a connection between the second forwarding node and the second terminal.
[0042] The transmission tunnel between the first forwarding node and the second forwarding node includes a first transmission tunnel and a second transmission tunnel. The first transmission tunnel begins at the first forwarding node and ends at the second forwarding node. The first transmission tunnel is used to transmit service packets sent from the first terminal to the second terminal. The second transmission tunnel begins at the second forwarding node and ends at the first forwarding node. The second transmission tunnel is used to transmit service packets sent from the second terminal to the first terminal.
[0043] The forwarding nodes traversed by the first transmission tunnel and the forwarding nodes traversed by the second transmission tunnel may be the same or different. For either the first transmission tunnel or the second transmission tunnel, the number of forwarding nodes traversed by the transmission tunnel is greater than or equal to 2. When the number of forwarding nodes is equal to 2, the forwarding nodes traversed by the transmission tunnel include the first forwarding node and the second forwarding node. When the number of forwarding nodes is greater than 2, the forwarding nodes traversed by the transmission tunnel, in addition to the first forwarding node and the second forwarding node, may also include other forwarding nodes, which are intermediate nodes traversed by the transmission tunnel.
[0044] Figure 1 The network architecture shown may be an Internet Protocol / Multi-Protocol Label Switching (IP / MPLS) network architecture, in which the service message transmitted between the first terminal and the second terminal may be an MPLS message. Alternatively, Figure 1 The network architecture shown may be a network architecture based on IPv6 segment routing technology (segment routing based on IPv6, SRV6), and in this architecture, the service message transmitted between the first terminal and the second terminal may be an SRV6 message.
[0045] See also Figure 2 In an IP / MPLS network architecture, the service message may be an MPLS message, comprising a message header, a payload, and a frame check sequence (FCS). The payload is located between the message header and the FCS. The message header includes multiple fields, namely, the destination and source medium access control address (InnerL2), the virtual local area network TAG (VlanTAG), the Ethernet type (E-type), the inner pseudo wire multi-protocol label switching ID (Inner PW), the control word (CW), and the real-time transport protocol (RTP).
[0046] The following lists an example of the length of each field in an MPLS message. Of course, the lengths of each field are not limited to this example and can also be other lengths, which are not listed here. In this example, the length of InnerL2 can be 12 bytes, the length of VlanTAG can be 4 bytes, the length of E-type can be 2 bytes, the length of InnerPW can be 4 bytes, the length of CW can be 4 bytes, and the length of RTP can be 12 bytes. The length of the payload portion is not fixed and can vary or be the same in different service messages. The length of FCS can be 4 bytes.
[0047] See also Figure 3 In the SRV6 network architecture, the service message can be an SRV6 message. The SRV6 message header includes the following fields: Next Header, Segment Routing Header Extended Length (Hdr Ext Len), Routing Type (RoutingType), Segment Left, Last Entry, Segment Routing Header Identifier (Flags), SRv6 message type identifier (Tag), SRv6 message type identifier (Segment List), and optional type length value (OTLV). The Segment List includes n+1 128-bit IPv6 addresses (128-bit IPv6 addresses), where n is an integer greater than 0.
[0048] Optionally, the forwarding node 2 may be a router or a switch.
[0049] The second terminal may require that the change in the first transmission time of a service packet sent by the first terminal over the first transmission tunnel each time be less than a change threshold. The first terminal may also require that the change in the second transmission time of a service packet sent by the second terminal over the second transmission tunnel each time be less than a change threshold. The first and second terminals may also require that the first transmission time and the second transmission time be equal or that the difference between them be less than a difference threshold.
[0050] For example, assuming the communication architecture is an IP / MPLS network architecture, this communication architecture can be applied to the power industry. In the power industry, the first terminal and the second terminal can be power equipment. The service messages transmitted between the first terminal and the second terminal can be service messages related to relay protection services.
[0051] In the power industry, a first terminal sends a service message to a second terminal via a first transmission tunnel. Each time the second terminal receives a service message, it measures the first transmission time of the service message over the first transmission tunnel. Similarly, a second terminal sends a service message to the first terminal via a second transmission tunnel. Each time the first terminal receives a service message, it measures the second transmission time of the service message over the second transmission tunnel. A significant change in the first transmission time measured by the second terminal, or a significant change in the second transmission time measured by the first terminal, or a difference between the first transmission time and the second transmission time exceeding a difference threshold, can lead to a power outage. Therefore, in the power industry, there are requirements that both the change in the first transmission time and the change in the second transmission time be less than a change threshold, and that the first transmission time and the second transmission time be equal or have a difference that does not exceed a difference threshold. The change threshold can be 200 microseconds, 180 microseconds, or 160 microseconds, and the difference threshold can be 200 microseconds, 180 microseconds, or 160 microseconds, for example.
[0052] For any of the first and second transmission tunnels, when a service message is transmitted in the transmission tunnel, the forwarding node that the transmission tunnel passes through has a significant impact on the transmission time of the service message in the transmission tunnel. The length of time the service message stays in the forwarding node determines the length of the service message's transmission time. When the network traffic is large, the forwarding node cannot forward the received service message in a timely manner, resulting in a longer retention time of the service message in the forwarding node, which in turn causes the service message's transmission time to also increase. When the network traffic is small, the forwarding node can forward the service message in a timely manner, which shortens the retention time of the service message in the forwarding node, which in turn causes the service message's transmission time to also decrease.
[0053] In communication networks, forwarding nodes are often connected using high-speed cables such as optical fibers. For any two forwarding nodes, each service message travels at the same speed and in a very short time. Therefore, the sum of the time it takes for different service messages to travel along each cable in the transmission tunnel is the same, but the sum of the time different service messages spend at each forwarding node along the transmission tunnel may vary. Therefore, the transmission time of a service message in the transmission tunnel is significantly affected by the forwarding nodes, primarily the sum of the time it spends at each forwarding node along the transmission tunnel.
[0054] Because the retention time of a service message at each forwarding node along a transmission tunnel significantly impacts the transmission time of the service message along the transmission tunnel, each forwarding node, except for the end node, can add the service message's retention time to the service message upon receiving it, and then forward the service message with the added retention time. For the end node of the transmission tunnel, upon receiving the service message, the end node determines the total retention time based on the service message, including the retention time at each forwarding node it has passed. Then, based on a time threshold and the total retention time, the end node determines the allowed retention time for the service message at the end node. When the retention time of the service message at the end node reaches the allowed retention time, the service message is sent to the terminal. The sum of the total retention time and the allowed retention time is equal to the time threshold. Thus, the terminal measures the transmission time of the service message along the transmission tunnel as the sum of the time threshold plus the time spent by the service message on each cable along the transmission tunnel. The detailed implementation process of how the forwarding node adds the retention time to the service message and how the end node obtains the total retention time will be described in the following sections. Figure 6 The embodiment shown is described in detail and will not be introduced here.
[0055] For the end node of the first transmission tunnel, that is, the second forwarding node, each time it receives a service message sent by the first terminal, it processes the received service message in the above manner before sending it to the second terminal. This can ensure that the first transmission time measured by the second terminal each time it receives the service message is the same, or the change value of the measured first transmission time is less than the change value threshold. Similarly, for the end node of the second transmission tunnel, that is, the first forwarding node, each time it receives a service message sent by the second terminal, it processes the received service message in the above manner before sending it to the first terminal. This can ensure that the second transmission time measured by the first terminal each time it receives the service message is the same, or the change value of the measured second transmission time is less than the change value threshold.
[0056] Optionally, the first forwarding node and the second forwarding node mutually agree on a time threshold when establishing the first transmission tunnel and the second transmission tunnel, so that the first forwarding node and the second forwarding node use the same time threshold, thereby ensuring that the difference between the first transmission time and the second transmission time does not exceed the difference threshold.
[0057] It should be noted that when the forwarding nodes passed by the first transmission tunnel and the forwarding nodes passed by the second transmission tunnel are different, the length of the cable passed by the first transmission tunnel and the length of the cable passed by the second transmission tunnel may be different. In this way, the time taken for the service message to be transmitted on the cable of the first transmission tunnel and the time taken for the service message to be transmitted on the cable of the second transmission tunnel are different. If the difference between the two times exceeds the difference threshold, it may be necessary to re-establish the first transmission tunnel and the second transmission tunnel between the first forwarding node and the second forwarding node so that the difference between the two times does not exceed the difference threshold. In this way, it can be ensured as much as possible that the difference between the first transmission time used when the service message sent by the first terminal is transmitted on the first transmission tunnel and the second transmission time used when the service message sent by the second terminal is transmitted on the second transmission tunnel does not exceed the difference threshold.
[0058] See also Figure 4 , the embodiment of the present application provides a forwarding node 1, which can be Figure 1 The forwarding nodes in the network architecture shown include:
[0059] Processor 21 , memory 22 , bus 23 and communication interface 24 The processor 21 , memory 22 and communication interface 24 are connected via bus 23 .
[0060] The forwarding node 1 includes multiple communication interfaces 24, through which the forwarding node 1 communicates with other devices. For example, the forwarding node 1 can communicate with its neighboring forwarding nodes via the communication interfaces 24. When the forwarding node 1 also communicates with a terminal, the forwarding node 1 communicates with the terminal via other communication interfaces 24.
[0061] Optionally, the communication interface 24 includes components such as a transceiver and a processing chip, wherein the transceiver has the function of transmitting and receiving messages, and the processing chip has at least one function of processing messages. When the communication interface 24 is connected to a terminal, the communication interface 24 may further include a jitter buffer.
[0062] Optionally, the processing chip can be implemented by digital signal processing (DSP) or field programmable gate array (FPGA).
[0063] Optionally, in the case where the forwarding node 1 is a forwarding node in an IP / MPLS network architecture, the communication interface 24 connecting the forwarding node 1 to the terminal may be an E1 interface or a low-speed interface such as C37.94.
[0064] A forwarding table may be stored in the memory 22, and the forwarding table is used to store the correspondence between index information and tunnel information. For each record in the forwarding table, the index information and tunnel information included may be the device identifier of the destination device or the label of the transmission tunnel. The tunnel information includes indication information and the interface identifier of the communication interface, and may also include the label of the transmission tunnel. The indication information may be a label pressure indication, a switch indication, or a label pop-up indication. The label pressure indication is used to instruct the processor 21 to add a label to the message, the switch indication is used to instruct the processor 21 to replace the label in the message with the label in the tunnel information, and the label pop-up indication is used to instruct the processor 21 to remove the label in the message. When the processor 21 receives a message through a communication interface 24, the processor 21 queries the corresponding tunnel information from the forwarding table of the memory 22 based on the device identifier or label of the destination device included in the message. The tunnel information includes indication information and the interface identifier of the communication receiving port, processes the message based on the indication information, and sends the processed message through the communication interface 24 corresponding to the interface identifier.
[0065] The forwarding node 1 may be the first forwarding node or the second forwarding node described above, or an intermediate node through which the first transmission tunnel or the second transmission tunnel passes. Figure 5 For the first transmission tunnel, the first transmission tunnel is used to transmit service messages sent from the first terminal to the second terminal. The first node of the first transmission tunnel is the first forwarding node 11. The first forwarding node 11 communicates with the first terminal through a communication interface 241 and communicates with the downstream forwarding node of the first forwarding node 11 through another communication interface 242 on the first transmission tunnel. In the forwarding table of the first forwarding node 11, there is a record including index information and tunnel information. The index information in the record includes the device identifier D2 of the second terminal, and the tunnel information in the record includes the interface identifier U242 of the communication interface 242 for communicating with the downstream forwarding node, a pressure label indicator, and label 1.
[0066] Any intermediate node that the first transmission tunnel passes through is referred to as a third forwarding node 13. On the first transmission tunnel, the third forwarding node 13 is connected to an upstream forwarding node of the third forwarding node 13 via a communication interface 243, and is connected to a downstream forwarding node of the third forwarding node 13 via another communication interface 244. The forwarding table of the third forwarding node 13 contains a record that includes index information and tunnel information. The index information in the record includes label 1, and the tunnel information in the record includes an interface identifier U244 of the communication interface with the downstream forwarding node, a switch indicator, and label 2.
[0067] The end node of the first transmission tunnel is the second forwarding node 12. On the first transmission tunnel, the second forwarding node 12 is connected to its upstream forwarding node via a communication interface 245 and to the second terminal via another communication interface 246. The forwarding table of the second forwarding node 12 contains a record that includes index information and tunnel information. The index information in the record includes label 2, and the tunnel information in the record includes the interface identifier U246 of the communication interface 246 connected to the second terminal and a label ejection indicator.
[0068] See also Figure 5 For the second transmission tunnel, the second transmission tunnel is used to transmit service packets sent from the second terminal to the first terminal. Assume that the forwarding node traversed by the second transmission tunnel is the same as the forwarding node traversed by the first transmission tunnel. Thus, the second forwarding node 12 is connected to the second terminal via communication interface 246 and is connected to the downstream forwarding node of the second forwarding node 12 via communication interface 245 on the second transmission tunnel. In the forwarding table of the second forwarding node 12, there is a record including index information and tunnel information. The index information in the record includes the device identifier D1 of the first terminal, and the tunnel information in the record includes the interface identifier U245 of the communication interface 245 connected to the downstream forwarding node, label 3, and a pressure label indication.
[0069] For any intermediate node that the second transmission tunnel passes through, for example, the third forwarding node 13, on the second transmission tunnel, the third forwarding node 13 is connected to the upstream forwarding node of the third forwarding node 13 via the communication interface 244, and is connected to the downstream forwarding node of the third forwarding node 13 via the communication interface 243. In the forwarding table of the third forwarding node 13, there is a record that includes index information and tunnel information. The index information in the record is label 3, and the tunnel information in the record includes the interface identifier U243 of the communication interface connected to the downstream forwarding node, a switching indicator, and label 4.
[0070] The end node of the second transmission tunnel is the first forwarding node 11. On the second transmission tunnel, the second forwarding node 12 is connected to the upstream forwarding node of the first forwarding node 11 via communication interface 242, and is connected to the first terminal via communication interface 241. The forwarding table of the first forwarding node 11 contains a record that includes index information and tunnel information. The index information in the record includes label 4, and the tunnel information in the record includes the interface identifier U241 of the communication interface 241 connected to the first terminal and a label ejection indicator.
[0071] Optionally, the memory 22 may also store at least one application code. The processor 21 in the forwarding node 1 and / or the processing chip in the communication interface 24 may call and run the application code from the memory 22 to implement the following functions, including adding the retention time of the service message in the forwarding node 1 to the service message received by the forwarding node 1 or obtaining the allowed retention time of the service message in the forwarding node 1. The specific process of the forwarding node 1 implementing these functions will be described later. Figure 6 The embodiment shown is described in detail and will not be described in detail here.
[0072] Optionally, the processor 21 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. The processor may also refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0073] The bus 23 may be a channel for transmitting information between the components.
[0074] The memory 22 may be, but is not limited to, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, a disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer. The memory may be independent and connected to the processor via a bus. The memory may also be integrated with the processor.
[0075] See also Figure 6 , the embodiment of the present application provides a communication method, which can be applied to Figure 1 or Figure 5 In this method, a process in which a first terminal sends a service message to a second terminal on a first transmission tunnel is used as an example for description. The method includes:
[0076] Step 301: A first forwarding node receives a first service message sent by a first terminal. The first forwarding node is the first node through which a first transmission tunnel passes.
[0077] Optional, see Figure 5A network connection is established between the first terminal and the second terminal, and the network connection includes a connection between the first terminal and the first forwarding node, a first transmission tunnel and a second transmission tunnel between the first forwarding node and the second forwarding node, and a connection between the second forwarding node and the second terminal.
[0078] The first terminal can send a first service message to the second terminal over the network connection. Since the first forwarding node is connected to the first terminal via a communication interface, the communication interface of the first forwarding node receives the first service message. For ease of description, the communication interface is referred to as the first communication interface.
[0079] Optionally, the first service message includes a destination device address field that carries the device identifier of the second terminal. When the first service message is an MPLS message, the destination device address field may be located in the Inner L2 field of the MPLS message. When the first service message is an SRV6 message, the destination device address field may be the Segment List field of the SRV6 message, and the device identifier of the second terminal may be the last IPv6 address in the Segment List field.
[0080] Optionally, when the first forwarding node receives the first service message, it obtains a reception timestamp of the first service message. For ease of explanation, the reception timestamp is referred to as the first reception timestamp, and the first reception timestamp is added to the first service message. Alternatively, message identification information of the first service message is obtained from the first service message, and the message identification information and the first reception timestamp are stored in a correspondence between message identification information and reception timestamps. The message identification information includes the source device identifier, source port number, destination device identifier, destination port number, and message sequence number of the first service message.
[0081] Optionally, the first forwarding node includes a local clock. When receiving the first service message from the first terminal, the first forwarding node obtains a first receiving timestamp from the local clock and adds the first receiving timestamp to the first service message.
[0082] Optionally, the first received timestamp obtained from the local clock may be a numerical value. In this case, the local clock may be a counter used for timing, and the timestamp may be a numerical value in the form of a numerical value, and the value counted by the counter is the timestamp. For example, assuming that the counter counts once every millisecond, and the current value counted by the counter is 5, it means that the current timestamp is the 5th millisecond. Or,
[0083] Optionally, the first reception timestamp obtained from the local clock may also be data in a time format. For example, assuming that when the first service message is received, the first reception timestamp obtained from the local clock is 2019-8-15-11-2-15-35, the first reception timestamp is data in a time format.
[0084] Optionally, the first communication interface may include components such as a transceiver and a processing chip, and the operations such as obtaining the first reception timestamp may be performed by the processing chip. That is, when the transceiver in the first communication interface receives the first service message sent by the first terminal, the processing chip obtains the first reception timestamp from the local clock of the first forwarding node and adds the first reception timestamp to the first service message; alternatively, the processing chip obtains message identification information of the first service message from the first service message, and stores the message identification information and the first reception timestamp in a corresponding relationship between message identification information and reception timestamp.
[0085] Regarding the method of adding the first receiving timestamp to the first service message, since there is no need to save the correspondence between the message identification information and the first receiving timestamp, the storage resources occupied by the first forwarding node are reduced.
[0086] Optionally, a first receiving timestamp may be added to the first field of the first service message. The first field may be a newly added field in the first service message or an existing field in the message header of the first service message.
[0087] Optionally, the first service message may be an MPLS message, and when the first receiving timestamp is obtained, a first field including the first receiving timestamp may be added to the message header of the first service message.
[0088] When the first service message is an MPLS message, the communication method can be applied to an IP / MPLS network architecture. In the IP / MPLS network architecture, the first terminal and the second terminal can be power equipment, and the first service message can be a message belonging to a relay protection service.
[0089] For example, see Figure 7 When the first receiving timestamp is obtained, assuming that the first receiving timestamp is t1, a first field including the first receiving timestamp t1 is added to the header of the first service message. Figure 7 The first field shown may be located between InnerPW and CW.
[0090] Optionally, the length of the first field can be x bytes, and the value of x can be 4, 5, 6, 7 or 8.
[0091] Optionally, when the first service message is an SRv6 message, the first field may be a portion of the OTLV of the first service message. When the first timestamp is obtained, the content of the first field of the first service message is set as the first timestamp.
[0092] For example, see Figure 8 When the first receiving timestamp t1 is obtained, some bits are selected from the OTLV in the message header of the first service message as the first field, and the content of the first field is set to the first receiving timestamp t1.
[0093] After the processing chip in the first communication interface adds the first reception timestamp to the first service message, it can send the first service message to the processor of the first forwarding node.
[0094] Optional, see Figure 7 Before sending the first service message to the processor of the first forwarding node, the processing chip of the first communication interface may further add a 1588 indication field and a 1588 mode field to the message header of the first service message, and then send the first service message to the processor of the first forwarding node.
[0095] In the present application, the first forwarding node can use the technology defined by the transparent clock (TC) mode of the 1588 technology to obtain the retention time of the first service message on the first forwarding node. Therefore, the 1588 indication field added by the processing chip includes a 1588 indication, and the added 1588 mode field includes a TC mode to trigger the processor of the first forwarding node to perform operations using the technology defined in the TC mode of the 1588 technology. When using the TC mode of the 1588 technology, the local clock of the first forwarding node is a counter, and the first reception timestamp t1 is a numerical value.
[0096] Of course, the first forwarding node may also adopt other methods to obtain the residence time of the first business message in the first forwarding node. When adopting other methods, the processing chip of the first communication interface may not add the 1588 indication field and the 1588 mode field to the message header of the first business message.
[0097] See also Figure 5The first forwarding node stores a forwarding table. After receiving the first service message, the processor of the first forwarding node searches the forwarding table stored in the first forwarding node for the interface identifier U242, label 1, and pressure label indication corresponding to the device identifier ID2 of the second terminal, based on the device identifier of the second terminal included in the first service message. Assuming that the device identifier of the second terminal is D2, the processor of the first forwarding node adds label 1 to the first message and sends the first service message to the communication interface corresponding to the interface identifier U242. For ease of explanation, the communication interface corresponding to the interface identifier U242 is referred to as the second communication interface.
[0098] Optional, see Figure 7 In the case where the first service message includes a 1588 indication field and a 1588 mode field, the processor of the first forwarding node extracts the first reception timestamp t1 from the first field of the first service message under the triggering of the 1588 indication in the 1588 indication field and the TC mode in the 1588 mode field before sending the first service message to the second communication interface. The first reception timestamp t1 is a numerical value, and the difference between the calculated values 0 and t1 is 0-t1, which is a negative value. The content of the second field of the first service message is set to the difference 0-t1.
[0099] Optionally, in the case where the first service message is an MPLS message, see Figure 7 The processor of the first forwarding node may extend the length of the first field in the first service message to obtain a second field with a length of y, where y is an integer greater than x. For example, x=4, y=6; or x=6, y=8, etc., and replace the content of the second field with the difference 0-t1.
[0100] Optionally, when the first service packet is an SRv6 packet, the second field of the first service packet is the portion of the OLTV excluding the first field, and the processor of the first forwarding node sets the content of the second field to the difference 0-t1.
[0101] Optional, see Figure 7 Before sending the first service message to the second communication interface, the processor of the first forwarding node deletes the 1588 indication field and the 1588 mode field from the first service message.
[0102] Optionally, in the case where the first service message is an MPLS message, see Figure 7 Before sending the first service message to the second communication interface, the processor of the first forwarding node may further add a field to the message header of the first service message, where the field is a label switch path (LSP).
[0103] Step 302: The first forwarding node obtains the retention time of the first service message in the first forwarding node, and adds the retention time to the first service message to obtain a second service message.
[0104] When the second communication interface of the first forwarding node receives the first service message, the first forwarding node starts to perform the operation of this step. The second communication interface includes a processing chip and a transceiver, that is, the processing chip can perform the operation of this step. The execution process is as follows:
[0105] In this step, the first receiving timestamp and current timestamp of the first business message can be obtained. For the sake of convenience, the current timestamp is called the second timestamp. The residence time of the first business message in the first forwarding node is obtained based on the first receiving timestamp and the second timestamp. The residence time is added to the first business message to obtain the second business message.
[0106] Optionally, the second timestamp can be read from a local clock. Since the first field of the first service message includes the first reception timestamp, the first reception timestamp can be directly extracted from the first field of the first service message. Alternatively, message identification information of the first service message can be extracted from the first service message, and the first reception timestamp can be obtained from the correspondence between the message identification information and the reception timestamp.
[0107] Furthermore, since both the first receiving timestamp and the second timestamp are obtained from the local clock of the first forwarding node, the retention time in the first forwarding node obtained based on the first receiving timestamp and the second timestamp has high accuracy.
[0108] When the first receiving timestamp is obtained from the correspondence between the message identification information and the receiving timestamp, after obtaining the first receiving timestamp, the record including the message identification information of the first business message and the first receiving timestamp can be deleted from the correspondence between the message identification information and the receiving timestamp.
[0109] Optionally, the retention time may be added to the second field of the first business message. The second field may be a field obtained by extending the first field of the message header of the first business message, or the second field may be a field already existing in the message header of the first business message.
[0110] Optionally, when the first service message is an MPLS message, after obtaining the residence time of the first service message in the first forwarding node, the length of the first field in the first service message can be extended to obtain a second field, and the content in the second field can be replaced with the residence time.
[0111] See for example Figure 7The processing chip of the second communication interface of the second forwarding node reads the current timestamp t2 from the local clock, that is, the second timestamp is t2, extracts the first receiving timestamp t1 from the first field of the first business message, obtains the residence time t2-t1 of the first business message in the first forwarding node according to the first receiving timestamp t1 and the second timestamp t2, extends the length of the first field in the first business message to obtain the second field, and replaces the content in the second field with the residence time t2-t1.
[0112] Optionally, in the case where the first service message is an SRV6 message, see Figure 9 The second field can be the portion of the OTLV field of the first service message excluding the first field. After obtaining the retention time t2-t1 of the first service message in the first forwarding node, the portion of the OTLV field of the first service message excluding the first field is used as the second field, and the content of the second field is set to the retention time t2-t1.
[0113] Optionally, when the first forwarding node adopts the TC mode of 1588 technology, the first field in the first service message received by the processing chip of the second communication interface has been expanded to a second field, and the content of the second field is a negative value 0-t1. In this step, the second timestamp t2 obtained from the local clock is the value t2 counted by the local clock. The negative value 0-t1 can be extracted from the second field of the first service message, and the negative value 0-t1 is added to the value t2 to obtain the accumulated value t2-t1. The accumulated value t2-t1 is used as the residence time of the first service message in the first forwarding node, and the content of the second field is replaced with the residence time t2-t1.
[0114] Step 303: The first forwarding node sends a second service message with the retention time added.
[0115] In this step, the transceiver in the second communication interface of the first forwarding node sends the second service message with the retention time added.
[0116] After the first forwarding node sends the second service message, the intermediate node through which the first transmission tunnel passes receives and forwards the second service message. For ease of explanation, the intermediate node is referred to as a third forwarding node. The third forwarding node can perform the following operations.
[0117] Step 304: The third forwarding node receives the second service message, where the second service message includes the residence time of the second service message in each forwarding node that the second service message has passed.
[0118] Optionally, the second field of the second business message may include the residence time of the second business message in each forwarding node it has passed, or the second field of the second business message may include the total residence time, which is the sum of the residence time of the second business message in each forwarding node it has passed.
[0119] In this step, the third forwarding node receives the second service message through a communication interface. For the sake of convenience, the communication interface is referred to as a third communication interface.
[0120] In this step, when the third forwarding node receives the second service message, it can obtain the reception timestamp of the second service message from the local clock. For ease of explanation, the reception timestamp obtained at this time is referred to as the second reception timestamp, and the second reception timestamp is added to the second service message. Alternatively, the third forwarding node can obtain message identification information of the second service message from the second service message, and store the message identification information and the first reception timestamp in a corresponding relationship between message identification information and reception timestamps.
[0121] The third communication interface includes components such as a processing chip, and the processing chip can perform the above-mentioned operations such as obtaining the second receiving timestamp.
[0122] The second reception timestamp may be data in a numerical form or may be data in a time format.
[0123] Optionally, a second receiving timestamp may be added to the first field of the second service message. The first field may be a newly added field in the second service message or a field already existing in the message header of the second service message.
[0124] Optionally, the second service message may be an MPLS message, and when the second reception timestamp is obtained, a first field including the second reception timestamp may be added to the second service message.
[0125] For example, see Figure 10 When the third communication interface of the third forwarding node receives the second service message, the processing chip in the third communication interface obtains the second receiving timestamp t3 from the local clock of the third forwarding node and adds the first field including the second receiving timestamp t3 to the second service message. Figure 10 The first field shown may be located between the payload portion and the FCS.
[0126] Optionally, the second service message may be an SRV6 message, see Figure 11 After the third communication interface of the third forwarding node obtains the second receiving timestamp t3, it replaces the content of the first field in the OTLV of the second service message with the second receiving timestamp t3.
[0127] After the processing chip in the third communication interface adds the second reception timestamp to the second service message, it can send the second service message to the processor of the third forwarding node.
[0128] Optional, see Figure 10 Before sending the second service message to the processor of the third forwarding node, the processing chip of the third communication interface may further add a 1588 indication field and a 1588 mode field to the message header of the second service message.
[0129] See also Figure 5 The third forwarding node stores a forwarding table. Based on label 1 included in the second service message, the processor of the third forwarding node searches the forwarding table stored in the third forwarding node for the interface identifier U244, the switching indicator, and label 2 corresponding to label 1. For ease of explanation, the communication interface corresponding to interface identifier U244 is referred to as the fourth communication interface. The processor of the third forwarding node replaces label 1 in the second service message with label 2 and sends the second service message to the fourth communication interface corresponding to interface identifier U244.
[0130] Optional, see Figure 10 In the case where the second service message includes a 1588 indication field and a 1588 mode field, the processor of the third forwarding node, before sending the second service message to the fourth communication interface, extracts the second reception timestamp t3 from the first field of the second service message and the total detention time from the second field under the triggering of the 1588 indication in the 1588 indication field and the TC mode in the 1588 mode field, assuming that the total detention time is TS1. The total detention time TS1 and the second reception timestamp t3 are both in numerical form, that is, the total detention time TS1 and the second reception timestamp t3 are two numerical values. The difference between the numerical value TS1 and the numerical value t3 is calculated, and the difference is equal to TS1-t3. The content in the second field of the second service message is replaced with the difference TS1-t3, and then the 1588 indication field and the 1588 mode field in the second service message are deleted, and then the second service message is sent to the fourth communication interface. When the second service message is an MPLS message, the processor of the third forwarding node may further delete the first field from the second service message after extracting the second reception timestamp t3 from the first field of the second service message.
[0131] Step 305: The third forwarding node obtains the retention time of the second service message in the third forwarding node, and adds the retention time to the second service message.
[0132] When the fourth communication interface of the third forwarding node receives the second service message, the third forwarding node performs the operation of this step. The fourth communication interface includes components such as a processing chip, which can perform the operation of this step. The execution process is as follows:
[0133] When the fourth communication interface receives the second business message, the second reception timestamp and current timestamp of the second business message can be obtained. For the sake of convenience, the current timestamp obtained at this time is called the third timestamp. The residence time of the second business message in the third forwarding node is obtained based on the second reception timestamp and the third timestamp, and the residence time is added to the second business message.
[0134] In this step, the third timestamp can be read from the local clock of the third forwarding node. Since the first field of the second service message includes the second reception timestamp, the second reception timestamp is directly extracted from the first field of the second service message. Alternatively, message identification information of the second service message can be extracted from the second service message, and the second reception timestamp can be obtained from the correspondence between the message identification information and the reception timestamp.
[0135] In this step, the retention time can be added to the second service message in the following two ways. The two ways are:
[0136] Method 1: The second field of the second service message includes the residence time of the second service message on each forwarding node it passes through. In this step, the residence time of the second service message in the third forwarding node is directly added to the second field of the second service message.
[0137] Method 2: The second field of the second business message includes the total residence time. In this step, the total residence time is extracted from the second field of the second business message, and the total residence time is added to the residence time of the second business message in the third forwarding node to obtain an accumulated value, and the total residence time included in the second field of the second business message is replaced by the accumulated value.
[0138] In the second method, the second field of the second service message includes the total retention time. Compared with the implementation method of the first method, the second field includes a smaller amount of data, which can reduce the length of the second field to reduce the occupation of network resources.
[0139] Optionally, after obtaining the second receiving timestamp from the correspondence between the message identification information and the receiving timestamp, the record including the message identification information of the second service message and the second receiving timestamp may be deleted from the correspondence between the message identification information and the receiving timestamp.
[0140] Optionally, when the second service message is an MPLS message, after extracting the second reception timestamp from the first field of the second service message, the first field may be deleted, thereby reducing the size of the second service message and reducing the occupancy of network resources.
[0141] Optional, see Figure 10When the third forwarding node adopts the TC mode of 1588 technology, the processor of the third forwarding node replaces the content included in the second field of the second business message with the difference TS1-t3 before sending the second business message to the fourth communication interface. In this step, the obtained third timestamp t4 is a numerical value, and the difference TS1-t3 is read from the second field of the second business message. The difference TS1-t3 is added to the numerical value t4 to obtain the accumulated value TS1+t4-t3, and the content in the second field of the second business message is replaced with the accumulated value.
[0142] Step 306: The third forwarding node sends the second service message with the retention time added.
[0143] In this step, the fourth communication interface of the third forwarding node sends the second service message with the retention time added.
[0144] After receiving the second service message, each other intermediate node through which the first transmission tunnel passes performs the same operation as the third forwarding node to send the second service message. The second service message will be sent to the end node of the first transmission tunnel, that is, to the second transmission node.
[0145] Step 307: The second forwarding node receives the second service message, where the second service message includes the retention time of the second service message in each forwarding node other than the second forwarding node that the second service message passes through the first transmission tunnel.
[0146] Optionally, the second field of the second business message may include the residence time of the second business message in the other forwarding nodes, or the second field of the second business message may include the total residence time, which is the sum of the residence time of the second business message in the other forwarding nodes.
[0147] In this step, the second forwarding node receives the second service message through a communication interface. For the sake of convenience, the communication interface is referred to as a fifth communication interface.
[0148] Upon receiving the second service message, the second forwarding node obtains a reception timestamp of the second service message. For ease of description, the reception timestamp obtained at this time is referred to as a third reception timestamp, and the third reception timestamp is added to the second service message. Alternatively, the second forwarding node obtains message identification information of the second service message from the second service message, and stores the message identification information and the third reception timestamp in a correspondence between message identifiers and reception timestamps.
[0149] The fifth communication interface includes components such as a processing chip, which can perform the above-mentioned operations such as obtaining the third receiving timestamp. The execution process is as follows:
[0150] When receiving the second business message, obtain the current timestamp from the local clock included in the second forwarding node as the third receiving timestamp, add the third receiving timestamp to the second business message, or save the message identification information of the second business message and the third receiving timestamp in the corresponding relationship between the message identification identifier and the receiving timestamp.
[0151] Optionally, the local clock of the second forwarding node may be a counter for timing, so the third receiving timestamp may be a numerical value. Alternatively, the third receiving timestamp may also be data in a time format.
[0152] In this step, a third reception timestamp may be added to the first field of the second service message. The first field may be a newly added field in the second service message or an existing field in the message header of the second service message.
[0153] Optionally, the second service message may be an MPLS message, see Figure 12 , when receiving the second service message, obtain the current third receiving timestamp t5, and add the first field including the third receiving timestamp t5 to the message header of the second service message. Figure 12 The first field shown may be located between the payload portion and the FCS.
[0154] Optionally, the second service message may be an SRV6 message. For example, see Figure 13 , when receiving the second service message, obtain the third receiving timestamp t5, and replace the content included in the first field in the OTLV of the second service message with the third receiving timestamp t5.
[0155] After the processing chip of the fifth communication interface adds the third reception timestamp to the second service message or saves the correspondence between the message identification information of the second service message and the third reception timestamp, it can send the second service message to the processor of the second forwarding node.
[0156] Optionally, in the case where the second service message is an MPLS message, the processing chip of the fifth communication interface further deletes the LSP field in the second service message before sending the second service message to the processor of the second forwarding node.
[0157] Optional, see Figure 12 Before sending the second service message to the processor of the second forwarding node, the processing chip of the fifth communication interface may further add a 1588 indication field and a 1588 mode field to the message header of the second service message.
[0158] See also Figure 5The second forwarding node stores a forwarding table. Based on the device identifier D2 of the second terminal included in the second service message, the processor of the second forwarding node searches the forwarding table stored by the second forwarding node for the interface identifier U246 corresponding to the device identifier ID2 of the second terminal. For ease of description, the communication interface corresponding to interface identifier U246 is referred to as the sixth communication interface. The processor of the second forwarding node sends the second service message to the sixth communication interface corresponding to interface identifier U246.
[0159] Optional, see Figure 12 In the case where the second service message includes a 1588 indication field and a 1588 mode field, the processor of the second forwarding node, before sending the second service message to the sixth communication interface, is triggered by the 1588 indication in the 1588 indication field and the TC mode in the 1588 mode field. The processor extracts the third timestamp t5 from the first field of the second service message and the total retention time from the second field. Assume that the total retention time is TS2. Both the total retention time TS2 and the third reception timestamp t5 are numerical values, meaning that the total retention time TS2 and the third reception timestamp t5 are two numerical values. The processor calculates the difference between the numerical values TS2 and t5, which is equal to TS2-t5. The processor replaces the content of the second field in the second service message with the difference TS2-t5, and then sends the second service message to the sixth communication interface. In the case where the second service message is an MPLS message, the processor of the second forwarding node may also delete the first field from the second service message after extracting the third reception timestamp t5 from the first field of the service message.
[0160] Step 308: The second forwarding node caches the second service message in the jitter buffer, and obtains the allowed retention time of the second service message in the jitter buffer according to the retention time of the second service message in other forwarding nodes and the time threshold.
[0161] The sixth communication interface of the second forwarding node includes a processing chip, a transceiver, and a jitter buffer. When the processing chip of the sixth communication interface receives the service message, the processing chip of the sixth communication interface caches the second service message in the jitter buffer. The operation of this step can be performed by the processing chip of the sixth communication interface. The execution process is as follows:
[0162] This step can be achieved through the following operations 3081 to 3082, which are:
[0163] 3081: Obtain the retention time of the second service packet in the second forwarding node when the second service packet is cached in the jitter buffer.
[0164] In this step, the third receiving timestamp and current timestamp of receiving the second business message are obtained. For the sake of convenience, the current timestamp obtained at this time is called the first timestamp. The residence time of the second business message in the second forwarding node is obtained based on the third receiving timestamp and the first timestamp.
[0165] When the service message is cached in the jitter buffer, the first timestamp can be read from the local clock of the second forwarding node. Since the first field of the second service message includes the third reception timestamp, the third reception timestamp can be directly extracted from the first field of the second service message. Alternatively, message identification information of the second service message can be obtained from the second service message, and the third reception timestamp can be obtained from the correspondence between the message identification information and the reception timestamp.
[0166] Optionally, a third receiving timestamp is obtained from the correspondence between the message identification information and the receiving timestamp, and the record including the message identification information of the second service message and the third receiving timestamp is deleted from the correspondence between the message identification information and the receiving timestamp.
[0167] Optionally, when the second service message is an MPLS message, after extracting the third reception timestamp from the first field of the second service message, the first field may be deleted from the second service message.
[0168] 3082: Obtain a buffering time allowed for the service packet in the jitter buffer based on the retention time of the second service packet in each other forwarding node, the retention time in the second forwarding node, and the time threshold.
[0169] Optionally, when the second field of the second service message includes the retention time of the second service message in each other forwarding node, all retention times are extracted from the second field of the second service message, all the extracted retention times and the retention time of the second service message in the second forwarding node are accumulated to obtain an accumulated value, the difference between the time threshold and the accumulated value is calculated, and the difference is determined as the cache time allowed for the second service message in the jitter buffer. Alternatively,
[0170] Optionally, when the second field of the second business message includes the total residence time, the total residence time is extracted from the second field of the second business message, the total residence time and the residence time of the second business message in the second forwarding node are accumulated to obtain an accumulated value, the difference between the time threshold and the accumulated value is calculated, and the difference is determined as the cache time allowed for the second business message in the jitter buffer.
[0171] Optionally, when the second service message is an MPLS message, after all the retention times or the total retention time are extracted from the second field in the second service message, the second field may be deleted from the second service message.
[0172] Optional, see Figure 12 If the second forwarding node uses the TC mode of 1588 technology, the processor of the second forwarding node replaces the content of the second field of the second service message with the difference TS2-t5 before sending the second service message to the sixth communication interface. In this step, the first timestamp obtained from the local clock is a numerical value. Assuming that the first timestamp is t6, the difference TS2-t5 is read from the second field of the second service message, and the difference TS2-t5 is added to the value t6 to obtain the accumulated value TS2+t6-t5.
[0173] Step 309: When the buffering time of the second service message in the jitter buffer reaches the allowed buffering time, the second forwarding node deletes the retention time in the second service message to obtain the first service message, and sends the first service message.
[0174] In this step, when the processing chip in the sixth communication interface of the second forwarding node detects that the cache time of the second service message in the jitter buffer reaches the allowed cache time, the second service message is sent to the second terminal through the transceiver in the sixth communication interface.
[0175] The second terminal may also send a service message to the first terminal. The process of transmitting the service message sent by the second terminal on the second transmission tunnel is the same as the process of transmitting the service message sent by the first terminal on the first transmission tunnel, which will not be described in detail here.
[0176] In an embodiment of the present application, the first forwarding node located at the head node position of the first transmission tunnel obtains the first receiving timestamp of receiving the first business message when receiving the first business message, obtains the current second timestamp when the first business message arrives at the second communication interface of the first forwarding node, and obtains the retention time of the first business message in the first forwarding node based on the first receiving timestamp and the second timestamp. Since the first receiving timestamp and the second timestamp are both obtained based on the local clock of the first forwarding node and will not be affected by the attack, the retention time can be accurately obtained, so that the retention time may be added to the first business message to obtain the second business message, and then the second business message is sent. The third forwarding node located at the intermediate node position of the first transmission tunnel obtains the second receiving timestamp of receiving the second business message when receiving the second message service, obtains the current third timestamp when the second business message arrives at the fourth communication interface of the third forwarding node, and obtains the retention time of the second business message in the third forwarding node based on the second receiving timestamp and the third timestamp. Because both the second reception timestamp and the third timestamp are obtained based on the local clock of the third forwarding node and are not susceptible to attacks, the retention time can be accurately obtained. This retention time can then be added to the second service message before the second service message is sent. Thus, when the second forwarding node, located at the end of the first transmission tunnel, receives the second service message, the second service message includes the retention time of the second service message at each forwarding node it has passed through. Based on this service message, a total retention time can be obtained. This total retention time is equal to the sum of the retention time of the second service message at each forwarding node it has passed through. Based on this total retention time and a time threshold, the allowed retention time of the second service message at the second forwarding node is obtained. When the retention time of the second service message at the second forwarding node reaches this allowed retention time, the second service message is sent to the second terminal. The time threshold is equal to the sum of the total retention time and the allowed retention time. Thus, after the second terminal receives the second service message, the measured first transmission time of the second service message on the first transmission tunnel is equal to the time threshold plus the transmission time of the second service message on the cable traversed by the first transmission tunnel. Because the transmission time of different service packets along the cable passing through the first transmission tunnel remains essentially unchanged, when the second terminal receives different service packets, the variation in the first transmission time of the different service packets along the first transmission tunnel measured by the second terminal is guaranteed not to exceed a variation threshold. Because the time threshold is agreed upon by the first forwarding node and the second forwarding node, and the first forwarding node and the second forwarding node use the same time threshold, the difference between the first transmission time of the service packet along the first transmission tunnel measured by the second terminal and the second transmission time of the service packet along the second transmission tunnel measured by the first terminal is guaranteed not to exceed the difference threshold.
[0177] See also Figure 14 The embodiment of the present application provides a communication device 400, which can be deployed in the first forwarding node, including:
[0178] The receiving unit 401 is configured to receive a first service message, wherein the apparatus 400 is a node other than a terminal node through which a transmission tunnel passes, and the transmission tunnel is a tunnel for transmitting the first service message;
[0179] The processing unit 402 is configured to obtain a retention time of the first service packet in the first forwarding node;
[0180] The sending unit 403 is configured to send a second service message, where the second service message includes the retention time.
[0181] Optionally, the detailed implementation process of the processing unit 402 obtaining the retention time can be found in Figure 6 The relevant contents in step 302 and step 305 of the illustrated embodiment.
[0182] Optionally, the processing unit 402 is configured to:
[0183] Obtaining the receiving timestamp and current timestamp of the first service message;
[0184] The retention time of the first service message in the first forwarding node is obtained according to the receiving timestamp and the current timestamp.
[0185] Optionally, the detailed implementation process of the processing unit 402 obtaining the receiving timestamp and the current timestamp can be found in Figure 6 The relevant contents in step 302 and step 305 of the illustrated embodiment.
[0186] Optionally, the processing unit 402 is configured to add a receiving timestamp of the first service message to the first service message when the receiving unit 401 receives the first service message; and extract the receiving timestamp from the first service message.
[0187] Optionally, the processing unit is used to save the correspondence between the message identification information of the first business message and the receiving timestamp of the first business message when the receiving unit 401 receives the first business message; and obtain the receiving timestamp of the first business message from the correspondence between the message identification information and the receiving timestamp according to the message identification information of the first business message.
[0188] Optionally, in the case where the apparatus 400 is a non-head node of the transmission tunnel, the first service message includes a total retention time, which is the sum of the retention times of the first service message in each forwarding node it has passed through;
[0189] The processing unit 402 is further configured to:
[0190] The total detention time included in the first service message is accumulated with the detention time to obtain an accumulated value, and the total detention time included in the first service message is replaced with the accumulated value to obtain a second service message.
[0191] In an embodiment of the present application, a receiving unit receives a first service message, a processing unit obtains the retention time of the first service message in a first forwarding node, and a sending unit sends a second service message, wherein the second service message includes the retention time. Because the processing unit can accurately obtain the retention time and add the retention time to the second service message, when the end node of the transmission tunnel receives the second service message, it can accurately obtain the transmission time of the service message in the transmission tunnel based on the retention time added by each forwarding node in the second service message, thereby improving the accuracy of the calculated transmission time of the service message, and ensuring that the change in the transmission time of the service message received by the power equipment on the transmission tunnel each time does not exceed a preset threshold.
[0192] See also Figure 15 The embodiment of the present application provides a communication device 500, which is deployed in the second forwarding node, including:
[0193] A receiving unit 501 is configured to receive a second service message, where the second service message includes a retention time of the second service message on each forwarding node before the apparatus 500, where the apparatus 500 is the end node of a transmission tunnel, where the transmission tunnel is a tunnel for transmitting the second service message, and each forwarding node before the apparatus 500 is a node through which the transmission tunnel passes;
[0194] The processing unit 502 is configured to obtain an allowed retention time of the second service message in the apparatus 500 according to the retention time of the second service message in each forwarding node and a time threshold;
[0195] The sending unit 503 is configured to send the second service message when the retention time of the second service message in the apparatus 500 reaches the allowed retention time.
[0196] Optionally, the detailed implementation process of the processing unit 502 obtaining the allowed retention time can be found in Figure 6 The relevant content in step 308 of the illustrated embodiment.
[0197] Optionally, the processing unit 502 is configured to:
[0198] Obtaining a retention time of the second service message in the apparatus 500, where the retention time of the second service message in the apparatus 500 refers to a time from when the receiving unit 501 receives the second service message to when the second service message is cached in a jitter buffer, where the jitter buffer is a buffer in the apparatus 500;
[0199] The buffering time allowed for the second service message in the jitter buffer is obtained according to the retention time of the second service message in each forwarding node, the retention time in the apparatus 500 and the time threshold.
[0200] Optionally, the detailed implementation process of the processing unit 502 obtaining the buffering time allowed for the second service message in the jitter buffer can be found in Figure 6 Relevant content in steps 3081 to 3082 of the illustrated embodiment.
[0201] Optionally, the processing unit 502 is configured to:
[0202] Obtaining a reception timestamp of the second service message and obtaining a first timestamp when the second service message is cached in the jitter buffer;
[0203] The retention time of the second service message in the device 500 is obtained according to the receiving timestamp and the first timestamp.
[0204] Optionally, the processing unit 502 is configured to add a receiving timestamp of the second service message to the second service message when the receiving unit 501 receives the second service message; and extract the receiving timestamp from the second service message.
[0205] Optionally, the processing unit 502 is used to save the correspondence between the message identification information of the second business message and the receiving timestamp of the second business message when the receiving unit 501 receives the second business message; and obtain the receiving timestamp of the second business message from the correspondence between the message identification information and the receiving timestamp according to the message identification information of the second business message.
[0206] In an embodiment of the present application, a receiving unit receives a second business message, and the second business message includes the residence time of the second business message on each forwarding node before the device, and the processing unit obtains the allowed residence time of the second business message in the second forwarding node according to the residence time of the second business message in each forwarding node and the time threshold. The sending unit sends the second business message when the residence time of the second business message in the device reaches the allowed residence time. Since the second business message includes the residence time on each forwarding node, for any forwarding node, the forwarding node can accurately obtain the residence time of the second business message on itself, so that the processing unit can accurately obtain the allowed residence time of the second business message in the device according to the residence time of each forwarding node, and send the second business message when the residence time of the second business message in the device reaches the allowed residence time, thereby ensuring that the change value of the transmission time of the business message received by the power equipment each time on the transmission tunnel does not exceed the preset threshold.
[0207] See also Figure 16 , the embodiment of the present application provides a communication system 600, the communication system 600 includes: a first forwarding node 601 and a second forwarding node 601, the first forwarding node 601 can be the above Figure 14 The second forwarding node can be the above-mentioned Figure 15 The device described.
[0208] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0209] The above description is only one embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A communication method, characterized in that: The method comprises: The first forwarding node receives a first service message, adds a 1588 indication and a transparent clock TC mode to the first service message, and obtains a reception timestamp of the first service message. The first service message also includes a first total retention time. The first service message is a service message of a relay protection service. The first forwarding node is a node other than the terminal node through which a transmission tunnel passes. The transmission tunnel is a tunnel used to transmit the first service message. The first total retention time is the sum of the retention times of the first service message in each forwarding node through which the message has passed. The first forwarding node obtains, based on the 1588 indication and the TC mode, a difference between the first total stay time and the receiving timestamp; The first forwarding node accumulates the current timestamp and the difference to obtain a second total stay time; The first forwarding node sends a second service message, where the second service message is obtained by replacing the first total detention time in the first service message with the second total detention time.
2. The method according to claim 1, wherein After the first forwarding node obtains the reception timestamp of the first service message, the method further includes: When receiving the first service message, the first forwarding node adds a reception timestamp of the first service message to the first service message; Before the first forwarding node acquires the difference between the first total stay time and the receiving timestamp based on the 1588 indication and the TC mode, the method further includes: The first forwarding node extracts the receiving timestamp from the first service message.
3. The method according to claim 1, wherein After the first forwarding node obtains the reception timestamp of the first service message, the method further includes: When receiving the first service message, the first forwarding node saves the correspondence between the message identification information of the first service message and the reception timestamp of the first service message; Before the first forwarding node acquires the difference between the first total stay time and the receiving timestamp based on the 1588 indication and the TC mode, the method further includes: The first forwarding node obtains the receiving timestamp of the first service message from the corresponding relationship between the message identification information and the receiving timestamp according to the message identification information of the first service message.
4. A communication method, characterized in that: The method comprises: The second forwarding node receives a second service message, where the second service message includes a second total retention time, which is the sum of the retention times of the second service message at each first forwarding node before the second forwarding node. The second forwarding node is an end node of a transmission tunnel, where the transmission tunnel is a tunnel for transmitting the second service message. The first forwarding nodes before the second forwarding node are nodes passed by the transmission tunnel. The first forwarding node is configured to receive a first service message, add a 1588 indication and a transparent clock (TC) mode to the first service message, and obtain a reception timestamp of the first service message. The first service message also includes a first total retention time, which is the sum of the retention times of the first service message at each forwarding node passed by the message. The first service message is a service message for a relay protection service. The difference between the first total retention time and the reception timestamp is obtained based on the 1588 indication and the TC mode, and the second total retention time is obtained by accumulating the difference between the current timestamp and the reception timestamp. The second forwarding node obtains, according to the retention time of the second service packet in each forwarding node and a time threshold, an allowed retention time of the second service packet in the second forwarding node; The second forwarding node sends the second service packet when the retention time of the second service packet in the second forwarding node reaches the allowed retention time.
5. The method according to claim 4, wherein The second forwarding node obtains, according to the retention time of the second service message in each forwarding node and the time threshold, an allowed retention time of the second service message in the second forwarding node, including: The second forwarding node obtains a retention time of the second service packet in the second forwarding node, where the retention time of the second service packet in the second forwarding node refers to a time from when the second forwarding node receives the second service packet to when the second service packet is cached in a jitter buffer, where the jitter buffer is a buffer in the second forwarding node; The second forwarding node obtains a buffering time allowed for the second service packet in the jitter buffer according to the retention time of the second service packet in each forwarding node, the retention time in the second forwarding node, and a time threshold.
6. The method according to claim 5, wherein The second forwarding node acquiring a retention time of the second service message in the second forwarding node includes: The second forwarding node obtains a reception timestamp of the second service packet and a first timestamp when the second service packet is cached in the jitter buffer; The second forwarding node obtains the retention time of the second service message in the second forwarding node according to the receiving timestamp and the first timestamp.
7. The method according to claim 6, wherein Before the second forwarding node obtains the receiving timestamp of the second service message, the method further includes: When receiving the second service message, the second forwarding node adds a reception timestamp of the second service message to the second service message; The second forwarding node obtains a reception timestamp of the second service message, including: The second forwarding node extracts the receiving timestamp from the second service message.
8. The method according to claim 6, wherein Before the second forwarding node obtains the receiving timestamp of the second service message, the method further includes: When receiving the second service message, the second forwarding node saves the correspondence between the message identification information of the second service message and the reception timestamp of the second service message; The second forwarding node obtains a reception timestamp of the second service message, including: The second forwarding node obtains the receiving timestamp of the second service message from the corresponding relationship between the message identification information and the receiving timestamp according to the message identification information of the second service message.
9. A communication device, characterized in that: The device comprises: a receiving unit, configured to receive a first service message, add a 1588 indication and a transparent clock TC mode to the first service message, and obtain a reception timestamp of the first service message, wherein the first service message also includes a first total retention time, the first service message is a service message of a relay protection service, the device is a node other than the end node passed by the transmission tunnel, the transmission tunnel is a tunnel used to transmit the first service message, and the first total retention time is the sum of the retention times of the first service message in each forwarding node passed; A processing unit is configured to obtain a difference between the first total stay time and the receiving timestamp based on the 1588 indication and the TC mode; and obtain a second total stay time by adding the current timestamp and the difference; The sending unit is configured to send a second service message, where the second service message is obtained by replacing the first total detention time in the first service message with the second total detention time.
10. The device according to claim 9, wherein The processing unit is configured to add a receiving timestamp of the first service message to the first service message when the receiving unit receives the first service message; and extract the receiving timestamp from the first service message.
11. The device according to claim 9, wherein The processing unit is used to save the correspondence between the message identification information of the first business message and the receiving timestamp of the first business message when the receiving unit receives the first business message; and obtain the receiving timestamp of the first business message from the correspondence between the message identification information and the receiving timestamp according to the message identification information of the first business message.
12. A communication device, characterized in that: The device comprises: a receiving unit, configured to receive a second service message, the second service message including a second total retention time, the second total retention time being the retention time of the second service message on each first forwarding node before the device, the device being the end node of a transmission tunnel, the transmission tunnel being a tunnel for transmitting the second service message, the forwarding nodes before the device being nodes passed by the transmission tunnel, the first forwarding node being configured to receive a first service message, add a 1588 indication and a transparent clock TC mode to the first service message, and obtain a reception timestamp of the first service message, the first service message also including a first total retention time, the first total retention time being the sum of the retention times of the first service message on each forwarding node passed by the message, the first service message being a service message for a relay protection service, obtaining a difference between the first total retention time and the reception timestamp based on the 1588 indication and the TC mode, and accumulating a current timestamp and the difference to obtain the second total retention time; A processing unit, configured to obtain an allowed retention time of the second service message in the device according to the retention time of the second service message in each forwarding node and a time threshold; The sending unit is configured to send the second service message when the retention time of the second service message in the device reaches the allowed retention time.
13. The device according to claim 12, wherein The processing unit is configured to: Obtaining a retention time of the second service message in the device, where the retention time of the second service message in the device refers to a time from when the second service message is received by the receiving unit to when the second service message is cached in a jitter buffer, where the jitter buffer is a buffer in the device; The buffering time allowed for the second service message in the jitter buffer is obtained according to the retention time of the second service message in each forwarding node, the retention time in the device, and the time threshold.
14. The device according to claim 13, wherein The processing unit is configured to: Obtaining a reception timestamp of the second service message and obtaining a first timestamp when the second service message is cached in the jitter buffer; According to the receiving timestamp and the first timestamp, the retention time of the second service message in the device is obtained.
15. The device according to claim 14, wherein The processing unit is configured to add a reception timestamp of the second service message to the second service message when the receiving unit receives the second service message; Extract the receiving timestamp from the second service message.
16. The device according to claim 14, wherein The processing unit is configured to save the correspondence between the message identification information of the second service message and the reception timestamp of the second service message when the receiving unit receives the second service message; The receiving timestamp of the second service message is obtained from the correspondence between the message identification information and the receiving timestamp according to the message identification information of the second service message.
17. A communication system, characterized in that: The communication system comprises: the apparatus according to any one of claims 9 to 11 and the apparatus according to any one of claims 12 to 16.
Citation Information
Patent Citations
Information bearing method and network architecture
CN106330371A
Transmitting residence time information in a network
CN107113236A