Message processing method and related equipment
By adjusting the packet length according to the path MTU in the communication device, the problem of low traffic transmission efficiency in traditional technology is solved, and higher service throughput performance and traffic transmission efficiency are achieved.
Patent Information
- Application Number
- CN202310816268.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2025-01-07
AI Technical Summary
The existing technology cannot meet the needs of service throughput performance, especially when traffic transmission is transmitted in the context of 5G and network cloudization. The traditional IP message sharding method is not flexible enough, resulting in low traffic transmission efficiency and unable to effectively meet bandwidth and computing resources. demand.
By dynamically adjusting the message length according to the path MTU in the communication device, generating service messages of larger lengths and transmitting them on supported paths, reducing the number of messages after sharding, saving bandwidth and computing resources, and improving transmission efficiency.
It achieves higher service throughput performance, adapts to different business needs, improves traffic transmission efficiency, and significantly improves performance in traffic transmission with a large proportion of bandwidth.
Smart Images

Figure CN119277447A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message processing method and related equipment. Background Art
[0002] With the development of new technologies such as the fifth generation mobile networks (5G) and network cloudification, network traffic has increased dramatically, and the requirements for service throughput performance have continued to increase.
[0003] Usually, traffic cannot be directly transmitted in the network, but needs to be split into multiple Internet Protocol (IP) messages (also called service messages or data messages), and then the multiple IP messages obtained by splitting are transmitted in the network. For example, the traffic is split into IP messages with a length less than or equal to 1500 bytes according to the default maximum transmission unit (maximum transmission unit, MTU) (such as 1500 bytes), thereby avoiding the loss of the IP message due to the length of the IP message being greater than the MTU of a link on the transmission path, so that the multiple IP messages split by the traffic can be effectively transmitted in the network.
[0004] However, the current way of processing traffic is not flexible enough and cannot meet the requirements of business throughput performance. Summary of the invention
[0005] Based on this, the present application provides a message processing method and related equipment, which can realize flexible processing of traffic based on MTU to improve service throughput performance.
[0006] In the first aspect, the present application provides a message processing method, which is applied to a first communication device. The method may, for example, include: the traffic of a first service is segmented into segments with a first MTU and transmitted to the first communication device, the first communication device receives multiple first service messages of the first service, and the length of each first service message is less than or equal to the first MTU; if the demand for the first service is large, and a first path with an MTU greater than the first MTU is maintained on the first communication device, the first communication device can process the multiple first service messages based on the MTU of the first path (i.e., the second MTU) to obtain at least one second service message, the length of the second service message is less than or equal to the second MTU, the second MTU is greater than the first MTU, and the second MTU matches the demand of the first service; thereby, the first communication device transmits the at least one second service message along the first path. In this way, when processing the traffic of the service, if the service demand corresponds to a larger MTU but is limited by the MTU of each communication device before the first communication device, the service traffic is fragmented and transmitted with a smaller first MTU. If there is a first path corresponding to a larger second MTU on the first communication device that can be used to carry the service, then the first communication device can assemble the received first service message into a second service message with a larger length according to the larger second MTU, and transmit the second service message according to the first path corresponding to the larger second MTU. The length of a single service message after the service traffic is fragmented on the first communication device is increased, and the number of service messages after fragmentation is reduced, which can effectively save resources such as bandwidth and computing power, improve the transmission efficiency of traffic, and thus improve the throughput performance of the service.
[0007] In some possible implementations, the first communication device obtains at least one second service message based on the second MTU and multiple first service messages, which may include, for example: the first communication device determines the first path based on the needs of the first service; then, the first communication device processes multiple first service messages based on the second MTU of the first path to obtain at least one second service message. It can be seen that the first communication device can first determine a path whose MTU can meet the needs of the first service based on the needs of the first service, and the path is recorded as the first path, and the MTU of the first path is recorded as the second MTU, so that multiple first service messages belonging to the first service are processed according to the second MTU, so that the transmission of the traffic of the first service can be carried out with higher service throughput performance, thereby improving the transmission efficiency of the traffic of the first service.
[0008] As an example, the first communication device processes multiple first service messages based on the second MTU of the first path to obtain at least one second service message, which may include: the first communication device groups the multiple first service messages according to the second MTU to obtain at least one message grouping, the total length of the multiple first service messages included in the message grouping matches the second MTU, and the at least one message grouping includes the first message grouping; then, for the first message grouping, the first communication device assembles the multiple first service messages included in the first message grouping into a second service message corresponding to the first message grouping. Among them, the total length of the multiple first service messages included in the message grouping matches the second MTU, which can be understood as the first service message currently included in the message grouping is the maximum number of first service messages under the second MTU limit, and then adding a first service message to the message grouping, the total length of the first service messages included in the message grouping will exceed the second MTU. In this way, the first communication device groups multiple first service messages based on the determined second MTU, and assembles the first service messages in each message group to obtain second service messages corresponding to each message group. The length of the second service message is less than or equal to the second MTU but greater than the first MTU, making it possible to improve the throughput performance of the first service.
[0009] Among them, the first communication device assembles multiple first business messages included in the first message group into a second business message corresponding to the first message group, for example, it may include: the first communication device strips the first layer 2 message header and the first cyclic redundancy check (CRC) of the first business message belonging to the first message group to obtain multiple third business messages, the third business message includes the first layer 3 message header of the corresponding first business message in the first message group, the first layer 3 message header includes length information, and the length information is used to indicate the length of the third business message; then, the first communication device obtains the second business message corresponding to the first message group according to the multiple third business messages, the second layer 2 message header, the second layer 3 message header and the second CRC.
[0010] The encapsulation method of the second service message corresponding to the first message group may include but is not limited to: method 1, the second service message includes: the second layer 2 message header, the second layer 3 message header, multiple third service messages and the second CRC in sequence; method 2, the second service message includes: the second layer 2 message header, the second layer 3 message header, indication information, multiple third service messages and the second CRC in sequence; method 3, the second service message includes: the second layer 2 message header, the second layer 3 message header, multiple fourth service messages and the second CRC in sequence. Among them, the indication information may include a set of length information, and the length information in the set of length information is used to indicate the length of each third service message in the second service message. Optionally, the indication information may also include an assembly quantity, which is used to indicate the number of third service messages included in the second service message. In the above method 3, each of the multiple fourth service messages includes the length information corresponding to the fourth service message in the indication information and the third service message, and after the second layer 3 message header and before the multiple fourth service messages, it may also include the assembly quantity in the indication information.
[0011] In some implementations, if the first communication device is a path calculation node, then before the first communication device performs the above-mentioned processing of multiple first service messages belonging to the first service, the method may also include: the first communication device receives a message, the message includes the third MTU of the second communication device; thereby, the first communication device determines the first path based on the third MTU, and the second MTU is the minimum value of the MTU of each link on the first path. As an example, the message may be a protocol message, and the protocol message may include, for example, but is not limited to: an Interior Gateway Protocol (IGP) message, a Border Gateway Protocol (BGP) message, or a Path Computation Element Communication Protocol (PCEP) message, and the protocol message may carry MTU through an extended field or a defined reserved field. As another example, the message may be a response after the application programming interface (API) of the second communication device is accessed, and the first communication device exchanges MTU with other nodes by accessing the API.
[0012] In some other implementations, if the first communication device is not a path calculation node, the method may further include: the first communication device sends a message, the message may include the fourth MTU of the first communication device; thereby, the first communication device receives the path information of the first path sent by the third communication device. The third communication device may be a path calculation node.
[0013] In some possible implementations, if the MTU of the service message received by the first communication device matches the requirements of the service to which the service message belongs, then the first communication device may not process the received service message but only forward it. For example, the method may also include: the first communication device receives at least one fifth service message of the second service, and the length of the fifth service message is less than or equal to the first MTU; the first communication device determines the second path based on the requirements of the second service, and the MTU of the second path matches the first MTU; the first communication device transmits the at least one fifth service message along the second path. Among them, the first MTU matches the requirements of the second service. The matching of the MTU of the second path with the first MTU can be understood as the MTU of the second path among the paths maintained on the first communication device is greater than or equal to the first MTU and is closest to the first MTU; the matching of the first MTU with the requirements of the second service can be understood as the MTU corresponding to the requirements of the second service is closest to the first MTU among the MTUs of the paths maintained on the first communication device. In this way, when the lengths of the multiple received service messages match the requirements of the service, the first communication device does not assemble or unpack the service messages, thereby improving the efficiency of service message transmission.
[0014] In some other possible implementations, if the MTU of the service message received by the first communication device is greater than the demand of the service to which the service message belongs, then the first communication device may also disassemble the received service message to ensure the effective transmission of the service traffic. For example, the method may also include: the first communication device receives the sixth service message of the third service, and the length of the sixth service message is less than or equal to the first MTU; the first communication device obtains multiple seventh service messages based on the fifth MTU and the sixth service message, the fifth MTU is the MTU of the third path, the fifth MTU matches the demand of the third service, the fifth MTU is less than the first MTU, and the length of the seventh service message is less than or equal to the fifth MTU; the first communication device transmits the multiple seventh service messages along the third path. In this way, when the length of the received multiple service messages is greater than the demand of the service and there is an MTU of a path that matches the demand of the service, the first communication device can perform unpacking processing according to the MTU that meets the service demand to ensure the effective transmission of the service message.
[0015] In the second aspect, the present application also provides a path determination method, which may include, for example: a first communication device receives a message, the message includes a first MTU of a second communication device; the first communication device determines a first path based on the first MTU, the second MTU of the first path meets the requirements of transmitting the first service, and the second MTU is the minimum value of the MTU of each link on the first path. In this way, the path calculation node takes the MTU of the communication device as a factor in path calculation, so that each path in the path calculation result has a uniquely determined path MTU. After the communication device obtains the path calculation result, it provides a basis for the communication device to flexibly process the traffic of the service according to the requirements of the transmitted service and the MTU of the selectable path, making it possible to improve the service throughput performance.
[0016] In some possible implementations, the message is a protocol message; or, the message is a response after an API of the second communication device is accessed.
[0017] In some possible implementations, the first communication device is a control entity or a non-head node of the first path.
[0018] As an example, the method may also include: the first communication device sending the path information of the first path to the head node of the first path; or, the first communication device sending the routing information corresponding to the first path to each communication device on the first path.
[0019] In some other possible implementations, the first communication device is a head node of the first path.
[0020] As an example, the method also includes: the first communication device obtains the data to be transmitted of the first service; the first communication device processes the data to be transmitted according to the second MTU to obtain at least one first service message, and the length of the first service message is less than or equal to the second MTU; the first communication device transmits the at least one first service message along the first path.
[0021] In one case, the length of the data to be transmitted is less than or equal to the second MTU.
[0022] In another case, the length of the data to be transmitted is greater than the first MTU, and the at least one first service message includes a second service message and a third service message.
[0023] As an example, the first communication device is the end-side head node of the first service, and the first communication device processes the data to be transmitted according to the second MTU to obtain at least one first service message, which may include: the first communication device cuts the data to be transmitted according to the second MTU to obtain the at least one first service message.
[0024] As another example, the first communication device is a network side node of the first service, and the minimum MTU of each link between the end probe node of the first service and the first communication device is a third MTU, and the third MTU is smaller than the second MTU. Then, the first communication device obtains the data to be transmitted of the first service, which may include: the first communication device receives multiple fourth service messages of the first service, and the length of the fourth service message is less than or equal to the third MTU; the first communication device processes the data to be transmitted according to the second MTU to obtain at least one first service message, which may include: the first communication device groups the multiple fourth service messages according to the second MTU (i.e., the assembly mentioned above) to obtain the at least one first service message.
[0025] Optionally, the first communication device groups the multiple fourth business messages according to the second MTU to obtain the at least one first business message, which may include: the first communication device groups the multiple fourth business messages according to the second MTU to obtain at least one message grouping, the total length of the fourth business messages included in one message group matching the second MTU; the first communication device assembles the multiple fourth business messages included in each message group in the at least one message group into one first business message.
[0026] Optionally, the first communication device assembles multiple fourth business messages included in each message group in the at least one message group into a first business message, which may include: the first communication device strips off the first and second layer message headers and the first CRC of each fourth business message in the multiple fourth business messages belonging to a message group, and then connects them together to obtain a fifth business message corresponding to the message group, the fifth business message includes the first third layer message header of each fourth business message in the multiple fourth business messages of the message group, the first third layer message header includes length information, and the length information is used to indicate the remaining length of the fourth business message after stripping off the first second layer message header and the first CRC; the first communication device obtains the first business message corresponding to the message group according to the fifth business message, the second second layer message header, the second third layer message header and the second CRC.
[0027] Optionally, the first communication device obtains the first business message corresponding to the message group according to the fifth business message, the second layer 2 message header, the second layer 3 message header and the second CRC, which may include: the first communication device obtains the first business message corresponding to the message group according to the indication information, the fifth business message, the second layer 2 message header, the second layer 3 message header and the second CRC, the indication information includes a set of length information, and the length information in the set of length information is respectively used to indicate the remaining length of each fourth business message in the message group after stripping off the corresponding first and second layer message headers and first CRC.
[0028] Optionally, the indication information further includes an assembly quantity, where the assembly quantity is used to indicate the quantity of fourth service messages assembled from the first service messages.
[0029] Optionally, the first business message includes, in sequence: the second layer 2 message header, the second layer 3 message header, the indication information, multiple fifth business messages and the second CRC; or, the first business message includes, in sequence: the second layer 2 message header, the second layer 3 message header, multiple sixth business messages and the second CRC, and each sixth business message in the multiple sixth business messages includes the length information corresponding to the sixth business message and the fifth business message.
[0030] In some other possible implementations, the first communication device is an intermediate node of the first path, and the method may further include: the first communication device receives at least one first service message, the length of the first service message is less than or equal to the second MTU; the first communication device transmits the at least one first service message along the first path.
[0031] In some other possible implementations, the first communication device is the tail node of the first path and the first communication device is the end-side tail node of the first service, and the method may further include: the first communication device receives at least one first service message, and the length of the first service message is less than or equal to the second MTU; the first communication device obtains the transmission data of the first service based on the at least one first service message.
[0032] In some further possible implementations, the first communication device is the tail node of the first path and the first communication device is the network side node of the first service, the minimum MTU of each link between the first communication device and the end-side tail node of the first service is a fourth MTU, and the fourth MTU is smaller than the second MTU. The method may further include: the first communication device receives at least one first service message, the length of the first service message is less than or equal to the second MTU, and the length of the first service message is greater than the fourth MTU; the first communication device cuts each first service message in the at least one first service message according to the fourth MTU to obtain multiple seventh service messages corresponding to the first service message, and the length of the seventh service message is less than or equal to the fourth MTU; the first communication device sends the multiple seventh service messages to the end-side tail node of the first service.
[0033] Optionally, the first service message includes path information of the first path.
[0034] Optionally, the method may further include: the first communication device determines a second path based on the first MTU, a fifth MTU of the second path meets the requirement of transmitting a second service, and the fifth MTU is the minimum value of the MTU of each link on the second path.
[0035] It should be noted that the specific implementation method and technical effect achieved by the method provided in this application can refer to the method provided in the first aspect.
[0036] In the third aspect, the present application also provides a message processing device, which is applied to a first communication device, and the device may include, for example: a receiving unit, a processing unit, and a sending unit. Among them, the receiving unit is used to receive multiple first service messages of a first service, and the length of the first service message is less than or equal to the first MTU; the processing unit is used to obtain at least one second service message based on the second MTU and the multiple first service messages, and the length of the second service message is less than or equal to the second MTU, the second MTU is greater than the first MTU, the second MTU matches the requirements of the first service, and the second MTU is the MTU of the first path; the sending unit is used to transmit the at least one second service message along the first path.
[0037] In some possible implementations, the processing unit may include a first processing subunit and a second processing subunit, wherein the first processing subunit is configured to determine the first path based on the demand of the first service, and the second processing subunit is configured to process the multiple first service messages based on the second MTU of the first path to obtain the at least one second service message.
[0038] As an example, the second processing subunit may include a grouping subunit and an assembling subunit. The grouping subunit is used to group the multiple first service messages according to the second MTU to obtain at least one message group, the total length of the multiple first service messages included in the message group matches the second MTU, and the at least one message group includes a first message group; the assembling subunit is used to assemble the multiple first service messages included in the first message group into a second service message corresponding to the first message group.
[0039] Among them, the assembly subunit is specifically used to: strip the first layer 2 message header and the first CRC of the first business message belonging to the first message group to obtain multiple third business messages, the third business message includes the first layer 3 message header of the corresponding first business message in the first message group, the first layer 3 message header includes length information, and the length information is used to indicate the length of the third business message; according to the multiple third business messages, the second layer 2 message header, the second layer 3 message header and the second CRC, obtain the second business message corresponding to the first message group.
[0040] For example, the second service message may include, in sequence: the second layer-2 message header, the second layer-3 message header, the multiple third service messages and the second CRC.
[0041] For another example, the second service message may further include indication information, the indication information includes a set of length information, and the length information in the set of length information is respectively used to indicate the length of each of the third service messages in the second service message. Optionally, the indication information may also include an assembly quantity, and the assembly quantity is used to indicate the number of the third service messages included in the second service message. In one case, the second service message may include: the second layer 2 message header, the second layer 3 message header, the indication information, the multiple third service messages and the second CRC in sequence; in another case, the second service message may include: the second layer 2 message header, the second layer 3 message header, multiple fourth service messages and the second CRC in sequence, and each of the multiple fourth service messages includes the length information corresponding to the fourth service message in the indication information and the third service message.
[0042] In some possible implementations, the receiving unit is further configured to receive a message, wherein the message includes a third MTU of the second communication device; and the processing unit is further configured to determine the first path based on the third MTU, wherein the second MTU is the minimum value of the MTU of each link on the first path. The message may be a protocol message; or the message may also be a response after the API of the second communication device is accessed.
[0043] In some other possible implementations, the sending unit is further used to send a message, where the message includes the fourth MTU of the first communication device; and the receiving unit is further used to receive path information of the first path sent by a third communication device.
[0044] In some other possible implementations, the receiving unit is further used to receive at least one fifth service message of the second service, and the length of the fifth service message is less than or equal to the first MTU; the processing unit is further used to determine a second path based on the requirements of the second service, and the MTU of the second path matches the first MTU; the sending unit is further used to transmit the at least one fifth service message along the second path.
[0045] In some other possible implementations, the receiving unit is further used to receive a sixth business message of the third business, and the length of the sixth business message is less than or equal to the first MTU; the processing unit is further used to obtain multiple seventh business messages based on the fifth MTU and the sixth business message, the fifth MTU is the MTU of the third path, the fifth MTU matches the requirements of the third business, the fifth MTU is less than the first MTU, and the length of the seventh business message is less than or equal to the fifth MTU; the sending unit is also used to transmit the multiple seventh business messages along the third path.
[0046] It should be noted that the specific implementation method and technical effect achieved by the device provided in this application can refer to the method provided in the first aspect.
[0047] In a fourth aspect, the present application provides a communication device, comprising a processor and a memory, the memory being used to store instructions or program codes, and the processor being used to call and run the instructions or program codes from the memory to execute the method in the first aspect, any possible implementation of the first aspect, the second aspect, and any possible implementation of the second aspect.
[0048] In a fifth aspect, the present application provides a storage medium comprising instructions, programs or codes, which, when executed on a processor, enables the processor to execute the method in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0049] In a sixth aspect, the present application provides a program product. When the program product runs on a processor, the processor executes the method in the first aspect, any possible implementation of the first aspect, the second aspect, and any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0051] Figure 1 This is a schematic diagram of an applicable scenario in an embodiment of the present application;
[0052] Figure 2 This is a schematic diagram of another applicable scenario in an embodiment of the present application;
[0053] Figure 3 In the embodiments of this application, based on Figure 1 A schematic diagram of a message processing process in the scenario shown;
[0054] Figure 4 In the embodiments of this application, based on Figure 1 A schematic diagram of another message processing process in the scenario shown;
[0055] Figure 5a A schematic diagram of a method of assembling a service message in an embodiment of the present application;
[0056] Figure 5b A schematic diagram of another method of assembling a service message in an embodiment of the present application;
[0057] Figure 5c A schematic diagram of another method of assembling a service message in an embodiment of the present application;
[0058] Figure 6a In the embodiments of this application Figure 5a A schematic diagram of a method of disassembling corresponding business messages;
[0059] Figure 6b In the embodiments of this application Figure 5b A schematic diagram of another method of disassembling the corresponding business message;
[0060] Figure 6c In the embodiments of this application Figure 5c A schematic diagram of another method of disassembling the corresponding business message;
[0061] Figure 7A flowchart of a message processing method 100 according to an embodiment of the present application;
[0062] Figure 8 This is a structural diagram of a message processing device 800 in an embodiment of the present application;
[0063] Fig. 9 This is a schematic diagram of the structure of a communication device 900 according to an embodiment of the present application;
[0064] Fig.10 Schematic diagram of the structure of another communication device 1000 in an embodiment of the present application. DETAILED DESCRIPTION
[0065] When the traffic of a service is transmitted in the network, the head node of the traffic needs to first fragment the traffic into multiple service messages according to the MTU. The multiple service messages are transmitted to the destination node of the traffic. The destination node packages the multiple service messages to realize the transmission of the traffic in the network. At present, the traffic is usually fragmented according to the default MTU. The default MTU is limited by the minimum value of the MTU of each communication device on the path carrying the service in the network, that is, the default MTU must be less than or equal to the minimum value of the MTU of each communication device on the path. If the default MTU is greater than the minimum value of the MTU of each communication device on the path, the service message obtained by the fragmentation will inevitably encounter a communication device whose MTU is smaller than the length of the service message when it is transmitted on the path. The communication device will discard the service message whose length is greater than its own MTU, resulting in the inability to effectively transmit the traffic of the service in the network. Therefore, in order to ensure that the service traffic is effectively transmitted, the default MTU is usually set to be relatively small. For example, the MTU of the communication device is at least 1500 Byte, and the traffic is segmented into multiple service messages with a length less than or equal to 1500 Byte according to MTU=1500 Byte.
[0066] With the development of new technologies such as 5G and network cloudification, the traffic in the network has skyrocketed, and the requirements for service throughput performance have continued to increase. Studies have shown that when parameters such as packet loss rate and round trip time (RTT) are the same, the longer the service message, the better the service throughput performance. If the length of a single service message after traffic fragmentation is increased, the number of fragmented service messages will be reduced, which can effectively save resources such as bandwidth and computing power, improve traffic transmission efficiency, and thus improve service throughput performance. This is especially critical for large flows (such as video traffic) where the bandwidth share is increasing.
[0067] In the current technical solution of traffic slicing, in order to improve the throughput performance of the service, if a larger default MTU (such as 9000Byte) is set, then when the service message encounters a communication device with a smaller MTU (such as 1500Byte), for the scenario of the fourth version of the Internet Protocol (Internet Protocol version 4, IPv4), the communication device can re-slice the service message according to its own MTU and transmit the service message obtained by re-slicing; for the scenario of the sixth version of the Internet Protocol (Internet Protocol version 6, IPv6), see Request For Comments (RFC) 1191, the communication device can discard the service message and send an Internet Control Message Protocol (Internet Control Message Protocol, ICMP) message carrying the MTU of the communication device to the head node of the service, so that the head node of the service will continue to try to forward the traffic of the service by slicing according to the MTU in the ICMP message, and repeat this process until the traffic of the service reaches the destination node of the service. It can be seen that the technical solution based on the current traffic slicing cannot improve the throughput performance of the service. Moreover, the attempt to fragment traffic with a larger default MTU may lead to waste of resources such as bandwidth and low transmission efficiency of business traffic in the network.
[0068] Based on this, an embodiment of the present application provides a message processing method. When a first communication device receives multiple first service messages whose length is less than or equal to a first MTU, if the demand for the service matches a second MTU greater than the first MTU, and there is a first path whose MTU is the second MTU, then the first communication device can obtain at least one second service message based on the second MTU and multiple first service messages, thereby transmitting at least one second service message along the first path, and the length of the second service message is less than or equal to the second MTU. In this way, when processing the traffic of the service, if the service demand corresponds to a larger MTU but is limited by the MTU of each communication device before the first communication device, the service traffic is fragmented and transmitted with a smaller first MTU. If there is a first path corresponding to a larger second MTU on the first communication device that can be used to carry the service, then the first communication device can assemble the received first service message into a second service message with a larger length according to the larger second MTU, and transmit the second service message according to the first path corresponding to the larger second MTU. The length of a single service message after the service traffic is fragmented on the first communication device is increased, and the number of service messages after fragmentation is reduced, which can effectively save resources such as bandwidth and computing power, improve the transmission efficiency of traffic, and thus improve the throughput performance of the service.
[0069] In addition, the embodiment of the present application also provides a method for calculating the path based on MTU, which can provide a basis for the implementation of the message processing method of the embodiment of the present application. In the embodiment of the present application, the path calculation node can receive the MTU of each communication device, and determine the path based on the MTU of each communication device. The MTU of the path is the minimum value of the MTU of each link on the path. Different paths can meet the needs of different services because of the different MTUs of the paths. In this way, the path calculation node takes the MTU of the communication device as a consideration for path calculation, so that each path in the path calculation result has a uniquely determined path MTU. After the communication device obtains the path calculation result, it provides a basis for the communication device to flexibly process the traffic of the service according to the needs of the transmitted service and the MTU of the selectable path, making it possible to improve the service throughput performance.
[0070] In order to make the technical solution provided by the embodiments of the present application clearer, Figure 1 The exemplary scenario shown briefly introduces the method of the embodiment of the present application.
[0071] Figure 1 It is a schematic diagram of the architecture of a network 100 provided in an embodiment of the present application. The network 100 may at least include: communication device 0, communication device 1, communication device 2, ..., communication device 6 and communication device 7. Communication device 1 has links 1, link 2 and link 3 with communication information 0, communication device 2 and communication device 3 respectively. Communication device 2 has links 4 and link 5 with communication device 4 and communication device 5 respectively. Communication device 3 has links 6 and link 7 with communication device 4 and communication device 5 respectively. Communication device 6 has links 8, link 9 and link 10 with communication information 4, communication device 5 and communication device 7 respectively. It is assumed that the MTUs of links 1 to 10 are a1 to a10 respectively. It should be noted that there may be links in two directions between two communication devices, and the MTUs of the links in these two directions may be the same or different. The links and link MTUs in this embodiment indicate the links and link MTUs in the direction from communication device 0 to communication device 7.
[0072] For the MTU-based path calculation process, the path calculation node may be any communication device in the network 100 , or the network 100 may further include a control entity 8 , which implements the function of the path calculation node.
[0073] As an example, taking communication device 0 as the path calculation node, the process of MTU-based path calculation may include: S11, communication devices 1 to 7 respectively send their own MTUs to communication device 0. Taking communication device 1 as an example, communication device 1 sends a2 of link 2 and a3 of link 3 to communication device 0. Taking communication device 6 as an example, communication device 6 sends a10 of link 10 to communication device 0. S12, communication device 0 determines paths 1 to 4 based on its own MTU (i.e., a1 of link 1) and the received MTU (including a2 to a10). The communication devices passed by path 1 are: communication device 0, communication device 1, communication device 2, communication device 4, communication device 6, and communication device 7 in sequence. It can also be considered that it passes through link 1, link 2, link 4, link 8, and link 10 in sequence. The MTU of path 1 is a01, and a01 is the minimum value of a1, a2, a4, a8, and a10. The communication devices passed by path 2 are: communication device 0, communication device 1, communication device 2, communication device 5, communication device 6, and communication device 7 in sequence. It can also be considered that it passes through link 1, link 2, link 5, link 9, and link 10 in sequence. The MTU of path 2 is a02, a02 is the minimum value of a1, a2, a5, a9 and a10; the communication devices passed by path 3 are: communication device 0, communication device 1, communication device 3, communication device 5, communication device 6 and communication device 7 in sequence, and it can also be considered that it passes through link 1, link 3, link 7, link 9 and link 10 in sequence. The MTU of path 3 is a03, a03 is the minimum value of a1, a3, a7, a9 and a10; the communication devices passed by path 4 are: communication device 0, communication device 1, communication device 3, communication device 4, communication device 6 and communication device 7 in sequence, and it can also be considered that it passes through link 1, link 3, link 6, link 8 and link 10 in sequence. The MTU of path 4 is a04, a04 is the minimum value of a1, a3, a6, a8 and a10. In one case, after S12, the communication device 0 may not publish the path calculation result (including the path information of path 1 to path 4) obtained in S12 in the network 100, but carry the path information of the determined path in the service message to be transmitted, so that the service message can be accurately transmitted along the determined path; in another case, after S12, the communication device 0 may also publish the path calculation result obtained in S12 in the network 100, so that each communication device can receive and maintain the forwarding table entry corresponding to the part related to itself in the path calculation result, and prepare for the orderly and effective transmission of the service message in the network 100.
[0074] As another example, taking the control entity 8 as a path calculation node, the process of MTU-based path calculation may include: S21, communication device 0 to communication device 7 respectively send their own MTU to the control entity 8. S22, control entity 8 determines path 1 to path 4 based on the received MTU (including a1 to a10). S23, control entity 8 publishes the path information of path 1 to path 4 in the network 100. In one case, the communication device 0 as the head node of path 1 to path 4 maintains the path information of path 1 to path 4, and the communication device 0 carries the path information of the determined path in the service message to be transmitted, so that the service message can be accurately transmitted along the determined path; in another case, each communication device maintains the forwarding table entry corresponding to the part related to itself in the path calculation result, and prepares for the orderly and effective transmission of the service message in the network 100.
[0075] For the implementation method of the path calculation node based on MTU path calculation, S12 is used as an example for explanation. The specific implementation method of S22 can refer to the relevant description of the following implementation method. As an example, S12 may include: S121, the communication device 0 arranges the collected MTUs from large to small to obtain an MTU value list (hereinafter referred to as MTU_VALUE_LIST); S122, the communication device 0 reads the largest MTU in MTU_VALUE_LIST; S123, the communication device 0 determines whether the path can be calculated using a path calculation method such as the shortest path algorithm based on all links and nodes greater than or equal to the currently read MTU. If so, S124 is executed, otherwise S125 is executed; S124, the communication device 0 obtains the calculated path, and the MTU of the path is the currently read MTU; S125, the communication device 0 determines whether there is an unread MTU in MTU_VALUE_LIST, if so, the next largest MTU is read, and returns to execute S123, otherwise the path calculation ends.
[0076] It should be noted that the communication device can actively send its own MTU to the path calculation node, or the communication device can also feed back its own MTU to the path calculation node based on the request of the path calculation node. The path calculation node and the communication device can exchange MTU using protocol messages, or by accessing the application programming interface (API). Among them, the protocol message for exchanging MTU can include, but is not limited to: Interior Gateway Protocol (IGP) message, Border Gateway Protocol (BGP) message or Path Computation Element Communication Protocol (PCEP) message, and the protocol message can carry MTU through an extended field or a defined reserved field. MTU refers to the maximum data packet size (usually in bytes) that a communication device can pass when transmitting a message. MTU usually corresponds to a communication interface or link. Taking communication device 1 publishing a2 as an example, assuming that the interface on communication device 1 connected to communication device 2 is interface 1, and the link from communication device 1 to communication device 2 is link 2, then the message of communication device 1 publishing a2 may include: <communication device 1.interface 1, MTU=a2>, or, <communication device 1-communication device 2, MTU=a2>.
[0077] It should be noted that the embodiments of the present application can be applied to Figure 1 The scenario that does not include the control entity 8 (which can be called a distributed network scenario) can also be applied to Figure 1 In addition, the embodiments of the present application are also applicable to scenarios with multiple control entities and multiple groups of communication devices. For example, see Figure 2 As shown, the scenario may include: communication devices 21 to 29, control entity 11, control entity 12 and control entity 13. Control entity 11 corresponds to communication devices 21 to 24, control entity 12 corresponds to communication devices 25 and 26, and control entity 13 corresponds to communication devices 27, 28 and 29. Control entity 11, control entity 12 and control entity 13 can exchange the MTU of each communication device in a group of communication devices corresponding to themselves through protocol messages or APIs. Figure 2 In the scenario shown, the path calculation node can be any control entity or communication device. Figure 1 The description is made by taking a scenario including control entity 8 as an example.
[0078] It should be noted that in the embodiments of the present application, the path calculation node calculates the path based on MTU. In one case, it can be global path calculation, that is, the path calculation node can calculate the path from the head node of the service to the destination node based on the MTU of each communication device in the network. In this way, only the head node of the service needs to select a path according to the service requirements, and slice the traffic to be transmitted according to the MTU corresponding to the selected path, and transmit the sliced service messages along the selected path; in another case, it can also be local path calculation, that is, the path calculation node can calculate the path between specific communication devices based on the MTU of each communication device. The specific communication device may refer to each communication device that supports the message processing method provided in the embodiments of the present application, or the specific communication device may refer to a part of the communication devices specified based on the requirements from among the communication devices that support the message processing method provided in the embodiments of the present application.
[0079] For the message processing process, the head node of the service (for example, Figure 1 The communication device 0) in the embodiment can process the traffic to be transmitted based on the calculation result of the global calculation, see Figure 3 Alternatively, the head node of the path in the local path calculation result (for example, it can be Figure 1 The communication device 1) and the tail node (which can be Figure 1 The communication device 6) in the local path calculation can process the received service messages belonging to the same service based on the path calculation result of the local path calculation, see Figure 4 shown.
[0080] As an example, if the path calculation result of the control entity 8 includes the above path 1 and path 3, a01 = 9000 Byte, a03 = 3000 Byte. Assume that the head nodes of service 1 and service 2 are both communication device 0, the destination nodes are both communication device 7, the demand of service 1 is higher, and the demand of service 2 is lower, then, see Figure 3As shown, the process of communication device 0 transmitting traffic 1 of service 1 may include: S311, communication device 0 obtains traffic 1 of service 1; S312, communication device 0 determines path 1 with a larger MTU for service 1 based on the needs of service 1; S313, communication device 0 segments traffic 1 of service 1 according to the MTU of path 1 (i.e., 9000Byte) to obtain service message 11, service message 12 and service message 13, and the lengths of service message 11, service message 12 and service message 13 are all less than or equal to 9000Byte; S314, communication device 0 transmits service message 11, service message 12 and service message 13 along path 1. Similarly, the process of the communication device 0 transmitting the flow 2 of the service 2 may include: S321, the communication device 0 obtains the flow 2 of the service 2; S322, the communication device 0 determines the path 3 with a smaller MTU for the service 2 based on the needs of the service 2; S323, the communication device 0 slices the flow 2 of the service 2 according to the MTU of the path 3 (i.e., 3000 Byte), and obtains service messages 21 to 29, and the lengths of the service messages 21 to 29 are all less than or equal to 3000 Byte; S324, the communication device 0 transmits the service messages 21 to 29 along the path 3. In order to reflect the effect of message processing based on the embodiment of the present application, the above description is made by taking the flow 1 and flow 2 of the same or similar length as an example. In this way, for the traffic to be transmitted for services with different demands, paths that meet their demands can be flexibly and reasonably allocated to the services, and messages can be processed according to the MTU of the path. For high-demand services, the length of a single service message is increased after traffic fragmentation, and the number of service messages after fragmentation is reduced, which can effectively save resources such as bandwidth and computing power, improve the transmission efficiency of traffic, and thus improve the throughput performance of the services.
[0081] It should be noted that the demand for a service is the attribute of a service agreed upon before the service is transmitted in the network. In one case, the traffic of the service may carry the demand indication information of the service, and the communication device determines the demand for the service by parsing the demand indication information in the traffic obtained; in another case, the communication device in the network is configured with the demand for each service, for example, the communication device maintains the correspondence between the traffic characteristics (such as a five-tuple) of each service and the demand indication information of the service, and the communication device matches the corresponding demand indication information based on the traffic characteristics of the obtained traffic, thereby determining the demand for the service. Among them, the demand indication information can be a mark, in one case, different values of the mark are used to indicate the high or low demand for the service, for example, mark = 0 indicates that the demand for the service is low, and mark = 1 indicates that the demand for the service is high; in another case, the presence of the mark indicates that the demand for the service is high, and the absence of the mark indicates that the demand for the service is low. Alternatively, the demand indication information may be a value indicating the demand level of the service, for example, the demand indication information = 1, 2, 3, ..., indicating that the demand level of the service is level 1, level 2, level 3, ..., respectively. The smaller the value of the demand level of the service, the higher the demand of the service, such as the demand of the service with level 1 is higher than the demand of the service with level 2; or, the smaller the value of the demand level of the service, the lower the demand of the service, such as the demand of the service with level 1 is lower than the demand of the service with level 2. Alternatively, the demand indication information may indicate the specific MTU requirement of the service, for example, the demand indication information = 9000Byte, indicating that the length of the service message after segmentation needs to be as close to 9000Byte as possible to meet the demand of the service.
[0082] In this example, if the length of the flow 3 of the service 1 is less than 9000Byte, the communication device 0 may not fragment the flow 3, but directly encapsulate the flow 3 into a service message 3 and transmit the service message 3 along the path 1. In this way, for the case where the length of the flow to be transmitted is relatively small, based on the method provided in the embodiment of the present application, the flow to be transmitted may not be fragmented, but transmitted at the granularity of the service, and the transmitted service message has the meaning and attributes of the service, which can effectively save the bandwidth consumed by transmitting the flow 3. For example, according to the current message processing method, the flow 3 is fragmented into several service messages with a length less than or equal to 1500Byte and then transmitted. Once one or some service messages fail to be transmitted, it is necessary to retransmit the flow 3 (including the service messages that have been successfully transmitted) until all service messages of the flow 3 fragments are successfully transmitted. Compared with transmitting the flow 3 according to the method provided in the embodiment of the present application, this process causes a waste of bandwidth.
[0083] As another example, if the path calculation results of the control entity 8 are path 5, path 6 and path 7, where path 5 is the portion from communication device 1 to communication device 6 on path 1, and the MTU of path 5 is a05=9000Byte, path 6 is the portion from communication device 1 to communication device 6 on path 3, and the MTU of path 6 is a06=1500Byte, path 7 is the portion from communication device 1 to communication device 6 on path 4, and the MTU of path 7 is a07=3000Byte, the MTU of link 1 from communication device 0 to communication device 1 is 3000Byte, and the MTU of link 10 from communication device 6 to communication device 7 is 3000Byte. It is still assumed that the head nodes of services 1, 2 and 3 are all communication device 0, the destination nodes are all communication device 7, the demand of service 1 is higher than that of service 2, and the demand of service 2 is higher than that of service 3, then, see Figure 4As shown, the process of the communication device 0 transmitting the traffic 4 of the service 1 may include: S331, the communication device 0 obtains the traffic 4 of the service 1, the traffic 5 of the service 2 and the traffic 6 of the service 3; S332, the communication device 0 slices the traffic 4 according to the MTU of the link 1 (i.e., 3000 Byte) to obtain service messages 41 to 46, slices the traffic 5 according to the MTU of the link 1 to obtain service messages 51 to 56, slices the traffic 6 according to the MTU of the link 1 to obtain service messages 61 to 66, and sends the service messages 41 to 46, the service messages 51 to 56 and the service messages 61 to 66 to the communication device 1 via the link 1, wherein the lengths of the service messages 41 to 46, the service messages 51 to 56 and the service messages 61 to 66 are all less than or equal to 3000 Byte. For the service message belonging to service 1, the subsequent process may include the following S33a3 to S33a7. Among them, S33a3, the communication device 1 determines the path 5 with the largest MTU for service 1 according to the requirements of service 1; S33a4, the communication device 1 assembles service messages 41 to 46 according to MTU=9000Byte (i.e., the MTU of path 5) to obtain service messages 47 and 48, and the lengths of service messages 47 and 48 are less than or equal to 9000Byte; S33a5, the communication device 1 sends service messages 47 and 48 to the communication device 6 along the path 5; S33a6, the communication device 6 disassembles the service messages 47 and 48 respectively according to the MTU of the link 10 (i.e., 3000Byte) to obtain service messages 41' to 46'; S33a7, the communication device 6 sends service messages 41' to 46' to the communication device 7 along the link 10. For the service message belonging to service 2, the subsequent process may include the following S33b3 to S33b5. In which, S33b3, communication device 1 determines path 7 with an appropriate MTU for service 2 according to the requirements of service 2; S33b4, communication device 1 sends service message 51 to service message 56 along path 7 to communication device 6; S33b5, communication device 6 sends service message 51 to service message 56 to communication device 7 along link 10. For the service message belonging to service 3, the subsequent process may include the following S33c3 to S33c7, or, include the following S33c3 to S33c5 and S33c8.Among them, S33c3, the communication device 1 determines the path 6 with the smallest MTU for the service 3 according to the requirements of the service 3; S33c4, the communication device 1 disassembles the service messages 61 to 66 according to MTU=1500Byte (i.e., the MTU of the path 5) to obtain the service messages 611, 612, 621, 622, ..., 661 and 662, and the lengths of the service messages 611, 612, 621, 622, ..., 661 and 662 are less than or equal to 1500Byte; S33c5, the communication device 1 disassembles the service messages 611, 612, 621, 622, ... along the path 6. , business message 661 and business message 662 are sent to communication device 6; in one case, S33c6, communication device 6 can assemble business message 611, business message 612, business message 621, business message 622, ..., business message 661 and business message 662 according to the MTU of link 10 (i.e. 3000Byte) to obtain business message 61'~business message 66'; S33c7, communication device 6 sends business message 61'~business message 66' to communication device 7 along link 10; in another case, S33c8, communication device 6 sends business message 611, business message 612, business message 621, business message 622, ..., business message 661 and business message 662 to communication device 7 along link 10. In this way, for the to-be-transmitted traffic of services with different demands, when encountering a communication device that supports the report completion processing method provided in the embodiment of the present application during the transmission process, a reasonable path can be flexibly and reasonably allocated to the service according to the processing strategy and demand, and the message can be processed according to the MTU of the path. For high-demand services, the length of a single service message after traffic segmentation of the service is increased, and the number of service messages after segmentation is reduced, which can effectively save resources such as bandwidth and computing power, improve the transmission efficiency of traffic, and thus improve the throughput performance of the service.
[0084] The implementation method of assembling a shorter service message into a longer service message at an intermediate node on the service transmission path is described by taking S33a4 as an example. The specific implementation method of S33c6 can refer to the relevant description of the following implementation method.
[0085] As an example, see Figure 5a As shown, S33a4 may include: S41, the communication device 1 sends the second layer message header ( Figure 5a The service packets 71 to 76 are stripped off by removing the L2 header and cyclic redundancy check (CRC) to obtain service packets 71 to 76. The service packets 71 to 76 all include the L3 header ( Figure 5a In the abbreviation L3), L3 includes the length of the service message. For example, L3 of service message 71 includes length information indicating the length of service message 71. S42, the communication device 1 connects service messages 71 to 73 end to end and adds a new layer 2 message header ( Figure 5a abbreviated as new L2), new three-layer message header ( Figure 5a abbreviated as new L3) and new cyclic redundancy check ( Figure 5a In the abbreviation new CRC), the service message 47 is obtained. Similarly, the communication device 1 connects the service messages 74 to 76 end to end, and adds new L2, new L3 and new CRC to obtain the service message 48.
[0086] As another example, see Figure 5b As shown, S33a4 may include: S51, the communication device 1 strips the L2 and CRC of the business messages 41 to 46 to obtain business messages 71 to 76; S52, the communication device 1 connects the business messages 71 to 73 end to end, and adds new L2, new L3, K1 and new CRC to obtain business message 47. Similarly, the communication device 1 connects the business messages 74 to 76 end to end, and adds new L2, new L3, K2 and new CRC to obtain business message 48. Among them, K1 may include at least c1, c2 and c3, c1, c2 and c3 are used to indicate the length of service message 71, service message 72 and service message 73 respectively. In order to accurately complete the subsequent disassembly, K1 may also include n1, n1 is used to indicate the number of service messages assembled from service message 47, and n1=3 in this embodiment; similarly, K2 may include at least c4, c5 and c6, c4, c5 and c6 are used to indicate the length of service message 74, service message 75 and service message 76 respectively. In order to accurately complete the subsequent disassembly, K2 may also include n2, n2 is used to indicate the number of service messages assembled from service message 48, and n2=3 in this embodiment. Figure 5b As shown, business message 47 may include: new L2, new L3, K1, business message 71, business message 72, business message 73 and new CRC in sequence, and business message 48 may include: new L2, new L3, K2, business message 74, business message 75, business message 76 and new CRC in sequence.
[0087] As yet another example, see Figure 5cAs shown, S33a4 may include: S61, the communication device 1 strips the L2 and CRC of the business messages 41 to 46 to obtain business messages 71 to 76; S62, the communication device 1 adds c1, c2 and c3 before the business message 71, the business message 72 and the business message 73 respectively and connects them end to end, and then adds new L2, new L3 and new CRC to obtain the business message 47. Similarly, the communication device 1 adds c4, c5 and c6 before the business message 74, the business message 75 and the business message 76 respectively and connects them end to end, and then adds new L2, new L3 and new CRC to obtain the business message 48. Among them, c1~c6 are used to indicate the length of service messages 71~service messages 76 respectively. In order to accurately complete the subsequent disassembly, n1 can be included between new L3 and c1 of service message 47, and n1 is used to indicate the number of service messages assembled by service message 47. In this embodiment, n1=3; similarly, in order to accurately complete the subsequent disassembly, n2 can be included between new L3 and c4 of service message 48, and n2 is used to indicate the number of service messages assembled by service message 48. In this embodiment, n2=3. Figure 5c As shown, business message 47 may include: new L2, new L3, n1, c1, business message 71, c2, business message 72, c3, business message 73 and new CRC in sequence, and business message 48 may include: new L2, new L3, n2, c4, business message 74, c5, business message 75, c6, business message 76 and new CRC in sequence.
[0088] It should be noted that in the above three examples, the new L2, new L3 and new CRC in the service message 47 and the service message 48 may be different. The new L3 may carry the path information of the path 5, so that the intermediate node of the path 5 can continue to forward the received service message along the path 5 based on the path information carried by the new L3 in the received service message. Among them, if service messages 47 and service messages 48 are Segment Routing-InternetProtocol version 6 (SRv6) messages of the sixth version of the Internet Protocol or Segment Routing-Multi-Protocol Label Switching (SR-MPLS) messages, then the new L3 can include a Segment Routing Header (SRH), and the SRH can carry the path information of path 5 through a segment list (Segment List). The path information of path 5 in the Segment List can be an ordered set of segment identifiers (Segment Identifiers, SIDs) of each node included in path 5 in the order in which they appear in path 5, or the path information of path 5 in the Segment List can be an ordered set of SIDs of links included in path 5 in the order in which they appear in path 5.
[0089] The implementation method of a certain intermediate node on the service transmission path disassembling a longer service message into a shorter service message is described by taking the communication device 6 obtaining service message 41', service message 42' and service message 43' in S33a6 as an example. The specific implementation method of S33c4 can refer to the relevant description of the following implementation method.
[0090] As an example, with Figure 5a The assembly method corresponds to the disassembly method. Figure 6aAs shown, the process of the communication device 6 obtaining the service message 41', the service message 42' and the service message 43' in S33a6 may include: S71, the communication device 6 strips off the new L2, new L3 and new CRC of the service message 47 to obtain the service message 47'; S72, the communication device 6 reads the length information in each L3 in the service message 47', and reads the service message of the length indicated by the length information, and encapsulates the corresponding L2 and CRC on the read service message to obtain the service message 41', the service message 42' and the service message 43' respectively. For example, S33a6 may include: S711, the communication device 6 reads the length field in the new L3 of the service message 47, which is recorded as Len; S712, the communication device 6 deletes the new L2, new L3 and new CRC in the service message 47 CRC obtains the service message 47'; S721, the communication device 6 reads the version field of L3 in the service message 47'; S722, the communication device 6 determines whether the value of the Version field is 4 or 6. If it is 4, it indicates that the service message is an IPv4 message, and executes S723. If it is 6, it indicates that the service message is an IPv6 message, and executes S724; S723, the communication device 6 reads the total length field in L3 of the service message 47', and reads the content of the corresponding length according to the value of the TotalLength field; S724, the communication device 6 reads the service message 4 7', and reads the content of corresponding length according to the value of the PayloadLength field; S725, the communication device 6 encapsulates L2 before the read content, and encapsulates CRC after the read content, to obtain the business message 41', and the communication device 6 updates the business message 47' to the content of the business message 47' after removing the read content; S726, the communication device 6 determines whether the length from the beginning of L3 to the end of Payload in the business message 41' subtracted from Len is 0, if so, the disassembly process is terminated, if not, it returns to execute S721.
[0091] As another example, with Figure 5b The assembly method corresponds to the disassembly method. Figure 6bAs shown, the process of the communication device 6 obtaining the service message 41', the service message 42' and the service message 43' in S33a6 may include: S81, the communication device 6 reads c1, c2, c3 and n1 in K1, and strips the new L2, new L3, K1 and new CRC of the service message 47 to obtain the service message 47'; S82, the communication device 6 reads the service message of the length indicated by c1, c2 and c3 from the service message 47' in sequence, and encapsulates the corresponding L2 and CRC on the read service message to obtain the service message 41', the service message 42' and the service message 43' respectively. Optionally, the communication device 6 can determine or verify whether all the disassembly work has been completed by n1 and the number of service messages obtained, and the difference between n1 and the number of service messages obtained can be used as a condition for determining whether to continue reading or end the disassembly work. When the difference between n1 and the number of service messages obtained is equal to 0, the disassembly work is ended, otherwise, continue reading to obtain more service messages.
[0092] As another example, Figure 5c The assembly method corresponds to the disassembly method. Figure 6c As shown, the process of the communication device 6 obtaining the service message 41', the service message 42' and the service message 43' in S33a6 may include: S91, the communication device 6 reads n1, and converts new L2, new L3, n1 and new L3 of the service message 47 into n1. CRC is stripped to obtain business message 47'; S92, the communication device 6 reads the business message of the length indicated by c1 from the business message 47', and encapsulates the corresponding L2 and CRC on the read business message to obtain business message 41'. Similarly, after the communication device 6 removes c1 and the corresponding part of the business message 41' from the business message 47', it reads the business message of the length indicated by c2, and encapsulates the corresponding L2 and CRC on the read business message to obtain business message 42', and after the communication device 6 removes c1, the corresponding part of the business message 41', and the corresponding part of c2 and the business message 42' from the business message 47', it reads the business message of the length indicated by c3, and encapsulates the corresponding L2 and CRC on the read business message to obtain business message 43'. Optionally, the communication device 6 can determine or verify whether all disassembly work has been completed through n1 and the number of business messages obtained, and the difference between n1 and the number of business messages obtained can be used as a condition for determining whether to continue reading or end the disassembly work. When the difference between n1 and the number of business messages obtained is equal to 0, the disassembly work is ended; otherwise, reading is continued to obtain more business messages.
[0093] It should be understood that Figure 1 , Figure 2 , Figure 3 and Figure 4The communication devices and connection relationships in the network are only shown as examples. The network may include any other number of communication devices and other connection relationships, and the embodiments of the present application are not limited to this. Figure 1 , Figure 2 , Figure 3 and Figure 4 The network architecture shown is only an example. The application scenario of the message processing method provided in the embodiment of the present application is not limited to Figure 1 , Figure 2 , Figure 3 and Figure 4 The scene shown.
[0094] In the embodiments of the present application, the communication device may be a network device such as a switch or a router, or a terminal device such as a mobile phone or a laptop computer; it may also be a component of a network device or a terminal device, such as a single board or a line card on a network device; it may also be a functional module on a network device or a terminal device; it may also be a chip used to implement the method provided in the embodiments of the present application, and the embodiments of the present application do not make specific limitations. When the communication device is a chip, the transceiver unit used to implement the method may be, for example, an interface circuit of the chip, and the processing unit may be a processing circuit with processing functions in the chip. Communication devices may be directly connected, for example, but not limited to, via Ethernet cables or optical cables. For example, Figure 1 to Figure 4 In the figure, communication device 0 and communication device 7 can be end-side devices of the service, such as communication device 0 is the user equipment of the service and communication device 7 is the server; communication device 1 to communication device 6 can be network-side devices of the service, such as communication device 1 is the entry network device of the service (also called the head node or entry node) and communication device 6 is the exit network device of the service (also called the tail node or exit node).
[0095] In the embodiments of the present application, the communication device and the node have the same meaning and can be understood and used interchangeably.
[0096] In the embodiment of the present application, the control entity may be, for example, a centralized controller, a network management system, or a device having a path calculation function. The control entity may be an independent physical device or may be integrated into any communication device.
[0097] In order to more clearly introduce the embodiments of the present application, Figure 7 The message processing method provided in the embodiment of the present application is described.
[0098] Figure 7 The flowchart of a message processing method 100 provided in an embodiment of the present application is shown in FIG. In the method 100, the first communication device is used as the execution subject to introduce the embodiment of the present application. For example, Figure 7 The embodiment shown corresponds to Figure 4In the scenario shown, the first communication device may correspond to the communication device 1 or the communication device 6 .
[0099] like Figure 7 As shown, the method 100 may include, for example, the following S101 to S103:
[0100] S101, a first communication device receives a plurality of first service messages of a first service, wherein the length of the first service message is less than or equal to a first MTU.
[0101] The first communication device may be a head node among intermediate nodes on the transmission path of the first service that supports the calculation result of the path according to the MTU in the embodiment of the present application. Figure 4 The head node of path 5 in the scenario shown is communication device 1.
[0102] Before S101, the head node of the first service determines that the minimum MTU of each node or link between itself and the first communication device is the first MTU. Therefore, in order to enable the traffic of the first service to be effectively transmitted to the first communication device, the method 100 may include: the head node of the first service slices the traffic of the first service to be transmitted according to the first MTU to obtain multiple first service messages, and the length of each first service message in the multiple first service messages is less than or equal to the first MTU; then, the head node of the first service sends multiple first service messages. In this way, when there is a smaller MTU that cannot meet the needs of the first service between the head node of the first service and the first communication device, the embodiment of the present application can flexibly slice the traffic of the first service to be transmitted according to the minimum MTU of each node or link between the head node of the first service and the first communication device, ensure that the traffic of the first service reaches the first communication device smoothly, and provide a basis for the subsequent first communication device to process and transmit the first service message based on the MTU that meets the needs of the first service.
[0103] As an example, the first communication device may be, for example, the head node of the first service on the network side. The head node of the first service refers to the head node of the first service on the terminal side. The embodiment of the present application is applicable to the head node of the first service on the terminal side, and the minimum MTU of the link or node between the head node of the first service on the terminal side and the head node of the first service on the network side is the first MTU, and the first MTU cannot meet the needs of the first service. Figure 4 In the embodiment shown, the first service corresponds to Figure 4 In service 1, multiple first service messages can correspond to Figure 4 For service messages 41 to 46 in the packet, the first MTU can correspond to Figure 4 3000Byte in.
[0104] S102, the first communication device obtains at least one second service message based on the second MTU and multiple first service messages, the length of the second service message is less than or equal to the second MTU, the second MTU is greater than the first MTU, the second MTU matches the requirements of the first service, and the second MTU is the MTU of the first path.
[0105] As an example, S102 may include: S1021, the first communication device determines a first path based on the needs of the first service; S1022, the first communication device processes multiple first service messages based on the second MTU of the first path to obtain at least one second service message.
[0106] Therefore, before executing S102, the first communication device maintains MTUs of different paths. And after S101, the first communication device can obtain the demand of the first service by parsing the first service message. For example, the first communication device maintains the correspondence between the characteristic information (such as a five-tuple) of the service message and the demand information. The first communication device obtains the characteristic information of the first service message by parsing, and determines the demand information matching the obtained characteristic information from the correspondence, and determines the demand of the first service through the demand information; for another example, the first service message carries the demand information of the first service, and the first communication device obtains the demand information of the first service by parsing the first service message, and determines the demand of the first service through the demand information. The demand of the first service can be a demand level or a specific MTU value. If the demand of the first service is high, the first communication device can select a path with a larger MTU from multiple paths as the first path; or, if the demand of the first service is 9000Byte, the first communication device can select a path with an MTU as close to 9000Byte as possible from multiple paths as the first path.
[0107] For the MTUs of different paths maintained on the first communication device, it may include but is not limited to the second MTU of the first path. As an example, if the first communication device is a path calculation node, then, before S102, the method 100 may also include: the first communication device receives a message, the message includes the third MTU of the second communication device; the first communication device determines the first path based on the third MTU, the second MTU is the minimum value of the MTU of each link on the first path, and the second communication device is a communication device other than the first communication device. As another example, if the first communication device is not a path calculation node, then, before S102, the method 100 may also include: the first communication device sends a message, the message includes the fourth MTU of the first communication device; the first communication device receives the path information of the first path sent by the third communication device, the third communication device is a path calculation node or an intermediate node between the path calculation node and the first communication device, and the path information of the first path includes the node or link information included in the first path, and may also include the MTU of the first path. The above message may be a protocol message, such as a BGP message or an IGP message; or, the above message may be a response after the API of the communication device is accessed, corresponding to the first example, it may be a response after the API of the second communication device is accessed, and corresponding to the second example, it may be a response after the API of the first communication device is accessed.
[0108] In some possible implementations, S1022 may include, for example: S10221, the first communication device groups multiple first service messages according to the second MTU to obtain at least one message grouping, the total length of the multiple first service messages included in the message grouping matches the second MTU, and at least one message grouping includes the first message grouping; S10222, taking the first message grouping as an example, the first communication device assembles the multiple first service messages included in the first message grouping into a second service message corresponding to the first message grouping. Wherein, the total length of the multiple first service messages included in the message grouping matches the second MTU, which may refer to: accommodating as many first service messages as possible in the message grouping under the condition that the total length is less than or equal to the second MTU. In other words, it is necessary to ensure that the total length of the multiple first service messages included in the message grouping is less than or equal to the second MTU, and to add another first service message to the message grouping, and the total length of the multiple first service messages included in the message grouping is greater than the second MTU.
[0109] For example, if the first MTU is 3000 and the second MTU is 9000, then the three first service messages can be divided into one message group, corresponding to Figure 4In the illustrated embodiment, business messages 41, business messages 42, and business messages 43 can be divided into a first message group, and business messages 44, business messages 45, and business messages 46 can be divided into a second message group. The message processing process in the second message group is the same as the message processing process in the first message group. The message processing process in the first message group is introduced as an example below.
[0110] As an example, S10222 may include: the first communication device strips the first layer 2 message header and the first CRC of the first business message belonging to the first message group to obtain multiple third business messages, the third business message includes the first layer 3 message header of the corresponding first business message in the first message group, the first layer 3 message header includes length information, and the length information is used to indicate the length of the third business message; the first communication device obtains the second business message corresponding to the first message group based on the multiple third business messages, the second layer 2 message header, the second layer 3 message header and the second CRC.
[0111] In some other possible implementations, S1022 may, for example, include: S10221', the first communication device strips the first and second layer message headers and the first CRC of the first business message to obtain multiple third business messages; S10222', the first communication device groups the multiple third business messages according to the second MTU to obtain at least one message grouping, the total length of the multiple third business messages included in the message grouping matches the second MTU, and at least one message grouping includes the first message grouping; S10223', taking the first message grouping as an example, the first communication device assembles the multiple third business messages included in the first message grouping into a second business message corresponding to the first message grouping. Among them, the total length of the multiple third business messages included in the message group matches the second MTU, which can mean: accommodating as many third business messages as possible under the condition that the total length is less than or equal to the second MTU in the message group. In other words, it is necessary to ensure that the total length of the multiple third business messages included in the message group is less than or equal to the second MTU, and one more third business message is added to the message group, and the total length of the multiple third business messages included in the message group is greater than the second MTU.
[0112] For example, if the first MTU is 3000 and the second MTU is 9000, then the three third service messages can be divided into one message group, corresponding to Figure 4In the illustrated embodiment, business messages 71, business messages 72, and business messages 73 may be divided into a first message group, and business messages 74, business messages 75, and business messages 76 may be divided into a second message group. The message processing process in the second message group is the same as the message processing process in the first message group. The message processing process in the first message group is introduced as an example below.
[0113] As an example, S10223' may include: taking the first message group as an example, the first communication device obtains the second service message corresponding to the first message group according to multiple third service messages, the second layer 2 message header, the second layer 3 message header and the second CRC.
[0114] In the above two possible implementations, as an example, the second service message may include: a second layer 2 message header, a second layer 3 message header, a plurality of third service messages and a second CRC, corresponding to Figure 4 In the embodiment shown, the second service message can refer to Figure 5a shown.
[0115] As another example, the second service message may further include indication information, and the indication information may include at least a set of length information, and the length information in the set of length information is respectively used to indicate the length of each third service message in the second service message. Optionally, the indication information may also include an assembly quantity, and the assembly quantity is used to indicate the number of third service messages included in the second service message. In this example, in one case, the second service message may include in sequence: a second layer 2 message header, a second layer 3 message header, indication information, multiple third service messages, and a second CRC, corresponding to Figure 4 In the embodiment shown, the second service message can refer to Figure 5b In another case, the second service message may include in sequence: a second layer 2 message header, a second layer 3 message header, an assembly quantity in the indication information, a plurality of fourth service messages, and a second CRC, each of the plurality of fourth service messages includes the length information corresponding to the fourth service message in the indication information and the third service message, corresponding to Figure 4 In the embodiment shown, the second service message can refer to Figure 5c shown.
[0116] S103: The first communication device transmits at least one second service message along the first path.
[0117] Corresponding to Figure 4 In the illustrated embodiment, S103 may correspond to S33a5. For specific implementation, refer to the related description of S33a5.
[0118] In some implementations, if the tail node of the first path is not the tail node of the first service, then when at least one second service message reaches the tail node of the first path, the tail node of the first path also needs to determine whether the minimum MTU of the node or link between itself and the tail node of the first service is less than the second MTU. If so, it is necessary to perform a disassembly process corresponding to S102 on at least one second service message, obtain multiple service messages that match the minimum MTU of the node or link between the tail node of the first path and the tail node of the first service, and effectively transmit the disassembled service messages to obtain the tail node of the first service. Among them, the tail node of the first service refers to the tail node of the first service on the terminal side. Corresponding to Figure 4 For the embodiment shown, the disassembly process may refer to the related description of S33a.
[0119] In other possible implementations, the first communication device may also include paths of other MTUs. The first communication device can flexibly determine message processing methods for service messages of different services based on the different requirements of the received services and the actual conditions of each path (such as load weight).
[0120] As an example, the above method 100 may also include: the first communication device receives at least one fifth service message of the second service, and the length of the fifth service message is less than or equal to the first MTU; the first communication device determines the second path based on the demand of the second service, and the MTU of the second path matches the first MTU; the first communication device transmits at least one fifth service message along the second path. Compared with the first service, the demand for the second service is lower, or the demand for the second service is the same as or similar to the first MTU. The MTU of the second path matches the first MTU, which may include: the MTU of the second path is greater than or equal to the first MTU. Corresponding to Figure 4 In the illustrated embodiment, the second service may correspond to service 2, the fifth service message may correspond to service messages 51 to 56, and the second path may correspond to path 7. For the implementation of this example, see S332, S33b3 and S33b4.
[0121] As another example, the above method 100 may also include: the first communication device receives the sixth service message of the third service, and the length of the sixth service message is less than or equal to the first MTU; the first communication device obtains multiple seventh service messages based on the fifth MTU and the sixth service message, the fifth MTU is the MTU of the third path, the fifth MTU matches the demand of the third service, the fifth MTU is less than the first MTU, and the length of the seventh service message is less than or equal to the fifth MTU; the first communication device transmits multiple seventh service messages along the third path. Among them, compared with the first service and the second service, the demand of the third service is lower, or the demand of the third service is the same as or similar to the fifth MTU, or the third path is the closest to the demand of the third service among all paths from the first communication device to the destination of the third service. Corresponding to Figure 4 In the illustrated embodiment, the third service may correspond to service 3, the sixth service message may correspond to service messages 61 to 66, and the third path may correspond to path 6. For the implementation of this example, see S332, S33c3 to S33c5.
[0122] It can be seen that through this method 100, when processing the traffic of a service, if the service demand corresponds to a larger MTU but is limited by the MTUs of the communication devices before the first communication device, the traffic of the service is fragmented and transmitted with a smaller first MTU. If there is a first path corresponding to a larger second MTU on the first communication device that can be used to carry the service, then the first communication device can assemble the received first service message into a second service message with a larger length according to the larger second MTU, and transmit the second service message according to the first path corresponding to the larger second MTU. The length of a single service message after the traffic of the service is fragmented on the first communication device is increased, and the number of service messages after fragmentation is reduced, which can effectively save resources such as bandwidth and computing power, improve the transmission efficiency of the traffic, and thus improve the throughput performance of the service. In addition, if the service demand matches the length of the service message received by the first communication device, and there is a path on the first communication device that matches the length of the received service message, the first communication can continue to transmit the received service message along the path; if the service demand is very low or the MTU of the path with good quality on the first communication device is small, resulting in the MTU of the path matching the service demand being smaller than the received service message, the first communication device can disassemble the received service message according to the MTU of the determined path and continue to forward the disassembled service message along the determined path. In this way, the method 100 achieves the purpose of flexibly processing the traffic of different services based on MTU, thereby improving the performance of the network.
[0123] Accordingly, the embodiment of the present application further provides a message processing device 800, which is applied to a first communication device, such as Figure 8 The device 800 may include: a receiving unit 801, a processing unit 802 and a sending unit 803. Among them:
[0124] The receiving unit 801 is configured to receive a plurality of first service messages of a first service, wherein the length of the first service message is less than or equal to a first MTU. The receiving unit 801 may execute Figure 7 S101 shown.
[0125] Processing unit 802 is configured to obtain at least one second service message based on the second MTU and the multiple first service messages, wherein the length of the second service message is less than or equal to the second MTU, the second MTU is greater than the first MTU, the second MTU matches the requirement of the first service, and the second MTU is the MTU of the first path. The processing unit 802 may execute Figure 7 S102 shown.
[0126] The sending unit 803 is configured to transmit the at least one second service message along the first path. The sending unit 803 may execute Figure 7 S103 shown.
[0127] In some possible implementations, the processing unit 802 may include a first processing subunit and a second processing subunit, wherein the first processing subunit is configured to determine the first path based on the demand of the first service, and the second processing subunit is configured to process the multiple first service packets based on the second MTU of the first path to obtain the at least one second service packet.
[0128] As an example, the second processing subunit may include a grouping subunit and an assembling subunit. The grouping subunit is used to group the multiple first service messages according to the second MTU to obtain at least one message group, the total length of the multiple first service messages included in the message group matches the second MTU, and the at least one message group includes a first message group; the assembling subunit is used to assemble the multiple first service messages included in the first message group into a second service message corresponding to the first message group.
[0129] Among them, the assembly subunit is specifically used to: strip the first layer 2 message header and the first CRC of the first business message belonging to the first message group to obtain multiple third business messages, the third business message includes the first layer 3 message header of the corresponding first business message in the first message group, the first layer 3 message header includes length information, and the length information is used to indicate the length of the third business message; according to the multiple third business messages, the second layer 2 message header, the second layer 3 message header and the second CRC, obtain the second business message corresponding to the first message group.
[0130] For example, the second service message may include, in sequence: the second layer-2 message header, the second layer-3 message header, the multiple third service messages and the second CRC.
[0131] For another example, the second service message may further include indication information, the indication information includes a set of length information, and the length information in the set of length information is respectively used to indicate the length of each of the third service messages in the second service message. Optionally, the indication information may also include an assembly quantity, and the assembly quantity is used to indicate the number of the third service messages included in the second service message. In one case, the second service message may include: the second layer 2 message header, the second layer 3 message header, the indication information, the multiple third service messages and the second CRC in sequence; in another case, the second service message may include: the second layer 2 message header, the second layer 3 message header, multiple fourth service messages and the second CRC in sequence, and each of the multiple fourth service messages includes the length information corresponding to the fourth service message in the indication information and the third service message.
[0132] In some possible implementations, the receiving unit 801 is further configured to receive a message, wherein the message includes a third MTU of the second communication device; the processing unit 802 is further configured to determine the first path based on the third MTU, wherein the second MTU is the minimum value of the MTU of each link on the first path. The message may be a protocol message; or the message may also be a response after the API of the second communication device is accessed.
[0133] In some other possible implementations, the sending unit 803 is further used to send a message, where the message includes the fourth MTU of the first communication device; and the receiving unit 801 is further used to receive the path information of the first path sent by a third communication device.
[0134] In some other possible implementations, the receiving unit 801 is further used to receive at least one fifth service message of the second service, and the length of the fifth service message is less than or equal to the first MTU; the processing unit 802 is further used to determine a second path based on the requirements of the second service, and the MTU of the second path matches the first MTU; the sending unit 803 is further used to transmit the at least one fifth service message along the second path.
[0135] In some other possible implementations, the receiving unit 801 is further used to receive a sixth business message of the third business, and the length of the sixth business message is less than or equal to the first MTU; the processing unit 802 is further used to obtain multiple seventh business messages based on the fifth MTU and the sixth business message, the fifth MTU is the MTU of the third path, the fifth MTU matches the demand of the third business, the fifth MTU is less than the first MTU, and the length of the seventh business message is less than or equal to the fifth MTU; the sending unit 803 is also used to transmit the multiple seventh business messages along the third path.
[0136] It should be noted that the specific implementation method and technical effects of the device 800 provided in this application can be found in Figure 7 Related descriptions of the steps implemented by the first communication device in the method 100 are shown.
[0137] See also Fig. 9 , an embodiment of the present application provides a communication device 900. The communication device 900 may be any of the communication devices in any of the above embodiments, for example, Figure 1 , Figure 3 or Figure 4 The communication device 1 in the embodiment; for example, it may also be Figure 7 The communication device 900 can implement the functions of various communication devices in the above embodiments. The communication device 900 includes at least one processor 901, a bus system 902, a memory 903 and at least one communication interface 904.
[0138] The communication device 900 is a hardware structure device that can be used to implement Figure 8 The functional modules in the message processing device 800 shown in FIG. Figure 8 The processing unit 802 in the message processing device 800 shown can be implemented by the at least one processor 901 calling the code in the memory 903.
[0139] Optionally, the communication device 900 may also be used to implement the functions of the network device, communication device or node in any of the above embodiments.
[0140] Optionally, the processor 901 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.
[0141] The bus system 902 may include a path for transmitting information between the components.
[0142] The communication interface 904 is used to communicate with other devices or communication means.
[0143] The memory 903 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0144] The memory 903 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 901. The processor 901 is used to execute the application code stored in the memory 903, so as to realize the functions in the method of the present application.
[0145] In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as Fig. 9 CPU0 and CPU1 in.
[0146] In a specific implementation, as an embodiment, the communication device 900 may include multiple processors, such as Fig. 9901 and processor 907 in the embodiment. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0147] Fig.10 1 is a schematic diagram of the structure of another communication device 1000 provided in an embodiment of the present application. The communication device 1000 may be any of the communication devices in any of the above embodiments, for example, Figure 1 , Figure 3 or Figure 4 The communication device 1 in the embodiment; for example, it may also be Figure 7 The communication device 1000 can implement the functions of each communication device in the above embodiments.
[0148] The communication device 1000 includes: a main control board 1010 and an interface board 1030 .
[0149] The main control board 1010 is also called a main processing unit (MPU) or a route processor card. The main control board 1010 controls and manages various components in the communication device 1000, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 1010 includes: a central processing unit 1011 and a memory 1012.
[0150] The interface board 1030 is also called a line processing unit (LPU), a line card or a service board. The interface board 1030 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 1030 includes: a central processing unit 1031, a network processor 1032, a forwarding table entry memory 1034 and a physical interface card (PIC) 1033.
[0151] The central processing unit 1031 on the interface board 1030 is used to control and manage the interface board 1030 and communicate with the central processing unit 1011 on the main control board 1010 .
[0152] The network processor 1032 is used to implement message forwarding processing. The network processor 1032 may be in the form of a forwarding chip. Specifically, the processing of uplink messages includes: message inbound interface processing, forwarding table search; the processing of downlink messages: forwarding table search, etc.
[0153] The physical interface card 1033 is used to implement the docking function of the physical layer, from which the original traffic enters the interface board 1030, and the processed message is sent from the physical interface card 1033. The physical interface card 1033 includes at least one physical interface, which is also called a physical port. The physical interface card 1033 corresponds to the FlexE physical interface in the system architecture. The physical interface card 1033 is also called a daughter card, which can be installed on the interface board 1030 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1032 for processing after checking the legitimacy of the message. In some embodiments, the central processor 1031 of the interface board 1030 can also perform the functions of the network processor 1032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1032 is not required in the physical interface card 1033.
[0154] Optionally, the communication device 1000 includes a plurality of interface boards. For example, the communication device 1000 further includes an interface board 1040 . The interface board 1040 includes: a central processor 1041 , a network processor 1042 , a forwarding table entry memory 1044 , and a physical interface card 1043 .
[0155] Optionally, the communication device 1000 further includes a switching fabric board 1020. The switching fabric board 1020 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1030, the switching fabric board 1020 is used to complete data exchange between the interface boards. For example, the interface board 1030 and the interface board 1040 may communicate through the switching fabric board 1020.
[0156] The main control board 1010 is coupled to the interface board 1030. For example, the main control board 1010, the interface board 1030, the interface board 1040, and the switching network board 1020 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030, and the main control board 1010 and the interface board 1030 communicate through the IPC channel.
[0157] Logically, the communication device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processor 1031. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1034, a physical interface card 1033, and a network processor 1032. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1032 forwards the message received by the physical interface card 1033 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0158] If the communication device 1000 is configured as a first communication device, the network processor 1032 can trigger the physical interface card 1033 to receive multiple first service messages of the first service, and the length of the first service message is less than or equal to the first MTU; the central processor 1011 can obtain at least one second service message based on the second MTU and the multiple first service messages, and the length of the second service message is less than or equal to the second MTU, the second MTU is greater than the first MTU, the second MTU matches the requirements of the first service, and the second MTU is the MTU of the first path; the network processor 1032 can trigger the physical interface card 1033 to transmit the at least one second service message along the first path.
[0159] It should be understood that the receiving unit 801, the sending unit 803 in the message processing device 800, and the communication interface 904 in the communication device 900 can be equivalent to the physical interface card 1033 or the physical interface card 1043 in the communication device 1000; the processing unit 802 in the message processing device 800 and the processor 901 in the communication device 900 can be equivalent to the central processing unit 1011 or the central processing unit 1031 in the communication device 1000.
[0160] It should be understood that the operation on the interface board 1040 in the embodiment of the present application is consistent with the operation of the interface board 1030, and for the sake of brevity, it will not be repeated. The communication device 1000 of this embodiment can correspond to the message processing device 800 or the communication device 900 in the above-mentioned embodiments. The main control board 1010, the interface board 1030 and / or the interface board 1040 in the communication device 1000 can implement the functions and / or various steps implemented in the message processing device 800 or the communication device 900 in the above-mentioned embodiments, and for the sake of brevity, it will not be repeated here.
[0161] It should be understood that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. Under a centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under a distributed forwarding architecture, the network device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of devices with a centralized architecture. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario.
[0162] In some possible embodiments, each of the above-mentioned network devices or network devices can be implemented as a virtualized device. For example, a virtualized device can be a virtual machine (English: Virtual Machine, VM) running a program for sending message functions, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The virtual machine can be configured as each network device in the embodiments of the present application. For example, each communication device can be implemented based on a general physical server in combination with Network Function Virtualization (NFV) technology. Each communication device is a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize each communication device with the above-mentioned functions on a general physical server in combination with NFV technology by reading this application, which will not be repeated here.
[0163] It should be understood that the communication devices in the above-mentioned various product forms respectively have any functions of the communication devices in the above-mentioned method embodiments, which will not be described in detail here.
[0164] The embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, can be a specific implementation form of the message processing device in the embodiment of the present application, and can be used to execute the above-mentioned routing method. Wherein, the processor is coupled with a memory, and the memory is used to store programs or instructions. When the program or instruction is executed by the processor, the chip system implements the method in any of the above-mentioned method embodiments.
[0165] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0166] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0167] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0168] In addition, the embodiment of the present application also provides a readable storage medium, in which a program code or instruction is stored, and when the program code or instruction is executed on the processor, the processor executes the above Figure 7 A method under any one of the implementation modes in the illustrated embodiments.
[0169] In addition, an embodiment of the present application also provides a program product, which, when executed on a processor, enables the processor to execute any one of the implementation methods of the aforementioned method 100.
[0170] It should be understood that "based on determining B according to A" mentioned in the embodiments of the present application does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0171] The "first" in the names of "first detection message", "first bypass information" and the like mentioned in this application is only used as a name identifier and does not mean the first in order. The same rule applies to "second" and the like.
[0172] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0173] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for system embodiments and device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0174] The above is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. It should be noted that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the present application, and these improvements and modifications should also be regarded as the protection scope of the present application.
Claims
1. A message processing method, characterized in that: include: The first communication device receives a plurality of first service messages of a first service, wherein the length of the first service message is less than or equal to a first maximum transmission unit MTU; The first communication device obtains at least one second service message based on the second MTU and the multiple first service messages, where the length of the second service message is less than or equal to the second MTU, the second MTU is greater than the first MTU, the second MTU matches the requirement of the first service, and the second MTU is the MTU of the first path; The first communication device transmits the at least one second service message along the first path.
2. The method according to claim 1, characterized in that The first communication device obtains at least one second service message based on the second MTU and the plurality of first service messages, including: The first communication device determines the first path based on the demand of the first service; The first communication device processes the multiple first service messages based on the second MTU of the first path to obtain the at least one second service message.
3. The method according to claim 2, characterized in that The first communication device processes the multiple first service messages based on the second MTU of the first path to obtain the at least one second service message, including: The first communication device groups the multiple first service messages according to the second MTU to obtain at least one message group, the total length of the multiple first service messages included in the message group matches the second MTU, and the at least one message group includes the first message group; For the first message group, the first communication device assembles a plurality of first service messages included in the first message group into a second service message corresponding to the first message group.
4. The method according to claim 3, characterized in that: The first communication device assembles the multiple first service messages included in the first message group into a second service message corresponding to the first message group, including: The first communication device strips the first layer-2 message header and the first cyclic redundancy check CRC from the first service message belonging to the first message group, and obtains a plurality of third service messages, wherein the third service message includes the first layer-3 message header of the first service message corresponding to the first message group, and the first layer-3 message header includes length information, and the length information is used to indicate the length of the third service message to which it belongs; The first communication device obtains a second service message corresponding to the first message group according to the multiple third service messages, the second layer-2 message header, the second layer-3 message header and the second CRC.
5. The method according to claim 4, characterized in that The second service message includes, in sequence: the second layer-2 message header, the second layer-3 message header, the multiple third service messages and the second CRC.
6. The method according to claim 4, characterized in that The second service message further includes indication information, where the indication information includes a set of length information, and the length information in the set of length information is respectively used to indicate the length of each of the third service messages in the second service message.
7. The method according to claim 6, characterized in that The indication information also includes an assembly quantity, where the assembly quantity is used to indicate the quantity of the third service messages included in the second service message.
8. The method according to claim 6 or 7, characterized in that: The second service message includes, in sequence: the second layer 2 message header, the second layer 3 message header, the indication information, the plurality of third service messages and the second CRC; Alternatively, the second service message includes, in sequence: the second layer 2 message header, the second layer 3 message header, multiple fourth service messages and the second CRC, and each fourth service message in the multiple fourth service messages includes the length information corresponding to the fourth service message in the indication information and the third service message.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The first communication device receives a message, wherein the message includes a third MTU of the second communication device; The first communication device determines the first path based on the third MTU, and the second MTU is a minimum value of the MTUs of each link on the first path.
10. The method according to claim 9, characterized in that The message is a protocol message; Alternatively, the message is a response after an application program interface API of the second communication device is accessed.
11. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The first communication device sends a message, wherein the message includes a fourth MTU of the first communication device; The first communication device receives the path information of the first path sent by the third communication device.
12. The method according to any one of claims 1 to 11, characterized in that: The method further comprises: The first communication device receives at least one fifth service message of the second service, where the length of the fifth service message is less than or equal to the first MTU; The first communication device determines a second path based on the demand of the second service, and the MTU of the second path matches the first MTU; The first communication device transmits the at least one fifth service message along the second path.
13. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: The first communication device receives a sixth service message of a third service, where the length of the sixth service message is less than or equal to the first MTU; The first communication device obtains a plurality of seventh service messages based on the fifth MTU and the sixth service message, wherein the fifth MTU is the MTU of the third path, the fifth MTU matches the requirement of the third service, the fifth MTU is smaller than the first MTU, and the length of the seventh service message is smaller than or equal to the fifth MTU; The first communication device transmits the multiple seventh service messages along the third path.
14. A communication device, characterized in that: include: A processing unit, configured to perform other operations except the receiving operation and the sending operation in the method according to any one of claims 1 to 13; A transceiver unit, used to perform the receiving operation and the sending operation in the method described in any one of claims 1-13.
15. A communication device, characterized in that: The communication device includes a memory and a processor; The memory is used to store instructions; The processor is used to execute the instructions in the memory and perform the method according to any one of claims 1 to 13.
16. A storage medium, characterized in that: The storage medium includes instructions, and when the instructions are executed on a processor, the processor is caused to execute the method according to any one of claims 1 to 13.