Data packet sending method, target router and storage medium

By selecting the shortest time-consuming routing path in the router and sharding according to the minimum MTU value, the problems of slow transmission rate and low reorganization efficiency caused by multiple sharding of ultra-long packets are solved, and more efficient packet transmission is achieved.

CN120263728AActive Publication Date: 2025-07-04BEIJING JINTAI LIANCHUANG TECH DEV CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510736311.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-07-04
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

During data transmission, ultra-long data packets require multiple shardings, resulting in slow transmission rates and low efficiency of reorganizing data packets by the destination host, which in turn affects the service transmission efficiency.

Method used

By selecting the shortest time-consuming target routing path from multiple reachable routing paths, and sharding the IP packets according to the minimum MTU value of the transmission network in the target routing path, ensuring that the packets are only sharded once.

Benefits of technology

The routing transmission path of IP packets is optimized, transmission time is reduced, and service transmission efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263728A_ABST
    Figure CN120263728A_ABST
Patent Text Reader

Abstract

The invention provides a data packet sending method, a target router and a storage medium, and the method comprises the steps: receiving an Internet protocol address IP data packet from a target host, the length of the IP data packet being greater than the maximum transmission unit MTU value of a transmission network corresponding to the target router to which the IP data packet is to be sent; according to a destination address of a destination host carried by the IP data packet, determining reachable routing paths for the IP data packet to reach the destination host, and selecting a target routing path with shortest time consumption from the reachable routing paths; and selecting the minimum target MTU value from the MTU values of each transmission network included in the target routing path, fragmenting the IP data packet according to the target MTU value, and finally, sending a plurality of fragmented IP data obtained by fragmenting to a target host through the target routing path. According to the invention, the routing transmission path of the IP data packet is optimized, the IP data packet is fragmented only once, the transmission time of the IP data packet is reduced, and the service transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a data packet sending method, a target router, and a storage medium. Background Art

[0002] Currently, data transmission between different hosts is specifically achieved through a router for data transmission between different hosts.

[0003] In practice, the length of data packets sent by some specific service types of sending hosts is relatively long, exceeding the maximum transmission unit (MTU) value of the transmission network where the router is located in the transmission path. At this time, all routers in the above transmission path that cannot transmit the above data packets need to fragment the data packets to ensure that the data packets are normally transmitted to the destination host. In practice, there may be multiple routers in the above transmission path that cannot transmit the above data packets. The fragmented data packets after fragmentation by the previous router may still have a relatively long length and cannot be transmitted in the transmission network of the subsequent router. Therefore, the subsequent router also needs to further fragment the fragmented data packets, which will result in a slow transmission rate of the data packets and a low efficiency of the destination host to reassemble the data packets, thereby leading to a low service transmission efficiency. Summary of the Invention

[0004] Embodiments of this application provide a data packet sending method, a target router, and a storage medium. By selecting the target routing path with the shortest time consumption from multiple reachable routing paths and fragmenting the IP data packet according to the minimum MTU value of the transmission network in the target routing path, not only the routing transmission path of the IP data packet is optimized, but also the IP data packet is fragmented only once, reducing the transmission time of the IP data packet and improving the service transmission efficiency.

[0005] In a first aspect, embodiments of this application provide a data packet sending method, which is applied to a target router. The method includes: Receiving an Internet Protocol (IP) data packet from a target host, where the length of the IP data packet is greater than the maximum transmission unit (MTU) value of the transmission network corresponding to the target router to which it will be sent; Determining, according to the destination address of the destination host carried in the IP data packet, a reachable routing path for the IP data packet to reach the destination host, and selecting a target routing path with the shortest time consumption from the reachable routing paths; where the reachable routing paths include the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network; Obtain the MTU value of each transmission network included in the target routing path, select the minimum target MTU value from the MTU values of each transmission network, and fragment the IP data packet according to the target MTU value to obtain multiple fragmented IP data; Send the multiple fragmented IP data to the destination host through the target routing path, so that the destination host reorganizes the received multiple fragmented IP data to obtain the IP data packet.

[0006] In a possible implementation manner, the selecting the target routing path with the shortest time consumption from the reachable routing paths includes: For each reachable routing path, according to the sending performance of each router in the reachable routing path and the number of IP data to be sent in each router, calculate the sending time of the transmission network corresponding to each router in the reachable routing path, and calculate the first total sending time of the reachable routing path according to the sending time of the transmission network corresponding to each router; According to the first total sending time of each reachable routing path, select the first reachable routing paths whose corresponding first total sending time meets the preset threshold condition, and select the first reachable routing path with the minimum corresponding first total sending time from the first reachable routing paths as the target routing path.

[0007] In a possible implementation manner, the method further includes: If there is no first reachable routing path whose corresponding first total sending time meets the preset threshold condition, then according to the number of the fragmented IP data, the sending performance of each router in each reachable routing path, and the number of IP data to be sent in each router, select at least one group of reachable routing paths for cooperatively sending the fragmented IP data from the reachable routing paths; wherein, each group of reachable routing paths includes at least two reachable routing paths, and the number of the fragmented IP data transmitted by each reachable path is determined; According to the second total sending time for each group of reachable routing paths to cooperatively send the fragmented IP data, select the group of reachable routing paths with the minimum corresponding second total sending time that meets the preset threshold condition from the at least one group of reachable routing paths as the target routing path.

[0008] In a possible implementation manner, the selecting at least one group of reachable routing paths for cooperatively sending the fragmented IP data from the reachable routing paths according to the number of the fragmented IP data, the sending performance of each router in each reachable routing path, and the number of IP data to be sent in each router includes: Taking N reachable routing paths as a group, and determining at least one group of reachable routing paths under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data according to the number of the fragmented IP data; where N is a positive integer and 2 ≤ N ≤ M, and M is the total number of the reachable routing paths; Judging whether the number of this group of reachable routing paths is equal to M. If so, obtaining at least one group of reachable routing paths for cooperatively sending the fragmented IP data; if not, taking N + 1 reachable routing paths as a group, and returning to the step of determining at least one group of reachable routing paths under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data according to the number of the fragmented IP data, until the number of this group of reachable routing paths is equal to the total number of the reachable routing paths, and obtaining at least one group of reachable routing paths for cooperatively sending the fragmented IP data.

[0009] In a possible implementation manner, after sending the multiple fragmented IP data to the destination host through the target routing path, the method further includes: If an abnormal result that the target fragmented IP data is lost is received, determining a second routing path where the target fragmented IP data is lost according to the abnormal result; For this second routing path, judging whether the number of times of cumulatively lost fragmented IP data of this second routing path within a preset time period exceeds a first preset threshold. If so, marking the second routing path as an unreachable routing path, and returning to the step of determining the reachable routing path for the IP data packet to reach the destination host according to the destination address of the destination host carried in the IP data packet, until the destination host receives the complete multiple fragmented IP data, or the return times reach a second preset threshold.

[0010] In a possible implementation manner, the method further includes: For this second routing path, if the number of times of cumulatively lost fragmented IP data of this second routing path within a preset time period does not exceed the first preset threshold, obtaining the target fragmented IP data transmitted by the second routing path recorded in advance, and re - sending the target fragmented IP data through the second routing path.

[0011] In a possible implementation manner, the re - sending the target fragmented IP data through the second routing path includes: Adjusting the sending priority of the target fragmented IP data under each router in the second routing path; where the adjusted sending priority is higher than the sending priority before adjustment; According to the adjusted sending priority, preferentially sending the target fragmented IP data through each router in the second routing path.

[0012] In a possible implementation manner, after marking the second routing path as an unreachable routing path, the method further includes: Obtaining router information in the second routing path and sending the router information to a management host, so that the management host determines a fault cause in the second routing path based on the router information in the second routing path.

[0013] In a second aspect, an embodiment of the present application further provides a target router, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the target router runs, communication between the processor and the storage medium is performed through the bus. The processor executes the machine-readable instructions to perform the steps of the data packet sending method according to any one of the first aspects.

[0014] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the data packet sending method according to any one of the first aspects are executed.

[0015] A data packet sending method, a target router, and a storage medium provided by an embodiment of the present application include: for an IP data packet received from a target host, where the length of the IP data packet is greater than the MTU value of the transmission network corresponding to the target router to which it will be sent, according to the destination address of the destination host carried in the IP data packet, first, determining a reachable routing path for the IP data packet to reach the destination host, and selecting a target routing path with the shortest time consumption from it; then, selecting the smallest target MTU value from the MTU values of each transmission network included in the target routing path, and fragmenting the IP data packet according to the target MTU value. Finally, sending the multiple fragmented IP data obtained by fragmentation to the destination host through the target routing path. Through the above method, both the routing transmission path of the IP data packet is optimized, and the IP data packet is fragmented only once, reducing the transmission time of the IP data packet and improving the service transmission efficiency. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 Shows a flowchart of the first data packet sending method provided by an embodiment of the present application; Figure 2 The schematic structural diagram of a routing transmission network including a target host, a target router, an intermediate router, and a destination host provided by an embodiment of the present application is shown; Figure 3 The flowchart of a second data packet sending method provided by an embodiment of the present application is shown; Figure 4 The flowchart of a third data packet sending method provided by an embodiment of the present application is shown; Figure 5 The flowchart of a fourth data packet sending method provided by an embodiment of the present application is shown. Detailed implementation manners

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purposes of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual scale. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without logical context relationships may be reversed or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.

[0019] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and illustrated in the accompanying drawings here may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0020] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the features stated thereafter, but does not exclude adding other features.

[0021] When transmitting an ultra-long data packet between different hosts, the transmission path for the ultra-long data packet is specified, and multiple routers in this specified transmission path may need to fragment the ultra-long data packet in sequence, resulting in a slow transmission rate and low efficiency of the destination host in reassembling the data packet, thus leading to low service transmission efficiency. Based on this, the embodiments of the present application provide a data packet sending method, a target router, and a storage medium. By selecting the target routing path with the shortest time consumption from multiple reachable routing paths and fragmenting the Internet Protocol (IP) data packet according to the minimum MTU value of the transmission network in the target routing path, both the routing transmission path of the IP data packet is optimized, and the IP data packet is fragmented only once, reducing the transmission time of the IP data packet and improving the service transmission efficiency.

[0022] For the convenience of understanding the embodiments of the present application, a data packet sending method, a target router, and a storage medium provided by the embodiments of the present application will be introduced in detail below.

[0023] As Figure 1 shown, a data packet sending method provided by the first embodiment of the present application is applied to a target router, and the method includes: S101. Receive an IP data packet from a target host, where the length of the IP data packet is greater than the maximum transmission unit MTU value of the transmission network corresponding to the target router to which it will be sent.

[0024] S102. Determine the reachable routing path for the IP data packet to reach the destination host according to the destination address of the destination host carried in the IP data packet, and select the target routing path with the shortest time consumption from the reachable routing paths; where the reachable routing paths include the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network.

[0025] S103. Obtain the MTU value of each transmission network included in the target routing path, select the minimum target MTU value from the MTU values of each transmission network, and fragment the IP data packet according to the target MTU value to obtain multiple fragmented IP data.

[0026] S104. Send the multiple fragmented IP data to the destination host through the target routing path, so that the destination host reassembles the received multiple fragmented IP data to obtain the IP data packet.

[0027] The above data packet sending method provided by the embodiments of the present application optimizes the routing transmission path of the IP data packet by selecting the target routing path with the shortest time consumption from multiple reachable routing paths and fragmenting the IP data packet according to the minimum MTU value of the transmission network in the target routing path, that is, selecting the target routing path with the shortest time consumption, and also enables the IP data packet to be fragmented only once, reducing the transmission time of the IP data packet and improving the service transmission efficiency.

[0028] The above exemplary steps will be described separately as follows: S101. Receive an IP data packet from a target host, where the length of the IP data packet is greater than the maximum transmission unit (MTU) value of the transmission network corresponding to the target router to which the IP data packet will be sent.

[0029] Here, the target host is the sender of the data (i.e., the IP data packet), and the destination host is the receiver of the data (i.e., the IP data packet). The user can send the IP data packet to the destination host through the target host. Specifically, the target host sends the IP data packet to the destination host by selecting a suitable target routing path (i.e., the routing path with the shortest time consumption and capable of reaching the destination host). The above target routing path includes multiple routers, and each router corresponds to a transmission network; the above multiple routers include a target router and intermediate routers. The intermediate router is the next-hop router of the target router, that is, the target router is the router closest to the target host. In the embodiments of the present application, the length of the above IP data packet is greater than the maximum transmission unit (Maximum Transmission Unit, MTU) value of the transmission network corresponding to the target router to which the IP data packet will be sent. Therefore, the target router needs to fragment the IP data packet to ensure that the IP data packet can be sent to the destination host.

[0030] In practice, the target router can be a router directly connected to the target host or a router indirectly connected to the target host. Taking the target router as a router directly connected to the target host as an example for illustration, as Figure 2 shown, the target host is 11, the destination host is 21, the router 1 directly connected to the target host 11 is the target router, and the router between the target router and the destination host 21 is the intermediate router; the target host 11 sends an IP data packet to the destination host 21, and the length of the IP data packet is greater than the maximum transmission unit MTU value of the transmission network corresponding to the target router (i.e., router 1). Therefore, the target router (i.e., router 1) needs to fragment the above IP data packet.

[0031] S102. Determine a reachable routing path for the IP packet to reach the destination host according to the destination address of the destination host carried in the IP packet, and select a target routing path with the shortest time consumption from the reachable routing paths; wherein, the reachable routing paths include the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network.

[0032] In the embodiment of the present application, the source address of the target host and the destination address of the destination host are carried in the IP packet. After receiving the IP packet, the target router selects a reachable routing path that can send the IP packet to the destination host from all routing paths from the target host to the destination host according to the destination address of the destination host carried in the IP packet. Then, a target routing path with the shortest time consumption is selected from these reachable routing paths. Here, the above target routing path may include one reachable routing path or multiple reachable routing paths.

[0033] S103. Obtain the MTU value of each transmission network included in the target routing path, select the smallest target MTU value from the MTU values of each transmission network, and fragment the IP packet according to the target MTU value to obtain multiple fragmented IP data.

[0034] In the embodiment of the present application, the above reachable routing paths include the target router and at least one intermediate router between the target router and the destination host. The target router corresponds to a transmission network, and each intermediate router also corresponds to a transmission network. Therefore, the above target routing path includes the transmission networks corresponding to the target router and the intermediate routers respectively, and each transmission network in the target routing path corresponds to an MTU value. Here, the target router selects the smallest target MTU value from the MTU values of each transmission network above, and then fragments the received IP packet according to the above target MTU value to obtain multiple fragmented IP data.

[0035] Here, the target router does not fragment the IP packet according to its own MTU value, but fragments the IP packet according to the smallest target MTU value in the transmission network of the target routing path. In this way, it can be ensured that the subsequent intermediate routers do not need to fragment the IP packet again, and the IP packet is only fragmented once, improving the service transmission efficiency.

[0036] S104. Send the multiple fragmented IP data to the destination host through the target routing path, so that the destination host reassembles the received multiple fragmented IP data to obtain the IP packet.

[0037] In the embodiment of the present application, after the target router fragments the IP data packet, the fragmented IP data is sent to the intermediate router in the target routing path, and the above-mentioned fragmented IP data is sent to the destination host through the intermediate router. In this way, after the destination host receives the multiple fragmented IP data, the multiple received fragmented IP data are recombined to obtain the IP data packet.

[0038] In the embodiment of the present application, the selected target routing path may include one reachable routing path or multiple reachable routing paths. The following will explain these two cases separately: First, the case where the target routing path includes one reachable routing path: As Figure 3 shown, selecting the target routing path with the shortest time consumption from the reachable routing paths includes: S301. For each reachable routing path, according to the sending performance of each router in the reachable routing path and the number of IP data to be sent in each router, calculate the sending time of the transmission network corresponding to each router in the reachable routing path, and calculate the first total sending time of the reachable routing path according to the sending time of the transmission network corresponding to each router.

[0039] Here, the sending performance of each router above is determined according to the central processing unit (CPU), memory, throughput, etc. included in the router; among them, the better the sending performance of the router, correspondingly, the shorter the time for the router to send IP data; the IP data to be sent in each router includes both complete IP data packets and fragmented IP data. Correspondingly, the number of IP data to be sent is determined according to the complete IP data packets and fragmented IP data in each router.

[0040] For each router in the reachable routing path, the target router can calculate the sending time of the transmission network corresponding to the router for the IP data according to the sending performance of the router and the number of IP data to be sent in the router. Through the above method, the sending times of the transmission networks corresponding to multiple routers in the reachable routing path can be obtained. Finally, calculate the sum of the sending times corresponding to the above multiple routers in the reachable routing path, which is the first total sending time of the reachable routing path.

[0041] S302. According to the first total sending time of each reachable routing path, select the first reachable routing path whose corresponding first total sending time meets the preset threshold condition, and select the first reachable routing path with the smallest corresponding first total sending time from the first reachable routing paths as the target routing path.

[0042] In the embodiment of the present application, the first total transmission time of each reachable routing path can be obtained by the above-mentioned method of S301. Then, from each of the above-mentioned reachable routing paths, a first reachable routing path whose corresponding first total transmission time is less than or equal to a preset threshold (that is, satisfying the preset threshold condition) is selected. Here, when there is 1 first reachable routing path, directly determine this first reachable routing path as the target routing path; when there are multiple first reachable routing paths, select a first reachable routing path with the smallest corresponding first total transmission time from these first reachable routing paths as the target routing path.

[0043] Second, the case where the target routing path includes multiple reachable routing paths: Further, as Figure 4 shown, the data packet sending method further includes: S401. If there is no first reachable routing path whose corresponding first total transmission time satisfies the preset threshold condition, then at least one group of reachable routing paths for cooperatively sending the sharded IP data is selected from the reachable routing paths according to the number of the sharded IP data, the sending performance of each router in each reachable routing path, and the number of IP data to be sent in each router; wherein, each group of reachable routing paths includes at least two reachable routing paths, and the number of sharded IP data transmitted by each reachable path is determined.

[0044] Here, after the first total transmission time of each reachable routing path is obtained by the above-mentioned method of S301, if there is no first reachable routing path whose corresponding first total transmission time is less than or equal to the preset threshold (that is, satisfying the preset threshold condition) in each of the above-mentioned reachable routing paths, then at least one group of reachable routing paths for cooperatively (that is, combining) sending the sharded IP data is first selected from the above-mentioned reachable routing paths, and each group of reachable routing paths includes at least two reachable routing paths.

[0045] In the embodiment of the present application, the specific method for selecting the above-mentioned at least one group of reachable routing paths includes: Taking N reachable routing paths as a group, and determining at least one group of reachable routing paths under the condition that each reachable routing path in each group of reachable routing paths includes sharded IP data according to the number of the sharded IP data; wherein, N is a positive integer and 2 ≤ N ≤ M, and M is the total number of the reachable routing paths; Determine whether the number of reachable routing paths in this group is equal to M. If so, obtain at least one group of reachable routing paths for collaboratively sending the fragmented IP data; if not, take N + 1 reachable routing paths as a group, and return the step of obtaining at least one group of reachable routing paths under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data according to the number of the fragmented IP data, until the number of this group of reachable routing paths is equal to the total number of the reachable routing paths, and obtain at least one group of reachable routing paths for collaboratively sending the fragmented IP data.

[0046] In the specific implementation, first determine that N is equal to 2, and the number of fragmented IP data is. Then, taking 2 reachable paths as a group, and under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data, there are a total of 3 groups of reachable routing paths.

[0047] For example, the 3 groups of reachable routing paths are as follows: group a of reachable routing paths (including reachable routing path a1 and reachable routing path a2), reachable routing path a1 transmits 1 fragmented IP data, and reachable routing path a2 transmits 3 fragmented IP data; group b of reachable routing paths (including reachable routing path b1 and reachable routing path b2), reachable routing path b1 transmits 2 fragmented IP data, and reachable routing path b2 transmits 2 fragmented IP data; group c of reachable routing paths (including reachable routing path c1 and reachable routing path c2), reachable routing path c1 transmits 3 fragmented IP data, and reachable routing path c2 transmits 1 fragmented IP data.

[0048] Then, determine that N = 2 < M = 4, and then determine that N = 2 + 1 = 3, and the number of fragmented IP data is 4. Then, taking 3 reachable paths as a group, and under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data, there are a total of 3 groups of reachable routing paths.

[0049] For example, the 3 groups of reachable routing paths are as follows: group c of reachable routing paths (including reachable routing path c1, reachable routing path c2, and reachable routing path c3), reachable routing path c1 transmits 1 fragmented IP data, reachable routing path c2 transmits 1 fragmented IP data, and reachable routing path c3 transmits 2 fragmented IP data; group d of reachable routing paths (including reachable routing path d1, reachable routing path d2, and reachable routing path d3), reachable routing path d1 transmits 1 fragmented IP data, reachable routing path d2 transmits 2 fragmented IP data, and reachable routing path d3 transmits 1 fragmented IP data; group e of reachable routing paths (including reachable routing path e1, reachable routing path e2, and reachable routing path e3), reachable routing path e1 transmits 2 fragmented IP data, reachable routing path e2 transmits 1 fragmented IP data, and reachable routing path e3 transmits 1 fragmented IP data.

[0050] Then, continue to determine that N = 3 < M = 4, and then determine that N = 4. The number of fragmented IP data is 4. Then, taking 4 reachable paths as a group, and under the condition that each reachable routing path in each group of reachable routing paths includes the fragmented IP data, there is a total of 1 group of reachable routing paths. Specifically, the 4 groups of reachable routing paths are: f group of reachable routing paths (including f1 reachable routing path, f2 reachable routing path, f3 reachable routing path, and f4 reachable routing path). The f1 reachable routing path transmits 1 fragmented IP data, the f2 reachable routing path transmits 1 fragmented IP data, the f3 reachable routing path transmits 1 fragmented IP data, and the f4 reachable routing path transmits 1 fragmented IP data. Then, continue to determine that N = M = 4, and the above-mentioned a~f groups of reachable routing paths can be obtained.

[0051] S402. According to the second total transmission time for cooperatively transmitting the fragmented IP data of each group of reachable routing paths, select a group of reachable routing paths whose corresponding second total transmission time meets the preset threshold condition and is the smallest from the at least one group of reachable routing paths as the target routing path.

[0052] Here, after obtaining multiple groups of reachable routing paths through S401, for each group of reachable routing paths, according to the transmission performance of each router in each reachable routing path of the group and the number of IP data to be transmitted, determine the second total transmission time for the group of reachable routing paths to cooperatively transmit the fragmented IP data. Similarly, from the second total transmission time of each group of reachable routing paths, select candidate groups of reachable routing paths whose corresponding second total transmission time meets the preset threshold condition, and select a group of reachable routing paths whose corresponding second total transmission time is the smallest from the above candidate groups of reachable routing paths as the target routing path.

[0053] By the above method of selecting the target routing path with the shortest time-consuming for sending IP data packets from multiple paths, the routing transmission path of IP data packets is optimized, which can further reduce the transmission time of IP data packets and improve the service transmission efficiency.

[0054] Further, as Figure 5 shown, in the data packet sending method provided by the embodiment of the present application, after sending the multiple fragmented IP data to the destination host through the target routing path, the method further includes: S501. If an abnormal result indicating that the target fragmented IP data is lost is received, determine a second routing path for the lost target fragmented IP data according to the abnormal result.

[0055] S502. For the second routing path, determine whether the number of times of cumulatively lost fragmented IP data on the second routing path within a preset time period exceeds a first preset threshold. If so, mark the second routing path as an unreachable routing path, and return to the step of determining the reachable routing path for the IP packet to reach the destination host according to the destination address of the destination host carried in the IP packet, until the destination host receives a complete plurality of fragmented IP data, or the number of returns reaches a second preset threshold.

[0056] Combined with S501 to S502, after the destination host receives the fragmented IP data of the IP packet, it will feedback the data reception result to the source host in the reverse direction through the target routing path. At this time, the target router can also obtain the data reception result. If the data reception result is an abnormal result of the loss of the target fragmented IP data, then the target router determines the second routing path for the lost target fragmented IP data according to the above abnormal result. Here, when the target routing path is a reachable routing path, the second routing path is the target routing path for transmitting the fragmented IP data; when the target routing path is a group of reachable routing paths, the second routing path is the reachable routing path in the group of reachable routing paths for transmitting the target fragmented IP data. Here, the above target fragmented IP data can be one or more. Correspondingly, the above second routing path can also be one reachable routing path for transmitting the target fragmented IP data, or multiple reachable routing paths for transmitting the target fragmented IP data.

[0057] In the embodiment of the present application, the number of times of cumulatively lost fragmented IP data on each reachable routing path in the target routing path within a preset time period (specifically including the number of times of cumulatively lost fragmented IP data on the second routing path within a preset time period) is pre-recorded in the target router. If the target router determines that the number exceeds the first preset threshold (for example, 5 times, and the first preset threshold is set according to actual needs and is not specifically limited here), then mark the second routing path as an unreachable routing path, and return to the step of S102 to re-determine the target routing path and send a plurality of fragmented IP data to the destination host through the re-determined target routing path, until the destination host receives a complete plurality of fragmented IP data, or the number of returns reaches a second preset threshold (for example, the number of returns reaches 5 times, which means there are other faults and it will not return in a loop, and the management host can be notified to prompt the administrator of the abnormality). Here, the above preset time period can be one day or one week, etc., and the preset time period is set according to actual needs and is not specifically limited here.

[0058] Further, for the data packet sending method provided in the embodiment of the present application, the method further includes: For this second routing path, if the number of times of cumulatively lost shard IP data on the second routing path within a preset time period does not exceed the first preset threshold, obtain the target shard IP data transmitted by the second routing path recorded in advance, and retransmit the target shard IP data through the second routing path.

[0059] Specifically, the data identifier of the shard IP data transmitted by each reachable routing path in the target routing path is recorded in the target router (specifically including the data identifier of the shard IP data transmitted by the second routing path); for this second routing path, the target router determines whether the number of times of cumulatively lost shard IP data within a preset time period exceeds the first preset threshold. If not, then, from the above records, determine the target shard IP data corresponding to the data identifier matched by the second routing path, and then retransmit the above target shard IP data through the second routing path again.

[0060] Here, when retransmitting the target shard IP data through the second routing path, first, adjust the sending priority of the target shard IP data under each router in the second routing path; where the adjusted sending priority is higher than the sending priority before adjustment; then, according to the adjusted sending priority, preferentially send the target shard IP data through each router in the second routing path.

[0061] The specific way to adjust the priority is that if there is a specific IP data packet or specific shard IP data of a specific IP data packet in the second routing path, then adjust the sending priority of the target shard IP data under each router in the second routing path to be after the above specific IP data packet or specific IP data packet. If there is no such specific IP data packet or the above specific shard IP data in the second routing path, then adjust the sending priority of the target shard IP data under each router in the second routing path to be the highest. Here, the above specific IP data packet is pre-marked. For example, an IP data packet of a specific type or an IP data packet with a special identifier (such as under a special service), and the priority of the target shard IP data cannot be higher than the priority of the above specific IP data packet or the specific shard IP of the specific IP data packet.

[0062] Furthermore, for the data packet sending method provided in the embodiment of the present application, after marking the second routing path as an unreachable routing path, the method further includes: Obtain the router information in the second routing path, and send the router information to the management host, so that the management host determines the cause of the failure in the second routing path based on the router information in the second routing path.

[0063] Specifically, the target router uploads the router identifiers in the second routing path to the management host. The management host then obtains the log information of each router based on the router identifiers in the second routing path, determines the faulty router and the cause of the fault of the faulty router according to the log information of each router, and displays it to the user for the user to handle the faulty router.

[0064] The above-mentioned packet sending method provided by the embodiment of the present application selects the target routing path with the shortest time consumption from multiple reachable routing paths, and fragments the IP packet according to the minimum MTU value of the transmission network in the target routing path, which not only optimizes the routing transmission path of the IP packet, but also makes the IP packet fragmented only once, reduces the transmission time of the IP packet, and improves the service transmission efficiency.

[0065] The second embodiment of the present application also provides a target router, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the target router runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the packet sending method in the first embodiment.

[0066] Specifically, the above storage medium and processor can be general storage media and processors, which are not specifically limited here. When the processor runs the computer program stored in the storage medium, it can execute the above packet sending method.

[0067] The above-mentioned target router provided by the embodiment of the present application selects the target routing path with the shortest time consumption from multiple reachable routing paths, and fragments the IP packet according to the minimum MTU value of the transmission network in the target routing path, which not only optimizes the routing transmission path of the IP packet, but also makes the IP packet fragmented only once, reduces the transmission time of the IP packet, and improves the service transmission efficiency.

[0068] Corresponding to the packet sending method in the first embodiment above, the third embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the packet sending method in the first embodiment above.

[0069] The above-mentioned computer-readable storage medium provided by the embodiment of the present application selects the target routing path with the shortest time consumption from multiple reachable routing paths, and fragments the IP packet according to the minimum MTU value of the transmission network in the target routing path, which not only optimizes the routing transmission path of the IP packet, but also makes the IP packet fragmented only once, reduces the transmission time of the IP packet, and improves the service transmission efficiency.

[0070] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the method embodiments, and will not be elaborated herein. In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings, direct couplings, or communication connections shown or discussed with each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or modules can be in electrical, mechanical, or other forms.

[0071] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0072] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0073] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0074] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for sending data packets, characterized in that, Applied to a target router, the method includes: Receiving an Internet Protocol (IP) data packet from a target host, where the length of the IP data packet is greater than the Maximum Transmission Unit (MTU) value of the transmission network corresponding to the target router to which it will be sent; Determining, according to the destination address of the destination host carried in the IP data packet, the reachable routing path for the IP data packet to reach the destination host, and selecting, from the reachable routing paths, the target routing path with the shortest time consumption; wherein, the reachable routing paths include the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network; Obtaining the MTU value of each transmission network included in the target routing path, selecting the smallest target MTU value from the MTU values of each transmission network, and fragmenting the IP data packet according to the target MTU value to obtain multiple fragmented IP data; Sending the multiple fragmented IP data to the destination host through the target routing path, so that the destination host can reassemble the received multiple fragmented IP data to obtain the IP data packet.

2. The data packet sending method according to claim 1, wherein The selecting, from the reachable routing paths, the target routing path with the shortest time consumption includes: For each reachable routing path, calculating the transmission time of the transmission network corresponding to each router in the reachable routing path according to the sending performance of each router and the number of IP data to be sent in each router in the reachable routing path, and calculating the first total transmission time of the reachable routing path according to the transmission time of the transmission network corresponding to each router; According to the first total transmission time of each reachable routing path, selecting the first reachable routing path whose corresponding first total transmission time meets the preset threshold condition, and selecting, from the first reachable routing paths, the first reachable routing path with the smallest corresponding first total transmission time as the target routing path.

3. The data packet sending method according to claim 2, wherein The method further includes: If there is no first reachable routing path whose corresponding first total transmission time meets the preset threshold condition, then selecting, from the reachable routing paths, at least one group of reachable routing paths for cooperatively sending the fragmented IP data according to the number of the fragmented IP data, the sending performance of each router in each reachable routing path, and the number of IP data to be sent in each router; wherein each group of reachable routing paths includes at least two reachable routing paths, and the number of fragmented IP data transmitted by each reachable path is determined; Selecting, from the at least one group of reachable routing paths, the group of reachable routing paths with the smallest corresponding second total transmission time that meets the preset threshold condition as the target routing path according to the second total transmission time for the at least one group of reachable routing paths to cooperatively send the fragmented IP data.

4. The data packet sending method according to claim 3, wherein The selecting, from the reachable routing paths, at least one group of reachable routing paths for cooperatively sending the fragmented IP data according to the number of the fragmented IP data, the sending performance of each router in each reachable routing path, and the number of IP data to be sent in each router includes: Take N reachable routing paths as a group, and determine at least one group of reachable routing paths under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data according to the number of the fragmented IP data; where N is a positive integer and 2 ≤ N ≤ M, and M is the total number of the reachable routing paths. Judge whether the number of this group of reachable routing paths is equal to M. If so, obtain at least one group of reachable routing paths for collaboratively sending the fragmented IP data; if not, take N + 1 reachable routing paths as a group, and return to the step of determining at least one group of reachable routing paths under the condition that each reachable routing path in each group of reachable routing paths includes fragmented IP data according to the number of the fragmented IP data, until the number of this group of reachable routing paths is equal to the total number of the reachable routing paths, and obtain at least one group of reachable routing paths for collaboratively sending the fragmented IP data.

5. The data packet sending method according to claim 1, wherein After sending the multiple fragmented IP data to the destination host through the target routing path, the method further includes: If an abnormal result that the target fragmented IP data is lost is received, determine a second routing path where the target fragmented IP data is lost according to the abnormal result. For this second routing path, judge whether the number of times of cumulatively lost fragmented IP data of this second routing path within a preset time period exceeds a first preset threshold. If so, mark the second routing path as an unreachable routing path, and return to the step of determining the reachable routing path for the IP packet to reach the destination host according to the destination address of the destination host carried in the IP packet, until the destination host receives the complete multiple fragmented IP data, or the number of returns reaches a second preset threshold.

6. The data packet sending method according to claim 5, wherein The method further includes: For this second routing path, if the number of times of cumulatively lost fragmented IP data of this second routing path within a preset time period does not exceed the first preset threshold, obtain the target fragmented IP data transmitted by the second routing path recorded in advance, and re - send the target fragmented IP data through the second routing path.

7. The data packet sending method according to claim 6, wherein The re - sending the target fragmented IP data through the second routing path includes: Adjust the sending priority of the target fragmented IP data under each router in the second routing path; where the adjusted sending priority is higher than the adjusted - before sending priority. According to the adjusted sending priority, preferentially send the target fragmented IP data through each router in the second routing path.

8. The data packet sending method according to claim 5, characterized in that, After marking the second routing path as an unreachable routing path, the method further includes: Obtain the router information in the second routing path, and send the router information to the management host, so that the management host determines the failure reason in the second routing path based on the router information in the second routing path.

9. A target router, characterized in that, Include: A processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the target router is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the data packet sending method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, it performs the steps of the data packet sending method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and communication equipment for data transmission in wireless multihop network

    CN102223671A

  • Information forwarding method and space-based information network system

    CN106789661A

  • Routing method and equipment, and computer readable storage medium

    CN108965122A

  • Weighted bandwidth allocation for adaptive routing

    CN112187642A

  • Data transmission processing method and device, network equipment and readable storage medium

    CN112333094A