Data transmission method, apparatus, device, and product

CN120811981BActive Publication Date: 2026-08-18RUIJIE NETWORKS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411479832.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-05-16
Filing Date
2024-10-22
Publication Date
2026-08-18
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

[0006]本申请提供了一种数据传输方法、装置、设备及产品,用以解决均衡序列号过晚释放导致占用较大的存储空间的问题

Benefits of technology

[0111] This application provides a data transmission method, comprising: receiving a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, the first data packet including a first load balancing sequence number field; determining the value corresponding to the first load balancing sequence number field and a first hash collision count, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner; and releasing the corresponding value when a release condition is met, wherein the release condition includes: the first hash collision count being a preset number, and the first data packet being the tail packet of the corresponding logical frame.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120811981B_ABST
    Figure CN120811981B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method, device, equipment and product, and relates to the technical field of communication networks. The method comprises the following steps: receiving a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, and the first data packet comprising first equalization sequence information; determining a value corresponding to the first equalization sequence information and a first hash collision number, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner; and releasing the corresponding value in the case of meeting a release condition, wherein the release condition is associated with the first hash collision number and whether the first data packet is a tail packet of the logical frame. The above method reduces the storage space overhead of the value.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202410417483.9, filed on April 8, 2024, entitled "Data Transmission Method", the entire contents of which are incorporated herein by reference; and to Chinese Patent Application No. 202410612662.8, filed on May 16, 2024, entitled "Data Transmission Method", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication network technology, and in particular to a data transmission method, apparatus, device and product. Background Technology

[0003] Currently, mainstream data transmission devices such as routers, switches, Distributed Disaggregated Chassis (DDC) devices, and switching equipment networks typically employ the CLOS architecture invented by Charles Clos. The CLOS architecture is a parallel forwarding structure composed of multiple switching elements, providing high scalability and flexibility. Specifically, the CLOS architecture consists of interconnected switching elements such as multiple input modules (IM), central modules (CM), and output modules (OM). Under this CLOS architecture, data transmission devices typically employ load balancing techniques based on direct packet switching, physical packet framing, or packet segmentation.

[0004] In recent years, load balancing based on logical framing has emerged. This method achieves load balancing by composing multiple data packets into approximately fixed-length logical frames, thus eliminating load imbalance. During load balancing, related technologies assign sequence numbers to the entire logical frame, resulting in a logical frame sequence number. This sequence number is used for load balancing and deordering. Since all data packets within a logical frame with the same sequence number maintain a consistent transmission path within the parallel forwarding structure, there is no out-of-order delivery within the logical frame. Furthermore, existing methods perform multi-path load balancing between logical frames. However, the data flow between IM and OM includes multiple port-level flows, and each port-level flow uses the same sequence numbering method. Therefore, logical frames in different port-level flows may have the same logical frame sequence number. In this case, logical frames with the same sequence number maintain a consistent transmission path between IM and CM, and between CM and OM, resulting in poor load balancing performance. To address this, related technologies divide the data flow between IM and OM into multiple device-level flows, allowing logical frames with the same sequence number to have different transmission paths between IM and CM, or between CM and OM.

[0005] However, each device-level stream uses the same orchestration method for its load balancing sequence numbers, and the number of load balancing sequence numbers is limited. This makes hash collisions prone to occur, meaning logical frames from different device-level streams map to the same load balancing sequence number. In the event of a hash collision, releasing the sequence number too early can lead to different data packets within the same logical frame using different load balancing sequence numbers, thus affecting load balancing performance; releasing it too late can lead to exhaustion of load balancing sequence number resources and consume significant storage space. Therefore, determining when to release load balancing sequence numbers is a pressing issue that needs to be addressed. Summary of the Invention

[0006] This application provides a data transmission method, apparatus, device, and product to solve the problem of excessive storage space occupied due to late release of the equalization sequence number.

[0007] According to a first aspect of this application, a data transmission method is provided, comprising:

[0008] Receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes first equalization sequence information;

[0009] Determine the value corresponding to the first load balancing sequence information and the number of first hash collisions, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner;

[0010] If the release condition is met, the corresponding value is released, wherein the release condition is associated with the first hash collision count and whether the first data packet is the tail packet of the logical frame.

[0011] Optionally, determining the value corresponding to the first balanced sequence information and the number of first hash collisions includes:

[0012] Obtain the first identifier corresponding to the first data packet, wherein the first identifier is used to indicate whether the first data packet is the first packet of the corresponding logical frame;

[0013] Based on the first identifier, determine the value corresponding to the first balanced sequence information and the number of first hash collisions.

[0014] Optionally, the logical frame further includes: a logical frame start identifier and a logical frame end identifier;

[0015] The first identifier includes: the logical frame start identifier and / or the logical frame end identifier.

[0016] Optionally, determining the value corresponding to the first equalization sequence information based on the first identifier includes:

[0017] If the first condition is met, the value corresponding to the first equalization sequence information is determined to be the sum of the third value and the preset value, wherein the third value is the value corresponding to the third equalization sequence information in the third data packet; the third data packet and the first data packet have the same device-level flow identifier;

[0018] If the second condition is met, then the value corresponding to the first balanced sequence information is determined to be the second value;

[0019] The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is a preset number;

[0020] The second condition includes at least one of the following:

[0021] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is not the preset count;

[0022] The first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

[0023] Optionally, the method further includes:

[0024] Obtain the port-level flow identifier and the fifth table corresponding to the first data packet. The port-level flow identifier includes at least the destination port identifier. The fifth table stores the mapping relationship between the port-level flow identifier and the value corresponding to the equalization sequence information of the first transmitted data packet. The first transmitted data packet includes at least the second data packet.

[0025] The second value is obtained from the fifth table based on the port-level flow identifier.

[0026] Optionally, the method further includes:

[0027] Obtain the device-level flow identifier and the first mapping relationship information set corresponding to the first data packet. The device-level flow identifier includes a destination device identifier. The first mapping relationship information set includes the mapping relationship between the device-level flow identifier and the value corresponding to the equalization sequence information of the second transmitted data packet. The second transmitted data packet includes at least a third data packet.

[0028] The third value is obtained from the first mapping relationship information set based on the device-level flow identifier.

[0029] Optionally, after determining that the value corresponding to the first equalization sequence information is the sum of the third value and a preset value, the method further includes:

[0030] If the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the value corresponding to the first equalization sequence information is used to update the fifth table.

[0031] Optionally, after determining the value corresponding to the first equalization sequence information, the method further includes:

[0032] The corresponding values ​​are written into the balanced sequence information.

[0033] Optionally, determining the first hash collision number based on the first identifier includes:

[0034] Based on the first identifier, determine the number of times the storage location corresponding to the value is used;

[0035] The first hash collision count is determined based on the number of times the storage location corresponding to the value is used; the first hash collision count is the number of hash collisions at the storage location corresponding to the value.

[0036] Optionally, determining the number of times the storage location corresponding to the value is used based on the first identifier includes:

[0037] If the third condition is met, then the number of times the storage location corresponding to the value is used is determined to be the sum of the number of times the storage location corresponding to the value has been used and the preset value;

[0038] If the fourth condition is met, then the number of times the storage location corresponding to the value is used is determined to be the number of times the storage location corresponding to the value has been used.

[0039] If the fifth condition is met, then the number of times the storage location corresponding to the value is used is determined to be the difference between the number of times the storage location corresponding to the value has been used and the preset value.

[0040] The third condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame;

[0041] The fifth condition includes: the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is the last packet of the corresponding logical frame;

[0042] The fourth condition includes at least one of the following:

[0043] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and also indicates that the first data packet is the last packet of the corresponding logical frame;

[0044] If the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame.

[0045] Optionally, the method further includes:

[0046] Obtain the sixth table; the sixth table stores the mapping relationship between the value and the number of times the value has been used in the corresponding storage location;

[0047] The sixth table is used to obtain the number of times the storage location corresponding to the value has been used.

[0048] Optionally, if the number of times the storage location corresponding to the value is used is determined to be the sum of the number of times the storage location corresponding to the value has been used and a preset value, or if the number of times the storage location corresponding to the value is used is determined to be the difference between the number of times the storage location corresponding to the value has been used and a preset value, after determining the number of times the storage location corresponding to the value is used based on the first identifier, the method further includes:

[0049] The sixth table is updated using the number of times the value corresponds to the storage location.

[0050] Optionally, updating the sixth table using the usage count of the storage location corresponding to the value includes:

[0051] When the number of times the storage location corresponding to the value is determined to be the sum of the number of times the storage location corresponding to the value has been used and a preset value, the value corresponding to the first balanced sequence number information and the number of times the storage location corresponding to the value are used are respectively written into the sixth table;

[0052] When the number of times the storage location corresponding to the value is determined to be the difference between the number of times the storage location corresponding to the value has been used and a preset value, if the number of times the storage location corresponding to the value is used is 0, then the sixth table is cleared; if the number of times the storage location corresponding to the value is not 0, then the number of times the storage location corresponding to the value is used is written into the sixth table.

[0053] Optionally, after determining the value corresponding to the first equalization sequence information, the method further includes:

[0054] Based on the value corresponding to the first load balancing sequence information, the transmission path of the first data packet is determined according to a preset load balancing method, wherein the preset load balancing method is either a round-robin load balancing method or a congestion-aware load balancing method.

[0055] The first data packet is transmitted according to the transmission path.

[0056] According to a second aspect of this application, a data transmission method is provided, comprising:

[0057] Receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes the value corresponding to the first equalization sequence information;

[0058] Determine the path number of the first data packet and the second hash collision count;

[0059] If the release condition is met, the corresponding path number is released, wherein the release condition is associated with the second hash collision count and whether the first data packet is the tail packet of the logical frame.

[0060] Optionally, determining the path number of the first data packet and the second hash collision count includes:

[0061] Obtain the first identifier corresponding to the first data packet, the first identifier being used to indicate whether the first data packet is the first packet of the corresponding logical frame;

[0062] Based on the first identifier, the path number of the first data packet and the second hash collision count are determined.

[0063] Optionally, determining the path number of the first data packet based on the first identifier includes:

[0064] If the first condition is met, the path number of the first data packet is determined to be the sum of the path number of the fourth data packet and a preset value; the fourth data packet and the first data packet have the same system-level flow identifier.

[0065] If the second condition is met, then the path number of the first data packet is determined to be the path number of the third data packet;

[0066] The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the second hash collision count is a preset number;

[0067] The second condition includes at least one of the following:

[0068] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the second hash collision count is not the preset count;

[0069] The first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

[0070] Optionally, the method further includes:

[0071] Obtain the device-level flow identifier and the seventh table corresponding to the first data packet. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number. The seventh table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet. The second transmitted data packet includes at least the third data packet.

[0072] The path number of the third data packet is found in the seventh table based on the device-level flow identifier.

[0073] Optionally, the method further includes:

[0074] Obtain the system-level flow identifier and the second mapping relationship information set corresponding to the first data packet. The system-level flow identifier includes a destination system identifier. The second mapping relationship information set includes the mapping relationship between the system-level flow identifier and the path number of the third transmitted data packet. The third transmitted data packet includes at least the fourth data packet.

[0075] The path number of the fourth data packet is searched in the second mapping relationship information set based on the system-level flow identifier.

[0076] Optionally, after determining that the path number of the first data packet is the sum of the path number of the fourth data packet and a preset value, the method further includes:

[0077] If the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the path number of the first data packet is used to update the seventh table.

[0078] Optionally, determining the second hash collision count based on the first identifier includes:

[0079] Based on the first identifier, determine the number of times the storage location corresponding to the path number is used;

[0080] The second hash collision count is determined based on the number of times the storage location corresponding to the path number is used; the second hash collision count is the number of hash collisions at the storage location corresponding to the path number.

[0081] Optionally, determining the number of times the storage location corresponding to the path number is used based on the first identifier includes:

[0082] If the third condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value.

[0083] If the fourth condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the number of times the storage location corresponding to the path number has been used.

[0084] If the fifth condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value.

[0085] The third condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame;

[0086] The fifth condition includes: the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is the last packet of the corresponding logical frame;

[0087] The fourth condition includes at least one of the following:

[0088] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and also indicates that the first data packet is the last packet of the corresponding logical frame;

[0089] If the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame.

[0090] Optionally, the method further includes:

[0091] Obtain the eighth table; the eighth table stores the mapping relationship between the path number and the number of times the path number has been used and the corresponding storage location.

[0092] The eighth table is used to find the number of times the storage location corresponding to the path number has been used.

[0093] Optionally, after determining that the number of times the storage location corresponding to the path number is used is the sum of the number of times the storage location corresponding to the path number has been used and a preset value, or after determining that the number of times the storage location corresponding to the path number is used is the difference between the number of times the storage location corresponding to the path number has been used and a preset value, the method further includes:

[0094] The eighth table is updated based on the number of times the storage location corresponding to the path number is used.

[0095] Optionally, after determining the usage count of the storage location corresponding to the path number based on the first identifier, updating the eighth table using the usage count of the storage location corresponding to the path number includes:

[0096] When the number of times the storage location corresponding to the path number is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value, the path number and the number of times the storage location corresponding to the path number are used are written into the eighth table respectively.

[0097] When the number of times the storage location corresponding to the path number is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value, if the number of times the storage location corresponding to the path number is used is 0, then the eighth table is cleared; if the number of times the storage location corresponding to the path number is not 0, then the number of times the storage location corresponding to the path number is used is written into the eighth table.

[0098] According to a third aspect of this application, a data transmission apparatus is provided, comprising:

[0099] The receiving module is used to receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes first equalization sequence information;

[0100] The determining module is used to determine the value corresponding to the first balanced sequence information and the number of first hash collisions, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner;

[0101] The release module is used to release the corresponding value when a release condition is met, wherein the release condition is associated with the first hash collision count and whether the first data packet is the tail packet of the logical frame.

[0102] According to a fourth aspect of this application, a data transmission apparatus is provided, comprising:

[0103] The receiving module is used to receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes the value corresponding to the first equalization sequence information.

[0104] The determination module is used to determine the path number of the first data packet and the second hash collision count;

[0105] A release module is used to release the corresponding path number when a release condition is met, wherein the release condition is associated with the second hash collision count and whether the first data packet is the tail packet of the logical frame.

[0106] According to a fifth aspect of this application, a data transmission device is provided, comprising: at least one processor and a memory;

[0107] The memory stores computer-executed instructions;

[0108] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the data transmission method as described in any of the first aspects above, and / or, the data transmission method as described in any of the second aspects above.

[0109] According to a sixth aspect of this application, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, are used to implement the data transmission method as described in any of the first aspects above, and / or the data transmission method as described in any of the second aspects above.

[0110] According to a seventh aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the data transmission method as described in any of the first aspects, and / or, the data transmission method as described in any of the second aspects above.

[0111] This application provides a data transmission method, comprising: receiving a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, the first data packet including a first load balancing sequence number field; determining the value corresponding to the first load balancing sequence number field and a first hash collision count, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner; and releasing the corresponding value when a release condition is met, wherein the release condition includes: the first hash collision count being a preset number, and the first data packet being the tail packet of the corresponding logical frame.

[0112] This application ensures the effectiveness of load balancing by not releasing the value in the storage location corresponding to the first load balancing sequence number field if there is a hash collision. The value is released only after the hash collision ends and the tail packet of the logical frame is assigned the value, avoiding the drawbacks of releasing it too early or too late and reducing the storage space overhead of this value.

[0113] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0114] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.

[0115] Figure 1 This diagram illustrates the network architecture of the application environment under the CLOS architecture in related technologies.

[0116] Figure 2 This paper shows a schematic diagram of the structure of a logical frame provided in an embodiment of this application;

[0117] Figure 3A schematic flowchart of a data transmission method for an IM side provided in an embodiment of this application is shown;

[0118] Figure 4 A flowchart illustrating another data transmission method on the IM side provided in an embodiment of this application is shown;

[0119] Figure 5 A schematic flowchart of a data transmission method on the CM side provided in an embodiment of this application is shown;

[0120] Figure 6 A flowchart illustrating another data transmission method on the CM side provided in an embodiment of this application is shown;

[0121] Figure 7 This paper shows a schematic diagram of the internal structure of the data transmission device 700 provided in an embodiment of this application;

[0122] Figure 8 This paper shows a schematic diagram of the internal structure of the data transmission device 800 provided in an embodiment of this application;

[0123] Figure 9 A schematic diagram of the structure of a logic frame provided in another embodiment of this application is shown;

[0124] Figure 10 A schematic flowchart of a data transmission method on an IM side according to another embodiment of this application is shown;

[0125] Figure 11 A flowchart illustrating another data transmission method on the IM side provided in another embodiment of this application is shown;

[0126] Figure 12 A flowchart illustrating another data transmission method on the IM side provided in another embodiment of this application is shown;

[0127] Figure 13 A schematic flowchart of a data transmission method on the CM side according to another embodiment of this application is shown;

[0128] Figure 14 A flowchart illustrating another data transmission method on the CM side provided in an embodiment of this application is shown;

[0129] Figure 15 A flowchart illustrating another data transmission method on the CM side provided in an embodiment of this application is shown;

[0130] Figure 16 This paper shows a schematic diagram of the internal structure of another data transmission device 1600 provided in an embodiment of this application;

[0131] Figure 17This paper shows a schematic diagram of the internal structure of the data transmission device 1700 on the IM side provided in an embodiment of this application;

[0132] Figure 18 This paper shows a schematic diagram of the internal structure of the data transmission device 1800 on the CM side provided in an embodiment of this application;

[0133] Figure 19 A block diagram of a data transmission device 1900 provided in an embodiment of this application is shown.

[0134] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0135] While this application allows for various forms of embodiments, the embodiments of this application, including preferred embodiments, are illustrated in the accompanying drawings, which will be specifically described herein. It should be understood that the disclosure herein is to be considered as an explanation of the principles of this application and is not intended to limit the broad aspects of this application to the one or more embodiments shown or disclosed. As used herein, the term "this application" is not intended to limit the scope of the claimed invention, but is a term used solely for illustrative purposes to discuss exemplary embodiments.

[0136] In related technologies, the CLOS architecture is a parallel forwarding structure composed of multiple switching elements, such as... Figure 1 As shown, the CLOS architecture consists of interconnected switching elements such as multiple IMs, multiple CMs, and multiple OMs. The IM assigns sequence numbers to the entire logical frame. Since out-of-order sequences exist between logical frames within this parallel forwarding structure, a typical mechanism for OMs to perform de-ordering is port-level de-ordering of logical frames. Under this mechanism, the IM typically uses [source port, destination port] or other combinations to mark the logical frame sequence number. These other combinations include, but are not limited to: [source device, destination port], [source device, destination port, priority], or [source port, destination port, priority]. Here, the source device is the IM, the destination device is the OM, the source port is the input port of the IM, and the destination port is the output port of the OM. Priority refers to the priority of the data packet.

[0137] The above combinations are all fine-grained, and the data flow between IM and OM is divided according to function, resulting in a load balancing flow and a de-ordering flow. Therefore, when logical frames are labeled with logical frame sequence numbers based on the above fine-grained approach, the load balancing flow and the de-ordering flow are coupled; that is, load balancing is performed on IM and CM based on logical frame sequence numbers, and de-ordering is performed on OM based on logical frame sequence numbers. Under this mechanism, load balancing based on fine-grained load balancing flows can easily cause serious load balancing conflicts for the following reasons:

[0138] The relevant technology performs multi-path load balancing between logical frames. Specifically, on both the IM and CM, load balancing is performed based on the logical frame sequence number and the corresponding load balancing port group. This load balancing port group includes at least one of the following: ports on the IM connected to the CM, ports on the CM connected to the IM, or ports on the CM connected to the OM. During the load balancing process, the relevant technology enables logical frames with different sequence numbers to have different transmission paths between the IM and CM, or between the CM and OM, thus achieving multi-path load balancing between logical frames.

[0139] However, the data stream between IM and OM includes multiple port-level streams, and each port-level stream uses the same sequence numbering scheme. Therefore, logical frames in different port-level streams may have the same logical frame sequence number. In this case, logical frames with the same logical frame sequence number maintain consistent transmission paths between IM and CM, and between CM and OM, resulting in poor load balancing.

[0140] To address the aforementioned technical problems, the overall inventive concept of this application is to provide a method for improving load balancing performance in the field of communication networks.

[0141] This application constructs a logical frame structure, such as Figure 2 As shown, the logical frame includes a logical frame data packet, and the logical frame data packet includes n data packets. Different data packets can be identified by data packet-1, data packet-2, data packet-n, etc. In other embodiments, the logical frame data packet may also include only one data packet. All data packets within the same logical frame data packet have the same load balancing sequence number, which is the value corresponding to the load balancing sequence number field in the data packet. Different logical frames with the same logical frame sequence number correspond to different load balancing sequence numbers. Based on this, this application performs load balancing according to the load balancing sequence number. Even when facing logical frames with the same logical frame sequence number, this application can make data packets in different logical frames with the same logical frame sequence number correspond to different load balancing sequence numbers. Therefore, load balancing based on the load balancing sequence number can enable data packets in different logical frames with the same logical frame sequence number to be transmitted through different paths, which improves the load balancing effect compared with the related technology's load balancing method based on the logical frame sequence number.

[0142] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0143] Figure 3 A schematic flowchart of a data transmission method for an IM side provided in an embodiment of this application is shown. Figure 3 As shown, the method in this embodiment includes:

[0144] S310. Receive a first data packet, wherein the first data packet corresponds to a first logical frame and the first data packet corresponds to a destination device.

[0145] It should be understood that the first data packet is the data packet currently to be transmitted in the first logical frame. For example, the first data packet is the data packet currently to be transmitted from IM to OM via CM in the first logical frame.

[0146] Optionally, the size of the first logical frame can be, for example, 8KB or 16KB, and this application does not impose any particular limitation.

[0147] Optionally, the first logical frame may be generated by a communication device (e.g., a line card) in the IM. This application embodiment does not specifically limit the generation process of the logical frame.

[0148] Optionally, a data stream may include one or more logical frames. Furthermore, a data stream can be identified by various combinations thereof.

[0149] For example, in one alternative embodiment, data streams can be identified by coarse-grained combination. In other words, data streams can be identified by [source device, destination device], for example, data packets sent by each source device to the same destination device can be considered as a single data stream.

[0150] It should be understood that for data packets within the same data stream with the same [source device, destination device] identifier, data packets within each preset logical frame's rated data length range constitute a single logical frame. The logical frame sequence numbers of different logical frames within the same data stream increment sequentially, and data packets within the same logical frame share the same logical frame sequence number. The source device may have one or more cores, and the destination device may have one or more cores.

[0151] In another alternative embodiment, data streams can be identified by fine-grained composition. In other words, data streams can be identified by [source port, destination port], for example, data packets sent from each source port of the source device to the same destination port can be considered as a single data stream.

[0152] It should be understood that for data packets within the same data stream identified by [source port, destination port], data packets within each preset logical frame's rated data length range are considered as one logical frame. The logical frame sequence numbers of different logical frames within the same data stream are incremented, and data packets within the same logical frame are identified by the same logical frame sequence number.

[0153] Therefore, in this embodiment, one typical implementation mechanism for OM to perform de-ordering is to perform device-level de-ordering between logical frames on the OM. Under this mechanism, a coarse-grained combination of [source device, destination device] is used. Another implementation mechanism is to perform port-level de-ordering between logical frames on the OM. Under this mechanism, [source port, destination port] or other fine-grained combinations are used, wherein other combinations include but are not limited to: [source device, destination port], [source device, destination port, priority], or [source port, destination port, priority].

[0154] Optionally, logical frames with the same logical frame sequence number may be included in different data streams.

[0155] S320. Based on the first logical frame and the destination device, determine the first equalization sequence information corresponding to the first data packet.

[0156] S330. Send a first data packet, wherein the first data packet contains the first equalization sequence information.

[0157] The first load balancing sequence information differs from the load balancing sequence information of the second logical frame. The second logical frame is a logical frame with the same logical frame sequence number as the first logical frame. Logical frames with the same logical frame sequence number have different values, which are used to indicate that the first data packet is transmitted in a load balancing manner.

[0158] Optionally, the balance sequence information includes a balance sequence number, which can be determined through a balance sequence number field. The following example uses the balance sequence number as the balance sequence information and will not be elaborated further.

[0159] It should be understood that each data packet includes a load balancer sequence number field, which is used for load balancing of logical frames. For example... Figure 2 As shown, all data packets within the same logical frame include the equalization sequence number corresponding to the logical frame, which is the value corresponding to the equalization sequence number field.

[0160] In this embodiment, all data packets within a logical frame with the same balanced sequence number correspond to the same transmission path from IM to CM. This application provides a logical frame-based data transmission method, which, compared to related technologies based on data packets, has a more uniform data length, avoiding the problem of poor balanced performance caused by large differences in data packet length. Furthermore, since data packets within the same logical frame correspond to the same transmission path, it can mitigate multi-path latency differences to a certain extent, resulting in a relatively lower out-of-order rate for logical frames.

[0161] It should also be understood that each logical frame is identified by a balancer sequence number, and different logical frames may have the same or different logical frame sequence numbers. However, different logical frames correspond to different balancer sequence numbers.

[0162] Therefore, the load balancing sequence number can be used to decouple load balancing flow and deordered flow. This application embodiment performs load balancing of logical frames between IM and CM based on the load balancing sequence number. Even when facing logical frames with the same logical frame sequence number, this application can ensure that data packets in different logical frames with the same logical frame sequence number correspond to different load balancing sequence numbers. Therefore, this embodiment can determine the first load balancing sequence number corresponding to the first data packet based on the first logical frame corresponding to the received first data packet and the destination device, and then perform load balancing based on the first load balancing sequence number. This enables data packets in different logical frames with the same logical frame sequence number to be transmitted via different paths. Compared with related technologies that perform load balancing based on logical frame sequence numbers, this improves the load balancing effect of logical frames between CM.

[0163] In one optional embodiment, source device A (i.e., a certain IM) sends a data stream to destination device B (a certain OM), where destination device B includes ports P1 and P2. Specifically, source device A can send data stream S1 to port P1 of destination device B, and source device A can send data stream S2 to port P2 of destination device B. This embodiment uses a fine-grained combination of [source device, destination port], which allows us to know that data stream S1 and data stream S2 are different data streams. If destination device B receives the first logical frame in data stream S1 first, and then receives the second logical frame in data stream S2, the logical frame sequence number contained in the first logical frame is m1, and the logical frame sequence number contained in the second logical frame is m2. The value of m1 is related to the number of first transmitted logical frames sent from source device A to port P1, and the value of m2 is related to the number of second transmitted logical frames sent from source device A to port P2. m1 and m2 can be the same or different. In this context, the first transmitted logical frame is the logical frame sent to port P1 before the first logical frame is sent in data stream S1, and the second transmitted logical frame is the logical frame sent to port P2 before the second logical frame is sent in data stream S2. For example, if 6 first transmitted logical frames have been sent in data stream S1, then m1 is 7; similarly, if 6 second transmitted logical frames have been sent in data stream S2, then m2 is 7. Or, if 10 second transmitted logical frames have been sent in data stream S2, then m2 is 11.

[0164] As described above, there must be logical frames with the same logical frame sequence number between the two data streams. Moreover, logical frames with the same logical frame sequence number correspond to the same transmission path, which ultimately leads to the two logical frames using the same transmission path between IM and CM, resulting in poor load balancing.

[0165] This application provides a load balancing sequence number, wherein the load balancing sequence number of the first logical frame is different from that of the second logical frame. For example, if the load balancing sequence number of the first logical frame is q1 and the load balancing sequence number of the second logical frame is q2, since the destination device B receives the first logical frame first, q2 is greater than q1. Therefore, this embodiment enables logical frames with the same logical frame sequence number to correspond to different transmission paths, improving the load balancing effect.

[0166] It should be noted that, as Figure 2 As shown, the data packet may also include a data packet payload.

[0167] Optionally, the data packet may also include a logical frame sequence number field, a source device identifier field, a destination port identifier field, a destination device identifier field, and a data packet payload. For example, Figure 2As shown, the logical frame sequence number field is used to identify the logical frame sequence number of the logical frame containing the data packet, and is then used for de-ordering the logical frame. The source device identifier field is used to identify the source device, the destination port identifier field is used to identify the destination port, and the destination device identifier field is used to identify the destination device.

[0168] In one possible embodiment, the first logical frame further includes: a first identifier.

[0169] The first identifier is at least one of the following:

[0170] (1) Logical frame end identifier.

[0171] (2) Data packet location identifier, and the data packet location identifier is the first value.

[0172] The following is an example of how logical frame end markers are defined:

[0173] The logical frame end identifier is used to indicate the end of the corresponding logical frame. In one optional implementation, such as... Figure 2 As shown, the logical frame also includes a logical frame end flag. For example, the logical frame end flag can take the value 0 or 1. When the logical frame end flag is 1, it means that the logical frame has not ended; when the logical frame end flag is 0, it means that the logical frame has ended.

[0174] It should be understood that since the received data packets change in real time, the value of the logical frame end flag also changes. In other words, when the received data packet is the last data packet of the logical frame, the logical frame end flag is modified to 0; when the received data packet is not the last data packet of the logical frame, the logical frame end flag is kept at 1.

[0175] It should also be understood that when logical frames are transmitted between IM and CM and between CM and OM, the logical frame end identifier included in the logical frame may be carried in a separate signaling packet or in the tail packet of the corresponding logical frame.

[0176] The following is an example of how packet location identification is explained:

[0177] In one feasible embodiment, the data packet location identifier can be carried only in the tail packet of the corresponding logical frame. For example, when the first data packet is the tail packet of the corresponding logical frame, a data packet location identifier can be set in the first data packet, and the first value is 0, to indicate that the first data packet is the tail packet of the corresponding logical frame.

[0178] In another possible embodiment, each data packet can carry a corresponding data packet location identifier. For example, when the first data packet is the tail packet of the corresponding logical frame, a data packet location identifier can be set in the first data packet, and the first value is 0, to indicate that the first data packet is the tail packet of the corresponding logical frame. Alternatively, when the first data packet is not the tail packet of the corresponding logical frame, a data packet location identifier can be set in the first data packet, and the location identifier is 1, to indicate that the first data packet is not the tail packet of the corresponding logical frame.

[0179] Based on the above embodiments, the technical solution of this application will be described in more detail below with reference to several specific embodiments.

[0180] In one possible embodiment, S320, based on the first logical frame and the destination device, determines the first equalization sequence information corresponding to the first data packet, including:

[0181] Step 321: Based on the first logical frame and the destination port of the destination device, determine whether the first data packet is the first packet of the first logical frame.

[0182] Step 322: Determine the first balanced sequence information corresponding to the first data packet based on the judgment result.

[0183] In this embodiment, based on the first logical frame and the destination port of the destination device, it can be determined whether the first data packet is the first packet of the first logical frame, and then the first equalization sequence information corresponding to the first data packet can be determined based on whether the first data packet is the first packet of the first logical frame. The first equalization sequence information includes a first equalization sequence number.

[0184] In one possible embodiment, step 321, determining whether the first data packet is the first packet of the first logical frame based on the first logical frame and the destination port of the destination device, includes:

[0185] Step 3211: Based on the first logical frame and the destination port of the destination device, obtain the first identifier of the second data packet. The second data packet is the preceding data packet of the first data packet when it has the same port-level flow identifier as the first data packet. The first identifier is used to indicate whether the corresponding data packet is the tail packet of the corresponding logical frame. The port-level flow identifier includes: the source port identifier and the destination port identifier of the destination device.

[0186] Step 3212: Determine whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the second data packet.

[0187] In this embodiment, since the second data packet is the preceding data packet of the first data packet when it has the same port-level flow identifier as the first data packet, the first identifier of the second data packet can be obtained based on the destination port identifier of the destination device to determine whether the second data packet is the tail packet. If the second data packet is the tail packet and is the preceding data packet of the first data packet, then the first data packet can be determined to be the first packet of the current logical frame (i.e., the first logical frame). Otherwise, the first data packet is not the first packet of the first logical frame.

[0188] As an optional implementation, determining the value corresponding to the first equalization sequence number field includes:

[0189] Obtain the first identifier corresponding to the second data packet. The first identifier indicates whether the corresponding data packet is the tail packet of the corresponding logical frame. Based on the first identifier, determine the value of the first equalization sequence number field.

[0190] As an optional implementation, the port-level flow identifier includes at least one of the source port or the destination port.

[0191] As another optional implementation, the first data packet also includes the logical frame sequence number corresponding to the logical frame it belongs to; the port-level flow identifier also includes the logical frame sequence number.

[0192] In this embodiment of the application, the position of the first data packet in the corresponding logical frame can be accurately identified based on the first identifier corresponding to the second data packet, thereby determining the value of the first equalization sequence number field in the first data packet, which can ensure that different logical frames correspond to different equalization sequence numbers.

[0193] In one possible embodiment, step 3211, obtaining the first identifier of the second data packet based on the first logical frame and the destination port of the destination device, includes:

[0194] Step a1: Determine the port-level flow identifier and the first table corresponding to the first data packet in the first logical frame; the first table stores the mapping relationship between the port-level flow identifier and the first identifier of the first transmitted data packet; the first transmitted data packet includes the second data packet;

[0195] Step a2: Based on the port-level flow identifier, find the first identifier corresponding to the second data packet in the first table.

[0196] In one possible embodiment, step 3212, determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the second data packet, includes:

[0197] Step a3: If the first identifier corresponding to the second data packet indicates that the second data packet is the tail packet of the corresponding logical frame, then the first data packet is determined to be the first packet of the first logical frame;

[0198] Step a4: If the first identifier corresponding to the second data packet indicates that the second data packet is not the tail packet of the corresponding logical frame, then it is determined that the first data packet is not the first packet of the first logical frame.

[0199] As a specific embodiment, Figure 4 This illustrates the load balancing process performed on the source-destination data stream in IM. For example... Figure 4 As shown, the data transmission method includes:

[0200] S41. Obtain the port-level flow identifier and the first table corresponding to the first data packet.

[0201] The port-level flow identifier includes at least one of the source port or the destination port; the first table stores the mapping relationship between the port-level flow identifier and the first identifier of the first transmitted data packet; the first transmitted data packet includes at least the second data packet.

[0202] It should be understood that when the IM receives the first data packet, it obtains the port-level flow identifier corresponding to the first data packet.

[0203] It should also be understood that the first table, or the new logical frame judgment table on the IM, is...

[0204] As an optional implementation, the first table can be as shown in Table 1:

[0205] Table 1, First Table

[0206] [Source port, destination port, logical frame sequence number] 0 or 1 … …

[0207] It should be noted that the logical frame sequence number is optional and depends on the specific data transmission situation. Specifically, if the IM cannot guarantee that logical frames of the same data stream identified by [source port, destination port] arrive at the IM's equalization sequence number processing module in sequence according to their logical frame sequence numbers, then the port-level flow identifier needs to include the logical frame sequence number. Conversely, the port-level flow identifier may not include the logical frame sequence number. The aforementioned equalization sequence number processing module is used to mark the logical frames with corresponding equalization sequence numbers.

[0208] It should also be noted that, by default, all logical frame end identifiers in the logical frame end identifier column of the first table are 0.

[0209] S42. Based on the port-level flow identifier, find the first identifier corresponding to the second data packet in the first table.

[0210] It should be understood that the first identifier includes: a logical frame end identifier. In this application embodiment, based on the port-level flow identifier index first table, it can be determined whether the second data packet is the tail packet of the corresponding logical frame, and whether the first data packet is the first packet of the corresponding logical frame.

[0211] S43. Determine whether the first identifier indicates that the second data packet is the tail packet of the corresponding logical frame.

[0212] Specifically, upon receiving the first data packet, the IM searches for the logical frame end identifier corresponding to the second data packet in the first table. If the logical frame end identifier corresponding to the second data packet is 0, it indicates that the second data packet is the tail packet of the corresponding logical frame, and the first data packet is the head packet of the corresponding logical frame. The logical frame corresponding to the first data packet is a new logical frame relative to the logical frame corresponding to the second data packet. If the logical frame corresponding to the first data packet has subsequent data packets, then for the subsequent data packets, the corresponding logical frame end identifier is kept set to 1, and the subsequent data packets are not considered new logical frames.

[0213] Conversely, if the logical frame end identifier corresponding to the second data packet is 1, it means that the second data packet is not the tail packet of the corresponding logical frame, and the first data packet is not the first packet of the corresponding logical frame.

[0214] In one possible embodiment, step 322, determining the first equalization sequence information corresponding to the first data packet based on the judgment result, includes:

[0215] S3221. If the determination result indicates that the first data packet is not the first packet of the first logical frame, then the first equalization sequence number corresponding to the first data packet is determined to be the second equalization sequence number, and the second equalization sequence number is the equalization sequence number in the second data packet.

[0216] S3222. If the determination result indicates that the first data packet is the first packet of the first logical frame, then the first equalization sequence number is determined to be the sum of the third equalization sequence number and a preset value, wherein the third equalization sequence number is the equalization sequence number in the third data packet; the third data packet is the data packet preceding the first data packet when it has the same device-level flow identifier as the first data packet.

[0217] It should be understood that if the first identifier indicates that the second data packet is the tail packet of the corresponding logical frame, and thus the first data packet is determined to be the first packet of the first logical frame, then the following S44 is executed; if the first identifier indicates that the second data packet is not the tail packet of the corresponding logical frame, and thus the first data packet is determined not to be the first packet of the first logical frame, then the following S45 is executed:

[0218] S44. Determine the first equilibrium sequence number as the sum of the third equilibrium sequence number and the preset value.

[0219] Among them, the third equalization sequence number is the value corresponding to the third equalization sequence number field, and the value corresponding to the third equalization sequence number field is the value corresponding to the equalization sequence number field in the third data packet.

[0220] It should be understood that the preset value can be 1, 2, 3, etc., and the embodiments of this application do not specifically limit it.

[0221] For example, when the preset value is 1, if it is determined that the first data packet received is the first packet of the corresponding logical frame, then the value corresponding to the third equalization sequence number field plus 1 is used as the first equalization sequence number (for example, the value corresponding to the first equalization sequence number field will not be described in detail below).

[0222] The step of obtaining the third equilibrium sequence number (e.g., the value corresponding to the third equilibrium sequence number field, which will not be described in detail below) includes:

[0223] Step a11: Obtain the device-level flow identifier and the first mapping relationship information set corresponding to the first data packet. The device-level flow identifier includes the destination device identifier. The first mapping relationship information set includes the mapping relationship between the device-level flow identifier and the equalization sequence number of the second transmitted data packet. The second transmitted data packet includes at least the third data packet.

[0224] Step a12: Search for the third equalization sequence number in the first mapping relationship information set based on the device-level flow identifier.

[0225] As can be seen from S44 and the first mapping relationship information set, when a new logical frame sent to a certain destination device is identified, the equalization sequence number corresponding to the data stream identified by the [destination device] is accumulated.

[0226] S45. Determine the first equilibrium sequence number as the second equilibrium sequence number.

[0227] The step of obtaining the second equilibrium sequence number (i.e., the value corresponding to the second equilibrium sequence number field) includes:

[0228] Step a21: Obtain the port-level flow identifier and the second table corresponding to the first data packet. The port-level flow identifier includes at least one of the source port or the destination port. The second table stores the mapping relationship between the port-level flow identifier and the equalization sequence number (e.g., the value corresponding to the equalization sequence number field) of the first transmitted data packet. The first transmitted data packet includes at least the second data packet.

[0229] It should be understood that the second table, or the balanced sequence number table on the IM, is shown in Table 2:

[0230] Table 2, Second Table

[0231] [Source port, destination port, logical frame sequence number] Any value between 0 and N … …

[0232] Step a22: Based on the port-level flow identifier, find the value corresponding to the second equalization sequence number field in the second table.

[0233] In this embodiment, data frames with the same logical frame sequence number in different data streams can correspond to different equalization sequence numbers. Therefore, based on the equalization sequence number in the second table, data streams identified by [source port, destination port] can be converted into data streams identified by [destination device]. For example, from the perspective of the source device, data streams with different [source port, destination port] identifiers pointing to the same destination device can be converted into a single data stream with a [destination device] identifier pointing to the same destination device.

[0234] In one possible embodiment, after step 3212, determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the second data packet, the data transmission method further includes:

[0235] Step b1: Determine the first identifier corresponding to the first data packet based on the judgment result;

[0236] Step b2: Update the first table using the first identifier corresponding to the first data packet.

[0237] See Figure 4 S46. Update the first table using the first identifier corresponding to the first data packet.

[0238] In this embodiment, after searching for the first identifier corresponding to the second data packet in the first table based on the port-level flow identifier in step S42, the first identifier corresponding to the subsequent data packet can be accurately determined according to the updated first table.

[0239] In one possible embodiment, after determining in step S3222 (or S44) that the first equalization sequence number is the sum of the third equalization sequence number and a preset value, the data transmission method further includes:

[0240] If it is determined that the first data packet is not the tail packet of the first logical frame, then the second table is updated using the first balanced sequence number.

[0241] In this embodiment, see Figure 4 In step S47, if the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the second table is updated using the first balanced sequence number.

[0242] It should be understood that the second table occupies storage space on the IM. Writing the balanced sequence number into the second table can provide the same balanced sequence number for subsequent data packets in the same logical frame as the first data packet, so that all data packets in the same logical frame have the same balanced sequence number, thereby ensuring that the same logical frame passes through the same transmission path between the IM and the CM.

[0243] In one possible embodiment, after step S3221 (or step S45), determining the value of the first equalization sequence number as the second equalization sequence number, the method further includes:

[0244] If it is determined that the first data packet is the tail packet of the first logical frame, then the second equalization sequence number is deleted from the second table.

[0245] In this embodiment, see Figure 4 In step S48, if the first identifier corresponding to the first data packet indicates that the first data packet is the tail packet of the corresponding logical frame, then the second equalization sequence number is deleted from the second table.

[0246] In one possible embodiment, after S44 or S45, such as Figure 4 As shown, the data transmission method further includes:

[0247] S49. Write the first equalization sequence information into the first data packet. For example, before sending the first data packet, write the corresponding value into the equalization sequence number field.

[0248] It should be understood that the load balancing sequence number corresponding to the first data packet is written into the first data packet for load balancing of the first data packet.

[0249] In one optional embodiment, when the first data packet is the first packet of the corresponding logical frame, the balancer sequence number (i.e., the value corresponding to the third balancer sequence number field) corresponding to the device-level flow identifier of the first data packet is incremented by 1. If the first data packet is both the first packet and the last packet of the corresponding logical frame, the incremented balancer sequence number is written into the first data packet; if the first data packet is only the first packet of the corresponding logical frame, the balancer sequence number is written into the first data packet and the second table. Writing to the second table is used to read the balancer sequence number for subsequent data packets of the logical frame.

[0250] When the first data packet is not the first packet of the corresponding logical frame, if the first data packet is neither the first nor the last packet of the corresponding logical frame, the balancer sequence number corresponding to the second data packet is read from the second table and written into the first data packet. Conversely, if the first data packet is not the first packet of the corresponding logical frame but is the last packet, the balancer sequence number corresponding to the second data packet can also be read from the second table and written into the first data packet. Furthermore, in embodiments of this application, if the first data packet is the last packet of a logical frame, the balancer sequence number corresponding to the port-level flow identifier of the first data packet can be deleted from the second table.

[0251] In summary, the difference between the balanced sequence numbers of two adjacent logical frames destined for the same destination device is 1, and there is no relationship between the balanced sequence numbers of different logical frames destined for different destination devices; and the current value of the balanced sequence number destined for each destination device is obtained from the first mapping relationship information set.

[0252] In one alternative embodiment, the current values ​​of the equalization sequence numbers of different destination devices can be stored independently in additional storage space.

[0253] For example, the current value of the equalization sequence number going to destination device 1 is 3, and the current value of the equalization sequence number going to destination device 2 is 5. At this time, a new logical frame going to destination device 1 arrives. Its equalization sequence number value is accumulated and marked as 4. The current value of the equalization sequence number going to destination device 1 is updated as the equalization sequence number of the new logical frame. The equalization sequence number 4 of the new logical frame can also be stored in Table 2 for subsequent packet reading of the new logical frame.

[0254] In the above embodiments, the balanced sequence number is used to maintain the same transmission path between IM and CM for all data packets within the same logical frame, while enabling logical frames with different logical frame sequence numbers to correspond to different transmission paths between IM and CM, thereby improving the load balancing effect between IM and OM.

[0255] In one possible embodiment, after S44 or S45, such as Figure 4 As shown, the data transmission method further includes:

[0256] S50. Based on the first load balancing sequence information, determine the transmission path of the first data packet according to a preset load balancing method. For example, based on the value corresponding to the first load balancing sequence number field, determine the transmission path of the first data packet according to a preset load balancing method.

[0257] The preset load balancing method is either round-robin load balancing or congestion-aware load balancing.

[0258] S51. Send the first data packet according to the transmission path. For example, transmit the first data packet between IM and CM according to the transmission path.

[0259] For example, the IM has two ports, P11 and P12, and the CM has three ports: P21, P22, and P23. There are six transmission paths between the IM and CM: P11-P21, P11-P22, P11-P23, P12-P21, P12-P22, and P12-P23. After writing the load balancing sequence number into the first data packet, if the preset load balancing method is round-robin load balancing, the transmission paths between the IM and CM are polled. When an idle transmission path is determined, the first data packet is sent from the IM to the CM through the idle transmission path.

[0260] The above is an exemplary description of load balancing processing for data streams identified by port-level flow on the IM. Since the transmission path between IM and OM includes not only the transmission path between IM and CM, but also the transmission path between CM and OM, and the load balancing sequence number can transform data streams identified by [source port, destination port] into data streams identified by [destination device], the following describes load balancing processing for data streams identified by [source device, destination device] on the CM.

[0261] For example, Figure 5 A schematic flowchart of a data transmission method on the CM side provided in an embodiment of this application is shown. Figure 5 As shown, the data transmission method includes:

[0262] S510. Receive a first data packet, the first data packet contains the first equalization sequence information, the first data packet corresponds to a first logical frame, and the first data packet corresponds to a destination device.

[0263] It should be understood that the structure of a logical frame is as described above, and will not be repeated here.

[0264] S520. Based on the first logical frame and the destination device, determine the first transmission path of the first data packet.

[0265] In this embodiment, load balancing of logical frames is performed between CM and OM based on the balance sequence number. Even when faced with logical frames with the same balance sequence number, this application can ensure that data packets in different logical frames with the same balance sequence number correspond to different transmission paths. Therefore, based on the first logical frame corresponding to the received first data packet and the destination device, this embodiment can determine the transmission path corresponding to the first data packet, and then perform load balancing of logical frames between CM and OM based on the first balance sequence number. This enables data packets in different logical frames with the same balance sequence number to be transmitted along different paths. Compared with the related technology that performs load balancing based on the logical frame sequence number, this improves the load balancing effect of logical frames between CM and OM.

[0266] Based on the above embodiments, the technical solution of this application will be described in more detail below with reference to several specific embodiments.

[0267] In one possible embodiment, S520, based on the first logical frame and the destination device, determines the first transmission path of the first data packet, including:

[0268] Step 521: Based on the first logical frame and the destination device, determine whether the first data packet is the first packet of the first logical frame.

[0269] Step 522: Determine the first transmission path of the first data packet based on the judgment result.

[0270] In this embodiment of the application, based on the first logical frame and the destination device, it can be determined whether the first data packet is the first packet of the first logical frame, and then the first transmission path corresponding to the first data packet can be determined based on the result of whether the first data packet is the first packet of the first logical frame. The first transmission path corresponds to a first transmission path number.

[0271] In one possible embodiment, step 521, determining whether the first data packet is the first packet of the first logical frame based on the first logical frame and the destination device, includes:

[0272] Step d1: Based on the first logical frame and the destination device, obtain the first identifier of the third data packet. The third data packet is the data packet preceding the first data packet when it has the same device-level flow identifier as the first data packet. The first identifier is used to indicate whether the corresponding data packet is the tail packet of the corresponding logical frame. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number.

[0273] Step d2: Determine whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the third data packet.

[0274] In this embodiment, since the third data packet is the preceding data packet of the first data packet when it has the same device-level flow identifier as the first data packet, the first identifier of the third data packet can be obtained based on the destination device identifier to determine whether the third data packet is the tail packet. If the third data packet is the tail packet and is the preceding data packet of the first data packet, then the first data packet can be determined to be the first packet of the current logical frame (i.e., the first logical frame). Otherwise, the first data packet is not the first packet of the first logical frame.

[0275] As an optional implementation, determining the path number of the first data packet (e.g., the first transmission path number of the first data packet) includes:

[0276] Obtain the first identifier corresponding to the third data packet. The first identifier indicates whether the corresponding data packet is the tail packet of the corresponding logical frame. Based on the first identifier, determine the path number (e.g., the first transmission path number) of the first data packet.

[0277] In one possible embodiment, step d1, obtaining the first identifier of the third data packet based on the first logical frame and the destination device, includes:

[0278] Step d11: Determine the device-level flow identifier and the third table corresponding to the first data packet in the first logical frame; the third table stores the mapping relationship between the device-level flow identifier and the first identifier of the second transmitted data packet; the second transmitted data packet includes the third data packet;

[0279] Step d12: Based on the device-level flow identifier, search for the first identifier corresponding to the third data packet in the third table.

[0280] In one possible embodiment, step d2, determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the third data packet, includes:

[0281] Step d21: If the first identifier corresponding to the third data packet indicates that the third data packet is the tail packet of the corresponding logical frame, then the first data packet is determined to be the first packet of the first logical frame;

[0282] Step d22: If the first identifier corresponding to the third data packet indicates that the third data packet is not the tail packet of the corresponding logical frame, then it is determined that the first data packet is not the first packet of the first logical frame.

[0283] As a specific embodiment, such as Figure 6 As shown, the data transmission method includes:

[0284] S61. Obtain the device-level flow identifier and the third table corresponding to the first data packet.

[0285] The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number; the third table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet; the second transmitted data packet includes at least the third data packet.

[0286] It should be understood that when the CM receives the first data packet, it obtains the device-level flow identifier corresponding to the first data packet.

[0287] It should also be understood that the third table, or the new logic frame decision table on the CM, is...

[0288] As an optional implementation, the third table can be as shown in Table 3:

[0289] Table 3, Third Table

[0290] [Source device, destination device, load balancer serial number] 0 or 1

[0291] It should be noted that, in the third table, all logical frame end identifiers in the logical frame end identifier column are 0 by default.

[0292] S62. Based on the device-level flow identifier, find the first identifier corresponding to the third data packet in the third table.

[0293] It should be understood that the first identifier includes: a logical frame end identifier. In this embodiment of the application, based on the third table of the device-level flow identifier index, it can be determined whether the third data packet is the tail packet of the corresponding logical frame, and whether the first data packet is the first packet of the corresponding logical frame.

[0294] It should also be understood that for the column containing the device-level flow identifier in Table 3, the device-level flow identifier [source device, destination device, equalization sequence number] can uniquely identify a logical frame.

[0295] S63. Determine whether the first identifier indicates that the third data packet is the tail packet of the corresponding logical frame.

[0296] Specifically, when the CM receives the first data packet, it looks up the logical frame end identifier corresponding to the third data packet in the third table. If the logical frame end identifier corresponding to the third data packet is 0, it means that the third data packet is the tail packet of the corresponding logical frame, and the first data packet is the head packet of the corresponding logical frame. The logical frame corresponding to the first data packet is a new logical frame relative to the logical frame corresponding to the third data packet. If the logical frame corresponding to the first data packet has subsequent data packets, then for the subsequent data packets, the corresponding logical frame end identifier is kept set to 1, and the subsequent data packets are not judged as new logical frames.

[0297] Conversely, if the logical frame end identifier corresponding to the third data packet is 1, it means that the third data packet is not the tail packet of the corresponding logical frame, and the first data packet is not the first packet of the corresponding logical frame.

[0298] In one possible embodiment, the first transmission path includes a first transmission path number. Step 522, determining the first transmission path of the first data packet based on the judgment result, includes:

[0299] Step 5221: If the judgment result indicates that the first data packet is not the first packet of the first logical frame, then determine the first transmission path number of the first data packet as the second transmission path number, and the second transmission path number as the transmission path number of the third data packet.

[0300] Step 5222: If the determination result is that the first data packet is the first packet of the first logical frame, then the first transmission path number is determined to be the sum of the third transmission path number and a preset value, the third transmission path number is the transmission path number corresponding to the fourth data packet, and the fourth data packet has the same system-level flow identifier as the first data packet.

[0301] It should be understood that if the first identifier indicates that the third data packet is the tail packet of the corresponding logical frame, and thus the first data packet is determined to be the first packet of the first logical frame, then the following step S64 is executed; if the first identifier indicates that the third data packet is not the tail packet of the corresponding logical frame, and thus the first data packet is determined not to be the first packet of the first logical frame, then the following step S65 is executed:

[0302] S64. Determine the first transmission path number of the first data packet as the sum of the third transmission path number and a preset value. That is, the first transmission path number is the sum of the path number of the fourth data packet and a preset value.

[0303] It should be understood that the fourth data packet has the same system-level flow identifier as the first data packet. The preset value can be 1, 2, 3, etc., and this application embodiment does not specifically limit it.

[0304] For example, when the preset value is 1, if it is determined that the received first data packet is the first packet of the corresponding logical frame, then the value after adding 1 to the path number of the fourth data packet (for example, the third transmission path number, which will not be described again below) is used as the first transmission path number of the first data packet.

[0305] The step of obtaining the path number of the fourth data packet includes:

[0306] Step e11: Obtain the system-level flow identifier and the second mapping relationship information set corresponding to the first data packet. The system-level flow identifier includes the destination system. The second mapping relationship information set includes the mapping relationship between the system-level flow identifier and the path number of the third transmitted data packet. The third transmitted data packet includes at least the fourth data packet.

[0307] Step e12: Search for the third transmission path number in the second mapping relationship information set based on the system-level flow identifier.

[0308] S65. Determine the first transmission path number of the first data packet as the second transmission path number. That is, the first transmission path number of the first data packet is the path number of the third data packet.

[0309] The step of obtaining the second transmission path number (i.e., the path number of the third data packet) includes:

[0310] Step e21: Obtain the device-level flow identifier and the fourth table corresponding to the first data packet. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number. The fourth table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet. The second transmitted data packet includes at least the third data packet.

[0311] It should be understood that the fourth table, also known as the CM routing table, is shown in Table 4:

[0312] Table 4, Fourth Table

[0313] [Source device, destination device, load balancer serial number] Any value between 0 and M … …

[0314] Where M is used to identify the total number of ports from CM to any OM.

[0315] Step e22: Based on the device-level flow identifier, find the second transmission path number of the third data packet in the fourth table.

[0316] In one possible embodiment, after step d2, which involves determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the third data packet, the data transmission method further includes:

[0317] Step f1: Determine the first identifier corresponding to the first data packet based on the judgment result;

[0318] Step f2: Update the third table using the first identifier corresponding to the first data packet.

[0319] See Figure 6 S66: Update the third table using the first identifier corresponding to the first data packet.

[0320] In this embodiment, after S62, searching for the first identifier corresponding to the third data packet in the third table based on the device-level flow identifier, the first identifier corresponding to the subsequent data packet can be accurately determined according to the updated third table.

[0321] In one possible embodiment, after step 5222 (or S64), where the first transmission path number of the first data packet is determined to be the sum of the third transmission path number and a preset value, the data transmission method further includes:

[0322] If it is determined that the first data packet is not the tail packet of the first logical frame, then the fourth table is updated using the first transmission path number.

[0323] In this embodiment, see Figure 6 In step S67, if the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the first transmission path number of the first data packet is used to update the fourth table.

[0324] It should be understood that the fourth table occupies storage space on the CM. Writing the path number into the fourth table can provide the same path number for subsequent data packets in the same logical frame as the first data packet, so that all data packets in the same logical frame have the same path number, thereby ensuring that the same logical frame passes through the same transmission path between the CM and the OM.

[0325] In one possible embodiment, after step S5221 (or step S65) determines that the first transmission path number of the first data packet is the second transmission path number, the method further includes:

[0326] If it is determined that the first data packet is the tail packet of the first logical frame, then the second transmission path number is deleted from the fourth table.

[0327] In this embodiment, see Figure 6 In step S68, if the first identifier corresponding to the first data packet indicates that the first data packet is the tail packet of the corresponding logical frame, then the second transmission path number of the third data packet is deleted from the fourth table.

[0328] After executing S64 or S65, the embodiments of this application may further include:

[0329] S69. Transmit the first data packet according to the first transmission path of the first data packet. For example, transmit the first data packet between CM and OM according to the first transmission path number of the first data packet.

[0330] In one optional embodiment, when the first data packet is the first packet of the corresponding logical frame, the path number corresponding to the device-level flow identifier of the first data packet is incremented by 1. If the first data packet is both the first packet and the last packet of the corresponding logical frame, the first data packet is forwarded according to the path number incremented by 1. If the first data packet is only the first packet of the corresponding logical frame, the first data packet is forwarded according to the path number incremented by 1, and the path number incremented by 1 is written into the fourth table for reading the path number for subsequent data packets of the logical frame.

[0331] When the first data packet is not the first packet of the corresponding logical frame, if the first data packet is neither the first packet nor the last packet of the corresponding logical frame, the corresponding path number is read from the fourth table, and the first data packet is forwarded according to the path number. Conversely, if the first data packet is not the first packet of the corresponding logical frame but is the last packet of the corresponding logical frame, the corresponding path number can also be read from the fourth table. In addition, in embodiments of this application, if the first data packet is the last packet of a logical frame, the corresponding path number in the fourth table can be cleared.

[0332] Optionally, the CM determines the transmission path of the first data packet between the CM and the OM based on all data streams using a round-robin load balancing method. Generally, in this embodiment, when a new logical frame destined for a certain device is detected, the path number obtained from the second mapping relationship information set is incremented by 1, and the transmission path corresponding to the incremented path number is used.

[0333] Optionally, to simplify load balancing on the CM, the CM can perform load balancing based solely on the load balancing sequence number; or further, the CM can perform congestion-aware load balancing.

[0334] In the above embodiments, the path number is used to maintain the same transmission path between CM and OM for all data packets within the same logical frame, while making logical frames with the same balanced sequence number correspond to different transmission paths between CM and OM, thereby improving the load balancing effect of logical frames between CM and OM.

[0335] In the embodiment of load balancing between IM and OM, the embodiments of load balancing between IM and CM and load balancing between CM and OM described above can be combined. To achieve better load balancing performance and ensure order preservation within the same logical frame, this embodiment provides a second table and a fourth table. As the network scales up, the second table occupies storage space on the IM and the fourth table occupies storage space on the CM. Compared with related technologies that store information related to the transmission path between IM and CM corresponding to the logical frame on the IM and on the CM, this method has the advantage of smaller space usage.

[0336] The above is an exemplary description of load balancing on IM and CM. It should be understood that because the multi-path load balancing provided by related technologies can lead to logical frame out-of-order delivery, on OM, these technologies de-order frames based on their logical frame sequence numbers. Due to severe load balancing conflicts, these technologies increase latency and latency differences during the load balancing process, making de-ordering on OM more difficult.

[0337] Therefore, in other embodiments, based on the above load balancing on IM and CM, when CM sends a logical frame to OM, OM deorders the logical frame based on the logical frame sequence number and forwards the data packets included in the logical frame.

[0338] On the OM (Order Frame), based on the de-outordered flow, the OM treats data packets within the preset logical frame's rated data length range of the same data stream as a single logical frame. The logical frame sequence number of each data stream increments, and data packets within the same logical frame are identified by the same logical frame sequence number. The logical frame sequence number is used to rearrange out-of-order logical frames on the OM.

[0339] The exemplary embodiments provided in this application have the following effects:

[0340] (1) The data transmission method provided in this application is based on logical frames. Compared with the data transmission method based on data packets in related technologies, it has a more uniform data length, which can avoid the problem of poor balance effect caused by large differences in the length of data packets. In addition, data packets within the same logical frame correspond to the same transmission path, which can shield the delay differences of multiple paths to a certain extent, making the out-of-order rate of logical frames lower, thereby reducing the buffering requirements and implementation difficulty for de-out-of-order processing.

[0341] (2) Data flow transformation and load balancing method on IM: The data flow between IM and OM is divided into load balancing flow and de-ordering flow according to function, and the two are decoupled. This can reduce the caching requirements of de-ordering, while realizing load balancing of data flow with coarse-grained combined identifiers, reducing load balancing conflicts on IM, improving load balancing effect, reducing multi-path latency differences, and further reducing the caching requirements of de-ordering. At the same time, the construction of load balancing flow can also be used for load balancing on CM, which greatly reduces the storage space overhead on CM.

[0342] (3) The load balancing method on CM is based on round-robin load balancing of all data streams, which greatly reduces load balancing conflicts on CM, improves load balancing effect, reduces multi-path latency differences, and further reduces the need for deordering cache.

[0343] Figure 7 A schematic diagram of the internal structure of a data transmission device 700 provided in an embodiment of this application is shown. The data transmission device 700 includes a receiving module 710, a determining module 720, and a sending module 730.

[0344] It should be understood that the data transmission device 700 can be used as a data transmission device on the IM side and also as a data transmission device on the OM side.

[0345] Therefore, when the data transmission device 700 is used as the data transmission device on the IM side, the following scheme is implemented:

[0346] The receiving module 710 is used to receive a first data packet, which is the data packet to be transmitted in the logical frame. The first data packet includes a first equalization sequence number field.

[0347] The determination module 720 is used to determine the value corresponding to the first load balancing sequence number field, wherein logical frames with the same logical frame sequence number have different values, and the value is used to indicate that the first data packet is transmitted in a load balancing manner.

[0348] The data transmission device on the IM side can execute various data transmission methods on the IM side. Therefore, the specific execution scheme and effect of the data transmission device on the IM side are similar to the description and effect of the data transmission methods on the IM side, and will not be repeated here.

[0349] When the data transmission device 700 is used as a data transmission device on the OM side, the following scheme is implemented:

[0350] The receiving module 710 is used to receive a first data packet, wherein the first data packet corresponds to a first logical frame and the first data packet corresponds to a destination device.

[0351] The determining module 720 is used to determine the first equalization sequence information corresponding to the first data packet based on the first logical frame and the destination device.

[0352] The sending module 730 is used to send the first data packet, wherein the first data packet contains the first equalization sequence information. The data transmission device on the CM side can execute various data transmission methods on the CM side, so the specific execution scheme and effects of the data transmission device on the CM side are similar to the description and effects of the data transmission methods on the CM side, and will not be repeated here.

[0353] Optionally, when the determining module 720 determines the first equalization sequence information corresponding to the first data packet based on the first logical frame and the destination device, it specifically includes:

[0354] Based on the first logical frame and the destination port of the destination device, determine whether the first data packet is the first packet of the first logical frame;

[0355] Based on the judgment result, the first balanced sequence information corresponding to the first data packet is determined.

[0356] Optionally, when the determining module 720 performs the step of determining whether the first data packet is the first packet of the first logical frame based on the first logical frame and the destination port of the destination device, it specifically includes:

[0357] Based on the first logical frame and the destination port of the destination device, a first identifier of the second data packet is obtained. The second data packet is the preceding data packet of the first data packet when it has the same port-level flow identifier as the first data packet. The first identifier is used to indicate whether the corresponding data packet is the tail packet of the corresponding logical frame. The port-level flow identifier includes: the source port identifier and the destination port identifier of the destination device.

[0358] Based on the first identifier corresponding to the second data packet, determine whether the first data packet is the first packet of the first logical frame.

[0359] Optionally, when the determining module 720 performs the step of obtaining the first identifier of the second data packet based on the first logical frame and the destination port of the destination device, it specifically includes:

[0360] Determine the port-level flow identifier and the first table corresponding to the first data packet in the first logical frame; the first table stores the mapping relationship between the port-level flow identifier and the first identifier of the first transmitted data packet; the first transmitted data packet includes the second data packet;

[0361] Based on the port-level flow identifier, the first identifier corresponding to the second data packet is searched in the first table.

[0362] Optionally, when the determining module 720 performs the step of determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the second data packet, it specifically includes:

[0363] If the first identifier corresponding to the second data packet indicates that the second data packet is the tail packet of the corresponding logical frame, then the first data packet is determined to be the first packet of the first logical frame;

[0364] If the first identifier corresponding to the second data packet indicates that the second data packet is not the tail packet of the corresponding logical frame, then it is determined that the first data packet is not the first packet of the first logical frame.

[0365] Optionally, the data transmission device further includes:

[0366] After determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the second data packet, the first identifier corresponding to the first data packet is determined based on the determination result;

[0367] The first table is updated using the first identifier corresponding to the first data packet.

[0368] Optionally, the first equalization sequence information includes a first equalization sequence number, and the determining module 720, when performing the step of determining the first equalization sequence information corresponding to the first data packet based on the judgment result, specifically includes:

[0369] If the determination result indicates that the first data packet is not the first packet of the first logical frame, then the first equalization sequence number corresponding to the first data packet is determined to be the second equalization sequence number, and the second equalization sequence number is the equalization sequence number in the second data packet;

[0370] If the determination result indicates that the first data packet is the first packet of the first logical frame, then the first equalization sequence number is determined to be the sum of the third equalization sequence number and a preset value, wherein the third equalization sequence number is the equalization sequence number in the third data packet; the third data packet is the preceding data packet of the first data packet when it has the same device-level flow identifier as the first data packet.

[0371] Optionally, the data transmission device, when performing the acquisition of the second equalization sequence number, specifically includes:

[0372] Obtain the port-level flow identifier and the second table corresponding to the first data packet. The port-level flow identifier includes a source port identifier and a destination port identifier. The second table stores the mapping relationship between the port-level flow identifier and the equalization sequence number of the first transmitted data packet. The first transmitted data packet includes the second data packet.

[0373] The second equalization sequence number is searched in the second table based on the port-level flow identifier.

[0374] Optionally, the data transmission device further includes:

[0375] After determining that the first balanced sequence number corresponding to the first data packet is the second balanced sequence number, if it is determined that the first data packet is the tail packet of the first logical frame, then the second balanced sequence number is deleted from the second table.

[0376] Optionally, the data transmission device, when performing the acquisition of the third equalization sequence number, specifically includes:

[0377] Obtain the device-level flow identifier and first mapping relationship information corresponding to the first data packet. The device-level flow identifier includes a destination device identifier. The first mapping relationship information includes a mapping relationship between the destination device identifier and the equalization sequence number of the second transmitted data packet. The second transmitted data packet includes a third data packet.

[0378] The third equalization sequence number is searched in the first mapping relationship information based on the target device identifier.

[0379] Optionally, the data transmission device further includes:

[0380] After determining that the first equalization sequence number is the sum of the third equalization sequence number and a preset value, if it is determined that the first data packet is not the tail packet of the first logical frame, then the second table is updated using the first equalization sequence number.

[0381] Optionally, the data transmission device further includes:

[0382] Before sending the first data packet, the first equalization sequence information is written into the first data packet.

[0383] Optionally, the sending module 730, when performing the sending of the first data packet, specifically includes:

[0384] Based on the first load balancing sequence information, the transmission path of the first data packet is determined according to a preset load balancing method, wherein the preset load balancing method is either a round-robin load balancing method or a congestion-aware load balancing method.

[0385] The first data packet is sent according to the transmission path.

[0386] Figure 8 A schematic diagram of the internal structure of a data transmission device 800 provided in an embodiment of this application is shown. The data transmission device 800 includes a receiving module 810 and a determining module 820.

[0387] It should be understood that the data transmission device 800 can be used as a data transmission device on the CM side.

[0388] Therefore, when the data transmission device 800 is used as the data transmission device on the CM side, the following scheme is implemented:

[0389] The receiving module 810 is used to receive a first data packet, the first data packet containing the first equalization sequence information, the first data packet corresponding to a first logical frame, and the first data packet corresponding to a destination device.

[0390] The determination module 820 is used to determine the first transmission path of the first data packet based on the first logical frame and the destination device.

[0391] Optionally, when determining the first transmission path of the first data packet based on the first logical frame and the destination device, the determining module 820 specifically includes:

[0392] Based on the first logical frame and the destination device, determine whether the first data packet is the first packet of the first logical frame;

[0393] The first transmission path of the first data packet is determined based on the judgment result.

[0394] Optionally, when determining whether the first data packet is the first packet of the first logical frame based on the first logical frame and the destination device, the determining module 820 specifically includes:

[0395] Based on the first logical frame and the destination device, a first identifier of the third data packet is obtained. The third data packet is the preceding data packet of the first data packet when it has the same device-level flow identifier as the first data packet. The first identifier is used to indicate whether the corresponding data packet is the tail packet of the corresponding logical frame. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number.

[0396] Based on the first identifier corresponding to the third data packet, determine whether the first data packet is the first packet of the first logical frame.

[0397] Optionally, when determining the first identifier of the third data packet based on the first logical frame and the destination device, the determining module 820 specifically includes:

[0398] Determine the device-level flow identifier and the third table corresponding to the first data packet in the first logical frame; the third table stores the mapping relationship between the device-level flow identifier and the first identifier of the second transmitted data packet; the second transmitted data packet includes the third data packet;

[0399] Based on the device-level flow identifier, search for the first identifier corresponding to the third data packet in the third table.

[0400] Optionally, when the determining module 820 performs the action of determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the third data packet, it specifically includes:

[0401] If the first identifier corresponding to the third data packet indicates that the third data packet is the tail packet of the corresponding logical frame, then the first data packet is determined to be the first packet of the first logical frame;

[0402] If the first identifier corresponding to the third data packet indicates that the third data packet is not the tail packet of the corresponding logical frame, then it is determined that the first data packet is not the first packet of the first logical frame.

[0403] Optionally, the data transmission device further includes:

[0404] After determining whether the first data packet is the first packet of the first logical frame based on the first identifier corresponding to the third data packet, the first identifier corresponding to the first data packet is determined based on the determination result.

[0405] The third table is updated using the first identifier corresponding to the first data packet.

[0406] Optionally, the first transmission path includes a first transmission path number. When determining the first transmission path of the first data packet based on the judgment result, the determining module 820 specifically includes:

[0407] If the determination result indicates that the first data packet is not the first packet of the first logical frame, then the first transmission path number of the first data packet is determined to be the second transmission path number, and the second transmission path number is the transmission path number of the third data packet.

[0408] If the determination result is that the first data packet is the first packet of the first logical frame, then the first transmission path number is determined to be the sum of the third transmission path number and a preset value, the third transmission path number is the transmission path number corresponding to the fourth data packet, and the fourth data packet has the same system-level flow identifier as the first data packet.

[0409] Optionally, the data transmission device, when performing the acquisition of the second transmission path number, specifically includes:

[0410] Obtain the device-level flow identifier and the fourth table corresponding to the first data packet; the fourth table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet; the second transmitted data packet includes the third data packet;

[0411] Based on the device-level flow identifier, the second transmission path number of the third data packet is searched in the fourth table.

[0412] Optionally, the data transmission device further includes:

[0413] After determining that the first transmission path number of the first data packet is the second transmission path number, if it is determined that the first data packet is the tail packet of the first logical frame, then the second transmission path number is deleted from the fourth table.

[0414] Optionally, the data transmission device, when performing the acquisition of the third transmission path number, specifically includes:

[0415] Obtain the system-level flow identifier and the second mapping relationship information corresponding to the first data packet. The system-level flow identifier includes a destination system identifier. The second mapping relationship information includes the mapping relationship between the system-level flow identifier and the path number of the third transmitted data packet. The third transmitted data packet includes the fourth data packet.

[0416] The third transmission path number is searched in the second mapping relationship information based on the system-level flow identifier.

[0417] Optionally, the data transmission device further includes:

[0418] After determining that the first transmission path number is the sum of the third transmission path number and a preset value, if it is determined that the first data packet is not the tail packet of the first logical frame, then the fourth table is updated using the first transmission path number.

[0419] This application provides a data transmission device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to execute a data transmission method on the IM side, and / or execute a data transmission method on the CM side.

[0420] The data transmission methods provided in the embodiments of this application will be further described below.

[0421] The above method divides the data stream between IM and OM into multiple device-level streams, allowing logical frames with the same logical frame sequence number to have different transmission paths between IM and CM or between CM and OM. However, each device-level stream uses the same balanced sequence number arranged in the same way, and the number of balanced sequence numbers is limited, making hash collisions likely. A hash collision occurs when different indices map to the same storage location, meaning logical frames in different device-level streams map to the same balanced sequence number. In the event of a hash collision, releasing the sequence number too early can lead to different data packets within the same logical frame using different balanced sequence numbers, thus affecting load balancing performance; releasing it too late can lead to exhaustion of balanced sequence number resources and consume a large amount of storage space. Therefore, determining when to release the balanced sequence number is a problem that urgently needs to be solved.

[0422] To address the aforementioned technical problems, the overall inventive concept of this application is to provide a method for reducing the storage space of balanced sequence numbers, applicable to the field of communication networks.

[0423] This application constructs a logical frame structure, such as Figure 9 As shown, the structure of the logical frame, including the logical frame data packets, is described as previously and will not be repeated here. In the event of a hash collision at the storage location corresponding to the value of the first load balancing sequence number field, this application does not release the value stored on the IM, thus ensuring the effectiveness of load balancing. The value stored on the IM is released only after the hash collision ends and the tail packet of the logical frame is assigned the value, avoiding the drawbacks of premature or late release and reducing the storage space overhead of the value.

[0424] Figure 10 A flowchart illustrating a data transmission method for an IM side according to another embodiment of this application is shown. Figure 10 As shown, the data transmission method includes:

[0425] S1010: Receive the first data packet, which is the data packet to be transmitted in the logical frame and includes the first equalization sequence information.

[0426] Optionally, the first equalization sequence number information includes a first equalization sequence number field.

[0427] It should be understood that the description of information such as the first data packet, logical frame, and data stream in S1010 is similar to that in S310, and will not be repeated here.

[0428] S1020. Determine the value corresponding to the first balanced sequence information and the number of first hash collisions, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner.

[0429] It should be understood that each data packet includes a load balancer sequence number field, which is used for load balancing of logical frames. For example... Figure 9 As shown, all data packets within the same logical frame include the balance sequence number of the logical frame in which they reside, and this balance sequence number is the value corresponding to the balance sequence number field.

[0430] In this embodiment, all data packets within a logical frame with the same balanced sequence number correspond to the same transmission path from IM to CM. This application provides a logical frame-based data transmission method, which, compared to related technologies based on data packets, has a more uniform data length, avoiding the problem of poor balanced performance caused by large differences in data packet length. Furthermore, since data packets within the same logical frame correspond to the same transmission path, it can mitigate multi-path latency differences to a certain extent, resulting in a relatively lower out-of-order rate for logical frames.

[0431] It should also be understood that each logical frame is identified by a balancer sequence number, and different logical frames may have the same or different logical frame sequence numbers. However, different logical frames correspond to different balancer sequence numbers.

[0432] Therefore, the load balancing sequence number can be used to decouple load balancing flow and deordered flow. This embodiment performs load balancing of logical frames between IM and CM based on the load balancing sequence number. Even when facing logical frames with the same logical frame sequence number, this application can ensure that data packets in different logical frames with the same logical frame sequence number correspond to different load balancing sequence numbers. Therefore, this embodiment performs load balancing based on the load balancing sequence number, enabling data packets in different logical frames with the same logical frame sequence number to be transmitted via different paths. Compared with related technologies that perform load balancing based on logical frame sequence numbers, this improves the load balancing effect of logical frames between CM.

[0433] In one optional embodiment, source device A (i.e., a certain IM) sends a data stream to destination device B (a certain OM), where destination device B includes ports P1 and P2. Specifically, source device A can send data stream S1 to port P1 of destination device B, and source device A can send data stream S2 to port P2 of destination device B. This embodiment uses a fine-grained combination of [source device, destination port], which allows us to know that data stream S1 and data stream S2 are different data streams. If destination device B receives the first logical frame in data stream S1 first, and then receives the second logical frame in data stream S2, the logical frame sequence number contained in the first logical frame is m1, and the logical frame sequence number contained in the second logical frame is m2. The value of m1 is related to the number of first transmitted logical frames sent from source device A to port P1, and the value of m2 is related to the number of second transmitted logical frames sent from source device A to port P2. m1 and m2 can be the same or different. In this context, the first transmitted logical frame is the logical frame sent to port P1 before the first logical frame is sent in data stream S1, and the second transmitted logical frame is the logical frame sent to port P2 before the second logical frame is sent in data stream S2. For example, if 6 first transmitted logical frames have been sent in data stream S1, then m1 is 7; similarly, if 6 second transmitted logical frames have been sent in data stream S2, then m2 is 7. Or, if 10 second transmitted logical frames have been sent in data stream S2, then m2 is 11.

[0434] As described above, there must be logical frames with the same logical frame sequence number between the two data streams. Moreover, logical frames with the same logical frame sequence number correspond to the same transmission path, which ultimately leads to the two logical frames using the same transmission path between IM and CM, resulting in poor load balancing.

[0435] This application provides a load balancing sequence number, wherein the load balancing sequence number of the first logical frame is different from that of the second logical frame. For example, if the load balancing sequence number of the first logical frame is q1 and the load balancing sequence number of the second logical frame is q2, since the destination device B receives the first logical frame first, q2 is greater than q1. Therefore, this embodiment enables logical frames with the same logical frame sequence number to correspond to different transmission paths, improving the load balancing effect.

[0436] In another optional embodiment, different logical frames from different device-level streams may have the same balanced sequence number. For example, source device A (i.e., a certain IM) sends data stream S1 to destination device B1 (a certain OM) and data stream S2 to destination device B2 (another OM). This embodiment uses a coarse-grained approach with the destination device, which allows us to know that data streams S1 and S2 are different data streams. If destination device B1 receives the first logical frame from data stream S1 and destination device B2 receives the second logical frame from data stream S2, and the first and second logical frames belong to different device-level streams, there is a possibility that they have the same balanced sequence number, for example, both balanced sequence numbers are q. In this case, the two logical frames use the same balanced sequence number, and the first hash collision count is 1.

[0437] S1030. If the release condition is met, release the corresponding value, wherein the release condition is related to the first hash collision count and whether the first data packet is the tail packet of a logical frame.

[0438] Optionally, the release conditions include: the first hash collision count is a preset number, and the first data packet is the tail packet of the corresponding logical frame.

[0439] It should be understood that the preset number of times can be 0, which indicates that there is no hash collision at the storage location corresponding to the value. In this embodiment, "release" is also referred to as "clear".

[0440] In this embodiment of the application, if there is a hash collision at the storage location corresponding to the value of the first load balancing sequence number field, the value is not released, thus ensuring the effectiveness of load balancing. The value is released only after the hash collision ends and the tail packet of the logical frame is assigned the value, avoiding the drawbacks of releasing too early or too late and reducing the storage space overhead of the value.

[0441] In one possible implementation, such as Figure 9 As shown, in addition to logical frame data packets, a logical frame also includes: a logical frame start identifier and a logical frame end identifier; the first identifier includes: a logical frame start identifier and / or a logical frame end identifier.

[0442] For logical frame end markers in Figure 9 The relevant description in [the text], and its [in the text] Figure 2 Similar descriptions exist in other texts, for example:

[0443] The logical frame end identifier is used to indicate the end of the corresponding logical frame. In one optional implementation, such as... Figure 9 As shown, the logical frame also includes a logical frame end flag. For example, the logical frame end flag can take the value 0 or 1. When the logical frame end flag is 1, it means that the logical frame has not ended; when the logical frame end flag is 0, it means that the logical frame has ended.

[0444] It should be understood that since the received data packets change in real time, the value of the logical frame end flag also changes. In other words, when the received data packet is the last data packet of the logical frame, the logical frame end flag is modified to 0; when the received data packet is not the last data packet of the logical frame, the logical frame end flag is kept at 1.

[0445] It should also be understood that when logical frames are transmitted between IM and CM and between CM and OM, the logical frame end identifier included in the logical frame may be carried in a separate signaling packet or in the tail packet of the corresponding logical frame.

[0446] Should Figure 9 The structure of the provided logical frame and Figure 2 Compared to the provided logical frame structure, a logical frame start identifier has been added. The following is an illustrative explanation of the logical frame start identifier:

[0447] The description of the logical frame start identifier is similar to that of the logical frame end identifier, for example:

[0448] The logical frame start identifier is used to identify the start of the corresponding logical frame. In one optional implementation, such as... Figure 9 As shown, the logical frame also includes a logical frame start identifier. For example, the logical frame start identifier can be 0 or 1. When the logical frame end identifier is 1, it indicates that no new logical frame has been received; when the logical frame end identifier is 0, it indicates that a new logical frame has been received.

[0449] It should be understood that the value of the logical frame start flag also changes. In other words, when the received data packet is the first data packet of a logical frame, the logical frame start flag is modified to 0, and when the received data packet is not the first data packet of a logical frame, the logical frame end flag is kept at 1.

[0450] It should also be understood that when logical frames are transmitted between IM and CM and between CM and OM, the logical frame start identifier included in the logical frame can be carried in a separate signaling packet or in the first packet of the corresponding logical frame.

[0451] This embodiment, by adding a logical end identifier and a logical frame start identifier to the logical frame, can determine whether the balanced sequence number field of all data packets in the corresponding logical frame has been written with a value, thereby determining the first hash collision count. It can also determine whether there is a hash collision at the storage location corresponding to the value by using the first hash collision count. If there is no hash collision at the storage location corresponding to the value, and the data packet using the value is the tail packet of the corresponding logical frame, the value is released in time, reducing the storage space overhead of the value.

[0452] It should be noted that, as Figure 9 As shown, the data packet may also include a data packet payload.

[0453] Optionally, the data packet may also include a logical frame sequence number field, a source device identifier field, a destination port identifier field, a destination device identifier field, and a data packet payload. For example, Figure 9 As shown, the logical frame sequence number field is used to identify the logical frame sequence number of the logical frame containing the data packet, and is then used for de-ordering the logical frame. The source device identifier field is used to identify the source device, the destination port identifier field is used to identify the destination port, and the destination device identifier field is used to identify the destination device.

[0454] In other words, a logical frame may include, but is not limited to, the following fields:

[0455] The source device identifier field is the unique identifier of the first device to which the data packet enters.

[0456] The destination port identifier field is a unique identifier for the destination port to which the data packet is forwarded or a unique identifier for the local port of the destination device.

[0457] The destination device identifier field is a unique identifier for forwarding data packets to the destination device.

[0458] The data packet payload is the raw data packet.

[0459] Based on the above embodiments, the technical solution of this application will be described in more detail below with reference to several specific embodiments.

[0460] In one possible embodiment, S1020, determining the value corresponding to the first balanced sequence information and the number of the first hash collision, includes:

[0461] Step 1021: Obtain the first identifier corresponding to the first data packet. The first identifier is used to indicate whether the first data packet is the first packet of the corresponding logical frame.

[0462] As an optional implementation, the port-level flow identifier includes at least one of the source port or the destination port.

[0463] As another optional implementation, the first data packet also includes the logical frame sequence number corresponding to the logical frame it belongs to; the port-level flow identifier also includes the logical frame sequence number.

[0464] Step 1022: Determine the value corresponding to the first balanced sequence information and the number of first hash collisions based on the first identifier.

[0465] In this embodiment of the application, the position of the first data packet in the corresponding logical frame can be accurately identified based on the first identifier corresponding to the first data packet, thereby determining the value of the first balanced sequence number field in the first data packet, which can ensure that the number of first hash collisions is accurately known.

[0466] As a specific embodiment, Figure 11 A flowchart illustrating another data transmission method on the IM side according to another embodiment of this application is shown. In this other data transmission method, the balanced sequence number corresponding to the first data packet is determined based on the logical frame start identifier. Figure 11 As shown, the data transmission method includes:

[0467] S1101. Obtain the first identifier, port-level flow identifier, device-level flow identifier, fifth table and first mapping relationship information set corresponding to the first data packet.

[0468] The first identifier includes a logical frame start identifier. The port-level flow identifier includes at least the destination port; the fifth table stores the mapping relationship between the port-level flow identifier and the corresponding values ​​of the equalization sequence number field of the first transmitted data packet; the first transmitted data packet includes at least the second data packet.

[0469] Optionally, the port-level flow identifier includes the destination port, or the port-level flow identifier includes both the source port and the destination port.

[0470] It should be understood that the fifth table, also known as the balanced sequence number table on the IM, may have the same or different format as Table 2, and this embodiment does not specifically limit it. As an optional implementation, the fifth table may be as shown in Table 5:

[0471] Table 5, Fifth Table

[0472] [Source port, destination port] or [Destination port] Any value between 0 and N … …

[0473] It should be noted that the logical frame sequence number is optional and depends on the specific data transmission situation. Specifically, if the IM cannot guarantee that logical frames of the same data stream identified by [source port, destination port] arrive at the IM's equalization sequence number processing module in sequence according to their logical frame sequence numbers, then the port-level flow identifier needs to include the logical frame sequence number. Conversely, the port-level flow identifier may not include the logical frame sequence number. The aforementioned equalization sequence number processing module is used to mark the logical frames with corresponding equalization sequence numbers.

[0474] The first mapping relationship information set includes the mapping relationship between the device-level flow identifier and the corresponding values ​​of the equalization sequence information of the second transmitted data packet.

[0475] S1102. Determine whether the first identifier indicates that the first data packet is the first packet of the corresponding logical frame.

[0476] It should be understood that in this embodiment, the logical frame start identifier can be used to determine whether the first data packet is the first packet of the corresponding logical frame. If the first data packet is the first packet of the corresponding logical frame, then S103 is executed. If the first data packet is not the first packet of the corresponding logical frame, then S104 is executed.

[0477] S1103. Based on the device-level flow identifier and the first mapping relationship information set, determine the balanced sequence number corresponding to the first data packet.

[0478] It should be understood that the equalization sequence number corresponding to the first data packet is the value corresponding to the first equalization sequence information, and the description of S103 is similar to that of S44, so it will not be repeated here.

[0479] S1104. Based on the port-level flow identifier, find the load balancer sequence number corresponding to the first data packet in the fifth table.

[0480] In one possible implementation, such as Figure 11 As shown, after S1103, this embodiment may execute S1105, or execute S1105 and S1106; or after S1104, this embodiment may execute S1105:

[0481] S1105. Write the equalization sequence number into the first equalization sequence number field of the first data packet.

[0482] It should be understood that the balancer sequence number can be written into the data packet of the first data packet. In other embodiments, the balancer sequence number can also be written into other locations in the first data packet.

[0483] S1106. Write the equalization sequence number into the fifth table.

[0484] Optionally, if the first data packet is the tail packet of the corresponding logical frame, then S1105 can be executed in this embodiment; if the first data packet is not the tail packet of the corresponding logical frame, then S1105 and S1106 can be executed in this embodiment.

[0485] In the above embodiments, the logical frame start identifier can be used to identify whether each data packet is the first packet of the corresponding logical frame, thereby providing the corresponding load balancing sequence number. The load balancing sequence number is used to maintain the same transmission path between IM and CM for all data packets within the same logical frame, while allowing logical frames with different logical frame sequence numbers to correspond to different transmission paths between IM and CM, thus improving the load balancing effect between IM and OM.

[0486] As another specific embodiment Figure 12 A flowchart illustrating another data transmission method on the IM side provided in another embodiment of this application is shown.

[0487] In this embodiment, the balanced sequence number is stored on the IM using a hash index. For example... Figure 12 As shown, the data transmission method includes:

[0488] S1201. Obtain the first identifier, second value and third value corresponding to the first data packet.

[0489] The second value is the value corresponding to the second equilibrium sequence information. The steps for obtaining the second value include:

[0490] Step c11: Obtain the port-level flow identifier and the fifth table corresponding to the first data packet.

[0491] The explanations of port-level flow identifiers and the fifth table have been described above and will not be repeated here.

[0492] It should be understood that when the IM receives the first data packet, it obtains the port-level flow identifier corresponding to the first data packet.

[0493] Step c12: Find the second value in the fifth table based on the port-level flow identifier.

[0494] The third value corresponds to the value in the third equilibrium sequence information. The steps to obtain the third value include:

[0495] Step c21: Obtain the device-level flow identifier and the first mapping relationship information set corresponding to the first data packet. The device-level flow identifier includes the destination device identifier. The first mapping relationship information set includes the mapping relationship between the device-level flow identifier and the value corresponding to the equalization sequence information of the second transmitted data packet. The second transmitted data packet includes at least the third data packet.

[0496] Step c21: Obtain the third value from the first mapping relationship information set based on the device-level flow identifier.

[0497] S1202. Based on the sixth table, find the number of times the storage location corresponding to the value has been used, and determine the number of the first hash collision based on the number of times it has been used.

[0498] It should be understood that the sixth table is also known as the hash map table of balanced sequence numbers.

[0499] As an optional implementation, the sixth table can be as shown in Table 6:

[0500] Table 6, the sixth table

[0501] 0 to L Any value between 0 and N 0, 1, or 2, etc. … … …

[0502] The sixth table can store the mapping relationship between the balancer sequence number and the number of times it has been used, the mapping relationship between the hash value and the balancer sequence number, and the mapping relationship between the hash value, the balancer sequence number, and the number of times it has been used. Among them, the hash value is obtained by hashing the port-level flow identifier (e.g., [source port, destination port] or [destination port]) and is used to store the balancer sequence number. This storage method can reduce the storage overhead of the balancer sequence number.

[0503] The balanced sequence number of the logical frame is stored in the fifth or sixth table. This balanced sequence number is used to mark subsequent data packets of the logical frame with the same balanced sequence number, thereby ensuring that the same logical frame is balanced along the same transmission path between the IM and CM. Since different logical frames entering the IM from the same source port or source device and heading to the same destination port can arrive sequentially, the balanced sequence number of the logical frame can be queried in the fifth table using the source port, destination port or destination port as an index. When the next logical frame of the source port, destination port or destination port arrives, the balanced sequence number processing of the previous logical frame has been completed, and the balanced sequence number corresponding to the port-level flow identifier in the sixth table can be safely updated.

[0504] This embodiment stores the load balancing sequence number on the IM using a hash index, which saves storage space for the load balancing sequence number and enhances the scalability of the load balancing implementation, making it suitable for ultra-large-scale application environments.

[0505] S1203. Determine whether the first identifier indicates that the first data packet is the first packet of the corresponding logical frame.

[0506] It should be understood that if the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, then the following S1204 is executed; if the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, then the following S1206 is executed.

[0507] S1204. Determine whether the first number of conflicts is the preset number.

[0508] If the first condition is met, then execute S1205; if the second condition is met, then execute S126. The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is a preset number. The second condition includes at least one of the following: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is not the preset number; or the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

[0509] S1205. Determine the value corresponding to the first equalization sequence information as the sum of the third value and a preset value. The third value is the value corresponding to the third equalization sequence information in the third data packet.

[0510] The third data packet has the same device-level flow identifier as the first data packet.

[0511] S1206. Determine the value corresponding to the first equilibrium sequence information as the second value.

[0512] In one possible implementation, such as Figure 12 As shown, after determining in S1205 that the value corresponding to the first equilibrium sequence information is the sum of the third value and the preset value, the data transmission method further includes:

[0513] S1207. Update the fifth table using the values ​​corresponding to the first equilibrium sequence information.

[0514] Specifically, if the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the value corresponding to the first balanced sequence information is used to update the fifth table.

[0515] In one possible embodiment, after S1205 or S1206, the data transmission method further includes:

[0516] S1208. Write the corresponding value into the balance sequence information.

[0517] In one possible embodiment, after S1205 or S1206, as Figure 12 As shown, the data transmission method further includes:

[0518] S1209. Based on the value corresponding to the first load balancing sequence information, determine the transmission path of the first data packet according to the preset load balancing method.

[0519] The preset load balancing method is either round-robin load balancing or congestion-aware load balancing.

[0520] S1210. Transmit the first data packet between IM and CM according to the transmission path.

[0521] For example, the IM has two ports, P11 and P12, and the CM has three ports: P21, P22, and P23. There are six transmission paths between the IM and CM: P11-P21, P11-P22, P11-P23, P12-P21, P12-P22, and P12-P23. After writing the load balancing sequence number into the first data packet, if the preset load balancing method is round-robin load balancing, the transmission paths between the IM and CM are polled. When an idle transmission path is determined, the first data packet is sent from the IM to the CM through the idle transmission path.

[0522] During data transmission between IM and CM, this embodiment can automatically adjust the number of uses. In general, this embodiment can determine the first hash collision count based on a first identifier, specifically including:

[0523] Step 10221: Determine the number of times the storage location corresponding to the value is used based on the first identifier.

[0524] It should be understood that the number of uses is related to the reception of data packets from logical frames using the same balanced sequence number. For example, if logical frames 11, 21, and 31 share a single balanced sequence number, and the first packet of logical frame 41 is received, and logical frame 41 also shares the same balanced sequence number, then the usage count for the storage location corresponding to the value of logical frame 41 is incremented by 1. If the last packet of logical frame 11 is subsequently received, the usage count for the storage location corresponding to the value is decremented by 1. If logical frame 41 contains only one data packet, the usage count neither increases nor decreases by 1.

[0525] Step 10222: Determine the first hash collision count based on the number of times the storage location corresponding to the value is used. The first hash collision count is the number of hash collisions at the storage location corresponding to the value.

[0526] It should be understood that a value may be used or not. If it has been used, the first hash collision count is the usage count minus 1. If it has not been used, the first hash collision count is 0.

[0527] For example, if a value is not used, the corresponding usage count is 0, indicating no hash collision. Conversely, if a value is used, the corresponding usage count is 1, 2, or another integer. If the usage count for a storage location corresponding to a value is 1, then the first hash collision count is 0, indicating no hash collision; if the usage count is 2, the first hash collision count is 1; and if the usage count is 3, the first hash collision count is 2.

[0528] In this embodiment, the number of times the value is used corresponding to the storage location can be accurately identified, thereby providing technical support for determining the release time of the value.

[0529] In one possible embodiment, such as Figure 12 As shown, after S1205, the data transmission method further includes:

[0530] S1211. Determine whether the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame.

[0531] If the first identifier indicates that the first data packet is not the tail packet of the corresponding logical frame, then execute S1212. If the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame, then execute S1213.

[0532] S1212. The number of times the storage location corresponding to the value is determined is the sum of the number of times the storage location corresponding to the value has been used and the preset value.

[0533] The step of obtaining the number of times the value has been used at the corresponding storage location includes:

[0534] Retrieve the sixth table and, based on the sixth table, find the number of times the value has been used in the corresponding storage location.

[0535] S1213. Determine the number of times the storage location corresponding to the value is used as the number of times the storage location corresponding to the value has been used.

[0536] Alternatively, after S1204, if the number of collisions is not the preset number, the data transmission method may also include the schemes described in S1211 to S1203.

[0537] Alternatively, after S1203, if the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, then the data transmission method further includes:

[0538] S1214. Determine whether the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame.

[0539] If the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame, then execute S1215; if the first identifier indicates that the first data packet is not the tail packet of the corresponding logical frame, then execute S1216.

[0540] S1215. The number of times the storage location corresponding to the value is determined is the difference between the number of times the storage location corresponding to the value has been used and the preset value.

[0541] S1216. Determine the number of times the storage location corresponding to the value is used as the number of times the storage location corresponding to the value has been used.

[0542] After S1212, determining that the number of times the storage location corresponding to the value is used is the sum of the number of times the storage location has been used and a preset value, or after S1215, determining that the number of times the storage location corresponding to the value is used is the difference between the number of times the storage location has been used and a preset value, the data transmission method further includes:

[0543] S1217. Update the sixth table by using the number of times the value is used to correspond to the storage location.

[0544] Optionally, after determining the number of times the storage location corresponding to the value is used based on the first identifier, updating the sixth table using the number of times the storage location corresponding to the value is used includes:

[0545] When the number of times the storage location corresponding to the value is determined to be the sum of the number of times the storage location corresponding to the value has been used and a preset value, the value corresponding to the first balanced sequence number information and the number of times the storage location corresponding to the value are used are respectively written into the sixth table;

[0546] When the number of times the storage location corresponding to the value is determined to be the difference between the number of times the storage location corresponding to the value has been used and a preset value, if the number of times the storage location corresponding to the value is used is 0, then the sixth table is cleared; if the number of times the storage location corresponding to the value is not 0, then the number of times the storage location corresponding to the value is used is written into the sixth table.

[0547] In other words, the IM performs the following operation every time it receives a data packet:

[0548] Determine whether the received data packet is the first packet of the corresponding logical frame.

[0549] If the received data packet is the first packet of the corresponding logical frame, then the sixth table can be consulted to determine whether the storage location corresponding to the balancer sequence number has been used based on the usage count. If the usage count is 0, it means "unused," and the corresponding balancer sequence number can be written to the storage location corresponding to the balancer sequence number in the sixth table. If the usage count is 1, it means "used" once, and there is no hash collision. If the usage count is 2 or higher, it means there is a hash collision. Different balancer sequence number processing operations exist for the two scenarios of 0 usage count and non-zero usage count, specifically:

[0550] 11) Obtain the sixth table.

[0551] 12) If the number of times the storage location corresponding to the equalization sequence number of the data packet is used in the sixth table is 0, then the storage information of the storage location corresponding to the equalization sequence number of the data packet is determined as the equalization sequence number of the third data packet plus 1.

[0552] In one optional implementation, if the usage count of the equalization sequence number corresponding to the storage location of the data packet in the sixth table is 0, and the data packet is also the tail packet of the corresponding logical frame, then the equalization sequence number incremented by 1 is written into the data packet, and the data packet is forwarded from IM to CM according to the equalization sequence number incremented by 1.

[0553] In another optional implementation, if the usage count of the storage location corresponding to the balanced sequence number of the data packet in the sixth table is 0, and the data packet is not the tail packet of the corresponding logical frame, then the usage count in the sixth table is incremented by 1, and the balanced sequence number and the usage count after incrementing by 1 are written into the sixth table. The balanced sequence number after incrementing by 1 can also be written into the data packet, and the data packet is forwarded from IM to CM according to the balanced sequence number after incrementing by 1.

[0554] 13) If the number of times the storage location corresponding to the balance sequence number of the data packet is used in the sixth table is not 0, then the storage information of the storage location corresponding to the balance sequence number of the data packet is determined as the balance sequence number of the second data packet.

[0555] In one optional implementation, if the number of times the balanced sequence number corresponding to the storage location of the data packet is used in the sixth table is not 0, and the data packet is also the tail packet of the corresponding logical frame, then the balanced sequence number corresponding to the second data packet is written into the data packet, and the data packet is forwarded from IM to CM according to the balanced sequence number corresponding to the second data packet.

[0556] In another optional implementation, if the usage count of the storage location corresponding to the balance sequence number of the data packet in the sixth table is not 0, and the data packet is not the tail packet of the corresponding logical frame, then the usage count in the sixth table is incremented by 1, and the usage count after incrementing by 1 is written into the sixth table. The balance sequence number corresponding to the second data packet can also be written into the data packet, and the data packet is forwarded from IM to CM according to the balance sequence number corresponding to the second data packet.

[0557] If the received data packet is not the first packet of the corresponding logical frame, then the sixth table can be consulted, and the corresponding balancer sequence number can be released if the release condition is met. Furthermore, this embodiment can handle different balancer sequence number processing operations depending on whether the received data packet is the last packet of the corresponding logical frame. Specifically:

[0558] 21) Obtain the sixth table;

[0559] 22) If the usage count of the storage location corresponding to the balance sequence number of the data packet in the sixth table is not 0 (for example, the usage count is 3), and the data packet is also the tail packet of the corresponding logical frame, then the usage count in the sixth table is decremented by 1; if the usage count becomes 0, it means that all the related logical frames (which may be one or more, or multiple in case of hash collision) corresponding to the balance sequence number have passed through the balance sequence number processing module in the IM, then the balance sequence number obtained from the sixth table is written into the data packet and the data packet is forwarded from the IM to the CM, and the balance sequence number corresponding to the data packet in the sixth table is cleared; if the usage count is still greater than 0, it means that not all the related logical frames corresponding to the balance sequence number have passed through the balance sequence number processing module in the IM, the usage count after decrementing by 1 is written into the balance sequence number table, the balance sequence number is written into the data packet, and the data packet is forwarded from the IM to the CM.

[0560] 23) If the data packet is neither the first packet nor the last packet of the corresponding logical frame, then write the equalization sequence number into the data packet and forward the data packet from IM to CM.

[0561] It should be understood that when a hash collision occurs for a certain value, the count of the first hash collision recorded in the sixth table is identified by the logical frame start identifier, and the count of the logical frame end identifier is used to determine whether all hash collisions for that value have ended. For example, when the IM's balanced sequence number processing module receives the first packet of the first logical frame (e.g., indicated by the logical frame start identifier), the sixth table records the balanced sequence number of the first logical frame and records its usage count as 1. Before receiving the last packet of the first logical frame (e.g., indicated by the logical frame end identifier), the IM's balanced sequence number processing module receives the first packet of the second logical frame, and the balanced sequence number of the second logical frame is the same as that of the first logical frame, indicating that a hash collision for that value has occurred. At this time, the usage count corresponding to that value is updated to 2 (i.e., the first hash collision count is 1). When the IM's balanced sequence number processing module receives the last packet of the first logical frame and the last packet of the second logical frame respectively, and does not receive the first packet of a new logical frame, the IM's balanced sequence number processing module clears the balanced sequence number and corresponding usage count of the hash collision that has ended in the sixth table.

[0562] In this embodiment, the logical frame start identifier and logical frame end identifier of a logical frame can be used to determine all data packets in a logical frame that pass through the balanced sequence number processing module in the IM. Therefore, the change in the number of times the storage location corresponding to the value in the sixth table is used can be determined by the logical frame start identifier and / or logical frame end identifier, thereby determining the change in the number of first hash collisions.

[0563] The above is an exemplary description of another load balancing process for data streams identified by port-level flow on the IM. Since the transmission path between IM and OM includes not only the transmission path between IM and CM, but also the transmission path between CM and OM, and the load balancing sequence number can transform data streams identified by [source port, destination port] into data streams identified by [destination device], the following describes another load balancing process for data streams identified by [source device, destination device] on the CM.

[0564] For example, Figure 13 A schematic flowchart of a data transmission method on the CM side according to another embodiment of this application is shown. Figure 13 As shown, the data transmission method includes:

[0565] S1310. Receive the first data packet, which is the data packet to be transmitted in the logical frame. The first data packet includes the value corresponding to the first equalization sequence information.

[0566] S1320, Determine the path number of the first data packet and the number of second hash collisions.

[0567] S1330. If the release condition is met, release the corresponding path number, wherein the release condition is associated with the second hash collision count and whether the first data packet is the tail packet of the logical frame.

[0568] Optionally, the release conditions include: the second hash collision count is a preset number, and the first data packet is the tail packet of the corresponding logical frame.

[0569] It should be understood that the preset number of times can be 0, which is used to indicate that there is no hash collision in the path number.

[0570] Based on the above embodiments, the technical solution of this application will be described in more detail below with reference to several specific embodiments.

[0571] In one possible embodiment, S1320, determining the path number of the first data packet and the second hash collision count, includes:

[0572] Step 1321: Obtain the first identifier corresponding to the first data packet. The first identifier is used to indicate whether the first data packet is the first packet of the corresponding logical frame.

[0573] Step 1322: Determine the path number of the first data packet and the second hash collision count based on the first identifier.

[0574] In this embodiment of the application, the position of the first data packet in the corresponding logical frame can be accurately identified based on the first identifier corresponding to the first data packet, thereby determining the path number and ensuring accurate knowledge of the second hash collision count.

[0575] As a specific embodiment, Figure 14 A flowchart illustrating another data transmission method on the CM side according to another embodiment of this application is shown. In this other data transmission method, the path number corresponding to the first data packet is determined based on the logical frame start identifier. Figure 14 As shown, the data transmission method includes:

[0576] S1401. Obtain the first identifier, device-level flow identifier, system-level flow identifier, seventh table and second mapping relationship information set corresponding to the first data packet.

[0577] The first identifier includes a logical frame start identifier. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number; the seventh table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet; the second transmitted data packet includes at least the third data packet.

[0578] It should be understood that the seventh table, also known as the CM routing table, may have the same or different format as Table 4, and this embodiment does not specifically limit it. As an optional implementation, the seventh table is shown in Table 7:

[0579] Table 7, 7th Table

[0580] [Source device, destination device, load balancer serial number] Any value between 0 and M

[0581] The second mapping relationship information set includes the mapping relationship between device-level flow identifiers and path numbers of third transmitted data packets; the third transmitted data packets include at least the fourth data packet.

[0582] S1402. Determine whether the first identifier indicates that the first data packet is the first packet of the corresponding logical frame.

[0583] If the first data packet is the first packet of the corresponding logical frame, then execute S1402. If the first data packet is not the first packet of the corresponding logical frame, then execute S1404.

[0584] S1403. Based on the system-level flow identifier and the second mapping relationship information set, determine the path number of the first data packet.

[0585] It should be understood that the description of S1403 is similar to that of S64, and will not be repeated here.

[0586] S1404. Based on the device-level flow identifier, find the path number of the first data packet in the seventh table.

[0587] In one possible implementation, such as Figure 14As shown, after S1403, this embodiment may execute S1405, or execute S1405 and S1406; or after S1404, this embodiment may execute S1405:

[0588] S1405. Transmit the first data packet between CM and OM according to the path number of the first data packet.

[0589] S1406. Write the path number of the first data packet into the seventh table.

[0590] Optionally, if the first data packet is the tail packet of the corresponding logical frame, then S1405 can be executed in this embodiment; if the first data packet is not the tail packet of the corresponding logical frame, then S1405 and S1406 can be executed in this embodiment.

[0591] As another specific embodiment Figure 15 A flowchart illustrating another data transmission method on the CM side provided in an embodiment of this application is shown. For example... Figure 15 As shown, the data transmission method includes:

[0592] S1501. Obtain the first identifier corresponding to the first data packet, the path number of the third data packet, and the path number of the fourth data packet.

[0593] The step of obtaining the path number of the third data packet includes:

[0594] Step d11: Obtain the device-level flow identifier and the seventh table corresponding to the first data packet.

[0595] The explanations of the device-level flow identifier and the seventh table have been described above and will not be repeated here.

[0596] Step d12: Find the path number of the third data packet in the seventh table based on the device-level flow identifier.

[0597] The steps to obtain the path number of the fourth data packet include:

[0598] Step d21: Obtain the system-level flow identifier and the second mapping relationship information set corresponding to the first data packet. The system-level flow identifier includes the destination system. The second mapping relationship information set includes the mapping relationship between the device-level flow identifier and the path number of the third transmitted data packet. The third transmitted data packet includes at least the fourth data packet.

[0599] Step d22: Based on the system-level flow identifier, find the path number of the fourth data packet in the second mapping relationship information set.

[0600] S1502. Based on the eighth table, find the number of times the storage location corresponding to the path number of the first data packet has been used, and determine the number of second hash collisions based on the number of uses.

[0601] As an optional implementation, the eighth table can be as shown in Table 8:

[0602] Table 8, the eighth table

[0603]

[0604] The eighth table stores the mapping relationship between path numbers and the number of times they have been used.

[0605] S1503. Determine whether the first identifier indicates that the first data packet is the first packet of the corresponding logical frame.

[0606] It should be understood that if the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, then the following S1504 is executed; if the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, then the following S1506 is executed.

[0607] S1504. Determine whether the second hash collision count is the preset count.

[0608] If the second hash collision count is the preset number, then execute S1505; if the second hash collision count is not the preset number, then execute S1506.

[0609] S1505. Determine the path number of the first data packet as the sum of the path number of the fourth data packet and a preset value.

[0610] The fourth data packet has the same system-level flow identifier as the first data packet.

[0611] It should be understood that the preset value can be 1, 2, 3, etc., and the embodiments of this application do not specifically limit it.

[0612] For example, when the preset value is 1, if it is determined that the first data packet received is the first packet of the corresponding logical frame, then the value after adding 1 to the path number of the third data packet is used as the path number of the first data packet.

[0613] S1506. Determine the path number of the first data packet as the path number of the third data packet.

[0614] In one possible implementation, such as Figure 15 As shown, after determining in S1505 that the path number of the first data packet is the sum of the path number of the fourth data packet and a preset value, the data transmission method further includes:

[0615] S1507. Update the seventh table using the path number of the first data packet.

[0616] Specifically, if the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the path number of the first data packet is used to update the seventh table.

[0617] In one possible embodiment, after S1405 or S1406, the data transmission method further includes:

[0618] S1508. Transmit the first data packet between CM and OM according to the path number of the first data packet.

[0619] During data transmission between CM and OM, this embodiment of the application can automatically adjust the number of uses. In general, this embodiment can determine the second hash collision count based on the first identifier, specifically including:

[0620] Step 13221: Determine the number of times the storage location corresponding to the path number is used based on the first identifier;

[0621] Step 13222: Determine the second hash collision count based on the number of times the storage location corresponding to the path number is used. The second hash collision count is the number of hash collisions at the storage location corresponding to the path number.

[0622] In one possible embodiment, such as Figure 15 As shown, after S1505, the data transmission method further includes:

[0623] S1509. Determine whether the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame.

[0624] If the first identifier indicates that the first data packet is not the tail packet of the corresponding logical frame, then execute S1510. If the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame, then execute S1511.

[0625] S1510. The number of times the storage location corresponding to the path number is used is the sum of the number of times the storage location corresponding to the path number has been used and a preset value.

[0626] The step of obtaining the number of times the storage location corresponding to the path number has been used includes:

[0627] Retrieve the eighth table and, based on the eighth table, find the number of times the value has been used in the corresponding storage location.

[0628] The eighth table stores the mapping relationship between path numbers and the number of times they have been used.

[0629] S1511. Determine the number of times the storage location corresponding to the path number is used as the number of times the storage location corresponding to the path number has been used.

[0630] Alternatively, after S1504, if the number of collisions is not a preset number, the data transmission method may also include the schemes described in S1509 to S1511.

[0631] Alternatively, after S1503, if the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, then the data transmission method further includes:

[0632] S1512. Determine whether the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame.

[0633] If the first identifier indicates that the first data packet is the tail packet of the corresponding logical frame, then execute S1513; if the first identifier indicates that the first data packet is not the tail packet of the corresponding logical frame, then execute S1514.

[0634] S1513. The number of times the storage location corresponding to the path number is used is the difference between the number of times the storage location corresponding to the path number has been used and a preset value.

[0635] S1514. Determine the number of times the storage location corresponding to the path number is used as the number of times the storage location corresponding to the path number has been used.

[0636] After S1510, determining that the number of times the storage location corresponding to the path number is used is the sum of the number of times the storage location corresponding to the path number has been used and a preset value, or after S1513, determining that the number of times the storage location corresponding to the path number is used is the difference between the number of times the storage location corresponding to the path number has been used and a preset value, the data transmission method further includes:

[0637] S1515. Update the eighth table using the number of times the storage location corresponding to the path number is used.

[0638] Optionally, after determining the usage count of the storage location corresponding to the path number based on the first identifier, updating the eighth table using the usage count of the storage location corresponding to the path number includes:

[0639] When the number of times the storage location corresponding to the path number is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value, the path number and the number of times the storage location corresponding to the path number are used are written into the eighth table respectively.

[0640] When the number of times the storage location corresponding to the path number is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value, if the number of times the storage location corresponding to the path number is used is 0, then the eighth table is cleared; if the number of times the storage location corresponding to the path number is not 0, then the number of times the storage location corresponding to the path number is used is written into the eighth table.

[0641] In other words, CM performs the following operation every time it receives a data packet:

[0642] Determine whether the received data packet is the first packet of the corresponding logical frame.

[0643] If the received data packet is the first packet of the corresponding logical frame, then the eighth table can be consulted. The usage count is used to determine if the corresponding path number storage location has been used. If the usage count is 0, it means "unused," and the corresponding path number can be written to the storage location in the eighth table. If the usage count is 1, it means "used" once, and there is no hash collision. If the usage count is 2 or higher, it indicates a hash collision. Different path number processing operations exist for scenarios with 0 and non-zero usage counts, specifically:

[0644] 31) Obtain the eighth table.

[0645] 32) If the storage location corresponding to the path number of the data packet has a usage count of 0 in the eighth table, then the storage information of the storage location corresponding to the path number of the data packet is determined as the path number of the fourth data packet plus 1.

[0646] In one optional implementation, if the path number corresponding to the storage location of the data packet has a usage count of 0 in the eighth table, and the data packet is also the tail packet of the corresponding logical frame, then the data packet is forwarded from CM to OM according to the path number incremented by 1.

[0647] In another optional implementation, if the storage location corresponding to the path number of the data packet has a usage count of 0 in the eighth table, and the data packet is not the tail packet of the corresponding logical frame, then the usage count in the eighth table is incremented by 1, and the incremented path number and the incremented usage count are written into the eighth table. The data packet can also be forwarded from CM to OM according to the incremented path number.

[0648] 33) If the number of times the storage location corresponding to the path number of the data packet is used in the eighth table is not 0, then the storage information of the storage location corresponding to the path number of the data packet is determined as the path number corresponding to the third data packet.

[0649] In one optional implementation, if the storage location corresponding to the path number of the data packet has a usage count that is not 0 in the eighth table, and the data packet is also the tail packet of the corresponding logical frame, then the data packet is forwarded from CM to OM according to the path number corresponding to the third data packet.

[0650] In another optional implementation, if the storage location corresponding to the path number of the data packet has a usage count that is not 0 in the eighth table, and the data packet is not the tail packet of the corresponding logical frame, then the usage count in the eighth table is incremented by 1, and the incremented usage count is written into the eighth table. Alternatively, the data packet can be forwarded from CM to OM according to the path number corresponding to the third data packet.

[0651] If the received data packet is not the first packet of the corresponding logical frame, then the eighth table can be consulted, and the corresponding path number can be released if the release conditions are met. Furthermore, this embodiment can handle different path number processing operations depending on whether the received data packet is the last packet of the corresponding logical frame. Specifically:

[0652] 41) Obtain the eighth table;

[0653] 42) If the usage count of the storage location corresponding to the path number of the data packet in the eighth table is not 0, and the data packet is also the tail packet of the corresponding logical frame, then decrement the usage count in the eighth table by 1; if the usage count becomes 0, it means that all the related logical frames (which may be one or more, or multiple in case of hash collision) corresponding to the path number have passed through the load balancing module in CM, then forward the data packet from CM to OM, and clear the path number corresponding to the data packet in the eighth table; if the usage count is still greater than 0, it means that not all the related logical frames corresponding to the path number have passed through the load balancing module in CM, write the decremented usage count into the eighth table, and forward the data packet from CM to OM.

[0654] 43) If the data packet is neither the first packet nor the last packet of the corresponding logical frame, then the data packet is forwarded from CM to OM.

[0655] It should be understood that the above Figure 11 In the illustrated embodiment, due to hash collisions, multiple logical frames may map to the same balancer sequence number. For CM, when hashing logical frames using the same device-level stream identifier (e.g., [source device, destination device, balancer sequence number]), there may be multiple logical frame start identifiers and logical frame end identifiers.

[0656] Therefore, the eighth table provided by CM records the number of logical frames with the same device-level flow identifier hash index and the same balanced sequence number (i.e., the number of times the storage location corresponding to the value in the sixth table is used).

[0657] Specifically, the data packet enters the load balancing module in the CM. The load balancing module in the CM provides the next path number for the first packet of the new logical frame and forwards the first packet between the CM and the OM according to the next path number. It provides the next path number corresponding to the first packet of the new logical frame for subsequent data packets of the new logical frame and forwards the subsequent data packets according to the same path number, ensuring that all data packets in the same logical frame correspond to the same transmission path between the CM and the OM.

[0658] If the received data packet is the first packet of a new logical frame, then the usage count in the eighth table can be determined. If the usage count indicates that it has not been used, the path number corresponding to the data packet can be updated to the next path number. If the usage count indicates that it has been used, it means that there is at least one logical frame indexed by the same device-level flow identifier hash. All data packets in the logical frame can be forwarded according to the path number provided in the eighth table.

[0659] The above is an exemplary description of another load balancing method on IM and CM. It should be understood that because the multi-path load balancing provided by related technologies can lead to logical frame out-of-order delivery, on OM, these technologies de-order frames based on their logical frame sequence numbers. Due to severe load balancing conflicts, these related technologies increase latency and latency differences during the load balancing process, making de-ordering on OM more difficult.

[0660] Therefore, in other embodiments, based on the above-described alternative load balancing on IM and CM, when CM sends a logical frame to OM, OM deorders the logical frame based on the logical frame sequence number and forwards the data packets included in the logical frame.

[0661] On the OM (Order Frame), based on the de-outordered flow, the OM treats data packets within the preset logical frame's rated data length range of the same data stream as a single logical frame. The logical frame sequence number of each data stream increments, and data packets within the same logical frame are identified by the same logical frame sequence number. The logical frame sequence number is used to rearrange out-of-order logical frames on the OM.

[0662] The exemplary embodiments provided in this application have the following effects:

[0663] This application embodiment determines the first hash collision count on the IM side using a logical frame end identifier and a logical frame start identifier, thereby saving storage space for balanced sequence numbers while reducing the impact of hash collisions. Similarly, this application embodiment determines the second hash collision count on the CM side using a logical frame end identifier and a logical frame start identifier, thereby saving storage space for path numbers while reducing the impact of hash collisions.

[0664] The data transmission methods of the various exemplary embodiments provided in this application can be applied not only to traditional network devices such as routers and switches, but also to application scenarios such as distributed decoupling devices and multi-switching devices in data center networks (DCNs). The embodiments of this application do not impose any special limitations.

[0665] Figure 16 A schematic diagram of the internal structure of another data transmission device 1600 provided in an embodiment of this application is shown. For example... Figure 16As shown, the data transmission device 1600 includes a receiving module 1610, a determining module 1620, and a releasing module 1630.

[0666] It should be understood that the data transmission device 1600 can be used as a data transmission device on the IM side and also as a data transmission device on the OM side.

[0667] Therefore, when the data transmission device 1600 is used as the data transmission device on the IM side, the following scheme is implemented:

[0668] The receiving module 1610 is used to receive a first data packet, which is the data packet to be transmitted in the logical frame and includes first equalization sequence information.

[0669] The determining module 1620 is used to determine the value corresponding to the first balanced sequence information and the number of first hash collisions, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner.

[0670] Release module 1630 is used to release the corresponding value when a release condition is met, wherein the release condition is associated with the first hash collision count and whether the first data packet is the tail packet of the logical frame.

[0671] Optionally, the determining module 1620, when determining the value corresponding to the first balanced sequence information and the number of first hash collisions, specifically includes:

[0672] Obtain the first identifier corresponding to the first data packet, wherein the first identifier is used to indicate whether the first data packet is the first packet of the corresponding logical frame;

[0673] Based on the first identifier, determine the value corresponding to the first balanced sequence information and the number of first hash collisions.

[0674] Optionally, the logical frame further includes: a logical frame start identifier and a logical frame end identifier;

[0675] The first identifier includes: the logical frame start identifier and / or the logical frame end identifier.

[0676] Optionally, when the determining module 1620 determines the value corresponding to the first equalization sequence information based on the first identifier, it specifically includes:

[0677] If the first condition is met, the value corresponding to the first equalization sequence information is determined to be the sum of the third value and the preset value, wherein the third value is the value corresponding to the third equalization sequence information in the third data packet; the third data packet and the first data packet have the same device-level flow identifier;

[0678] If the second condition is met, then the value corresponding to the first balanced sequence information is determined to be the second value;

[0679] The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is a preset number;

[0680] The second condition includes at least one of the following:

[0681] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is not the preset count;

[0682] The first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

[0683] Optionally, the data transmission device is further configured to:

[0684] Obtain the port-level flow identifier and the fifth table corresponding to the first data packet. The port-level flow identifier includes at least the destination port identifier. The fifth table stores the mapping relationship between the port-level flow identifier and the value corresponding to the equalization sequence information of the first transmitted data packet. The first transmitted data packet includes at least the second data packet.

[0685] The second value is obtained from the fifth table based on the port-level flow identifier.

[0686] Optionally, the data transmission device is further configured to:

[0687] Obtain the device-level flow identifier and the first mapping relationship information set corresponding to the first data packet. The device-level flow identifier includes a destination device identifier. The first mapping relationship information set includes the mapping relationship between the device-level flow identifier and the value corresponding to the equalization sequence information of the second transmitted data packet. The second transmitted data packet includes at least a third data packet.

[0688] The third value is obtained from the first mapping relationship information set based on the device-level flow identifier.

[0689] Optionally, the data transmission device is also used for:

[0690] After determining that the value corresponding to the first equalization sequence information is the sum of the third value and the preset value, if the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the value corresponding to the first equalization sequence information is used to update the fifth table.

[0691] Optionally, the data transmission device is also used for:

[0692] After determining the value corresponding to the first equalization sequence information, the corresponding value is written into the equalization sequence information.

[0693] Optionally, when the determining module 1620 determines the first hash collision count based on the first identifier, it specifically includes:

[0694] Based on the first identifier, determine the number of times the storage location corresponding to the value is used;

[0695] The first hash collision count is determined based on the number of times the storage location corresponding to the value is used; the first hash collision count is the number of hash collisions at the storage location corresponding to the value.

[0696] Optionally, when the determining module 1620 determines the number of times the storage location corresponding to the value is used based on the first identifier, it specifically includes:

[0697] If the third condition is met, then the number of times the storage location corresponding to the value is used is determined to be the sum of the number of times the storage location corresponding to the value has been used and the preset value;

[0698] If the fourth condition is met, then the number of times the storage location corresponding to the value is used is determined to be the number of times the storage location corresponding to the value has been used.

[0699] If the fifth condition is met, then the number of times the storage location corresponding to the value is used is determined to be the difference between the number of times the storage location corresponding to the value has been used and the preset value.

[0700] The third condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame;

[0701] The fifth condition includes: the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is the last packet of the corresponding logical frame;

[0702] The fourth condition includes at least one of the following:

[0703] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and also indicates that the first data packet is the last packet of the corresponding logical frame;

[0704] If the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame.

[0705] Optionally, the data transmission device is further configured to:

[0706] Obtain the sixth table; the sixth table stores the mapping relationship between the value and the number of times the value has been used in the corresponding storage location;

[0707] The sixth table is used to obtain the number of times the storage location corresponding to the value has been used.

[0708] Optionally, the data transmission device is further configured to:

[0709] If it is determined that the number of times the storage location corresponding to the value is used is the sum of the number of times the storage location corresponding to the value has been used and a preset value, or if it is determined that the number of times the storage location corresponding to the value is used is the difference between the number of times the storage location corresponding to the value has been used and a preset value, after determining the number of times the storage location corresponding to the value is used according to the first identifier, the sixth table is updated with the number of times the storage location corresponding to the value is used.

[0710] Optionally, when the data transmission device updates the sixth table using the number of times the value is used corresponding to the storage location, it specifically includes:

[0711] When the number of times the storage location corresponding to the value is determined to be the sum of the number of times the storage location corresponding to the value has been used and a preset value, the value corresponding to the first balanced sequence number information and the number of times the storage location corresponding to the value are used are respectively written into the sixth table;

[0712] When the number of times the storage location corresponding to the value is determined to be the difference between the number of times the storage location corresponding to the value has been used and a preset value, if the number of times the storage location corresponding to the value is used is 0, then the sixth table is cleared; if the number of times the storage location corresponding to the value is not 0, then the number of times the storage location corresponding to the value is used is written into the sixth table.

[0713] Optionally, the data transmission device is also used for:

[0714] After determining the value corresponding to the first load balancing sequence information, the transmission path of the first data packet is determined based on the value corresponding to the first load balancing sequence information according to a preset load balancing method, wherein the preset load balancing method is either a round-robin load balancing method or a congestion-aware load balancing method.

[0715] The first data packet is transmitted according to the transmission path.

[0716] The data transmission device on the IM side can execute various data transmission methods on the IM side. Therefore, the specific execution scheme and effect of the data transmission device on the IM side are similar to the description and effect of the data transmission methods on the IM side, and will not be repeated here.

[0717] When the data transmission device 1600 is used as a data transmission device on the CM side, the following scheme is implemented:

[0718] The receiving module 1610 is used to receive a first data packet, which is the data packet to be transmitted in the logical frame. The first data packet includes the value corresponding to the first equalization sequence information.

[0719] The determination module 1620 is used to determine the path number of the first data packet and the number of second hash collisions.

[0720] Release module 1630 is used to release the corresponding path number when a release condition is met, wherein the release condition is associated with the second hash collision count and whether the first data packet is the tail packet of the logical frame.

[0721] Optionally, the determining module 1620, when determining the path number of the first data packet and the second hash collision count, specifically includes:

[0722] Obtain the first identifier corresponding to the first data packet, the first identifier being used to indicate whether the first data packet is the first packet of the corresponding logical frame;

[0723] Based on the first identifier, the path number of the first data packet and the second hash collision count are determined.

[0724] Optionally, when the determining module 1620 determines the path number of the first data packet based on the first identifier, it specifically includes:

[0725] If the first condition is met, the path number of the first data packet is determined to be the sum of the path number of the fourth data packet and a preset value; the fourth data packet and the first data packet have the same system-level flow identifier.

[0726] If the second condition is met, then the path number of the first data packet is determined to be the path number of the third data packet;

[0727] The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the second hash collision count is a preset number;

[0728] The second condition includes at least one of the following:

[0729] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the second hash collision count of the second data packet is not the preset count;

[0730] The first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

[0731] Optionally, the data transmission device is further configured to:

[0732] Obtain the device-level flow identifier and the seventh table corresponding to the first data packet. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number. The seventh table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet. The second transmitted data packet includes at least the third data packet.

[0733] The path number of the third data packet is found in the seventh table based on the device-level flow identifier.

[0734] Optionally, the data transmission device is further configured to:

[0735] Obtain the system-level flow identifier and the second mapping relationship information set corresponding to the first data packet. The system-level flow identifier includes a destination system identifier. The second mapping relationship information set includes the mapping relationship between the device-level flow identifier and the path number of the third transmitted data packet. The third transmitted data packet includes at least the fourth data packet.

[0736] The path number of the fourth data packet is searched in the second mapping relationship information set based on the system-level flow identifier.

[0737] Optionally, the data transmission device is further configured to:

[0738] After determining that the path number of the first data packet is the sum of the path number of the fourth data packet and a preset value, if the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the path number of the first data packet is used to update the seventh table.

[0739] Optionally, when the determining module 1620 determines the second hash collision count based on the first identifier, it specifically includes:

[0740] Based on the first identifier, determine the number of times the storage location corresponding to the path number is used;

[0741] The second hash collision count is determined based on the number of times the storage location corresponding to the path number is used; the second hash collision count is the number of hash collisions at the storage location corresponding to the path number.

[0742] Optionally, when the determining module 1620 performs the step of determining the number of times the storage location corresponding to the path number is used based on the first identifier, it specifically includes:

[0743] If the third condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value.

[0744] If the fourth condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the number of times the storage location corresponding to the path number has been used.

[0745] If the fifth condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value.

[0746] The third condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame;

[0747] The fifth condition includes: the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is the last packet of the corresponding logical frame;

[0748] The fourth condition includes at least one of the following:

[0749] The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and also indicates that the first data packet is the last packet of the corresponding logical frame;

[0750] If the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame.

[0751] Optionally, the data transmission device is further configured to:

[0752] Obtain the eighth table; the eighth table stores the mapping relationship between the path number and the number of times the path number has been used and the corresponding storage location.

[0753] The eighth table is used to find the number of times the storage location corresponding to the path number has been used.

[0754] Optionally, the data transmission device is further configured to:

[0755] After determining that the number of times the storage location corresponding to the path number is used is the sum of the number of times the storage location corresponding to the path number has been used and a preset value, or after determining that the number of times the storage location corresponding to the path number is used is the difference between the number of times the storage location corresponding to the path number has been used and a preset value, the eighth table is updated using the number of times the storage location corresponding to the path number is used.

[0756] Optionally, after determining the number of times the storage location corresponding to the path number is used based on the first identifier, the data transmission device, when updating the eighth table using the number of times the storage location corresponding to the path number is used, specifically includes:

[0757] When the number of times the storage location corresponding to the path number is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value, the path number and the number of times the storage location corresponding to the path number are used are written into the eighth table respectively.

[0758] When the number of times the storage location corresponding to the path number is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value, if the number of times the storage location corresponding to the path number is used is 0, then the eighth table is cleared; if the number of times the storage location corresponding to the path number is not 0, then the number of times the storage location corresponding to the path number is used is written into the eighth table.

[0759] The data transmission device on the CM side can execute various data transmission methods on the CM side. Therefore, the specific execution scheme and effect of the data transmission device on the CM side are similar to the description and effect of the data transmission methods on the CM side, and will not be repeated here.

[0760] Figure 17 A schematic diagram of the internal structure of the data transmission device 1700 on the IM side provided in an embodiment of this application is shown. Figure 17 As shown, the data transmission device 1700 on the IM side includes a logic frame processing module 1701, a balanced sequence number processing module 1702, a load balancing module 1703 in the IM, and an IM queue module 1704.

[0761] In this embodiment, the data transmission device 1700 can perform... Figure 11 or Figure 12 The provided IM-side data transmission method includes a balanced sequence number processing module 1702 that executes some or all of the methods described in the IM-side embodiments.

[0762] In one specific embodiment, combined with Figure 17 The internal structure of the provided data transmission device 1700, and the IM's processing flow for data packets from the network are as follows:

[0763] Data packets from different source ports enter the logical frame processing module 1701. The logical frame processing module 1701 is used to mark the received data packets with relevant identification information of logical frames (e.g., relevant identification fields), including: logical frame start identifier, logical frame end identifier, logical frame sequence number, etc., so that one or more data packets can be marked as a logical frame.

[0764] The logical frame processing module 1701 treats data packets with the same format, such as [source port, destination port] or [source device, destination port], as a data stream. For any data stream, data packets arriving at the logical frame processing module 1701 within each rated data length range (the specific length is not limited and can be selected according to actual needs, such as 2KB, 4KB, 8KB, 16KB) are regarded as data packets within a logical frame. Data packets within each logical frame are identified by the same logical frame sequence number, and the logical frame sequence number is incremented. Optionally, the first packet of the logical frame marks the start of the logical frame, and the last packet of the logical frame marks the end of the logical frame.

[0765] like Figure 17 As shown, data packets marked with relevant identification information of logical frames (e.g., relevant identification fields) enter the equalization sequence number processing module 1702. The equalization sequence number processing module 1702 is used to mark all data packets in the logical frame with the equalization sequence number of the logical frame. The value of the equalization sequence number is incremented according to each [source device, destination device] logical frame passing through the module.

[0766] For the first packet of an incoming logical frame, the equalization sequence number processing module 1702 determines that the logical frame containing the data packet is a new logical frame based on the logical frame start identifier, determines the destination device corresponding to the destination port of the data packet, and then increments the corresponding equalization sequence number by 1.

[0767] Continue to refer to Figure 17 The data packet enters the load balancing module 1703 in the IM. The load balancing module 1703 performs load balancing based on the load balancing sequence number of the data packet and then enters the IM queue module 1704 to wait for it to be sent to the CM. In one embodiment, the load balancing module 1703 in the IM can select and switch the transmission path between the IM and the CM based on the congestion status feedback of the IM queue module 1704.

[0768] Figure 18 A schematic diagram of the internal structure of the data transmission device 1800 on the CM side provided in an embodiment of this application is shown. Figure 18 As shown, the data transmission device 1800 on the CM side includes a load balancing module 1801 and a CM queue module 1802 in the CM.

[0769] In this embodiment, the data transmission device 1800 can perform... Figure 14 or Figure 15 The provided data transmission method on the CM side. The load balancing module 1801 in the CM is used to execute some or all of the above-described CM-side method embodiments to perform load balancing on the received data packets and update the seventh or eighth table accordingly.

[0770] In one specific embodiment, combined with Figure 18 The internal structure of the provided data transmission device 1800, and the processing flow of the CM for data packets from the IM are as follows:

[0771] Data packets from the same IM or different IMs enter the load balancing module 1801 in the CM. The load balancing module 1801 in the CM balances each new logical frame to the next path number corresponding to the path number of the previous logical frame. In one embodiment, load balancing can be performed using a balancing sequence number. Specifically, the load balancing module 1801 in the CM provides the next path number for the first packet of the new logical frame and forwards the first packet between the CM and OM according to the next path number. It also provides the next path number corresponding to the first packet of the new logical frame for subsequent data packets of the new logical frame and forwards the subsequent data packets according to the same path number, ensuring that all data packets within the same logical frame correspond to the same transmission path between the CM and OM.

[0772] Optionally, based on the load balancing decision of the load balancing module 1801 in the CM, the data packet enters the CM queue module 1802 to wait for delivery to the OM. In one embodiment, the load balancing module 1801 in the CM can select a switching path number based on the congestion status feedback of the CM queue module 1802.

[0773] This application provides a data transmission device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to execute a data transmission method on the IM side, and / or execute a data transmission method on the CM side.

[0774] For example, Figure 19 A block diagram of a data transmission device 1900 provided in an embodiment of this application is shown. For example... Figure 19 As shown, the data transmission device 1900 includes a processor 1901 and a transceiver 1902. The transceiver 1902 is used to perform the IM or OM transmission and reception operations in the above method embodiments under the control of the processor 1901.

[0775] Optionally, the data transmission device 1900 may also include a memory 1903, a communication bus 1904, and a communication interface 1905.

[0776] The processor 1901 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.

[0777] The communication bus 1904 may include a path for transmitting information between the aforementioned components.

[0778] Memory 1903 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 1903 may exist independently and be connected to processor 1901 via communication bus 1904. Memory 1903 may also be integrated with processor 1901.

[0779] The memory 1903 stores program code for executing the scheme of this application, and its execution is controlled by the processor 1901. The processor 1901 executes the program code stored in the memory 1903. The program code may include one or more software modules. These one or more software modules may be the determining modules provided in the above embodiments.

[0780] The communication interface 1905 uses transceiver 1902 to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.

[0781] In a specific implementation, as one example, the data transmission device may include multiple processors. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used for processing data (e.g., executing instructions by a computer).

[0782] It should be noted that the data transmission device 1900 provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0783] This application also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a data transmission method described in the above embodiments.

[0784] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0785] This application also provides a computer program product, which, when invoked by a computer, causes the computer to execute a data transmission method described in the above embodiments.

[0786] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, devices, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0787] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, devices, and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0788] These computer-executable instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0789] These computer-executable instructions may also be loaded onto a computer or other programmable data processing equipment, causing a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0790] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. Therefore, the specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this application should be included within the scope of protection of this application.

Claims

1. A data transmission method, characterized in that, include: Receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes first equalization sequence information; Determine the value corresponding to the first load balancing sequence information and the number of first hash collisions, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner; If the release condition is met, the corresponding value is released, wherein the release condition is associated with the first hash collision count and whether the first data packet is the tail packet of the logical frame.

2. The method according to claim 1, characterized in that, Determining the value corresponding to the first balanced sequence information and the number of the first hash collision includes: Obtain the first identifier corresponding to the first data packet, the first identifier being used to indicate whether the first data packet is the first packet of the corresponding logical frame; Based on the first identifier, determine the value corresponding to the first balanced sequence information and the number of first hash collisions.

3. The method according to claim 2, characterized in that, The logical frame further includes: a logical frame start identifier and a logical frame end identifier; The first identifier includes: the logical frame start identifier and / or the logical frame end identifier.

4. The method according to claim 2, characterized in that, The step of determining the value corresponding to the first equalization sequence information based on the first identifier includes: If the first condition is met, the value corresponding to the first equalization sequence information is determined to be the sum of the third value and the preset value, wherein the third value is the value corresponding to the third equalization sequence information in the third data packet; the third data packet and the first data packet have the same device-level flow identifier; If the second condition is met, then the value corresponding to the first balanced sequence information is determined to be the second value; The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is a preset number; The second condition includes at least one of the following: The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash collision count is not the preset count; The first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

5. The method according to claim 4, characterized in that, The method further includes: Obtain the port-level flow identifier and the fifth table corresponding to the first data packet. The port-level flow identifier includes at least the destination port identifier. The fifth table stores the mapping relationship between the port-level flow identifier and the value corresponding to the equalization sequence information of the first transmitted data packet. The first transmitted data packet includes at least the second data packet. The second value is obtained from the fifth table based on the port-level flow identifier.

6. The method according to claim 4, characterized in that, The method further includes: Obtain the device-level flow identifier and the first mapping relationship information set corresponding to the first data packet. The device-level flow identifier includes a destination device identifier. The first mapping relationship information set includes the mapping relationship between the device-level flow identifier and the value corresponding to the equalization sequence information of the second transmitted data packet. The second transmitted data packet includes at least a third data packet. The third value is obtained from the first mapping relationship information set based on the device-level flow identifier.

7. The method according to claim 6, characterized in that, After determining that the value corresponding to the first equalization sequence information is the sum of the third value and a preset value, the method further includes: If the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the value corresponding to the first equalization sequence information is used to update the fifth table.

8. The method according to claim 1, characterized in that, After determining the value corresponding to the first equalization sequence information, the method further includes: The corresponding values ​​are written into the balanced sequence information.

9. The method according to claim 2, characterized in that, Based on the first identifier, the number of the first hash collision is determined, including: Based on the first identifier, determine the number of times the storage location corresponding to the value is used; The first hash collision count is determined based on the number of times the storage location corresponding to the value is used; the first hash collision count is the number of hash collisions at the storage location corresponding to the value.

10. The method according to claim 9, characterized in that, Determining the number of times the storage location corresponding to the value is used based on the first identifier includes: If the third condition is met, then the number of times the storage location corresponding to the value is used is determined to be the sum of the number of times the storage location corresponding to the value has been used and the preset value; If the fourth condition is met, then the number of times the storage location corresponding to the value is used is determined to be the number of times the storage location corresponding to the value has been used. If the fifth condition is met, then the number of times the storage location corresponding to the value is used is determined to be the difference between the number of times the storage location corresponding to the value has been used and the preset value. The third condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame; The fifth condition includes: the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is the last packet of the corresponding logical frame; The fourth condition includes at least one of the following: The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and also indicates that the first data packet is the last packet of the corresponding logical frame; If the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame.

11. The method according to claim 10, characterized in that, The method further includes: Obtain the sixth table; the sixth table stores the mapping relationship between the value and the number of times the value has been used in the corresponding storage location; The sixth table is used to obtain the number of times the storage location corresponding to the value has been used.

12. The method according to claim 11, characterized in that, If the number of times the storage location corresponding to the value is determined to be the sum of the number of times the storage location corresponding to the value has been used and a preset value, or if the number of times the storage location corresponding to the value is determined to be the difference between the number of times the storage location corresponding to the value has been used and a preset value, after determining the number of times the storage location corresponding to the value is determined according to the first identifier, the method further includes: The sixth table is updated using the number of times the value corresponds to the storage location.

13. The method according to claim 12, characterized in that, Updating the sixth table using the usage count of the storage location corresponding to the value includes: When the number of times the storage location corresponding to the value is determined to be the sum of the number of times the storage location corresponding to the value has been used and a preset value, the value corresponding to the first balanced sequence information and the number of times the storage location corresponding to the value are used are respectively written into the sixth table; When the number of times the storage location corresponding to the value is determined to be the difference between the number of times the storage location corresponding to the value has been used and a preset value, if the number of times the storage location corresponding to the value is used is 0, then the sixth table is cleared; if the number of times the storage location corresponding to the value is not 0, then the number of times the storage location corresponding to the value is used is written into the sixth table.

14. The method according to any one of claims 1-13, characterized in that, After determining the value corresponding to the first equalization sequence information, the method further includes: Based on the value corresponding to the first load balancing sequence information, the transmission path of the first data packet is determined according to a preset load balancing method, wherein the preset load balancing method is either a round-robin load balancing method or a congestion-aware load balancing method. The first data packet is transmitted according to the transmission path.

15. A data transmission method, characterized in that, include: Receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes the value corresponding to the first equalization sequence information; Determine the path number of the first data packet and the second hash collision count; If the release condition is met, the corresponding path number is released, wherein the release condition is associated with the second hash collision count and whether the first data packet is the tail packet of the logical frame.

16. The method according to claim 15, characterized in that, Determining the path number of the first data packet and the second hash collision count includes: Obtain the first identifier corresponding to the first data packet, the first identifier being used to indicate whether the first data packet is the first packet of the corresponding logical frame; Based on the first identifier, the path number of the first data packet and the second hash collision count are determined.

17. The method according to claim 16, characterized in that, Based on the first identifier, the path number of the first data packet is determined, including: If the first condition is met, the path number of the first data packet is determined to be the sum of the path number of the fourth data packet and a preset value; the fourth data packet and the first data packet have the same system-level flow identifier. If the second condition is met, then the path number of the first data packet is determined to be the path number of the third data packet; The first condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the second hash collision count is a preset number; The second condition includes at least one of the following: The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the second hash collision count is not the preset count; The first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

18. The method according to claim 17, characterized in that, The method further includes: Obtain the device-level flow identifier and the seventh table corresponding to the first data packet. The device-level flow identifier includes: source device identifier, destination device identifier, and equalization sequence number. The seventh table stores the mapping relationship between the device-level flow identifier and the path number of the second transmitted data packet. The second transmitted data packet includes at least the third data packet. The path number of the third data packet is found in the seventh table based on the device-level flow identifier.

19. The method according to claim 17, characterized in that, The method further includes: Obtain the system-level flow identifier and the second mapping relationship information set corresponding to the first data packet. The system-level flow identifier includes a destination system identifier. The second mapping relationship information set includes the mapping relationship between the system-level flow identifier and the path number of the third transmitted data packet. The third transmitted data packet includes at least the fourth data packet. The path number of the fourth data packet is searched in the second mapping relationship information set based on the system-level flow identifier.

20. The method according to claim 18, characterized in that, After determining that the path number of the first data packet is the sum of the path number of the fourth data packet and a preset value, the method further includes: If the first identifier corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, then the path number of the first data packet is used to update the seventh table.

21. The method according to claim 16, characterized in that, Based on the first identifier, the second hash collision count is determined, including: Based on the first identifier, determine the number of times the storage location corresponding to the path number is used; The second hash collision count is determined based on the number of times the storage location corresponding to the path number is used; the second hash collision count is the number of hash collisions at the storage location corresponding to the path number.

22. The method according to claim 21, characterized in that, The step of determining the number of times the storage location corresponding to the path number is used based on the first identifier includes: If the third condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value. If the fourth condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the number of times the storage location corresponding to the path number has been used. If the fifth condition is met, then the number of times the storage location corresponding to the path number is used is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value. The third condition includes: the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame; The fifth condition includes: the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is the last packet of the corresponding logical frame; The fourth condition includes at least one of the following: The first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and also indicates that the first data packet is the last packet of the corresponding logical frame; If the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, and indicates that the first data packet is not the last packet of the corresponding logical frame.

23. The method according to claim 21, characterized in that, The method further includes: Obtain the eighth table; the eighth table stores the mapping relationship between the path number and the number of times the path number has been used and the corresponding storage location. The eighth table is used to find the number of times the storage location corresponding to the path number has been used.

24. The method according to claim 23, characterized in that, After determining that the number of times the storage location corresponding to the path number is used is the sum of the number of times the storage location corresponding to the path number has been used and a preset value, or after determining that the number of times the storage location corresponding to the path number is used is the difference between the number of times the storage location corresponding to the path number has been used and a preset value, the method further includes: The eighth table is updated based on the number of times the storage location corresponding to the path number is used.

25. The method according to claim 24, characterized in that, After determining the usage count of the storage location corresponding to the path number based on the first identifier, updating the eighth table using the usage count of the storage location corresponding to the path number includes: When the number of times the storage location corresponding to the path number is determined to be the sum of the number of times the storage location corresponding to the path number has been used and a preset value, the path number and the number of times the storage location corresponding to the path number are used are written into the eighth table respectively. When the number of times the storage location corresponding to the path number is determined to be the difference between the number of times the storage location corresponding to the path number has been used and a preset value, if the number of times the storage location corresponding to the path number is used is 0, then the eighth table is cleared; if the number of times the storage location corresponding to the path number is not 0, then the number of times the storage location corresponding to the path number is used is written into the eighth table.

26. A data transmission device, characterized in that, include: The receiving module is used to receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes first equalization sequence information; The determining module is used to determine the value corresponding to the first balanced sequence information and the number of first hash collisions, wherein the value is used to indicate that the first data packet is transmitted in a load balancing manner; The release module is used to release the corresponding value when a release condition is met, wherein the release condition is associated with the first hash collision count and whether the first data packet is the tail packet of the logical frame.

27. A data transmission device, characterized in that, include: The receiving module is used to receive a first data packet, which is the data packet to be transmitted in the logical frame, and the first data packet includes the value corresponding to the first equalization sequence information. The determination module is used to determine the path number of the first data packet and the second hash collision count; A release module is used to release the corresponding path number when a release condition is met, wherein the release condition is associated with the second hash collision count and whether the first data packet is the tail packet of the logical frame.

28. A data transmission device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the data transmission method as described in any one of claims 1 to 14, and / or to perform the data transmission method as described in any one of claims 15 to 25.

29. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the data transmission method as described in any one of claims 1 to 14, and / or performs the data transmission method as described in any one of claims 15 to 25.

Citation Information

Patent Citations

  • Multi-core load balancing cooperative processing method and device and storage medium

    CN114006863A

  • Load balancing method and device of server, storage medium and terminal

    CN114968562A