Network path detection method and device and medium

By splitting the network path detection task into public paths and respective path detection tasks, the problem of network load increase in traditional solutions is solved, and efficiency improvement and resource conservation are achieved.

CN119071210AActive Publication Date: 2024-12-03CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411012559.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-03
Estimated Expiration
2044-07-26

Smart Images

  • Figure CN119071210A_ABST
    Figure CN119071210A_ABST
Patent Text Reader

Abstract

The invention provides a network path detection method and device and a medium, and relates to the technical field of networks, and the method comprises the steps: obtaining the splitting results of N first network path detection tasks, the splitting results comprise a second network path detection task, the second network path detection task only detects a common path without reaching a detection destination address, and the second network path detection task only detects a common path without reaching a detection destination address; n third network path detection tasks, the third network path detection tasks arriving at respective detection destination addresses but not detecting a common path, the common path being a common part in destination paths arriving at the N detection destination addresses; and executing or indicating to execute a network path detection task according to the splitting result. According to the method, the public path is searched for the multiple original network path detection tasks, the original network path detection tasks are divided into the public path detection tasks and the respective path detection tasks, the public path parts only need to be jointly detected once, and the packet sending number of network detection is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure at least relates to the field of network technology, and in particular to a network path detection method, a network path detection device, and a computer-readable storage medium. Background Art

[0002] In traditional network path detection solutions, in order to improve efficiency, detection equipment generally does not execute the sending and receiving logic in series, but separates the sending and receiving logic. For example, it will start two tasks, one to perform the packet sending task, which sends out data packets with increasing TTLs according to the maximum TTL value set, and one to perform the packet receiving task, which filters and parses the packets to obtain path information. When receiving the return packet from the detection destination, it notifies the stop of the packet sending task. However, due to the packet receiving delay, such as a delay of 100ms, the packets are often sent during this period, that is, 32 packets are sent.

[0003] According to the traditional solution, when multiple network path detection tasks are initiated, the network load will increase sharply, affecting the actual business traffic and user experience. Therefore, it is urgent to propose an optimization solution for network path detection to reduce the network load caused by multiple network path detection tasks. Summary of the invention

[0004] The technical problem to be solved by the present disclosure is to provide a network path detection method, a network path detection device and a computer-readable storage medium in view of the above-mentioned shortcomings, so as to solve the problem of how to reduce the network load caused by multiple network path detection tasks.

[0005] In a first aspect, the present disclosure provides a network path detection method, the method comprising:

[0006] Obtain the split results of N first network path detection tasks, the split results include:

[0007] a second network path detection task, the second network path detection task does not reach the detection destination address but only detects the public path, and,

[0008] N third network path detection tasks, the third network path detection tasks reach their respective detection destination addresses but do not detect the public path,

[0009] The common path is the common part of the destination paths reaching the N detection destination addresses;

[0010] The network path detection task is executed or instructed to be executed according to the splitting result.

[0011] Further, wherein:

[0012] The method is applied to: a network path detection terminal or a network path detection perception platform;

[0013] Acquiring the split results of the N first network path detection tasks includes: the network path detection terminal receiving the split results of the N first network path detection tasks from the network path detection perception platform, or the network path detection perception platform generating the split results of the N first network path detection tasks;

[0014] Executing or instructing the execution of a network path detection task according to the splitting result includes: the network path detection terminal executes the network path detection task according to the splitting result, or the network path detection perception platform instructs the network path detection terminal to execute the network path detection task according to the splitting result.

[0015] Further, the splitting results of the N first network path detection tasks are obtained, specifically including:

[0016] Obtaining the first dialing interval, the first TTL range and the respective detection destination addresses of N first network path detection tasks;

[0017] Obtain destination paths to N detection destination addresses and a second TTL range of the destination paths;

[0018] Obtain the common parts of all destination paths to obtain the public path and the public destination address and the third TTL range of the public path;

[0019] Split the N first network path detection tasks into:

[0020] a second network path detection task having a first dialing interval, a third TTL range and a public destination address,

[0021] N third network path detection tasks having a first dialing interval, a fourth TTL range and respective detection destination addresses;

[0022] Wherein, TTL is the forwarding hop count of the network path detection packet, and the fourth TTL range is equal to the second TTL range minus the third TTL range.

[0023] Further, wherein:

[0024] Obtaining the destination paths to the N detection destination addresses and the second TTL range of the destination paths, specifically including:

[0025] Obtain all node IP addresses of the path to each entry of each detection destination IP address, and obtain the maximum TTL range of all destination paths to each detection destination IP address as each second TTL range;

[0026] Get the common parts of all destination paths to obtain the public path and the public destination address and third TTL range of the public path, including:

[0027] Obtain the common IP address of all destination paths reaching N detection destination addresses as a public path, obtain the common IP address corresponding to the maximum TTL value in the public path as a public destination address, and obtain a third TTL range corresponding to the maximum TTL value in the public path;

[0028] Among them, IP is the Internet Protocol.

[0029] Furthermore, the split results also include:

[0030] N fourth network path detection tasks having a second dialing interval, a first TTL range and respective detection destination addresses,

[0031] The second dial detection interval is greater than the first dial detection interval.

[0032] Further, obtaining the destination paths to the N detection destination addresses and the second TTL range of the destination paths specifically includes:

[0033] In response to receiving N first network path detection tasks created by a user, executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result;

[0034] In response to obtaining a change in the public path according to executing the N fourth network path detection tasks, re-executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result;

[0035] In response to a change in the destination path obtained by executing N fourth network path detection tasks, a second full-range network path detection result of the N fourth network path detection tasks is obtained, and a destination path to the N detection destination addresses and a second TTL range of the destination path are obtained based on the second full-range network path detection result.

[0036] Furthermore, the N first network path detection tasks are split, specifically including:

[0037] Obtain the first number of packets sent for executing N first network path detection tasks;

[0038] Obtaining the number of second packets sent for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks;

[0039] According to the first number of packets sent and the second number of packets sent, obtain the performance improvement after splitting the N first network path detection tasks;

[0040] In response to the performance improvement reaching a preset condition, the N first network path detection tasks are split.

[0041] Further, wherein:

[0042] Obtaining the first number of packets sent for executing N first network path detection tasks, specifically including:

[0043] The third number of packets and the fourth number of packets for executing N first network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas:

[0044] The third number of packets sent = N * the number of hops in the first TTL range * 1,

[0045] Fourth packet number = N * first TTL range hop number * second dial test interval / first dial test interval;

[0046] Obtaining the number of second packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks, specifically includes:

[0047] The fifth number of packets and the sixth number of packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas:

[0048] The fifth number of packets sent = N*the number of hops in the third TTL range*1+N*the number of hops in the fourth TTL range*1,

[0049] The sixth number of packets sent = N*the third TTL range hop count*the second dial test interval / the first dial test interval+N*the fourth TTL range hop count*the second dial test interval / the first dial test interval+N*the first TTL range hop count*1;

[0050] According to the first number of packets sent and the second number of packets sent, the performance improvement after splitting the N first network path detection tasks is obtained, specifically including:

[0051] The first performance improvement and the second performance improvement in the first dial test interval and the second dial test interval are calculated according to the following formulas respectively:

[0052] The first performance improvement = the third number of packets / the fifth number of packets,

[0053] The second performance improvement = the fourth number of packets sent / the sixth number of packets sent.

[0054] In a second aspect, the present disclosure provides a network path detection device, the device comprising:

[0055] The acquisition module is used to obtain the splitting results of N first network path detection tasks, and the splitting results include:

[0056] a second network path detection task, the second network path detection task does not reach the detection destination address but only detects the public path, and,

[0057] N third network path detection tasks, the third network path detection tasks reach their respective detection destination addresses but do not detect the public path,

[0058] The common path is the common part of the destination paths reaching the N detection destination addresses;

[0059] The execution or instruction execution module is connected with the acquisition module and is used to execute or instruct the execution of the network path detection task according to the splitting result.

[0060] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the network path detection method as described above is implemented.

[0061] The present disclosure provides a network path detection method, a network path detection device and a computer-readable storage medium. By searching for a common path for a plurality of original network path detection tasks, the original network path detection tasks are split into a common path detection task and respective path detection tasks. The common path portion only needs to be detected once together, and the respective path detection tasks reduce the detection of the common path portion, thereby reducing the number of packets sent for network detection and reducing the network load caused by the plurality of network path detection tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 is a flow chart of a network path detection method according to an embodiment of the present disclosure;

[0063] Figure 2 is a schematic diagram of executing a first network path detection task according to an embodiment of the present disclosure;

[0064] Figure 3 is a schematic diagram of the architecture of a network path detection system according to an embodiment of the present disclosure;

[0065] Figure 4 is an interactive flow chart of a network path detection method according to an embodiment of the present disclosure;

[0066] Figure 5 It is a structural schematic diagram of a network path detection device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0068] It should be understood that the specific embodiments and drawings described herein are only used to explain the present disclosure rather than to limit the present disclosure.

[0069] It can be understood that, in the absence of conflict, the various embodiments of the present disclosure and the various features in the embodiments can be combined with each other.

[0070] It can be understood that, for the convenience of description, the drawings of the present disclosure only show parts related to the present disclosure, while parts irrelevant to the present disclosure are not shown in the drawings.

[0071] It can be understood that each unit or unit involved in the embodiments of the present disclosure may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units or units may be integrated into one physical structure.

[0072] It will be understood that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present disclosure may occur in an order different from that marked in the drawings.

[0073] It is understood that the flowcharts and block diagrams of the present disclosure illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the embodiments of the present disclosure. Each box in the flowchart or block diagram may represent a unit, unit, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.

[0074] It can be understood that the units and units involved in the embodiments of the present disclosure can be implemented by software or hardware, for example, the units and units can be located in a processor.

[0075] Embodiment 1:

[0076] like Figure 1 As shown, the present disclosure provides a network path detection method, the method

[0077] include:

[0078] S1. Obtain the split results of N first network path detection tasks.

[0079] include:

[0080] a second network path detection task, the second network path detection task does not reach the detection destination address but only detects the public path, and,

[0081] N third network path detection tasks, the third network path detection tasks reach their respective detection destination addresses but do not detect the public path,

[0082] The common path is the common part of the destination paths reaching the N detection destination addresses;

[0083] S2. Execute or instruct to execute a network path detection task according to the splitting result.

[0084] In this embodiment, by searching for a common path for multiple original network path detection tasks, the original network path detection tasks are split into a common path detection task and respective path detection tasks reaching respective detection destination addresses. The N detection destination addresses are derived from the N first network path detection tasks, and detection is performed in the N third network path detection tasks. The common path portion only needs to be detected once, and the respective path detection tasks reduce the detection of the common path portion, thereby reducing the number of packets sent for network detection and reducing the network load caused by multiple network path detection tasks.

[0085] Specifically, the first network path detection task is the current conventional network detection, which generally includes three types of data packets: icmp (Internet Control Message Protocol), tcp (Transmission Control Protocol), and udp (User Datagram Protocol). The detection principle is to send out data packets with increasing TTL (Time To Live) to obtain information about each hop in the path. Taking ICMP network path detection as an example, its principle is as follows: Figure 2 As shown:

[0086] First, Host A sends an ICMP Echo Request packet to Host B. Host A sends a packet with TTL=1 for the first time. When the packet reaches R1, the TTL becomes 0 (the TTL is reduced by 1 for each hop on the network). R1 ​​discards the packet with TTL=0 and returns an ICMP Time Exceeded to Host A.

[0087] Secondly, Host A sends a second ICMP Echo Request packet and increases the TTL by 1 (TTL=2). When the packet reaches R2, the TTL=0. R2 returns an ICMP Time Exceeded message to Host A.

[0088] And so on, until the TTL increases to a suitable value for the data packet to reach Host B smoothly, Host B will return a Final Reply to Host A.

[0089] This conventional network path detection solution, due to firewall policies or when the device is busy, the device does not respond or does not respond in a timely manner to ICMP Echo Request requests. Therefore, in order to improve efficiency, the detection device generally separates the sending and receiving logic.

[0090] More specifically, taking the RedCap (Reduced Capability, 5G lightweight) terminal as an example, the RedCap technology achieves significant reductions in cost and power consumption by reducing the complexity of the terminal, reducing bandwidth and the number of antennas, and reducing the modulation order, while maintaining a high data transmission rate. This makes RedCap an ideal choice for 5G (fifth generation mobile communication technology, 5th Generation Mobile Communication Technology) private network application scenarios such as industrial wireless sensors, wearable devices, and video surveillance.

[0091] The network path detection function is very important in RedCap technology. Through network path detection, the routers and network devices that the data packets pass through from the source to the destination can be identified. The performance of the network link can be evaluated by measuring the transmission time and packet loss rate of the data packet, and bottlenecks and high-latency links can be identified. When a problem occurs in the network, such as connection interruption or data packet loss, it can help locate the location of the problem, thereby quickly diagnosing and solving the problem.

[0092] According to the first network path detection task, although it can solve the functional problem of RedCap network path detection, when hundreds of RedCap terminals initiate multiple network path detection tasks, the network load will rise sharply, affecting the actual business traffic and user experience. If there are 1,000 RedCaps, each terminal has 10 ICMP network detection tasks per minute, and the maximum TTL value of the task limit is 32, then under normal circumstances (assuming that the average TTL value of the reachable destination is 10), it is necessary to send 100K ICMP Echo request packets and receive 100K ICMP reply packets. Assuming that the size of each packet is 64B, the number of bytes sent is 6.4GB, and the number of bytes received is 6.4GB, squeezing the limited 5G network resources. The RedCap terminal also needs to filter and process 200 send and receive packets, which is also a computing resource burden that cannot be ignored for the resource-constrained RedCap terminal.

[0093] A specific application of this embodiment is that it can provide an optimization method for network path detection based on RedCap. Through the analysis results of network detection data, combined with path calculation and public network detection task generation logic, the TTL traversal range of the network detection task can be narrowed, and the number of network detection packets can be effectively reduced, thereby reducing the network's bandwidth load and the resource usage of the RedCap terminal.

[0094] In one embodiment, wherein:

[0095] The method is applied to: a network path detection terminal or a network path detection perception platform;

[0096] Acquiring the split results of the N first network path detection tasks includes: the network path detection terminal receiving the split results of the N first network path detection tasks from the network path detection perception platform, or the network path detection perception platform generating the split results of the N first network path detection tasks;

[0097] Executing or instructing the execution of a network path detection task according to the splitting result includes: the network path detection terminal executes the network path detection task according to the splitting result, or the network path detection perception platform instructs the network path detection terminal to execute the network path detection task according to the splitting result.

[0098] In this embodiment, taking the RedCap terminal as an example, an optimization method for network path detection based on RedCap is provided, and its hardware and software architecture is as follows: Figure 3 As shown, the components are described as follows:

[0099] 1) Perception platform: a network detection task management platform that provides functions such as managing network detection tasks, analyzing network detection data, and calculating 5G network public network paths;

[0100] 2) Network probe program: deployed on the Linux (an operating system) platform of the RedCap terminal, connected to the perception platform to obtain network detection tasks and report path detection results, and perform network path detection tasks on the target;

[0101] 3) RedCap terminal: A simplified version of the 5G terminal. RedCap technology significantly reduces costs and power consumption by reducing terminal complexity, bandwidth and number of antennas, and modulation order, while maintaining a high data transmission rate. It is suitable for 5G private network application scenarios such as industrial wireless sensors, wearable devices, and video surveillance.

[0102] 4) 5G core network: After the RedCap terminal accesses the 5G private network, the traffic will pass through the base station and be unloaded to the UPF (UserPlane Function) network element. Therefore, the network detection tasks initiated by terminals in the same area generally have some fixed network nodes.

[0103] It can be understood that: the RedCap terminal is only a specific terminal type applied in this embodiment, and the method provided by the present disclosure can also be applied to other types of terminals; since a terminal can initiate multiple network path detection tasks, the method provided by the present disclosure may include the situation where the functions of the platform are set on the terminal; the N first network path detection tasks can come from one terminal or multiple terminals, and when they come from multiple terminals, they can also be in multiple areas. As long as there is a common path in the N first network path detection tasks, the method provided by the present disclosure can be applied.

[0104] In one implementation, obtaining the splitting results of the N first network path detection tasks specifically includes:

[0105] Obtaining the first dialing interval, the first TTL range and the respective detection destination addresses of N first network path detection tasks;

[0106] Obtain destination paths to N detection destination addresses and a second TTL range of the destination paths;

[0107] Obtain the common parts of all destination paths to obtain the public path and the public destination address and the third TTL range of the public path;

[0108] Split the N first network path detection tasks into:

[0109] a second network path detection task having a first dialing interval, a third TTL range and a public destination address,

[0110] N third network path detection tasks having a first dialing interval, a fourth TTL range and respective detection destination addresses;

[0111] Wherein, TTL is the forwarding hop count of the network path detection packet, and the fourth TTL range is equal to the second TTL range minus the third TTL range.

[0112] In this embodiment, combined with Figure 3 The architecture shown provides Figure 4 The network detection optimization algorithm shown in FIG. uses the historical data of network path detection, combined with path calculation and public network detection task generation logic, to narrow the TTL traversal range of the network detection task and effectively reduce the number of network detection packets, thereby reducing the network bandwidth load and the resource usage of the RedCap terminal. The algorithm is used in Figure 3 The perception platform shown in the figure executes task splitting according to the request of the terminal, and sends the splitting result to the network probe program of the terminal in the form of a new task list. The network probe program sends a detection stream according to the splitting result. The detection stream completes the detection of the detection target through the 5G core network, returns the detection result, and finally reports the detection result to the perception platform.

[0113] The theoretical basis of this network detection optimization method is: Since the general application scenario of RedCap terminals is 5G private networks, and 5G private networks have dedicated UPFs as traffic outlets, there must be some fixed network nodes, which are generally 5G network base stations, routers, UPFs and other network equipment. These nodes do not actually need to be repeatedly detected in all tasks. At the same time, since the TTL value of the detected destination is fixed most of the time, the third network path detection task can not only subtract the detection of the public path part, but also further reduce the TTL range of the detection according to the actual number of hops to reach the target IP, which can continuously optimize the TTL range of the network detection task and improve the detection efficiency.

[0114] In one embodiment, wherein:

[0115] Obtaining the destination paths to the N detection destination addresses and the second TTL range of the destination paths, specifically including:

[0116] Obtain all node IP addresses of the path to each entry of each detection destination IP address, and obtain the maximum TTL range of all destination paths to each detection destination IP address as each second TTL range;

[0117] Get the common parts of all destination paths to obtain the public path and the public destination address and third TTL range of the public path, including:

[0118] Obtain the common IP address of all destination paths reaching N detection destination addresses as a public path, obtain the common IP address corresponding to the maximum TTL value in the public path as a public destination address, and obtain a third TTL range corresponding to the maximum TTL value in the public path;

[0119] Among them, IP is the Internet Protocol.

[0120] In this embodiment, if Figure 4 As shown in the figure, the network path detection logic mainly includes:

[0121] Step 1: The user creates multiple network detection tasks on the perception platform. For example, 10 ICMP-type network detection tasks are created, with a detection frequency of once per minute and a TTL (number of forwarding hops of ICMP packets) range of 1-32. The above parameters can be set manually. Based on the consideration of rapid fault reporting, the frequency is set to 1 minute. The role of TTL is to limit the existence time of IP data packets in the computer network. The maximum value of TTL is 255. A recommended value of TTL is 64. According to experience, the detection TTL in scenarios such as 5G private networks generally does not exceed 32.

[0122] Step 2: The network probe program obtains and executes the detection tasks created by the user. Specifically, it can obtain the network detection task list from the perception platform, execute the network detection tasks concurrently, and return the network detection task results. After that, the perception platform will analyze the data after the original task is executed and optimize the subsequent detection path based on this.

[0123] Step 3: The perception platform executes the network detection optimization algorithm, and calculates the destination IP of the public network path task and the maximum TTL value of the destination path of the network detection task based on the historical network path detection results (returned in step 2); assuming that the detected public path destination IP (Internet Protocol) is "5.5.5.5", the public maximum TTL value is 5, and the destination maximum TTL value of a certain task is 8; assuming that after detection, the public path hop count of "1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5" is 5; at the same time, the detection target 10.1.1.1 (which will exist when the user creates a detection task, and the target IP of each task is different) may have multiple detection paths, but the longest path has 8 hops, that is, the terminal can detect and reach the target 10.1.1.1 within 8 hops;

[0124] Step 4: The perception platform generates a public network path detection task, adds a destination path network detection task after reducing the TTL range, and modifies the dialing frequency of the new task based on the dialing frequency of the original detection task. The results are shown in Table 1 below:

[0125] Table 1 Example of N network path detection task splitting results

[0126]

[0127] In the table: the task before the change is to send a detection packet to the TTL range of 1-32 every 60 seconds, with a total of N tasks, so the number of packets sent in 1 minute = 32*N, which is used to find a reachable path to the target IP; the public path detection task after the change is to send a detection packet to the TTL range of 1-5 every 60 seconds. Because N tasks will pass through these 5 nodes, a total of one detection is enough, and the number of packets sent in 1 minute = 5, which is used to detect the network quality of the public path part; the full range (1-32) detection task after the change is to send a detection packet to the TTL range of 1-32 every 300 seconds. The detection packets are sent within the TTL range. There are N tasks in total. Therefore, the number of packets sent in 5 minutes = 32*N, which is used to detect whether the network path has changed. Generally speaking, the probability of path change is very small, but the change needs to be discovered in time, so the prediction time interval is set to 300s; the changed destination path detection task is to send detection packets to the TTL range of 6-maximum reachable hops every 60s. There are N tasks in total. Therefore, the number of packets sent in 1 minute = (average value of N maximum reachable hops-public path hops 5)*N, which is used to detect the network path quality of the non-public part of the target IP;

[0128] Step 5: The network probe program obtains the detection task, executes the network detection task concurrently according to the network detection task list, and returns the network detection task result.

[0129] In one embodiment, the split result further includes:

[0130] N fourth network path detection tasks having a second dialing interval, a first TTL range and respective detection destination addresses,

[0131] The second dial detection interval is greater than the first dial detection interval.

[0132] In this embodiment, the splitting result shown in Table 1 is not unique. After the change, there may be only a public path detection task and a destination path detection task. When the destination path detection task cannot detect the target IP or is informed through other means that the target IP cannot be reached, the original network path detection task is re-executed. Alternatively, after the change, there may be a public path detection task and the task before the change minus the public path task, that is, the full range (1-32) detection task (the fourth network path detection task) after the change may have other replacement methods, but the fourth network path detection task is a preferred method.

[0133] In one implementation, obtaining a destination path to N detection destination addresses and a second TTL range of the destination path specifically includes:

[0134] In response to receiving N first network path detection tasks created by a user, executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result;

[0135] In response to obtaining a change in the public path according to executing the N fourth network path detection tasks, re-executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result;

[0136] In response to a change in the destination path obtained by executing N fourth network path detection tasks, a second full-range network path detection result of the N fourth network path detection tasks is obtained, and a destination path to the N detection destination addresses and a second TTL range of the destination path are obtained based on the second full-range network path detection result.

[0137] In this embodiment, the more specific algorithm logic is as follows:

[0138] Parameter description: Algorithm sample quantity or sampling time. This value refers to the time when the number of samples accumulated since the last public network path change reaches the set value or the time interval reaches the sampling time. You can obtain the public path by executing the first network path detection task after the user creates the task, or after the path change is found in the public path detection task, you can find the public path by executing the detection task with a TTL range of 1-32.

[0139] Step 31: Calculate the path of each task. When the number of network result samples detected by the terminal is sufficient or the sampling time arrives, start calculating the path of each task.

[0140] Assume that the detection target of the task is 8.8.8.8 (a different assumption from Table 1), which records the path information detected each time the task is executed. Assume that a certain sample number list is shown in Table 2 below:

[0141] Table 2 An example of the execution result of the first network path detection task

[0142]

[0143]

[0144] In the table, * indicates a node that has not been detected due to reasons such as busy equipment or speed limit, and a blank indicates that the target IP has been detected before reaching this hop.

[0145] Loop through the samples in Table 2, loop through the TTL value, and the traversal range is the maximum number of hops in the result. For example, if you traverse the samples in Table 2 horizontally, you can calculate that the detection target 8.8.8.8 has more than one path, but the number of nodes in the longest path is 8. Therefore, according to the maximum number of nodes, you can traverse Table 2 vertically, calculate the probability of each node appearing under the same TTL, and get the IP and its probability of appearing in each hop as shown in Table 3 below:

[0146] Table 3 Path statistics example of a first network path detection task

[0147]

[0148] As can be seen from the table, the paths to the destination 8.8.8.8 can be summarized as path 1 and path 2. Path 1 includes 8 hops and path 2 includes 7 hops.

[0149] You can also loop through the samples to obtain the deduplicated samples. According to the points where the unique IPs appear corresponding to the TTL, fill in the points with (*) in the deduplicated samples, and then deduplicate them again to obtain the final path of the task and the maximum TTL of 8. The results are shown in Table 4 below:

[0150] Table 4 Path statistics example 2 of a first network path detection task

[0151] TTL 1 2 3 4 5 6 7 8 Path 1 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.6.6 * 8.8.8.8 Path 2 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.6.6 8.8.8.8 Path 3 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.6.6 7.7.7.7 8.8.8.8

[0152] Step 32: Calculate the destination address of the public detection task. After the paths of all tasks have been calculated in step 31, the calculation of the public path can begin.

[0153] Assume that all paths calculated after traversing all tasks (N tasks) are as shown in Table 5 below:

[0154] Table 5 Path statistics examples of N first network path detection tasks

[0155] TTL 1 2 3 4 5 6 7 8 Path 1 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.6.6 * 8.8.8.8 Path 2 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.6.6 8.8.8.8 Path 3 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.6.6 7.7.7.7 8.8.8.8 Path 4 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.66.6 7.7.77.7 10.1.1.1 Path 5 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.77.6 7.7.88.7 10.1.1.2 Path 6 * 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 6.6.88.6 7.7.99.7 10.1.1.3

[0156] According to IP list 5, loop through each path and eventually find the common IP of all paths, for example, the result is (2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5);

[0157] According to the shared IP, select the shared IP with the largest TTL value as the destination IP of the public path task. If it is "5.5.5.5", the corresponding TTL value is 5;

[0158] If the calculation fails, reset the public network path change time to the current time and restart the waiting calculation.

[0159] Step 33: Generate a public detection task. The perception platform creates a public network path task with a detection interval of 1 minute, a TTL range of 1-5, a destination of 5.5.5.5, and an ICMP type based on the calculated destination IP of the public path task. The network public path is recorded based on the results received from the detection task. It is assumed here that the public path part starts from 1, but it does not rule out the possibility that it does not start from 1.

[0160] Step 3 and 4: Change the original network detection task, add the network detection task after reducing the TTL range, and modify the dialing frequency of the original detection task, that is, the split result of task 1 to task N in Table 1. Different original network path detection tasks have different specific contents in the table.

[0161] Step 35: Monitor changes in the network public path. The perception platform matches the network detection task results of the full range (1-32) TTL traversal in real time. If the destination IP of the public detection task is not in the result, it indicates that the network public path has changed. At this time, the following operations need to be performed: delete the public path task; reset the network dial-up task to the original state and delete the new one; set the public network path change time to the current time.

[0162] Step 36: Monitor changes in network dial-up tasks. The perception platform matches the network detection task results of the full-range TTL traversal in real time. If the TTL value of the network detection result is larger than the existing task setting, the TTL value of the existing task is adjusted to this value. Specifically, it is found that the maximum TTL of the probe destination has increased. For example, Task 1 in Table 1 originally had a maximum of 8 hops, but now it has become 10 hops. In this case, the traversal range is modified to 6-10 instead of 6-8.

[0163] It is understandable that when it is detected that the destination path has changed but the public path has not changed, the destination path detection task of the split task can be directly reset without resetting the public path detection task and the full-range path detection task. That is, it is only necessary to re-acquire the destination path to the N detection destination addresses and the second TTL range of the destination path, without re-acquiring the third TTL range, etc.

[0164] In one implementation, splitting the N first network path detection tasks specifically includes:

[0165] Obtain the first number of packets sent for executing N first network path detection tasks;

[0166] Obtaining the number of second packets sent for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks;

[0167] According to the first number of packets sent and the second number of packets sent, obtain the performance improvement after splitting the N first network path detection tasks;

[0168] In response to the performance improvement reaching a preset condition, the N first network path detection tasks are split.

[0169] In this embodiment, for N first network path detection tasks, if a common path is detected, the task can be split. Splitting the task can at least reduce some detection packets for the common path, so it will inevitably improve the efficiency. It is also possible to determine how much the efficiency is improved after splitting the task based on the change in the number of packets sent before and after, so as to decide whether the task needs to be split.

[0170] In one embodiment, wherein:

[0171] Obtaining the first number of packets sent for executing N first network path detection tasks, specifically including:

[0172] The third number of packets and the fourth number of packets for executing N first network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas:

[0173] The third number of packets sent = N * the number of hops in the first TTL range * 1,

[0174] Fourth packet number = N * first TTL range hop number * second dial test interval / first dial test interval;

[0175] Obtaining the number of second packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks, specifically includes:

[0176] The fifth number of packets and the sixth number of packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas:

[0177] The fifth number of packets sent = N*the number of hops in the third TTL range*1+N*the number of hops in the fourth TTL range*1,

[0178] The sixth number of packets sent = N*the third TTL range hop count*the second dial test interval / the first dial test interval+N*the fourth TTL range hop count*the second dial test interval / the first dial test interval+N*the first TTL range hop count*1;

[0179] According to the first number of packets sent and the second number of packets sent, the performance improvement after splitting the N first network path detection tasks is obtained, specifically including:

[0180] The first performance improvement and the second performance improvement in the first dial test interval and the second dial test interval are calculated according to the following formulas respectively:

[0181] The first performance improvement = the third number of packets / the fifth number of packets,

[0182] The second performance improvement = the fourth number of packets sent / the sixth number of packets sent.

[0183] In this embodiment, the specific efficiency improvement can be calculated as follows:

[0184] Assume that the RedCap terminal has 10 network path detection tasks with a detection interval of 60s and a TTL detection range of 1-32; assume that the average number of hops to the destination of the detection result is 9, and the number of hops to the public network detection path is 5; then the comparison of the detection results before and after using the optimization algorithm is shown in Table 6 below:

[0185] Table 6 Example of performance improvement after task splitting

[0186]

[0187]

[0188] In the table, the time corresponds to the dial test interval, and the unit is converted into minutes.

[0189] This embodiment has universal applicability. According to the invention content, a related network path detection optimization module can be developed to solve the problem that when hundreds or thousands of RedCap terminals initiate multiple network path detection tasks, the network load rises sharply, affecting the flow of actual services. In the above application, the bandwidth load of the 5G network and the resource occupation of the RedCap terminal can be significantly reduced.

[0190] Embodiment 2:

[0191] like Figure 5 As shown, the present disclosure provides a network path detection device, the device comprising:

[0192] The acquisition module 1 is used to obtain the splitting results of N first network path detection tasks, and the splitting results include:

[0193] a second network path detection task, the second network path detection task does not reach the detection destination address but only detects the public path, and,

[0194] N third network path detection tasks, the third network path detection tasks reach their respective detection destination addresses but do not detect the public path,

[0195] The common path is the common part of the destination paths reaching the N detection destination addresses;

[0196] The execution or instruction execution module 2 is connected to the acquisition module 1 and is used to execute or instruct the execution of the network path detection task according to the splitting result.

[0197] In one embodiment, wherein:

[0198] The method is applied to: a network path detection terminal or a network path detection perception platform;

[0199] Acquiring the split results of the N first network path detection tasks includes: the network path detection terminal receiving the split results of the N first network path detection tasks from the network path detection perception platform, or the network path detection perception platform generating the split results of the N first network path detection tasks;

[0200] Executing or instructing the execution of a network path detection task according to the splitting result includes: the network path detection terminal executes the network path detection task according to the splitting result, or the network path detection perception platform instructs the network path detection terminal to execute the network path detection task according to the splitting result.

[0201] In one embodiment, the acquisition module 1 specifically includes:

[0202] A first acquisition unit, used to acquire a first dialing interval, a first TTL range and respective detection destination addresses of N first network path detection tasks;

[0203] A second acquisition unit, connected to the first acquisition unit, is used to acquire a destination path to the N detection destination addresses and a second TTL range of the destination path;

[0204] A third acquisition unit, connected to the second acquisition unit, is used to acquire the common part of all destination paths to obtain the public path and the public destination address and the third TTL range of the public path;

[0205] The splitting unit is connected to the third acquisition unit and is used to split the N first network path detection tasks into:

[0206] a second network path detection task having a first dialing interval, a third TTL range and a public destination address,

[0207] N third network path detection tasks having a first dialing interval, a fourth TTL range and respective detection destination addresses;

[0208] Wherein, TTL is the forwarding hop count of the network path detection packet, and the fourth TTL range is equal to the second TTL range minus the third TTL range.

[0209] In one embodiment, wherein:

[0210] The second acquisition unit is specifically used for:

[0211] Obtain all node IP addresses of the path to each entry of each detection destination IP address, and obtain the maximum TTL range of all destination paths to each detection destination IP address as each second TTL range;

[0212] The third acquisition unit is specifically used for:

[0213] Obtain the common IP address of all destination paths reaching N detection destination addresses as a public path, obtain the common IP address corresponding to the maximum TTL value in the public path as a public destination address, and obtain a third TTL range corresponding to the maximum TTL value in the public path;

[0214] Among them, IP is the Internet Protocol.

[0215] In one embodiment, the split result further includes:

[0216] N fourth network path detection tasks having a second dialing interval, a first TTL range and respective detection destination addresses,

[0217] The second dial detection interval is greater than the first dial detection interval.

[0218] In one implementation, the second acquisition unit is specifically configured to:

[0219] In response to receiving N first network path detection tasks created by a user, executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result;

[0220] In response to obtaining a change in the public path according to executing the N fourth network path detection tasks, re-executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result;

[0221] In response to a change in the destination path obtained by executing N fourth network path detection tasks, a second full-range network path detection result of the N fourth network path detection tasks is obtained, and a destination path to the N detection destination addresses and a second TTL range of the destination path are obtained based on the second full-range network path detection result.

[0222] In one embodiment, the splitting unit further includes a performance acquisition unit, which is used to:

[0223] Obtain the first number of packets sent for executing N first network path detection tasks;

[0224] Obtaining the number of second packets sent for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks;

[0225] According to the first number of packets sent and the second number of packets sent, obtain the performance improvement after splitting the N first network path detection tasks;

[0226] In response to the performance improvement reaching a preset condition, the N first network path detection tasks are split.

[0227] In one embodiment, wherein:

[0228] Obtaining the first number of packets sent for executing N first network path detection tasks, specifically including:

[0229] The third number of packets and the fourth number of packets for executing N first network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas:

[0230] The third number of packets sent = N * the number of hops in the first TTL range * 1,

[0231] Fourth packet number = N * first TTL range hop number * second dial test interval / first dial test interval;

[0232] Obtaining the number of second packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks, specifically includes:

[0233] The fifth number of packets and the sixth number of packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas:

[0234] The fifth number of packets sent = N*the number of hops in the third TTL range*1+N*the number of hops in the fourth TTL range*1,

[0235] The sixth number of packets sent = N*the third TTL range hop count*the second dial test interval / the first dial test interval+N*the fourth TTL range hop count*the second dial test interval / the first dial test interval+N*the first TTL range hop count*1;

[0236] According to the first number of packets sent and the second number of packets sent, the performance improvement after splitting the N first network path detection tasks is obtained, specifically including:

[0237] The first performance improvement and the second performance improvement in the first dial test interval and the second dial test interval are calculated according to the following formulas respectively:

[0238] The first performance improvement = the third number of packets / the fifth number of packets,

[0239] The second performance improvement = the fourth number of packets sent / the sixth number of packets sent.

[0240] Embodiment 3:

[0241] Embodiment 3 of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the network path detection method as described in Embodiment 1 or the network path detection device as described in Embodiment 2 is implemented.

[0242] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program elements or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0243] In addition, the present disclosure may also provide a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor runs the computer program stored in the memory, the processor executes the network path detection method as described in Example 1. The computer device may be the network path detection device as described in Example 2, and more specifically may be a network path detection terminal, a network path detection perception platform, or a system consisting of the two.

[0244] The memory is connected to the processor, the memory may be a flash memory or a read-only memory or other memory, and the processor may be a central processing unit or a single-chip microcomputer.

[0245] Embodiments 1-3 of the present disclosure provide a network path detection method, a network path detection device, and a computer-readable storage medium. By searching for a common path for multiple original network path detection tasks, the original network path detection tasks are split into a common path detection task and respective path detection tasks. The common path portion only needs to be detected once, and the respective path detection tasks reduce the detection of the common path portion, thereby reducing the number of network detection packets and reducing the network load caused by multiple network path detection tasks.

[0246] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A network path detection method, characterized in that: The method comprises: Obtain the split results of N first network path detection tasks, the split results include: a second network path detection task, the second network path detection task does not reach the detection destination address but only detects the public path, and, N third network path detection tasks, the third network path detection tasks reach their respective detection destination addresses but do not detect the public path, The common path is the common part of the destination paths reaching the N detection destination addresses; The network path detection task is executed or instructed to be executed according to the splitting result.

2. The method according to claim 1, characterized in that in: The method is applied to: a network path detection terminal or a network path detection perception platform; Acquiring the split results of the N first network path detection tasks includes: the network path detection terminal receiving the split results of the N first network path detection tasks from the network path detection perception platform, or the network path detection perception platform generating the split results of the N first network path detection tasks; Executing or instructing the execution of a network path detection task according to the splitting result includes: the network path detection terminal executes the network path detection task according to the splitting result, or the network path detection perception platform instructs the network path detection terminal to execute the network path detection task according to the splitting result.

3. The method according to claim 1 or 2, characterized in that: Obtain the split results of N first network path detection tasks, including: Obtaining the first dialing interval, the first TTL range and the respective detection destination addresses of N first network path detection tasks; Obtain destination paths to N detection destination addresses and a second TTL range of the destination paths; Obtain the common parts of all destination paths to obtain the public path and the public destination address and the third TTL range of the public path; Split the N first network path detection tasks into: a second network path detection task having a first dialing interval, a third TTL range and a public destination address, and, N third network path detection tasks having a first dialing interval, a fourth TTL range and respective detection destination addresses; Wherein, TTL is the forwarding hop count of the network path detection packet, and the fourth TTL range is equal to the second TTL range minus the third TTL range.

4. The method according to claim 3, characterized in that in: Obtaining the destination paths to the N detection destination addresses and the second TTL range of the destination paths, specifically including: Obtain all node IP addresses of the path to each entry of each detection destination IP address, and obtain the maximum TTL range of all destination paths to each detection destination IP address as each second TTL range; Get the common parts of all destination paths to obtain the public path and the public destination address and third TTL range of the public path, including: Obtain the common IP address of all destination paths reaching N detection destination addresses as a public path, obtain the common IP address corresponding to the maximum TTL value in the public path as a public destination address, and obtain a third TTL range corresponding to the maximum TTL value in the public path; Among them, IP is the Internet Protocol.

5. The method according to claim 3, characterized in that: The split results also include: N fourth network path detection tasks having a second dialing interval, a first TTL range and respective detection destination addresses, The second dial detection interval is greater than the first dial detection interval.

6. The method according to claim 5, characterized in that Obtaining the destination paths to the N detection destination addresses and the second TTL range of the destination paths, specifically including: In response to receiving N first network path detection tasks created by a user, executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result; In response to obtaining a change in the public path according to executing the N fourth network path detection tasks, re-executing the N first network path detection tasks to obtain a first full-range network path detection result, and obtaining a destination path to the N detection destination addresses and a second TTL range of the destination path according to the first full-range network path detection result; In response to a change in the destination path obtained by executing N fourth network path detection tasks, a second full-range network path detection result of the N fourth network path detection tasks is obtained, and a destination path to the N detection destination addresses and a second TTL range of the destination path are obtained based on the second full-range network path detection result.

7. The method according to claim 5, characterized in that The N first network path detection tasks are split, specifically including: Obtain the first number of packets sent for executing N first network path detection tasks; Obtaining the number of second packets sent for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks; According to the first number of packets sent and the second number of packets sent, obtain the performance improvement after splitting the N first network path detection tasks; In response to the performance improvement reaching a preset condition, the N first network path detection tasks are split.

8. The method according to claim 7, characterized in that in: Obtaining the first number of packets sent for executing N first network path detection tasks, specifically including: The third number of packets and the fourth number of packets for executing N first network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas: The third number of packets sent = N * the number of hops in the first TTL range * 1, Fourth packet number = N * first TTL range hop number * second dial test interval / first dial test interval; Obtaining the number of second packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks, specifically includes: The fifth number of packets and the sixth number of packets for executing one second network path detection task, N third network path detection tasks, and N fourth network path detection tasks in the first dialing interval and the second dialing interval are calculated respectively according to the following formulas: The fifth number of packets sent = N*the number of hops in the third TTL range*1+N*the number of hops in the fourth TTL range*1, Number of sixth packets sent = N*number of hops in the third TTL range*second dial test interval / first dial test interval+N*number of hops in the fourth TTL range*second dial test interval / first dial test interval+N*number of hops in the first TTL range*1; According to the first number of packets sent and the second number of packets sent, the performance improvement after splitting the N first network path detection tasks is obtained, specifically including: The first performance improvement and the second performance improvement in the first dial test interval and the second dial test interval are calculated according to the following formulas respectively: The first performance improvement = the third number of packets / the fifth number of packets, The second performance improvement = the fourth number of packets sent / the sixth number of packets sent.

9. A network path detection device, characterized in that: The device comprises: The acquisition module is used to obtain the splitting results of N first network path detection tasks, and the splitting results include: a second network path detection task, the second network path detection task does not reach the detection destination address but only detects the public path, and, N third network path detection tasks, the third network path detection tasks reach their respective detection destination addresses but do not detect the public path, The common path is the common part of the destination paths reaching the N detection destination addresses; The execution or instruction execution module is connected with the acquisition module and is used to execute or instruct the execution of the network path detection task according to the splitting result.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the network path detection method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Generation method and system of distributed segment routing dynamic bidirectional common path

    CN117221218A

  • Communication network redundant path detection system and detection method therefor

    JP2016152480A

  • Multicast fast failover handling

    US20230269128A1