CN113630319B - Data distribution method, device and related equipment - Google Patents

Data distribution method, device and related equipment Download PDF

Info

Publication number
CN113630319B
CN113630319B CN202110722248.9A CN202110722248A CN113630319B CN 113630319 B CN113630319 B CN 113630319B CN 202110722248 A CN202110722248 A CN 202110722248A CN 113630319 B CN113630319 B CN 113630319B
Authority
CN
China
Prior art keywords
data
array
target
destination address
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110722248.9A
Other languages
Chinese (zh)
Other versions
CN113630319A (en
Inventor
李有
秦海中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110722248.9A priority Critical patent/CN113630319B/en
Publication of CN113630319A publication Critical patent/CN113630319A/en
Application granted granted Critical
Publication of CN113630319B publication Critical patent/CN113630319B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/125Shortest path evaluation based on throughput or bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data distribution method, which comprises the steps of obtaining a target data packet and determining a destination address of the target data packet; carrying out Hash operation on the destination address to obtain a Hash value; constructing a route distribution array pointing to each data link according to the traffic transmission proportion of the data link; calculating according to the hash value and the routing distribution array to obtain a target array element; sending the target data packet to the destination address by using a data link corresponding to the target array element; the data distribution method can reasonably distribute the flow according to the path bandwidth difference of the actual scene so as to fully play the data forwarding performance of the equipment. The application also discloses a data distribution device, a system and a computer readable storage medium, which have the beneficial effects.

Description

Data distribution method, device and related equipment
Technical Field
The present application relates to the field of computer data processing technologies, and in particular, to a data offloading method, and further, to a data offloading device, a data offloading system, and a computer-readable storage medium.
Background
With the development of computers, more and more scientific and technical products are used in life, and the requirements on background support services such as network transmission, server capacity, response speed and the like are higher and higher while the diversity and convenience of life are enriched. Even though the performance of the current hardware devices is very powerful, the capability provided by a single physical resource is limited, and many physical devices are often required to support the processing of the same service. Particularly, in the current cloud computing scenario with wide application, one data center often needs a plurality of gateway nodes to establish a plurality of gateway clusters to provide three-layer network forwarding service. In a gateway node cluster, all gateway nodes may provide the same forwarding service. This is because, for data flows, although the purpose is the same, the flow paths are not the same, and in this case, traffic needs to be split. The shunting has the function of distributing the paths through which the flow flows, the three-layer flow needs to keep the stateful property of the flow, and in popular terms, the flow with the same property needs to keep the same path for forwarding.
Currently, the existing mainstream shunting mode is an equivalent Routing (ECMP) mode, and the method provides various shunting algorithms, such as quintuple-based and MAC-based. However, the practical use effect is that the flow allocated by multiple paths is the same, which has a disadvantage in a special scene. Because the forwarding capability provided by each path may be different in an actual usage scenario, if forwarding is provided according to the minimum path bandwidth, waste of device resources may be caused; if the forwarding is provided according to the maximum path bandwidth, some paths are congested and packet loss is caused, so that service interruption is caused.
This patent provides an unbalanced load sharing algorithm for this scenario. Under the condition of ensuring that the back-and-forth paths with the same flow are consistent, the flow can be shunted according to the path bandwidth difference of the actual scene and the specific proportion, so that the forwarding performance of the equipment is fully exerted.
Therefore, how to reasonably distribute traffic according to the path bandwidth difference of the actual scene and fully exert the device forwarding performance is a problem to be urgently solved by those skilled in the art.
Disclosure of Invention
The data distribution method can reasonably distribute the flow according to the path bandwidth difference of an actual scene so as to fully play the data forwarding performance of equipment; another object of the present application is to provide a data offloading device, a system and a computer readable storage medium, all of which have the above advantages.
In a first aspect, the present application provides a data offloading method, including:
acquiring a target data packet and determining a destination address of the target data packet;
carrying out Hash operation on the destination address to obtain a Hash value;
constructing a route distribution array pointing to each data link according to the traffic transmission proportion of the data link;
calculating according to the hash value and the routing shunt array to obtain a target array element;
and sending the target data packet to the destination address by using the data link corresponding to the target array element.
Preferably, the performing a hash operation on the destination address to obtain a hash value includes:
and carrying out exclusive OR operation on each byte in the destination address to obtain the hash value.
Preferably, the obtaining of the target array element by calculating according to the hash value and the route splitting array includes:
counting the element number of the routing distribution array;
and performing remainder operation on the element number by using the hash value to obtain the target array element.
Preferably, the data offloading method further includes:
when receiving the link failure information, constructing a new route distribution array according to the flow transmission proportion of each residual data link;
calculating according to the hash value and the new route distribution array to obtain a new target array element;
and sending the target data packet to the destination address by using the data link corresponding to the new target array element.
Preferably, the destination address is an IP address, or a MAC address, or a port address.
In a second aspect, the present application further discloses a data offloading device, including:
the data acquisition module is used for acquiring a target data packet and determining a destination address of the target data packet;
the hash operation module is used for carrying out hash operation on the destination address to obtain a hash value;
the array construction module is used for constructing a route distribution array pointing to the data links according to the flow transmission proportion of each data link;
the array determining module is used for calculating and obtaining a target array element according to the hash value and the routing distribution array;
and the data sending module is used for sending the target data packet to the destination address by using the data link corresponding to the target array element.
Preferably, the hash operation module is specifically configured to perform an exclusive or operation on each byte in the destination address to obtain the hash value.
Preferably, the array construction module is specifically configured to count the number of elements of the route splitting array; and performing remainder operation on the element number by using the hash value to obtain the target array element.
In a third aspect, the present application further discloses a data offloading system, including:
a memory for storing a computer program;
a processor, configured to implement the steps of any of the data offloading methods described above when executing the computer program.
In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any of the data offloading methods described above.
The data distribution method comprises the steps of obtaining a target data packet and determining a destination address of the target data packet; carrying out hash operation on the destination address to obtain a hash value; constructing a route distribution array pointing to each data link according to the traffic transmission proportion of the data link; calculating according to the hash value and the routing shunt array to obtain a target array element; and sending the target data packet to the destination address by using the data link corresponding to the target array element.
Therefore, the data distribution method provided by the application constructs the routing distribution array which can be used for realizing flow transmission according to the proportion according to the flow transmission proportion of each data link, and further determines the data link corresponding to the data packet by combining the destination address of the data packet to be transmitted, so as to realize the transmission of the data packet.
The data distribution device, the data distribution system and the computer readable storage medium provided by the application all have the beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
Fig. 1 is a schematic flow chart of a data offloading method provided in the present application;
fig. 2 is a gateway cluster topology diagram provided in the present application;
fig. 3 is a schematic flow chart of another data offloading method provided in the present application;
fig. 4 is a schematic structural diagram of a data offloading device provided in the present application;
fig. 5 is a schematic structural diagram of a data offloading system provided in the present application.
Detailed Description
The core of the application is to provide a data distribution method, which can reasonably distribute traffic according to the path bandwidth difference of an actual scene so as to fully exert the data forwarding performance of equipment; another core of the present application is to provide a data offloading device, a system and a computer readable storage medium, which also have the above beneficial effects.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data distribution method.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data offloading method provided in the present application, where the data offloading method may include:
s101: acquiring a target data packet and determining a destination address of the target data packet;
this step aims to achieve the acquisition of the target data packet and to determine its destination address. The destination data packet is a data packet that needs to be forwarded or transmitted, and the destination address is an address that the destination data packet needs to access. Specifically, when a destination packet is received, the destination address of the destination packet may be determined by analyzing the destination packet, or the destination address may be received together with the destination packet; the target data packet may be a data packet sent by other devices, or may also be a data packet sent by the user based on the user front end, which is not limited in the present application.
As a preferred embodiment, the destination address may be an IP address, or a MAC address, or a port address.
It is understood that the specific type of the destination address is not unique, and the destination data packet can be sent to the corresponding destination address according to actual requirements, including but not limited to an IP address, a MAC address, a port address, and the like.
S102: carrying out Hash operation on the destination address to obtain a Hash value;
the step aims to realize the hash operation of the destination address, and a corresponding hash value is obtained by performing the hash operation on the destination address. The hash operation may be a hash operation on each byte bit of the destination address. It can be understood that the difference of the destination address types does not affect the implementation of the present technical solution, and the corresponding hash value can be obtained by performing hash operation on the destination address.
As a preferred embodiment, the performing the hash operation on the destination address to obtain the hash value may include: and carrying out exclusive OR operation on each byte in the destination address to obtain a hash value.
The preferred embodiment provides a hash operation method for a destination address, which is to perform an exclusive or operation on each byte in the destination address to obtain a corresponding hash value. The hash value can be calculated in this way regardless of the IP address, the MAC address, or the port address. For example, if the destination IP address of the destination packet is 110.242.68.4, the xor operation is performed according to the IP bytes, and there are: 1^1^10^110^242^68^4 ^ 215, namely the hash value is 215.
S103: constructing a route distribution array pointing to the data links according to the traffic transmission proportion of each data link;
the step aims to realize the construction of the route shunting array, namely the construction is carried out according to the traffic transmission proportion of each data link in the system, wherein the traffic transmission proportion can be the link bandwidth proportion. In the specific implementation process, the link bandwidth of each data link is firstly obtained, the sum of the link bandwidths of all the data links is further calculated, and the quotient of the sum and the greatest common divisor of all the link bandwidths is calculated, wherein the quotient is the number of elements in the route splitting array, and each element in the array points to the corresponding data link. For example, if there are three data links in the system, and the bandwidths are 40M/s, 25M/s, and 100M/s, respectively, the number of elements in the route splitting array is (40+25+100)/5 ═ 33, so that a route splitting array a [33] can be constructed; further, assigning values to each element in the array according to the traffic transmission ratio of the data link, wherein the link bandwidth ratio of each data link is 8:5:20, and the following steps are performed: a [0-7] points to a data link with a link bandwidth of 40M/s, A [8-12] points to a data link with a link bandwidth of 25M/s, and A [13-32] points to a data link with a link bandwidth of 100M/s.
S104: calculating according to the hash value and the routing distribution array to obtain a target array element;
the step aims to realize the calculation of the target routing shunt array, and the target array element can be calculated and obtained according to the hash value of the target address and the routing shunt array, wherein the target array element is used for realizing the determination of the target data link, and the data link pointed by the target array element is the target data link, namely the data link used for realizing the transmission of the target data packet.
As a preferred embodiment, the obtaining the target array element according to the hash value and the route splitting array calculation may include: counting the element number of the routing distribution array; and carrying out remainder operation on the number of the elements by utilizing the hash value to obtain the target array elements.
The preferred embodiment provides a method for realizing calculation of target array elements. Specifically, the number of elements (element number) in the route split array is counted first, and further, the element number is subjected to a remainder operation by using the hash value of the destination address to obtain a corresponding value, which is the target array element. For example, the hash value of the target address 110.242.68.4 is 215, and for the example of three links in the system (the bandwidths are 40M/s, 25M/s, and 100M/s, respectively), some of 215 takes the remainder of the element number 33 to obtain 17, and then the target array element is a [17 ].
S105: and sending the target data packet to a destination address by using a data link corresponding to the target array element.
Specifically, after the target array element is determined, the target data link to which the target array element points is determined according to the target array element, and thus, the target data packet is sent to the destination address by using the target data link. As described above, the destination array element is A [17] and points to the data link with the link bandwidth of 100M/s, so that the destination data packet can be transmitted to the destination address by using the data link with the link bandwidth of 100M/s.
As a preferred embodiment, the data offloading method may further include: when receiving the link failure information, constructing a new route distribution array according to the flow transmission proportion of each residual data link; calculating according to the hash value and the new route distribution array to obtain a new target array element; and sending the target data packet to the destination address by using the data link corresponding to the new target array element.
When the data link fails, a new route distribution array can be reconstructed by using the remaining data links which normally operate, so that a new data link is determined, and the transmission of the target data packet is completed. Further, when the failed data link returns to normal, the new routing shunt array can be constructed again to transmit the target data packet. Therefore, under the condition of sufficient shunt, the quick switching of the fault is further realized, and the millisecond switching can be achieved by monitoring the state of the data link.
Therefore, the data distribution method provided by the application constructs the routing distribution array which can be used for realizing flow transmission according to the proportion according to the flow transmission proportion of each data link, and further determines the data link corresponding to the data packet by combining the destination address of the data packet to be transmitted, so as to realize the transmission of the data packet.
Based on the foregoing embodiments, the present application provides another data offloading method.
The embodiment of the application specifically introduces a data distribution method by taking gateway cluster-based three-layer forwarding load distribution as an example.
Referring to fig. 2, fig. 2 is a topological diagram of a gateway cluster according to the present application, where the topological diagram shows a data plane splitting effect. As shown in fig. 2, data traffic can be SNAT converted by three gateways gw1192.168.1.1, gw2192.168.1.2 and gw3192.168.1.3 to be sent to a physical gateway for accessing Internet. The data plane flow process is described below for the virtual machine on HV1 as an example.
When VM1 and VM2 need access to the hundred degrees of the Internet, the source IP is 1.1.1.10, and the destination is www.***.com. According to fig. 2, since the visited non-home network segment IP is, three layers of forwarding are required, wherein three routes forwarded by one layer are respectively 0.0.0.0/0via 192.168.1.1, 0.0.0/0via192.168.1.2 and 0.0.0/24via 192.168.1.3, the three link bandwidths are all 100M/s, and according to a normal load splitting manner, 1: 1: 1 shunting, wherein link bandwidths of traffic forwarded to a physical router after the traffic reaches a gateway are respectively 40M/s, 25M/s and 100M/s, and it is conceivable that when the traffic equally distributed to three gateways is greater than 25M/s, gw2 causes service abnormality due to link congestion and packet loss; when the flow equally distributed to the three gateways is more than 40M/s, both gw1 and gw2 cause abnormal service due to traffic congestion packet loss; the performance of gw3 is fully exploited when the traffic split to the three gateways equals 100M/s.
Based on this, according to the actual environment, the network administrator may split and limit the traffic matching the three routes, so that the traffic reaching gw1(192.168.1.1) is 40 parts, the traffic reaching gw2(192.168.1.2) is 25 parts, and the traffic reaching gw3(192.168.2.3) is 100 parts, thereby achieving 40: 25: 100, in a ratio of one to the other. Furthermore, when the message sent from gw1 returns, the message still returns to gw1, the message sent from gw2 still returns to gw2, and the message sent from gw3 returns to gw3, so the round-trip traffic is forwarded according to the allocation ratio, and the device performance is fully exerted.
Further, referring to fig. 3, fig. 3 is a schematic flow chart of another data offloading method provided in the present application, and a specific implementation flow of the method is as follows:
1. with reference to fig. 2, when the gateway (1.1.1.1) on the HV device receives traffic arriving outside, it needs to forward to the gateway gw1, gw2 or gw3, at which time the diversion is needed.
2. The referenced elements (IP address based, MAC address based, port address based, other parameters) are determined according to the configured offload algorithm, here exemplified by the IP address, assuming the source IP is 1.1.1.10 and the destination IP is 110.242.68.4 (www.***.com).
3. Performing exclusive-or according to the IP byte bit, then: 1^1^1^10^110^242^68^4 ^ 215, obtain a value within 0 xFF.
4. According to the proportion A of the distribution flow: b: c calculating to obtain a specific value: (specific value ═ a + B + C)/greatest common divisor)), the proportion of the three gateway node traffic in fig. 2 is 40: 25: 100, whereby a specific value of 33((40+25+100)/5 ═ 33) was calculated. Further, an array ActiveList [33] of the route distribution flow is created according to the specific value 33, then the array is subjected to assignment operation according to the flow proportion, the ActiveList [0-7] points to the route 0.0.0.0/0via 192.168.1.1, the ActiveList [8-12] points to the route 0.0.0.0/0via 192.168.1.2, and the ActiveList [13-32] points to the route 0.0.0.0/0via 192.168.1.3. Finally, the diversion calculation is carried out, the value 215 obtained by the exclusive OR in the step 3 is used for obtaining the value 17 after the 33 is left, and therefore, the route needing to be matched can be obtained by directly using ActiveList [17], namely the route corresponds to 0.0.0.0/0 via192.168.1.3.
5. When the gateway node fails, the data and the specific value of the ActiveList are adjusted. E.g., gw2, then the particular value is equal to 7((40+ 100)/20-7). Further, the value is re-assigned to the ActiveList array, and ActiveList [0-1] points to the route 0.0.0.0/0via 192.168.1.1, and ActiveList [2-6] points to 0.0.0.0/0via 192.168.1.3. And finally, when the flow distribution calculation is carried out, the value 215 obtained by the exclusive OR in the step 3 is used for obtaining the remainder of 7 to obtain 5, so that the routing needing to be matched can be directly obtained by using ActiveList [5], namely the routing corresponds to 0.0.0.0/0via 192.168.1.3.
6. After the fault is recovered, the data and the specific value of the ActiveList can be readjusted, and then the flow can be shunted again.
7. The above example is three gateway nodes, but the scheme may support M + N gateway nodes, where M is active, N is inactive, and N may be equal to 0. Under the condition of sufficient shunting, the fault can be quickly switched, and millisecond switching can be achieved by monitoring the link state.
It can be seen that, according to the data offloading method provided in the embodiment of the present application, a route offloading array capable of implementing traffic transmission in proportion is constructed according to a traffic transmission ratio of each data link, and then a data link corresponding to a data packet is determined in combination with a destination address of the data packet to be transmitted, thereby implementing transmission of the data packet, thereby implementing reasonable offloading of traffic according to a traffic transmission difference of an actual scene, further fully playing data forwarding performance of a device, effectively avoiding problems of empty waste of part of devices and full load blocking of part of devices, and improving a device utilization rate.
To solve the above technical problem, the present application further provides a data offloading device, please refer to fig. 4, where fig. 4 is a schematic structural diagram of the data offloading device provided in the present application, and the data offloading device may include:
the data acquisition module 1 is used for acquiring a target data packet and determining a destination address of the target data packet;
the hash operation module 2 is used for carrying out hash operation on the destination address to obtain a hash value;
the array construction module 3 is used for constructing a route distribution array pointing to the data link according to the flow transmission proportion of each data link;
the array determining module 4 is used for calculating and obtaining a target array element according to the hash value and the routing distribution array;
and the data sending module 5 is configured to send the target data packet to the destination address by using the data link corresponding to the target array element.
It can be seen that, the data offloading device provided in this embodiment of the present application constructs a route offloading array capable of implementing traffic transmission in proportion according to a traffic transmission ratio of each data link, and then determines a data link corresponding to a data packet in combination with a destination address of the data packet to be transmitted, thereby implementing transmission of the data packet, thereby implementing reasonable offloading of traffic according to a traffic transmission difference of an actual scene, further fully playing data forwarding performance of a device, effectively avoiding problems of empty waste of part of devices and full load blocking of part of devices, and improving device utilization.
As a preferred embodiment, the hash operation module 2 may be specifically configured to perform an exclusive or operation on each byte in the destination address to obtain a hash value.
As a preferred embodiment, the array building module 3 may be specifically configured to count the number of elements of the route splitting array; and carrying out remainder operation on the number of the elements by utilizing the hash value to obtain the target array elements.
As a preferred embodiment, the data offloading device may further include a failure re-offloading module, configured to, when receiving link failure information, construct a new routing offload array according to a traffic transmission ratio of each remaining data link; calculating according to the hash value and the new routing shunt array to obtain a new target array element; and sending the target data packet to the destination address by using the data link corresponding to the new target array element.
As a preferred embodiment, the destination address may be an IP address, or a MAC address, or a port address.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above technical problem, the present application further provides a data offloading system, please refer to fig. 5, where fig. 5 is a schematic structural diagram of the data offloading system provided in the present application, and the data offloading device may include:
a memory 10 for storing a computer program;
the processor 20, when executing the computer program, may implement the steps of any of the data offloading methods described above.
For the introduction of the system provided by the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the data offloading methods described above can be implemented.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.

Claims (8)

1. A data distribution method is characterized by comprising the following steps:
acquiring a target data packet and determining a destination address of the target data packet;
carrying out hash operation on the destination address to obtain a hash value;
constructing a route distribution array pointing to each data link according to the traffic transmission proportion of the data link, comprising the following steps: acquiring link bandwidths of the data links, calculating the sum of the link bandwidths of the data links, calculating the quotient of the sum and the greatest common divisor of all the link bandwidths, and constructing a route distribution array pointing to the data links according to the quotient;
calculating and obtaining a target array element according to the hash value and the route shunting array, wherein the method comprises the following steps: counting the number of elements of the routing shunt array; performing remainder operation on the element number by using the hash value to obtain the target array element; and sending the target data packet to the destination address by using the data link corresponding to the target array element.
2. The data offloading method according to claim 1, wherein the performing a hash operation on the destination address to obtain a hash value includes:
and carrying out exclusive OR operation on each byte in the destination address to obtain the hash value.
3. The data offloading method according to any one of claims 1-2, further comprising:
when receiving the link failure information, constructing a new route distribution array according to the flow transmission proportion of each residual data link;
calculating according to the hash value and the new route distribution array to obtain a new target array element;
and sending the target data packet to the destination address by using the data link corresponding to the new target array element.
4. The data offloading method of claim 1, wherein the destination address is an IP address, a MAC address, or a port address.
5. A data offloading device, comprising:
the data acquisition module is used for acquiring a target data packet and determining a destination address of the target data packet;
the hash operation module is used for carrying out hash operation on the destination address to obtain a hash value;
the array construction module is used for constructing a route distribution array pointing to the data link according to the flow transmission proportion of each data link;
the array construction module is specifically configured to obtain link bandwidths of the data links, calculate a sum of the link bandwidths of the data links, calculate a quotient of the sum and a greatest common divisor of all the link bandwidths, and construct a route splitting array pointing to the data link from the quotient;
the array construction module is specifically configured to count the number of elements of the route splitting array; performing remainder operation on the element number by using the hash value to obtain the target array element;
the array determining module is used for calculating and obtaining a target array element according to the hash value and the routing distribution array;
and the data sending module is used for sending the target data packet to the destination address by using the data link corresponding to the target array element.
6. The data offloading device according to claim 5, wherein the hash operation module is specifically configured to perform an exclusive-or operation on each byte in the destination address to obtain the hash value.
7. A data offloading system, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data offloading method according to any of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the data offloading method according to any one of claims 1 to 4.
CN202110722248.9A 2021-06-28 2021-06-28 Data distribution method, device and related equipment Active CN113630319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110722248.9A CN113630319B (en) 2021-06-28 2021-06-28 Data distribution method, device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110722248.9A CN113630319B (en) 2021-06-28 2021-06-28 Data distribution method, device and related equipment

Publications (2)

Publication Number Publication Date
CN113630319A CN113630319A (en) 2021-11-09
CN113630319B true CN113630319B (en) 2022-08-19

Family

ID=78378493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110722248.9A Active CN113630319B (en) 2021-06-28 2021-06-28 Data distribution method, device and related equipment

Country Status (1)

Country Link
CN (1) CN113630319B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571560A (en) * 2011-12-13 2012-07-11 曙光信息产业(北京)有限公司 Method for proportionally and accurately realizing distribution according to hash
CN103595649A (en) * 2013-11-21 2014-02-19 迈普通信技术股份有限公司 Method and system for achieving load balance
CN106332141A (en) * 2016-09-13 2017-01-11 杭州华三通信技术有限公司 Flow load sharing method and flow load sharing device
CN106941455A (en) * 2016-01-04 2017-07-11 中兴通讯股份有限公司 The method and device that balanced load is shared
CN107545338A (en) * 2016-06-27 2018-01-05 百度在线网络技术(北京)有限公司 Business data processing method and business data processing system
CN109145620A (en) * 2018-08-13 2019-01-04 北京奇安信科技有限公司 Data flow diversion processing method and device
CN110830562A (en) * 2019-10-30 2020-02-21 重庆邮电大学 Limited load consistency Hash load balancing strategy based on virtual nodes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343153A (en) * 2020-02-10 2020-06-26 Oppo(重庆)智能科技有限公司 Data packet detection method, device, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571560A (en) * 2011-12-13 2012-07-11 曙光信息产业(北京)有限公司 Method for proportionally and accurately realizing distribution according to hash
CN103595649A (en) * 2013-11-21 2014-02-19 迈普通信技术股份有限公司 Method and system for achieving load balance
CN106941455A (en) * 2016-01-04 2017-07-11 中兴通讯股份有限公司 The method and device that balanced load is shared
CN107545338A (en) * 2016-06-27 2018-01-05 百度在线网络技术(北京)有限公司 Business data processing method and business data processing system
CN106332141A (en) * 2016-09-13 2017-01-11 杭州华三通信技术有限公司 Flow load sharing method and flow load sharing device
CN109145620A (en) * 2018-08-13 2019-01-04 北京奇安信科技有限公司 Data flow diversion processing method and device
CN110830562A (en) * 2019-10-30 2020-02-21 重庆邮电大学 Limited load consistency Hash load balancing strategy based on virtual nodes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于流的跨层并发多路径转发算法;韩来权等;《东北大学学报(自然科学版)》;20090315(第03期);全文 *
数据中心网络中自适应流量分配方案研究;吴杰等;《软件导刊》;20180115(第01期);全文 *

Also Published As

Publication number Publication date
CN113630319A (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN106998302B (en) Service flow distribution method and device
CN107995123B (en) Load balancing system and method based on switch
US11050586B2 (en) Inter-cloud communication method and related device, and inter-cloud communication configuration method and related device
Qi et al. Assessing container network interface plugins: Functionality, performance, and scalability
US10374956B1 (en) Managing a hierarchical network
US9450874B2 (en) Method for internet traffic management using a central traffic controller
US9065768B2 (en) Apparatus for a high performance and highly available multi-controllers in a single SDN/OpenFlow network
US20140016470A1 (en) Method for traffic load balancing
WO2018156421A1 (en) Load balancing in distributed computing systems
US10681425B2 (en) Dynamic designated forwarder election per multicast stream for EVPN all-active homing
CN108337179B (en) Link flow control method and device
US20170126478A1 (en) Methods, systems, and computer readable media for using link aggregation group (lag) status information
Cui et al. Scalable and load-balanced data center multicast
Ni et al. Provisioning high-availability datacenter networks for full bandwidth communication
US9197545B2 (en) Highly scalable modular system with high reliability and low latency
KR20180122513A (en) Method and framework for traffic engineering in network hypervisor of sdn-based network virtualization platform
CN113630319B (en) Data distribution method, device and related equipment
Li et al. MPF-MLBS: a multi-path load balancing strategy for SDN networks based on multiple performance factors
Saifullah et al. Open flow-based server load balancing using improved server health reports
Nithin et al. Efficient load balancing for multicast traffic in data center networks using SDN
Zhang et al. Virtualized network coding functions on the Internet
CN106302215A (en) A kind of method and device E-Packeted
Zhu et al. Optimal multicast in virtualized datacenter networks with software switches
Wion et al. Change in continuity: Chaining services with an augmented igp
Wette et al. HybridTE: traffic engineering for very low-cost software-defined data-center networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant