CN117294624A - Method, device, computer equipment and storage medium for confirming round trip delay representative value - Google Patents
Method, device, computer equipment and storage medium for confirming round trip delay representative value Download PDFInfo
- Publication number
- CN117294624A CN117294624A CN202311305678.6A CN202311305678A CN117294624A CN 117294624 A CN117294624 A CN 117294624A CN 202311305678 A CN202311305678 A CN 202311305678A CN 117294624 A CN117294624 A CN 117294624A
- Authority
- CN
- China
- Prior art keywords
- trip delay
- round trip
- sliding window
- delay value
- round
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000001514 detection method Methods 0.000 claims abstract description 182
- 238000012790 confirmation Methods 0.000 claims abstract description 47
- 239000000523 sample Substances 0.000 claims description 63
- 238000013507 mapping Methods 0.000 claims description 35
- 238000004590 computer program Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000001133 acceleration Effects 0.000 description 7
- 238000005457 optimization Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000003068 static effect Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 101150039208 KCNK3 gene Proteins 0.000 description 2
- 101150083764 KCNK9 gene Proteins 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a round trip delay representative value confirmation method. The method comprises the following steps: periodically performing a probing task; each time a detection task is executed, adding a round trip delay value obtained by executing the detection task into a sliding window; after the round trip delay value is added into the sliding window, judging whether the round trip delay value which is larger than a preset level exists in the sliding window at the current moment; if the round trip delay value larger than the preset level exists in the sliding window at the current moment, taking the average value of all round trip delay values belonging to the target level in the sliding window at the current moment as a round trip delay representative value. The round trip delay representative value in the application can accurately reflect the condition of the network link.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and apparatus for confirming a round trip delay representative value, a computer device, and a storage medium.
Background
Most of the current dynamic acceleration products are laid out on the existing Network to form an Overlay Network, and the dynamic acceleration is realized through route decision optimization, protocol optimization and the like. The scheduling algorithms of the dynamic acceleration products all depend on detection results of a client-access node (last kilometer), an access node-relay node (middle kilometer) and a relay node-source station (first kilometer) to realize the scheduling of network paths. In order to obtain the detection result, the detection result is usually obtained by calculating a representative value of network detection RTT (Round Trip Time), that is, the detected representative value of the Round Trip Time.
In the prior art, there are various ways of calculating the round-trip delay representative value of network detection, for example, an average value of all round-trip delay values detected in a recent period is used as the round-trip delay representative value of network detection, or a quantile of all round-trip delay values detected in the recent period is used to determine the round-trip delay representative value of network detection.
However, the inventors found that the mean value calculation method smoothes out all network jitter, and cannot accurately reflect the network link conditions in real time, and the quantile calculation method exposes all jitter, and cannot accurately reflect the network link conditions.
Disclosure of Invention
In view of this, a method, apparatus, computer device and computer readable storage medium for confirming a round trip delay representative value are provided to solve the problem that the existing round trip delay representative value calculated by adopting an average value calculation method or a quantile calculation method cannot accurately reflect the situation of a network link.
The application provides a round trip delay representative value confirmation method which is applied to source node equipment, and the method comprises the following steps:
periodically executing a detection task, wherein the detection task is used for measuring a round trip delay value of the source node equipment and the destination node equipment;
Each time a detection task is executed, adding a round trip delay value obtained by executing the detection task into a sliding window with preset capacity;
after the round trip delay value is added into the sliding window, judging whether the round trip delay value which is larger than a preset level exists in the sliding window at the current moment;
if the round trip delay value larger than the preset level exists in the sliding window at the current moment, taking the average value of all round trip delay values belonging to the target level in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment, wherein the target level is larger than the preset level.
Optionally, the method further comprises:
if the round trip delay value larger than the preset level does not exist in the sliding window at the current moment, taking the preset quantile values of all round trip delay values in the sliding window at the current moment as the round trip delay representative value.
Optionally, the method further comprises:
if the round trip delay value larger than the preset level exists in the sliding window at the current moment, adopting a preset capacity expansion strategy to expand the capacity of the sliding window;
and when detecting that the round trip delay value which is larger than a preset level does not exist in the sliding window, recovering the capacity of the sliding window to the preset capacity.
Optionally, the preset capacity expansion policy specifically includes:
the capacity of the sliding window after capacity expansion is the product of the class to which the maximum round trip delay value exists in the sliding window at the current moment and the preset capacity.
Optionally, the method further comprises:
establishing a round-trip delay hierarchical mapping table according to service attributes, wherein each service attribute is provided with a corresponding round-trip delay hierarchical mapping table, each round-trip delay hierarchical mapping table comprises a plurality of grades and a plurality of corresponding relations between round-trip delay value intervals, and one grade corresponds to one round-trip delay value interval;
the judging whether the round trip delay value greater than the preset level exists in the sliding window at the current moment comprises the following steps:
acquiring service attribute information;
determining a target round trip delay hierarchical mapping table corresponding to the service attribute information according to the service attribute information;
acquiring a target round trip delay value interval corresponding to the preset grade from the target round trip delay grading mapping table;
judging whether a round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, wherein if the round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, judging that the round trip delay value larger than a preset level exists in the sliding window at the current moment.
Optionally, the method further comprises:
after each detection task is executed, determining a first grade to which a round trip delay value obtained by executing the detection task belongs, and determining a second grade to which a round trip delay value obtained by executing a last task of the detection task belongs;
judging whether the first level is greater than the second level;
if the first level is greater than the second level, immediately executing the detection task again;
judging whether the grade of the round trip delay value obtained by executing the detection task again is still greater than the second grade;
if the grade of the round trip delay value obtained by executing the detection task again is still larger than the second grade, adding the round trip delay value obtained by executing the detection task again into a sliding window;
and if the grade of the round-trip delay value obtained by executing the detection task again is not more than the second grade, deleting the round-trip delay value obtained by executing the detection task from the sliding window, and adding the round-trip delay value obtained by executing the detection task again into the sliding window.
Optionally, each time the detection task is executed, adding the round trip delay value obtained by executing the detection task to the sliding window with the preset capacity includes:
Judging whether the number of round trip delay values contained in the sliding window is smaller than the preset capacity or not after each detection task is executed;
if the number of the round trip delay values contained in the sliding window is smaller than the preset capacity, adding the round trip delay value obtained by executing the detection task into the sliding window;
and if the number of the round trip delay values contained in the sliding window is equal to the preset capacity, deleting the round trip delay value which is added into the sliding window first, and adding the round trip delay value obtained by executing the detection task into the sliding window.
Optionally, before the step of periodically performing the probing task, the method further includes:
sending a detection task acquisition request to a control center at regular time;
and receiving a detection task returned by the control center according to the detection task acquisition request.
Optionally, the detection tasks returned by the control center include a plurality of detection tasks, and the periodically performing the detection tasks includes:
assigning a thread to each probing task;
the respective assigned probing tasks are performed periodically and concurrently by a plurality of threads.
Optionally, the method further comprises:
and regularly reporting the collected round trip delay representative value to the control center.
Optionally, the probing task includes a destination address, a probing protocol, a standard probing frequency and a timeout time of the destination node device, and each time the probing task is executed specifically includes:
determining an execution time stamp of a detection task to be executed currently according to the standard detection frequency;
if the current time reaches the execution time stamp, determining a mode of sending a detection packet to the target node equipment according to the detection protocol;
and transmitting a detection packet to the destination node equipment corresponding to the destination address by adopting a determined detection packet transmitting mode so as to measure and obtain the round trip delay value of the source node equipment and the destination node equipment.
Optionally, the method for determining to send a probe packet to the destination node device according to the probe protocol includes:
when the detection protocol is a TCP protocol, a TCP three-way handshake mode is determined to be adopted to send a detection packet to the destination node equipment;
when the probe protocol is the HTTP protocol, determining to send an HTTP request probe packet to the destination node equipment;
and when the probing protocol is ICMP, determining to send an ICMP request probing packet to the destination node equipment.
The application also provides a round trip delay representative value confirmation device which is applied to source node equipment, and the round trip delay representative value confirmation device comprises:
The task execution module is used for periodically executing a detection task, and the detection task is used for measuring the round trip delay value of the source node equipment and the destination node equipment;
the adding module is used for adding the round trip delay value obtained by executing the detection task into a sliding window with preset capacity every time the detection task is executed;
the judging module is used for judging whether the round trip delay value larger than a preset level exists in the sliding window at the current moment or not after the round trip delay value is added into the sliding window;
and the calculation module is further used for taking the average value of all round trip delay values belonging to the target grade in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment if the round trip delay value larger than the preset grade exists in the sliding window at the current moment, wherein the target grade is larger than the preset grade.
The application also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
According to the round trip delay representative value confirmation method, a detection task is periodically executed, and the detection task is used for measuring round trip delay values of the source node equipment and the destination node equipment; each time a detection task is executed, adding a round trip delay value obtained by executing the detection task into a sliding window with preset capacity; after the round trip delay value is added into the sliding window, judging whether the round trip delay value which is larger than a preset level exists in the sliding window at the current moment; if the round trip delay value larger than the preset level does not exist in the sliding window at the current moment, taking the preset quantile value of all round trip delay values in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment; if the round trip delay value larger than the preset level exists in the sliding window at the current moment, taking the average value of all round trip delay values belonging to the target level in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment, wherein the target level is larger than the preset level. By adopting the above-mentioned method for confirming the round-trip delay representative value, when the network condition is excellent, the preset bit values of all round-trip delay values in the sliding window at the current time are used as the round-trip delay representative values of the source node device and the destination node device at the current time, when the network condition is not particularly excellent, the average value of all round-trip delay values belonging to the target class in the sliding window at the current time is used as the round-trip delay representative values of the source node device and the destination node device at the current time, thereby realizing that slight jitter appearing in the network link is shielded when the network condition is excellent, and jitter appearing in the network link is kept when the network condition is not excellent. Therefore, the round trip delay representative value obtained by the round trip delay representative value confirmation method can accurately reflect the condition of the network link in real time.
Drawings
Fig. 1 is a schematic diagram of an application environment of an embodiment of a round trip delay representative value confirmation method according to an embodiment of the present application;
fig. 2 is a flowchart of one embodiment of a round trip delay representative value confirmation method described in the present application;
fig. 3 is a flowchart of another embodiment of a round trip delay representative value confirmation method described in the present application;
FIG. 4 is a detailed schematic diagram of steps for periodically performing a probing task according to an embodiment of the present application;
FIG. 5 is a detailed schematic diagram of steps of adding a round trip delay value obtained by performing a probing task to a sliding window with a predetermined capacity each time the probing task is performed in an embodiment of the present application;
FIG. 6 is a detailed schematic diagram of steps for performing a probing task in one embodiment of the present application;
FIG. 7 is a flowchart of a method for determining a manner of sending a probe packet to the destination node device according to the probe protocol in an embodiment of the present application;
fig. 8 is a flowchart of another embodiment of a round trip delay representative value confirmation method described in the present application;
fig. 9 is a detailed schematic diagram of a step of determining whether a round trip delay value greater than a preset level exists in a sliding window at a current time in an embodiment of the present application;
Fig. 10 is a flowchart of another embodiment of a round trip delay representative value confirmation method described in the present application;
FIG. 11 is a block diagram illustrating an embodiment of a round trip delay representative value confirmation device according to the present disclosure;
fig. 12 is a schematic hardware structure of a computer device for performing a round trip delay representative value confirmation method according to an embodiment of the present application.
Detailed Description
Advantages of the present application are further described below in conjunction with the drawings and detailed description.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but are only used for convenience in describing the present application and distinguishing each step, and thus should not be construed as limiting the present application.
The following is a term explanation of the present application:
RTT (Round-Trip Time), round Trip delay: refers to the time that the data starts from the sending end to the sending end receiving the acknowledgement from the receiving end (the receiving end immediately sends the acknowledgement after receiving the data).
Network jitter: the degree of RTT variation is described.
CDN (content delivery net, content delivery network): the network layout for improving the access speed by caching the service content of the website into cloud servers in all places through the distributed server layout is the most commonly used network layout method for realizing the accelerating function of the website.
DCDN: the total station acceleration is technically upgraded on the basis of CDN acceleration, and whether dynamic content or static content is accessed by a user can be distinguished. If the content is static, the content is degenerated to a CDN scene; the dynamic content quickly returns the source party to fetch the content data through route decision optimization, protocol optimization and the like.
Dynamic acceleration (DSA/DCA): the method is a method for rapidly pulling the content data back to the source through route decision optimization, protocol optimization and the like by laying out (Overlay) on the CDN. Is an implementation method of the dynamic content pull part of the DCDN. The method is generally applied to a link intensive scene (CPU intensive), namely a scene with a large number of links requested by a user and a small overall bandwidth (such as barrages, game signaling, uploading acceleration and the like).
CPU intensive: when resources such as hard disk, memory, bandwidth and the like required by a task are relatively low with respect to CPU resource consumption, the task becomes a CPU-intensive task, which is generally a computationally intensive or connection intensive scenario.
Overlay Network: is a network that operates over one or more existing networks to provide specific additional functionality.
Access node (access): nodes used when a user accesses nearby are distributed according to geographic areas.
Relay node (relay): a connection is established between the access node and the source station through the relay node.
Last mile: from the point of view of traffic downstream, the connection established by the user with the access node.
One kilometer in the middle: and the access node is connected with the relay node relay.
First kilometer: and the relay node is connected with the source station.
Bit value: is one of the feature numbers of the random variable. The random variable distribution curve is divided by n equally dividing the area enclosed by the X axis to obtain n-1 values (X_1, X_ … … X_ (n-1)), which are called n-ary values.
Fig. 1 shows a schematic diagram of an application scenario provided in an embodiment of the present application, where the application scenario includes: source node device 100, destination node device 200. Wherein 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 may interact with each other. The source node device 100 is deployed with a client, which may be a web client, APP client, web page client, etc. The source node device 100 may be a mobile terminal, a fixed terminal, a server, or the like. The destination node device 200 may also be a mobile terminal, a fixed terminal, a server, etc. The network may include various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, and/or proxy devices, etc. The network may also include physical links such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like.
The destination node device 200 connected to the source node device 100 may be plural, and one is taken as an example in this embodiment. The source node device 100 may also be a destination node device, and the destination node device 200 may also be a source node device.
The inventor researches a calculation mode of some round trip delay representative values in the prior art to find that:
1. the mean value is calculated in a manner that smoothes out all network jitter (noise and jitter to be concerned are smoothed out), and the condition of the network link cannot be accurately reflected in real time.
2. The quantile calculation mode exposes all jitter, and can not shield frequent jitter of the network link to the control center to a certain extent.
3. The Jacobson/Karels algorithm' perception of jitter depends on a constant α, failing to dynamically identify noise and jitter that needs attention.
Based on the above findings, the present application provides a round trip delay representative value confirmation scheme, which has the following advantages:
1. multiple detection protocols can be supported simultaneously, namely different detection protocols can be selected for detection according to an internal protocol used in a middle kilometer and a service protocol used in a first kilometer and a last kilometer.
2. The probe has substantially zero impact on the business side.
3. Network jitter can be intelligently identified, namely, noise RTT can be accurately removed on the premise that the detection frequency is ensured not to influence service quality, and jitter needing to be concerned is intelligently identified.
4. RTT can be classified according to service characteristics, namely, the RTT value is classified into a plurality of grades according to the influence degree of different RTT values on service quality.
5. The sensing sensitivity can be dynamically controlled, and the fact that once the detection result is deteriorated, the detection result representative value needs to be continuously given out a higher RTT result for a period of time until a new RTT value tends to be in a better state in a longer period of time.
In the following, several embodiments will be provided in the above exemplary application environment to illustrate the round trip delay representative value confirmation scheme in the present application. Fig. 2 is a flow chart of a round trip delay representative value confirmation method according to an embodiment of the present application. The round trip delay representative value confirmation method is applied to source node equipment. The source node device refers to a device for transmitting data, and the destination node device refers to a device for receiving data transmitted by the source node device.
It should be noted that the flowcharts in the method embodiments are not used to limit the order of executing the steps. As can be seen from the figure, the round trip delay representative value confirmation method provided in the present embodiment includes:
And step S20, periodically executing a detection task, wherein the detection task is used for measuring the round trip delay value of the source node equipment and the destination node equipment.
Specifically, the round trip time delay value (RTT value) refers to a time value required for transmitting data from a source node device to a destination node device through a network and receiving acknowledgement information of the destination node device. The round trip delay value may reflect the network condition between the source node device and the destination node device.
In an embodiment, when the source node device receives the probing task issued by the control center or the source node device actively acquires the probing task from the control center, the source node device starts to periodically execute the probing task.
In this embodiment, the period of executing the detection task by the source node device may be a default value, or may be specified in the detection task, that is, the detection task includes a period of executing the detection task. For example, if the period of executing the probing task is 1 second, the source node device executes the probing task every second.
In an exemplary embodiment, in order to obtain the detection task in time, referring to fig. 3, before the step of periodically performing the detection task, the method further includes:
Step S30, a detection task acquisition request is sent to the control center at regular time.
Specifically, the probe task obtaining request is used for obtaining probe tasks corresponding to the source node device, where the number of probe tasks may be one or multiple.
In this embodiment, the timing time of sending the acquisition request of the probe task by the source node device to the control center may be set and modified in advance according to the actual situation, for example, the timing time is 1 hour, and then the source node device sends the acquisition request of the probe task to the control center every other hour, so as to acquire the latest probe task.
The control center is used for managing detection tasks corresponding to different source node devices.
Step S31, receiving a detection task returned by the control center according to the detection task acquisition request.
Specifically, after receiving the probe Task acquisition request, the control center queries, according to the probe Task acquisition request, probe tasks corresponding to the source node device, for example, 3 probe tasks corresponding to the source node device are queried, which are Task1, task2 and Task3 respectively. Thus, after the control center inquires the three detection tasks, the three detection tasks are returned to the source node equipment, so that the source node equipment can acquire the detection tasks required to be executed by the source node equipment.
In this embodiment, the probe task acquisition request is actively sent to the control center at regular time, so that the latest probe task to be executed can be acquired from the control center in time.
In an exemplary embodiment, when the detection task returned by the control center includes a plurality of detection tasks, referring to fig. 4, the periodically performing the detection task includes:
in step S40, a thread is allocated to each probing task.
Specifically, after acquiring a plurality of probing tasks, the source node device allocates a thread to each probing task, so that each probing task can be executed by the thread allocated by the source node device.
As an example, the thread corresponding to Task1 is thread 1; the thread corresponding to the Task2 is a thread 2; the thread corresponding to Task3 is thread 3.
Step S41, periodically and concurrently executing the probe tasks allocated to the respective threads.
Specifically, after the benefit detection threads are assigned to all detection tasks, the respective assigned detection tasks may be executed periodically and concurrently by the threads. That is, thread 1, thread 2, and thread 3 all concurrently execute their respective assigned probe tasks at intervals.
In this embodiment, by allocating a thread to each probe task, the threads may concurrently execute the probe tasks, thereby improving the execution efficiency of the probe tasks.
And step S21, adding the round trip delay value obtained by executing the detection task to a sliding window with preset capacity every time the detection task is executed.
Specifically, the sliding window is a window having a preset storage capacity and capable of storing a round trip delay value. The preset capacity can be set and modified according to actual conditions. For example, if the preset capacity is 10, it indicates that the sliding window can store 10 round trip delay values in total.
In one embodiment, a circular queue (circular queue) may be initialized to act as a sliding window and the storage capacity of the circular queue may be set to that capacity.
In another embodiment, a circular linked list may be initialized to be used as the sliding window, and the storage capacity of the circular linked list may be set to be the preset capacity.
In this embodiment, each time the source node device performs a probing task, the round trip delay value obtained by performing the probing task is added to the sliding window.
In an exemplary embodiment, referring to fig. 5, each time a probing task is performed, adding a round trip delay value obtained by performing the probing task to a sliding window with a preset capacity includes: step S50, judging whether the number of round trip delay values contained in the sliding window is smaller than the preset capacity or not after each detection task is executed; step S51, if the number of round trip delay values contained in the sliding window is smaller than the preset capacity, adding the round trip delay value obtained by executing the detection task into the sliding window; and step S52, if the number of the round trip delay values contained in the sliding window is equal to the preset capacity, deleting the round trip delay value which is added into the sliding window first, and adding the round trip delay value obtained by executing the detection task into the sliding window.
Specifically, since the number of round trip delay values that can be stored in the sliding window is limited, it is determined whether the number of round trip delay values included in the sliding window is smaller than a preset capacity after each execution of a probing task. When the number of round trip delay values contained in the sliding window is determined to be smaller than the preset capacity, the round trip delay value obtained by executing the detection task can be directly added into the sliding window. When the number of round trip delay values contained in the sliding window is determined to be equal to the preset capacity, in order to enable the round trip delay value obtained by executing the detection task to be added to the sliding window, the round trip delay value which is firstly added to the sliding window is deleted, so that a storage capacity is set aside for storing the round trip delay value obtained by executing the detection task.
In this embodiment, when the storage space of the sliding window is full, the round trip delay value added to the sliding window first is deleted, and the round trip delay value obtained by currently executing the detection task is added to the sliding window, so that the real-time of the round trip delay value stored in the sliding window is ensured.
In an exemplary embodiment, the probing task includes a destination address of the destination node device, a probing protocol, a standard probing frequency, and a timeout period.
Wherein the destination address is an access address of the destination node device. The probing protocol is a protocol used by the destination node device. The standard probing frequency is the frequency at which the probing task is performed, for example, the standard probing frequency is 10 times/min. The timeout is the maximum time allowed for the probe task to execute. In this embodiment, when the detection task is executed, if a packet loss occurs, the timeout time may be used as a round trip delay value obtained by executing the detection task.
In this embodiment, referring to fig. 6, each execution of a probing task specifically includes:
step S60, determining the execution time stamp of the detection task to be executed currently according to the standard detection frequency.
Specifically, when each detection task is executed, the interval time between two adjacent detection tasks may be determined according to the standard detection frequency, that is, the interval time=1/the standard detection frequency, for example, the interval time is 1/10 minutes=0.1 minutes=6 seconds when the standard detection frequency is 10/minute.
After confirming the interval time of two adjacent detection tasks, the execution time stamp of the detection task to be executed currently can be obtained according to the execution time stamp of the detection task and the time interval, namely, the execution time stamp of the detection task to be executed currently = the execution time stamp of the detection task to be executed last + the interval time. For example, if the execution time stamp of the last probe task is 12 hours 0 minutes 0 seconds and the time interval is 6 seconds, the execution time stamp of the probe task to be executed is 12 hours 0 minutes 6 seconds.
Step S61, if the current time reaches the execution time stamp, determining a manner of sending a probe packet to the destination node device according to the probe protocol.
Specifically, after the execution time stamp is obtained, whether the current time reaches the execution time stamp can be determined by a timing task mode, or whether the execution time stamp reaches the execution time stamp can be determined by a mode of monitoring the current time stamp in real time. Upon detecting that the current time reaches the execution time stamp, a manner of transmitting a probe packet to the destination node device, that is, what kind of probe packet is transmitted to the destination node device, and how to transmit the probe packet may be determined according to a probe protocol.
In an exemplary embodiment, referring to fig. 7, the determining, according to the probing protocol, a manner of transmitting a probing packet to the destination node device includes: judging whether the probing protocol is a TCP protocol, if the probing protocol is the TCP protocol, determining to send a probing packet to the destination node device in a TCP three-way handshake mode, that is, the time required by the TCP three-way handshake between the source node device and the destination node device can be used as the round trip time delay value of the source node device and the destination node device. If the probe protocol is not the TCP protocol, whether the probe protocol is the HTTP protocol is continuously judged, if the probe protocol is the HTTP protocol, the HTTP request probe packet is determined to be sent to the destination node equipment, namely, the HTTP request probe packet is sent to the destination node equipment, that is, the HTTP request probe packet can be transmitted from the source node equipment to the destination node equipment through a network, and the time value required by receiving the acknowledgement information of the destination node equipment is used as the round trip time delay value of the source node equipment and the destination node equipment. If the probing protocol is not the HTTP protocol, it may be continuously determined whether the probing protocol is the ICMP protocol, and if the probing protocol is the ICMP protocol, it may be determined to send an ICMP request probing packet to the destination node device, that is, the ICMP request probing packet may be transmitted from the source node device to the destination node device through the network, and a time value required for receiving acknowledgement information of the destination node device may be used as a round trip delay value of the source node device and the destination node device.
It is to be understood that in other embodiments, the order of determination of the various protocols may be other than the order described above. For example, whether the protocol is HTTP protocol is determined, whether the protocol is ICMP protocol is determined, and whether the protocol is TCP protocol is determined.
It should be noted that the amount of data contained in the probe packet must be sufficiently small.
And step S62, transmitting a detection packet to the destination node equipment corresponding to the destination address by adopting the determined detection packet transmitting mode so as to measure and obtain the round trip delay value of the source node equipment and the destination node equipment.
Specifically, after the sending mode of the probe packet is determined, the determined probe packet mode can be adopted to send the probe packet to the destination node equipment corresponding to the destination address, so that the round trip delay value of the source node equipment and the destination node equipment is measured.
In this embodiment, after the probe packet is sent to the destination node device by adopting the TCP three-way handshake method, the time required for the TCP three-way handshake between the source node device and the destination node device may be used as the round trip delay value between the source node device and the destination node device. After the source node device sends the HTTP request probe packet to the destination node device, the HTTP request probe packet may be transmitted from the source node device to the destination node device through the network, and a time value required for receiving acknowledgement information of the destination node device is used as a round trip delay value between the source node device and the destination node device. After the source node device sends the ICMP request probe packet to the destination node device, the ICMP request probe packet may be transmitted from the source node device to the destination node device through the network, and a time value required for receiving acknowledgement information of the destination node device is used as a round trip delay value between the source node device and the destination node device.
In this embodiment, the detection task includes a detection protocol, so that the method of the present application may support multiple detection protocols, and different detection protocols are used for detecting the destination node device of different protocols.
In an exemplary embodiment, referring to fig. 8, the method further includes:
step S80, after each detection task is executed, determining a first grade to which the round trip delay value obtained by executing the detection task belongs, and determining a second grade to which the round trip delay value obtained by executing the last task of the detection task belongs.
Step S81, determining whether the first level is greater than the second level.
Specifically, since different round trip delay values may reflect different network conditions, in order to accurately reflect the network conditions with the round trip delay values, the different round trip delay values may be divided into different classes in advance, and the round trip delay value interval included in each class may be set and modified according to actual situations. For example, the round trip delay value is divided into 5 classes, namely 1 class, 2 class, 3 class, 4 class and 5 class in advance. Furthermore, these 5 classes correspond to 5 different network conditions, respectively being excellent, good, available, poor and unavailable.
In one specific scenario, the round trip delay value between 0-R1 may be assigned to a 1 level, the round trip delay value between R1-R2 may be assigned to a 2 level, the round trip delay value between R2-R3 may be assigned to a 3 level, the round trip delay value between R3-R4 may be assigned to a 4 level, and the round trip delay value between R4-infinity may be assigned to a 5 level.
Each level includes a round trip delay value of an upper limit value, but does not include a round trip delay value of a lower limit value.
In order to intelligently identify jitter, in this embodiment, after each execution of a detection task, a first level to which a round trip delay value obtained by executing the detection task at this time belongs is determined, and a second level to which a round trip delay value obtained by executing the detection task at last time belongs is determined, so as to determine whether a cross-level phenomenon occurs in the round trip delay value obtained by measurement. For example, the round trip delay value obtained by the current detection task is in the "excellent" range, that is, the round trip delay value obtained by the current detection task belongs to the class 1, but the round trip delay value obtained by the last detection task of the current detection task is in the "good", "available", "poor" or "unavailable" range, that is, the round trip delay value obtained by the last detection task of the current detection task belongs to the class 2, the class 3, the class 4 or the class 5.
In this embodiment, the higher the level is, the larger the corresponding round trip delay value range is.
Step S82, if the first level is greater than the second level, executing the probing task again immediately.
Specifically, if the first level is greater than the second level, it indicates that the network condition is worse, and in order to determine whether the network condition is truly worse or because the level to which the measured round trip delay value belongs changes due to some other factors, in this embodiment, the probing task is performed again immediately after the first level is determined to be greater than the second level, so as to speed up the probing frequency.
It will be appreciated that in other embodiments, if the first level is greater than the second level, the probing task may be performed again a plurality of times at once.
In an embodiment, the probing task may also be performed again immediately when the first level is less than the second level.
And step S83, judging whether the grade of the round trip delay value obtained by executing the detection task again is still larger than the second grade.
Specifically, after the probe task is executed again, it is determined whether the round trip delay value obtained by executing the probe task again is still greater than the second level, so as to determine whether the network condition is actually changed.
And step S84, if the grade of the round trip delay value obtained by executing the detection task again is still larger than the second grade, adding the round trip delay value obtained by executing the detection task again into a sliding window.
Specifically, if the level of the round trip delay value obtained by executing the detection task again is still greater than the second level, it indicates that the network condition is indeed changed, and at this time, the round trip delay value obtained by executing the detection task again is added to the sliding window, so as to record the occurrence of jitter.
And step S85, if the grade of the round-trip delay value obtained by executing the detection task again is not more than the second grade, deleting the round-trip delay value obtained by executing the detection task from the sliding window, and adding the round-trip delay value obtained by executing the detection task again into the sliding window.
Specifically, if the level of the round trip delay value obtained by executing the detection task again is not greater than the second level, it indicates that the network condition is not degraded, and the round trip delay value obtained by measuring the previous time belongs to a noise point.
In this embodiment, by finding that the measured round trip delay value has a cross-stage phenomenon, the detection task is immediately executed again, thereby realizing intelligent jitter identification.
Step S22, after adding the round trip delay value to the sliding window, judging whether the round trip delay value larger than the preset level exists in the sliding window at the current moment.
Specifically, the preset level is preset, and may be set and modified according to actual situations, for example, the preset level is a "1 level" corresponding to an excellent network condition.
In an exemplary embodiment, since different services are not sensitive to the round trip delay value, in order to better use the measured round trip delay value for the impact of the different services, the method further comprises: and establishing a round-trip delay grading mapping table according to the service attributes, wherein each service attribute is provided with a corresponding round-trip delay grading mapping table, each round-trip delay grading mapping table comprises a plurality of grades and a corresponding relation of a plurality of round-trip delay value intervals, and one grade corresponds to one round-trip delay value interval.
In particular, the service attributes are used to distinguish between different types of services.
In this embodiment, when the round-trip delay class mapping table is established, different round-trip delay class mapping tables may be created for different service attributes, for example, for service attribute a, a round-trip delay class mapping table a may be created; for the service attribute B, a round trip delay hierarchical mapping table B can be created; service attribute c, a round trip delay class mapping table c may be created.
Wherein, each round-trip delay grading table records the mapping relation between different grades and round-trip delay value intervals corresponding to different grades. The number of classes included in each round trip delay class table may be set according to the actual situation, and the round trip delay value interval corresponding to each class may also be set according to the actual situation.
As an example, round trip delay values between 0-R1 may be assigned to a 1 level, round trip delay values between R1-R2 may be assigned to a 2 level, round trip delay values between R2-R3 may be assigned to a 3 level, round trip delay values between R3-R4 may be assigned to a 4 level, and round trip delay values between R4-infinity may be assigned to a 5 level.
Accordingly, referring to fig. 9, the determining whether the round trip delay value greater than the preset level exists in the sliding window at the current moment includes:
Step S90, obtaining service attribute information.
Specifically, the service attribute information is information indicating the type to which the service running in the source node apparatus belongs.
Step S91, determining a target round trip delay grading mapping table corresponding to the service attribute information according to the service attribute information.
Specifically, because round-trip delay class mapping tables corresponding to different service attributes are created in advance, after service attribute information is acquired, a round-trip delay class mapping table matched with the service attribute information can be found from the created round-trip delay class mapping tables according to the service attribute information table, and the matched round-trip delay class mapping table is used as the target round-trip delay class mapping table.
Step S92, obtaining a target round trip delay value interval corresponding to the preset level from the target round trip delay hierarchical mapping table.
Specifically, the round trip delay value intervals corresponding to different levels are recorded in the target round trip delay hierarchical mapping table, so that after the preset level is obtained, the target round trip delay hierarchical mapping table can be queried, and the target round trip delay value interval corresponding to the preset level can be found.
And step S93, judging whether a round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, wherein if the round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, judging that the round trip delay value larger than a preset level exists in the sliding window at the current moment.
Specifically, after the target round-trip delay value interval is queried, for each round-trip delay value included in the sliding window at the current moment, whether the round-trip delay value is larger than the upper limit value of the target round-trip delay value interval is judged. And if the round trip delay value greater than the upper limit value of the target round trip delay value interval exists in the round trip delay value contained in the sliding window at the current moment, indicating that the round trip delay value greater than the preset level exists in the sliding window at the current moment. And if the round trip delay value which is larger than the upper limit value of the target round trip delay value interval does not exist in the round trip delay value contained in the sliding window at the current moment, indicating that the round trip delay value which is larger than the preset level does not exist in the sliding window at the current moment.
In this embodiment, by establishing different round-trip delay hierarchical mapping tables for different service attributes, when judging whether a round-trip delay value greater than a preset level exists in the sliding window at the current moment, the judgment can be performed according to the corresponding round-trip delay hierarchical mapping table, so that the judgment result is more accurate.
In an exemplary embodiment, in order to enable the existence of round trip delay values representing poor network quality for a longer period of time, referring to fig. 10, the method further includes:
step S100, if the round trip delay value larger than the preset level exists in the sliding window at the current moment, the capacity of the sliding window is expanded by adopting a preset capacity expansion strategy.
Specifically, the capacity expansion strategy is a measurement of capacity expansion of the sliding window, which may be preset according to actual situations. In an embodiment, the capacity expansion policy may be that the capacity after expansion of the sliding window is a product of the level to which the maximum round trip delay value existing in the sliding window at the current time belongs and the preset capacity, for example, the level to which the maximum round trip delay value existing in the sliding window at the current time belongs is 2, the preset capacity is C, and the capacity after expansion=c×2, and similarly, if the level to which the maximum round trip delay value existing in the sliding window at the current time belongs is 3, the preset capacity is C, and the capacity after expansion=c×3.
In another embodiment, the capacity expansion policy may also be that the capacity after the capacity expansion of the sliding window is the product of the preset capacity and a secondary level of a plurality of levels corresponding to all round trip delay values in the sliding window at the current time, for example, the levels corresponding to all round trip delay values in the sliding window at the current time include 3 levels, which are respectively 1 level, 2 levels and 3 levels, and the capacity after the capacity expansion=2×the preset capacity.
It will be appreciated that the capacity expansion strategy described above is exemplary, and that the capacity expansion strategy may be other strategies.
After the capacity expansion operation is completed, if the capacity obtained after the capacity expansion operation is judged to be performed is the same as the capacity obtained before, the capacity expansion is not continued, and if the capacity obtained after the capacity expansion operation is judged to be performed is increased, the capacity expansion is continued. For example, after the first capacity expansion operation is performed, the capacity is changed to 2×preset capacity, and if the capacity after the capacity expansion operation is determined to be 3×preset capacity after the subsequent capacity expansion operation is determined to be performed, the capacity expansion operation is continued at this time. Still, if the capacity after the capacity expansion operation is determined to be needed, the capacity after the capacity expansion is determined to be 2×the preset capacity, and the capacity is kept to be 2×the preset capacity without executing the capacity expansion operation.
And step S101, when detecting that the round trip delay value larger than a preset level does not exist in the sliding window, recovering the capacity of the sliding window to the preset capacity.
Specifically, after the capacity expansion is completed, whether the round trip time delay value larger than the preset level does not exist in the current sliding window is detected in real time, and if the round trip time delay value larger than the preset level does not exist, the capacity of the sliding window is restored to the preset capacity. That is, as time goes by, if there is no round trip delay value greater than the preset level in the sliding window, the capacity is scaled, so that the sliding window capacity is restored when the network condition becomes good.
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 the poor network quality can be kept for a longer time, and the round trip delay representative value measured subsequently can represent the poor network quality.
Step S23, if a round trip delay value larger than a preset grade exists in the sliding window at the current moment, taking the average value of round trip delay values belonging to all target grades in the sliding window at the current moment as a round trip delay representative value of the source node equipment and the destination node equipment at the current moment, wherein the target grade is larger than the preset grade.
Specifically, if a round trip delay value greater than a preset level exists in the sliding window at the current moment, it indicates that not all round trip delay values in the sliding window belong to a range lower than or equal to the preset level, but a round trip delay value greater than the range of the preset level exists. For example, there is a round trip delay value outside the "class 1" range corresponding to the excellent network condition, that is, the network condition in the last period of time is not excellent, at this time, the average value of all round trip delay values belonging to the target class in the sliding window at the current time may be used as the round trip delay representative value of the source node device and the destination node device at the current time, so that jitter occurring in the network link may be preserved when the network condition is not excellent.
Wherein the target level is preset, but the level is larger than the preset level. The target level may be set according to actual conditions. In an embodiment, the target class is preferably a class to which the largest round trip delay value belongs among all round trip delay values in the sliding window at the current time, for example, a class to which the largest round trip delay value belongs among all round trip delay values in the sliding window at the current time is a "2 class" corresponding to a good network condition, and the target class is a "2 class". For another example, the level to which the largest round trip delay value among all round trip delay values in the sliding window at the current time belongs is "3 level" corresponding to the available network status, and the target level is "3 level".
In an embodiment, the target level may be a level such as a secondary difference among a plurality of levels corresponding to all round trip delay values in the sliding window at the current time, that is, if the level corresponding to all round trip delay values in the sliding window at the current time includes 1 level, 2 level, 3 level, and 4 level, then 3 level may be used as the target level.
In an exemplary embodiment, the method further comprises: if the round trip delay value larger than the preset level does not exist in the sliding window at the current moment, taking the preset quantile value of all round trip delay values in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment.
Specifically, if there is no round trip delay value greater than the preset level in the sliding window at the current time, it indicates that all round trip delay values in the sliding window belong to a range lower than the preset level, for example, all round trip delay values are in a "level 1" range corresponding to the excellent network condition, that is, the network condition in the last period is good, at this time, the preset bit values of all round trip delay values in the sliding window at the current time may be used as the round trip delay representative values of the source node device and the destination node device at the current time, so that when the network condition is excellent, slight jitter occurring in the network link is masked.
The preset quantile value is a value corresponding to a preset quantile, and the preset quantile can be set and modified according to practical situations, for example, the preset quantile value is 95 quantiles, and then the preset quantile value is 95 quantiles.
When the fractional value is taken, if there is no direct fractional value, the round trip delay value closest to the fractional value is taken as the final round trip delay representative value. For example, when there are 11 round trip delay values in the current sliding window, the 95 quantile value corresponding to the 11 round trip delay values is 11×0.95=10.45, and the round trip delay value with the size of the 10 th bit in the 11 round trip delay values can be used as the 95 quantile value of the 11 round trip delay values.
According to the round trip delay representative value confirmation method, a detection task is periodically executed, and the detection task is used for measuring round trip delay values of the source node equipment and the destination node equipment; each time a detection task is executed, adding a round trip delay value obtained by executing the detection task into a sliding window with preset capacity; after the round trip delay value is added into the sliding window, judging whether the round trip delay value which is larger than a preset level exists in the sliding window at the current moment; if the round trip delay value larger than the preset level does not exist in the sliding window at the current moment, taking the preset quantile value of all round trip delay values in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment; if the round trip delay value larger than the preset level exists in the sliding window at the current moment, taking the average value of all round trip delay values belonging to the target level in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment, wherein the target level is larger than the preset level. By adopting the above-mentioned method for confirming the round-trip delay representative value, when the network condition is excellent, the preset bit values of all round-trip delay values in the sliding window at the current time are used as the round-trip delay representative values of the source node device and the destination node device at the current time, when the network condition is not particularly excellent, the average value of all round-trip delay values belonging to the target class in the sliding window at the current time is used as the round-trip delay representative values of the source node device and the destination node device at the current time, thereby realizing that slight jitter appearing in the network link is shielded when the network condition is excellent, and jitter appearing in the network link is kept when the network condition is not excellent. Therefore, the round trip delay representative value obtained by the round trip delay representative value confirmation method can accurately reflect the condition of the network link in real time.
In an exemplary embodiment, the method further comprises:
and regularly reporting the collected round trip delay representative value to the control center.
Specifically, the source node device can report all the collected round trip delay representative values to the control center at one time at regular time, so that the round trip delay representative values do not need to be reported to the control center every time, and consumption of processing resources is reduced.
The timing time can be set and modified according to practical situations, for example, the timing time is every 1 minute.
Referring to fig. 11, a block diagram of a round trip delay representative value confirmation device 110 according to an embodiment of the present application is shown.
In this embodiment, the round trip delay representative value confirmation device 110 is applied to the source node device, and the round trip delay representative value confirmation device 110 includes a series of computer program instructions stored on a memory, which when executed by a processor, can implement the round trip delay representative value confirmation function of the embodiments of the present application. In some embodiments, the round trip delay representative value confirmation device 110 may be divided into one or more modules based on the specific operations implemented by the portions of the computer program instructions, and the specific modules may be divided as follows:
A task execution module 111, configured to periodically execute a probe task, where the probe task is used to measure a round trip delay value of the source node device and the destination node device;
the adding module 112 is configured to add a round trip delay value obtained by executing the detection task to a sliding window with a preset capacity every time the detection task is executed;
a judging module 113, configured to judge whether a round trip delay value greater than a preset level exists in the sliding window at the current moment after the round trip delay value is added to the sliding window;
and the calculating module 114 is configured to take an average value of round trip delay values of all the round trip delay values belonging to the target class in the sliding window at the current time as a round trip delay representative value of the source node device and the destination node device at the current time if the round trip delay value greater than a preset class exists in the sliding window at the current time, where the target class is greater than the preset class.
In an exemplary embodiment, the calculating 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 time, use preset bit values of all round trip delay values in the sliding window at the current time as the round trip delay representative values of the source node device and the destination node device at the current time.
In an exemplary embodiment, the round trip delay representative value confirmation device 110 further includes a capacity expansion module and a recovery module.
And the capacity expansion module is used for carrying out capacity expansion processing on the capacity of the sliding window by adopting a preset capacity expansion strategy if the round trip delay value larger than the preset level exists in the sliding window at the current moment.
And the recovery module is used for recovering the capacity of the sliding window to the preset capacity when detecting that the round trip delay value which is larger than the preset level does not exist in the sliding window.
In an exemplary embodiment, the preset capacity expansion policy specifically includes:
the capacity of the sliding window after capacity expansion is the product of the class to which the maximum round trip delay value exists in the sliding window at the current moment and the preset capacity.
In an exemplary embodiment, the round trip delay representative value confirmation device 110 further includes a setup module.
The establishing module is configured to establish a round-trip delay class mapping table according to service attributes, where each service attribute has a corresponding round-trip delay class mapping table, and each round-trip delay class mapping table includes a correspondence between a plurality of classes and a plurality of round-trip delay value intervals, and one class corresponds to one round-trip delay value interval.
The judging module 113 is further configured to obtain service attribute information; determining a target round trip delay hierarchical mapping table corresponding to the service attribute information according to the service attribute information; acquiring a target round trip delay value interval corresponding to the preset grade from the target round trip delay grading mapping table; judging whether a round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, wherein if the round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, judging that the round trip delay value larger than a preset level exists in the sliding window at the current moment.
In an exemplary embodiment, the round trip delay representative value confirmation device 110 further includes a determining module.
The determining module is further configured to determine, after each execution of a detection task, a first level to which a round trip delay value obtained by executing the detection task belongs, and determine a second level to which a round trip delay value obtained by executing a previous task of the detection task belongs.
The judging module 113 is further configured to judge whether the first level is greater than the second level.
The task execution module 111 is further configured to immediately execute the probing task again if the first level is greater than the second level.
The judging module 113 is further configured to judge whether the level of the round trip delay value obtained by executing the probing task again is still greater than the second level.
The adding module 112 is further configured to add the round trip delay value obtained by executing the probing task again to the sliding window if the level to which the round trip delay value obtained by executing the probing task again belongs is still greater than the second level.
The adding module 112 is further configured to delete the round trip delay value obtained by executing the detection task from the sliding window and add the round trip delay value obtained by executing the detection task again to the sliding window if the level to which the round trip delay value obtained by executing the detection task again belongs is not greater than the second level.
In an exemplary embodiment, the adding module 112 is further configured to determine, for each time a detection task is performed, whether the number of round trip delay values included in the sliding window is less than the preset capacity; if the number of the round trip delay values contained in the sliding window is smaller than the preset capacity, adding the round trip delay value obtained by executing the detection task into the sliding window; and if the number of the round trip delay values contained in the sliding window is equal to the preset capacity, deleting the round trip delay value which is added into the sliding window first, and adding the round trip delay value obtained by executing the detection task into the sliding window.
In an exemplary embodiment, the round trip delay representative value confirmation device 110 further includes a sending module and a receiving module.
The sending module is used for sending the acquisition request of the detection task to the control center at regular time.
The receiving module is used for receiving the detection task returned by the control center according to the detection task acquisition request.
In an exemplary embodiment, the probing task returned by the control center includes a plurality of probing tasks, and the task execution module 111 is further configured to allocate a thread to each probing task; the respective assigned probing tasks are performed periodically and concurrently by a plurality of threads.
In an exemplary embodiment, the round trip delay representative value confirmation device 110 further includes a reporting module.
And the reporting module is used for reporting the collected round trip delay representative value to the control center at fixed time.
In an exemplary embodiment, the probing task includes a destination address of the destination node device, a probing protocol, a standard probing frequency, and a timeout time, and the task execution module 111 is further configured to determine an execution timestamp of a probing task to be executed currently according to the standard probing frequency; if the current time reaches the execution time stamp, determining a mode of sending a detection packet to the target node equipment according to the detection protocol; and transmitting a detection packet to the destination node equipment corresponding to the destination address by adopting a determined detection packet transmitting mode so as to measure and obtain the round trip delay value of the source node equipment and the destination node equipment.
In an exemplary embodiment, the task execution module 111 is further configured to determine to send a probe packet to the destination node device in a TCP three-way handshake manner when the probe protocol is a TCP protocol; when the probe protocol is the HTTP protocol, determining to send an HTTP request probe packet to the destination node equipment; and when the probing protocol is ICMP, determining to send an ICMP request probing packet to the destination node equipment.
Fig. 12 schematically shows a hardware architecture diagram of a computer device 12 adapted to implement a round trip delay representative value confirmation method according to an embodiment of the present application. In the present embodiment, the computer device 12 is a device capable of automatically performing numerical calculation and/or information processing in accordance with instructions set or stored in advance. As shown in fig. 12, the computer device 12 includes at least, but is not limited to: memory 120, processor 121, and network interface 122 may be communicatively linked to each other by a system bus. Wherein:
memory 120 includes at least one type of computer-readable storage medium that may be volatile or nonvolatile, and specifically, readable storage media include flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), 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 a 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, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 12. Of course, the memory 120 may also include both internal memory modules of the computer device 12 and external memory devices. In this embodiment, the memory 120 is typically used to store an operating system installed on the computer device 12 and various types of application software, such as program code for a round trip delay representative value confirmation method. In addition, the memory 120 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 121 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other round trip delay representative value confirmation chip in some embodiments. The processor 121 is typically used to control the overall operation of the computer device 12, such as performing control and processing related to data interaction or communication with the computer device 12, and the like. In this embodiment, the processor 121 is configured to execute program codes or process data stored in the memory 120.
The network interface 122 may include a wireless network interface or a wired network interface, the network interface 122 typically being used to establish a communication link between the computer device 12 and other computer devices. For example, the network interface 122 is used to connect the computer device 12 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 12 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 12 only shows a computer device having components 120-122, but it should be understood that not all of the illustrated components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the round trip delay representative value confirmation method stored in the memory 120 may be divided into one or more program modules and executed by one or more processors (the processor 121 in this embodiment) to complete the present application.
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the round trip delay representative value confirmation method in the embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer readable storage medium is typically used to store an operating system and various application software installed on the computer device, such as program code of the round trip delay representative value confirmation method in the embodiment. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over at least two network elements. Some or all modules in the system can be screened out according to actual needs to achieve the purpose of the embodiment of the application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include processes implementing the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a random access memory (RandomAccessMemory, RAM), or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims (15)
1. A round trip delay representative value confirmation method applied to source node equipment, characterized in that the method comprises the following steps:
periodically executing a detection task, wherein the detection task is used for measuring a round trip delay value of the source node equipment and the destination node equipment;
each time a detection task is executed, adding a round trip delay value obtained by executing the detection task into a sliding window with preset capacity;
after the round trip delay value is added into the sliding window, judging whether the round trip delay value which is larger than a preset level exists in the sliding window at the current moment;
if the round trip delay value larger than the preset level exists in the sliding window at the current moment, taking the average value of all round trip delay values belonging to the target level in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment, wherein the target level is larger than the preset level.
2. The round trip delay representative value confirmation method according to claim 1, characterized in that the method further comprises:
if the round trip delay value larger than the preset level does not exist in the sliding window at the current moment, taking the preset quantile value of all round trip delay values in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment.
3. The round trip delay representative value confirmation method according to claim 1, characterized in that the method further comprises:
if the round trip delay value larger than the preset level exists in the sliding window at the current moment, adopting a preset capacity expansion strategy to expand the capacity of the sliding window;
and when detecting that the round trip delay value which is larger than a preset level does not exist in the sliding window, recovering the capacity of the sliding window to the preset capacity.
4. The round trip delay representative value confirmation method according to claim 3, wherein the preset capacity expansion policy specifically comprises:
the capacity of the sliding window after capacity expansion is the product of the class to which the maximum round trip delay value exists in the sliding window at the current moment and the preset capacity.
5. The round trip delay representative value confirmation method according to claim 1, characterized in that the method further comprises:
establishing a round-trip delay hierarchical mapping table according to service attributes, wherein each service attribute is provided with a corresponding round-trip delay hierarchical mapping table, each round-trip delay hierarchical mapping table comprises a plurality of grades and a plurality of corresponding relations between round-trip delay value intervals, and one grade corresponds to one round-trip delay value interval;
the judging whether the round trip delay value greater than the preset level exists in the sliding window at the current moment comprises the following steps:
acquiring service attribute information;
determining a target round trip delay hierarchical mapping table corresponding to the service attribute information according to the service attribute information;
acquiring a target round trip delay value interval corresponding to the preset grade from the target round trip delay grading mapping table;
judging whether a round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, wherein if the round trip delay value larger than the upper limit value of the target round trip delay value interval exists in the sliding window at the current moment, judging that the round trip delay value larger than a preset level exists in the sliding window at the current moment.
6. The round trip delay representative value confirmation method according to claim 1, characterized in that the method further comprises:
after each detection task is executed, determining a first grade to which a round trip delay value obtained by executing the detection task belongs, and determining a second grade to which a round trip delay value obtained by executing a last task of the detection task belongs;
judging whether the first level is greater than the second level;
if the first level is greater than the second level, immediately executing the detection task again;
judging whether the grade of the round trip delay value obtained by executing the detection task again is still greater than the second grade;
if the grade of the round trip delay value obtained by executing the detection task again is still larger than the second grade, adding the round trip delay value obtained by executing the detection task again into a sliding window;
and if the grade of the round-trip delay value obtained by executing the detection task again is not more than the second grade, deleting the round-trip delay value obtained by executing the detection task from the sliding window, and adding the round-trip delay value obtained by executing the detection task again into the sliding window.
7. The method for confirming the round trip delay representative value according to claim 1, wherein each time a probing task is performed, adding the round trip delay value obtained by performing the probing task to a sliding window having a predetermined capacity comprises:
judging whether the number of round trip delay values contained in the sliding window is smaller than the preset capacity or not after each detection task is executed;
if the number of the round trip delay values contained in the sliding window is smaller than the preset capacity, adding the round trip delay value obtained by executing the detection task into the sliding window;
and if the number of the round trip delay values contained in the sliding window is equal to the preset capacity, deleting the round trip delay value which is added into the sliding window first, and adding the round trip delay value obtained by executing the detection task into the sliding window.
8. The round trip delay representative value confirmation method according to any one of claims 1 to 7, characterized by further comprising, before the step of periodically performing the probing task:
sending a detection task acquisition request to a control center at regular time;
and receiving a detection task returned by the control center according to the detection task acquisition request.
9. The round trip delay representative value confirmation method according to claim 8, wherein the probe tasks returned by the control center include a plurality of probe tasks, and the periodically performing the probe tasks includes:
assigning a thread to each probing task;
the respective assigned probing tasks are performed periodically and concurrently by a plurality of threads.
10. The round trip delay representative value confirmation method of claim 8, further comprising:
and regularly reporting the collected round trip delay representative value to the control center.
11. The method for confirming a round trip delay representative value according to claim 1, wherein the probing task includes a destination address of the destination node device, a probing protocol, a standard probing frequency, and a timeout time, and each time the probing task is executed, the method specifically includes:
determining an execution time stamp of a detection task to be executed currently according to the standard detection frequency;
if the current time reaches the execution time stamp, determining a mode of sending a detection packet to the target node equipment according to the detection protocol;
and transmitting a detection packet to the destination node equipment corresponding to the destination address by adopting a determined detection packet transmitting mode so as to measure and obtain the round trip delay value of the source node equipment and the destination node equipment.
12. The round trip delay representative value confirmation method of claim 11, wherein the determining a manner of transmitting a probe packet to the destination node device according to the probe protocol comprises:
when the detection protocol is a TCP protocol, a TCP three-way handshake mode is determined to be adopted to send a detection packet to the destination node equipment;
when the probe protocol is the HTTP protocol, determining to send an HTTP request probe packet to the destination node equipment;
and when the probing protocol is ICMP, determining to send an ICMP request probing packet to the destination node equipment.
13. A round trip delay representative value confirmation device applied to source node equipment, comprising:
the task execution module is used for periodically executing a detection task, and the detection task is used for measuring the round trip delay value of the source node equipment and the destination node equipment;
the adding module is used for adding the round trip delay value obtained by executing the detection task into a sliding window with preset capacity every time the detection task is executed;
the judging module is used for judging whether the round trip delay value larger than a preset level exists in the sliding window at the current moment or not after the round trip delay value is added into the sliding window;
And the calculation module is used for taking the average value of all round trip delay values belonging to the target grade in the sliding window at the current moment as the round trip delay representative value of the source node equipment and the destination node equipment at the current moment if the round trip delay value larger than the preset grade exists in the sliding window at the current moment, wherein the target grade is larger than the preset grade.
14. A computer device, characterized in that it comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which processor implements the steps of the method according to any of claims 1 to 12 when the computer program is executed.
15. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311305678.6A CN117294624A (en) | 2023-10-09 | 2023-10-09 | Method, device, computer equipment and storage medium for confirming round trip delay representative value |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311305678.6A CN117294624A (en) | 2023-10-09 | 2023-10-09 | Method, device, computer equipment and storage medium for confirming round trip delay representative value |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117294624A true CN117294624A (en) | 2023-12-26 |
Family
ID=89256868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311305678.6A Pending CN117294624A (en) | 2023-10-09 | 2023-10-09 | Method, device, computer equipment and storage medium for confirming round trip delay representative value |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117294624A (en) |
-
2023
- 2023-10-09 CN CN202311305678.6A patent/CN117294624A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109951576B (en) | Method, apparatus and storage medium for monitoring service | |
US11818025B2 (en) | Methods, systems, and apparatus to generate information transmission performance alerts | |
CN111181849B (en) | Return source path determining method, determining device, computer equipment and storage medium | |
EP3318045B1 (en) | Monitoring wireless access point events | |
US6108800A (en) | Method and apparatus for analyzing the performance of an information system | |
CN111966289B (en) | Partition optimization method and system based on Kafka cluster | |
US20130258843A1 (en) | Network system and apparatis | |
CN106411629B (en) | Method and equipment for monitoring state of CDN node | |
CN108924005B (en) | Network detection method, network detection apparatus, medium, and device | |
CN105103495B (en) | For allowing or refusing the admission control of the measurement request between the first and second equipment | |
CN111124819A (en) | Method and device for monitoring full link | |
US10659327B2 (en) | Network traffic analysis | |
EP3295612B1 (en) | Uplink performance management | |
CN112491719A (en) | Network node selection method, equipment and storage medium | |
EP3593493B1 (en) | Prediction of a performance indicator | |
EP3935816A1 (en) | Breaking down the load time of a web page into coherent components | |
CN117294624A (en) | Method, device, computer equipment and storage medium for confirming round trip delay representative value | |
CN115022278B (en) | CDN processing method and system | |
CN110677683A (en) | Video storage and video access method and distributed storage and video access system | |
CN114124797B (en) | Server routing method and device, electronic equipment and storage medium | |
US11627630B2 (en) | TCP performance over cellular mobile networks | |
CN106302020B (en) | Network bandwidth statistical method and device | |
CN115333917A (en) | CDN anomaly detection method and device | |
CN104518985A (en) | Method and terminal for selecting service node in distributed network environment | |
CN114422599A (en) | Data transmission method, system, electronic equipment and readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |