A data transmission method, device and network element
By considering unavailable links in load balancing and using different CRC algorithms, the problem of message flow redistribution during link failure is solved, ensuring service stability and consistency of flow distribution.
Patent Information
- Application Number
- CN202110935234.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-06-22
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2036-06-22
AI Technical Summary
In the prior art, only available links are considered when load balancing, resulting in redistribution of message flows on other unfailed links when the link fails, resulting in traffic impacts such as congestion and packet loss.
During load balancing, member links are determined through two decisions. The unavailable links are considered during the first decision. If unavailable, the available links are determined in the second group of member links that only include available links. Ensure packet forwarding and avoid load imbalance through different CRC algorithms.
Ensure that when link failure does not cause flow redistribution on other unfailed links, avoid business impacts, such as packet loss and session consistency issues, and keep the flow distribution before and after link failure consistent.
Smart Images

Figure CN113852561B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, device and network element. Background Art
[0002] Currently, network elements are interconnected by connecting optical modules to optical fibers. The price gap between optical modules of different speeds is large. For example, the price of a 10 Gigabit small form-factor pluggable transceiver (SFP) is only 3.8% of the price of a 40 Gigabit SFP. Driven by the price difference of optical modules, multiple low-speed links are usually selected to connect two network elements. Therefore, in the existing network, multi-links are widely deployed, and with them comes the demand and technology for multi-link load balancing.
[0003] In the prior art, the network element adopts the following load balancing technology. After receiving the message, the network element extracts the source address and destination address from the message header. For example, if the message is an Internet Protocol (IP) message, the source IP address and destination IP address are extracted from the IP message header. Furthermore, the source port number and destination port number can be extracted from the transport layer protocol header. The transport layer protocol is, for example, the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Next, the network element combines the extracted source address, destination address, transport layer source port, and transport layer destination port into a bit sequence. The bit sequence is used to describe the data stream to which the message belongs, and is also used as an input parameter of the load balancing algorithm. Specifically, a cyclic redundancy check (CRC) algorithm is used to calculate the hash value of the bit sequence, and then a modulo operation is performed on the number of all available output ports of the network element according to the calculated hash value, so that the message is mapped to a certain physical port, and the physical port is selected as the output port for forwarding the message.
[0004] In the above load balancing technology, the last step is to use the hash value to modulo the number of available links and the number of output ports, and then obtain a certain value as the final output port. In other words, failed links or links that are no longer used due to management reasons are not taken into account in the number of output ports. This design ensures that the output port finally selected is always an available port. However, there is a technical problem that if a link fails, it will lead to the redistribution of message flows on other non-failed links before the link fails. For example, according to the above load balancing technology, message flows 2 and message flows 7 are directed to link 1, and message flows 1, message flows 3, and message flows 6 are directed to link 4. At this time, link 4 suddenly fails, then message flow 2 will be directed to link 3 again, instead of the originally directed link 1. Only message flow 7 is distributed on link 1. Compared with before link 4 failed, the message flows distributed on link 1 and link 3 have changed. Summary of the invention
[0005] The embodiment of the present invention provides a data transmission method, device and network element to solve the technical problem of redistributing message flows on other non-failed links before link failure when a link fails due to only considering available links in the prior art during load balancing.
[0006] In a first aspect, an embodiment of the present invention provides a data transmission method, including:
[0007] Receive a message; determine a first member link in a first group of member links according to a first decision method; if the first member link is unavailable, determine a second member link in a second group of member links according to a second decision method; wherein all member links in the second group of member links are available, and the first group of member links includes the second group of member links and unavailable member links; and send the message through the second member link.
[0008] In the scheme of the embodiment of the present invention, because the unavailable member links are taken into consideration in the first decision, when the result of the first decision is that the first member link is unavailable, an available second member link is determined in the second group of member links that only include available links. Therefore, on the one hand, it can be ensured that the message can be forwarded, and on the other hand, even if a member link fails, it will not cause the redistribution of the flow on other non-failed links before the failure of the member link.
[0009] In combination with the first aspect, in a first possible implementation of the first aspect, determining the first member link in the first group of member links according to the first decision-making method includes: obtaining flow information of the message; the flow information is used to describe the message; performing hash calculation on the flow information; and determining the first member link in the first group of member links according to the calculated hash value. Through this method, it can be ensured that message flows with the same flow information are allocated to the same link for forwarding when the link is not invalid, thereby avoiding packet loss and affecting session consistency.
[0010] In combination with the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the performing hash calculation on the flow information includes: performing hash calculation on the flow information according to a first cyclic redundancy check CRC algorithm.
[0011] In combination with the second possible implementation of the first aspect, in a third possible implementation of the first aspect, determining the second member link in the second group of member links according to the second decision-making method includes: obtaining the flow information; performing hash calculation on the flow information according to a second CRC algorithm different from the first CRC algorithm; and determining the second member link in the second group of member links according to the hash value calculated according to the second CRC algorithm. By using different CRC algorithms in the two decisions, load imbalance such as polarization can be avoided.
[0012] In combination with the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, determining the first member link in the first group of member links based on the calculated hash value includes: determining the first member link based on the calculated hash value and the total number of links of the first group of member links.
[0013] In a second aspect, an embodiment of the present invention provides a network element, including:
[0014] A receiver; a port; a processor, used to receive a message or generate a message through the receiver; and also used to determine a first member link in a first group of member links according to a first decision-making method; if the first member link is unavailable, determine a second member link in a second group of member links according to a second decision-making method; wherein all member links in the second group of member links are available, and the first group of member links includes the second group of member links and unavailable member links; the member links correspond to the ports; and a transmitter, used to send the message through the port corresponding to the second member link.
[0015] In combination with the second aspect, in a first possible implementation method of the second aspect, the processor is used to: obtain flow information of the message; the flow information is used to describe the message; perform hash calculation on the flow information; and determine the first member link in the first group of member links based on the calculated hash value.
[0016] In combination with the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the processor is configured to perform a hash calculation on the stream information according to a first cyclic redundancy check CRC algorithm.
[0017] In combination with the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the processor is used to: obtain the flow information; perform a hash calculation on the flow information according to a second CRC algorithm that is different from the first CRC algorithm; and determine the second member link in the second group of member links according to the hash value calculated according to the second CRC algorithm.
[0018] In combination with the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the processor is used to determine the first member link according to the calculated hash value and the total number of links of the first group of member links.
[0019] In a third aspect, an embodiment of the present invention provides a data transmission device, wherein the data transmission device includes a functional module for implementing the method described in the first aspect.
[0020] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium having program code stored thereon, wherein the program code includes instructions for implementing any possible implementation of the method of the first aspect.
[0021] In some of the aforementioned possible implementations, the flow information includes a source network protocol IP address, a destination IP address, a source port, and a destination port of the message.
[0022] In some of the aforementioned possible implementations, the member link being available means being available both physically and administratively. Physical availability includes that the physical state of the link is normal and can be used to transmit data. Administrative availability includes that the administrator configures and enables the link to participate in work. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1a-1b A communication system structure diagram provided for an embodiment of the present invention;
[0024] Figure 2 A structural diagram of a network element provided by an embodiment of the present invention;
[0025] Figure 3A flowchart of a data transmission method provided by an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of performing hash calculation according to a CRC algorithm provided in an embodiment of the present invention;
[0027] Figure 5 A functional block diagram of a data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The embodiment of the present invention provides a data transmission method, device and network element to solve the technical problem of redistributing message flows on other non-failed links before link failure when a link fails due to only considering available links in the prior art during load balancing.
[0029] The implementation process and purpose of the solutions in the embodiments of the present invention will be described in detail below.
[0030] An embodiment of the present invention provides a data transmission method, which can be applied to a communication network system. Figure 1a and Figure 1b As shown in FIG. 1 , a possible communication network system structure diagram provided by an embodiment of the present invention is shown. Figure 1a The structure shown in FIG. 1 is a communication network system including network element 1 and network element 2. There are n transmission channels from link 1 to link n between network element 1 and network element 2, where n is an integer greater than 1. The transmission bandwidth or transmission rate of each link can be the same or different. The n links are formed by connecting optical modules to optical fibers, or other forms of links. Further, Figure 1a In the structure shown, network element 1 sends the received message to network element 2 through one of n links, and network element 2 performs further processing, so load balancing is required among the n links so that the load of the n links is balanced.
[0031] Optionally, the network element 1 is, for example, a server, and the network element 2 is, for example, a top of rack (English: Top of Rack, referred to as: TOR) switch. The n links are a link aggregation group (English: Link Aggregation Group, referred to as: LGA).
[0032] Optionally, the network element 1 is a spine switch, and the network element 2 is, for example, a TOR switch. The n links are equal-cost multi-path (English: Equal-Cost Multi-Path, abbreviated: ECMP).
[0033] exist Figure 1b In the structure shown, Figure 1aThe structure shown is different in that one end of the n links is connected to the network element 1, and the other end is connected to different network elements, such as network elements 21 to 2n. The functions of any two network elements from network elements 21 to 2n are the same or different. In this case, load balancing among the n links can also be understood as load balancing among the n network elements, so that the load of the n network elements is balanced.
[0034] It should be understood that Figure 1a and Figure 1b The communication system shown only shows two types of network elements and links, but the present invention is not limited thereto. The communication system may also include network side devices or user side devices other than the network elements and links shown in the figure, which is not limited in the embodiment of the present invention.
[0035] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0036] Please refer to the following Figure 2 , Figure 2 A possible structural diagram of a network element provided in an embodiment of the present invention. The network element is, for example, the network element 1, network element 2, network element 21 to network element 2n described above. Figure 2 As shown, the network element includes: a processor 10, a transmitter 20, a receiver 30, a memory 40 and a port 50. The memory 40, the transmitter 20, the receiver 30 and the processor 10 may be connected via a bus. Of course, in actual use, the memory 40, the transmitter 20, the receiver 30 and the processor 10 may not be in a bus structure, but may be in other structures, such as a star structure, which is not specifically limited in this application.
[0037] Optionally, the processor 10 may be a general-purpose central processing unit or an application-specific integrated circuit (ASIC), may be one or more integrated circuits for controlling program execution, may be a hardware circuit developed using a field programmable gate array (FPGA), or may be a baseband processor.
[0038] Optionally, the processor 10 may include at least one processing core.
[0039] Optionally, the memory 40 may include one or more of a read-only memory (ROM), a random access memory (RAM), and a disk memory. The memory 40 is used to store data and / or instructions required by the processor 10 when it is running. The number of memories 40 may be one or more.
[0040] Optionally, the port 50 includes at least one input port and at least two output ports.
[0041] Optionally, the transmitter 20 and the receiver 30 may be physically independent of each other or integrated together. The transmitter 20 may send data through an output port in the port 50. The receiver 30 may receive data through an input port in the port 50.
[0042] Optionally, each egress port corresponds to a link.
[0043] Please refer to the following Figure 3 As shown in FIG. 1 , it is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 3 As shown, the method includes:
[0044] Step 101: receiving a message;
[0045] Step 102: Determine a first member link from a first group of member links according to a first decision-making method;
[0046] Step 103: if the first member link is unavailable, determine a second member link in the second group of member links according to the second decision-making method; wherein all member links in the second group of member links are available, and the first group of member links includes the second group of member links and the unavailable member links;
[0047] Step 104: Send the message through the second member link.
[0048] Optionally, in step 101 , network element 1 receives a message sent by other network elements through input port 50 .
[0049] Optionally, in step 101, the message may be generated by network element 1 itself.
[0050] Next, step 102 is performed, that is, determining a first member link in the first group of member links according to a first decision-making method. The first decision-making method can be implemented in multiple ways, which will be described below with examples.
[0051] In a possible implementation, step 102 includes: obtaining flow information of the message; performing hash calculation on the flow information; and determining the first member link according to the calculated hash value. The flow information of the message is used to describe the message.
[0052] Optionally, in an IP message, the flow information is, for example, a source IP address and a destination IP address. It may further include a source port and a destination port. Therefore, after obtaining the message in step 101, the message may be parsed, and the source IP address, the destination IP address, the source port and the destination port may be extracted from the IP header of the message to form the flow information, for example, a 96-bit bit sequence.
[0053] Of course, in actual application, the flow information may also be other information, as long as all messages of a message flow can be directed to the same member link according to the flow information.
[0054] Next, a hash calculation is performed on the flow information. In actual use, a variety of hash algorithms can be used for calculation. In the embodiment of the present invention, the CRC algorithm is taken as an example for introduction.
[0055] Assume that the obtained stream information is a 15-bit binary information g=101001110100001. This binary code can be expressed as an algebraic polynomial g(x)=x 14 +x 12 +x 9 +x 8 +x 7 +x 5 +1, where the value of the kth bit in g corresponds to x in g(x) k The coefficient of . Multiply g(x) by x m , that is, add m zeros after g, and then divide it by the m-order generating polynomial h(x). The binary code r corresponding to the (m-1)-order remainder r(x) is the CRC result. The division operation of g(x) and h(x) is to perform an XOR operation on g and h, that is, an exclusive OR operation. For example, the result of performing an XOR operation on 11001 and 10101 is 01100.
[0056] The following example uses the CRC-m(8) algorithm to calculate the CRC result of the binary 101001110100001. CRC-8 uses the standard generating polynomial h(x)=x 8 +x 7 +x 6 +x 4 +x 2 +1, that is, h is the 9-bit binary string 111010101. Figure 4As shown, first add m zeros after g, in this case 8 zeros, to get 10100111010000100000000 (hereinafter referred to as g0), then divide g0 and h to get g1, that is, 1001101110000100000000. Continue to divide g1 and h to get g2, that is, 111000100000100000000. Continue iterating until the 7th order remainder r, that is, 10001100, is the result of CRC calculation, that is, the hash value obtained.
[0057] Next, the first member link is determined based on the calculated hash value and the number of links in the first group of member links. For example, assuming that the number of links in the first group of member links is 7, then r is used to perform a modulo operation on 7, that is, the remainder is calculated by dividing the CRC result by 7. The remainder of 10001100 in binary is 0 when calculated by 7, which means that the determined first member link is the first link, which can correspond to port No. 0 in port 50.
[0058] After obtaining the hash value, another possible implementation method is to determine the egress port by looking up a table. Specifically, a correspondence table between the hash value and the egress port or link is pre-configured on the network element, and the correspondence table can also be determined by taking the hash value modulo the number of links. Therefore, after calculating the hash value, the corresponding egress port or link can be determined by looking up the correspondence table.
[0059] It should be noted that h(x) can be freely selected or use internationally accepted standards. Generally, the CRC algorithm is called CRC-m according to the order m of h(x), such as CRC-32, CRC-64, etc.
[0060] A possible first decision-making method is described above. In actual application, other decision-making methods may also be used, such as performing hash calculation on the flow information through an XOR operation or a modulo operation, which is not specifically limited in the embodiment of the present invention.
[0061] After the first member link is determined in step 102, it can be determined whether the first member is currently available. Available in the embodiment of the present invention means available both physically and management-wise. Specifically, physically available includes that the physical state of the link is normal and can be used to transmit data. Management-wise available includes that the administrator configures and enables the link to participate in work.
[0062] In addition, the member links in the first group of member links are available or unavailable. Generally speaking, all the links of the network element uplink or downlink can be preconfigured as the first group of member links, including available and unavailable links. For example, the downlink of network element 1 includes link 1 to link 4, where link 4 is a faulty link, that is, unavailable, and the remaining three links are available links.
[0063] Optionally, the first group of member links can be stored in the form of a member link table on the network element, and the table can also record whether each link is available. Accordingly, after the first member link is determined in step 102, it is possible to determine whether the first member link is available by querying the status of the link in the table. For example, if the first member link is link 1, it can be determined that link 1 is available by querying the table. If the first member link is link 4, it can be determined that link 4 is unavailable by querying the table.
[0064] Of course, in actual application, the available or unavailable status of each link may also be recorded in other ways, which is not specifically limited in the embodiment of the present invention.
[0065] Optionally, if the first member link is currently available, the message may be sent through the first member link.
[0066] Optionally, if the first member link is unavailable, step 103 is performed, that is, a second member link is determined in the second group of member links according to the second decision-making method. The member links in the second group of member links are all available links, and are all available links in the first group of member links. For example, the second group of member links includes link 1 to link 3. In other words, the unavailable links in the first group of member links are deleted, and the remaining links are the second group of member links.
[0067] It should be noted that the second group of member links may change over time, including changes in the number of links and specific links. For distance, as time goes by, link 4 recovers from the failure, and link 2 fails again, then the second group of member links becomes link 1, link 3, and link 4. For another example, link 4 is still faulty, and link 2 also fails, then the second group of member links becomes link 1 and link 3.
[0068] Similarly, the link status of the first group member links will change over time. For example, when link 4 recovers from a failure, the status of link 4 is changed to available. For another example, if link 2 also fails, the status of link 2 is changed to unavailable.
[0069] Among them, step 103 can also be implemented in multiple ways. One possible situation is that the second decision method can be the same as the first decision method, for example, the CRC algorithm described above is also used, and the same generating polynomial or different generating polynomials can be used. Using different generating polynomials can avoid polarization. Another possible situation is that the second decision method is different from the first decision method. For example, the first decision method uses the CRC algorithm described above, and the second decision method can use XOR operation or direct modulus calculation.
[0070] Because the member links of the second group are all available, the determined second member link is also available, so step 104 can be executed, that is, sending the message through the second member link.
[0071] A specific example is given below to illustrate the implementation process of the data transmission method in the embodiment of the present invention, and to compare it with the data transmission method in the prior art.
[0072] Assuming that within a certain period of time at the beginning, all four links of the network element are available, in the prior art, link orientation is performed according to the above CRC algorithm. Please refer to Table 1 for the orientation result.
[0073]
[0074] Table 1
[0075] In the prior art, since the CRC result is used to perform a modulo operation on the total number of available links, at the beginning, no member link fails, so the total number of available member links is 4. For the result of the modulo operation of the 8 message flows on the total number of available member links according to the CRC result, please refer to the link number in the fourth column of Table 1. The link numbers 0-3 correspond to links 1 to 4 respectively.
[0076] At some point in the future, link 4 fails. According to the method in the prior art, since the total number of available links becomes 3 at this time, all message flows will be recalculated according to the CRC result modulo 3. The calculated result is shown in the link number in the 6th column of Table 1.
[0077] In order to more clearly compare the flow distribution on each link before and after the link failure, please refer to Table 2 and Table 3. Table 2 shows the flow distribution on each link before the link failure, and Table 3 shows the flow distribution on each link after the link failure.
[0078] Link 1 Link 2 Link 3 Link 4 Stream 2 Stream 4 Stream 5 Stream 1 Stream 7 Stream 8 Stream 3 Stream 6
[0079] Table 2
[0080] Link 1 Link 2 Link 3 Link 4 Stream 7 Stream 1 Stream 2 Stream 5 Stream 3 Stream 6 Stream 4 Stream 8
[0081] Table 3
[0082] It can be seen from Table 3 and Table 2 that before link 4 fails, the packets of flow 2 are forwarded from link 1, and after link 4 fails, the subsequent packets of flow 2 are forwarded from link 3. Before link 4 fails, the packets of flow 5 are forwarded from link 3, and after link 4 fails, the subsequent packets of flow 5 are forwarded from link 2. In other words, after a link fails, the flows of other links that did not fail before the link failure are redistributed. Similarly, when link 4 recovers from the failure to a usable state, the flow distribution will recover from the state in Table 3 to the state in Table 2, and the flows of the links that did not fail will be redistributed again. Such a situation can easily affect the business, such as congestion, packet loss caused by convergence, and affected session consistency.
[0083] If the transmission method in the embodiment of the present invention is used, in the case of link 4 failure, because the first decision is made in the first group of member links, that is, the CRC result is a modulo operation on the number of all available and unavailable member links, for example, the CRC result is still modulo 4, so the calculated result is the same as the calculation result before link 4 fails. If the calculation result is the failed link 4 in the first decision, then recalculate in the remaining available member links, that is, use the CRC result to perform a modulo operation on 3 to obtain a new calculation result. Please refer to Table 4, which is a comparison of the calculation result after a link failure using the transmission method in the embodiment of the present invention and the calculation result before the link failure.
[0084]
[0085] Table 4
[0086] For example, as shown in Table 4, the result of the first CRC calculation is 7, modulo 4, and the link number obtained is 3, that is, link 4. After confirmation, it is found that link 4 has failed, so the CRC result is recalculated, and the modulo operation is performed on 3, and the link number obtained is 0, that is, link 1. In other words, the message flow originally intended to be directed to link 4 is redirected to link 1. Similarly, other messages originally intended to be directed to link 4 are redirected to other links that have not failed through the second decision.
[0087] For flow 2 with a CRC result of 8, the first decision determines that it will be forwarded from link 1. Since link 1 is available, there is no need to make a decision again. Therefore, when link 4 fails, the result of the location is still link 1, that is, link number 0. Similarly, for other flows that were distributed on other links that did not fail before link 4 failed, they are still distributed on the original links after the link fails, and there is no change. To see the decision results more clearly, please refer to Table 2 and Table 5. Among them, Table 5 shows the flow distribution on each link after link 4 fails.
[0088] Link 1 Link 2 Link 3 Link 4 Stream 2 Stream 4 Stream 5 Stream 7 Stream 8 Stream 6 Stream 1 Stream 3
[0089] Table 5
[0090] From the comparison between Table 5 and Table 2, it can be seen that after link 4 fails, the flows originally distributed on link 4 are redistributed on other links that have not failed. Before link 4 fails, the flows distributed on other links that have not failed are still distributed on the original links after link 4 fails. Similarly, when link 4 recovers from the failed state to the available state, it only returns to the state before link 4 fails, that is, the state in Table 2, without causing the original flows on other links that have not failed to be redistributed.
[0091] It can be seen from the above description that, through the method in the embodiment of the present invention, when a link fails or recovers from a failure, the entire process will not affect the flow distribution of the first decision to fall on other links, thereby achieving lossless service.
[0092] Based on the same inventive concept, an embodiment of the present invention further provides a network element (such as Figure 2 As shown), the network element is used to implement any one of the aforementioned methods.
[0093] Specifically, the processor 10 is used to receive a message or generate a message through the receiver 30; it is also used to determine a first member link in a first group of member links according to a first decision method; if the first member link is unavailable, determine a second member link in a second group of member links according to a second decision method; wherein all member links in the second group of member links are available, and the first group of member links includes the second group of member links and unavailable member links; the member links correspond to the port 50; the transmitter 20 is used to send the message through the port 50 corresponding to the second member link.
[0094] Optionally, the processor 10 is used to: obtain flow information of the message; the flow information is used to describe the message; perform hash calculation on the flow information; and determine the first member link in the first group of member links according to the calculated hash value.
[0095] Optionally, the processor 10 is configured to perform a hash calculation on the stream information according to a first cyclic redundancy check CRC algorithm.
[0096] Optionally, the processor 10 is used to: obtain the flow information; perform hash calculation on the flow information according to a second CRC algorithm different from the first CRC algorithm; and determine the second member link in the second group of member links according to the hash value calculated according to the second CRC algorithm.
[0097] Optionally, the processor 10 is configured to determine the first member link according to the calculated hash value and the total number of links of the first group of member links.
[0098] Based on the same inventive concept, an embodiment of the present invention further provides a data transmission device, such as Figure 5 As shown, the data transmission device includes an acquisition unit 201, used for acquiring a message; a processing unit 202, used for determining a first member link in a first group of member links according to a first decision method; if the first member link is unavailable, determining a second member link in a second group of member links according to a second decision method; wherein all member links in the second group of member links are available, and the first group of member links includes the second group of member links and unavailable member links; and a sending unit 203, used for sending the message through the second member link.
[0099] Optionally, the processing unit 202 is used to: obtain flow information of the message; the flow information is used to describe the message; perform hash calculation on the flow information; and determine the first member link in the first group of member links according to the calculated hash value.
[0100] Optionally, the processing unit 202 is configured to perform a hash calculation on the flow information according to a first cyclic redundancy check CRC algorithm.
[0101] Optionally, the processing unit 202 is used to: obtain the flow information; perform hash calculation on the flow information according to a second CRC algorithm different from the first CRC algorithm; and determine the second member link in the second group of member links according to the hash value calculated according to the second CRC algorithm.
[0102] Optionally, the processing unit 202 is configured to determine the first member link according to the calculated hash value and the total number of links of the first group of member links.
[0103] The various variations and specific examples of the data transmission method in the aforementioned embodiment are also applicable to the data transmission device and Figure 2Through the above detailed description of the data transmission method, those skilled in the art can clearly understand the data transmission device and Figure 2 The implementation method of the network element in the present invention is not described in detail here for the sake of brevity of the specification.
[0104] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0105] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0106] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0107] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0108] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A data transmission method, characterized in that: include: Receive a message, obtain flow information of the message, the flow information is used to describe the message, perform hash calculation on the flow information according to a first cyclic redundancy check CRC algorithm, and determine a first member link in a first group of member links according to the calculated hash value; If the first member link is unavailable, performing a hash calculation on the flow information according to a second CRC algorithm, determining the second member link according to the calculated hash value and the total number of links of the second group of member links, and the first CRC algorithm is different from the second CRC algorithm; wherein all member links in the second group of member links are available, the first group of member links includes the second group of member links and unavailable member links, the member links are available including being available both physically and management-wise, the links being physically available including the physical state of the links being normal, and the links being management-wise available including configuring to enable the links to participate in the work; The message is sent through the second member link.
2. The method according to claim 1, characterized in that The determining the first member link in the first group of member links according to the calculated hash value includes: The first member link is determined according to the calculated hash value and the total number of links of the first group of member links.
3. A network element, characterized in that: include: Receiver; port; A processor, configured to receive a message or generate a message through the receiver, obtain flow information of the message, the flow information is used to describe the message, perform hash calculation on the flow information according to a first cyclic redundancy check (CRC) algorithm, and determine a first member link in a first group of member links according to the calculated hash value; if the first member link is unavailable, perform hash calculation on the flow information according to a second CRC algorithm, and determine the second member link according to the calculated hash value and the total number of links of the second group of member links, the first CRC algorithm is different from the second CRC algorithm; wherein all member links in the second group of member links are available, the first group of member links includes the second group of member links and unavailable member links, the member links are available including being available both physically and managementally, the links are physically available including that the physical state of the links is normal, and the links are management available including that configuration enables the links to participate in work; the member links correspond to the ports; A transmitter is used to send the message through a port corresponding to the second member link.
4. The network element according to claim 3, characterized in that: The processor is used to determine the first member link according to the calculated hash value and the total number of links of the first group of member links.
5. A data transmission device, characterized in that: include: An acquisition unit, used for acquiring a message; A processing unit, configured to obtain flow information of the message, wherein the flow information is used to describe the message, perform hash calculation on the flow information according to a first cyclic redundancy check (CRC) algorithm, and determine a first member link in a first group of member links according to the calculated hash value; if the first member link is unavailable, perform hash calculation on the flow information according to a second CRC algorithm, and determine the second member link according to the calculated hash value and the total number of links of the second group of member links, wherein the first CRC algorithm is different from the second CRC algorithm; wherein all member links in the second group of member links are available, the first group of member links includes the second group of member links and unavailable member links, the member links are available including being available both physically and managementally, the links are physically available including that the physical state of the links is normal, and the links are management available including configuring to enable the links to participate in the work; A sending unit is used to send the message through the second member link.
6. The device according to claim 5, characterized in that The processing unit is used to determine the first member link according to the calculated hash value and the total number of links of the first group of member links.
