Round-trip delay representative value confirmation method and device, computer device, and storage medium

By using periodic probing tasks and a sliding window mechanism to dynamically adjust the calculation of the round-trip delay representative value, the problem of the inability to accurately reflect network conditions in existing technologies is solved, and accurate reflection and jitter identification under different network conditions are achieved.

CN117294624BActive Publication Date: 2026-07-07SHANGHAI BILIBILI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI BILIBILI TECH CO LTD
Filing Date
2023-10-09
Publication Date
2026-07-07

Smart Images

  • Figure CN117294624B_ABST
    Figure CN117294624B_ABST
Patent Text Reader

Abstract

This application discloses a method for confirming a representative round-trip time (RTT) value. The method includes: periodically executing a probe task; after each probe task, adding the RTT value obtained from the probe task to a sliding window; after adding the RTT value to the sliding window, determining whether there is a RTT value greater than a preset level in the sliding window at the current moment; if there is a RTT value greater than the preset level in the sliding window at the current moment, then using the average of all RTT values ​​belonging to the target level in the sliding window at the current moment as the representative RTT value. The representative RTT value in this application can accurately reflect the condition of the network link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, computer equipment, and storage medium for confirming round-trip delay representative value. Background Technology

[0002] Most dynamic acceleration products currently achieve dynamic acceleration by deploying on existing networks to form an overlay network and through routing decision optimization and protocol optimization. The scheduling algorithms of these dynamic acceleration products rely on the probe results from client-access node (last mile), access node-relay node (middle mile), and relay node-source station (first mile) to schedule network paths. To obtain these probe results, the representative value of the network probe RTT (Round-Trip Time) is typically calculated; that is, the probe result is the representative value of the detected round-trip time.

[0003] In the existing technology, there are various ways to calculate the representative value of round-trip delay for network probing. For example, the average value of all round-trip delay values ​​detected in a recent period can be used as the representative value of round-trip delay for network probing, or the quantile of all round-trip delay values ​​detected in a recent period can be used to determine the representative value of round-trip delay for network probing.

[0004] However, the inventors discovered that the average calculation method smooths out all network jitter and cannot accurately reflect the network link status in real time, while the quantile calculation method exposes all jitter and also cannot accurately reflect the network link status. Summary of the Invention

[0005] In view of this, a method, apparatus, computer device, and computer-readable storage medium for confirming the representative value of round-trip delay are provided to solve the problem that the representative value of round-trip delay calculated by the existing calculation method using average value or quantile value cannot accurately reflect the condition of the network link.

[0006] This application provides a method for confirming the representative value of round-trip delay, applied to a source node device, the method comprising:

[0007] A probe mission is periodically executed, the probe mission being used to measure the round-trip delay between the source node device and the destination node device;

[0008] After each detection task is completed, the round-trip delay value obtained from the detection task is added to a sliding window with a preset capacity.

[0009] After adding the round-trip delay value to the sliding window, determine whether there is a round-trip delay value greater than the preset level in the sliding window at the current moment;

[0010] If there is a round-trip delay value greater than the preset level in the sliding window at the current moment, then the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment is taken as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, wherein the target level is greater than the preset level.

[0011] Optionally, the method further includes:

[0012] If there is no round-trip delay value greater than the preset level in the sliding window at the current moment, then the preset percentile value of all round-trip delay values ​​in the sliding window at the current moment will be used as the representative value of the round-trip delay.

[0013] Optionally, the method further includes:

[0014] If the current sliding window has a round-trip delay value greater than the preset level, the capacity of the sliding window will be expanded using the preset expansion strategy.

[0015] If it is detected that there is no round-trip delay value greater than the preset level in the sliding window, the capacity of the sliding window is restored to the preset capacity.

[0016] Optionally, the preset expansion strategy specifically includes:

[0017] The expanded capacity of the sliding window is the product of the level to which the largest round-trip delay value in the sliding window at the current moment belongs and the preset capacity.

[0018] Optionally, the method further includes:

[0019] A round-trip delay grading mapping table is established based on business attributes. Each business attribute has a corresponding round-trip delay grading mapping table. Each round-trip delay grading mapping table includes the correspondence between multiple levels and multiple round-trip delay value ranges. One level corresponds to one round-trip delay value range.

[0020] The determination of whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment includes:

[0021] Obtain business attribute information;

[0022] Based on the business attribute information, determine the target round-trip delay classification mapping table corresponding to the business attribute information;

[0023] Obtain the target round-trip delay value range corresponding to the preset level from the target round-trip delay level mapping table;

[0024] Determine whether there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range. If there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range, it is determined that there is a round-trip delay value in the sliding window at the current moment that is greater than a preset level.

[0025] Optionally, the method further includes:

[0026] After each detection mission is completed, determine the first level to which the round-trip delay value obtained from the mission belongs, and determine the second level to which the round-trip delay value obtained from the previous mission belongs.

[0027] Determine whether the first level is greater than the second level;

[0028] If the first level is greater than the second level, the detection task is executed again immediately;

[0029] Determine whether the round-trip delay value obtained by re-executing the detection task belongs to a level that is still greater than the second level;

[0030] If the round-trip delay value obtained by re-executing the detection task is still greater than the second level, then the round-trip delay value obtained by re-executing the detection task will be added to the sliding window.

[0031] If the round-trip delay value obtained from executing the detection task again belongs to a level no greater than the second level, then the round-trip delay value obtained from executing the detection task will be deleted from the sliding window, and the round-trip delay value obtained from executing the detection task again will be added to the sliding window.

[0032] Optionally, the step of adding the round-trip delay value obtained from each detection task to a sliding window with a preset capacity includes:

[0033] After each detection task is completed, determine whether the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity;

[0034] If the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity, then the round-trip delay values ​​obtained from performing the detection task will be added to the sliding window.

[0035] If the number of round-trip delay values ​​contained in the sliding window is equal to the preset capacity, then the round-trip delay value first added to the sliding window is deleted, and the round-trip delay value obtained from performing the probe task is added to the sliding window.

[0036] Optionally, before the step of periodically performing the detection task, the method further includes:

[0037] Periodically send detection task acquisition requests to the control center;

[0038] Receive the detection task returned by the control center based on the detection task acquisition request.

[0039] Optionally, the detection tasks returned by the control center include multiple tasks, and the periodic execution of the detection tasks includes:

[0040] Allocate one thread for each probe task;

[0041] Multiple threads periodically and concurrently execute their assigned probe tasks.

[0042] Optionally, the method further includes:

[0043] The collected round-trip delay values ​​are periodically reported to the control center.

[0044] Optionally, the detection task includes the destination address of the destination node device, the detection protocol, the standard detection frequency, and the timeout period. Each detection task specifically includes:

[0045] The execution timestamp of the current detection task to be executed is determined based on the standard detection frequency.

[0046] If the current time reaches the execution timestamp, then the method of sending the probe packet to the destination node device is determined according to the probe protocol;

[0047] A probe packet is sent to the destination node device corresponding to the destination address using a defined probe packet sending method, so as to measure the round-trip delay value between the source node device and the destination node device.

[0048] Optionally, the method of determining how to send probe packets to the destination node device according to the detection protocol includes:

[0049] When the probe protocol is TCP, it is determined that a TCP three-way handshake method will be used to send probe packets to the target node device.

[0050] When the detection protocol is HTTP, it is determined that an HTTP request detection packet will be sent to the destination node device;

[0051] When the detection protocol is ICMP, it is determined that an ICMP request probe packet will be sent to the destination node device.

[0052] This application also provides a round-trip delay representative value confirmation device, applied in a source node device, the round-trip delay representative value confirmation device comprising:

[0053] The task execution module is used to periodically execute detection tasks, which are used to measure the round-trip delay between the source node device and the destination node device;

[0054] Add a module to add the round-trip delay value obtained from each detection task to a sliding window with a preset capacity after each detection task is completed.

[0055] The judgment module is used to determine whether there is a round-trip delay value greater than a preset level in the current sliding window after the round-trip delay value is added to the sliding window;

[0056] The calculation module is further configured to, if there is a round-trip delay value in the sliding window at the current moment that is greater than a preset level, take the average of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, wherein the target level is greater than the preset level.

[0057] This application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0058] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0059] The round-trip delay representative value confirmation method of this application embodiment involves periodically executing a probe task to measure the round-trip delay value between the source node device and the destination node device. After each probe task is executed, the round-trip delay value obtained from the probe task is added to a sliding window with a preset capacity. After adding the round-trip delay value to the sliding window, it is determined whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment. If there is no round-trip delay value greater than the preset level in the sliding window at the current moment, the preset quantile value of all round-trip delay values ​​in the sliding window at the current moment is used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment. If there is a round-trip delay value greater than the preset level in the sliding window at the current moment, the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment is used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, wherein the target level is greater than the preset level. By employing the aforementioned round-trip delay representative value confirmation method, when network conditions are excellent, the preset percentile value of all round-trip delay values ​​in the sliding window at the current moment can be used as the representative value of the round-trip delay between the source node and the destination node at the current moment. When network conditions are not particularly good, the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment can be used as the representative value of the round-trip delay between the source node and the destination node at the current moment. This allows for the filtering out of minor jitter in the network link when network conditions are excellent, while retaining jitter in the network link when network conditions are not very good. Therefore, the round-trip delay representative value obtained using the round-trip delay representative value confirmation method in this application can accurately reflect the network link status in real time. Attached Figure Description

[0060] Figure 1 This is a schematic diagram illustrating the application environment of an embodiment of the round-trip delay representative value confirmation method of this application;

[0061] Figure 2 This is a flowchart of one embodiment of the round-trip delay representative value confirmation method described in this application;

[0062] Figure 3 A flowchart illustrating another embodiment of the round-trip delay representative value confirmation method described in this application;

[0063] Figure 4 This is a detailed schematic diagram illustrating the steps of periodically performing a detection task in one embodiment of this application;

[0064] Figure 5This is a detailed schematic diagram illustrating the step of adding the round-trip delay value obtained from each detection task to a sliding window with a preset capacity, as described in one embodiment of this application.

[0065] Figure 6 This is a detailed schematic diagram illustrating the steps of performing a single detection mission in one embodiment of this application;

[0066] Figure 7 This is a flowchart illustrating the process of determining the method for sending a probe packet to the destination node device according to the probe protocol in one embodiment of this application.

[0067] Figure 8 A flowchart illustrating another embodiment of the round-trip delay representative value confirmation method described in this application;

[0068] Figure 9 This is a detailed schematic diagram illustrating the steps of determining whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment, according to one embodiment of this application.

[0069] Figure 10 A flowchart illustrating another embodiment of the round-trip delay representative value confirmation method described in this application;

[0070] Figure 11 This is a program block diagram of one embodiment of the round-trip delay representative value confirmation device described in this application;

[0071] Figure 12 A schematic diagram of the hardware structure of a computer device for performing a round-trip delay representative value confirmation method provided in an embodiment of this application. Detailed Implementation

[0072] The advantages of this application are further illustrated below with reference to the accompanying drawings and specific embodiments.

[0073] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0074] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0075] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0076] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.

[0077] The following is a definition of the terminology used in this application:

[0078] RTT (Round-Trip Time): The time elapsed from the moment data is sent by the sender until the sender receives an acknowledgment from the receiver (the receiver sends an acknowledgment immediately after receiving the data).

[0079] Network jitter: describes the degree of change in RTT.

[0080] CDN (Content Delivery Network): A network layout that caches website content on cloud servers in various locations through a distributed server layout, allowing visitors to access the nearest server to improve access speed. It is the most common network layout method for implementing website acceleration.

[0081] DCDN: Site-wide acceleration, an upgrade to CDN acceleration, can distinguish between dynamic and static content accessed by users. For static content, it degrades to the CDN scenario; for dynamic content, it uses routing decision optimization, protocol optimization, and other fast origin pull methods to fetch content data.

[0082] Dynamic Acceleration (DSA / DCA): This is a method of rapidly fetching content data from the origin server by overlaying on the CDN network and optimizing routing decisions and protocols. It is the implementation method of the dynamic content fetching part of DCDN. It is generally used in connection-intensive (CPU-intensive) scenarios, that is, scenarios with a large number of user requests and connections, but a small overall bandwidth (such as: bullet comments, game signaling, upload acceleration, etc.).

[0083] CPU-intensive: When the resources required by a task, such as hard disk, memory, and bandwidth, are relatively low compared to the CPU resources consumed, it is called a CPU-intensive task. Such tasks are generally computationally intensive or connection-intensive scenarios.

[0084] Overlay Network: A network that operates on top of one or more existing networks, providing specific additional functionality.

[0085] Access node: The node used by a user to access the network from the nearest location, distributed according to geographical area.

[0086] Relay node: A connection is established between the access node and the source station through a relay node.

[0087] Last mile: From the perspective of downlink traffic, the connection established between the user and the access node.

[0088] The middle kilometer: the connection established between the access node and the relay node.

[0089] The first kilometer: the connection established between the relay node and the source station.

[0090] Quantile: One of the characteristic numbers of a random variable. Divide the area enclosed by the distribution curve of the random variable and the X-axis into n equal parts to obtain n-1 values ​​(X_1, X_2, ..., X_(n-1)), which are called n quantiles.

[0091] Figure 1 This illustration shows an application scenario provided by an embodiment of this application, which includes a source node device 100 and a destination node device 200. The source node device 100 and the destination node device 200 are located in a wireless network or a wired network. The source node device 100 and the destination node device 200 can interact with each other. A client is deployed in the source node device 100, which can be a web client, an APP client, a web page client, etc. The source node device 100 can be a mobile terminal, a fixed terminal, a server, etc. The destination node device 200 can also be a mobile terminal, a fixed terminal, a server, etc. The network can include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, and / or proxy devices. The network can also include physical links, such as coaxial cable links, twisted-pair cable links, fiber optic links, and combinations thereof and / or the like.

[0092] It should be noted that there can be multiple destination node devices 200 connected to the source node device 100; this embodiment uses one as an example. The source node device 100 can also be a destination node device, and the destination node device 200 can also be a source node device.

[0093] The inventors, through research on some methods of calculating round-trip delay representative values ​​in existing technologies, discovered that:

[0094] 1. The average value calculation method smooths out all network jitter (noise and jitter that needs to be monitored are smoothed out), and cannot accurately reflect the network link status in real time.

[0095] 2. The quantile calculation method exposes all jitter, and cannot shield the control center from frequent jitter of the network link to a certain extent.

[0096] 3. The Jacobson / Karels algorithm's perception of jitter depends on a constant α, and it cannot dynamically identify noise and jitter that needs attention.

[0097] Based on the above findings, this application provides a scheme for confirming the representative value of round-trip delay, which has the following advantages:

[0098] 1. It can support multiple detection protocols simultaneously, that is, different detection protocols can be selected for detection based on the internal protocol used in the middle kilometer of dynamic acceleration, the business protocol used in the first kilometer and the last kilometer.

[0099] 2. The detection has virtually no impact on the business side.

[0100] 3. It can intelligently identify network jitter, that is, it can accurately remove noise RTT while ensuring that the detection frequency does not affect the service quality, and intelligently identify jitter that needs to be monitored.

[0101] 4. RTT can be graded according to business characteristics, that is, RTT values ​​can be divided into several levels according to the degree of impact of different RTT values ​​on business quality.

[0102] 5. It can dynamically control the sensing sensitivity, so that once the detection result deteriorates, the representative value of the detection result needs to give a higher RTT result for a period of time until the new RTT value tends to be better for a longer period of time.

[0103] The following will provide several embodiments in the above exemplary application environment to illustrate the round-trip delay representation value confirmation scheme in this application. See also... Figure 2 This is a flowchart illustrating a round-trip delay representative value confirmation method according to an embodiment of this application. The round-trip delay representative value confirmation method in this application is applied to a source node device. The source node device refers to the device that sends data, and the destination node device refers to the device used to receive the data sent by the source node device.

[0104] It should be noted that the flowchart in this method embodiment is not intended to limit the order of execution steps. As can be seen from the diagram, the round-trip delay representative value confirmation method provided in this embodiment includes:

[0105] Step S20: Periodically execute a detection task, which is used to measure the round-trip delay between the source node device and the destination node device.

[0106] Specifically, the round-trip time (RTT) value refers to the time required to transmit data from the source node device to the destination node device via the network and receive acknowledgment information from the destination node device. The RTT value reflects the network status between the source node device and the destination node device.

[0107] In one embodiment, when the source node device receives a detection task issued by the control center or actively obtains a detection task from the control center, it begins to periodically execute the detection task.

[0108] In this embodiment, the period for the source node device to execute the probe task can be a default value or it can be specified in the probe task itself, meaning the probe task includes the period for executing the probe task. For example, if the period for executing the probe task is 1 second, then the source node device will execute the probe task once every second.

[0109] In one exemplary implementation, in order to obtain the probe mission information in a timely manner, see [reference needed]. Figure 3 Before the step of periodically performing the detection task, the method further includes:

[0110] Step S30: Periodically send a probe task acquisition request to the control center.

[0111] Specifically, the detection task acquisition request is used to acquire the detection task corresponding to the source node device, wherein the detection task can be one or multiple.

[0112] In this embodiment, the time interval for the source node device to send a probe task acquisition request to the control center can be preset and modified according to the actual situation. For example, if the time interval is 1 hour, the source node device will send a probe task acquisition request to the control center every hour to obtain the latest probe task.

[0113] The control center is a device used to manage the detection tasks corresponding to different source node devices.

[0114] Step S31: Receive the detection task returned by the control center based on the detection task acquisition request.

[0115] Specifically, after receiving a probe task acquisition request, the control center will query the probe tasks corresponding to the source node device based on the request. For example, if three probe tasks are found corresponding to the source node device, namely Task1, Task2, and Task3, the control center will return these three probe tasks to the source node device so that the source node device can obtain the probe tasks it needs to execute.

[0116] In this embodiment, by periodically and proactively sending a probe task acquisition request to the control center, the latest probe tasks that need to be executed can be obtained from the control center in a timely manner.

[0117] In one exemplary implementation, when the detection tasks returned by the control center include multiple tasks, see [reference]. Figure 4 The periodic execution of the detection task includes:

[0118] Step S40: Assign a thread to each probe task.

[0119] Specifically, after acquiring multiple probe tasks, the source node device will allocate a thread for each probe task, so that each probe task can be executed by its allocated thread.

[0120] As an example, the thread corresponding to Task1 is thread 1; the thread corresponding to Task2 is thread 2; and the thread corresponding to Task3 is thread 3.

[0121] Step S41: Multiple threads periodically and concurrently execute their respective assigned probe tasks.

[0122] Specifically, after allocating processing threads for all probing tasks, these threads can periodically and concurrently execute their respective assigned probing tasks. That is, thread 1, thread 2, and thread 3 will concurrently execute their respective assigned probing tasks at regular intervals.

[0123] In this embodiment, by allocating a thread to each probe task, these threads can execute probe tasks concurrently, thereby improving the execution efficiency of probe tasks.

[0124] Step S21: After each detection task is completed, the round-trip delay value obtained from the detection task is added to a sliding window with a preset capacity.

[0125] Specifically, the sliding window is a window with a preset storage capacity that can store round-trip time delay values. The preset capacity can be set and modified according to actual conditions. For example, if the preset capacity is 10, it means that the sliding window can store a total of 10 round-trip time delay values.

[0126] In one embodiment, a circular queue (circular queue) can be initialized as a sliding window, and the storage capacity of the circular queue can be set to the stated capacity.

[0127] In another embodiment, a circular linked list can be initialized as a sliding window, and the storage capacity of the circular linked list can be set to the preset capacity.

[0128] In this embodiment, each time the source node device completes a probe task, the round-trip delay value obtained from the probe task is added to the sliding window.

[0129] In one exemplary implementation, see [reference] Figure 5 The step of adding the round-trip delay value obtained from each detection task to a sliding window with a preset capacity after each detection task is completed includes: step S50, after each detection task is completed, determining whether the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity; step S51, if the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity, then adding the round-trip delay value obtained from the detection task to the sliding window; step S52, if the number of round-trip delay values ​​contained in the sliding window is equal to the preset capacity, then deleting the round-trip delay value first added to the sliding window, and adding the round-trip delay value obtained from the detection task to the sliding window.

[0130] Specifically, since the number of round-trip latency values ​​that a sliding window can store is limited, after each probe task is completed, it is determined whether the number of round-trip latency values ​​contained in the sliding window is less than a preset capacity. When it is determined that the number of round-trip latency values ​​contained in the sliding window is less than the preset capacity, the round-trip latency values ​​obtained from performing the probe task can be directly added to the sliding window. When it is determined that the number of round-trip latency values ​​contained in the sliding window is equal to the preset capacity, in order to allow the round-trip latency values ​​obtained from performing the probe task to be added to the sliding window, the round-trip latency values ​​that were added to the sliding window first are deleted, thereby freeing up storage capacity to store the round-trip latency values ​​obtained from performing the probe task.

[0131] In this embodiment, when the storage space of the sliding window is full, the round-trip delay value first added to the sliding window is deleted, and the round-trip delay value obtained by the current detection task is added to the sliding window, thereby ensuring the real-time nature of the round-trip delay value stored in the sliding window.

[0132] In one exemplary embodiment, the detection task includes the destination address of the destination node device, the detection protocol, the standard detection frequency, and the timeout period.

[0133] Wherein, the destination address is the access address of the destination node device. The probe protocol is the protocol used by the destination node device. The standard probe frequency is the frequency at which the probe task is executed, for example, the standard probe frequency is 10 times / minute. The timeout is the maximum time allowed to be spent during the execution of the probe task. In this embodiment, if packet loss occurs during the execution of the probe task, the timeout can be used as the round-trip latency value obtained from executing this probe task.

[0134] In this embodiment, refer to Figure 6 Each detection mission specifically includes:

[0135] Step S60: Determine the execution timestamp of the current detection task to be executed based on the standard detection frequency.

[0136] Specifically, when performing each detection task, the interval between two adjacent detection tasks can be determined first according to the standard detection frequency, that is, the interval time = 1 / the standard detection frequency. For example, if the standard detection frequency is 10 / minute, then the interval time is 1 / 10 minutes = 0.1 minutes = 6 seconds.

[0137] After determining the interval between two adjacent detection tasks, the execution timestamp of the current detection task can be obtained by combining the execution timestamp of the previous detection task with the interval. That is, the execution timestamp of the current detection task = the execution timestamp of the previous detection task + the interval. For example, if the execution timestamp of the previous detection task was 12:00:00 and the interval was 6 seconds, then the execution timestamp of the current detection task would be 12:00:06.

[0138] Step S61: If the current time reaches the execution timestamp, determine the method of sending the probe packet to the destination node device according to the probe protocol.

[0139] Specifically, after obtaining the execution timestamp, it can be determined whether the current time has reached the execution timestamp through a scheduled task, or by monitoring the current timestamp in real time. When it is detected that the current time has reached the execution timestamp, the method of sending probe packets to the target node device can be determined according to the probe protocol, that is, determining what kind of probe packets to send to the target node device and how to send the probe packets.

[0140] In one exemplary implementation, see [reference] Figure 7The method for determining the method of sending probe packets to the destination node device according to the probe protocol includes: determining whether the probe protocol is TCP; if the probe protocol is TCP, then determining to send probe packets to the destination node device using a TCP three-way handshake, that is, the time required for the source node device and the destination node device to perform a TCP three-way handshake can be used as the round-trip time value between the source node device and the destination node device. If the probe protocol is not TCP, then determining whether the probe protocol is HTTP; if the probe protocol is HTTP, then determining to send HTTP request probe packets to the destination node device, that is, by sending HTTP request probe packets to the destination node device, the time required for the HTTP request probe packets to be transmitted from the source node device to the destination node device through the network and for receiving the acknowledgment information from the destination node device can be used as the round-trip time value between the source node device and the destination node device. If the probe protocol is not HTTP, it can be further determined whether the probe protocol is ICMP. If the probe protocol is ICMP, it can be determined to send an ICMP request probe packet to the destination node device. In other words, the time required for the ICMP request probe packet to be transmitted from the source node device to the destination node device through the network and the acknowledgment information received from the destination node device can be used as the round-trip delay between the source node device and the destination node device.

[0141] It is understandable that in other implementations, the order in which the various protocols are judged may not be the order described above, but rather another order. For example, first determine whether it is the HTTP protocol, then determine whether it is the ICMP protocol, and finally determine whether it is the TCP protocol.

[0142] It should be noted that the amount of data contained in the aforementioned detection packet must be small enough.

[0143] Step S62: Send a probe packet to the destination node device corresponding to the destination address using a determined probe packet sending method to measure the round-trip delay value between the source node device and the destination node device.

[0144] Specifically, after determining the method of sending probe packets, the determined probe packet method can be used to send probe packets to the destination node device corresponding to the destination address, thereby measuring the round-trip delay value between the source node device and the destination node device.

[0145] In this embodiment, when a probe packet is sent to the destination node device using a TCP three-way handshake, the time required for the source node device and the destination node device to complete the TCP three-way handshake can be used as the round-trip time between the source node device and the destination node device. When the source node device sends an HTTP request probe packet to the destination node device, the time required for the HTTP request probe packet to be transmitted from the source node device to the destination node device via the network and for the acknowledgment information received from the destination node device can be used as the round-trip time between the source node device and the destination node device. When the source node device sends an ICMP request probe packet to the destination node device, the time required for the ICMP request probe packet to be transmitted from the source node device to the destination node device via the network and for the acknowledgment information received from the destination node device can be used as the round-trip time between the source node device and the destination node device.

[0146] In this embodiment, the detection task includes a detection protocol, thereby enabling the method of this application to support multiple detection protocols and use different detection protocols to detect the target node devices of different protocols.

[0147] In one exemplary implementation, see [reference] Figure 8 The method further includes:

[0148] Step S80: After each detection task is completed, determine the first level to which the round-trip delay value obtained from the detection task belongs, and determine the second level to which the round-trip delay value obtained from the previous detection task belongs.

[0149] Step S81: Determine whether the first level is greater than the second level.

[0150] Specifically, since different round-trip latency (RTL) values ​​can reflect different network conditions, in order to accurately reflect the network status using RTL values, different RTL values ​​can be pre-classified into different levels. The RTL value range within each level can be set and modified according to the actual situation. For example, RTL values ​​can be pre-classified into 5 levels: Level 1, Level 2, Level 3, Level 4, and Level 5. Furthermore, these 5 levels correspond to 5 different network conditions: Excellent, Good, Available, Poor, and Unavailable.

[0151] In a specific scenario, round-trip latency values ​​between 0 and R1 can be classified as level 1, those between R1 and R2 as level 2, those between R2 and R3 as level 3, those between R3 and R4 as level 4, and those between R4 and ∞ as level 5.

[0152] It should be noted that each level includes the upper limit of the round-trip delay value, but does not include the lower limit of the round-trip delay value.

[0153] To intelligently identify jitter, in this embodiment, after each detection task is completed, the first level of the round-trip latency value obtained from the current detection task and the second level of the round-trip latency value obtained from the previous detection task are determined to determine whether the measured round-trip latency value has skipped levels. For example, if the round-trip latency value obtained from the current detection task is within the "excellent" range, that is, the round-trip latency value obtained from the current detection task belongs to level 1, but the round-trip latency value obtained from the previous detection task is within the range of "good," "available," "poor," or "unavailable," that is, the round-trip latency value obtained from the previous detection task belongs to level 2, level 3, level 4, or level 5.

[0154] It should be noted that in this embodiment, the higher the level, the larger the corresponding range of round-trip delay values.

[0155] Step S82: If the first level is greater than the second level, then the detection task is executed again immediately.

[0156] Specifically, if the first level is greater than the second level, it indicates that the network condition has deteriorated. In order to determine whether the network condition has really deteriorated or whether the measured round-trip delay value has changed due to some other factors, in this embodiment, after determining that the first level is greater than the second level, the detection task will be executed again immediately to speed up the detection frequency.

[0157] It is understood that in other implementations, if the first level is greater than the second level, the detection task can be performed multiple times immediately.

[0158] In one embodiment, if the first level is lower than the second level, the detection task can be performed again immediately.

[0159] Step S83: Determine whether the round-trip delay value obtained by re-executing the detection task belongs to a level that is still greater than the second level.

[0160] Specifically, after the detection task is executed again, it is determined whether the round-trip delay value obtained from the re-execution of the detection task is still greater than the second level, so as to determine whether the network condition has really changed.

[0161] Step S84: If the round-trip delay value obtained by re-executing the detection task is still greater than the second level, then the round-trip delay value obtained by re-executing the detection task is added to the sliding window.

[0162] Specifically, if the round-trip delay value obtained by re-performing the detection task is still greater than the second level, it indicates that the network condition has indeed changed. In this case, the round-trip delay value obtained by re-performing the detection task will be added to the sliding window to record the occurrence of jitter.

[0163] Step S85: If the round-trip delay value obtained by re-executing the detection task belongs to a level no greater than the second level, then the round-trip delay value obtained by executing the detection task is deleted from the sliding window, and the round-trip delay value obtained by re-executing the detection task is added to the sliding window.

[0164] Specifically, if the round-trip delay value obtained by performing the detection task again is not greater than the second level, it indicates that the network condition has not deteriorated and the round-trip delay value obtained in the previous measurement is noise. In this case, the round-trip delay value obtained in the previous measurement will be deleted from the sliding window, and the round-trip delay value obtained by performing the detection task again will be added to the sliding window.

[0165] In this embodiment, by detecting a jump in the measured round-trip delay value, the detection task is immediately repeated, thereby achieving intelligent jitter identification.

[0166] Step S22: After adding the round-trip delay value to the sliding window, determine whether there is a round-trip delay value greater than the preset level in the sliding window at the current moment.

[0167] Specifically, the preset level is pre-set and can be set and modified according to the actual situation. For example, the preset level is "Level 1" corresponding to excellent network conditions.

[0168] In one exemplary implementation, since different services have different sensitivities to round-trip latency values, in order to better understand the impact of measured round-trip latency values ​​on different services, the method further includes: establishing a round-trip latency grading mapping table based on service attributes, wherein each service attribute has a corresponding round-trip latency grading mapping table, and each round-trip latency grading mapping table includes a correspondence between multiple levels and multiple round-trip latency value ranges, with one level corresponding to one round-trip latency value range.

[0169] Specifically, the business attributes are used to distinguish different types of business.

[0170] In this embodiment, when establishing the round-trip delay hierarchical mapping table, different round-trip delay hierarchical mapping tables can be created for different service attributes. For example, for service attribute A, a round-trip delay hierarchical mapping table a can be created; for service attribute B, a round-trip delay hierarchical mapping table b can be created; and for service attribute c, a round-trip delay hierarchical mapping table c can be created.

[0171] Each round-trip delay classification table records the mapping relationship between different levels and the corresponding round-trip delay value ranges for each level. The number of levels included in each round-trip delay classification table can be set according to actual needs, as can the round-trip delay value range corresponding to each level.

[0172] As an example, round-trip delay values ​​between 0 and R1 can be classified as level 1, those between R1 and R2 as level 2, those between R2 and R3 as level 3, those between R3 and R4 as level 4, and those between R4 and ∞ as level 5.

[0173] Accordingly, see Figure 9 The determination of whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment includes:

[0174] Step S90: Obtain business attribute information.

[0175] Specifically, the service attribute information is information used to indicate the type of service running in the source node device.

[0176] Step S91: Determine the target round-trip delay classification mapping table corresponding to the service attribute information based on the service attribute information.

[0177] Specifically, since different round-trip delay classification mapping tables corresponding to different business attributes are created in advance, after obtaining the business attribute information, the round-trip delay classification mapping table that matches the business attribute information can be found from the various created round-trip delay classification mapping tables based on the business attribute information table, and the matching round-trip delay classification mapping table is used as the target round-trip delay classification mapping table.

[0178] Step S92: Obtain the target round-trip delay value range corresponding to the preset level from the target round-trip delay level mapping table.

[0179] Specifically, since the target round-trip delay classification mapping table records round-trip delay value ranges corresponding to different levels, after obtaining the preset level, the target round-trip delay classification mapping table can be queried to find the target round-trip delay value range corresponding to the preset level.

[0180] Step S93: Determine whether there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range. If there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range, it is determined that there is a round-trip delay value in the sliding window at the current moment that is greater than a preset level.

[0181] Specifically, after retrieving the target round-trip time (RTT) value range, for each RTT value included in the current sliding window, it is determined whether it is greater than the upper limit of the target RTT value range. If there is a RTT value in the current sliding window that is greater than the upper limit of the target RTT value range, it indicates that there is a RTT value greater than a preset level in the current sliding window. If there is no RTT value in the current sliding window that is greater than the upper limit of the target RTT value range, it indicates that there is no RTT value greater than a preset level in the current sliding window.

[0182] In this embodiment, by establishing different round-trip delay level mapping tables for different service attributes, when determining whether there is a round-trip delay value greater than the preset level in the sliding window at the current moment, the judgment can be made according to the corresponding round-trip delay level mapping table, thereby making the judgment result more accurate.

[0183] In one exemplary implementation, in order to allow the round-trip latency value, which represents poor network quality, to exist for a longer period of time, see [reference needed]. Figure 10 The method further includes:

[0184] Step S100: If there is a round-trip delay value in the sliding window at the current moment that is greater than the preset level, then the capacity of the sliding window is expanded using the preset expansion strategy.

[0185] Specifically, the expansion strategy involves measuring the capacity of the sliding window, which can be preset according to actual conditions. In one embodiment, the expansion strategy can be that the expanded capacity of the sliding window is the product of the level to which the largest round-trip delay value in the sliding window at the current moment belongs and the preset capacity. For example, if the level to which the largest round-trip delay value in the sliding window at the current moment belongs is level 2, and the preset capacity is C, then the expanded capacity = C * 2. Similarly, if the level to which the largest round-trip delay value in the sliding window at the current moment belongs is level 3, and the preset capacity is C, then the expanded capacity = C * 3.

[0186] In another embodiment, the expansion strategy can also be that the expanded capacity of the sliding window is the product of the next lower level among the multiple levels corresponding to all round-trip delay values ​​in the sliding window at the current moment and the preset capacity. For example, if the levels corresponding to all round-trip delay values ​​in the sliding window at the current moment include three levels, namely level 1, level 2 and level 3, then the expanded capacity = 2 * the preset capacity.

[0187] It is understood that the above-described expansion strategy is exemplary, and other expansion strategies may also be used.

[0188] It should be noted that after the expansion operation is completed, if a subsequent expansion operation is determined to be necessary, and the resulting capacity is the same as before, expansion will not continue. However, if the resulting capacity is larger, expansion will continue. For example, after the first expansion operation, the capacity becomes 2 * the preset capacity. If a subsequent expansion operation determines that the resulting capacity is 3 * the preset capacity, then expansion will continue. Conversely, if a subsequent expansion operation determines that the resulting capacity is 2 * the preset capacity, no expansion operation is needed, and the capacity will remain at 2 * the preset capacity.

[0189] Step S101: When it is detected that there is no round-trip delay value greater than the preset level in the sliding window, the capacity of the sliding window is restored to the preset capacity.

[0190] Specifically, after the expansion is completed, it will continuously detect whether there is a round-trip latency value greater than a preset level in the current sliding window. If no round-trip latency value greater than the preset level is detected, the capacity of the sliding window will be restored to the preset capacity. In other words, as time goes by, if there is no round-trip latency value greater than the preset level in the sliding window, the capacity will be reduced, so that the sliding window capacity can be restored when the network conditions improve.

[0191] In this embodiment, when the network condition is not very good, the capacity of the sliding window is expanded, so that the round-trip delay value representing poor network quality can be maintained for a longer period of time, and the subsequent round-trip delay value can reflect this poor network quality.

[0192] Step S23: If there is a round-trip delay value greater than the preset level in the sliding window at the current moment, then the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment is taken as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, wherein the target level is greater than the preset level.

[0193] Specifically, if there is a round-trip latency value greater than a preset level in the sliding window at the current moment, it indicates that not all round-trip latency values ​​in the sliding window belong to the range below or equal to the preset level, but rather there are round-trip latency values ​​greater than the preset level. For example, there may be round-trip latency values ​​outside the "Level 1" range corresponding to excellent network conditions, meaning that the network conditions have recently been less than excellent. In this case, the average of all round-trip latency values ​​belonging to the target level in the sliding window at the current moment can be used as the representative value of the round-trip latency between the source node device and the destination node device at the current moment, thereby preserving the jitter in the network link when the network conditions are not excellent.

[0194] The target level is preset, but its level must be higher than the preset level mentioned above. The target level can be set according to the actual situation. In one embodiment, the target level is preferably the level of the largest round-trip latency value among all round-trip latency values ​​in the sliding window at the current moment. For example, if the largest round-trip latency value in the sliding window at the current moment belongs to level "2" corresponding to good network conditions, then the target level is "level 2". Or, for example, if the largest round-trip latency value in the sliding window at the current moment belongs to level "3" corresponding to available network conditions, then the target level is "level 3".

[0195] In one embodiment, the target level can also be the second-lowest level among the multiple levels corresponding to all round-trip delay values ​​in the sliding window at the current moment. That is, if the levels corresponding to all round-trip delay values ​​in the sliding window at the current moment include level 1, level 2, level 3, and level 4, then level 3 can be used as the target level.

[0196] In an exemplary embodiment, the method further includes: if there is no round-trip delay value greater than a preset level in the sliding window at the current moment, then the preset quantile value of all round-trip delay values ​​in the sliding window at the current moment is used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment.

[0197] Specifically, if there is no round-trip delay value greater than the preset level in the sliding window at the current moment, it means that all round-trip delay values ​​in the sliding window are below the preset level. For example, they are all in the "Level 1" range corresponding to excellent network conditions. In other words, the network conditions have been good recently. At this time, the preset percentile value of all round-trip delay values ​​in the sliding window at the current moment can be used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, so as to filter out the slight jitter in the network link when the network conditions are excellent.

[0198] The preset percentile value is the value corresponding to the preset percentile. The preset percentile can be set and modified according to the actual situation. For example, if the preset percentile is the 95th percentile, then the preset percentile value is the 95th percentile value.

[0199] It should be noted that when determining the quantile value, if no direct quantile value exists, the round-trip delay value closest to that quantile value is used as the final representative round-trip delay value. For example, if there are 11 round-trip delay values ​​in the current sliding window, the 95th quantile value corresponding to these 11 round-trip delay values ​​is 11 * 0.95 = 10.45. That is, the round-trip delay value ranked 10th among these 11 round-trip delay values ​​can be used as the 95th quantile value of these 11 round-trip delay values.

[0200] The round-trip delay representative value confirmation method in this embodiment periodically executes a probe task to measure the round-trip delay value between the source node device and the destination node device. After each probe task is executed, the round-trip delay value obtained from the probe task is added to a sliding window with a preset capacity. After adding the round-trip delay value to the sliding window, it is determined whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment. If there is no round-trip delay value greater than the preset level in the sliding window at the current moment, the preset quantile value of all round-trip delay values ​​in the sliding window at the current moment is used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment. If there is a round-trip delay value greater than the preset level in the sliding window at the current moment, the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment is used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, wherein the target level is greater than the preset level. By employing the aforementioned round-trip delay representative value confirmation method, when network conditions are excellent, the preset percentile value of all round-trip delay values ​​in the sliding window at the current moment can be used as the representative value of the round-trip delay between the source node and the destination node at the current moment. When network conditions are not particularly good, the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment can be used as the representative value of the round-trip delay between the source node and the destination node at the current moment. This allows for the filtering out of minor jitter in the network link when network conditions are excellent, while retaining jitter in the network link when network conditions are not very good. Therefore, the round-trip delay representative value obtained using the round-trip delay representative value confirmation method in this application can accurately reflect the network link status in real time.

[0201] In one exemplary embodiment, the method further includes:

[0202] The collected round-trip delay values ​​are periodically reported to the control center.

[0203] Specifically, the source node device can periodically report all the collected round-trip delay representative values ​​to the control center at once, thus eliminating the need to report to the control center every time a round-trip delay representative value is obtained, thereby reducing the consumption of processing resources.

[0204] The timer setting can be set and modified according to the actual situation, such as setting the timer every minute.

[0205] See Figure 11 The diagram shown is a program block diagram of an embodiment of the round-trip delay representative value confirmation device 110 of this application.

[0206] In this embodiment, the round-trip delay representative value confirmation device 110 is applied in the source node device. The round-trip delay representative value confirmation device 110 includes a series of computer program instructions stored in a memory. When the computer program instructions are executed by the processor, the round-trip delay representative value confirmation function of the various embodiments of this application can be implemented. In some embodiments, based on the specific operations implemented by each part of the computer program instructions, the round-trip delay representative value confirmation device 110 can be divided into one or more modules. Specifically, the modules that can be divided are as follows:

[0207] The task execution module 111 is used to periodically execute a detection task, which is used to measure the round-trip delay between the source node device and the destination node device;

[0208] Add module 112 to add the round-trip delay value obtained from each detection task to a sliding window with a preset capacity after each detection task is completed.

[0209] The judgment module 113 is used to determine whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment after the round-trip delay value is added to the sliding window;

[0210] The calculation module 114 is used to take the average of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment as the representative value of the round-trip delay between the source node device and the destination node device at the current moment if there is a round-trip delay value greater than the preset level in the sliding window at the current moment, wherein the target level is greater than the preset level.

[0211] In an exemplary embodiment, the calculation module 114 is further configured to, if there is no round-trip delay value greater than a preset level in the sliding window at the current moment, use the preset quantile value of all round-trip delay values ​​in the sliding window at the current moment as the representative value of the round-trip delay between the source node device and the destination node device at the current moment.

[0212] In one exemplary embodiment, the round-trip delay representative value confirmation device 110 further includes an expansion module and a recovery module.

[0213] The expansion module is used to expand the capacity of the sliding window if there is a round-trip delay value greater than a preset level in the sliding window at the current moment, using a preset expansion strategy.

[0214] The recovery module is used to restore the capacity of the sliding window to the preset capacity when it detects that there is no round-trip delay value greater than the preset level in the sliding window.

[0215] In one exemplary implementation, the preset expansion strategy is specifically as follows:

[0216] The expanded capacity of the sliding window is the product of the level to which the largest round-trip delay value in the sliding window at the current moment belongs and the preset capacity.

[0217] In one exemplary embodiment, the round-trip delay representative value confirmation device 110 further includes an establishment module.

[0218] The establishment module is used to establish a round-trip delay level mapping table according to business attributes. Each business attribute has a corresponding round-trip delay level mapping table. Each round-trip delay level mapping table includes the correspondence between multiple levels and multiple round-trip delay value ranges. One level corresponds to one round-trip delay value range.

[0219] The judgment module 113 is further configured to: acquire business attribute information; determine a target round-trip delay level mapping table corresponding to the business attribute information based on the business attribute information; acquire the target round-trip delay value range corresponding to the preset level from the target round-trip delay level mapping table; and determine whether there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range, wherein if there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range, it is determined that there is a round-trip delay value greater than the preset level in the sliding window at the current moment.

[0220] In one exemplary embodiment, the round-trip delay representative value confirmation device 110 further includes a determination module.

[0221] The determining module is further configured to, after each detection task is completed, determine the first level to which the round-trip delay value obtained from the detection task belongs, and determine the second level to which the round-trip delay value obtained from the previous task belongs.

[0222] The judgment module 113 is also used to determine whether the first level is greater than the second level.

[0223] The task execution module 111 is further configured to immediately re-execute the detection task if the first level is greater than the second level.

[0224] The judgment module 113 is also used to determine whether the round-trip delay value obtained by re-executing the detection task belongs to a level that is still greater than the second level.

[0225] The adding module 112 is further configured to add the round-trip delay value obtained from re-executing the detection task to the sliding window if the level to which the round-trip delay value belongs is still greater than the second level.

[0226] The adding module 112 is further configured to delete the round-trip delay value obtained from executing the detection task from the sliding window and add the round-trip delay value obtained from executing the detection task to the sliding window if the level to which the round-trip delay value obtained from executing the detection task again belongs is not greater than the second level.

[0227] In an exemplary embodiment, the adding module 112 is further configured to determine whether the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity after each detection task is completed; if the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity, then the round-trip delay values ​​obtained from executing the detection task are added to the sliding window; if the number of round-trip delay values ​​contained in the sliding window is equal to the preset capacity, then the round-trip delay values ​​first added to the sliding window are deleted, and the round-trip delay values ​​obtained from executing the detection task are added to the sliding window.

[0228] In one exemplary embodiment, the round-trip delay representative value confirmation device 110 further includes a sending module and a receiving module.

[0229] The sending module is used to periodically send detection task acquisition requests to the control center.

[0230] The receiving module is used to receive the detection task returned by the control center based on the detection task acquisition request.

[0231] In one exemplary embodiment, the detection tasks returned by the control center include multiple tasks, and the task execution module 111 is further configured to allocate a thread for each detection task; the multiple threads periodically and concurrently execute their respective allocated detection tasks.

[0232] In one exemplary embodiment, the round-trip delay representative value confirmation device 110 further includes a reporting module.

[0233] The reporting module is used to periodically report the collected round-trip delay representative values ​​to the control center.

[0234] In one exemplary embodiment, the detection task includes the destination address of the destination node device, the detection protocol, the standard detection frequency, and the timeout period. The task execution module 111 is further configured to determine the execution timestamp of the current detection task to be executed according to the standard detection frequency; if the current time reaches the execution timestamp, then determine the method of sending the detection packet to the destination node device according to the detection protocol; and send the detection packet to the destination node device corresponding to the destination address using the determined detection packet sending method to measure the round-trip delay value between the source node device and the destination node device.

[0235] In an exemplary embodiment, the task execution module 111 is further configured to: when the probe protocol is TCP, determine to send a probe packet to the destination node device using a TCP three-way handshake; when the probe protocol is HTTP, determine to send an HTTP request probe packet to the destination node device; and when the probe protocol is ICMP, determine to send an ICMP request probe packet to the destination node device.

[0236] Figure 12 This illustration schematically shows a hardware architecture diagram of a computer device 12 suitable for implementing a round-trip delay representative value confirmation method according to an embodiment of this application. In this embodiment, the computer device 12 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Figure 12 As shown, the computer device 12 includes, but is not limited to, at least: a memory 120, a processor 121, and a network interface 122 that can communicate with each other via a system bus. Wherein:

[0237] The memory 120 includes at least one type of computer-readable storage medium, which can be volatile or non-volatile. Specifically, the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 120 may be an internal storage module of the computer device 12, such as the hard disk or memory of the computer device 12. In other embodiments, the memory 120 may also be an external storage device of the computer device 12, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device 12. Of course, the memory 120 may also include both the internal storage module and the external storage device of the computer device 12. In this embodiment, the memory 120 is typically used to store the operating system and various application software installed on the computer device 12, such as the program code for the round-trip time representative value confirmation method. In addition, the memory 120 can also be used to temporarily store various types of data that have been output or will be output.

[0238] In some embodiments, processor 121 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other round-trip delay representation chip. Processor 121 is typically used to control the overall operation of computer device 12, such as performing control and processing related to data interaction or communication with computer device 12. In this embodiment, processor 121 is used to run program code stored in memory 120 or process data.

[0239] Network interface 122 may include a wireless network interface or a wired network interface, which is typically used to establish communication links between computer device 12 and other computer devices. For example, network interface 122 is used to connect computer device 12 to external terminals via a network, establishing data transmission channels and communication links between computer device 12 and external terminals. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.

[0240] It should be pointed out that, Figure 12 Only computer devices with components 120 to 122 are shown; however, it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

[0241] In this embodiment, the round-trip delay representative value confirmation method stored in memory 120 can be divided into one or more program modules and executed by one or more processors (processor 121 in this embodiment) to complete this application.

[0242] This application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the round-trip delay representative value confirmation method in the embodiment.

[0243] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the round-trip time representative value confirmation method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.

[0244] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across at least two network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of this application. Those skilled in the art can understand and implement this without any creative effort.

[0245] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0246] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for confirming the representative value of round-trip delay, applied in a source node device, characterized in that, The method includes: A probe mission is periodically executed, the probe mission being used to measure the round-trip delay between the source node device and the destination node device; After each detection task is completed, the round-trip delay value obtained from the detection task is added to a sliding window with a preset capacity. After adding the round-trip delay value to the sliding window, determine whether there is a round-trip delay value greater than the preset level in the sliding window at the current moment; If there is a round-trip delay value greater than the preset level in the sliding window at the current moment, then the average value of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment is taken as the representative value of the round-trip delay between the source node device and the destination node device at the current moment, wherein the target level is greater than the preset level.

2. The method for confirming the representative value of round-trip delay according to claim 1, characterized in that, The method further includes: If there is no round-trip delay value greater than the preset level in the sliding window at the current moment, then the preset quantile value of all round-trip delay values ​​in the sliding window at the current moment is used as the representative value of the round-trip delay between the source node device and the destination node device at the current moment.

3. The method for confirming the representative value of round-trip delay according to claim 1, characterized in that, The method further includes: If the current sliding window has a round-trip delay value greater than the preset level, the capacity of the sliding window will be expanded using the preset expansion strategy. If it is detected that there is no round-trip delay value greater than the preset level in the sliding window, the capacity of the sliding window is restored to the preset capacity.

4. The method for confirming the representative value of round-trip delay according to claim 3, characterized in that, The preset expansion strategy is as follows: The expanded capacity of the sliding window is the product of the level to which the largest round-trip delay value in the sliding window at the current moment belongs and the preset capacity.

5. The method for confirming the representative value of round-trip delay according to claim 1, characterized in that, The method further includes: A round-trip delay grading mapping table is established based on business attributes. Each business attribute has a corresponding round-trip delay grading mapping table. Each round-trip delay grading mapping table includes the correspondence between multiple levels and multiple round-trip delay value ranges. One level corresponds to one round-trip delay value range. The determination of whether there is a round-trip delay value greater than a preset level in the sliding window at the current moment includes: Obtain business attribute information; Based on the business attribute information, determine the target round-trip delay classification mapping table corresponding to the business attribute information; Obtain the target round-trip delay value range corresponding to the preset level from the target round-trip delay level mapping table; Determine whether there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range. If there is a round-trip delay value in the sliding window at the current moment that is greater than the upper limit of the target round-trip delay value range, it is determined that there is a round-trip delay value in the sliding window at the current moment that is greater than a preset level.

6. The method for confirming the representative value of round-trip delay according to claim 1, characterized in that, The method further includes: After each detection mission is completed, determine the first level to which the round-trip delay value obtained from the mission belongs, and determine the second level to which the round-trip delay value obtained from the previous mission belongs. Determine whether the first level is greater than the second level; If the first level is greater than the second level, the detection task is executed again immediately; Determine whether the round-trip delay value obtained by re-executing the detection task belongs to a level that is still greater than the second level; If the round-trip delay value obtained by re-executing the detection task is still greater than the second level, then the round-trip delay value obtained by re-executing the detection task will be added to the sliding window. If the round-trip delay value obtained from executing the detection task again belongs to a level no greater than the second level, then the round-trip delay value obtained from executing the detection task will be deleted from the sliding window, and the round-trip delay value obtained from executing the detection task again will be added to the sliding window.

7. The method for confirming the representative value of round-trip delay according to claim 1, characterized in that, The step of adding the round-trip delay value obtained from each detection task to a sliding window with a preset capacity includes: After each detection task is completed, determine whether the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity; If the number of round-trip delay values ​​contained in the sliding window is less than the preset capacity, then the round-trip delay values ​​obtained from performing the detection task will be added to the sliding window. If the number of round-trip delay values ​​contained in the sliding window is equal to the preset capacity, then the round-trip delay value first added to the sliding window is deleted, and the round-trip delay value obtained from performing the probe task is added to the sliding window.

8. The method for confirming the representative value of round-trip delay according to any one of claims 1 to 7, characterized in that, Before the step of periodically performing the detection mission, the method further includes: Periodically send detection task acquisition requests to the control center; Receive the detection task returned by the control center based on the detection task acquisition request.

9. The method for confirming the representative value of round-trip delay according to claim 8, characterized in that, The detection tasks returned by the control center include multiple tasks, and the periodic execution of these detection tasks includes: Allocate one thread for each probe task; Multiple threads periodically and concurrently execute their assigned probe tasks.

10. The method for confirming the representative value of round-trip delay according to claim 8, characterized in that, The method further includes: The collected round-trip delay values ​​are periodically reported to the control center.

11. The method for confirming the representative value of round-trip delay according to claim 1, characterized in that, The detection task includes the destination address of the target node device, the detection protocol, the standard detection frequency, and the timeout period. Each detection task specifically includes: The execution timestamp of the current detection task to be executed is determined based on the standard detection frequency. If the current time reaches the execution timestamp, then the method of sending the probe packet to the destination node device is determined according to the probe protocol; A probe packet is sent to the destination node device corresponding to the destination address using a defined probe packet sending method, so as to measure the round-trip delay value between the source node device and the destination node device.

12. The method for confirming the representative value of round-trip delay according to claim 11, characterized in that, The method for determining how to send probe packets to the destination node device according to the detection protocol includes: When the probe protocol is TCP, it is determined that a TCP three-way handshake method will be used to send probe packets to the target node device. When the detection protocol is HTTP, it is determined that an HTTP request detection packet will be sent to the destination node device; When the detection protocol is ICMP, it is determined that an ICMP request probe packet will be sent to the destination node device.

13. A round-trip delay representative value confirmation device, applied in a source node device, characterized in that, include: The task execution module is used to periodically execute detection tasks, which are used to measure the round-trip delay between the source node device and the destination node device; Add a module to add the round-trip delay value obtained from each detection task to a sliding window with a preset capacity after each detection task is completed. The judgment module is used to determine whether there is a round-trip delay value greater than a preset level in the current sliding window after the round-trip delay value is added to the sliding window; The calculation module is used to take the average of all round-trip delay values ​​belonging to the target level in the sliding window at the current moment as the representative value of the round-trip delay between the source node device and the destination node device at the current moment if there is a round-trip delay value greater than the preset level in the sliding window at the current moment, wherein the target level is greater than the preset level.

14. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.