A data packet sending method, a target router, and a storage medium

By selecting the shortest routing path in the router and fragmenting data according to the minimum MTU value, the problems of slow transmission rate and low reassembly efficiency caused by multiple fragmentation of ultra-long data packets are solved, achieving more efficient data transmission.

CN120263728BActive Publication Date: 2025-10-31BEIJING JINTAI LIANCHUANG TECH DEV CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

During data transmission, excessively long data packets need to be fragmented multiple times, resulting in slow transmission rates and low reassembly efficiency at the destination host, which in turn affects the efficiency of business transmission.

Method used

By selecting the shortest target route from multiple reachable routes and fragmenting IP packets according to the minimum MTU value of the transmission network in the target route, it is ensured that the packets are fragmented only once.

Benefits of technology

The routing and transmission path of IP packets has been optimized, reducing transmission time and improving service transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263728B_ABST
    Figure CN120263728B_ABST
Patent Text Reader

Abstract

This application provides a data packet transmission method, a target router, and a storage medium. The method includes: receiving an Internet Protocol (IP) data packet from a target host, wherein 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 is to be sent; determining a reachable route path for the IP data packet to reach the target host based on the destination address carried by the IP data packet, and selecting the target route path with the shortest transmission time; selecting the smallest target MTU value from the MTU values ​​of each transmission network included in the target route path, and fragmenting the IP data packet according to the target MTU value; finally, sending the fragmented IP data packets to the target host through the target route path. This application optimizes the routing transmission path of IP data packets and ensures that IP data packets are fragmented only once, reducing the transmission time of IP data packets and improving service transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to a data packet sending method, a target router, and a storage medium. Background Technology

[0002] Currently, data transmission between different hosts is specifically achieved through routers.

[0003] In practice, some sending hosts transmit data packets for specific service types that are too long, exceeding the Maximum Transmission Unit (MTU) value of the transmission network where the routers in the transmission path reside. In this case, routers in the aforementioned transmission path that cannot transmit such data packets need to fragment the data packets to ensure that the data packets are transmitted normally to the destination host. In reality, there may be multiple routers in the aforementioned transmission path that cannot transmit such data packets. The fragmented data packets generated by the preceding routers may still be too long to be transmitted in the transmission networks of subsequent routers. Therefore, subsequent routers need to further fragment the fragmented data packets, which leads to a slow data packet transmission rate and low efficiency in data packet reassembly at the destination host, thus resulting in low service transmission efficiency. Summary of the Invention

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

[0005] In a first aspect, embodiments of this application provide a data packet sending method applied to a target router, the method comprising:

[0006] Receive Internet Protocol address (IP) packets from the target host, wherein the length of the IP packets is greater than the maximum transmission unit (MTU) value of the transmission network corresponding to the target router to which they are to be sent;

[0007] Based on the destination address of the destination host carried in the IP data packet, a reachable route path for the IP data packet to reach the destination host is determined, and the target route path with the shortest time is selected from the reachable route paths; wherein, the reachable route path includes the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network;

[0008] 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 data packet according to the target MTU value to obtain multiple fragmented IP data.

[0009] The multiple fragmented IP data are sent 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.

[0010] In one possible implementation, selecting the target route path with the shortest time from the reachable routes includes:

[0011] For each reachable route, based on the sending performance of each router in the reachable route 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 route, and calculate the first total sending time of the reachable route based on the sending time of the transmission network corresponding to each router.

[0012] Based on the first total transmission time of each reachable route, select the first reachable route whose first total transmission time meets the preset threshold condition, and select the first reachable route with the smallest first total transmission time from the first reachable route as the target route.

[0013] In one possible implementation, the method further includes:

[0014] If there is no first reachable route path whose first total transmission time meets the preset threshold condition, then based on the number of fragmented IP data, the transmission performance of each router in each reachable route path, and the number of IP data to be transmitted in each router, at least one set of reachable routes for collaborative transmission of the fragmented IP data is selected from the reachable routes; wherein each set of reachable routes includes at least two reachable routes, and the number of fragmented IP data transmitted in each reachable path is determined;

[0015] Based on the second total transmission time of each group of reachable routing paths for coordinating the transmission of the fragmented IP data, the group of reachable routing paths whose second total transmission time satisfies the preset threshold condition and is the smallest is selected from the at least one group of reachable routing paths as the target routing path.

[0016] In one possible implementation, selecting at least one set of reachable routes from the reachable routes for collaboratively sending the fragmented IP data, based on the number of fragmented IP data, the sending performance of each router in each reachable route, and the number of IP data to be sent in each router, includes:

[0017] Grouping N reachable routes into a set, and based on the number of fragmented IP data, determining at least one set of reachable routes in each set, provided that each reachable route in each set includes fragmented IP data; where N is a positive integer and 2≤N≤M, and M is the total number of reachable routes;

[0018] Determine whether the number of reachable routes in the group is equal to M. If yes, obtain at least one group of reachable routes for collaboratively sending the fragmented IP data. If not, group N+1 reachable routes together and return to the step of determining at least one group of reachable routes under the condition that each reachable route in each group includes fragmented IP data based on the number of fragmented IP data, until the number of reachable routes in the group is equal to the total number of reachable routes, thus obtaining at least one group of reachable routes for collaboratively sending the fragmented IP data.

[0019] In one possible implementation, after sending the plurality of fragmented IP data to the destination host via the target routing path, the method further includes:

[0020] If an abnormal result indicating that the target fragment IP data is lost is received from the destination host, then a second routing path for the lost target fragment IP data is determined based on the abnormal result.

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

[0022] In one possible implementation, the method further includes:

[0023] For the second routing path, if the number of times fragmented IP data is lost within a preset time period does not exceed the first preset threshold, then the target fragmented IP data transmitted by the pre-recorded second routing path is obtained, and the target fragmented IP data is retransmitted through the second routing path.

[0024] In one possible implementation, retransmitting the target fragment IP data via the second routing path includes:

[0025] Adjust the transmission priority of the target fragmented IP data under each router in the second routing path; wherein the adjusted transmission priority is higher than the original transmission priority;

[0026] Based on the adjusted transmission priority, the target fragmented IP data is transmitted preferentially through each router in the second routing path.

[0027] In one possible implementation, after marking the second routing path as an unreachable routing path, the method further includes:

[0028] Obtain router information in the second routing path and send the router information to the management host so that the management host can determine the cause of the fault in the second routing path based on the router information in the second routing path.

[0029] Secondly, embodiments of this application also provide a target router, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and 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 as described in any of the first aspects.

[0030] In another aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the data packet sending method as described in any of the first aspects.

[0031] This application provides a data packet transmission method, a target router, and a storage medium, comprising: receiving an IP data packet from a target host, wherein 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 is to be sent; based on the destination address of the destination host carried in the IP data packet, firstly, determining the reachable route path of the IP data packet to the destination host, and selecting the target route path with the shortest time; then, selecting the smallest target MTU value from the MTU values ​​of each transmission network included in the target route path, and fragmenting the IP data packet according to the target MTU value; finally, sending the fragmented IP data packets to the destination host through the target route path. This method optimizes the routing transmission path of the IP data packet and ensures that the IP data packet is fragmented only once, reducing the transmission time of the IP data packet and improving service transmission efficiency. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 A flowchart of the first data packet sending method provided in an embodiment of this application is shown;

[0034] Figure 2 This illustration shows a schematic diagram of the routing transmission network structure provided in an embodiment of this application, which includes a target host, a target router, intermediate routers, and a destination host.

[0035] Figure 3 A flowchart of the second data packet sending method provided in an embodiment of this application is shown;

[0036] Figure 4 A flowchart of the third data packet sending method provided in the embodiments of this application is shown;

[0037] Figure 5 A flowchart of the fourth data packet sending method provided in the embodiments of this application is shown. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0039] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0040] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0041] When transmitting very long data packets between different hosts, the transmission path for these packets is specified, and multiple routers along this path may sequentially fragment the packets, leading to slow transmission rates and low efficiency in packet reassembly at the destination host, thus resulting in low service transmission efficiency. Based on this, embodiments of this application provide a data packet sending method, a target router, and a storage medium. By selecting the shortest target routing path from multiple reachable routes and fragmenting Internet Protocol (IP) data packets according to the minimum MTU value of the transmission network along the target routing path, the routing path for IP data packets is optimized, and IP data packets are fragmented only once, reducing transmission time and improving service transmission efficiency.

[0042] To facilitate understanding of the embodiments of this application, a data packet sending method, a target router, and a storage medium provided in the embodiments of this application will be described in detail below.

[0043] like Figure 1 The image shows a data packet sending method provided in the first embodiment of this application, applied to a target router. The method includes:

[0044] S101. Receive an IP data packet from the target host, wherein 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 is to be sent.

[0045] S102. Based on the destination address of the destination host carried by the IP data packet, determine the reachable route path of the IP data packet to the destination host, and select the target route path with the shortest time from the reachable route paths; wherein, the reachable route path includes the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network.

[0046] 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 data packet according to the target MTU value to obtain multiple fragmented IP data.

[0047] S104. Send 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.

[0048] The data packet sending method provided in this application optimizes the routing transmission path of IP data packets by selecting the shortest target routing path from multiple reachable routing paths and fragmenting IP data packets according to the minimum MTU value of the transmission network in the target routing path. This means that the shortest target routing path is selected and the IP data packets are fragmented only once, reducing the transmission time of IP data packets and improving the efficiency of service transmission.

[0049] The following describes the exemplary steps described above:

[0050] S101. Receive an IP data packet from the target host, wherein 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 is to be sent.

[0051] Here, the target host is the sender of the data (i.e., IP packets), and the destination host is the receiver of the data (i.e., IP packets). Users can send IP packets to the destination host through the target host. Specifically, the target host sends the IP packets to the destination host by selecting a suitable target routing path (i.e., the shortest routing path that reaches the destination host). This target routing path includes multiple routers, each corresponding to a transmission network. These multiple routers include the target router and intermediate routers. Intermediate routers are the next-hop routers of the target router; that is, the target router is the router closest to the target host. In this embodiment, the length of the IP 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. Therefore, the target router needs to fragment the IP packet to ensure that it can be sent to the destination host.

[0052] In practice, the target router can be either a router directly connected to the target host or a router indirectly connected to the target host. Let's take an example where the target router is directly connected to the target host. Figure 2As 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. 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.

[0053] S102. Based on the destination address of the destination host carried by the IP data packet, determine the reachable route path of the IP data packet to the destination host, and select the target route path with the shortest time from the reachable route paths; wherein, the reachable route path includes the target router and at least one intermediate router, and each intermediate router also corresponds to a transmission network.

[0054] In this embodiment, the IP data packet carries the source address of the target host and the destination address of the destination host. After receiving the IP data packet, the target router selects a reachable route from all possible routes from the target host to the destination host based on the destination address carried in the IP data packet. Then, it selects the target route with the shortest travel time from these reachable routes. Here, the target route may include one reachable route or multiple reachable routes.

[0055] 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 data packet according to the target MTU value to obtain multiple fragmented IP data.

[0056] In this embodiment, the reachable routing path includes a target router and at least one intermediate router between the target router and the destination host. Each target router corresponds to a transmission network, and each intermediate router also corresponds to a transmission network. Therefore, the target routing path includes the transmission networks corresponding to both the target router and each intermediate router, 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, and then fragments the received IP data packets according to the target MTU value to obtain multiple fragmented IP data.

[0057] Here, the target router does not fragment IP packets according to its own MTU value, but rather according to the smallest target MTU value in the transmission network of the target routing path. This ensures that subsequent intermediate routers do not need to fragment IP packets again, so that IP packets are only fragmented once, thus improving service transmission efficiency.

[0058] S104. Send 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.

[0059] In this embodiment of the application, after the target router fragments the IP data packet, it sends the fragmented IP data to the intermediate router in the target routing path, and the intermediate router sends the fragmented IP data to the destination host. In this way, after receiving the multiple fragmented IP data, the destination host reassembles the received multiple fragmented IP data to obtain the IP data packet.

[0060] In this embodiment of the application, the selected target routing path may include one reachable routing path or multiple reachable routing paths. The following describes these two cases respectively:

[0061] First, the target route path includes a reachable route path:

[0062] like Figure 3 As shown, selecting the target route path with the shortest time from the reachable routes includes:

[0063] S301. For each reachable route path, based on the sending performance of each router in the reachable route 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 route path, and calculate the first total sending time of the reachable route path based on the sending time of the transmission network corresponding to each router.

[0064] Here, the transmission performance of each router is determined based on its central processing unit (CPU), memory, and throughput. The better the transmission performance of the router, the shorter the time it takes to transmit IP data. The IP data to be transmitted in each router includes both complete IP data packets and fragmented IP data. Accordingly, the number of IP data packets to be transmitted is determined by both the complete IP data packets and fragmented IP data of each router.

[0065] For each router in the reachable routing path, the target router can calculate the transmission time for the IP data in the corresponding transmission network based on the router's transmission performance and the number of IP data packets to be transmitted in that router. Using this method, the transmission times of the transmission networks corresponding to multiple routers in the reachable routing path can be obtained. Finally, the sum of the transmission times for all routers in the reachable routing path is calculated, which is the first total transmission time for the reachable routing path.

[0066] S302. Based on the first total transmission time of each reachable route path, select the first reachable route path whose first total transmission time meets the preset threshold condition, and select the first reachable route path with the smallest first total transmission time from the first reachable route paths as the target route path.

[0067] In this embodiment, the first total transmission time of each reachable routing path can be obtained through the above-described S301 method. Then, from each of the above reachable routing paths, the first reachable routing path whose first total transmission time is less than or equal to a preset threshold (i.e., meets the preset threshold condition) is selected. Here, when there is only one first reachable routing path, it is directly determined as the target routing path; when there are multiple first reachable routing paths, the first reachable routing path with the smallest first total transmission time is selected as the target routing path.

[0068] Second, the target route path includes multiple reachable routes:

[0069] Furthermore, such as Figure 4 As shown, the data packet sending method further includes:

[0070] S401. If there is no first reachable route path whose first total transmission time meets the preset threshold condition, then based on the number of fragmented IP data, the transmission performance of each router in each reachable route path, and the number of IP data to be transmitted in each router, at least one set of reachable routes for collaborative transmission of the fragmented IP data is selected from the reachable routes; wherein each set of reachable routes includes at least two reachable routes, and the number of fragmented IP data transmitted in each reachable path is determined.

[0071] Here, after obtaining the first total transmission time of each reachable route through the above S301 method, if there is no first reachable route with a first total transmission time less than or equal to a preset threshold (i.e., satisfying the preset threshold condition) in each of the above reachable routes, then at least one set of reachable routes for collaborative (i.e. combined) transmission of fragmented IP data is first selected from the above reachable routes, and each set of reachable routes includes at least two reachable routes.

[0072] In this embodiment of the application, the specific methods for selecting at least one set of reachable routing paths include:

[0073] Grouping N reachable routes into a set, and based on the number of fragmented IP data, determining at least one set of reachable routes in each set, provided that each reachable route in each set includes fragmented IP data; where N is a positive integer and 2≤N≤M, and M is the total number of reachable routes;

[0074] Determine whether the number of reachable routes in the group is equal to M. If yes, obtain at least one group of reachable routes for collaboratively sending the fragmented IP data. If not, group N+1 reachable routes together and return to the step of determining at least one group of reachable routes under the condition that each reachable route in each group includes fragmented IP data based on the number of fragmented IP data, until the number of reachable routes in the group is equal to the total number of reachable routes, thus obtaining at least one group of reachable routes for collaboratively sending the fragmented IP data.

[0075] In a specific implementation, N is first determined to be equal to 2, and the number of fragmented IP data is . Then, with 2 reachable paths as a group, and each reachable path in each group including fragmented IP data, there are a total of 3 reachable paths.

[0076] For example, the three groups of reachable routes are: Group a (including reachable routes a1 and a2), where reachable route a1 transmits 1 fragment of IP data and reachable route a2 transmits 3 fragments of IP data; Group b (including reachable routes b1 and b2), where reachable route b1 transmits 2 fragments of IP data and reachable route b2 transmits 2 fragments of IP data; and Group c (including reachable routes c1 and c2), where reachable route c1 transmits 3 fragments of IP data and reachable route c2 transmits 1 fragment of IP data.

[0077] Then, we determine that N=2 < M=4, and then determine that N=2+1=3. The number of fragmented IP data is 4. Therefore, there are a total of 3 groups of reachable paths, and each reachable path in each group includes fragmented IP data.

[0078] For example, the three groups of reachable routes are: group c (including reachable routes c1, c2, and c3), where reachable route c1 transmits 1 fragment IP data, reachable route c2 transmits 1 fragment IP data, and reachable route c3 transmits 2 fragment IP data; group d (including reachable routes d1, d2, and d3), where reachable route d1 transmits 1 fragment IP data, reachable route d2 transmits 2 fragment IP data, and reachable route d3 transmits 1 fragment IP data; and group e (including reachable routes e1, e2, and e3), where reachable route e1 transmits 2 fragment IP data, reachable route e2 transmits 1 fragment IP data, and reachable route e3 transmits 1 fragment IP data.

[0079] Then, we continue to check if N=3 < M=4, and then determine if N=4. The number of fragmented IP data is 4. Therefore, there is a total of 1 group of reachable paths, where each reachable path in each group includes fragmented IP data. Specifically, the 4 groups of reachable paths are: group f (including reachable paths f1, f2, f3, and f4), where reachable path f1 transmits 1 fragmented IP data, reachable path f2 transmits 1 fragmented IP data, reachable path f3 transmits 1 fragmented IP data, and reachable path f4 transmits 1 fragmented IP data. Then, we continue to check if N=M=4, and thus obtain the above groups a to f of reachable paths.

[0080] S402. Based on the second total transmission time of each group of reachable routing paths for collaboratively transmitting the fragmented IP data, select the group of reachable routing paths from the at least one group of reachable routing paths whose corresponding second total transmission time satisfies the preset threshold condition and is the smallest as the target routing path.

[0081] Here, after obtaining multiple groups of reachable routing paths through S401, for each group of reachable routing paths, the second total transmission time for the collaborative transmission of fragmented IP data is determined based on the transmission performance of each router in each reachable routing path and the number of IP data to be transmitted. Similarly, based on the second total transmission time of each group of reachable routing paths, candidate groups of reachable routing paths whose corresponding second total transmission time meets the preset threshold condition are selected, and the group of reachable routing paths with the smallest corresponding second total transmission time is selected as the target routing path from the above candidate groups of reachable routing paths.

[0082] By selecting the shortest target routing path from multiple paths to send IP packets, the routing transmission path of IP packets is optimized, which can further reduce the transmission time of IP packets and improve the efficiency of service transmission.

[0083] Furthermore, such as Figure 5 As shown, in the data packet sending method provided in this application embodiment, after sending the plurality of fragmented IP data to the destination host through the target routing path, the method further includes:

[0084] S501. If an abnormal result of target fragment IP data loss is received from the destination host, a second routing path for the lost target fragment IP data is determined based on the abnormal result.

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

[0086] In conjunction with S501 to S502, after receiving fragmented IP data from an IP packet, the destination host will send a reverse data reception result back to the destination host via the target routing path. At this time, the destination router can also obtain this data reception result. If the data reception result is an abnormal result indicating that the target fragmented IP data is lost, then the destination router determines the second routing path for the lost target fragmented IP data based on this abnormal result. Here, when the target routing path is a single reachable routing path, the second routing path is the target routing path that transmits 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 within that group that transmits the target fragmented IP data. Here, the aforementioned target fragmented IP data can be one or multiple, and correspondingly, the aforementioned second routing path can be either a single reachable routing path or multiple reachable routing paths that transmit the target fragmented IP data.

[0087] In this embodiment, the target router pre-records the number of times fragmented IP data is lost cumulatively within a preset time period for each reachable route in the target routing path (specifically including the number of times fragmented IP data is lost cumulatively within the preset time period for the second routing path). If the target router determines that the number exceeds a first preset threshold (e.g., 5 times, the first preset threshold is set according to actual needs and is not specifically limited here), then the second routing path is marked as an unreachable routing path, and the process returns to step S102. The target routing path is then re-determined, and multiple fragmented IP data are sent to the destination host through the re-determined target routing path until the destination host receives complete multiple fragmented IP data, or the number of returns reaches the second preset threshold (e.g., if the number of returns reaches 5, it indicates another fault, and the loop will stop, allowing the management host to be notified of an anomaly). Here, the preset time period can be one day or one week, etc., and is set according to actual needs; no specific limitation is made here.

[0088] Furthermore, the data packet sending method provided in this application embodiment further includes:

[0089] For the second routing path, if the number of times fragmented IP data is lost within a preset time period does not exceed the first preset threshold, then the target fragmented IP data transmitted by the pre-recorded second routing path is obtained, and the target fragmented IP data is retransmitted through the second routing path.

[0090] Specifically, the target router records the data identifiers of the fragmented IP data transmitted on each reachable route in the target routing path (specifically including the data identifiers of the fragmented IP data transmitted on the second routing path). For the second routing path, the target router determines whether the number of times it has lost fragmented IP data within a preset time period exceeds the first preset threshold. If it does not exceed the threshold, then it determines the target fragmented IP data corresponding to the data identifier matching the second routing path from the above records, and then retransmits the target fragmented IP data through the second routing path.

[0091] Here, when retransmitting the target fragmented IP data through the second routing path, firstly, the transmission priority of the target fragmented IP data under each router in the second routing path is adjusted; wherein, the adjusted transmission priority is higher than the original transmission priority; then, according to the adjusted transmission priority, the target fragmented IP data is transmitted preferentially through each router in the second routing path.

[0092] The specific priority adjustment method is as follows: if a specific IP packet or a specific fragment of a specific IP packet exists in the second routing path, then the transmission priority of the target fragment IP data under each router in the second routing path is adjusted to be after the specific IP packet or the specific fragment IP data. If the specific IP packet or the specific fragment IP data does not exist in the second routing path, then the transmission priority of the target fragment IP data under each router in the second routing path is the highest. Here, the specific IP packet is pre-marked, for example, a specific type of IP packet or an IP packet with a special identifier (e.g., under a special service). The priority of the target fragment IP data cannot be higher than the priority of the specific IP packet or the specific fragment IP data of the specific IP packet.

[0093] Furthermore, in the data packet sending method provided in this application embodiment, after marking the second routing path as an unreachable routing path, the method further includes:

[0094] Obtain router information in the second routing path and send the router information to the management host so that the management host can determine the cause of the fault in the second routing path based on the router information in the second routing path.

[0095] 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, and determines the faulty router and the cause of the faulty router based on the log information of each router, and displays it to the user so that the user can handle the faulty router.

[0096] The data packet sending method provided in this application optimizes the routing transmission path of IP data packets by selecting the shortest target routing path from multiple reachable routing paths and fragmenting IP data packets according to the minimum MTU value of the transmission network in the target routing path. This also ensures that IP data packets are fragmented only once, reducing the transmission time of IP data packets and improving service transmission efficiency.

[0097] A second embodiment of this 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 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 in the first embodiment.

[0098] Specifically, the aforementioned storage medium and processor can be general-purpose storage media and processors, without any specific limitations. When the processor runs the computer program stored in the storage medium, it can execute the aforementioned data packet sending method.

[0099] The target router provided in this application optimizes the routing path of IP packets by selecting the shortest target routing path from multiple reachable routing paths and fragmenting IP packets according to the minimum MTU value of the transmission network in the target routing path. This also ensures that IP packets are fragmented only once, reducing the transmission time of IP packets and improving service transmission efficiency.

[0100] Corresponding to the data packet sending method in the first embodiment above, the third embodiment of this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the data packet sending method in the first embodiment above.

[0101] The computer-readable storage medium provided in this application optimizes the routing transmission path of IP data packets by selecting the shortest target routing path from multiple reachable routing paths and fragmenting IP data packets according to the minimum MTU value of the transmission network in the target routing path. This also ensures that IP data packets are fragmented only once, reducing the transmission time of IP data packets and improving service transmission efficiency.

[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this 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 modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, 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 displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

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

[0104] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0105] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the 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 cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0106] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data packet sending method, characterized in that, Applied to a target router, the method includes: Receive Internet Protocol Address (IP) packets from the target host, wherein the length of the IP packets is greater than the Maximum Transmission Unit (MTU) value of the transmission network corresponding to the target router to which they are to be sent; Based on the destination address of the destination host carried in the IP data packet, a reachable route path for the IP data packet to reach the destination host is determined, and the target route path with the shortest time is selected from the reachable route paths; wherein, the reachable route path includes 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 smallest 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. The multiple fragmented IP data are sent 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; The step of selecting the target route path with the shortest time from the reachable routes includes: For each reachable routing path, the transmission time of the transmission network corresponding to each router in the reachable routing path is calculated based on the transmission performance of each router in the reachable routing path and the number of IP data to be transmitted in each router. Based on the transmission time of the transmission network corresponding to each router, the first total transmission time of the reachable routing path is calculated. Based on the first total transmission time of each reachable routing path, the first reachable routing path whose first total transmission time meets the preset threshold condition is selected, and the first reachable routing path with the smallest first total transmission time is selected from the first reachable routing paths as the target routing path. If no first reachable route path exists that satisfies the preset threshold condition for the first total transmission time, then at least one set of reachable routes is selected from the reachable routes for coordinating the transmission of the fragmented IP data, based on the number of fragmented IP data, the transmission performance of each router in each reachable route path, and the number of IP data to be transmitted in each router; wherein each set of reachable routes includes at least two reachable routes, and the number of fragmented IP data transmitted in each reachable path is determined; based on the second total transmission time of each set of reachable routes coordinating the transmission of the fragmented IP data, the set of reachable routes with the smallest second total transmission time that satisfies the preset threshold condition is selected from the at least one set of reachable routes as the target route path; The step of selecting at least one set of reachable routing paths from the reachable routing paths for collaboratively sending the fragmented IP data, based on the number of 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: Grouping N reachable routes into a set, and based on the number of fragmented IP data, determining at least one set of reachable routes in each set where each reachable route includes fragmented IP data; where N is a positive integer and 2≤N≤M, and M is the total number of reachable routes; determining whether the number of reachable routes in this set is equal to M; if yes, obtaining at least one set of reachable routes for collaboratively sending the fragmented IP data; if not, grouping N+1 reachable routes into a set, returning to the step of determining at least one set of reachable routes in each set where each reachable route includes fragmented IP data, until the number of reachable routes in this set is equal to the total number of reachable routes, thus obtaining at least one set of reachable routes for collaboratively sending the fragmented IP data.

2. The data packet sending method according to claim 1, characterized in that, After sending the multiple fragmented IP data to the destination host via the target routing path, the method further includes: If an abnormal result indicating that the target fragment IP data is lost is received from the destination host, then a second routing path for the lost target fragment IP data is determined based on the abnormal result. For the second routing path, determine whether the number of times fragmented IP data is lost within a preset time period exceeds a first preset threshold. If so, mark the second routing path as an unreachable routing path and return the step of determining the reachable routing path of the IP data packet to the destination host based on the destination address of the destination host carried by the IP data packet, until the destination host receives complete fragmented IP data, or the number of returns reaches the second preset threshold.

3. The data packet sending method according to claim 2, characterized in that, The method further includes: For the second routing path, if the number of times fragmented IP data is lost within a preset time period does not exceed the first preset threshold, then the target fragmented IP data transmitted by the pre-recorded second routing path is obtained, and the target fragmented IP data is retransmitted through the second routing path.

4. The data packet sending method according to claim 3, characterized in that, The step of retransmitting the target fragment IP data through the second routing path includes: Adjust the transmission priority of the target fragmented IP data under each router in the second routing path; wherein the adjusted transmission priority is higher than the original transmission priority; Based on the adjusted transmission priority, the target fragmented IP data is transmitted preferentially through each router in the second routing path.

5. The data packet sending method according to claim 2, characterized in that, After marking the second routing path as an unreachable routing path, the method further includes: Obtain router information in the second routing path and send the router information to the management host so that the management host can determine the cause of the fault in the second routing path based on the router information in the second routing path.

6. A target router, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and 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 transmission method as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the data packet sending method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Information forwarding method and space-based information network system

    CN106789661A

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

    CN112333094A

  • Data transmission method and device based on financial alliance chain, equipment and medium

    CN117880180A

  • Network quality detection method and apparatus, electronic device, and storage medium

    WO2019114830A1