Data transmission method, device, equipment and product

By determining the release time of the load balancing sequence number based on the identifier of the first or last packet of the logical frame and the number of hash collisions during data transmission, the problem of storage space occupation and poor load balancing effect caused by hash collisions in the CLOS architecture is solved, and more efficient load balancing is achieved.

CN120811981AActive Publication Date: 2025-10-17RUIJIE NETWORKS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, the load balancing method under the CLOS architecture is prone to hash collisions in the data flow between IM and OM, which causes the load balancing sequence number to be released too early or too late, occupying storage space and affecting the load balancing effect.

Method used

When receiving data packets, the system determines whether they are the first or last packet of a logical frame based on their identifier. Combined with the number of hash collisions, the system determines the value of the load balancing sequence information and releases it under the condition that it is satisfied. This avoids releasing the value after the hash collision ends, thus ensuring the effectiveness of load balancing.

Benefits of technology

This effectively avoids the premature or late release of load balancing sequence numbers, reduces storage space overhead, and improves load balancing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120811981A_ABST
    Figure CN120811981A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method, device, equipment and product, and relates to the technical field of communication networks. The method comprises: receiving a first data packet, the first data packet being a current to-be-transmitted data packet in a logic frame, the first data packet comprising first equalization sequence information; determining a value and a first Hash conflict number corresponding to the first balancing sequence information, the value being used for indicating transmission of the first data packet according to a load balancing mode; and releasing the corresponding value when a release condition is satisfied, the release condition being associated with the number of first hash conflicts and whether the first data packet is a tail packet of the logic frame. According to the mode, the storage space overhead of the value is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese Patent Application No. 202410417483.9, filed on April 8, 2024, entitled “Data Transmission Method”, the content of which is incorporated herein by reference in its entirety; and this application claims priority to the Chinese Patent Application No. 202410612662.8, filed on May 16, 2024, entitled “Data Transmission Method”, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of communication networks, and in particular to a data transmission method, device, equipment and product. BACKGROUND

[0003] Currently, mainstream data transmission devices such as routers, switches, distributed decoupling devices (DDC), and switch device networking usually adopt the CLOS architecture invented by Charles Clos. The CLOS architecture is a parallel forwarding structure composed of multiple switching elements, which can provide high scalability and flexibility. Specifically, the CLOS architecture is composed of multiple input modules (IM), central modules (CM), output modules (OM), and other switching elements. Under this CLOS architecture, data transmission devices usually use technologies such as direct packet switching, physical packet framing, or cutting packets for load balancing.

[0004] In recent years, load balancing based on logical framing has appeared. This method balances the load by forming approximate fixed-length logical frames from multiple data packets, which can eliminate the imbalance of the load. In the load balancing process, the related technology assigns a sequence number to the entire logical frame to obtain a logical frame sequence number. This logical frame sequence number is used for load balancing and out-of-order resolution. Since the transmission paths of all data packets in the same logical frame sequence number remain consistent within the parallel forwarding structure, there is no out-of-order within the logical frame. Moreover, the existing method performs multi-path load balancing between logical frames. However, the data flow between the IM and the OM includes multiple port-level flows, and each port-level flow is arranged according to the same sequence number in the same arrangement manner. Therefore, there is a case where the logical frames in different port-level flows have the same logical frame sequence number. In this case, the transmission paths of the logical frames with the same logical frame sequence number remain consistent between the IM and the CM, and between the CM and the OM, resulting in poor load balancing effect. To this end, the related technology divides the data flow between the IM and the OM into multiple device-level flows, so that the transmission paths of the logical frames with the same logical frame sequence number can be different between the IM and the CM, or between the CM and the OM.

[0005] However, each device-level flow is assigned a balanced sequence number using the same orchestration scheme, and the number of balanced sequence numbers is limited. This makes hash collisions prone to occur, where logical frames in different device-level flows are mapped to the same balanced sequence number. In the event of a hash collision, releasing the balanced sequence number too early can result in different balanced sequence numbers being used for different packets within the same logical frame, impacting load balancing. Releasing the balanced sequence number too late can lead to exhausted balanced sequence number resources and consume significant storage space. Therefore, determining when to release the balanced sequence number is a pressing issue. Summary of the Invention

[0006] The present application provides a data transmission method, apparatus, device and product for solving the problem of late release of balanced sequence numbers resulting in large storage space occupation.

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

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

[0009] Determining a value corresponding to the first balancing sequence information 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;

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

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

[0012] Obtaining a first identifier corresponding to a first data packet, where the first identifier is used to indicate whether the first data packet is a first packet of a corresponding logical frame;

[0013] A value corresponding to the first balanced sequence information and a first hash collision count are determined according to the first identifier.

[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 a value corresponding to the first equalization sequence information according to the first identifier includes:

[0017] if the first condition is met, determining that the value corresponding to the first equalization sequence information is a third value and a preset value, the third value being a value corresponding to third equalization sequence information in a third data packet, the third data packet and the first data packet having a same device-level flow identifier;

[0018] if the second condition is met, determining that the value corresponding to the first equalization sequence information is a second value;

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

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

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

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

[0023] Optionally, the method further includes:

[0024] Obtaining a port-level flow identifier corresponding to the first data packet and a fifth table, the port-level flow identifier at least including a destination port identifier, and the fifth table storing a mapping relationship between a port-level flow identifier and a value corresponding to equalization sequence information of a first transmitted data packet, the first transmitted data packet at least including a second data packet.

[0025] Obtaining the second value in the fifth table based on the port-level flow identifier.

[0026] Optionally, the method further includes:

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

[0028] Obtaining the third value in 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 third value and the 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 a head packet of a corresponding logical frame and is not a tail packet of the corresponding logical frame, the value corresponding to the first equalization sequence information is updated.

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

[0032] writing the corresponding value into the equalization sequence information.

[0033] Optionally, according to the first identifier, the first hash collision number is determined by:

[0034] According to the first identifier, the use number of the storage location corresponding to the value is determined.

[0035] According to the use number of the storage location corresponding to the value, the first hash collision number is determined; the first hash collision number is the hash collision number of the storage location corresponding to the value.

[0036] Optionally, according to the first identifier, the use number of the storage location corresponding to the value is determined by:

[0037] If a third condition is met, the use number of the storage location corresponding to the value is determined as the sum of the used number of the storage location corresponding to the value and a preset value.

[0038] If a fourth condition is met, the use number of the storage location corresponding to the value is determined as the used number of the storage location corresponding to the value.

[0039] If a fifth condition is met, the use number of the storage location corresponding to the value is determined as the difference between the used number of the storage location corresponding to the value and a preset value.

[0040] The third condition comprises: the first identifier indicates that the first data packet is a head packet of a corresponding logical frame and indicates that the first data packet is not a tail packet of the corresponding logical frame.

[0041] The fifth condition comprises: the first identifier indicates that the first data packet is not a head packet of a corresponding logical frame and indicates that the first data packet is a tail packet of the corresponding logical frame.

[0042] The fourth condition comprises at least one of:

[0043] The first identifier indicates that the first data packet is a head packet of a corresponding logical frame and indicates that the first data packet is a tail packet of the corresponding logical frame.

[0044] If the first identifier indicates that the first data packet is not a head packet of a corresponding logical frame and indicates that the first data packet is not a tail packet of the corresponding logical frame.

[0045] Optionally, the method further comprises:

[0046] obtaining a sixth table, wherein the sixth table stores a mapping relationship between the value and a used number of the storage location corresponding to the value;

[0047] obtaining the used number of the storage location corresponding to the value based on the sixth table.

[0048] Optionally, if it is determined that the use number of the storage location corresponding to the value is a sum of the used number of the storage location corresponding to the value and a preset value, or if it is determined that the use number of the storage location corresponding to the value is a difference between the used number of the storage location corresponding to the value and a preset value, after the use number of the storage location corresponding to the value is determined according to the first identifier, the method further comprises:

[0049] updating the sixth table by using the use number of the storage location corresponding to the value.

[0050] Optionally, the updating the sixth table by using the use number of the storage location corresponding to the value comprises:

[0051] when the use number of the storage location corresponding to the value is determined to be a sum of the used number of the storage location corresponding to the value and a preset value, writing the value corresponding to the first balance sequence number information and the use number of the storage location corresponding to the value into the sixth table respectively;

[0052] when the use number of the storage location corresponding to the value is determined to be a difference between the used number of the storage location corresponding to the value and a preset value, if the use number of the storage location corresponding to the value is 0, emptying the sixth table; if the use number of the storage location corresponding to the value is not 0, writing the use number of the storage location corresponding to the value into the sixth table.

[0053] Optionally, after the value corresponding to the first balance sequence information is determined, the method further comprises:

[0054] determining a transmission path of the first data packet according to a preset load balancing mode based on the value corresponding to the first balance sequence information, wherein the preset load balancing mode is a round robin load balancing mode or a congestion-aware load balancing mode;

[0055] transmitting the first data packet according to the transmission path.

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

[0057] 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 comprising a value corresponding to first equalization sequence information;

[0058] determining a path number of the first data packet and a second hash collision number;

[0059] releasing the corresponding path number in a case where a release condition is met, wherein the release condition is associated with the second hash collision number and whether the first data packet is a tail packet of the logical frame.

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

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

[0062] determining the path number of the first data packet and the second hash collision number according to the first identifier.

[0063] Optionally, the determining of the path number of the first data packet according to the first identifier comprises:

[0064] if a first condition is met, determining the path number of the first data packet as a sum of a path number of a fourth data packet and a preset value, the fourth data packet and the first data packet having a same system-level flow identifier;

[0065] if a second condition is met, determining the path number of the first data packet as a path number of a third data packet;

[0066] wherein the first condition comprises that the first identifier indicates that the first data packet is a head packet of a corresponding logical frame and the second hash collision number is a preset number;

[0067] the second condition comprises at least one of:

[0068] the first identifier indicates that the first data packet is a head packet of a corresponding logical frame and the second hash collision number is not the preset number;

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

[0070] Optionally, the method further comprises:

[0071] obtaining a device-level flow identifier corresponding to the first data packet and a seventh table, the device-level flow identifier comprising a source device identifier, a destination device identifier and a balance sequence number, the seventh table storing a mapping relationship between a device-level flow identifier and a path number of a second transmitted data packet, the second transmitted data packet comprising at least the third data packet;

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

[0073] Optionally, the method further comprises:

[0074] obtaining a system-level flow identifier corresponding to the first data packet and a second mapping relationship information set, the system-level flow identifier comprising a destination system identifier, the second mapping relationship information set comprising a mapping relationship between the system-level flow identifier and a path number of a third transmitted data packet, the third transmitted data packet comprising at least the fourth data packet;

[0075] finding the path number of the fourth data packet 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 a sum of the path number of the fourth data packet and a preset value, the method further comprises:

[0077] if the first identifier corresponding to the first data packet indicates that the first data packet is not a tail packet of a corresponding logical frame, updating the seventh table with the path number of the first data packet.

[0078] Optionally, determining a second hash collision number according to the first identifier comprises:

[0079] determining a usage number of the storage location corresponding to the path number according to the first identifier;

[0080] determining the second hash collision number according to the usage number of the storage location corresponding to the path number, the second hash collision number being a hash collision number of the storage location corresponding to the path number.

[0081] Optionally, the determining the usage number of the storage location corresponding to the path number according to the first identifier comprises:

[0082] if a third condition is met, determining that the usage number of the storage location corresponding to the path number is a sum of a used number of the storage location corresponding to the path number and a preset value;

[0083] if a fourth condition is met, determining that the usage number of the storage location corresponding to the path number is the used number of the storage location corresponding to the path number.

[0084] If the fifth condition is met, the usage times of the storage location corresponding to the path number is determined as the difference between the used times of the storage location corresponding to the path number and a preset value;

[0085] The third condition includes that the first identifier indicates that the first data packet is a start packet of a corresponding logical frame and indicates that the first data packet is not an end packet of the corresponding logical frame.

[0086] The fifth condition includes that the first identifier indicates that the first data packet is not a start packet of a corresponding logical frame and indicates that the first data packet is an end 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 a start packet of a corresponding logical frame and indicates that the first data packet is an end packet of the corresponding logical frame.

[0089] The first identifier indicates that the first data packet is not a start packet of a corresponding logical frame and indicates that the first data packet is not an end packet of the corresponding logical frame.

[0090] Optionally, the method further includes:

[0091] Obtaining an eighth table, and the eighth table stores a mapping relationship between the path number and the used times of the storage location corresponding to the path number.

[0092] Finding the used times of the storage location corresponding to the path number based on the eighth table.

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

[0094] Updating the eighth table by using the usage times of the storage location corresponding to the path number.

[0095] Optionally, after the usage times of the storage location corresponding to the path number is determined according to the first identifier, updating the eighth table by using the usage times of the storage location corresponding to the path number includes:

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

[0097] When the determined number of times of using the storage location corresponding to the path number is a difference between the number of times of using the storage location corresponding to the path number and a preset value, if the number of times of using the storage location corresponding to the path number is 0, the eighth table is emptied; if the number of times of using the storage location corresponding to the path number is not 0, the number of times of using the storage location corresponding to the path number is written into the eighth table.

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

[0099] a receiving module, configured to receive a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, the first data packet comprising first equalization sequence information;

[0100] a determining module, configured to determine 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;

[0101] a releasing module, configured to release the corresponding value if a release condition is met, 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.

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

[0103] a receiving module, configured to receive a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, the first data packet comprising a value corresponding to first equalization sequence information;

[0104] a determining module, configured to determine a path number of the first data packet and a second hash collision number;

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

[0106] According to a fifth aspect of the present 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 the computer-executed instructions stored in the memory, so that the at least one processor executes the data transmission method according to any one of the first aspect, and / or the data transmission method according to any one of the second aspect.

[0109] According to a sixth aspect of the present application, a computer readable storage medium is provided, in which computer execution instructions are stored, and the computer execution instructions are used to implement the data transmission method according to any one of the first aspect, and / or the data transmission method according to any one of the second aspect, when executed by a processor.

[0110] According to a seventh aspect of the present application, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the data transmission method according to any one of the first aspect, and / or the data transmission method according to any one of the second aspect.

[0111] The data transmission method provided by the present application comprises: 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 comprising a first equalization sequence number field; determining a value corresponding to the first equalization sequence number field 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 a case where a release condition is met, wherein the release condition is met when the first hash collision number is a preset number and the first data packet is a tail packet of the corresponding logical frame.

[0112] In the case where the value of the first equalization sequence number field has a hash collision in the storage location, the present application does not release the value, which can ensure the effectiveness of load balancing. After the hash collision ends and the tail packet of the logical frame is assigned the value, the value is released, which avoids the disadvantages caused by early release or late release, and reduces the storage space overhead of the value.

[0113] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0114] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings of embodiments according to these drawings without creating any creative labor.

[0115] Figure 1 An application environment network architecture diagram under the CLOS architecture in the related art is shown;

[0116] Figure 2 A structure diagram of a logical frame provided by the embodiments of the present application is shown;

[0117] Figure 3A flow diagram of a data transmission method provided by an IM side according to an embodiment of the present application is shown;

[0118] Figure 4 A flow diagram of another data transmission method provided by an IM side according to an embodiment of the present application is shown;

[0119] Figure 5 A flow diagram of a data transmission method provided by a CM side according to an embodiment of the present application is shown;

[0120] Figure 6 A flow diagram of another data transmission method provided by a CM side according to an embodiment of the present application is shown;

[0121] Figure 7 An internal structure diagram of a data transmission apparatus 700 provided by an embodiment of the present application is shown;

[0122] Figure 8 An internal structure diagram of a data transmission apparatus 800 provided by an embodiment of the present application is shown;

[0123] Figure 9 An internal structure diagram of a data transmission apparatus 1600 provided by another embodiment of the present application is shown;

[0124] Figure 10 A flow diagram of a data transmission method provided by an IM side according to another embodiment of the present application is shown;

[0125] Figure 11 A flow diagram of another data transmission method provided by an IM side according to another embodiment of the present application is shown;

[0126] Figure 12 A flow diagram of another data transmission method provided by an IM side according to another embodiment of the present application is shown;

[0127] Figure 13 A flow diagram of a data transmission method provided by a CM side according to another embodiment of the present application is shown;

[0128] Figure 14 A flow diagram of another data transmission method provided by a CM side according to another embodiment of the present application is shown;

[0129] Figure 15 A flow diagram of another data transmission method provided by a CM side according to another embodiment of the present application is shown;

[0130] Figure 16 An internal structure diagram of a data transmission apparatus 1600 provided by another embodiment of the present application is shown;

[0131] Figure 17Fig. 7 shows an internal structure diagram of the data transmission device 1700 on the IM side according to an embodiment of the present application;

[0132] Figure 18 Fig. 8 shows an internal structure diagram of the data transmission device 1800 on the CM side according to an embodiment of the present application;

[0133] Figure 19 Fig. 9 shows a block diagram of the data transmission device 1900 according to an embodiment of the present application.

[0134] The above figures have shown the embodiments of the present application, which will be described in more detail hereinafter. These figures and the written description are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0135] Although the present application allows various forms of embodiments, the embodiments of the present application including the preferred embodiments are shown in the figures to be specifically described herein, and it should be understood that the content disclosed herein will be considered as an explanation of the principles of the present application, and is not intended to limit the broad aspects of the present application to one or more embodiments shown or disclosed. As used herein, the term "the present application" is not intended to limit the scope of the claimed invention, but is only a term for discussing the exemplary embodiments for the purpose of explanation.

[0136] In the related art, the CLOS architecture is a parallel forwarding structure composed of multiple switching elements, such as Figure 1 As shown, the CLOS architecture is composed of multiple IMs, multiple CMs, multiple OM interconnections, and the like. The IM encodes the sequence number for the entire logical frame. There is out-of-order between the internal logical frames of the parallel forwarding structure, so the OM performs one of the typical implementation mechanisms for out-of-order, which is port-level out-of-order between the logical frames on the OM. Under this mechanism, the IM usually needs to mark the logical frame sequence number for the logical frame with

source port, destination port

source device, destination port

source device, destination port, priority

source port, destination port, priority

[0137] The above combinations are all fine-grained, and the data flow between the IM and the OM is divided according to functions, so that load balancing flow and out-of-order flow can be obtained. Therefore, in the case of marking the logical frame sequence number based on the above fine-grained, the load balancing flow and the out-of-order flow are coupled, that is, load balancing is performed based on the logical frame sequence number on the IM and the CM, and out-of-order is performed based on the logical frame sequence number on the OM. Under this mechanism, load balancing is performed based on the fine-grained load balancing flow, which is easy to cause serious load balancing conflicts, for the following reasons:

[0138] The related art performs multi-path load balancing between logical frames. Specifically, on the IM and the CM, load balancing is performed according to the logical frame sequence number and the corresponding load balancing port group, wherein the load balancing port group includes at least one of the port connected to the CM on the IM, the port connected to the IM on the CM, or the port connected to the OM on the CM. In the load balancing process, the related art can make the logical frames of different logical frame sequence numbers have different transmission paths between the IM and the CM or between the CM and the OM, so as to achieve multi-path load balancing between logical frames.

[0139] However, the data flow between the IM and the OM includes multiple port-level flows, and each port-level flow is a sequence number arranged in the same arrangement manner, so there is a case that the logical frames in different port-level flows have the same logical frame sequence number. In this case, the transmission paths of the logical frames with the same logical frame sequence number between the IM and the CM and between the CM and the OM remain the same, and the load balancing effect is poor.

[0140] To solve the above technical problems, the overall inventive concept of the present application is how to provide a method applied to the field of communication networks for improving the load balancing effect.

[0141] The present application constructs a logical frame structure, as shown in Figure 2 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 can also include only one data packet. All data packets in the same logical frame data packet have the same balancing sequence number, which is the value corresponding to the balancing sequence number field in the data packet. Different logical frames with the same logical frame sequence number correspond to different balancing sequence numbers. On this basis, the present application performs load balancing according to the balancing sequence number, that is, even in the face of logical frames with the same logical frame sequence number, the present application can make the data packets in different logical frames with the same logical frame sequence number correspond to different balancing sequence numbers, so that according to the balancing sequence number, the data packets in different logical frames with the same logical frame sequence number can be transmitted in different paths, which improves the load balancing effect compared with the related art which performs load balancing according to the logical frame sequence number.

[0142] The technical solutions of the present application and how the technical solutions solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the drawings.

[0143] Figure 3 A flowchart of a data transmission method provided by an IM according to an embodiment of the present application is shown. As shown in the figure, the method of the present embodiment comprises: Figure 3

[0144] S310, receiving 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 a data packet currently to be transmitted in the first logical frame. For example, the first data packet is a data packet currently to be transmitted from the IM to the OM via the CM in the first logical frame.

[0146] Optionally, the size of the first logical frame can be, for example, 8KB, 16KB, which is not particularly limited in the present application.

[0147] Optionally, the first logical frame can be generated by a communication device (such as a line card) in the IM, and the generation process of the logical frame is not particularly limited in the embodiments of the present application.

[0148] Optionally, one or more logical frames are included in a data stream. Moreover, the data stream can be identified by various combinations.

[0149] For example, in an optional embodiment, the data stream can be identified by a coarse-grained combination. In other words, the data stream can be identified by

source device, destination device

[0150] It should be understood that for data packets in the same data stream identified by

source device, destination device

[0151] In another optional embodiment, the data stream can be identified by a fine-grained combination. In other words, the data stream can be identified by

source port, destination port

[0152] ​It should be understood that, for the data packets in the same data stream identified by the same pair of source port and destination port, the data packets in each preset logical frame nominal data length range are regarded as a logical frame, the logical frame sequence numbers of different logical frames in the same data stream are incremented, and the data packets in the same logical frame are identified by the same logical frame sequence number.

[0153] Therefore, in the embodiment, the OM performs one of the typical implementation mechanisms of out-of-order resolution, which is device-level out-of-order resolution between logical frames on the OM. In this mechanism, a coarse-grained combination of source device and destination device is adopted. Another implementation mechanism is port-level out-of-order resolution between logical frames on the OM, in which a fine-grained combination of source port and destination port or other combinations is adopted, where the other combinations include but are not limited to source device and destination port, source device and destination port and priority, or source port and destination port and priority.

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

[0155] S320, determining first balance sequence information corresponding to the first data packet based on the first logical frame and the destination device.

[0156] S330, sending the first data packet, where the first data packet includes the first balance sequence information.

[0157] The first balance sequence information is different from balance sequence information of a second logical frame having the same logical frame sequence number as the first logical frame. The logical frames with the same logical frame sequence number correspond to different values, and the values 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 by a balance sequence number field. The following takes the balance sequence information as the balance sequence number as an example, and no longer be described.

[0159] It should be understood that each data packet includes a balance sequence number field, and the balance sequence number field is used for load balancing of the logical frame. As shown in Figure 2 It should be understood that each data packet includes a balance sequence number field, and the balance sequence number field is used for load balancing of the logical frame. As shown in

[0160] In this embodiment, all data packets in the logical frame with the same equalization sequence number correspond to the same transmission path between the IM and the CM. The embodiment of the present application provides a data transmission method based on a logical frame. Compared with the data transmission method based on data packets in the related art, the data transmission method based on a logical frame has more equal data lengths, and can avoid the problem of poor equalization effect caused by large differences in data packet lengths. Moreover, the data packets in the same logical frame correspond to the same transmission path, which can shield the delay difference in multiple paths to a certain extent, and make the out-of-order rate of the logical frame relatively lower.

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

[0162] Therefore, the equalization sequence number can be used to decouple the load balancing flow and the out-of-order flow. According to the equalization sequence number, the embodiment of the present application performs load balancing of the logical frame between the IM and the CM. Even if the same logical frame sequence number is faced, the present application can make the data packets in different logical frames with the same logical frame sequence number correspond to different equalization sequence numbers. Therefore, according to the first logical frame corresponding to the first data packet and the destination device, the embodiment of the present application can determine the first equalization sequence number corresponding to the first data packet, and then perform load balancing according to the first equalization sequence number. This can make the data packets in different logical frames with the same logical frame sequence number be transmitted through different paths, and compared with the load balancing method based on the logical frame sequence number in the related art, the load balancing effect of the logical frame between the CM and the CM is improved.

[0163] In an alternative embodiment, source device A (i.e. a certain IM) sends data streams to destination device B (a certain OM), where destination device B includes port P1 and port 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 adopts the

source device, destination port

[0164] As described above, there must be logical frames with the same logical frame sequence number between the two data streams, and the logical frames with the same logical frame sequence number correspond to the same transmission path, which ultimately causes the two logical frames to use the same transmission path between the IM and the CM, and has the disadvantage of poor load balancing effect.

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

[0166] It should be noted that, as shown in Figure 2 The data packet can also include a data packet payload.

[0167] Optionally, the data packet can also include a logical frame sequence number field, a source device identifier field, a destination port identifier field, a destination device identifier field, a data packet payload, etc. Wherein, as shown in Figure 2As shown, the logical frame sequence number field is used to identify the logical frame sequence number of the logical frame where the data packet is located, and is used for de-sequencing of the logical frame. The source device identification field is used to identify the source device, the destination port identification field is used to identify the destination port, and the destination device identification field is used to identify the destination device.

[0168] In one possible embodiment, the first logical frame further comprises a first identification.

[0169] The first identification is at least one of:

[0170] (1) a logical frame end identification.

[0171] (2) a data packet position identification, and the data packet position identification is a first value.

[0172] The following exemplary description is made with respect to the logical frame end identification:

[0173] The logical frame end identification is used to identify the end of the corresponding logical frame. In one optional embodiment, as shown, the logical frame further comprises a logical frame end identification. For example, the logical frame end identification can take a value of 0 or 1, where the logical frame end identification is 1, it indicates that the logical frame has not ended, and where the logical frame end identification is 0, it indicates that the logical frame has ended. Figure 2

[0174] It should be understood that, since the received data packets are changing in real time, the value of the logical frame end identification is also changing. In other words, when the received data packet is the last data packet of the logical frame, the logical frame end identification is modified to 0, and when the received data packet is not the last data packet of the logical frame, the logical frame end identification is kept as 1.

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

[0176] The following exemplary description is made with respect to the data packet position identification:

[0177] In one possible embodiment, the data packet position identification can only be carried 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, the data packet position identification can be set in the first data packet, and the first value is 0, indicating that the first data packet is the tail packet of the corresponding logical frame.

[0178] ​In another possible implementation, each data packet can carry a corresponding data packet position identifier. For example, when the first data packet is the tail packet of the corresponding logical frame, the data packet position identifier can be set in the first data packet, and the first value is 0, indicating 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, the data packet position identifier can be set in the first data packet, and the position identifier is 1, indicating that the first data packet is not the tail packet of the corresponding logical frame.

[0179] Based on the above embodiments, the technical solutions of the present application are described in more detail in combination with several specific embodiments.

[0180] In a possible implementation, S320, based on the first logical frame and the destination device, determining first equalization sequence information corresponding to the first data packet, includes:

[0181] S321, based on the first logical frame and the destination port of the destination device, determining whether the first data packet is the first packet of the first logical frame.

[0182] S322, determining the first equalization sequence information corresponding to the first data packet based on the determination result.

[0183] In the embodiments of the present application, 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 based on the result of whether the first data packet is the first packet of the first logical frame, the first equalization sequence information corresponding to the first data packet is determined. The first equalization sequence information includes a first equalization sequence number.

[0184] In a possible implementation, S321, based on the first logical frame and the destination port of the destination device, determining whether the first data packet is the first packet of the first logical frame, includes:

[0185] S3211, based on the first logical frame and the destination port of the destination device, obtaining a first identifier of a second data packet, the second data packet being a previous data packet of the first data packet when the first data packet has the same port-level flow identifier, the first identifier being used to indicate whether the corresponding data packet is the tail packet of the corresponding logical frame, and the port-level flow identifier including a source port identifier and a destination port identifier of the destination device.

[0186] S3212, determining whether the first data packet is the first packet of the first logical frame according to the first identifier corresponding to the second data packet.

[0187] In the embodiments of the present application, since the second data packet is a previous data packet of the first data packet with the same port-level flow identifier, 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 a tail packet. If the second data packet is a tail packet and a previous data packet of the first data packet, it can be determined that the first data packet is a head packet of the current logical frame (i.e., the first logical frame). Otherwise, the first data packet is not a head packet of the first logical frame.

[0188] As an optional implementation, the value corresponding to the first equalization sequence number field is determined, including:

[0189] The first identifier corresponding to the second data packet is obtained, and the first identifier is used to indicate whether the corresponding data packet is a tail packet of the corresponding logical frame. The value corresponding to the first equalization sequence number field is determined according to the first identifier.

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

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

[0192] In the embodiments of the present application, according to the first identifier corresponding to the second data packet, the position of the first data packet in the corresponding logical frame can be accurately identified, and the value corresponding to the first equalization sequence number field in the first data packet is determined, which can ensure that different logical frames correspond to different equalization sequence numbers.

[0193] In a possible embodiment, the step 3211 of 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] The step a1 of determining the port-level flow identifier corresponding to the first data packet in the first logical frame and a first table includes: the first table stores a mapping relationship between the port-level flow identifier and a first identifier of a first transmitted data packet; and the first transmitted data packet includes the second data packet.

[0195] The step a2 of searching for the first identifier corresponding to the second data packet in the first table based on the port-level flow identifier.

[0196] In a possible embodiment, the step 3212 of determining whether the first data packet is a head packet of the first logical frame according to 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 a tail packet of a corresponding logical frame, it is determined that the first data packet is a head 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 a tail packet of a corresponding logical frame, it is determined that the first data packet is not a head packet of the first logical frame.

[0199] As a specific embodiment, Figure 4 Load balancing processing for data flow of

source port-destination port

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

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

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

[0203] It should also be understood that the first table is also referred to as a new logical frame judgment table on the IM.

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

[0205] Table 1 first table

[0206] Port-level flow identification End-of-logical-frame identification [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 the logical frames of the same

source port, destination port

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

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

[0210] It should be understood that the first identifier includes a logical frame end identifier. The embodiment of the present application can determine whether the second data packet is the last packet of the corresponding logical frame and whether the first data packet is the first packet of the corresponding logical frame by indexing the first table according to the port-level flow identifier.

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

[0212] Specifically, the IM receives a first data packet and searches the first table for the logical frame end identifier corresponding to the second data packet. If the logical frame end identifier corresponding to the second data packet is 0, this indicates that the second data packet is the last packet of the corresponding logical frame, and the first data packet is the first 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 subsequent data packets exist in the logical frame corresponding to the first data packet, the corresponding logical frame end identifier for the subsequent data packet remains set to 1, and the subsequent data packet is not determined to be a new logical frame.

[0213] On the contrary, if the logical frame end flag corresponding to the second data packet is 1, it means that the second data packet is not the last packet of the corresponding logical frame, and the first data packet is not the first packet of the corresponding logical frame.

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

[0215] S3221. If the judgment result indicates that the first data packet is not the first packet of the first logical frame, determine that the first balanced sequence number corresponding to the first data packet is the second balanced sequence number, and the second balanced sequence number is the balanced sequence number in the second data packet;

[0216] S3222. If the judgment result indicates that the first data packet is the first packet of the first logical frame, then determine that the first balanced sequence number is the sum of the third balanced sequence number and a preset value, and the third balanced sequence number is the balanced sequence number in the third data packet; the third data packet is the previous data packet of 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 last packet of the corresponding logical frame, and then the first data packet is determined to be the first packet of the first logical frame, the following S44 is executed; if the first identifier indicates that the second data packet is not the last packet of the corresponding logical frame, and then the first data packet is determined not to be the first packet of the first logical frame, the following S45 is executed:

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

[0219] The third equalization sequence number is a value corresponding to the third equalization sequence number field, and the value corresponding to the third equalization sequence number field is a value corresponding to an 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 the present application do not make specific limitations.

[0221] For example, when the preset value is 1, if it is judged that the received first data packet is the first packet corresponding to the logical frame, the value obtained by adding 1 to the value corresponding to the third equalization sequence number field is taken as the first equalization sequence number (for example, the value corresponding to the first equalization sequence number field, which will not be described below).

[0222] The step of obtaining the third equalization sequence number (for example, the value corresponding to the third equalization sequence number field, which will not be described below) includes:

[0223] Step a11, obtaining a device-level flow identifier corresponding to the first data packet and a first mapping relationship information set, the device-level flow identifier including a destination device identifier, and the first mapping relationship information set including a mapping relationship between the device-level flow identifier and the equalization sequence number of the second transmitted data packet; the second transmitted data packet at least including the third data packet.

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

[0225] Through S44 and the first mapping relationship information set, it is recognized that when a new logical frame sent to a certain destination device is identified, the equalization sequence number corresponding to the data stream of the

destination device

[0226] S45, determining that the first equalization sequence number is the second equalization sequence number.

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

[0228] Step a21, obtaining a port-level flow identifier corresponding to the first data packet and a second table, the port-level flow identifier including at least one of a source port or a destination port; the second table storing a mapping relationship between the port-level flow identifier and the equalization sequence number (for example, the value corresponding to the equalization sequence number field) of the first transmitted data packet; the first transmitted data packet at least including the second data packet.

[0229] It should be understood that the second table is also called an equalization sequence number table on the IM. The second table is shown in Table 2:

[0230] Table 2 Second table

[0231] Port-level flow identification Balancing sequence number [Source port, destination port, logical frame sequence number] Any value between 0 and N … …

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

[0233] In the embodiment, the data frames with the same logical frame sequence number in different data flows can correspond to different equalization sequence numbers. Therefore, based on the equalization sequence number in the second table, the data flow identified by

source port, destination port

destination device

source port, destination port

destination device

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

[0235] Step b1, determining the first identification corresponding to the first data packet based on the determination result.

[0236] Step b2, updating the first table using the first identification corresponding to the first data packet.

[0237] Referring to Figure 4 S46, updating the first table using the first identification corresponding to the first data packet.

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

[0239] In a possible embodiment, after step S3222 (or S44), determining that the first equalization sequence number is the sum of the third equalization sequence number and the 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, the second table is updated using the first equalization sequence number.

[0241] In the embodiment, referring to Figure 4 S47, if the first identification corresponding to the first data packet indicates that the first data packet is not the tail packet of the corresponding logical frame, the second table is updated using the first equalization sequence number.

[0242] It should be understood that the second table occupies storage space on the IM, and writing the equalization sequence number into the second table can provide the same equalization 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 equalization sequence number, thereby ensuring that the same logical frame passes through the same transmission path between the IM and the CM.

[0243] In a 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, the second equalization sequence number is deleted from the second table.

[0245] In this embodiment, referring to S48 in Figure 4 , 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, the second equalization sequence number is deleted from the second table.

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

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

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

[0249] In an optional embodiment, when the first data packet is the head packet of the corresponding logical frame, the device-level flow identifier corresponding to the first data packet triggers the equalization sequence number (i.e., the value corresponding to the third equalization sequence number field) to be incremented by 1. If the first data packet is both the head packet of the corresponding logical frame and the tail packet of the corresponding logical frame, the equalization sequence number after the increment is written into the first data packet; if the first data packet is only the head packet of the corresponding logical frame, the equalization sequence number is written into the first data packet and the second table. Writing into the second table is used for reading the equalization 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 packet nor the last packet of the corresponding logical frame, the second data packet corresponding balanced sequence number is read from the second table, and the balanced sequence number is written into the first data packet; otherwise, if the first data packet is not the first packet but the last packet of the corresponding logical frame, the second data packet corresponding balanced sequence number is also read from the second table, and the balanced sequence number is written into the first data packet. In addition, the embodiment of the application can also delete the port level flow identification corresponding balanced sequence number of the first data packet from the second table when the first data packet is the last packet of the logical frame.

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

[0252] In an optional embodiment, the current values of the balanced sequence numbers to different destination devices can be independently stored in additional storage space.

[0253] For example, the current value of the balanced sequence number to the destination device 1 is 3, and the current value of the balanced sequence number to the destination device 2 is 5. At this time, a new logical frame to the destination device 1 comes, the balanced sequence number value is accumulated, marked as 4, and 4 is used as the balanced sequence number of the new logical frame to update the current value of the balanced sequence number to the destination device 1. The balanced 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 embodiment, the balanced sequence number is used to maintain the same transmission path between IM and CM corresponding to all data packets in the same logical frame, while the different logical frame sequence numbers are used to maintain different transmission paths between IM and CM corresponding to the logical frames of different logical frames, thereby improving the balanced load effect between IM and CM.

[0255] In a possible embodiment, after S44 or S45, as shown in Figure 4 the data transmission method further comprises:

[0256] S50, determining the transmission path of the first data packet according to a preset load balancing mode based on the first balanced sequence information. For example, the transmission path of the first data packet is determined according to a preset load balancing mode based on the value corresponding to the first balanced sequence number field.

[0257] The preset load balancing mode is a round robin load balancing mode or a congestion-aware load balancing mode.

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

[0259] For example, the IM has two ports P11 and P12, the CM has three ports P21, P22 and P23, and the transmission path between the IM and the CM has six paths, i.e., P11-P21, P11-P22, P11-P23, P12-P21, P12-P22 and P12-P23. After the equalization sequence number is written in the first data packet, if the preset load balancing mode is the round robin load balancing mode, the transmission paths between the IM and the CM are polled, and when it is determined that there is an idle transmission path, 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 the load balancing processing of the data flow with the port-level flow identifier on the IM. Since the transmission path between the IM and the OM includes the transmission path between the IM and the CM and the transmission path between the CM and the OM, and the equalization sequence number can convert the data flow identified by

source port, destination port

destination device

source device, destination device

[0261] For example, Figure 5 A flow diagram of a data transmission method on the CM side provided by an embodiment of the present application is shown. As shown in the figure, Figure 5 The data transmission method includes the following steps.

[0262] S510, receiving 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.

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

[0264] S520, determining a first transmission path of the first data packet based on the first logical frame and the destination device.

[0265] In the embodiment of the present application, the load balancing of the logical frames is performed between the CM and the OM according to the balance sequence number, and even if the logical frames have the same balance sequence number, the present application can make the 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, the transmission path corresponding to the first data packet can be determined, and then the load balancing of the logical frames is performed between the CM and the OM according to the first balance sequence number, so that the data packets in different logical frames with the same balance sequence number are transmitted through different paths. Compared with the load balancing manner according to the logical frame sequence number in the related art, the load balancing effect of the logical frames between the CM and the OM is improved.

[0266] Based on the above embodiment, the technical scheme of the present application will be described in more detail in combination with several specific embodiments.

[0267] In a possible embodiment, S520, the first transmission path of the first data packet is determined based on the first logical frame and the destination device, and includes:

[0268] S521, whether the first data packet is the first packet of the first logical frame is determined based on the first logical frame and the destination device.

[0269] S522, the first transmission path of the first data packet is determined based on the determination result.

[0270] In the embodiment of the present application, whether the first data packet is the first packet of the first logical frame can be determined based on the first logical frame and the destination device, and then the first transmission path corresponding to the first data packet is 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 the first transmission path number.

[0271] In a possible embodiment, S521, whether the first data packet is the first packet of the first logical frame is determined based on the first logical frame and the destination device, and includes:

[0272] Sd1, the first identifier of the third data packet is obtained based on the first logical frame and the destination device. The third data packet is the previous data packet of the first data packet with the same device-level flow identifier. The first identifier is used to indicate whether the corresponding data packet is the last packet of the corresponding logical frame. The device-level flow identifier includes a source device identifier, a destination device identifier and a balance sequence number.

[0273] Sd2, whether the first data packet is the first packet of the first logical frame is determined according to the first identifier corresponding to the third data packet.

[0274] In the embodiments of the present application, since the third data packet is a previous data packet of the first data packet with the same device-level flow identifier, 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 a tail packet. If the third data packet is a tail packet and a previous data packet of the first data packet, it can be determined that the first data packet is a head packet of the current logical frame (i.e., the first logical frame). Otherwise, the first data packet is not a head packet of the first logical frame.

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

[0276] Obtaining the first identifier corresponding to the third data packet, the first identifier being used to indicate whether the corresponding data packet is a tail packet of the corresponding logical frame. According to the first identifier, the path number (e.g., the first transmission path number) of the first data packet is determined.

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

[0278] Step d11, determining the device-level flow identifier corresponding to the first data packet in the first logical frame and a third table; the third table stores a 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, searching for the first identifier corresponding to the third data packet in the third table based on the device-level flow identifier.

[0280] In a possible embodiment, step d2, determining whether the first data packet is a head packet of the first logical frame according to the first identifier corresponding to the third data packet, comprises:

[0281] Step d21, if the first identifier corresponding to the third data packet indicates that the third data packet is a tail packet of the corresponding logical frame, it is determined that the first data packet is a head 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 a tail packet of the corresponding logical frame, it is determined that the first data packet is not a head packet of the first logical frame.

[0283] As a specific embodiment, as shown in Figure 6 The data transmission method comprises:

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

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

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

[0287] It should also be understood that the third table is also referred to as a new logical frame judgment table on the CM.

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

[0289] Table 3: Third table

[0290] Device-level flow identification End-of-logical-frame identification [Source device, destination device, balancing sequence number] 0 or 1

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

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

[0293] It should be understood that the first identifier includes a logical frame end identifier. According to the device-level flow identifier, the third table can be indexed to determine whether the third data packet is the tail packet of the corresponding logical frame, and whether the first data packet is the head packet of the corresponding logical frame.

[0294] It should also be understood that for the column of device-level flow identifiers in Table 3, the device-level flow identifier

source device, destination device, balance sequence number

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

[0296] Specifically, the CM receives the first data packet, searches the third table to find the logical frame end identifier corresponding to the third data packet. If the logical frame end identifier corresponding to the third data packet is 0, it indicates 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 first data packet has subsequent data packets, the logical frame end identifier corresponding to the subsequent data packets is kept set to 1, and the subsequent data packets will not be judged as new logical frames.

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

[0298] In a possible embodiment, the first transmission path includes a first transmission path number, and step 522 of determining the first transmission path of the first data packet based on the determination result includes:

[0299] Step 5221: If the determination result indicates that the first data packet is not a first packet of the first logical frame, determining the first transmission path number of the first data packet as a second transmission path number, the second transmission path number being a transmission path number of a third data packet.

[0300] Step 5222: If the determination result indicates that the first data packet is a first packet of the first logical frame, determining the first transmission path number as a sum of a third transmission path number and a preset value, the third transmission path number being a transmission path number of a fourth data packet, the fourth data packet having 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 a last packet of the corresponding logical frame, and it is further determined that the first data packet is a first packet of the first logical frame, the following step S64 is performed; if the first identifier indicates that the third data packet is not a last packet of the corresponding logical frame, and it is further determined that the first data packet is not a first packet of the first logical frame, the following step S65 is performed.

[0302] S64: determining the first transmission path number of the first data packet as a sum of the third transmission path number and a preset value. That is, the first transmission path number is a sum of a path number of the fourth data packet and the 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., which is not limited in the embodiments of the present application.

[0304] For example, when the preset value is 1, if it is determined that the received first data packet is a first packet of the corresponding logical frame, a value obtained by adding 1 to the path number of the fourth data packet (for example, the third transmission path number, which will not be described below) is taken 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: obtaining a system-level flow identifier corresponding to the first data packet and a second mapping relationship information set, the system-level flow identifier including a destination system; the second mapping relationship information set including a mapping relationship between the system-level flow identifier and a path number of a third transmitted data packet; and the third transmitted data packet including at least the fourth data packet.

[0307] Step e12: searching 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 corresponding to the first data packet and a fourth table. The device-level flow identifier includes a source device identifier, a destination device identifier, and a balance sequence number. The fourth table stores a 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 is also called a CM routing table. The fourth table is shown in Table 4:

[0312] Table 4 Fourth table

[0313] Device-level flow identification Balancing sequence number [Source device, destination device, balancing sequence number] Any value between 0 and M … …

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

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

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

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

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

[0319] Referring to Figure 6 Step f2, updating the third table using the first identifier corresponding to the first data packet.

[0320] In this embodiment, after S62, finding 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 a possible embodiment, after step 5222 (or S64), determining that the first transmission path number of the first data packet is 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 a tail packet of the first logical frame, the first transmission path number is used to update the fourth table.

[0323] In the embodiment, referring to S67 in Figure 6 If the first identification corresponding to the first data packet indicates that the first data packet is not a tail packet of the corresponding logical frame, 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, and writing the path number into the fourth table can provide the same path number for subsequent data packets of the same logical frame as the first data packet, so that all data packets of 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 a 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 a tail packet of the first logical frame, the second transmission path number is deleted from the fourth table.

[0327] In the embodiment, referring to S68 in Figure 6 If the first identification corresponding to the first data packet indicates that the first data packet is a tail packet of the corresponding logical frame, the second transmission path number of the third data packet is deleted from the fourth table.

[0328] After S64 or S65 is executed, the embodiment of the application can further include:

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

[0330] In an optional embodiment, when the first data packet is a head packet of the corresponding logical frame, the device-level flow identification corresponding to the first data packet triggers the path number to be incremented by 1. If the first data packet is both a head packet and a tail packet of the corresponding logical frame, the first data packet is forwarded according to the path number after the increment by 1. If the first data packet is only a head packet of the corresponding logical frame, the first data packet is forwarded according to the path number after the increment by 1, and the path number after the increment by 1 is written into the fourth table for reading of 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; otherwise, if the first data packet is not the first packet but the last packet of the corresponding logical frame, the corresponding path number can also be read from the fourth table. In addition, the embodiment of the present application can also empty the corresponding path number in the fourth table when the first data packet is the last packet of the logical frame.

[0332] Optionally, the CM determines the transmission path of the first data packet between the CM and the OM according to a round-robin load balancing manner based on all data streams. Generally, when the embodiment identifies a new logical frame sent to a certain destination device, the path number obtained from the second mapping relationship information set is incremented by 1, and the transmission path corresponding to the path number after incrementing is used.

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

[0334] In the above embodiment, the path number is used to keep all data packets in the same logical frame corresponding to the same transmission path between the CM and the OM, while making the logical frames with the same balancing sequence number corresponding to different transmission paths between the CM and the OM, thereby improving the load balancing effect of the logical frames between the CM and the OM.

[0335] In the embodiment of load balancing between the IM and the OM, the above embodiment of load balancing between the IM and the CM and the embodiment of load balancing between the CM and the OM can be combined. To achieve better load balancing effect and ensure in-order within the same logical frame, the embodiment provides a second table and a fourth table. As the network scale expands, the second table occupies the storage space on the IM and the fourth table occupies the storage space on the CM, which has an advantage of occupying less space compared with the way of storing the related information of the transmission path between the IM and the CM corresponding to the logical frame on the IM and storing the related information of the transmission path corresponding to the logical frame on the CM in the related art.

[0336] The above is an exemplary description of load balancing on the IM and the CM. It should be understood that since the multi-path load balancing provided by the related art causes out-of-order between logical frames, the related art performs de-randomization according to the logical frame sequence number on the OM. Since the related art has serious load balancing conflicts, the time delay and time delay difference are increased in the load balancing process, and the difficulty of de-randomization on the OM is increased.

[0337] Therefore, in other embodiments, on the basis of the load balancing on the IM and the CM as above, when the CM sends a logical frame to the OM, the OM performs de-disordering based on a logical frame sequence number and forwards data packets included in the logical frame.

[0338] On the OM, the OM arranges data packets in each preset logical frame data length range of the same data stream as a logical frame according to the de-disordering stream, the logical frame sequence number of each data stream is incremented, and the data packets of the same logical frame are identified by the same logical frame sequence number. The logical frame sequence number is used to rearrange the disordered logical frames on the OM.

[0339] The exemplary embodiments provided by the present application have the following effects:

[0340] (1) The present application provides a data transmission method based on logical frames, which has more equal data length compared with the related art data transmission method based on data packets, and can avoid the problem of poor balancing effect caused by large length difference of data packets. Moreover, the data packets in the same logical frame correspond to the same transmission path, which can shield the delay difference of multiple paths to some extent, so that the logical frame disordering rate is lower, thereby reducing the cache requirement and implementation difficulty of de-disordering.

[0341] (2) The data stream conversion and load balancing method on the IM divides the data stream between the IM and the OM into a load balancing stream and a de-disordering stream according to functions, and decouples the two, which can reduce the cache requirement of de-disordering while realizing load balancing of the data stream with coarse-grained combined identification, reducing load balancing conflicts on the IM, improving load balancing effect, reducing multiple path delay difference, and further reducing the cache requirement of de-disordering; at the same time, the construction of the load balancing stream can also be used for load balancing on the CM, which greatly reduces the storage space overhead on the CM.

[0342] (3) The load balancing method on the CM performs polling load balancing based on all data streams, which greatly reduces load balancing conflicts on the CM, improves load balancing effect, reduces multiple path delay difference, and further reduces the cache requirement of de-disordering.

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

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

[0345] Therefore, in the case where the data transmission apparatus 700 is used as a data transmission apparatus on the IM side, the following scheme is executed:

[0346] The receiving module 710 is configured to receive a first data packet, where the first data packet is a data packet to be transmitted in a logical frame, and includes a first balanced sequence number field.

[0347] The determination module 720 is configured to determine a value corresponding to the first balancing sequence number field, wherein logical frames with the same logical frame sequence number have different corresponding 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, so the specific implementation scheme and effect of the data transmission device on the IM side are similar to the description and effect of the data transmission method on the IM side, and will not be repeated here.

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

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

[0351] The determination module 720 is configured to determine 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 configured to send the first data packet, where the first data packet includes the first equalization sequence information. The data transmission device on the CM side can implement various CM-side data transmission methods. Therefore, the specific implementation scheme and effects of the data transmission device on the CM side are similar to the description and effects of the CM-side data transmission method and are not further described 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, the following steps are specifically performed:

[0354] Determining, based on the first logical frame and a destination port of the destination device, whether the first data packet is a first packet of the first logical frame;

[0355] First equalization sequence information corresponding to the first data packet is determined based on the judgment result.

[0356] Optionally, when the determining module 720 determines 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, the determining module 720 specifically includes:

[0357] obtain a first identifier of a second data packet based on the first logical frame and a destination port of the destination device, the second data packet being a previous data packet of the first data packet when the first data packet and the second data packet have a same port-level flow identifier, the first identifier being used to indicate whether a corresponding data packet is a tail packet of a corresponding logical frame, the port-level flow identifier comprising a source port identifier and a destination port identifier of the destination device;

[0358] determine whether the first data packet is a head packet of the first logical frame according to the first identifier corresponding to the second data packet.

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

[0360] determining a port-level flow identifier corresponding to the first data packet in the first logical frame and a first table, the first table storing a mapping relationship between the port-level flow identifier and a first identifier of a first transmitted data packet, the first transmitted data packet comprising the second data packet;

[0361] finding the first identifier corresponding to the second data packet in the first table based on the port-level flow identifier.

[0362] Optionally, the determining module 720, when performing the determining of whether the first data packet is the head packet of the first logical frame according to the first identifier corresponding to the second data packet, specifically comprises:

[0363] if the first identifier corresponding to the second data packet indicates that the second data packet is a tail packet of a corresponding logical frame, determining that the first data packet is the head 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 a tail packet of a corresponding logical frame, determining that the first data packet is not the head packet of the first logical frame.

[0365] Optionally, the data transmission apparatus further comprises:

[0366] after determining whether the first data packet is the head packet of the first logical frame according to the first identifier corresponding to the second data packet, determining the first identifier corresponding to the first data packet based on a result of the determining;

[0367] updating the first table by using the first identifier corresponding to the first data packet.

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

[0369] if the determination result indicates that the first data packet is not the first packet of the first logical frame, determining that the first equalization sequence number corresponding to the first data packet is a second equalization sequence number, the second equalization sequence number being an 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, determining that the first equalization sequence number is a sum of a third equalization sequence number and a preset value, the third equalization sequence number being an equalization sequence number in a third data packet; the third data packet being a previous data packet of the first data packet with the same device-level flow identifier as the first data packet.

[0371] Optionally, the data transmission apparatus, when performing the obtaining of the second equalization sequence number, specifically comprises:

[0372] obtaining a port-level flow identifier corresponding to the first data packet and a second table, the port-level flow identifier comprising a source port identifier and a destination port identifier; the second table storing a mapping relationship between the port-level flow identifier and an equalization sequence number of a first transmitted data packet; the first transmitted data packet comprising the second data packet;

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

[0374] Optionally, the data transmission apparatus further comprises:

[0375] after the determination that the first equalization sequence number corresponding to the first data packet is the second equalization sequence number, if it is determined that the first data packet is a last packet of the first logical frame, deleting the second equalization sequence number from the second table.

[0376] Optionally, the data transmission apparatus, when performing the obtaining of the third equalization sequence number, specifically comprises:

[0377] obtaining a device-level flow identifier corresponding to the first data packet and first mapping relationship information, the device-level flow identifier comprising a destination device identifier, the first mapping relationship information comprising a mapping relationship between the destination device identifier and an equalization sequence number of a second transmitted data packet; the second transmitted data packet comprising the third data packet;

[0378] finding the third equalization sequence number in the first mapping relationship information based on the destination device identifier.

[0379] Optionally, the data transmission apparatus further comprises:

[0380] After determining that the first balanced sequence number is the sum of the third balanced sequence number and a preset value, if it is determined that the first data packet is not the last packet of the first logical frame, the first balanced sequence number is used to update the second table.

[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 executing the sending of the first data packet, specifically includes:

[0384] Based on the first balancing sequence information, determining a transmission path for the first data packet according to a preset load balancing mode, where the preset load balancing mode is a round-robin load balancing mode or a congestion-aware load balancing mode;

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

[0386] Figure 8 FIG. 8 is a schematic diagram showing the internal structure of a data transmission device 800 provided in an embodiment of the present application. 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 serves as the data transmission device on the CM side, the following scheme is implemented:

[0389] A receiving module 810 is configured to receive a first data packet, where the first data packet includes 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;

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

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

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

[0393] A first transmission path for the first data packet is determined based on the determination result.

[0394] Optionally, the determining module 820, in the execution of the 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, specifically comprises:

[0395] obtaining a first identifier of a third data packet based on the first logical frame and the destination device, the third data packet being a previous data packet of the first data packet with the same device-level flow identifier, the first identifier being used to indicate whether the corresponding data packet is a tail packet of the corresponding logical frame, and the device-level flow identifier comprising a source device identifier, a destination device identifier and a balance sequence number;

[0396] determining whether the first data packet is the first packet of the first logical frame according to the first identifier corresponding to the third data packet.

[0397] Optionally, the determining module 820, in the execution of the obtaining a first identifier of a third data packet based on the first logical frame and the destination device, specifically comprises:

[0398] determining a device-level flow identifier corresponding to the first data packet in the first logical frame and a third table; the third table storing a mapping relationship between the device-level flow identifier and a first identifier of a second transmitted data packet; and the second transmitted data packet comprising the third data packet;

[0399] finding the first identifier corresponding to the third data packet in the third table based on the device-level flow identifier.

[0400] Optionally, the determining module 820, in the execution of the determining whether the first data packet is the first packet of the first logical frame according to the first identifier corresponding to the third data packet, specifically comprises:

[0401] if the first identifier corresponding to the third data packet indicates that the third data packet is a tail packet of the corresponding logical frame, determining that the first data packet is 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 a tail packet of the corresponding logical frame, determining that the first data packet is not the first packet of the first logical frame.

[0403] Optionally, the data transmission apparatus further comprises:

[0404] after the determining whether the first data packet is the first packet of the first logical frame according to the first identifier corresponding to the third data packet, determining the first identifier corresponding to the first data packet based on the determination result;

[0405] updating the third table by using the first identifier corresponding to the first data packet.

[0406] Optionally, the first transmission path comprises a first transmission path number, and the determining module 820, when determining the first transmission path of the first data packet based on the determination result, specifically comprises:

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

[0408] If the determination result indicates that the first data packet is a first packet of the first logical frame, the first transmission path number is determined as a sum of a third transmission path number and a preset value, and the third transmission path number is a transmission path number of a 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 acquiring the second transmission path number, specifically comprises:

[0410] acquiring a device-level flow identifier corresponding to the first data packet and a fourth table, the fourth table storing a mapping relationship between a device-level flow identifier and a path number of a second transmitted data packet, and the second transmitted data packet comprising the third data packet;

[0411] finding the second transmission path number of the third data packet in the fourth table based on the device-level flow identifier.

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

[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 a last packet of the first logical frame, the second transmission path number is deleted from the fourth table.

[0414] Optionally, the data transmission device, when acquiring the third transmission path number, specifically comprises:

[0415] acquiring a system-level flow identifier corresponding to the first data packet and second mapping relationship information, the system-level flow identifier comprising a destination system identifier, and the second mapping relationship information comprising a mapping relationship between the system-level flow identifier and a path number of a third transmitted data packet, and the third transmitted data packet comprising the fourth data packet;

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

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

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

[0419] The embodiment of the present application provides a data transmission device, comprising: at least one processor and a memory; the memory stores computer execution instructions; and the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the data transmission method on the IM side and / or executes the data transmission method on the CM side.

[0420] The data transmission method provided by the embodiments of the present application will be introduced below.

[0421] The above method divides the data flow between the IM and the OM into multiple device-level flows, so that the logical frames with the same logical frame sequence number can be transmitted between the IM and the CM or between the CM and the OM through different transmission paths. However, each device-level flow is an equalization sequence number arranged according to the same arrangement mode, and the number of equalization sequence numbers is limited, so that a hash conflict is likely to occur, that is, the logical frames in different device-level flows are mapped to the same equalization sequence number based on different indexes. In the case of the hash conflict, the early release is likely to cause different data packets in the same logical frame to use different equalization sequence numbers, thereby affecting the load balancing effect, and the late release is likely to cause the equalization sequence number resources to be exhausted and occupy a large storage space. Therefore, when to release the equalization sequence number is a problem to be solved.

[0422] To solve the above technical problem, the overall inventive concept of the present application is how to provide a method applied to the field of communication networks and used for reducing the storage space of equalization sequence numbers.

[0423] The present application constructs a logical frame structure, as shown in Figure 9 The description of the logical frame data packet and other structures included in the logical frame is as described above, and will not be described here again. In the case of the hash conflict between the value of the first equalization sequence number field and the storage location, the value stored on the IM is not released, which can ensure the effectiveness of load balancing. After the hash conflict ends and the tail packet of the logical frame is assigned the value, the value stored on the IM is released, which avoids the disadvantages caused by the early release or the late release, and reduces the storage space of the value.

[0424] Figure 10 A flowchart of a data transmission method on the IM side provided by another embodiment of the present application is shown. As shown in Figure 10 The data transmission method comprises the following steps.

[0425] S1010, receive a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, the first data packet comprising first equalization sequence information.

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

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

[0428] S1020, determine 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.

[0429] It should be understood that each data packet comprises an equalization sequence number field, which is used for load balancing of the logical frame. As shown in Figure 9 All data packets in the same logical frame comprise an equalization sequence number of the logical frame, and the equalization sequence number is a value corresponding to the equalization sequence number field.

[0430] In this embodiment, all data packets in the logical frame with the same equalization sequence number correspond to the same transmission path between the IM and the CM. The present embodiment provides a data transmission method based on a logical frame, which has a more equal data length compared with the data transmission method based on a data packet in the related art, and can avoid the problem of poor equalization effect caused by large length difference of data packets. Moreover, the data packets in the same logical frame correspond to the same transmission path, which can shield the delay difference in multiple paths to a certain extent, so that the out-of-order rate of the logical frame is relatively lower.

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

[0432] Therefore, the equalization sequence number can be used to decouple the load balancing flow and the out-of-order flow. According to the equalization sequence number, the present embodiment performs load balancing of the logical frame between the IM and the CM, so that even in the face of logical frames with the same logical frame sequence number, the present embodiment can make the data packets in different logical frames with the same logical frame sequence number correspond to different equalization sequence numbers. Therefore, according to the equalization sequence number, the present embodiment can make the data packets in different logical frames with the same logical frame sequence number be transmitted in different paths, which improves the load balancing effect of the logical frame between the CM and the CM compared with the load balancing manner according to the logical frame sequence number in the related art.

[0433] In an alternative embodiment, source device A (i.e. a certain IM) sends data streams to destination device B (a certain OM), where destination device B comprises port P1 and port 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 adopts the

source device, destination port

[0434] As described above, there must be logical frames with the same logical frame sequence number between the two data streams, and the logical frames with the same logical frame sequence number correspond to the same transmission path, which ultimately causes the two logical frames to use the same transmission path between the IM and the CM, and there is the disadvantage of poor load balancing effect.

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

[0436] In another optional embodiment, different logical frames of different device-level flows 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 sends data stream S2 to destination device B2 (another OM). This embodiment adopts the coarse granularity of [destination device], and it can be known that data stream S1 and data stream S2 are different data streams. If the destination device B1 receives the first logical frame in the data stream S1, and the destination device B2 receives the second logical frame in the data stream S2. The first logical frame and the second logical frame belong to different device-level flows, and there is a possibility that the balanced sequence number is the same, for example: the balanced sequence number is q. In this case, the two logical frames use the same balanced sequence number, and the number of first hash collisions is 1.

[0437] S1030. When a release condition is met, release a corresponding value, where the release condition is associated with the first hash collision number and whether the first data packet is the last packet of the logical frame.

[0438] Optionally, the release condition includes: the first hash collision number is a preset number, and the first data packet is the last packet of the corresponding logical frame.

[0439] It should be understood that the preset number can be 0, which is used to indicate that there is no hash conflict in the storage location corresponding to the value. Release is also called clearing in the embodiment of the present application.

[0440] In the embodiment of the present application, if there is a hash conflict in the storage location corresponding to the value of the first balance sequence number field, the value is not released, thereby ensuring the effectiveness of load balancing. After the hash conflict ends and the last packet of the logical frame is assigned the value, the value is released, avoiding the disadvantages of premature or late release and reducing the storage space overhead of the value.

[0441] In one possible embodiment, Figure 9 As shown, the logical frame includes not only the logical frame data packet, but also 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.

[0442] The logical frame end marker is Figure 9 The relevant description in Figure 2 The relevant description in is similar, exemplary:

[0443] The logical frame end identifier is used to identify the end of the corresponding logical frame. Figure 9 As shown, the logical frame also includes a logical frame end identifier. For example, the logical frame end identifier can take a value of 0 or 1. When the logical frame end identifier is 1, it indicates that the logical frame has not ended; when the logical frame end identifier is 0, it indicates that the logical frame has ended.

[0444] It should be understood that the value of the logical frame end identifier is variable since the received data packet is variable in real time. In other words, when the received data packet is the last data packet of the logical frame, the logical frame end identifier is modified to 0, and when the received data packet is not the last data packet of the logical frame, the logical frame end identifier is kept to 1.

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

[0446] The logical frame Figure 9 The structure of the logical frame provided Figure 2 Compared with the structure of the logical frame provided, the logical frame start identifier is added. The following exemplary description is made for the logical frame start identifier:

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

[0448] The logical frame start identifier is used to identify the start of the corresponding logical frame. In an optional embodiment, as Figure 9 shown, the logical frame also includes the logical frame start identifier. For example, the logical frame start identifier can take the value of 0 or 1, which indicates that a new logical frame is not received when the logical frame end identifier is 1, and which indicates that a new logical frame is received when the logical frame end identifier is 0.

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

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

[0451] By adding the logical end identifier and the logical frame start identifier in the logical frame, the embodiment can determine whether the value has been written in the equal sequence number field of all data packets in the corresponding logical frame, further determine the first hash collision number, and further determine whether there is a hash collision in the storage location corresponding to the value according to the first hash collision number. In the case that there is no hash collision in 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, and the storage space overhead of the value is reduced.

[0452] It should be noted that, asFigure 9 As shown in the figure, the data packet can further include a data packet payload.

[0453] Optionally, the data packet can further include a logical frame sequence number field, a source device identification field, a destination port identification field, a destination device identification field, a data packet payload, etc. Among them, as shown in the figure, the logical frame sequence number field is used to identify the logical frame sequence number of the logical frame where the data packet is located, and is further used for deordering of the logical frame. The source device identification field is used to identify the source device, the destination port identification field is used to identify the destination port, and the destination device identification field is used to identify the destination device. Figure 9

[0454] In other words, the logical frame can include at least but not limited to the following fields:

[0455] The source device identification field is the unique identification of the first device where the data packet enters.

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

[0457] The destination device identification field is the unique identification of the destination device to which the data packet is forwarded.

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

[0459] On the basis of the above embodiments, the technical solutions of the present application will be described in more detail in combination with several specific embodiments.

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

[0461] Step 1021, obtaining a first identification corresponding to the first data packet, the first identification being 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 identification includes at least one of the source port or the destination port.

[0463] As another optional implementation, the first data packet further includes a logical frame sequence number corresponding to the logical frame where the first data packet is located; and the port-level flow identification further includes the logical frame sequence number.

[0464] Step 1022, determining the value corresponding to the first equalization sequence information and the first hash collision number according to the first identification.

[0465] In the embodiments of the present application, according to the first identification corresponding to the first data packet, the position of the first data packet in the corresponding logical frame can be accurately identified, and the value corresponding to the first equalization sequence number field in the first data packet is determined, which can ensure that the first hash collision number is accurately obtained.​

[0466] As a specific embodiment, Figure 11 A flow diagram of another data transmission method provided by another embodiment of the application is shown. In another data transmission method, the equalization sequence number corresponding to the first data packet is determined according to the logical frame start identifier. As shown in the figure, Figure 11 The data transmission method comprises the following steps:

[0467] S1101, obtaining 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 at least includes: a destination port; a mapping relationship in the fifth table for storing the value corresponding to the equalization sequence number field of the first transmitted data packet; and the first transmitted data packet at least includes a second data packet.

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

[0470] It should be understood that the fifth table, also known as the equalization sequence number table on the IM, can have the same or different forms as Table 2, and the present embodiment does not make specific limitations thereon. As an optional implementation, the fifth table can be as shown in Table 5:

[0471] Table 5 Fifth table

[0472] Port-level flow identification Balancing sequence number [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 the logical frames of the data stream with the same

source port, destination port

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

[0475] S1102, determining 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, S103 is executed. If the first data packet is not the first packet of the corresponding logical frame, S104 is executed.

[0477] S1103: Determine a balanced sequence number corresponding to the first data packet based on the device-level flow identifier and the first mapping relationship information set.

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

[0479] S1104 : Search the fifth table for a balanced sequence number corresponding to the first data packet based on the port-level flow identifier.

[0480] In one possible embodiment, 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 balanced sequence number into the first balanced sequence number field in the first data packet.

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

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

[0484] Optionally, if the first data packet is the last packet of the corresponding logical frame, this embodiment may execute S1105; if the first data packet is not the last packet of the corresponding logical frame, this embodiment may execute S1105 and S1106.

[0485] In the above embodiment, 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 a corresponding balanced sequence number. The balanced sequence number ensures that all data packets within the same logical frame are allocated to the same transmission path between the IM and the CM, while ensuring that logical frames with different logical frame sequence numbers are allocated to different transmission paths between the IM and the CM, thereby improving load balancing between the IM and the OM.

[0486] As another specific embodiment, Figure 12 A flow chart of another data transmission method on the IM side provided in another embodiment of the present application is shown.

[0487] In this embodiment, the balanced sequence number is stored on the IM by means of hash index. As shown in Figure 12 The data transmission method comprises the following steps:

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

[0489] The second value is a value corresponding to the second balanced sequence information. The step of obtaining the second value comprises:

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

[0491] The port-level flow identifier and the fifth table are as previously described, and will not be described here.

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

[0493] Step c12, searching for the second value in the fifth table based on the port-level flow identifier.

[0494] The third value is a value corresponding to the third balanced sequence information. The step of obtaining the third value comprises:

[0495] Step c21, obtaining a device-level flow identifier corresponding to the first data packet and a first mapping relationship information set, the device-level flow identifier comprising a destination device identifier, and the first mapping relationship information set comprising a mapping relationship between the device-level flow identifier and a value corresponding to the balanced sequence information of the second transmitted data packet; the second transmitted data packet comprising at least a third data packet.

[0496] Step c21, obtaining the third value in the first mapping relationship information set based on the device-level flow identifier.

[0497] S1202, searching for a used number of storage locations corresponding to the value in the sixth table, and determining a first hash collision number according to the used number.

[0498] It should be understood that the sixth table is also referred to as a hash mapping table of the balanced sequence number.

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

[0500] Table 6 Sixth Table

[0501] Hash value Balancing sequence number Number of times used 0 to L Any value between 0 and N 0 or 1 or 2, etc. … … …

[0502] The sixth table can store a mapping relationship between the balance sequence number and the used number of times, a mapping relationship between the hash value and the balance sequence number, and a mapping relationship between the hash value, the balance sequence number and the used number of times. The hash value is obtained by performing hash mapping on the port-level flow identifier (for example,

source port, destination port

destination port

[0503] The fifth table or the sixth table stores the balance sequence number of the logical frame, and the subsequent data packets of the logical frame are marked with the same balance sequence number, so that the same logical frame is balanced to the same transmission path between the IM and the CM. Since different logical frames from the same source port or source device to the same destination port can be sequentially arrived, the

source port, destination port

destination port

source port, destination port

destination port

[0504] In this embodiment, the balance sequence number is stored on the IM by using the hash index, so that the storage space of the balance sequence number can be saved, and the scalability of the load balancing implementation is enhanced, and the application environment network of a super large scale can be applied.

[0505] S1203, determining 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, the following S1204 is executed, and if the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, the following S1206 is executed.

[0507] S1204, determining whether the first conflict number is a preset number.

[0508] If the first condition is met, S1205 is executed, and if the second condition is met, S126 is executed. The first condition includes that the first identifier indicates that the first data packet is the first packet of the corresponding logical frame, and the first hash conflict number 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 conflict number is not the preset number; and the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame.

[0509] S1205, determining that the value corresponding to the first balance sequence information is the sum of a third value and a preset value. The third value is the value corresponding to the third balance 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, determining that the value corresponding to the first balance sequence information is a second value.

[0512] In a possible embodiment, as shown in FIG. 12B, after S1205, determining that the value corresponding to the first balance sequence information is a sum of a third value and a preset value, the data transmission method further includes: Figure 12

[0513] S1207, updating the fifth table by using the value corresponding to the first balance sequence information.

[0514] Specifically, if the first identifier corresponding to the first data packet indicates that the first data packet is not a tail packet of a corresponding logical frame, the fifth table is updated by using the value corresponding to the first balance sequence information.

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

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

[0517] In a possible embodiment, after S1205 or S1206, as shown in FIG. 12C, the data transmission method further includes: Figure 12

[0518] S1209, determining a transmission path of the first data packet according to the value corresponding to the first balance sequence information and a preset load balancing manner.

[0519] The preset load balancing manner is a round robin load balancing manner or a congestion-aware load balancing manner.

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

[0521] For example, the IM has two ports P11 and P12, the CM has three ports P21, P22 and P23, and there are six transmission paths between the IM and the CM, which are P11-P21, P11-P22, P11-P23, P12-P21, P12-P22 and P12-P23. After the balance sequence number is written in the first data packet, if the preset load balancing manner is a round robin load balancing manner, the transmission paths between the IM and the CM are polled, and when it is determined that there is an idle transmission path, the first data packet is transmitted from the IM to the CM through the idle transmission path.

[0522] ​​In the data transmission process between IM and CM, the embodiment of the present application can realize automatic adjustment of the number of times used. In general, the embodiment can determine the first number of hash collisions based on the 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 usage count is related to the reception of data packets in logical frames using the same balanced sequence number. For example, if logical frames 11, 21, and 31 share the same balanced sequence number, and if the first packet of logical frame 41 is received, and logical frame 41 also shares the same balanced sequence number, the usage count of the corresponding storage location in logical frame 41 is incremented by 1. If the last packet of logical frame 11 is subsequently received, the usage count of the corresponding storage location is decremented by 1. If logical frame 41 contains only one data packet, the usage count is neither incremented nor decremented.

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

[0526] It should be understood that a value may be used or unused. If it is used, the first hash collision count is the number of uses minus 1. If it is unused, the first hash collision count is 0.

[0527] For example, when the value is not used, the corresponding usage count is 0, indicating that there is no hash conflict. For another example, when the value is used, the corresponding usage count is 1 or 2 or another integer. If the usage count of the storage location corresponding to a certain value is 1, then the first hash conflict count is 0, indicating that there is no hash conflict. If the usage count is 2, the first hash conflict count is 1. If the usage count is 3, the first hash conflict count is 2.

[0528] In this embodiment, the first hash collision count can be accurately identified by the usage count of the storage location corresponding to the value, thereby providing technical support for determining the release timing of the value.

[0529] In one possible embodiment, 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 last packet of the corresponding logical frame.

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

[0532] S1212, determine the usage times of the storage location corresponding to the value as the sum of the used times of the storage location corresponding to the value and a preset value.

[0533] The step of obtaining the used times of the storage location corresponding to the value comprises:

[0534] Obtain a sixth table, and find the used times of the storage location corresponding to the value based on the sixth table.

[0535] S1213, determine the usage times of the storage location corresponding to the value as the used times of the storage location corresponding to the value.

[0536] Alternatively, after S1204, if the conflict times are not the preset times, the data transmission method further comprises the scheme described in S1211-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, the data transmission method further comprises:

[0538] S1214, determine whether the first identifier indicates that the first data packet is the last packet of the corresponding logical frame.

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

[0540] S1215, determine the usage times of the storage location corresponding to the value as the difference between the used times of the storage location corresponding to the value and a preset value.

[0541] S1216, determine the usage times of the storage location corresponding to the value as the used times of the storage location corresponding to the value.

[0542] After S1212, determining the usage times of the storage location corresponding to the value as the sum of the used times of the storage location corresponding to the value and a preset value, or after S1215, determining the usage times of the storage location corresponding to the value as the difference between the used times of the storage location corresponding to the value and a preset value, the data transmission method further comprises:

[0543] S1217, update the sixth table using the usage times of the storage location corresponding to the value.

[0544] Optionally, after determining the usage times of the storage location corresponding to the value according to the first identifier, updating the sixth table using the usage times of the storage location corresponding to the value comprises:

[0545] When the determination of the usage times of the storage location corresponding to the value is the sum of the used times of the storage location corresponding to the value and a preset value, the value corresponding to the first balance sequence number information and the usage times of the storage location corresponding to the value are written into the sixth table respectively;

[0546] When the determination of the usage times of the storage location corresponding to the value is the difference between the used times of the storage location corresponding to the value and a preset value, if the usage times of the storage location corresponding to the value is 0, the sixth table is emptied; if the usage times of the storage location corresponding to the value is not 0, the usage times of the storage location corresponding to the value is written into the sixth table.

[0547] In other words, the IM performs the following operations for each received data packet:

[0548] It is determined 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, the sixth table can be searched to determine whether the storage location corresponding to the corresponding balance sequence number is used according to the usage times. If the usage times is 0, it indicates that the storage location corresponding to the corresponding balance sequence number is not used, and the corresponding balance sequence number can be written into the storage location corresponding to the corresponding balance sequence number in the sixth table. If the usage times is 1, it indicates that the storage location corresponding to the corresponding balance sequence number has been used once, and there is no hash conflict. If the usage times is 2 or a value greater than 2, it indicates that there is a hash conflict. In the two scenarios of the usage times being 0 and the usage times not being 0, different balance sequence number processing operations exist, and the details are as follows:

[0550] 11) The sixth table is obtained.

[0551] 12) If the usage times of the storage location corresponding to the balance sequence number of the data packet in the sixth table is 0, the storage information of the storage location corresponding to the balance sequence number of the data packet is determined as the balance sequence number after the balance sequence number corresponding to the third data packet is incremented by 1.

[0552] In an optional implementation, if the usage times of the storage location corresponding to the balance sequence number of the data packet in the sixth table is 0, and the data packet is also the last packet of the corresponding logical frame, the balance sequence number after the increment is written into the data packet, and the data packet is forwarded from the IM to the CM according to the balance sequence number after the increment.

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

[0554] 13) If the corresponding storage location of the equalization sequence number corresponding to the data packet has a corresponding usage frequency of 0 in the sixth table, then the storage information of the corresponding storage location of the equalization sequence number corresponding to the data packet is determined as the equalization sequence number corresponding to the second data packet.

[0555] In another alternative implementation, if the corresponding storage location of the equalization sequence number corresponding to the data packet has a corresponding usage frequency of 0 in the sixth table, and the data packet is not the tail packet of the corresponding logical frame, then the corresponding usage frequency in the sixth table is incremented by 1, and the incremented equalization sequence number and the incremented usage frequency are written into the sixth table. The incremented equalization sequence number can also be written into the data packet, and the data packet is forwarded from the IM to the CM according to the incremented equalization sequence number.

[0556] In another alternative implementation, if the corresponding storage location of the equalization sequence number corresponding to the data packet has a corresponding usage frequency of 0 in the sixth table, and the data packet is not the tail packet of the corresponding logical frame, then the corresponding usage frequency in the sixth table is incremented by 1, and the incremented equalization sequence number and the incremented usage frequency are written into the sixth table. The incremented equalization sequence number can also be written into the data packet, and the data packet is forwarded from the IM to the CM according to the incremented equalization sequence number.

[0557] If the received data packet is not the head packet of the corresponding logical frame, the sixth table can be searched, and in the case of meeting the release condition, the corresponding equalization sequence number is released. Moreover, the present embodiment can combine the case of whether the received data packet is the tail packet of the corresponding logical frame, and different equalization sequence number processing operations exist, specifically:

[0558] 21) Obtain the sixth table;

[0559] 22) If the corresponding storage location of the equalization sequence number corresponding to the data packet corresponds to the usage frequency in the sixth table is not 0 (for example, the usage frequency is 3), and the data packet is also the tail packet of the corresponding logical frame, then the usage frequency corresponding in the sixth table is reduced by 1; if the usage frequency becomes 0, it means that the related logical frame (possibly one or more, multiple when hash collision) corresponding to the equalization sequence number has been completely processed by the equalization sequence number processing module in the IM, then the equalization 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 equalization sequence number corresponding to the data packet in the sixth table is emptied; if the usage frequency is still greater than 0, it means that the related logical frame corresponding to the equalization sequence number has not been completely processed by the equalization sequence number processing module in the IM, then the usage frequency after reduction by 1 is written into the equalization sequence number table, and the equalization 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 not the first packet of the corresponding logical frame nor the tail packet of the corresponding logical frame, then the equalization sequence number is written into the data packet, and the data packet is forwarded from the IM to the CM.

[0561] It should be understood that when a hash collision of a certain value occurs, the first hash collision frequency recorded in the sixth table is identified by the logical frame start identifier, and whether all hash collisions of the value end is determined by the number of logical frame end identifiers. For example, the equalization sequence number processing module in the IM receives the first packet of the first logical frame (which can be indicated as the first packet by the logical frame start identifier), records the equalization sequence number of the first logical frame in the sixth table, and records the usage frequency as 1; before receiving the tail packet of the first logical frame (which can be indicated as the tail packet by the logical frame end identifier), the equalization sequence number processing module in the IM receives the first packet of the second logical frame, and the equalization sequence number of the second logical frame is the same as that of the first logical frame, indicating that a hash collision of the value has occurred, and the usage frequency corresponding to the value is updated to 2 (i.e., the first hash collision frequency is 1). When the equalization sequence number processing module in the IM receives the tail packet of the first logical frame and the tail packet of the second logical frame respectively, and does not receive the first packet of a new logical frame, the equalization sequence number processing module in the IM clears the equalization sequence number and the corresponding usage frequency in the sixth table that the hash collision has ended.

[0562] In the present embodiment, the logical frame start identifier and the logical frame end identifier of a logical frame can determine that all data packets in the logical frame pass through the equalization sequence number processing module in the IM. Therefore, the logical frame start identifier and / or the logical frame end identifier can determine the change of the usage frequency of the storage location corresponding to the value in the sixth table, and further determine the change of the first hash collision frequency.

[0563] The above is an exemplary description of another load balancing process for the data stream identified by the port level on the IM. Since the transmission path between the IM and the OM includes the transmission path between the IM and the CM and the transmission path between the CM and the OM, and the equalization sequence number can convert the data stream identified by

source port, destination port

destination device

source device, destination device

[0564] Exemplarily, Figure 13 A flowchart of a data transmission method provided by another embodiment of the application is shown. As shown in the figure, Figure 13 The data transmission method includes:

[0565] S1310, 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 value corresponding to first equalization sequence information.

[0566] S1320, determining a path number of the first data packet and a second hash collision number.

[0567] S1330, releasing the corresponding path number in the case of meeting a release condition, wherein the release condition is associated with the second hash collision number and whether the first data packet is a tail packet of the logical frame.

[0568] Optionally, the release condition includes that the second hash collision number is a preset number and the first data packet is a tail packet of the corresponding logical frame.

[0569] It should be understood that the preset number can be 0, indicating that there is no hash collision of the path number.

[0570] On the basis of the above embodiments, the technical solutions of the application will be described in more detail in combination with several specific embodiments.

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

[0572] Step 1321, obtaining a first identifier corresponding to the first data packet, the first identifier being used to indicate whether the first data packet is a head packet of the corresponding logical frame.

[0573] Step 1322, determining the path number of the first data packet and the second hash collision number according to the first identifier.

[0574] In the embodiments of the application, according to the first identifier corresponding to the first data packet, the position of the first data packet in the corresponding logical frame can be accurately identified, and then the path number is determined, so that the second hash collision number can be accurately obtained.

[0575] As a specific embodiment, Figure 14 A flowchart of another data transmission method provided by another embodiment of the present application is shown. In another data transmission method, the path number corresponding to the first data packet is determined according to the logical frame start identifier. As shown in the figure, the data transmission method comprises the following steps. Figure 14

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

[0577] The first identifier includes a logical frame start identifier. The device-level flow identifier includes a source device identifier, a destination device identifier and a balance 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; and the second transmitted data packet includes at least a third data packet.

[0578] It should be understood that the seventh table is also called a CM routing table. Its form can be the same as or different from Table 4, and the present embodiment does not make specific limitations thereon. As an optional implementation, the seventh table is shown in Table 7:

[0579] Table 7 Seventh Table

[0580] Device-level flow identification Balancing sequence number [Source device, destination device, balancing sequence number] Any value between 0 and M

[0581] 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; and the third transmitted data packet includes at least a fourth data packet.

[0582] S1402, determining whether the first identifier represents the first data packet as the first packet of the corresponding logical frame.

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

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

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

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

[0587] In one possible embodiment, as Figure 14 ​As shown, after S1403, the embodiment can perform S1405, or perform S1405 and S1406; or after S1404, the embodiment can perform S1405:

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

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

[0590] Optionally, if the first data packet is a tail packet corresponding to a logical frame, the embodiment can perform S1405; if the first data packet is not a tail packet corresponding to a logical frame, the embodiment can perform S1405 and S1406.

[0591] As another specific embodiment, Figure 15 A flowchart of another data transmission method provided by the embodiment of the application is shown. As shown in the figure, Figure 15 The data transmission method comprises:

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

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

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

[0595] The device-level flow identifier and the seventh table are as described above, and will not be described here.

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

[0597] The step of obtaining the path number of the fourth data packet comprises:

[0598] Step d21, obtaining a system-level flow identifier corresponding to the first data packet and a second mapping relationship information set, the system-level flow identifier comprising a destination system, and the second mapping relationship information set comprising a mapping relationship between a device-level flow identifier and a path number of a third transmitted data packet; the third transmitted data packet at least comprising the fourth data packet.

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

[0600] S1502, finding a used number of storage locations corresponding to the path number of the first data packet based on the eighth table, and determining a second hash collision number according to the used number.

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

[0602] Table 8 Eighth table

[0603]

[0604] The eighth table stores a mapping relationship between the path number and the used number of times.

[0605] S1503, determining whether the first identifier indicates that the first data packet is a first packet of a 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, the following S1504 is executed, and if the first identifier indicates that the first data packet is not the first packet of the corresponding logical frame, the following S1506 is executed.

[0607] S1504, determining whether the second hash collision number is a preset number.

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

[0609] S1505, determining that the path number of the first data packet is the sum of the path number of a fourth data packet and a preset value.

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

[0611] It should be understood that the preset value can be 1, 2, 3, etc., and the embodiments of the present application do not make specific limitations thereon.

[0612] 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, the value obtained by adding 1 to the path number of the third data packet is used as the path number of the first data packet.

[0613] S1506, determining that the path number of the first data packet is the path number of the third data packet.

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

[0615] S1507, updating 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 last packet of the corresponding logical frame, the seventh table is updated using the path number of the first data packet.

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

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

[0619] In the process of data transmission between the CM and the OM, the embodiments of the present application can realize automatic adjustment of the usage frequency. In general, the embodiments can determine the second hash collision frequency according to the first identifier, and specifically include:

[0620] S13221, determining, according to the first identifier, a usage frequency of the storage location corresponding to the path number.

[0621] S13222, determining, according to the usage frequency of the storage location corresponding to the path number, the second hash collision frequency. The second hash collision frequency is the hash collision frequency of the storage location corresponding to the path number.

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

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

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

[0625] S1510, determining that the usage frequency of the storage location corresponding to the path number is the sum of the used frequency of the storage location corresponding to the path number and a preset value.

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

[0627] Obtaining an eighth table and finding the used frequency of the storage location corresponding to the value based on the eighth table.

[0628] The eighth table stores the mapping relationship between the path number and the used frequency.

[0629] S1511, determining that the usage frequency of the storage location corresponding to the path number is the used frequency of the storage location corresponding to the path number.

[0630] Alternatively, after S1504, if the collision frequency is not the preset frequency, the data transmission method further includes the schemes described in S1509-S1511.

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

[0632] S1512, determining whether the first identifier indicates that the first data packet is a last packet of the corresponding logical frame.

[0633] If the first identifier indicates that the first data packet is a last packet of the corresponding logical frame, S1513 is performed; if the first identifier indicates that the first data packet is not a last packet of the corresponding logical frame, S1514 is performed.

[0634] S1513, determining that the usage number of the storage location corresponding to the path number is a difference between the used number of the storage location corresponding to the path number and a preset value.

[0635] S1514, determining that the usage number of the storage location corresponding to the path number is the used number of the storage location corresponding to the path number.

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

[0637] S1515, updating the eighth table by using the usage number of the storage location corresponding to the path number.

[0638] Optionally, after the usage number of the storage location corresponding to the path number is determined according to the first identifier, updating the eighth table by using the usage number of the storage location corresponding to the path number comprises:

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

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

[0641] In other words, the CM performs the following operations every time a data packet is received:

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

[0643] If the received data packet is the first packet of the corresponding logical frame, the eighth table can be searched to determine whether the corresponding path number storage location is used by using the number of times. If the number of times is 0, it indicates that the corresponding path number storage location in the eighth table is not used. The corresponding path number storage location in the eighth table can be written with the corresponding path number. If the number of times is 1, it indicates that the corresponding path number storage location in the eighth table is used once and there is no hash collision. If the number of times is 2 or more, it indicates that there is a hash collision. In the two scenarios of the number of times being 0 and the number of times not being 0, different path number processing operations exist, and the specific operations are as follows:

[0644] 31) The eighth table is obtained.

[0645] 32) If the corresponding path number storage location of the data packet in the eighth table corresponds to the number of times being 0, the storage information of the corresponding path number storage location of the data packet is determined as the path number after the corresponding path number of the fourth data packet is incremented by 1.

[0646] In an optional implementation, if the corresponding path number storage location of the data packet in the eighth table corresponds to the number of times being 0, and the data packet is also the last packet of the corresponding logical frame, the data packet is forwarded from the CM to the OM according to the path number after the increment.

[0647] In another optional implementation, if the corresponding path number storage location of the data packet in the eighth table corresponds to the number of times being 0, and the data packet is not the last packet of the corresponding logical frame, the number of times in the eighth table is incremented by 1, and the incremented number of times is written into the eighth table. The data packet can also be forwarded from the CM to the OM according to the path number after the increment.

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

[0649] In an optional implementation, if the corresponding path number storage location of the data packet in the eighth table corresponds to the number of times not being 0, and the data packet is also the last packet of the corresponding logical frame, the data packet is forwarded from the CM to the OM according to the corresponding path number of the third data packet.

[0650] In another optional implementation, if the corresponding path number storage location of the data packet in the eighth table corresponds to the number of times not being 0, and the data packet is not the last packet of the corresponding logical frame, the number of times in the eighth table is incremented by 1, and the incremented number of times is written into the eighth table. The data packet can also be forwarded from the CM to the OM according to the corresponding path number of the third data packet.

[0651] If the received data packet is not the first packet of the corresponding logical frame, the eighth table can be searched, and in the case of meeting the release condition, the corresponding path number is released. In addition, the present embodiment can combine the case of whether the received data packet is the last packet of the corresponding logical frame, and different path number processing operations exist, specifically:

[0652] 41) Obtain the eighth table;

[0653] 42) If the corresponding path number of the data packet corresponds to the storage location with a usage frequency of 0 in the eighth table, and the data packet is also the last packet of the corresponding logical frame, the usage frequency in the eighth table is reduced by 1; if the usage frequency becomes 0, it indicates that the related logical frame (possibly one or more, multiple in the case of hash conflict) corresponding to the path number has been completely passed through the load balancing module in the CM, then the data packet is forwarded from the CM to the OM, and the path number corresponding to the data packet in the eighth table is emptied; if the usage frequency is still greater than 0, it indicates that the related logical frame corresponding to the path number has not been completely passed through the load balancing module in the CM, the reduced usage frequency is written into the eighth table, and the data packet is forwarded from the CM to the OM.

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

[0655] It should be understood that the above Figure 11 In the embodiment shown, due to hash conflict, multiple logical frames may be mapped to the same balanced sequence number. For the CM, when the logical frames are indexed by the same device-level flow identifier (for example, [source device, destination device, balanced sequence number]), there are multiple logical frame start identifiers and logical frame end identifiers,

[0656] Therefore, the eighth table provided by the CM records the number of logical frames with the same device-level flow identifier hashed to use the same balanced sequence number (i.e., the usage frequency of the value corresponding to the storage location in the sixth table).

[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, provides the next path number corresponding to the first packet of the new logical frame for the subsequent data packet of the new logical frame, and forwards the subsequent data packet 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 corresponding 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 the number of logical frames indexed by the hash of the same device-level flow identifier is at least one, and 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 type of load balancing on the IM and CM. It should be understood that because multipath load balancing provided by related technologies can cause logical frame reordering, related technologies perform reordering on the OM based on the logical frame sequence number. Due to the serious load balancing conflicts in related technologies, this increases latency and latency variation during the load balancing process, making reordering on the OM more difficult.

[0660] Therefore, in other embodiments, based on another load balancing performed on the IM and CM, when the CM sends a logical frame to the OM, the OM de-sequences the logical frame based on the logical frame sequence number and forwards the data packets included in the logical frame.

[0661] On the OM, based on the de-ordered flows, the OM treats packets within the preset logical frame rated data length of each data stream as a single logical frame. The logical frame sequence number increases for each data stream, and packets within the same logical frame are identified by the same logical frame sequence number. The logical frame sequence number is used to reorder out-of-order logical frames on the OM.

[0662] Each exemplary embodiment provided in this application has the following effects:

[0663] In this embodiment of the present application, the first number of hash collisions is determined on the IM side using the logical frame end identifier and the logical frame start identifier, thereby saving storage space for the balanced sequence number while reducing the impact of hash collisions. Similarly, in this embodiment of the present application, the second number of hash collisions is determined on the CM side using the logical frame end identifier and the logical frame start identifier, thereby saving storage space for the path number while reducing the impact of hash collisions.

[0664] In addition to being applicable to traditional network devices such as routers and switches, the data transmission methods of the exemplary embodiments provided in this application can also be applied to application scenarios such as distributed decoupling devices and data center network (DCN) multi-switching device networking, and the embodiments of this application are not particularly limited.

[0665] Figure 16 FIG. 1 shows a schematic diagram of the internal structure of another data transmission device 1600 provided in an embodiment of the present application. Figure 16As shown, the data transmission apparatus 1600 comprises a receiving module 1610, a determining module 1620 and a releasing module 1630.

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

[0667] Therefore, in the case where the data transmission apparatus 1600 is used as a data transmission apparatus on the IM side, the following scheme is executed:

[0668] The receiving module 1610 is configured to receive 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 balance sequence information.

[0669] The determining module 1620 is configured to determine a value corresponding to the first balance 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.

[0670] The releasing module 1630 is configured to release the value corresponding to the first balance sequence information in the case where a release condition is met, 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.

[0671] Optionally, when determining the value corresponding to the first balance sequence information and the first hash collision number, the determining module 1620 specifically comprises:

[0672] obtaining a first identifier corresponding to the first data packet, the first identifier being used to indicate whether the first data packet is a head packet of a corresponding logical frame;

[0673] determining the value corresponding to the first balance sequence information and the first hash collision number according to the first identifier.

[0674] Optionally, the logical frame further comprises a logical frame start identifier and a logical frame end identifier.

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

[0676] Optionally, when determining the value corresponding to the first balance sequence information according to the first identifier, the determining module 1620 specifically comprises:

[0677] if a first condition is met, determining that the value corresponding to the first balance sequence information is a sum of a third value and a preset value, the third value being a value corresponding to third balance sequence information in a third data packet, and the third data packet and the first data packet having a same device-level flow identifier.

[0678] If the second condition is met, it is determined that the value corresponding to the first balance sequence information is a second value;

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

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

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

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

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

[0684] Obtain a port-level flow identifier corresponding to the first data packet and a fifth table, wherein the port-level flow identifier at least comprises a destination port identifier; and the fifth table stores a mapping relationship between a port-level flow identifier and a value corresponding to the balance sequence information of a first transmitted data packet; and the first transmitted data packet at least comprises a second data packet.

[0685] Obtain the second value based on the port-level flow identifier in the fifth table.

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

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

[0688] Obtain the third value based on the device-level flow identifier in the first mapping relationship information set.

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

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

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

[0692] After the corresponding value is determined, the corresponding value is written into the equalization sequence information.

[0693] Optionally, the determining module 1620, in determining the first hash collision number according to the first identifier, specifically comprises:

[0694] determining the usage number of the storage location corresponding to the value according to the first identifier;

[0695] determining the first hash collision number according to the usage number of the storage location corresponding to the value; the first hash collision number is the hash collision number of the storage location corresponding to the value.

[0696] Optionally, the determining module 1620, in determining the usage number of the storage location corresponding to the value according to the first identifier, specifically comprises:

[0697] if the third condition is met, determining the usage number of the storage location corresponding to the value as the sum of the used number of the storage location corresponding to the value and a preset number value;

[0698] if the fourth condition is met, determining the usage number of the storage location corresponding to the value as the used number of the storage location corresponding to the value;

[0699] if the fifth condition is met, determining the usage number of the storage location corresponding to the value as the difference between the used number of the storage location corresponding to the value and a preset number value;

[0700] The third condition comprises: 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 comprises: 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 comprises 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 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 apparatus is further configured to:

[0706] obtain a sixth table, wherein the sixth table stores a mapping relationship between the value and a used number of the storage location corresponding to the value;

[0707] obtain the used number of the storage location corresponding to the value based on the sixth table.

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

[0709] if it is determined that the use number of the storage location corresponding to the value is a sum of the used number of the storage location corresponding to the value and a preset value, or if it is determined that the use number of the storage location corresponding to the value is a difference between the used number of the storage location corresponding to the value and a preset value, update the sixth table by using the use number of the storage location corresponding to the value after determining the use number of the storage location corresponding to the value according to the first identifier.

[0710] Optionally, when the data transmission device updates the sixth table by using the use number of the storage location corresponding to the value, the data transmission device specifically comprises:

[0711] when it is determined that the use number of the storage location corresponding to the value is a sum of the used number of the storage location corresponding to the value and a preset value, write the value corresponding to the first balance sequence number information and the use number of the storage location corresponding to the value into the sixth table respectively;

[0712] when it is determined that the use number of the storage location corresponding to the value is a difference between the used number of the storage location corresponding to the value and a preset value, if the use number of the storage location corresponding to the value is 0, empty the sixth table; if the use number of the storage location corresponding to the value is not 0, write the use number of the storage location corresponding to the value into the sixth table.

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

[0714] determine the transmission path of the first data packet according to a preset load balancing mode based on the value corresponding to the first balance sequence information after determining the value corresponding to the first balance sequence information, wherein the preset load balancing mode is a round robin load balancing mode or a congestion-aware load balancing mode;

[0715] transmit the first data packet according to the transmission path.

[0716] The data transmission device on the IM side can execute various data transmission methods on the IM side, and therefore the specific execution scheme and effects of the data transmission device on the IM side are similar to the description and effects of the data transmission method on the IM side, which will not be described herein again.

[0717] In the case that the data transmission apparatus 1600 is a data transmission apparatus at the CM side, the following scheme is executed:

[0718] The receiving module 1610 is configured to receive a first data packet, the first data packet being a data packet currently to be transmitted in a logical frame, the first data packet comprising a value corresponding to first equalization sequence information.

[0719] The determining module 1620 is configured to determine a path number of the first data packet and a second hash collision number.

[0720] The releasing module 1630 is configured to release the corresponding path number in the case that a release condition is satisfied, wherein the release condition is associated with the second hash collision number and whether the first data packet is a tail packet of the logical frame.

[0721] Optionally, in the process in which the determining module 1620 determines the path number of the first data packet and the second hash collision number, the determining module 1620 specifically comprises:

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

[0723] determining the path number of the first data packet and the second hash collision number according to the first identifier.

[0724] Optionally, in the process in which the determining module 1620 determines the path number of the first data packet according to the first identifier, the determining module 1620 specifically comprises:

[0725] if a first condition is satisfied, determining that the path number of the first data packet is a sum of a path number of a fourth data packet and a preset value, the fourth data packet and the first data packet having a same system-level flow identifier;

[0726] if a second condition is satisfied, determining that the path number of the first data packet is a path number of a third data packet.

[0727] The first condition comprises that the first identifier indicates that the first data packet is a head packet of a corresponding logical frame and the second hash collision number is a preset number.

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

[0729] the first identifier indicates that the first data packet is a head packet of a corresponding logical frame and the second hash collision number of the second data packet is not the preset number;

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

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

[0732] obtain a device-level flow identifier corresponding to the first data packet and a seventh table, the device-level flow identifier comprising a source device identifier, a destination device identifier and a balance sequence number, and the seventh table storing a mapping relationship between the device-level flow identifier and a path number of a second transmitted data packet, the second transmitted data packet comprising at least the third data packet;

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

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

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

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

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

[0738] after determining that the path number of the first data packet is a 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 a tail packet of a corresponding logical frame, update the seventh table using the path number of the first data packet.

[0739] Optionally, the determining module 1620, when determining the second hash collision number according to the first identifier, specifically comprises:

[0740] determining a usage number of the storage location corresponding to the path number according to the first identifier;

[0741] determining the second hash collision number according to the usage number of the storage location corresponding to the path number, the second hash collision number being a hash collision number of the storage location corresponding to the path number.

[0742] Optionally, the determining module 1620, when determining the usage number of the storage location corresponding to the path number according to the first identifier, specifically comprises:

[0743] if a third condition is met, determining that the usage number of the storage location corresponding to the path number is a sum of a used number of the storage location corresponding to the path number and a preset value;

[0744] If the fourth condition is met, the usage times of the storage location corresponding to the path number is determined as the used times of the storage location corresponding to the path number.

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

[0746] The third condition includes that the first identifier indicates that the first data packet is a head packet of a corresponding logical frame and indicates that the first data packet is not a tail packet of the corresponding logical frame.

[0747] The fifth condition includes that the first identifier indicates that the first data packet is not a head packet of a corresponding logical frame and indicates that the first data packet is a tail 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 a head packet of a corresponding logical frame and indicates that the first data packet is a tail packet of the corresponding logical frame.

[0750] The first identifier indicates that the first data packet is not a head packet of a corresponding logical frame and indicates that the first data packet is not a tail packet of the corresponding logical frame.

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

[0752] Obtain an eighth table, and the eighth table stores a mapping relationship between the path number and the used times of the storage location corresponding to the path number.

[0753] Find the used times of the storage location corresponding to the path number based on the eighth table.

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

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

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

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

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

[0759] The CM-side data transmission apparatus can perform various CM-side data transmission methods, and the specific implementation schemes and effects of the CM-side data transmission apparatus are similar to those of the CM-side data transmission methods, which will not be described here.

[0760] Figure 17 An internal structure diagram of an IM-side data transmission apparatus 1700 provided by an embodiment of the present application is shown. As shown in the figure, Figure 17 The IM-side data transmission apparatus 1700 includes a logical frame processing module 1701, an equalization sequence number processing module 1702, a load balancing module 1703 in the IM, and an IM queue module 1704.

[0761] In the embodiment, the data transmission apparatus 1700 can perform the IM-side data transmission method provided by Figure 11 or Figure 12 The equalization sequence number processing module 1702 is configured to perform part or all of the methods in the above embodiments.

[0762] In a specific embodiment, in combination with the internal structure of the data transmission apparatus 1700 provided by Figure 17 The processing flow of the data packets from the network in the IM is as follows:

[0763] The data packets from different source ports enter the logical frame processing module 1701, which is configured to mark the relevant identification information (for example, a relevant identification field) of a logical frame for the received data packets, including a logical frame start identification, a logical frame end identification, a logical frame sequence number, etc., so that one or more data packets can be marked as a logical frame.

[0764] The logic frame processing module 1701 takes the same data packet such as

source port, destination port

source device, destination port

[0765] As shown in Figure 17 , the data packet marked with the relevant identification information (for example, the relevant identification field) of the logic frame enters the equalization sequence number processing module 1702. The equalization sequence number processing module 1702 is used to mark all data packets in the logic frame with an equalization sequence number of the logic frame. The value of the equalization sequence number is incremented according to each

source device, destination device

[0766] For the first packet of the incoming logic frame, the equalization sequence number processing module 1702 determines that the logic frame where the data packet is located is a new logic frame according to the logic 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] Continuing to refer to Figure 17 , the data packet enters the load balancing module 1703 in the IM. The load balancing module 1703 in the IM performs round-robin load balancing based on the equalization sequence number of the data packet and then enters the IM queue module 1704 to wait for transmission to the CM. In an embodiment, the load balancing module 1703 in the IM can select to switch the transmission path between the IM and the CM based on the congestion state feedback of the IM queue module 1704.

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

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

[0770] In a specific embodiment, in combination withFigure 18 The internal structure of the data transmission device 1800 provided by the present application is shown in FIG. 18. The processing flow of the CM to the data packet from the IM is as follows:

[0771] The data packet from the same IM or different IM enters the load balancing module 1801 in the CM, which balances each new logical frame to the next path number corresponding to the path number of the previous logical frame. In an embodiment, the load balancing module 1801 in the CM can use the balance sequence number for load balancing. 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 the OM according to the next path number, provides the next path number corresponding to the first packet of the new logical frame for the subsequent data packet of the new logical frame, and forwards the subsequent data packet according to the same path number, so as to ensure that all data packets in the same logical frame correspond to the same transmission path between the CM and the OM.

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

[0773] The embodiment of the present application provides a data transmission device, including: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the data transmission method on the IM side and / or executes the data transmission method on the CM side.

[0774] An exemplary data transmission device 1900 provided by the embodiment of the present application is shown in FIG. 19. As shown in FIG. 19, the data transmission device 1900 includes a processor 1901 and a transceiver 1902. The transceiver 1902 is used to perform the receiving and transmitting actions of the IM or the OM in the above-mentioned method embodiments under the control of the processor 1901. Figure 19 Figure 19 Optionally, the data transmission device 1900 further includes a memory 1903, a communication bus 1904 and a communication interface 1905.

[0775] The processor 1901 can be a general central processing unit (CPU), an application-specific integrated circuit (ASIC) or one or more integrated circuits for controlling the execution of the program of the present application.

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

[0777] ​The communication bus 1904 can include a pathway to transfer information between the above-mentioned components.

[0778] The memory 1903 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 1903 can exist independently, and is connected to the processor 1901 through the communication bus 1904. The memory 1903 can also be integrated with the processor 1901.

[0779] The memory 1903 is configured to store program codes for implementing the solutions of the present application, and the processor 1901 is configured to control the execution of the program codes. The processor 1901 is configured to execute the program codes stored in the memory 1903. The program codes can include one or more software modules. The one or more software modules can be the determination module provided in the above-mentioned embodiments.

[0780] The communication interface 1905, using the transceiver 1902, is configured to communicate with other devices or communication networks, such as an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), and the like.

[0781] In a specific implementation, as an embodiment, the data transmission device can include a plurality of processors. Each of the processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer executing instructions).

[0782] It should be noted that the data transmission device 1900 provided by the embodiments of the present application can realize all the method steps achieved by the above-mentioned method embodiments, and achieve the same technical effects. Therefore, the same parts and beneficial effects of the embodiments of the present application as the method embodiments will not be described in detail.

[0783] The embodiments of the present application also provide a computer readable storage medium, which stores computer execution instructions. The computer execution instructions are used to make a computer execute a data transmission method in the above-mentioned embodiments.

[0784] In the context of the present application, the computer readable storage medium can be a tangible medium, which can contain or store programs for use by or in connection with an instruction execution system, apparatus or device.

[0785] The embodiments of the present application also provide a computer program product. When the computer program product is invoked by a computer, the computer executes a data transmission method in the above-mentioned embodiments.

[0786] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device, equipment or computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product in the form of being implemented on one or more computer readable storage media containing computer usable program codes, including but not limited to magnetic disk memory, CD-ROM, optical memory, etc.

[0787] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices, equipment and computer program products according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer execution instructions. These computer execution instructions can be provided to a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing equipment to produce a machine, so that the instructions executed by the computer or other programmable data processing equipment produce an article of manufacture, including a machine, that implements the flowcharts and / or block diagrams. Figure 1 The flow or multiple flows and / or blocks Figure 1 The device that realizes the functions specified in the flow or multiple flows and / or blocks.

[0788] These computer execution instructions can also be stored in a computer readable memory that can guide the computer or other programmable data processing equipment to work in a specific way, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices, which implement the flowcharts and / or block diagrams. Figure 1 The flow or multiple flows and / or blocksFigure 1 the function specified in one or more blocks.

[0789] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, so that a series of operations steps are performed on the computer or other programmable devices to generate a computer implemented process, so that the instructions executed on the computer or other programmable devices provide steps for implementing the processes specified in the flowcharts Figure 1 one or more flowcharts and / or blocks Figure 1 the function specified in one or more blocks.

[0790] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. It is therefore desired that what is claimed be understood chiefly in the language of the appended claims rather than in the above discussion. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can be made to the disclosed embodiments without departing from the principles set forth in the application. Any such modifications, combinations, sub-combinations and alternatives are intended to fall within the scope of the claims.

Claims

1. A data transmission method, characterized in that: include: receiving a first data packet, where the first data packet is a data packet to be currently transmitted in a logical frame, and the first data packet includes first equalization sequence information; Determining a value corresponding to the first balancing sequence information 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; When a release condition is met, the corresponding value is released, wherein the release condition is associated with the first hash collision number and whether the first data packet is the tail packet of the logical frame.

2. The method according to claim 1, characterized in that The determining a value corresponding to the first balanced sequence information and a first hash collision count includes: Obtaining a first identifier corresponding to the first data packet, where the first identifier is used to indicate whether the first data packet is the first packet of the corresponding logical frame; A value corresponding to the first balanced sequence information and a first hash collision count are determined according to the first identifier.

3. The method according to claim 2, characterized in that The logical frame also 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 determining, according to the first identifier, a value corresponding to the first balanced sequence information includes: If the first condition is met, determining that the value corresponding to the first balanced sequence information is the sum of a third value and a preset value, wherein the third value is the value corresponding to the third balanced sequence information in the third data packet; and the third data packet and the first data packet have the same device-level flow identifier; If the second condition is met, determining that the value corresponding to the first balanced sequence information is a 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 number 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 number is not the preset number; 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 comprises: Obtaining a port-level flow identifier and a fifth table corresponding to the first data packet, the port-level flow identifier including at least a destination port identifier; the fifth table storing a mapping relationship between the port-level flow identifier and values ​​corresponding to the equalization sequence information of the first transmitted data packet; the first transmitted data packet including at least the second data packet; The second value is obtained from a fifth table based on the port-level flow identifier.

6. The method according to claim 4, characterized in that The method further comprises: Obtaining a device-level flow identifier and a first mapping relationship information set corresponding to the first data packet, the device-level flow identifier including a destination device identifier, the first mapping relationship information set including a mapping relationship between the device-level flow identifier and values ​​corresponding to the equalization sequence information of the second transmitted data packet; the second transmitted data packet including at least the 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 equalized 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 last packet of the corresponding logical frame, the fifth table is updated using the value corresponding to the first equalization sequence information.

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 value is written into the equalization sequence information.

9. The method according to claim 2, characterized in that Determining a first number of hash collisions according to the first identifier includes: Determining, based on the first identifier, a usage count of the storage location corresponding to the value; A first number of hash collisions is determined based on the number of times the storage location corresponding to the value is used; the first number of hash collisions is the number of hash collisions of the storage location corresponding to the value.

10. The method according to claim 9, characterized in that Determining, based on the first identifier, a usage count of the storage location corresponding to the value includes: If the third condition is met, 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 corresponding to the value has been used and a preset value; If the fourth condition is met, determining the usage count of the storage location corresponding to the value as the number of times the storage location corresponding to the value has been used; If the fifth condition is met, determining the usage count of the storage location corresponding to the value is the difference between the usage count of the storage location corresponding to the value 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 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 comprises: Obtaining a sixth table; wherein the sixth table stores a mapping relationship between the values ​​and the number of times the storage locations corresponding to the values ​​have been used; The number of times the storage location corresponding to the value has been used is obtained based on the sixth table.

12. The method according to claim 11, characterized in that 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 the 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: The sixth table is updated using the usage count of the storage location corresponding to the value.

13. The method according to claim 12, characterized in that The updating of the sixth table using the usage count of the storage location corresponding to the value includes: When it is determined that the usage count of the storage location corresponding to the value is the sum of the usage count of the storage location corresponding to the value and a preset value, the value corresponding to the first equalization sequence information and the usage count of the storage location corresponding to the value are written into the sixth table respectively; When 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, if the number of times the storage location corresponding to the value is used is 0, the sixth table is cleared; if the number of times the storage location corresponding to the value is used is not 0, 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 to 13, characterized in that After determining the value corresponding to the first equalization sequence information, the method further includes: Determining a transmission path for the first data packet according to a preset load balancing mode based on a value corresponding to the first balancing sequence information, wherein the preset load balancing mode is a round-robin load balancing mode or a congestion-aware load balancing mode; The first data packet is transmitted according to the transmission path.

15. A data transmission method, characterized in that: include: receiving a first data packet, where the first data packet is a data packet to be transmitted in a logical frame, and the first data packet includes a value corresponding to first equalization sequence information; Determining a path number of the first data packet and a second number of hash collisions; When a release condition is met, the corresponding path number is released, wherein the release condition is associated with the second hash collision number and whether the first data packet is the last 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 number includes: Obtaining a first identifier corresponding to the first data packet, where the first identifier is used to indicate whether the first data packet is the first packet of a corresponding logical frame; Determine the path number of the first data packet and the second hash collision number according to the first identifier.

17. The method according to claim 16, characterized in that Determining a path number of the first data packet according to the first identifier includes: If the first condition is met, 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 fourth data packet and the first data packet have the same system-level flow identifier; If the second condition is met, determining that the path number of the first data packet is 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 number 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 number is not the preset number; 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 comprises: Obtaining a device-level flow identifier corresponding to the first data packet and a seventh table, wherein the device-level flow identifier includes: a source device identifier, a destination device identifier, and a balancing sequence number; the seventh table stores a 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 searched in a seventh table based on the device-level flow identifier.

19. The method according to claim 17, wherein The method further comprises: Obtaining a system-level flow identifier and a second mapping relationship information set corresponding to the first data packet, the system-level flow identifier including a destination system identifier, the second mapping relationship information set including a mapping relationship between the system-level flow identifier and a path number of a third transmitted data packet; the third transmitted data packet including 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, wherein 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 last packet of the corresponding logical frame, the path number of the first data packet is used to update the seventh table.

21. The method according to claim 16, wherein Determining a second number of hash collisions according to the first identifier includes: Determining, based on the first identifier, a usage count of the storage location corresponding to the path number; The second number of hash collisions is determined based on the number of times the storage location corresponding to the path number is used; the second number of hash collisions is the number of hash collisions of the storage location corresponding to the path number.

22. The method according to claim 21, characterized in that The determining, based on the first identifier, the number of times the storage location corresponding to the path number is used includes: If the third condition is met, 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; If the fourth condition is met, determining the usage count of the storage location corresponding to the path number as the number of times the storage location corresponding to the path number has been used; If the fifth condition is met, determining the usage count of the storage location corresponding to the path number is the difference between the usage count of the storage location corresponding to the path number 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 being satisfied includes: the first identifier indicating that the first data packet is not the first packet of the corresponding logical frame, and indicating 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 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 comprises: Acquire an eighth table; the eighth table stores a mapping relationship between the path number and the number of times the storage location corresponding to the path number has been used; The usage count of the storage location corresponding to the path number is searched based on the eighth table.

24. The method according to claim 23, wherein 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 the preset value, the method further includes: The eighth table is updated using the usage count of the storage location corresponding to the path number.

25. The method according to claim 24, characterized in that After determining the usage count of the storage location corresponding to the path number according to the first identifier, updating the eighth table using the usage count of the storage location corresponding to the path number includes: When it is determined 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, the path number and the number of times the storage location corresponding to the path number is used are written into the eighth table respectively; When it is determined 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, if the number of times the storage location corresponding to the path number is used is 0, the eighth table is cleared; if the number of times the storage location corresponding to the path number is used is not 0, 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: a receiving module, configured to receive a first data packet, where the first data packet is a data packet to be currently transmitted in a logical frame, and the first data packet includes first equalization sequence information; a determination module, configured to determine a value corresponding to the first balancing sequence information 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; A 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 number and whether the first data packet is the tail packet of the logical frame.

27. A data transmission device, characterized in that: include: a receiving module, configured to receive a first data packet, where the first data packet is a data packet to be transmitted in a logical frame, and the first data packet includes a value corresponding to the first equalization sequence information; a determination module, configured to determine a path number of the first data packet and a second number of hash collisions; 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 number 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-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data transmission method according to any one of claims 1 to 14, and / or executes the data transmission method according to any one of claims 15 to 25.

29. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the data transmission method according to any one of claims 1 to 14, and / or executes the data transmission method according to 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

  • Data transmission system, method and device

    CN115208839A

  • Data message processing method and device, electronic equipment and storage medium

    CN117336246A

  • Traffic balancing method, network device, and electronic device

    US20220166721A1