A message processing method and device, a network device and a storage medium
Patent Information
- Application Number
- CN202310300930.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-03-24
AI Technical Summary
[0004]有鉴于此,本申请提供一种报文处理方法、装置、网络设备及存储介质,用以提升网络设备之间基于Flex Overhead通信的交互效率,解决不同网络设备间互通的不确定性的问题
[0027] The message processing method, apparatus, network device, and storage medium provided in this application embodiment identify and process the message to be sent; according to the message type to which the message to be sent belongs, corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain a first target message, wherein several bits of the indicator field are set to correspond to a management channel, and there is a correspondence between the management channel and the overhead block; message data is filled into the overhead block corresponding to the corresponding bits of the first target message; and the first target message is sent. By adopting the above method, by filling the corresponding values into the set bits of the indicator field to indicate that the management channel stores message data, the receiver can accurately identify whether the management channel of the corresponding bit stores message data by recognizing the value of the corresponding bit of the indicator field after receiving the first target message. When message data is present, it can be extracted from the corresponding management channel, thereby improving the interaction efficiency of Flex Overhead communication between network devices and solving the uncertainty problem of interoperability between different network devices.
Smart Images

Figure CN116320093B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a message processing method, apparatus, network device, and storage medium. Background Technology
[0002] Currently, FlexE (Flex Ethernet) technology is widely used in network devices. FlexE achieves a low-cost, highly reliable, and dynamically allocated interface technology by decoupling the Ethernet MAC (Media Access Control) layer from the PHY (Physical Layer). However, due to the current imperfections of the FlexE protocol, some differences exist in its actual implementation. For example, there are variations in how different network devices utilize the FlexE Overhead management channel. Specifically, regarding the storage of DCN information in the Overhead (OH) management channel, some network devices may use management channels 4 and 5, while others may use channels 7 and 8, and still others may use all three. This results in most network devices currently traversing and parsing management channels 4, 5, 7, and 8, which to some extent affects interaction efficiency. This phenomenon is mainly due to the lack of explicit regulations regarding the use of the Overhead management channel in the OIF-FLEXE 2.1 protocol. The absence of a unified standard and convention leads to each network device storing data in its own management channel based on its own understanding. This, in turn, creates significant obstacles to interaction between different network devices using FlexE Overhead, hindering efficiency and accuracy in communication.
[0003] Therefore, improving the interaction efficiency of Flex Overhead-based communication between network devices and resolving the uncertainty of interoperability between different network devices are among the technical issues worth considering. Summary of the Invention
[0004] In view of this, this application provides a message processing method, apparatus, network device, and storage medium to improve the interaction efficiency between network devices based on Flex Overhead communication and solve the problem of uncertainty in interoperability between different network devices.
[0005] Specifically, this application is implemented through the following technical solution:
[0006] According to a first aspect of this application, a message processing method is provided, applied to a network device employing the FlexE protocol, the method comprising:
[0007] The message to be sent is identified and processed.
[0008] Based on the identified message type of the message to be sent, the corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain the first target message. Here, the set bits of the indicator field correspond to a management channel, and there is a correspondence between the management channel and the overhead block.
[0009] The message data is filled into the overhead block corresponding to the corresponding bit of the first target message;
[0010] Send the first target message.
[0011] According to a second aspect of this application, another message processing method is provided, applied to a network device employing the FlexE protocol, the method comprising:
[0012] Receive network packets sent by devices using the FlexE protocol;
[0013] The values of the set bits of the indicator field corresponding to the management channel in the network packet are identified to obtain the identification result. The set bits of the indicator field each correspond to a management channel, and there is a correspondence between the management channel and the overhead block.
[0014] Based on the identification results, message data is parsed from the overhead block corresponding to the management channel.
[0015] According to a third aspect of this application, a message processing apparatus is provided, disposed in a network device employing the FlexE protocol, the apparatus comprising:
[0016] The identification module is used to identify and process the messages to be sent.
[0017] The first filling module is used to fill the corresponding values in the corresponding bits of the indicator field of the management channel in the message to be sent according to the identified message type, so as to obtain the first target message. The setting of several bits of the indicator field corresponds to a management channel, and there is a correspondence between the management channel and the overhead block.
[0018] The second filling module is used to fill the message data into the overhead block corresponding to the corresponding bit of the first target message;
[0019] The sending module is used to send the first target message.
[0020] According to a fourth aspect of this application, another message processing apparatus is provided, configured in a network device employing the FlexE protocol, the apparatus comprising:
[0021] The receiving module is used to receive network packets sent by devices using the FlexE protocol;
[0022] The identification module is used to identify the value of the set bit of the indicator field corresponding to the management channel in the network packet and obtain the identification result. The set bits of the indicator field each correspond to a management channel, and there is a correspondence between the management channel and the overhead block.
[0023] The parsing module is used to parse the message data from the overhead block corresponding to the corresponding management channel based on the identification result.
[0024] According to a fifth aspect of this application, a network device is provided, including a processor and a machine-readable storage medium storing a computer program executable by the processor, wherein the processor is prompted by the computer program to perform the methods provided in the first aspect of the embodiments of this application, and / or the methods provided in the second aspect.
[0025] According to a sixth aspect of this application, a machine-readable storage medium is provided, which stores a computer program that, when invoked and executed by a processor, causes the processor to perform the methods provided in the first aspect of the embodiments of this application, and / or the methods provided in the second aspect.
[0026] The beneficial effects of the embodiments of this application are as follows:
[0027] The message processing method, apparatus, network device, and storage medium provided in this application embodiment identify and process the message to be sent; according to the message type to which the message to be sent belongs, corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain a first target message, wherein several bits of the indicator field are set to correspond to a management channel, and there is a correspondence between the management channel and the overhead block; message data is filled into the overhead block corresponding to the corresponding bits of the first target message; and the first target message is sent. By adopting the above method, by filling the corresponding values into the set bits of the indicator field to indicate that the management channel stores message data, the receiver can accurately identify whether the management channel of the corresponding bit stores message data by recognizing the value of the corresponding bit of the indicator field after receiving the first target message. When message data is present, it can be extracted from the corresponding management channel, thereby improving the interaction efficiency of Flex Overhead communication between network devices and solving the uncertainty problem of interoperability between different network devices. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating a message processing method provided in an embodiment of this application;
[0029] Figure 2 This is a flowchart illustrating another message processing method provided in an embodiment of this application;
[0030] Figure 3 This is a flowchart illustrating another message processing method provided in an embodiment of this application;
[0031] Figure 4 This is a flowchart illustrating another message processing method provided in an embodiment of this application;
[0032] Figure 5 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application;
[0033] Figure 6 This is a schematic diagram of another message processing device provided in an embodiment of this application;
[0034] Figure 7 This is a schematic diagram of the hardware structure of a network device that implements a message processing method according to an embodiment of this application. Detailed Implementation
[0035] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0036] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the corresponding listed items.
[0037] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0038] Before introducing the message processing method provided in this application, let's first introduce the technical terms involved in this application:
[0039] FlexE OH (Overhead) is an in-band management channel provided by the FlexE Shim layer. It supports the transmission of configuration and management information between two mating FlexE interfaces, enabling automatic negotiation and establishment of the link.
[0040] The FlexE management channel is a transport channel in the FlexE OH frame that can be used by the user for automatic application transmission. The FlexE management channel includes segment management channels, synchronization message channels, and shim-to-shim channels. In FlexE OH, the deployment of the FlexE management channel is roughly as follows: FlexE OH includes 8 overhead blocks, where blocks 4-5 are defined as segment management channels by the FlexE protocol, block 6 is defined as a synchronization message channel, and blocks 6-8 or blocks 7-8 are defined as shim-to-shim channels. It can be seen that there is a correspondence between overhead blocks and management channels.
[0041] The message processing method provided in this application is described in detail below.
[0042] See Figure 1 , Figure 1 This is a flowchart of a message processing method provided in this application. This method is a message processing flow in the sending direction. This method can be applied to network devices using the FlexE protocol. When implementing the above method, the network device may include the following steps:
[0043] S101. Identify and process the message to be sent.
[0044] In this step, because the current OIF-FlexE2.1 protocol does not explicitly specify the use of the Overhead management channel, network devices store data in the corresponding management channels based on their own understanding. This causes peer network devices to need to traverse each management channel to obtain the stored data, resulting in interoperability uncertainty. Therefore, this embodiment proposes using certain fields in the current Overhead frame structure to indicate the management channel where the data is located, in order to solve the interoperability uncertainty problem between different network devices.
[0045] Furthermore, since different message types may require message data to be written to different management channels, this embodiment proposes to first identify the message type of the message to be sent.
[0046] S102. Based on the identified message type of the message to be sent, fill the corresponding value in the corresponding bit of the indicator field of the management channel in the message to be sent to obtain the first target message.
[0047] Among them, the settings of several bits in the above-mentioned indicator field correspond to a management channel, and there is a corresponding relationship between the management channel and the overhead block.
[0048] In this step, since the network device uses management channels 4 to 8 when processing packets based on the FlexE protocol, the indicator field contains 5 bits corresponding to these 5 management channels. Thus, once the packet type is identified, the management channel storing the packet data for that packet type can be determined. The corresponding bit in the indicator field can then be filled with the corresponding value to indicate that the management channel stores packet data. After filling in the corresponding values in the corresponding bits, the first target packet can be obtained.
[0049] S103. Fill the message data into the overhead block corresponding to the corresponding bit of the first target message.
[0050] In this step, since there is a correspondence between the management channel and the overhead block, after identifying the management channel and filling in the corresponding value in the corresponding bit of the indicator field, the message data to be sent can be filled into the overhead block corresponding to the management channel. In this way, by setting the indicator bit of the management channel in the indicator field, the receiver, upon receiving the first target message, can accurately determine the management channel to which the message data belongs by identifying the value of the corresponding bit in the indicator field used to indicate the management channel, thus achieving deterministic communication with the sending network device.
[0051] S104. Send the first target message.
[0052] In this step, the first target message, with the corresponding value filled in the corresponding bit of the management channel in the indication field, can be sent to the receiving network device.
[0053] By implementing the message processing method provided in this application, the message to be sent is identified and processed; according to the message type to which the message to be sent belongs, corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain a first target message, wherein several bits of the indicator field are set to correspond to a management channel, and there is a correspondence between the management channel and the overhead block; message data is filled into the overhead block corresponding to the corresponding bits of the first target message; and the first target message is sent. By adopting the above method, by filling the corresponding values into the set bits of the indicator field to indicate that the management channel stores message data, the receiver can accurately identify whether the management channel of the corresponding bit stores message data by identifying the value of the corresponding bit of the indicator field after receiving the first target message. When message data is present, it can be extracted from the corresponding management channel, thereby improving the interaction efficiency of Flex Overhead communication between network devices and solving the uncertainty problem of interoperability between different network devices.
[0054] Optionally, the aforementioned indication field may be, but is not limited to, a reserved field in the second overhead block of each overhead frame. In practical applications, only bits 0 to 16 of the second overhead block are currently used, with the remainder being reserved fields. Therefore, this embodiment proposes to use 8 bits (bit0 to bit7) of the reserved field as an indication field to indicate the message type stored in the management channel corresponding to each overhead block and the occupancy status of the corresponding management channel.
[0055] Based on this, when the network device uses management channels 4 through 8 to store packet data, then 5 bits of the aforementioned reserved field (bits 0 through 4) will correspond to these 5 management channels respectively. For example, bit 0 corresponds to management channel 4, bit 1 to management channel 5, bit 2 to management channel 6, bit 3 to management channel 7, bit 4 to management channel 8, and so on. This correspondence is merely an example and does not constitute a limitation on the aforementioned correspondence. The remaining bits 5 through 7 are used to indicate the packet type.
[0056] Optionally, based on the above embodiments, step S102 can be executed in this embodiment according to the following method: if the message to be sent is a message of a set type, then fill the first value in the first set bit of the indicator field to obtain the first message; when the first message is an event message, then fill the second set bit of the indicator field in the first message with a second value to obtain the first target message; when the first message is not an event message, then fill the second set bit with a third value to obtain the first target message.
[0057] Specifically, in practical applications, there may be some fixed types of network packets whose data needs to be filled into a fixed management channel. Therefore, this embodiment proposes that when a packet to be sent is identified as a packet of a certain type, the management channel used to store the packet data of that type of packet is confirmed. Then, a first value is filled into the bit corresponding to the confirmed management channel (denoted as the first setting bit) in the indication field of the packet to be sent. This first value is used to indicate that the aforementioned management channel stores packet data. The first value can be, but is not limited to, 1. In this way, after the receiver receives the first target packet, when it identifies that the value of the first setting bit is the first value, it can, on the one hand, identify that the management channel corresponding to the first setting bit contains packet data, and on the other hand, it can quickly extract the packet data from the overhead block corresponding to the management channel.
[0058] Based on this, when a network packet is identified as a packet of a set type, further identification processing can be performed on the packet to be sent. That is, it can be determined whether the packet to be sent is an event packet. If it is an event packet, a second value is filled in the second setting bit of the indicator field. The second value can be, but is not limited to, 1. If it is not an event packet, a third value is filled in the second setting bit of the indicator field. The third value can be, but is not limited to, 0. So that after the receiver receives the first target packet, it can identify whether the packet to be sent is an event packet by identifying the value of the second setting bit, so as to perform subsequent corresponding operations.
[0059] To facilitate understanding, let's take a PTP message as an example. When a PTP message is identified as the one to be sent, according to the current FlexE protocol, when a PTP message is stored in the Overhead, the message data needs to be stored in the overhead block corresponding to management channel 6. Based on this principle, when a PTP message is identified, since the indicator bit 2 of management channel 6 is used, the bit indicated by bit 2 in the indicator field of the message to be sent can be filled with a first value, such as 1, to indicate that the message to be sent is a PTP message. At the same time, the message data will be filled into the overhead block corresponding to management channel 6, thus obtaining the first target message, which is then sent to the receiver. Furthermore, if it is confirmed that the message to be sent is not a PTP message, then bit 2 is filled with 0.
[0060] Furthermore, based on the identification that the message to be sent is a PTP message, further judgment can be made: determining whether the message to be sent is a PTP type event message. If it is confirmed to be an event message, a second value is filled into bit 7, i.e., bit 7 takes the value of the second value to indicate that the message to be sent is a PTP type event message; optionally, the second value can be, but is not limited to, 1. If it is confirmed that the message to be sent is not an event message, a third value is filled into bit 7 to indicate that the message to be sent is not an event message; optionally, the third value can be, but is not limited to, 0, and the third value is different from the second value. At the same time, the message data is filled into the overhead block corresponding to management channel 6, thereby obtaining the first target message, and then sending the first target message to the receiver.
[0061] Optionally, based on any of the above embodiments, step S102 can also be performed according to the following method in this embodiment: if the message to be sent is not a message of a set type, then the target overhead block used to fill the message data is confirmed; a fourth value is filled in the third setting bit of the indicator field corresponding to the management channel to which the target overhead block belongs, to obtain a second message; if the second message is a protocol message, then a fifth value is filled in the fourth setting bit of the indicator field in the second message, to obtain a first target message; if the second message is not a protocol message, then a sixth value is filled in the fourth setting bit of the indicator field in the second message, to obtain a first target message.
[0062] Specifically, when a message to be sent is identified as not being of a set type, the target overhead block for storing message data can be predetermined. Since there is a correspondence between overhead blocks and management channels, the management channel corresponding to the target overhead block can be determined after the target overhead block is identified. Then, a fourth value can be filled into the third setting bit in the reserved field corresponding to the determined management channel. Optionally, this fourth value can be, but is not limited to, 1. For example, assuming the management channel corresponding to the determined target overhead block is management channel 4, a 1 can be written to bit 0 corresponding to management channel 4 to indicate that management channel 4 is used to store message data, so that the receiver can extract message data from the corresponding overhead block based on bit 0.
[0063] Building upon this, the message to be sent can be further processed to identify whether it is a protocol message or a data message. When the message to be sent is identified as a protocol message, a fourth value is entered into the third setting field to obtain the first message. A fifth value can then be entered into the fourth setting field of the first message's indicator field. If it is not a protocol message, it indicates that the message to be sent is a data message. In this case, a fifth value is entered into the fourth setting field of the first message's indicator field to obtain the first target message. This allows the receiver to quickly identify the message type of the first target message based on it, and to quickly extract the message data from the corresponding overhead block, thereby greatly improving the determinism of interoperability between network devices.
[0064] To better understand this embodiment, we will take the indicator field as a reserved field as an example. In this case, the third setting bit is any one of bit0, bit1, bit3 and bit4. The value of the third setting bit can be, but is not limited to, 1. The fourth setting bit can be, but is not limited to, bit5 and bit6. When the message to be sent is a protocol message, the value of bit5 and bit6 can be 10, that is, the fifth value mentioned above is 10. When the message to be sent is a data message, the value of bit5 and bit6 can be 01, that is, the sixth value mentioned above is 01. Based on this, when the message to be sent is not a PTP message, if it is determined that the target overhead block corresponding to the message data is block 4, and further, if it is determined that block 1 corresponds to management channel 4, then a 1 is written to bit 0 to obtain the second message, indicating that the overhead block corresponding to management channel 4 stores the message data. Furthermore, if it is confirmed that the message to be sent is a protocol message, then bits 5 and 6 in the reserved fields of the second message are filled with 1 and 0 respectively, thus obtaining the first target message. If it is confirmed that the message to be sent is a data message, then bits 5 and 6 in the reserved fields of the second message are filled with 0 and 1 respectively, thus obtaining the first target message. In this way, deterministic interoperability between network devices can be quickly achieved.
[0065] Optionally, the reserved field mentioned above can be, but is not limited to, a reserved field in block 2. By filling several bits of this reserved field with corresponding values, the message type stored in the management channel of each block and the occupancy status of the specific management channel are indicated. Specifically, the current FlexE protocol is not yet fully developed. It can be seen from the FlexEOverhead overhead frame that a large number of reserved fields are not used in the current frame structure, which brings greater scalability and flexibility to users. Based on this, in the second overhead block of each overhead frame, only bits 0 to 16 are currently used, and the rest are reserved fields. Therefore, this application mainly uses several bits set in the reserved field of block 2 as indicator bits for each management channel to indicate the message type stored in the management channel of each block and the occupancy status of the specific management channel.
[0066] To better understand any of the embodiments described above in this application, Figure 2 The message processing method shown is illustrated with an example. Figure 2 If the message to be sent is an overhead header (OH) message, the network device first identifies whether the OH message is a PTP message before sending it to the peer network device. If the OH message is identified as a PTP message, bit 2 in the reserved field of the OH message is set to 1 to indicate that the OH message is a PTP message. Further, it is determined whether the OH message is an event message. If it is an event message, bit 7 in the reserved field of the OH message is set to 1; if it is not an event message, bit 7 in the reserved field of the OH message is set to 0. At the same time, since the PTP message corresponds to a fixed management channel 6, the message data needs to be filled into the overhead block corresponding to the management channel 6.
[0067] Furthermore, when the OH message is not a PTP message, this embodiment proposes to first determine the target overhead block storing the OH message, and then configure the value of the bit in the OH message corresponding to the management channel to which the target overhead block belongs to to be 1. For example, if the determined management channel is management channel 5, then the value of bit 1 in the reserved field of the OH message is set to 1. Based on this, in order to facilitate the peer network device to identify the message type of the OH message, the OH message can be further identified, that is, it can be determined whether the OH message is a protocol message. When it is a protocol message, the value of bits 5 and 6 in the reserved field is set to 10; when it is not a protocol message, it indicates that the OH message is a data message, and in this case, the value of bits 5 and 6 in the reserved field is set to 01. At the same time, the message data is filled into the target overhead block determined above. Then the OH message that has undergone the above processing operation can be sent to the peer network device. Therefore, by filling the corresponding values in the reserved fields (not defined in FlexE Overhead) with the corresponding bits, it is possible to indicate whether each management channel 4 to management channel 8 contains a packet. This facilitates the peer network device in quickly retrieving packet data from the corresponding management channel, effectively improving interaction efficiency. Furthermore, this embodiment also uses bits 5 to 7 of the reserved field to classify packets, so that when the peer network device receives a packet, it can quickly identify the packet type and perform corresponding extended operations. For example, bit 7 can be used to indicate event packets, utilizing the timestamp information recorded in the event packets.
[0068] Accordingly, this embodiment also provides a message processing method for the receiving direction, which is applied to network devices using the FlexE protocol. See [link to relevant documentation]. Figure 3 The diagram shown is a flowchart of a message processing method provided in this application. When implementing the above message processing method, the network device may include the following process:
[0069] S301. Receive network packets sent by devices using the FlexE protocol.
[0070] S302. Identify the value of the setting bit of the indicator field corresponding to the management channel in the network message to obtain the identification result.
[0071] In this step, since the network device uses management channels 4 through 8 when processing packets based on the FlexE protocol, the indicator field contains 5 bits corresponding to these 5 management channels. Therefore, after receiving a network packet, the network device can process the indicator field to obtain the identification result.
[0072] In this context, several bits of the indicator field are set to correspond to a management channel, and there is a corresponding relationship between the management channel and the overhead block.
[0073] S303. Based on the identification result, the message data is parsed from the overhead block corresponding to the management channel.
[0074] In this step, after the network device identifies and processes the setting of several bits in the indicator field of the network packet, it can identify whether each management channel stores packet data. Then, if packet data is stored, the packet data can be extracted from the management channel where the packet data of the network packet is located.
[0075] The message processing method provided in this application receives network messages sent by devices using the FlexE protocol; identifies the values of the set bits of the indicator field corresponding to the management channel in the network message to obtain an identification result, wherein each set bit of the indicator field corresponds to a management channel, and there is a correspondence between the management channel and the overhead block; and based on the identification result, message data is parsed from the overhead block corresponding to the corresponding management channel. By identifying the set bits of the indicator field in the network message and then extracting message data from the corresponding management channel based on the identification result, instead of extracting message data by traversing each management channel one by one, the interaction efficiency of Flex Overhead-based communication between network devices is greatly improved, and the uncertainty problem of interoperability between different network devices is also solved.
[0076] Optionally, the aforementioned indication field may be, but is not limited to, a reserved field in the second overhead block of each overhead frame. In practical applications, only bits 0 to 16 of the second overhead block are currently used, with the remainder being reserved fields. Therefore, this embodiment proposes to use 8 bits (bit0 to bit7) of the reserved field as an indication field to indicate the message type stored in the management channel corresponding to each overhead block and the occupancy status of the corresponding management channel.
[0077] Based on this, when the network device uses management channels 4 through 8 to store packet data, then 5 bits of the aforementioned reserved field (bits 0 through 4) will correspond to these 5 management channels respectively. For example, bit 0 corresponds to management channel 4, bit 1 to management channel 5, bit 2 to management channel 6, bit 3 to management channel 7, bit 4 to management channel 8, and so on. This correspondence is merely an example and does not constitute a limitation on the aforementioned correspondence. The remaining bits 5 through 7 are used to indicate the packet type.
[0078] Based on the above embodiments, in this embodiment, step S302 can be executed according to the following method: if the value of the first set bit of the indicator field in the network packet is a first set value, then the network packet is identified as a packet of a set type; determine whether the value of the second set bit of the indicator field is a second set value; if it is a second set value, then the network packet is identified as an event packet of a set type. Based on this, step S303 can be executed according to the following process: when the network packet is a packet of a set type, then the packet data is parsed from the overhead block corresponding to the first set bit.
[0079] Specifically, in practical applications, there may be some fixed types of network packets whose data needs to be filled into a fixed management channel. Therefore, this embodiment proposes to first determine whether the value of the first setting bit corresponding to the fixed management channel is a first setting value, which can be, but is not limited to, 1. When it is the first setting value, it indicates that the network packet is a packet of the set type. At this time, the network device can extract the packet data from the overhead block corresponding to the fixed management channel. In addition, in order to quickly identify the type of packet, the value of the second setting bit used to indicate event packets can be further identified. When the value of the second setting bit is identified as the second setting value, which can be, but is not limited to, 1, it can be determined that the received network packet is an event packet of the set type. When the value of the second setting bit is the third setting value, which can be, but is not limited to, 0, it indicates that the network packet is not an event packet.
[0080] To facilitate understanding, let's take a PTP packet as an example. When bit 2 is identified as 1, it indicates that the network packet is a PTP packet. Based on this, we can check if bit 7 is 1. If it is 1, it indicates that the network packet is an event packet under the PTP type. In this way, the network device can quickly identify and process the network packet according to the above process and perform the corresponding operation. When bit 7 is confirmed to be 0, it can be identified that the network packet is not an event packet. Furthermore, since PTP packets have a fixed management channel 6, the network device can extract packet data from the corresponding overhead block based on the correspondence between the management channel and the overhead block.
[0081] When the value of the first setting bit in the indicator field of the network packet is not the first setting value, the network packet is identified as not being a packet of the set type; it is then determined whether the value of the fourth setting bit in the indicator field is the third setting value; if it is the third setting value, the network packet is identified as a protocol packet.
[0082] Specifically, when the value of the first setting bit is 0, it indicates that the network packet is not a packet of the set type. At this time, it can be further confirmed whether the value of the fourth setting bit is the third setting value used to characterize the protocol packet. When it is the third setting value, it indicates that the network packet is a protocol packet; and when the value of the fourth setting bit is the fourth setting value, it indicates that the network packet is a data packet.
[0083] Based on this, step S303 can be performed according to the following process: when the network packet is not a packet of the set type, the target overhead block carrying the packet data is determined according to the value of the set bits in the indicator field; the packet data is parsed from the target overhead block.
[0084] Specifically, since the aforementioned settings each correspond to a management channel, the target bit with a value of 1 among these settings can be identified. This allows the determination of the management channel corresponding to the target bit, and consequently, the target overhead block where the message data resides. The message data can then be extracted from the overhead block.
[0085] To better understand this embodiment, let's take bit 5 and bit 6 as an example. When bit 2 in the indicator field of the network packet is 0, it indicates that the network packet is not a PTP packet. Then, we can check if the values of bit 5 and bit 6 are 10. If they are 10, it indicates that the network packet is a protocol packet. If the values of bit 5 and bit 6 are 01, it indicates that the network packet is a data packet, thus accurately identifying the packet type. Furthermore, after identifying the packet type, it is necessary to extract the packet data. Therefore, in this embodiment, the network device can perform identification processing on the values of bit 0, bit 1, bit 3, and bit 4 in the indicator field of the network packet to identify the target bit with a value of 1. Taking bit 1 as an example, since management channel 5 corresponds to bit 1, the target overhead block storing the packet data can be determined, that is, the overhead block corresponding to management channel 5. In this way, the packet data can be extracted from the overhead block, and then related operations can be performed.
[0086] Optionally, the reserved field mentioned above can be, but is not limited to, a reserved field in block 2. By filling several bits of this reserved field with corresponding values, the message type stored in the management channel of each block and the occupancy status of the specific management channel are indicated. Specifically, the current FlexE protocol is not yet fully developed. It can be seen from the FlexEOverhead overhead frame that a large number of reserved fields are not used in the current frame structure, which brings greater scalability and flexibility to users. Based on this, in the second overhead block of each overhead frame, only bits 0 to 16 are currently used, and the rest are reserved fields. Therefore, this application mainly uses several bits set in the reserved field of block 2 as indicator bits for each management channel to indicate the message type stored in the management channel of each block and the occupancy status of the specific management channel.
[0087] To better understand the message processing method provided in any of the above embodiments of this application, Figure 4The following explanation uses the packet processing flow as an example, taking an OH (Oh-Hop) packet as an example. After receiving an OH packet, the network device first checks if bit 2 of the reserved field is 1. If it is 1, it indicates the OH packet is a PTP (Private Protocol) packet. Then, it checks bit 7 to see if it is 1. If it is 1, it indicates the OH packet is a PTP event packet, and the network device can then perform relevant processing. If bit 7 is 0, it indicates the OH packet is not an event packet. If bit 2 is 0, it indicates the OH packet carries a non-PTP packet. The network device can then further identify the packet based on the values of bits 5 and 6 in the reserved field. If bits 5 and 6 are 10, the OH packet is confirmed to be a protocol packet, and the network device can record this information. If bits 5 and 6 are 01, the OH packet is confirmed to be a data packet, thus achieving rapid identification and processing of OH packets. Furthermore, the network device needs to parse the message data. Therefore, the network device also needs to perform the following operations: the network device can determine which overhead blocks store message data based on the values of bit0, bit1, bit3, and bit4, and then parse the message data from the determined overhead blocks. For example, if bit3 is determined to be 1, it indicates that the management channel 7 corresponding to bit3 stores message data. The message data is then parsed from the overhead block corresponding to management channel 7, and relevant processing is performed. Thus, the network device can quickly extract message data from the corresponding management channel, effectively improving interaction efficiency. In addition, this embodiment also uses bits 5 to 7 in the reserved field to classify the message, so that when the network device receives the message, it can quickly identify the message type and perform corresponding extended operations. For example, bit 7 can be used to indicate an event message, utilizing the timestamp information of the recorded event message.
[0088] Thus, by providing the message processing method according to any of the above embodiments, the efficiency of interaction between network devices using the Overhead management channel is improved; on the other hand, the uncertainty of different network devices using the FlexeOverhead management channel can be effectively resolved, thereby improving the success rate of interaction. Finally, this application also improves the current explanation of the relevant fields of the Overhead in the Flexe protocol.
[0089] Based on the same inventive concept, this application also provides a message processing apparatus corresponding to the message processing method in the sending direction described above. Specific implementation details of this message processing apparatus can be found in the description of the message processing method in the sending-direction network device described above, and will not be elaborated upon here.
[0090] See Figure 5 , Figure 5 This application provides an exemplary embodiment of a message processing apparatus, configured in a network device employing the FlexE protocol, the apparatus comprising:
[0091] The identification module 501 is used for identifying and processing the message to be sent;
[0092] The first filling module 502 is used to fill the corresponding values in the corresponding bits of the indicator field of the management channel in the message to be sent according to the identified message type, so as to obtain the first target message. The setting of several bits of the indicator field corresponds to a management channel, and there is a correspondence between the management channel and the overhead block.
[0093] The second filling module 503 is used to fill the message data into the overhead block corresponding to the corresponding bit of the first target message;
[0094] The sending module 504 is used to send the first target message.
[0095] Optionally, based on the above embodiments, in this embodiment, the first filling module 502 is specifically used to fill a first value in the first setting bit of the indication field to obtain a first message if the message to be sent is a message of a set type; when the first message is an event message, fill a second value in the second setting bit of the indication field in the first message to obtain the first target message; when the first message is not an event message, fill a third value in the second setting bit to obtain the first target message.
[0096] Optionally, based on any of the above embodiments, in this embodiment, the first filling module 502 is further configured to: if the message to be sent is not a message of a set type, confirm the target overhead block for filling the message data; fill the third setting bit in the indication field corresponding to the management channel to which the target overhead block belongs with a fourth value to obtain a second message; if the second message is a protocol message, fill the fourth setting bit in the indication field of the second message with a fifth value to obtain the first target message; if the second message is not a protocol message, fill the fourth setting bit in the indication field of the second message with a sixth value to obtain the first target message.
[0097] Optionally, based on any of the above embodiments, in this embodiment, the above-mentioned indication field is a reserved field in the message to be sent.
[0098] Based on the same inventive concept, this application also provides a message processing apparatus corresponding to the message processing method in the receiving direction described above. Specific implementation details of this message processing apparatus can be found in the description of the message processing method in the receiving-direction network device described above, and will not be elaborated upon here.
[0099] See Figure 6 , Figure 6 This application provides an exemplary embodiment of a message processing apparatus, configured in a network device employing the FlexE protocol, the apparatus comprising:
[0100] The receiving module 601 is used to receive network packets sent by devices using the FlexE protocol;
[0101] The identification module 602 is used to identify the value of the setting bit of the indicator field corresponding to the management channel in the network packet and obtain the identification result. The setting bits of the indicator field correspond to a management channel, and there is a correspondence between the management channel and the overhead block.
[0102] The parsing module 603 is used to parse the message data from the overhead block corresponding to the corresponding management channel based on the identification result.
[0103] Optionally, based on the above embodiments, in this embodiment, the identification module 602 is specifically used to identify the network packet as a packet of a set type if the value of the first set bit of the indicator field in the network packet is a first set value; determine whether the value of the second set bit of the indicator field is a second set value; if it is a second set value, identify the network packet as an event packet of the set type.
[0104] Based on this, the parsing module 603 is specifically used to parse the packet data from the overhead block corresponding to the first setting bit when the network packet is a packet of a set type.
[0105] Optionally, based on any of the above embodiments, in this embodiment, the identification module 602 is specifically used to identify that the network packet is not a packet of a set type if the value of the first set bit of the indicator field in the network packet is not a first set value; to determine whether the value of the fourth set bit in the indicator field is a third set value; if it is the third set value, to identify that the network packet is a protocol packet.
[0106] Based on this, the parsing module 603 is specifically used to determine the target overhead block carrying the message data according to the value of the set bits in the indicator field when the network message is not a message of the set type; and to parse the message data from the target overhead block.
[0107] Optionally, based on any of the above embodiments, the above-mentioned indication field in this embodiment is a reserved field in the network packet.
[0108] Based on the same inventive concept, embodiments of this application provide a network device, such as... Figure 7 As shown, the device includes a processor 701 and a machine-readable storage medium 702. The machine-readable storage medium 702 stores a computer program executable by the processor 701. The processor 701 is prompted by the computer program to execute the message processing method provided in any embodiment of this application. Furthermore, the network device also includes a communication interface 703 and a communication bus 704, wherein the processor 701, the communication interface 703, and the machine-readable storage medium 702 communicate with each other via the communication bus 704.
[0109] The communication bus mentioned in the above network devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0110] The communication interface is used for communication between the aforementioned network devices and other devices.
[0111] The machine-readable storage medium 702 described above can be a memory, which may include random access memory (RAM), DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0112] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0113] For network devices and machine-readable storage media embodiments, since the methods involved are basically similar to those described in the foregoing method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.
[0114] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0115] The specific implementation process of the functions and roles of each unit / module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0116] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units / modules described as separate components may or may not be physically separate. The components shown as units / modules may or may not be physical units / modules, that is, they may be located in one place or distributed across multiple network units / modules. Some or all of the units / modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0117] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A message processing method, characterized in that, The method, applied to network devices using the FlexE protocol, includes: The message to be sent is identified and processed. Based on the identified message type of the message to be sent, the corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain the first target message. Here, the set bits of the indicator field correspond to a management channel, and the management channel has a corresponding relationship with the overhead block. The indicator field is a reserved field of the message to be sent. The indicator field is located in the overhead frame. The indicator field includes a management channel indicator bit and a message type indicator bit. The management channel indicator bit is used to indicate the occupancy status of the management channel, and the message type indicator bit is used to indicate the message type. The management channel is a management channel defined by the FlexE protocol. The message data is filled into the overhead block corresponding to the corresponding bit of the first target message; Send the first target message.
2. The method according to claim 1, characterized in that, Based on the message type of the message to be sent, the corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain the first target message, including: If the message to be sent is a message of a set type, then the first value is filled into the first set bit of the indication field to obtain the first message; When the first message is an event message, the second value is filled into the second setting bit of the indication field in the first message to obtain the first target message; When the first message is not an event message, the third value is filled into the second setting bit to obtain the first target message.
3. The method according to claim 1 or 2, characterized in that, Based on the message type of the message to be sent, the corresponding values are filled into the corresponding bits of the indicator field of the management channel in the message to be sent to obtain the first target message, including: If the message to be sent is not a message of the specified type, then confirm the target overhead block used to fill the message data; A fourth value is filled into the third setting bit in the indication field corresponding to the management channel to which the target overhead block belongs, to obtain the second message; If the second message is a protocol message, then the fourth setting bit of the indication field in the second message is filled with a fifth value to obtain the first target message; If the second message is not a protocol message, then the fourth setting bit of the indication field in the second message is filled with the sixth value to obtain the first target message.
4. A message processing method, characterized in that, The method, applied to network devices using the FlexE protocol, includes: Receive network packets sent by devices using the FlexE protocol; The values of the set bits of the indicator field corresponding to the management channel in the network packet are identified to obtain the identification result. The set bits of the indicator field each correspond to a management channel. There is a correspondence between the management channel and the overhead block. The indicator field is a reserved field of the network packet. The indicator field is located in the overhead frame. The indicator field includes a management channel indicator bit and a packet type indicator bit. The management channel indicator bit is used to indicate the occupancy status of the management channel. The packet type indicator bit is used to indicate the packet type. The management channel is a management channel defined by the FlexE protocol. Based on the identification results, message data is parsed from the overhead block corresponding to the management channel.
5. The method according to claim 4, characterized in that, The values of the setting bits in the indication field corresponding to the management channel in the network packet are identified to obtain the identification results, including: If the first set bit of the indicator field in the network packet is set to a first set value, then the network packet is identified as a packet of the set type. Determine whether the value of the second set bit of the indicator field is a second set value; If the value is the second preset value, then the network packet is identified as an event packet of the preset type; Based on the identification result, message data is parsed from the overhead block corresponding to the management channel, including: When the network packet is a packet of a specified type, the packet data is parsed from the overhead block corresponding to the first specified bit.
6. The method according to claim 4, characterized in that, The values of the setting bits in the indication field corresponding to the management channel in the network packet are identified to obtain the identification results, including: If the value of the first set bit of the indicator field in the network packet is not a first set value, then the network packet is identified as a packet of a set type. Determine whether the value of the fourth setting bit in the indicator field is the third setting value; If the value is the third preset value, then the network packet is identified as a protocol packet; Based on the identification result, message data is parsed from the overhead block corresponding to the management channel, including: When the network packet is not a packet of the specified type, the target overhead block carrying the packet data is determined according to the value of the specified bits in the indicator field. Parse the message data from the target overhead block.
7. A message processing apparatus, characterized in that, The device, configured in a network device employing the FlexE protocol, includes: The identification module is used to identify and process the messages to be sent. The first filling module is used to fill the corresponding values in the corresponding bits of the indicator field of the management channel in the message to be sent according to the identified message type, so as to obtain the first target message. The indicator field sets several bits to correspond to a management channel, and the management channel has a corresponding relationship with the overhead block. The indicator field is a reserved field of the message to be sent. The indicator field is located in the overhead frame. The indicator field includes a management channel indicator bit and a message type indicator bit. The management channel indicator bit is used to indicate the occupancy status of the management channel, and the message type indicator bit is used to indicate the message type. The management channel is a management channel defined by the FlexE protocol. The second filling module is used to fill the message data into the overhead block corresponding to the corresponding bit of the first target message; The sending module is used to send the first target message.
8. The apparatus according to claim 7, characterized in that, The first filling module is specifically used to fill a first value into the first setting bit of the indicator field to obtain a first message if the message to be sent is a message of a set type; and to fill a second value into the second setting bit of the indicator field in the first message to obtain the first target message when the first message is an event message. When the first message is not an event message, the third value is filled into the second setting bit to obtain the first target message.
9. The apparatus according to claim 7 or 8, characterized in that, The first filling module is further configured to: if the message to be sent is not a message of a set type, then confirm the target overhead block for filling the message data; fill the third setting bit in the indication field corresponding to the management channel to which the target overhead block belongs with a fourth value to obtain a second message; if the second message is a protocol message, then fill the fourth setting bit in the indication field of the second message with a fifth value to obtain the first target message. If the second message is not a protocol message, then the fourth setting bit of the indication field in the second message is filled with the sixth value to obtain the first target message.
10. A message processing apparatus, characterized in that, The device, configured in a network device employing the FlexE protocol, includes: The receiving module is used to receive network packets sent by devices using the FlexE protocol; The identification module is used to identify the values of the set bits of the indicator field corresponding to the management channel in the network packet and obtain the identification result. The set bits of the indicator field each correspond to a management channel. The management channel and the overhead block have a corresponding relationship. The indicator field is a reserved field of the network packet. The indicator field is located in the overhead frame. The indicator field includes a management channel indicator bit and a packet type indicator bit. The management channel indicator bit is used to indicate the occupancy status of the management channel. The packet type indicator bit is used to indicate the packet type. The management channel is a management channel defined by the FlexE protocol. The parsing module is used to parse the message data from the overhead block corresponding to the corresponding management channel based on the identification result.
11. The apparatus according to claim 10, characterized in that, The identification module is specifically used to identify the network packet as a packet of a set type if the value of the first set bit of the indicator field in the network packet is a first set value; to determine whether the value of the second set bit of the indicator field is a second set value; and if it is a second set value, to identify the network packet as an event packet of the set type. The parsing module is specifically used to parse the packet data from the overhead block corresponding to the first set bit when the network packet is a packet of a set type.
12. The apparatus according to claim 10 or 11, characterized in that, The identification module is specifically used to identify that the network packet is not a packet of a set type if the value of the first set bit of the indicator field in the network packet is not a first set value; to determine whether the value of the fourth set bit in the indicator field is a third set value; and if it is the third set value, to identify that the network packet is a protocol packet. The parsing module is specifically used to determine the target overhead block carrying the packet data according to the value of the set bits in the indicator field when the network packet is not a packet of a set type; and to parse the packet data from the target overhead block.
13. A network device, characterized in that, The method includes a processor and a machine-readable storage medium storing a computer program executable by the processor, the processor being prompted by the computer program to perform the method of any one of claims 1-3, and / or, to perform the method of any one of claims 4-6.
14. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores a computer program that, when invoked and executed by a processor, causes the processor to perform the method according to any one of claims 1-3, and / or, the method according to any one of claims 4-6.
Citation Information
Patent Citations
Ont pay expense sending, receiving method and device
CN102835127A
Service carrying method, equipment and system
CN108809901A
Message sending method and device
CN109379764A