Traffic shunting method and device, electronic equipment and storage medium
By diversion according to the type of traffic packets and the inner five-tuple information in the mobile terminal traffic processing, the problem of unbalanced traffic shunt of mobile terminals is solved and the load balancing of the traffic processor is realized.
Patent Information
- Application Number
- CN202510342636.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art is difficult to achieve efficient and highly balanced shunt of mobile terminal traffic, resulting in unbalanced load of the traffic processor.
By obtaining the traffic packets in the mobile core network, determine their packet type, including whether they have been sharded, and shunt the traffic packets according to the inner five-tuple information.
It realizes highly balanced shunt of mobile terminal traffic, ensuring load balancing of multiple traffic processors without the need for shard reorganization or shard broadcasting.
Smart Images

Figure CN120186673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technologies, and particularly relates to a traffic splitting method, device, electronic device, and storage medium. Background Art
[0002] In the era of mobile Internet, mobile phones have gradually replaced computers as the daily Internet access tools for the public. The traffic of the mobile core network occupies most of the Internet traffic, and the instantaneous mobile traffic can be as high as hundreds of gigabytes. Therefore, it is necessary to allocate this part of the traffic to multiple traffic processors for processing. How to evenly allocate mobile traffic to ensure the load balance of traffic processors is a problem faced currently.
[0003] Generally, in the traffic data packets to be allocated after collection, the whole packets account for 80%, and the fragmented packets account for 20%. Currently, usually, the inner five-tuple information corresponding to the fragmented packets without carrying the inner five-tuple is determined through fragmented broadcasting or fragmented recombination, but there are disadvantages such as generating redundant traffic and changing traffic characteristics. Therefore, in related technologies, the inner five-tuple with a relatively high traffic discrimination degree is generally not used for traffic splitting, but the outer two-tuple that does not need to consider the fragmentation problem is used for traffic splitting. However, the discrimination degree of the outer two-tuple is relatively low, resulting in poor balance of traffic splitting. Summary of the Invention
[0004] The present invention provides a traffic splitting method, device, electronic device, and storage medium to solve the problem that there is currently a lack of an efficient and highly balanced traffic splitting method for the traffic of mobile terminals.
[0005] According to one aspect of the present invention, a traffic splitting method is provided. The method includes:
[0006] Obtain a plurality of traffic data packets, where the traffic data packets are obtained from a mobile core network;
[0007] For each traffic data packet, determine the data packet type of the traffic data packet, where the data packet category includes indicating whether the traffic data packet has been fragmented. The traffic data packet that has not been fragmented carries inner five-tuple information, and the inner five-tuple information is associated with the Internet;
[0008] Determine the inner five-tuple information corresponding to the traffic data packet according to the data packet type, and split the traffic data packet according to the inner five-tuple information.
[0009] According to another aspect of the present invention, a traffic splitting device is provided. The device includes:
[0010] A data packet acquisition module, configured to acquire a plurality of traffic data packets, where the traffic data packets are acquired from a mobile core network;
[0011] A type classification module, configured to determine, for each of the traffic data packets, the data packet type of the traffic data packet, where the data packet category includes indicating whether the traffic data packet has been fragmented, and the traffic data packet that has not been fragmented carries inner-layer five-tuple information, and the inner-layer five-tuple information is associated with the Internet;
[0012] A data packet shunting module, configured to determine the corresponding inner-layer five-tuple information of the traffic data packet according to the data packet type, and shunt the traffic data packet according to the inner-layer five-tuple information.
[0013] According to another aspect of the present invention, there is provided an electronic device, where the electronic device includes:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; where
[0016] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the traffic shunting method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the traffic shunting method according to any embodiment of the present invention is implemented.
[0018] The technical solution of the embodiment of the present invention obtains multiple traffic data packets, where the traffic data packets are obtained from the mobile core network; for each traffic data packet, determine the data packet type of the traffic data packet, where the data packet category includes indicating whether the traffic data packet has been fragmented, and the traffic data packet that has not been fragmented carries inner five-tuple information, and the inner five-tuple information is associated with the Internet; determine the corresponding inner five-tuple information of the traffic data packet according to the data packet type, and perform traffic splitting on the traffic data packet according to the inner five-tuple information. The present invention performs traffic splitting on any type of traffic data packet (the traffic data packet may not carry inner five-tuple information) based on the inner five-tuple information with high discrimination, and can further distribute the traffic data packets with different inner five-tuple information to different traffic processors or the same traffic processor to improve the uniformity of traffic splitting and ensure the load balance of multiple traffic processors for traffic processing. The present invention can achieve highly balanced splitting of mobile terminal traffic without fragment recombination or fragment broadcasting.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 is a flowchart of a traffic splitting method provided in Embodiment 1 of the present invention;
[0022] Figure 2 is a flowchart of a traffic splitting method provided in Embodiment 2 of the present invention;
[0023] Figure 3 is a comparison diagram of a traffic data packet and a data packet fragment provided in an embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of traffic data packet fragmentation under an inner fragmentation category provided in an embodiment of the present invention;
[0025] Figure 5 is a schematic diagram of traffic data packet fragmentation under an outer fragmentation category provided in an embodiment of the present invention;
[0026] Figure 6 It is a flowchart of a traffic splitting method provided in Embodiment 3 of the present invention;
[0027] Figure 7 It is a schematic diagram of the fragmentation of traffic data packets under a second processing category provided in an embodiment of the present invention;
[0028] Figure 8 It is a schematic structural diagram of a traffic splitting device provided in Embodiment 4 of the present invention;
[0029] Figure 9 It is a schematic structural diagram of an electronic device for implementing the traffic splitting method of the embodiment of the present invention. Detailed implementation manners
[0030] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 This is a flowchart of a traffic splitting method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of evenly splitting the traffic of a mobile terminal. This method can be executed by a traffic splitting device, which can be implemented in the form of hardware and / or software, and the traffic splitting device can be configured in a computer. As Figure 1 shown, the method includes:
[0034] S110. Obtain a plurality of traffic data packets.
[0035] Among them, the traffic data packet can be understood as a data packet obtained from the mobile core network. The data packet can be a packet for data transmission between mobile terminals. The mobile core network can be understood as a component of the mobile network.
[0036] In an embodiment of the present invention, specifically, traffic data packets of multiple mobile terminals can be instantaneously captured in the mobile core network.
[0037] S120. For each of the traffic data packets, determine the data packet type of the traffic data packet.
[0038] Among them, the data packet category can characterize whether the traffic data packet has been fragmented. The traffic data packet that has not been fragmented carries inner five-tuple information, and the inner five-tuple information is associated with the Internet. In addition, the traffic data packet that has not been fragmented may also carry outer five-tuple information, and the outer five-tuple information is associated with the mobile core network. That is, the traffic data packet that has not been fragmented can carry both inner five-tuple information and outer five-tuple information. Among them, the inner five-tuple information is associated with the transmission process of the traffic data packet in the Internet. The outer five-tuple information is associated with the transmission process of the traffic data packet in the mobile core network. The five-tuple information includes a source Internet Protocol (IP) address, a destination IP address, a source port, a destination port, and a transport protocol. The inner five-tuple information and the outer five-tuple information may be different. Usually, in the transmitted traffic, there is a one-to-many relationship between the outer five-tuple and the inner five-tuple, and the inner five-tuple has a higher discrimination degree.
[0039] Correspondingly, the traffic data packet that has been fragmented may not carry inner five-tuple information, or may carry inner five-tuple information.
[0040] Optionally, the data packet type may include a first type and a second type. The first type characterizes that the traffic data packet has been fragmented. The second type characterizes that the traffic data packet has not been fragmented.
[0041] In an embodiment of the present invention, the traffic data packet that has been fragmented can be called a fragmented data packet. The traffic data packet that has not been fragmented can be called an unfragmented data packet.
[0042] Optionally, determining the data packet type of the traffic data packet includes:
[0043] When a fragmentation flag is carried on the traffic data packet, determine the data packet type of the traffic data packet as the first type;
[0044] When the traffic data packet does not carry a fragmentation flag, determine the data packet type of the traffic data packet as the second type.
[0045] It should be understood that after the traffic data packet is fragmented, the fragmented data packets carry fragmentation flags. The fragmentation flag indicates that the traffic data packet has been fragmented.
[0046] S130. Determine the inner five-tuple information corresponding to the traffic data packet according to the data packet type, and perform traffic splitting on the traffic data packet according to the inner five-tuple information.
[0047] In an embodiment of the present invention, the inner five-tuple information corresponding to the traffic data packet of any data packet type can be determined, and traffic splitting is performed on the traffic data packet according to the inner five-tuple information.
[0048] Specifically, the traffic data packets with different inner five-tuple information can be split to different traffic processors, or can also be split to the same traffic splitting processor. Exemplarily, there are 100 types of the inner five-tuple information. 30 of them can be split to processor A, another 30 of them can be split to processor B, and 40 of them can be split to processor C, etc.
[0049] Optionally, the data packet type includes a second type indicating that the traffic data packet has not been fragmented; the determining the inner five-tuple information corresponding to the traffic data packet according to the data packet type includes:
[0050] Regard the traffic data packet of the second type as an unfragmented data packet;
[0051] Extract the inner five-tuple information from the unfragmented data packet to obtain the inner five-tuple information.
[0052] Among them, the unfragmented data packet carries the inner five-tuple information. When the traffic data packet is an unfragmented data packet of the second type, the inner five-tuple information can be directly extracted from the unfragmented data packet to obtain the inner five-tuple information.
[0053] The technical solution of the embodiment of the present invention obtains multiple traffic data packets, where the traffic data packets are obtained from the mobile core network; for each traffic data packet, determine the data packet type of the traffic data packet, where the data packet category includes indicating whether the traffic data packet has been fragmented, and the traffic data packet that has not been fragmented carries inner five-tuple information, and the inner five-tuple information is associated with the Internet; determine the corresponding inner five-tuple information of the traffic data packet according to the data packet type, and perform traffic splitting on the traffic data packet according to the inner five-tuple information. Based on the inner five-tuple information with a relatively high discrimination degree, the present invention splits any type of traffic data packet (the traffic data packet may not carry inner five-tuple information), and can further distribute the traffic data packets with different inner five-tuple information to different traffic processors or the same traffic processor to improve the uniformity of traffic splitting and ensure the load balance of multiple traffic processors for traffic processing. The present invention can achieve highly balanced splitting of mobile terminal traffic without fragmentation recombination or fragmentation broadcasting.
[0054] Embodiment 2
[0055] Figure 2 It is a flowchart of a traffic splitting method provided by Embodiment 2 of the present invention. This embodiment refines the determination of the corresponding inner five-tuple information of the traffic data packet according to the data packet type in the above embodiment. As Figure 2 shown, the method includes:
[0056] S210. Obtain multiple traffic data packets.
[0057] S220. For each traffic data packet, determine the data packet type of the traffic data packet.
[0058] S230. Take the traffic data packet of the first type as a fragmented data packet, where the fragmented data packet carries fragmented triple information.
[0059] Among them, the fragmented triple information may be the information carried on the fragmentation flag. It should be understood that multiple fragmented data packets obtained from the same fragmentation process may carry the same fragmented triple information characterizing this fragmentation process.
[0060] The fragmented data packet may be obtained by fragmenting a first data packet. Optionally, the fragmented data packet may be a sub-packet obtained by fragmenting the first data packet during the transmission process in the Internet and the mobile core network. The first data packet may correspond to multiple fragmented data packets. The first data packet may be understood as a complete data packet or an unfragmented data packet. The first data packet may carry complete inner five-tuple information. The fragmented data packets obtained by fragmentation may or may not carry complete inner five-tuple information.
[0061] Take Figure 3 as an example. Figure 3 FIG. is a comparison schematic diagram of a first data packet and a fragmented data packet provided according to an embodiment of the present invention. Among them, 11 represents a first data packet. 22, 33, and 44 represent three fragmented data packets obtained by fragmenting the first data packet. 22 represents a single-part header data packet corresponding to the single-part header type. 33 represents a single-part middle data packet corresponding to the single-part middle type. 44 represents a single-part tail data packet corresponding to the single-part tail type.
[0062] S240. Determine the processing category corresponding to the fragmented data packet and the fragmentation type of the fragmented data packet under the processing category.
[0063] Among them, the processing category may characterize the processing relationship between the first data packet and the fragmented data packet. Optionally, the processing category may include a first category and a second category. The first category includes an inner fragmentation category or an outer fragmentation category. The inner fragmentation category characterizes that the traffic data packet is obtained by inner fragmentation processing. The outer fragmentation category characterizes that the traffic data packet is obtained by outer fragmentation processing. Inner fragmentation processing is performed in the Internet, and outer fragmentation processing is performed in the mobile core network. The fragmentation processing may be understood as a process of cutting a complete data packet into multiple fragments (sub-packets). The second type characterizes that the traffic data packet is obtained by inner fragmentation processing and outer fragmentation processing.
[0064] The fragmentation type may characterize the location relationship between the message fragment in the fragmented data packet and the first message in the first data packet. Optionally, the fragmentation types under the first category include a single-part header type, a single-part middle type, or a single-part tail type. The fragmentation types under the second category include a first type representing the outer fragmentation header of the fragmented data packet as the inner fragmentation header, a second type representing the outer fragmentation middle and tail of the fragmented data packet as the inner fragmentation header, a third type representing the outer fragmentation header of the fragmented data packet as the inner fragmentation middle and tail, or a fourth type representing the outer fragmentation middle and tail of the fragmented data packet as the inner fragmentation middle and tail.
[0065] Optionally, determining the processing category corresponding to the sharded data packet and the sharding type of the sharded data packet under the processing category includes:
[0066] Determining the processing category corresponding to the sharded data packet and the sharding type of the sharded data packet under the processing category according to the sharding mark on the sharded data packet.
[0067] In an embodiment of the present invention, the sharding mark marked on the obtained sharded data packet during the sharding process of the traffic data packet may carry sharding processing related information. Based on this sharding processing related information, the processing category corresponding to the sharded data packet and the sharding type of the sharded data packet under the processing category can be directly determined.
[0068] Specifically, in an embodiment of the present invention, the specific manner of determining the processing category and the sharding type based on the sharding processing related information on the sharding mark can be set according to the scenario requirements and will not be specifically limited herein.
[0069] S250. Determine the inner layer five-tuple information corresponding to the sharded data packet according to the sharding type and / or the sharding triple information.
[0070] Optionally, the processing category includes a first category indicating that the sharded data packet is obtained by single sharding of the first data packet, the single sharding is performed in the Internet or the mobile core network, and the sharding types under the first category include a single sharding header type, a single sharding middle type, or a single sharding tail type; determining the inner layer five-tuple information corresponding to the sharded data packet according to the sharding type and / or the sharding triple information includes:
[0071] When the sharded data packet is of the single sharding header type, perform inner layer five-tuple extraction on the sharded data packet to obtain the inner layer five-tuple information;
[0072] When the sharded data packet is of the single sharding middle type or the single sharding tail type, determine the single sharding header data packet corresponding to the sharded data packet according to the sharding triple information carried by the sharded data packet, and determine the inner layer five-tuple information according to the single sharding header data packet, where the single sharding header data packet is the sharded data packet of the single sharding header type, and the sharding triple information carried by the single sharding header data packet is the same as the sharding triple information carried by the sharded data packet.
[0073] Optionally, the first category includes an inner shard category or an outer shard category, the shard triple information includes an inner shard triple or an outer shard triple, the shard triple information carried by the shard data packet of the inner shard category is the inner shard triple, and the shard triple information carried by the shard data packet of the outer shard category is the outer shard triple.
[0074] Figure 4 is a schematic diagram of a shard data packet under an inner shard category provided according to an embodiment of the present invention. The process of determining the inner five-tuple information is described below in conjunction with Figure 4 elaborate on the process of determining the inner five-tuple information:
[0075] It should be noted that the shard data packet of the inner shard category indicates that the first data packet corresponding to the shard data packet has undergone inner shard processing and has not undergone outer shard processing. Figure 4 In [diagram], 11 represents a first data packet. The three shard data packets in 55 are obtained by inner sharding 11, and the three shard data packets in 66 are obtained by transmitting the shard data packets in 55 through the mobile core network (outer layer). The shard data packet to be shunted is the data packet shard in 66. 77 in 66 represents the head shard packet obtained by a single inner sharding corresponding to the single shard header type; 88 represents the middle shard packet obtained by a single inner sharding corresponding to the single shard middle type; 99 represents the tail shard packet obtained by a single inner sharding corresponding to the single shard tail type.
[0076] Specifically, when the received shard data packet is 77, the inner five-tuple information can be directly extracted from 77 (77 carries the inner five-tuple information); when the received shard data packet is 88 or 99, 77 can be located based on the inner shard triple carried by 88 and 99 (the inner shard triples of 77, 88, and 99 are the same), and 88 or 99 can be shunted based on the inner five-tuple information of 77. Further, 77, 88, and 99 can be shunted to the same traffic processor.
[0077] Figure 5 is a schematic diagram of a shard data packet under an outer shard category provided according to an embodiment of the present invention. It should be noted that the shard data packet of the outer shard category indicates that the first data packet corresponding to the shard data packet has not undergone inner shard processing and has undergone outer shard processing. Figure 511 represents a first data packet. The fragmented data packets in aa are obtained by performing Internet (inner layer) transmission on 11. The three fragmented data packets in bb are obtained by performing outer layer fragmentation on aa. The three fragmented data packets (cc, dd, and ee) in bb carry the same outer layer fragmentation triple. cc in bb represents the header fragmented packet obtained by a single outer layer fragmentation corresponding to the single - part header type. dd in bb represents the middle fragmented packet obtained by a single outer layer fragmentation corresponding to the single - part middle type. ee in bb represents the tail fragmented packet obtained by a single outer layer fragmentation corresponding to the single - part tail type.
[0078] In the embodiment of the present invention, the determination method of the inner layer five - tuple information of the fragmented data packets under the outer layer fragmentation category is the same as the above - mentioned determination process of the inner layer five - tuple information of the fragmented data packets under the inner layer fragmentation category. The difference is that: under the outer layer fragmentation category, dd and ee are located based on the outer layer fragmentation triple to locate cc.
[0079] S260. Shunt the traffic data packets according to the inner layer five - tuple information.
[0080] The technical solution of the embodiment of the present invention is as follows: taking the traffic data packets of the first type as fragmented data packets, where the fragmented data packets carry fragmented triple information; determining the processing category corresponding to the fragmented data packets and the fragmentation type of the fragmented data packets under the processing category, where the fragmented data packets are obtained by fragmenting a first data packet, the processing category represents the processing relationship between the first data packet and the fragmented data packets, and the fragmentation type represents the belonging position relationship between the message fragments in the fragmented data packets and the first message in the first data packet; determining the inner layer five - tuple information corresponding to the fragmented data packets according to the fragmentation type and / or the fragmented triple information. The present invention realizes the effect of shunting the fragmented data packets obtained by fragmentation processing based on the inner layer five - tuple information without performing fragmentation recombination and fragmentation broadcast.
[0081] Embodiment Three
[0082] Figure 6 It is a flowchart of a traffic shunting method provided by Embodiment Three of the present invention. This embodiment refines the determination of the inner layer five - tuple information corresponding to the fragmented data packets according to the fragmentation type and / or the fragmented triple information in the above - mentioned embodiment. As Figure 6 shown, the method includes:
[0083] S310. Obtain multiple traffic data packets.
[0084] S320. For each of the traffic data packets, determine the data packet type of the traffic data packet, use the traffic data packets of the first type as fragmented data packets, and determine the corresponding processing category of the fragmented data packets and the fragmentation types of the fragmented data packets under the processing category.
[0085] Optionally, the processing category further includes a second category indicating that the fragmented data packet is obtained by fragmenting the first data packet multiple times. The fragmentation types under the second category include a first type indicating that the fragmented data packet is the outer fragmentation header of the inner fragmentation header, a second type indicating that the fragmented data packet is the outer middle tail of the inner fragmentation header, a third type indicating that the fragmented data packet is the outer fragmentation header of the inner middle tail, or a fourth type indicating that the fragmented data packet is the outer middle tail of the inner middle tail.
[0086] Optionally, determining the corresponding processing category of the fragmented data packet and the fragmentation types of the fragmented data packet under the processing category further includes:
[0087] Determine the corresponding processing category of the fragmented data packet and the fragmentation types of the fragmented data packet under the processing category according to multiple fragmentation marks on the fragmented data packet.
[0088] Wherein, the second category indicates that the fragmented data packet is obtained by performing multiple fragmentation processes on the first data packet.
[0089] It should be understood that each fragmentation process will mark a fragmentation mark on the obtained fragmented data packet. That is, multiple fragmentation marks are marked on the fragmented data packets of the second category.
[0090] Specifically, in the embodiments of the present invention, the specific manner of determining the processing category and the fragmentation type based on the fragmentation processing related information on multiple fragmentation marks can be set according to the scenario requirements, and no specific limitation is made here.
[0091] The technical solution of the embodiments of the present invention realizes accurate classification of the fragmented data packets obtained by performing multiple fragmentation processes by determining the fragmentation types of the fragmented traffic data packets of the second category according to the fragmentation marks.
[0092] S330. In the case where the fragmented data packet is of the first type, extract the inner five-tuple of the fragmented data packet to obtain the inner five-tuple information.
[0093] S340. When the sharded data packet is of the second type, the third type, or the fourth type, determine the multi-header data packet corresponding to the sharded data packet according to the sharded triple information carried by the sharded data packet, and determine the inner five-tuple information according to the multi-header data packet.
[0094] Optionally, the determining the multi-header data packet corresponding to the sharded data packet according to the sharded triple information carried by the sharded data packet includes:
[0095] When the sharded data packet is of the second type, determine the multi-header data packet corresponding to the sharded traffic datagram according to the inner sharded triple carried by the sharded data packet;
[0096] When the sharded data packet is of the third type, determine the multi-header data packet corresponding to the sharded data packet according to the outer sharded triple carried by the sharded data packet;
[0097] When the sharded data packet is of the fourth type, determine the multi-middle packet corresponding to the sharded data packet according to the outer sharded triple carried by the sharded data packet, and determine the multi-header data packet according to the inner sharded triple carried by the multi-middle packet.
[0098] Wherein, the multi-middle packet is the sharded data packet of the second type. The multi-header data packet is the sharded data packet of the first type.
[0099] When the sharded data packet is of the fourth type, the sharded data packet, the located multi-middle packet, and the multi-header data packet are sub-packets obtained by sharding the same first data packet.
[0100] Take Figure 7 as an example. Figure 7 FIG. is a schematic diagram of a sharded data packet under a second category provided according to an embodiment of the present invention. Among them, the sharded data packet of the second category indicates that the first data packet corresponding to the sharded data packet has undergone inner sharding processing and outer sharding processing. Figure 711 represents a first data packet. The three fragmented data packets in AA are obtained by inner fragmentation of 11. The three fragmented data packets in BB are obtained by inner fragmentation of NN in 11. The three fragmented data packets in CC are obtained by inner fragmentation of PP in 11. The three fragmented data packets in DD are obtained by inner fragmentation of QQ in 11. The fragmented data packets to be shunted are the fragmented data packets in BB, CC, and DD. The three fragmented data packets in BB can carry the same outer fragmentation triple; the three fragmented data packets in CC can carry the same outer fragmentation triple; the three fragmented data packets in DD can carry the same outer fragmentation triple; the outer fragmentation triples carried by the three fragmented data packets in BB, CC, and CC can be different. EE represents the first type of fragmented packet; FF and GG represent the second type of fragmented packet; HH and KK represent the third type of fragmented packet; II, JJ, LL, and MM represent the fourth type of fragmented packet.
[0101] As follows in combination with Figure 7 The process of determining the inner five-tuple information is described as follows:
[0102] Specifically, when the received fragmented data packet is EE, the inner five-tuple information can be directly extracted from EE (EE carries the inner five-tuple information).
[0103] When the received fragmented data packet is FF or GG, EE can be located based on the outer fragmentation triple carried by FF or GG (the outer fragmentation triples of EE, FF, and GG are the same) to obtain the inner five-tuple information, and further, FF or GG can be shunted based on the obtained inner five-tuple information.
[0104] When the received fragmented data packet is II or JJ, HH can be located based on the outer fragmentation triple carried by FF or GG (the outer fragmentation triples of HH, II, and JJ are the same); then, EE can be located based on the inner fragmentation triple carried by HH (the inner fragmentation triples of EE, HH, and KK are the same) to obtain the inner five-tuple information, and further, FF or GG can be shunted based on the obtained inner five-tuple information.
[0105] When the received fragmented data packet is LL or MM, KK can be located based on the outer fragmentation triple carried by LL or MM (the outer fragmentation triples of KK, LL, and MM are the same); then, EE can be located based on the inner fragmentation triple carried by KK to obtain the inner five-tuple information, and further, FF or GG can be shunted based on the obtained inner five-tuple information.
[0106] S350. Shunt the traffic data packet according to the inner five-tuple information.
[0107] Based on the above-described embodiment solution, it is possible to obtain the associated inner-layer five-tuple information for the fragmented data packets that have undergone both inner-layer fragmentation processing and outer-layer fragmentation processing (the fragmented data packets may not carry inner-layer five-tuple information), and perform traffic splitting of the fragments based on the obtained inner-layer five-tuple information. The technical effect of traffic splitting of fragments based on inner-layer five-tuple information is achieved.
[0108] Optionally, the overall process of traffic splitting is further elaborated as follows:
[0109] Before elaborating on the overall process, a brief introduction to the associated technical scenario is given. In the embodiments of the present invention, the nodes for collecting and splitting traffic data packets are the transmission gaps between the serving gateway and the Internet gateway in the mobile core network.
[0110] Generally, traffic data packets are of four types:
[0111] 1. Without fragmentation. Specifically, directly extract the inner-layer five-tuple, and perform traffic splitting of the fragmented packets according to the inner-layer five-tuple.
[0112] 2. Inner-layer fragmented packets (inner-layer fragmentation category): Split the traffic data packets according to the inner-layer five-tuple carried by the first fragmented packet of the inner-layer fragmentation.
[0113] 3. Outer-layer fragmented packets (outer-layer fragmentation category): Split the traffic data packets according to the inner-layer five-tuple carried by the first fragmented packet of the outer-layer fragmentation.
[0114] 4. Inner and outer fragmented packets (second processing category): The outer-layer fragmented packets are associated with the inner-layer fragmented packets, and the traffic data packets are split according to the inner-layer five-tuple carried by the outer-layer fragmented header packet of the inner-layer fragmented header packet.
[0115] Generally, fragmented data packets are divided into three fragmentation types, and the fragmentation types can be directly determined based on the relevant information marked on the obtained fragments during the fragmentation process. The fragmentation types can be the first fragment (the first fragmented packet), the middle fragment (the middle fragmented packet), or the last fragment (the last fragmented packet).
[0116] It should be understood that the first fragment, the middle fragment, and the last fragment may be transmitted through different IP routes. Therefore, there may be various situations for the order of arrival at the fragment collection point (or fragment splitting point).
[0117] Specifically, if the first fragment arrives, it triggers the creation of a tracker. The tracker can be understood as an intermediate assignment medium. The key is the fragment triple. Extract the quintuple from the first fragment and assign it to the tracker. Further, if the middle fragment arrives, determine the tracker through the fragment triple to determine the quintuple, and perform distribution through the quintuple. Still further, if the last fragment arrives, determine the tracker through the fragment triple to determine the quintuple, and perform distribution through the quintuple. Destroy the tracker. Among them, the tracker can be understood as an intermediate carrier for assignment.
[0118] Optionally, for traffic data packets that have not been fragmented.
[0119] Specifically, for the collected traffic data packets, directly decode each packet to the innermost layer; perform distribution through the inner-layer quintuple.
[0120] Optionally, for fragmented data packets of the inner-layer fragmentation category.
[0121] Specifically, decode each packet to the innermost layer;
[0122] If the first fragment arrives, trigger the creation of a tracker. The key is the inner-layer fragment triple. Extract the inner-layer quintuple from the first fragment and assign it to the tracker.
[0123] If the middle fragment arrives, determine the tracker through the inner-layer fragment triple to determine the inner-layer quintuple, and perform distribution through the inner-layer quintuple.
[0124] If the last fragment arrives, determine the tracker through the inner-layer fragment triple to determine the quintuple, and perform distribution through the inner-layer quintuple; destroy the tracker.
[0125] Optionally, for fragmented data packets of the outer-layer fragmentation category.
[0126] Specifically, decode each packet to the innermost layer;
[0127] If the first fragment arrives, trigger the creation of a tracker. The key is the outer-layer fragment triple. Extract the inner-layer quintuple from the first fragment and assign it to the tracker.
[0128] If the middle fragment arrives, determine the tracker through the outer-layer fragment triple to determine the inner-layer quintuple, and perform distribution through the inner-layer quintuple.
[0129] If the last fragment arrives, determine the tracker through the outer-layer fragment triple to determine the quintuple, and perform distribution through the inner-layer quintuple; destroy the tracker.
[0130] Optionally, for fragmented data packets of the second category.
[0131] Specifically, decode the single packet to the innermost layer;
[0132] 1. When the first slice of the outer slice arrives, it triggers the creation of a tracker. The key is the slice triple. Extract the quintuple in the first slice and assign it to the tracker.
[0133] For the first type of traffic datagram slice, create an inner tracker0 based on the inner slice triple: create an outer tracker1 based on the outer slice triple: transfer the quintuple of the inner tracker0 to the outer tracker1 and overwrite the quintuple of tracker1.
[0134] For the third type of traffic datagram slice HH, create an outer tracker2 based on the outer slice triple; transfer the inner quintuple of the inner tracker0 to the outer tracker2 and overwrite the quintuple of tracker2.
[0135] For the third type of traffic datagram slice KK, create an outer tracker3 based on the outer slice triple; transfer the inner quintuple of the inner tracker0 to the outer tracker3 and overwrite the quintuple of tracker3.
[0136] At this point, the records in tracker1, tracker2, and tracker3 are already the inner quintuples.
[0137] Furthermore, 1. When the middle slice of the outer slice arrives, determine the tracker through the slice triple to determine the quintuple, and distribute through the quintuple.
[0138] For the middle slice FF of tracker1, determine tracker1 through the outer slice triple to determine the inner quintuple, and distribute through the inner quintuple.
[0139] For the middle slice II of tracker2, determine tracker2 through the outer slice triple to determine the inner quintuple, and distribute through the inner quintuple.
[0140] For the middle slice LL of Tracker3, determine tracker3 through the outer slice triple to determine the inner quintuple, and distribute through the inner quintuple
[0141] Furthermore, 1. When the last slice of the outer slice arrives, determine the tracker through the slice triple to determine the quintuple, and distribute through the quintuple.
[0142] For the trailing piece GG of tracker1, determine tracker1 through the outer shard triple to determine the inner quintuple, and distribute through the inner quintuple. Destroy tracker1.
[0143] For the trailing piece JJ of tracker2, determine tracker2 through the outer shard triple to determine the inner quintuple, and distribute through the inner quintuple. Destroy tracker2.
[0144] For the trailing piece MM of Tracker3, determine tracker3 through the outer shard triple to determine the inner quintuple, and distribute through the inner quintuple. Destroy tracker3.
[0145] The present invention realizes the transfer of the inner quintuple by creating a tracker. For traffic data packets of multiple processing categories, without performing shard recombination and shard broadcasting, traffic shunting is achieved according to their inner quintuples, achieving the purpose of traffic load balancing shunting for mobile terminals.
[0146] Embodiment 4
[0147] Figure 8 It is a schematic structural diagram of a traffic shunting device provided in Embodiment 4 of the present invention. As Figure 8 shown, the device includes: a data packet acquisition module 310, a type division module 320, and a data packet shunting module 330.
[0148] Among them, the data packet acquisition module 310 is used to acquire multiple traffic data packets, where the traffic data packets are acquired from the mobile core network; the type division module 320 is used to determine the data packet type of each traffic data packet, where the data packet category includes indicating whether the traffic data packet has undergone shard processing, and the traffic data packet that has not undergone shard processing carries inner quintuple information, and the inner quintuple information is associated with the Internet; the data packet shunting module 330 is used to determine the corresponding inner quintuple information of the traffic data packet according to the data packet type, and shunt the traffic data packet according to the inner quintuple information.
[0149] The technical solution of the embodiment of the present invention obtains multiple traffic data packets, where the traffic data packets are obtained from a mobile core network; for each traffic data packet, determine the data packet type of the traffic data packet, where the data packet category includes indicating whether the traffic data packet has been fragmented, and the traffic data packet that has not been fragmented carries inner-layer five-tuple information, and the inner-layer five-tuple information is associated with the Internet; determine the inner-layer five-tuple information corresponding to the traffic data packet according to the data packet type, and perform traffic splitting on the traffic data packet according to the inner-layer five-tuple information. Based on the inner-layer five-tuple information with high discrimination, the present invention performs traffic splitting on any type of traffic data packet (the traffic data packet may not carry inner-layer five-tuple information), and can further distribute the traffic data packets with different inner-layer five-tuple information to different traffic processors or the same traffic processor to improve the uniformity of traffic splitting and ensure the load balance of multiple traffic processors for traffic processing. The present invention can achieve highly balanced traffic splitting for mobile terminal traffic without fragment reassembly or fragment broadcasting.
[0150] Optionally, the data packet type includes a first type indicating that the traffic data packet has been fragmented; the data packet splitting module 330 includes: a fragmentation determination unit, a type classification unit, and a five-tuple determination unit;
[0151] Among them, the fragmentation determination unit is used to regard the traffic data packet of the first type as a fragmented data packet, where the fragmented data packet carries fragmented triple information;
[0152] The type classification unit is used to determine the processing category corresponding to the fragmented data packet and the fragmentation type of the fragmented data packet under the processing category, where the fragmented data packet is obtained by fragmenting a first data packet, the processing category indicates the processing relationship between the first data packet and the fragmented data packet, and the fragmentation type indicates the belonging position relationship between the packet fragment in the fragmented data packet and the first packet in the first data packet;
[0153] The five-tuple determination unit is used to determine the inner-layer five-tuple information corresponding to the fragmented data packet according to the fragmentation type and / or the fragmented triple information.
[0154] Optionally, the processing category includes a first category indicating that the fragmented data packet is obtained by single fragmentation of the first data packet, and the single fragmentation is performed in the Internet or the mobile core network. The fragmentation types under the first category include a single-fragment header type, a single-fragment middle type, or a single-fragment tail type; the five-tuple determination unit is specifically used for:
[0155] When the fragmented data packet is of the single - part header type, extract the inner five - tuple from the fragmented data packet to obtain the inner five - tuple information;
[0156] When the fragmented data packet is of the single - part middle type or the single - part tail type, determine the single - part header data packet corresponding to the fragmented data packet according to the fragmentation triple information carried by the fragmented data packet, and determine the inner five - tuple information according to the single - part header data packet, where the single - part header data packet is the fragmented data packet of the single - part header type, and the fragmentation triple information carried by the single - part header data packet is the same as the fragmentation triple information carried by the fragmented data packet.
[0157] Optionally, the first category includes an inner fragmentation category or an outer fragmentation category, the fragmentation triple information includes an inner fragmentation triple or an outer fragmentation triple, the fragmented data packet of the inner fragmentation category carries an inner fragmentation triple, and the fragmented data packet of the outer fragmentation category carries the outer fragmentation triple.
[0158] Optionally, the processing category further includes a second category indicating that the fragmented data packet is obtained by fragmenting the first data packet multiple times. The fragmentation types under the second category include a first type indicating that the fragmented data packet is an outer - layer fragmentation header of an inner - layer fragmentation header, a second type indicating that the fragmented data packet is an outer - layer middle - tail of an inner - layer fragmentation header, a third type indicating that the fragmented data packet is an outer - layer fragmentation header of an inner - layer middle - tail, or a fourth type indicating that the fragmented data packet is an outer - layer middle - tail of an inner - layer middle - tail;
[0159] The five - tuple determination unit includes: a first five - tuple determination subunit and a second five - tuple determination subunit;
[0160] Among them, the first five - tuple determination subunit is used to extract the inner five - tuple from the fragmented data packet when the fragmented data packet is of the first type to obtain the inner five - tuple information;
[0161] The second five - tuple determination subunit is used to determine the multi - part header data packet corresponding to the fragmented data packet according to the fragmentation triple information carried by the fragmented data packet when the fragmented data packet is of the second type, the third type, or the fourth type, and determine the inner five - tuple information according to the multi - part header data packet, where the multi - part header data packet is the fragmented data packet of the first type.
[0162] Optionally, the second five - tuple determination subunit is specifically used for:
[0163] When the sharded data packet is of the second type, determine a multi-header data packet corresponding to the traffic datagram shard according to the inner shard triple carried in the sharded data packet;
[0164] When the sharded data packet is of the third type, determine a multi-header data packet corresponding to the sharded data packet according to the outer shard triple carried in the sharded data packet;
[0165] When the sharded data packet is of the fourth type, determine a multi-middle packet corresponding to the sharded data packet according to the outer shard triple carried in the flow sharded data packet, and determine the multi-header data packet according to the inner shard triple carried in the multi-middle packet, where the multi-header data packet is the sharded data packet of the second type.
[0166] Optionally, the type classification unit is specifically configured to:
[0167] Determine the processing category corresponding to the sharded data packet and the shard type of the sharded data packet under the processing category according to the shard flag on the sharded data packet.
[0168] Optionally, the data packet type includes a second type indicating that the traffic data packet is not sharded; the data packet splitting module 330 is specifically configured to:
[0169] Use the traffic data packet of the second type as an unsharded data packet;
[0170] Extract the inner five-tuple of the unsharded data packet to obtain the inner five-tuple information.
[0171] The traffic splitting device provided by the embodiments of the present invention can execute the traffic splitting method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0172] Embodiment 4
[0173] Figure 9 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0174] As shown Figure 9 in FIG. 1, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0175] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0176] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the traffic splitting method.
[0177] In some embodiments, the traffic splitting method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the traffic splitting method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the traffic splitting method by any other appropriate means (e.g., by means of firmware).
[0178] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0179] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0180] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0181] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0182] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0183] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0184] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A flow diversion method, characterized in that: include: Acquire multiple traffic data packets, wherein the traffic data packets are acquired from a mobile core network; For each of the traffic data packets, determine the data packet type of the traffic data packet, wherein the data packet type includes whether the traffic data packet has been processed by fragmentation, and the traffic data packet that has not been processed by fragmentation carries inner five-tuple information, and the inner five-tuple information is associated with the Internet; The inner five-tuple information corresponding to the traffic data packet is determined according to the data packet type, and the traffic data packet is diverted according to the inner five-tuple information.
2. The method according to claim 1, characterized in that The data packet type includes a first type characterizing that the traffic data packet is processed by fragmentation; The step of determining the inner five-tuple information corresponding to the traffic data packet according to the data packet type includes: Using the traffic data packet of the first type as a fragmented data packet, wherein the fragmented data packet carries fragment triplet information; Determine a processing category corresponding to the fragmented data packet and a fragment type of the fragmented data packet under the processing category, wherein the fragmented data packet is obtained by fragmenting a first data packet, the processing category represents a processing relationship between the first data packet and the fragmented data packet, and the fragment type represents a positional relationship between a message fragment in the fragmented data packet and a first message in the first data packet; The inner quintuple information corresponding to the fragment data packet is determined according to the fragment type and / or the fragment triplet information.
3. The method according to claim 2, characterized in that The processing category includes a first category characterizing that the fragmented data packet is obtained by single fragmentation of the first data packet, the single fragmentation is performed in the Internet or the mobile core network, and the fragment types under the first category include a single-fragment header type, a single-fragment middle type, or a single-fragment tail type; and determining the inner quintuple information corresponding to the fragmented data packet according to the fragment type and / or the fragment triplet information includes: In the case where the fragmented data packet is of the single-header type, extracting inner five-tuples from the fragmented data packet to obtain the inner five-tuple information; In the case that the fragmented data packet is of the single-part middle type or the single-part tail type, the single-part header data packet corresponding to the fragmented data packet is determined according to the fragmented triplet information carried by the fragmented data packet, and the inner layer quintuple information is determined according to the single-part header data packet, wherein the single-part header data packet is the fragmented data packet of the single-part header type, and the fragment triplet information carried by the single-part header data packet is the same as the fragment triplet information carried by the fragmented data packet.
4. The method according to claim 3, characterized in that The first category includes an inner layer fragmentation category or an outer layer fragmentation category, the fragmentation triplet information includes an inner layer fragmentation triplet or an outer layer fragmentation triplet, the fragmentation data packet of the inner layer fragmentation category carries the inner layer fragmentation triplet, and the fragmentation data packet of the outer layer fragmentation category carries the outer layer fragmentation triplet.
5. The method according to claim 2, characterized in that: The processing category also includes a second category characterizing that the fragmented data packet is obtained by fragmenting the first data packet multiple times, and the fragment types under the second category include a first type characterizing that the fragmented data packet is an outer fragment header of an inner fragment header, a second type characterizing that the fragmented data packet is a tail in an outer fragment of an inner fragment header, a third type characterizing that the fragmented data packet is a tail in an inner fragment, or a fourth type characterizing that the fragmented data packet is a tail in an outer fragment of an inner fragment; the inner layer quintuple information corresponding to the fragmented data packet is determined according to the fragment type and / or the fragment triplet information, including: When the fragmented data packet is of the first type, extracting inner five-tuple information from the fragmented data packet to obtain the inner five-tuple information; In the case that the fragmented data packet is of the second type, the third type or the fourth type, a multi-header data packet corresponding to the fragmented data packet is determined based on the fragmented triplet information carried by the fragmented data packet, and the inner layer quintuple information is determined based on the multi-header data packet, wherein the multi-header data packet is the fragmented data packet of the first type.
6. The method according to claim 5, characterized in that The step of determining the multi-part header data packet corresponding to the fragment data packet according to the fragment triplet information carried by the fragment data packet comprises: In the case where the fragmented data packet is of the second type, determining a multi-fragment header data packet corresponding to the traffic datagram fragment according to the inner layer fragment triplet carried by the fragmented data packet; In the case where the fragmented data packet is of the third type, determining a multi-fragment header data packet corresponding to the fragmented data packet according to the outer fragment triplet carried by the fragmented data packet; In the case that the fragmented data packet is of the fourth type, the multi-part middle data packet corresponding to the fragmented data packet is determined according to the outer layer fragment triplet carried by the stream fragmented data packet, and the multi-part header data packet is determined according to the inner layer fragment triplet carried by the multi-part middle data packet, wherein the multi-part header data packet is the fragmented data packet of the second type.
7. The method according to claim 2, characterized in that The determining of the processing category corresponding to the fragmented data packet and the fragment type of the fragmented data packet under the processing category includes: The processing category corresponding to the fragmented data packet and the fragment type of the fragmented data packet under the processing category are determined according to the fragmentation mark on the fragmented data packet.
8. The method according to claim 1, characterized in that The data packet type includes a second type characterizing that the traffic data packet is not processed by fragmentation; The step of determining the inner five-tuple information corresponding to the traffic data packet according to the data packet type includes: treating the traffic data packet of the second type as an unfragmented data packet; An inner five-tuple is extracted from the unfragmented data packet to obtain the inner five-tuple information.
9. A flow diversion device, characterized in that: include: A data packet acquisition module, used to acquire a plurality of traffic data packets, wherein the traffic data packets are acquired from a mobile core network; A type classification module, for determining the data packet type of each of the traffic data packets, wherein the data packet category includes whether the traffic data packet has been processed by fragmentation, and the traffic data packet that has not been processed by fragmentation carries inner five-tuple information, and the inner five-tuple information is associated with the Internet; The data packet diversion module is used to determine the inner layer five-tuple information corresponding to the traffic data packet according to the data packet type, and divert the traffic data packet according to the inner layer five-tuple information.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the traffic diversion method according to any one of claims 1 to 8 when executed.