Link delay detection method, device and equipment

By analyzing the protocol packets of the link layer and sending detection packets, the link delay and delay jitter are calculated, which solves the problem of LLDP lacking a delay detection mechanism, and realizes link performance detection and aggregation configuration. Meets the link performance requirements of complex networks.

CN118784533BActive Publication Date: 2024-12-24BEIJING HUAHUAN ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411217049.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-24
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The existing Link Layer Discovery Protocol (LLDP) does not provide a link delay detection mechanism and cannot meet the needs of complex network services for link performance.

Method used

By analyzing the protocol packets of the link layer discovery protocol, obtain the interface address of the receiving end, send the detection packet and record the packet time stamp, calculate the link bidirectional delay and current delay jitter based on the reception time and packet time stamp of the reply message. And encapsulate this information in the synchronization message and send it to the receiver to realize link delay detection.

Benefits of technology

Link delay detection based on the link layer discovery protocol is realized, link aggregation or deaggregation can be configured according to the real-time performance of the link, and the traffic switching capability and channel utilization of network equipment are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784533B_ABST
    Figure CN118784533B_ABST
Patent Text Reader

Abstract

The present invention provides a link delay detection method, device and equipment. The method is applied to the initiator in the link delay detection system, and relates to the field of network communication technology. The link delay detection system includes: an initiator and a receiver. The method includes: in response to receiving a protocol message of a link layer discovery protocol, parsing the protocol message to obtain an interface address corresponding to the receiver; sending a detection message to the receiver based on the interface address corresponding to the receiver; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; according to the receiving time and the first packet sending timestamp of the received reply message, the link bidirectional delay and the current delay jitter of the first link between the initiator and the receiver are determined; the reply message is sent by the receiver to the initiator after receiving the detection message; the link bidirectional delay and the current delay jitter are encapsulated in a synchronization message and sent to the receiver. The present invention realizes link delay detection based on the link layer discovery protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a link delay detection method, device and equipment. Background Art

[0002] With the rapid development of network technology, the types of network access devices are becoming more and more diverse, and the configuration is becoming more and more complex. Devices from different equipment manufacturers often add some unique functions. This leads to the fact that there are often many devices with different characteristics and from different manufacturers in a network. In order to facilitate the management of such a network, it is necessary to enable devices from different manufacturers to discover each other and exchange their own system and configuration information in the network, and a standard information exchange platform is needed. In this context, the Link Layer Discovery Protocol (LLDP) came into being. It provides a standard link layer discovery method, which can organize the main capabilities, management address, device identification, interface identification and other information of the local device into different types / lengths / values ​​(Type / Length / Value, TLV), and encapsulate them in Link Layer Discovery Protocol Data Unit (LLDPDU) and publish them to the neighbors directly connected to it. After receiving this information, the neighbors save it in the form of a standard Management Information Base (MIB) for the network management system to query and judge the communication status of the link.

[0003] As network business scenarios become more diverse and complex, the requirements for network communication technologies are also getting higher and higher. Different applications have different requirements for link performance. Network devices need to switch traffic to the appropriate link based on the real-time performance of the link. However, LLDP provides a standard link layer discovery method, but does not provide corresponding performance detection mechanisms such as latency detection mechanisms, which cannot meet the needs of these business scenarios.

[0004] Therefore, how to implement link delay detection based on the link layer discovery protocol has become a technical problem that urgently needs to be solved in the industry. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a link delay detection method, device and equipment, which realize link delay detection based on a link layer discovery protocol.

[0006] In a first aspect, the present invention provides a link delay detection method, the method is applied to an initiator in a link delay detection system, the link delay detection system comprises: the initiator and a receiver, the method comprises:

[0007] In response to receiving a protocol message of a link layer discovery protocol, parsing the protocol message to obtain an interface address corresponding to the receiving end;

[0008] Based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp;

[0009] Determine the bidirectional link delay and current delay jitter of the first link between the initiator and the receiver according to the reception time of the received reply message and the first packet sending timestamp; the reply message is sent by the receiver to the initiator after receiving the detection message;

[0010] The bidirectional link delay of the first link and the current delay jitter are encapsulated in a synchronization message, and the synchronization message is sent to the receiving end.

[0011] According to a link delay detection method provided by the present invention, determining the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver according to the receiving time of the received reply message and the first packet sending timestamp, including:

[0012] Converting the receiving time into a receiving timestamp;

[0013] Subtract the first packet sending timestamp from the receiving timestamp to obtain a bidirectional link delay of the first link;

[0014] The current delay jitter is determined according to the bidirectional link delay of the first link and the last delay jitter between the initiator and the receiver.

[0015] According to a link delay detection method provided by the present invention, the current delay jitter is determined according to the link bidirectional delay of the first link and the last delay jitter between the initiator and the receiver, including:

[0016] Subtract the previous delay jitter from the link bidirectional delay of the first link to obtain a subtraction result;

[0017] Multiplying the subtraction result by a preset coefficient to obtain a multiplication result;

[0018] The multiplication result is added to the previous delay jitter to obtain the current delay jitter.

[0019] According to a link delay detection method provided by the present invention, after determining the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver, the method further includes:

[0020] Link aggregation is configured according to the bidirectional link delay of the first link and the current delay jitter.

[0021] According to a link delay detection method provided by the present invention, configuring link aggregation according to the link bidirectional delay of the first link and the current delay jitter includes:

[0022] Determining, according to the aggregation identifier of the first link, whether the first link has been aggregated;

[0023] In the case where the first link is not aggregated, determining whether the first link and the second link meet a preset aggregation judgment condition according to the bidirectional link delay of the first link and the current delay jitter; the first link is a link between the first port of the initiating end and the first port of the receiving end, and the second link is a link between the second port of the initiating end and the second port of the receiving end;

[0024] When the preset aggregation judgment condition is met between the first link and the second link, link aggregation is performed on the first link and the second link;

[0025] In the case where the first link is aggregated, determining whether the first link meets a preset de-aggregation condition;

[0026] When the first link meets the preset de-aggregation condition, the link aggregation of the first link is canceled.

[0027] According to a link delay detection method provided by the present invention, sending a detection message to the receiving end based on the interface address corresponding to the receiving end includes:

[0028] Modify the version number and message length of the detection message to obtain a modified detection message;

[0029] Based on the interface address corresponding to the receiving end, the modified detection message is sent to the receiving end.

[0030] According to a link delay detection method provided by the present invention, sending a detection message to the receiving end based on the interface address corresponding to the receiving end includes:

[0031] Obtaining a period for sending the detection message;

[0032] The detection message is sent to the receiving end according to the period of the detection message and the interface address corresponding to the receiving end.

[0033] According to a link delay detection method provided by the present invention, the synchronization message is used for the receiving end to store the link bidirectional delay of the first link and the current delay jitter in the synchronization message into the neighbor information table of the receiving end.

[0034] In a second aspect, the present invention provides a link delay detection method, the method is applied to a receiving end in a link delay detection system, the link delay detection system comprises: an initiating end and the receiving end, the method comprises:

[0035] In response to receiving a detection message, a reply message is sent to the initiator; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving a protocol message of the link layer discovery protocol, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp;

[0036] In response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay of the first link and the current delay jitter of the synchronization message are stored in the neighbor information table of the receiving end; the synchronization message is obtained after the initiating end encapsulates the link bidirectional delay of the first link and the current delay jitter.

[0037] In a third aspect, the present invention further provides a link delay detection device, which is applied to an initiator in a link delay detection system, wherein the link delay detection system comprises: the initiator and the receiver, and the device comprises the following modules:

[0038] A parsing module, configured to, in response to receiving a protocol message of a link layer discovery protocol, parse the protocol message to obtain an interface address corresponding to the receiving end;

[0039] A link delay detection module, based on the interface address corresponding to the receiving end, sends a detection message to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; according to the reception time of the received reply message and the first packet sending timestamp, the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end are determined; the reply message is sent by the receiving end to the initiating end after receiving the detection message.

[0040] A synchronization module is used to encapsulate the link bidirectional delay of the first link and the current delay jitter in a synchronization message, and send the synchronization message to the receiving end.

[0041] In a fourth aspect, the present invention further provides a link delay detection device, which is applied to a receiving end in a link delay detection system, wherein the link delay detection system comprises: an initiating end and the receiving end, and the device comprises:

[0042] A reply module, used for sending a reply message to the initiator in response to receiving a detection message; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message in response to receiving a protocol message of the link layer discovery protocol to obtain the interface address corresponding to the receiving end, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp;

[0043] A storage module is used to parse the synchronization message in response to receiving the synchronization message, and store the link bidirectional delay of the first link and the current delay jitter of the synchronization message in the neighbor information table of the receiving end; the synchronization message is obtained after the initiator encapsulates the link bidirectional delay of the first link and the current delay jitter.

[0044] In a fifth aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a link delay detection method as described above is implemented.

[0045] In a sixth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the link delay detection methods described above.

[0046] In a seventh aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the link delay detection method as described in any one of the above is implemented.

[0047] The present invention provides a link delay detection method, device and equipment. The method is applied to an initiator in a link delay detection system. The link delay detection system includes: an initiator and a receiver. In response to receiving a protocol message of a link layer discovery protocol, the protocol message is parsed to obtain an interface address corresponding to the receiver. Then, based on the interface address corresponding to the receiver, a detection message is sent to the receiver, wherein the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp. Further, according to the receiving time and the first packet sending timestamp of a received reply message, the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver are determined, wherein the reply message is sent to the initiator after the receiver receives the detection message, and the link bidirectional delay and current delay jitter of the first link are encapsulated in a synchronization message, and the synchronization message is sent to the receiver.

[0048] The present invention obtains the interface address corresponding to the receiving end by parsing the protocol message of the link layer discovery protocol, and sends a detection message to the receiving end based on the interface address corresponding to the receiving end. Since the detection message is a protocol extension message including a first packet sending timestamp, and the reply message is sent by the receiving end to the initiating end after receiving the detection message, the initiating end can determine the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end according to the receiving time of the reply message and the first packet sending timestamp, thereby realizing link delay detection based on the link layer discovery protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 This is one of the flow charts of the link delay detection method provided by the present invention.

[0051] Figure 2 It is a structural schematic diagram of the link delay detection system provided by the present invention.

[0052] Figure 3 This is the second flow chart of the link delay detection method provided by the present invention.

[0053] Figure 4 This is the third flow chart of the link delay detection method provided by the present invention.

[0054] Figure 5 This is one of the structural schematic diagrams of the link delay detection device provided by the present invention.

[0055] Figure 6 This is the second structural schematic diagram of the link delay detection device provided by the present invention.

[0056] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] Combine the following Figure 1-Figure 7 The link delay detection method, device and equipment of the present invention are described.

[0059] Figure 1 It is one of the flow diagrams of the link delay detection method provided by the present invention. The method is applied to the initiator in the link delay detection system. The link delay detection system includes: an initiator and a receiver, such as Figure 1 As shown, the method includes the following:

[0060] Step 101: In response to receiving a protocol message of a link layer discovery protocol, the protocol message is parsed to obtain an interface address corresponding to a receiving end;

[0061] Specifically, the execution subject of this embodiment is an initiator in a link delay detection system, which is used to implement link delay detection based on a link layer discovery protocol.

[0062] The link delay detection system includes an initiator and a receiver. For example, Figure 2 Schematic diagram of the structure of the link delay detection system provided by the present invention. Figure 2 As shown, the link delay detection system includes a switching device 1 (also known as the initiating end) and a switching device 2 (also known as the receiving end), wherein there are multiple links between the switching device 1 (also known as the initiating end) and the switching device 2 (also known as the receiving end), such as a link corresponding to text, a link corresponding to sound, a link corresponding to a picture, and a link corresponding to a video. The multiple links correspond to different ports, and the ports transmitting the same link between the two switching devices correspond one to one.

[0063] It is understandable that when performing link detection, both the initiator and the receiver, i.e., both ends of the first link, start the Link Layer Discovery Protocol (LLDP) related process. The Link Layer Discovery Protocol LLDP is a network protocol used for link layer discovery and identification between network devices. LLDP provides a mechanism that enables devices to send and receive information about themselves and the devices they are connected to. The Link Layer Discovery Protocol LLDP provides a standardized method to collect and exchange link layer information, which helps to improve the manageability and efficiency of the network.

[0064] Furthermore, after both ends of the first link start the LLDP related process, the link layer discovery protocol sends protocol messages regularly. After receiving the protocol message of the link layer discovery protocol, the initiator parses the protocol message to obtain neighbor information, such as the interface address corresponding to the receiving end.

[0065] Step 102: Send a detection message to the receiving end based on the interface address corresponding to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp;

[0066] Specifically, after obtaining the interface address corresponding to the receiving end, a detection message can be further sent to the receiving end based on the interface address corresponding to the receiving end. The detection message is different from an ordinary protocol message and is a protocol extension message. Specifically, the detection message includes a first packet sending timestamp (a packet sending timestamp corresponding to the detection message sent by the initiator), that is, the initiator sends an LLDP extension message carrying the first packet sending timestamp to the receiving end.

[0067] Step 103: Determine the bidirectional link delay and current delay jitter of the first link between the initiator and the receiver according to the reception time of the reply message and the first packet sending timestamp; the reply message is sent by the receiver to the initiator after receiving the detection message.

[0068] Specifically, after the initiator sends a detection message to the receiving end, after the receiving end receives the detection message, the receiving end writes the first packet sending timestamp into a reply message, and at the same time carries the second packet sending timestamp (the receiving end's own packet sending timestamp) into the reply message and sends it to the initiator.

[0069] Furthermore, after receiving the reply message, the initiator can determine the bidirectional link delay and current delay jitter of the first link between the initiator and the receiver according to the reception time of the reply message and the first packet sending timestamp. Among them, the delay refers to the time required for the data packet to travel from the sender to the receiver, and the delay jitter refers to the inconsistency of the arrival time of the data packet. Even if the average delay is small, the delay jitter may be large.

[0070] Step 104: Encapsulate the bidirectional link delay and current delay jitter of the first link in a synchronization message, and send the synchronization message to the receiving end.

[0071] The initiator can first store the bidirectional link delay and current delay jitter of the first link in the neighbor information table of the initiator. In the field of communication, the neighbor information list (NIL) is used to store relevant information about other cells around a cell (base station), which is essential for mobile devices to switch (handover) between different cells. In other words, in the field of link detection, the neighbor information table stores information corresponding to the device that establishes a neighbor relationship with the initiator, as well as link information between neighbors, etc.

[0072] Furthermore, the initiator can encapsulate the link bidirectional delay and current delay jitter of the first link in a synchronization message, and send the synchronization message to the receiving end. It can be understood that the synchronization message is used for the receiving end to store the link bidirectional delay and current delay jitter of the first link in the synchronization message into the neighbor information table of the receiving end, that is, the receiving end can also store relevant information of the neighbor node and the link information (such as link delay and delay jitter) between the neighbor node (such as the initiator).

[0073] In this embodiment, the bidirectional delay of the link is calculated. In some embodiments, when the clocks of the initiator and the receiver are synchronized, the one-way delay can also be calculated based on the reception time of the reply message and the second packet sending timestamp.

[0074] The method provided in this embodiment is applied to the initiator in a link delay detection system. The link delay detection system includes: an initiator and a receiver. In response to receiving a protocol message of a link layer discovery protocol, the protocol message is parsed to obtain an interface address corresponding to the receiver, wherein the receiver is a port that establishes a neighbor relationship with the initiator; then, based on the interface address corresponding to the receiver, a detection message is sent to the receiver, wherein the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; further, according to the receiving time and the first packet sending timestamp of the received reply message, the link bidirectional delay and the current delay jitter of the first link between the initiator and the receiver are determined, wherein the reply message is sent by the receiver to the initiator after receiving the detection message, and the link bidirectional delay and the current delay jitter of the first link are encapsulated in a synchronization message, and the synchronization message is sent to the receiver.

[0075] The present invention obtains the interface address corresponding to the receiving end by parsing the protocol message of the link layer discovery protocol, and sends a detection message to the receiving end based on the interface address corresponding to the receiving end. Since the detection message is a protocol extension message including a first packet sending timestamp, and the reply message is sent by the receiving end to the initiating end after receiving the detection message, the initiating end can determine the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end according to the receiving time of the reply message and the first packet sending timestamp, thereby realizing link delay detection based on the link layer discovery protocol.

[0076] According to a link delay detection method provided by the present invention, a link bidirectional delay and current delay jitter of a first link between an initiator and a receiver are determined according to a receiving time of a received reply message and a first packet sending timestamp, including:

[0077] Convert the receiving time into a receiving timestamp;

[0078] Subtract the first packet sending timestamp from the receiving timestamp to obtain the bidirectional link delay of the first link;

[0079] The current delay jitter is determined according to the link bidirectional delay of the first link and the last delay jitter between the initiator and the receiver.

[0080] Specifically, in some embodiments, step 103 may be implemented in the following manner:

[0081] First, convert the receiving moment into the receiving timestamp. It can be understood that moment and timestamp are two time-related terms, which are both different and related. The difference is that moment usually refers to a specific point in time, which represents a specific moment of the day. A timestamp is a number that represents the number of seconds, milliseconds, or microseconds that have passed since a specific point in time. Furthermore, the connection between the two is that moment and timestamp can be converted to each other. For example, a specific moment can be converted to the corresponding timestamp, and vice versa, a timestamp can be converted to the corresponding specific moment. In computer systems, timestamps are often used to record the exact time when an event occurs, while moments are used to convert these timestamps into a more understandable date and time format.

[0082] It should be noted that many programming languages ​​provide functions for converting moments to timestamps, and functions for converting timestamps back to moments, so as to facilitate processing and displaying time data.

[0083] Furthermore, the bidirectional link delay of the first link can be obtained by subtracting the first packet sending timestamp from the calculated receiving timestamp. And, according to the bidirectional link delay of the first link and the last delay jitter between the initiator and the receiver, the current delay jitter is determined, so that the calculated bidirectional link delay of the first link and the current delay jitter are stored as the delay information of the first link in the LLDP neighbor information table of the initiator.

[0084] The method provided in this embodiment first converts the receiving time into a receiving timestamp, then subtracts the first packet sending timestamp from the receiving timestamp to obtain the link bidirectional delay of the first link, and then determines the current delay jitter based on the link bidirectional delay of the first link and the previous delay jitter between the initiator and the receiver, thereby realizing link delay detection based on the link layer discovery protocol, and further solving the problem that the network service cannot switch to a suitable link when the link delay changes.

[0085] According to a link delay detection method provided by the present invention, the current delay jitter is determined according to the link bidirectional delay of the first link and the last delay jitter between the initiator and the receiver, including:

[0086] Subtract the previous delay jitter from the link bidirectional delay of the first link to obtain a subtraction result;

[0087] Multiply the subtraction result by a preset coefficient to obtain a multiplication result;

[0088] The multiplication result is added to the previous delay jitter to obtain the current delay jitter.

[0089] Specifically, in some embodiments, the implementation process of determining the current delay jitter according to the link bidirectional delay of the first link and the last delay jitter between the initiator and the receiver specifically includes:

[0090] First, the link bidirectional delay of the first link is subtracted from the previous delay jitter to obtain a subtraction result. It can be understood that the subtraction result may be a positive value or a negative value; further, the subtraction result is multiplied by a preset coefficient to obtain a multiplication result, and then, the multiplication result is added to the previous delay jitter to obtain the current delay jitter.

[0091] For example, the process of calculating the current delay jitter can be calculated using the following formula (1):

[0092] w = y+(1 / 16) ×(x- y) (1)

[0093] Among them, w represents the current delay jitter of the first link between the initiator and the receiver, x represents the current delay between the initiator and the receiver, that is, the bidirectional delay of the first link, and y represents the previous delay jitter of the first link between the initiator and the receiver.

[0094] The method provided in this embodiment first subtracts the previous delay jitter from the link bidirectional delay of the first link to obtain a subtraction result, then multiplies the subtraction result by a preset coefficient to obtain a multiplication result, and then adds the multiplication result to the previous delay jitter to obtain the current delay jitter, thereby realizing link delay detection based on the link layer discovery protocol.

[0095] According to a link delay detection method provided by the present invention, after determining the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver, the method further includes:

[0096] Configure link aggregation according to the bidirectional link delay and current delay jitter of the first link.

[0097] Specifically, in some embodiments, the method further includes:

[0098] Based on the determined bidirectional link delay of the first link and the current delay jitter, link aggregation is configured. Operations for configuring link aggregation include performing link aggregation and releasing link aggregation. It can be understood that different services have different requirements for the transmission rate of the channel. After knowing the delay of the first link, according to the service requirements and the link delay of the first link, a link with a delay close to the first link can be selected to configure MPTCP link aggregation. MPTCP link aggregation can be manually configured or automatically configured according to the delay for special services. Since the delay is not necessarily stable, delay jitter can also be used as a judgment condition for link aggregation. Among them, link aggregation is to bundle multiple physical links together and use them as a single logical channel to increase throughput and provide redundancy, thereby improving the utilization and stability of the logical channel.

[0099] Exemplarily, it is applied to the Multipath Transmission Control Protocol (MultiPathTCP, MPTCP) to influence link aggregation and thus improve channel utilization and stability. Specifically, for example, based on the determined link bidirectional delay and current delay jitter of the first link, it is determined whether to perform link aggregation on the first link and other links. Then, when it is determined that link aggregation needs to be performed on the first link and other links, a link aggregation protocol, such as MPTCP (it can also be other link aggregation protocols, such as the Link Aggregation Control Protocol LACP or static aggregation) is configured on the network device.

[0100] Correspondingly, whether to disassemble the link aggregation between the first link and other links can be determined based on the determined bidirectional link delay and current delay jitter of the first link. The operation of disassembling the link aggregation involves shutting down a specific physical link or modifying the aggregation configuration, which is not limited in this embodiment and depends on the specific implementation.

[0101] The method provided in this embodiment configures link aggregation according to the bidirectional link delay and current delay jitter of the first link, thereby improving the utilization and stability of the channel.

[0102] According to a link delay detection method provided by the present invention, link aggregation is configured according to the link bidirectional delay and current delay jitter of the first link, including:

[0103] Determining, according to the aggregation identifier of the first link, whether the first link has been aggregated;

[0104] In the case where the first link is not aggregated, determining whether the first link and the second link meet a preset aggregation judgment condition according to the bidirectional link delay and current delay jitter of the first link; the first link is a link between a first port of the initiating end and a first port of the receiving end, and the second link is a link between a second port of the initiating end and a second port of the receiving end;

[0105] When a preset aggregation judgment condition is met between the first link and the second link, link aggregation is performed on the first link and the second link;

[0106] In the case where the first link is aggregated, determining whether the first link meets a preset de-aggregation condition;

[0107] When the first link meets a preset de-aggregation condition, the link aggregation of the first link is canceled.

[0108] Specifically, in some embodiments, the implementation process of configuring link aggregation according to the delay information of the first link (link bidirectional delay and current delay jitter) specifically includes the following steps:

[0109] First, according to the aggregation identifier of the first link, it is determined whether the first link has been aggregated. It is understandable that, on a link configured with MPTCP link aggregation, an aggregation identifier can be added to the link information of the link, and thus, it can be determined whether the first link has been aggregated according to the aggregation identifier.

[0110] Scenario 1: The first link is not aggregated. The corresponding link aggregation process is as follows:

[0111] First, when the first link is not aggregated, determine whether the first link and the second link meet the preset aggregation judgment condition based on the link bidirectional delay and current delay jitter of the first link, the first link is the link between the first port of the initiator and the first port of the receiver, and the second link is the link between the second port of the initiator and the second port of the receiver, wherein, for example, the initiator is switching device 1, the receiver is switching device 2, the first port of the initiator is a link port for transmitting text, and the second port of the initiator is a link port for transmitting music, and the preset aggregation judgment condition can be the judgment condition corresponding to the link bidirectional delay of the first link, or the judgment condition corresponding to the current delay jitter of the first link, which can be set as needed. In this step, the link bidirectional delay and current delay jitter of the first link can be matched with the corresponding preset aggregation judgment condition to determine whether the aggregation judgment condition is met.

[0112] Then, when it is determined that the first link and the second link meet the preset aggregation judgment condition, link aggregation is performed on the first link and the second link, that is, link aggregation is configured, for example, a link aggregation protocol is configured on the network device, and the link aggregation protocol is such as MPTCP (it can also be other link aggregation protocols, such as link aggregation control protocol LACP or static aggregation). MPTCP link aggregation can be manually configured or automatically configured according to the latency situation for special services. This embodiment does not specifically limit the configuration method.

[0113] Scenario 2: The first link is aggregated. The corresponding link aggregation removal process is as follows:

[0114] First, in the case that the first link is aggregated, it is determined whether the first link meets a preset de-aggregation condition, wherein the preset de-aggregation condition is set opposite to the aggregation condition, which will not be described in detail herein.

[0115] Then, when the first link meets the preset de-aggregation condition, the first link is de-aggregated. The de-aggregation operation involves shutting down a specific physical link or modifying the aggregation configuration, which is not limited in this embodiment and depends on the specific implementation.

[0116] For example, Figure 3 FIG. 2 is a flow chart of the link delay detection method provided by the present invention. Figure 3 As shown, the method includes:

[0117] Step 301: Both ends of the link send a link layer discovery protocol message;

[0118] Step 302: Read neighbor information;

[0119] Step 303: The initiator sends a detection message to calculate the delay;

[0120] Step 304: The initiator determines whether the link has been aggregated according to the aggregation identifier;

[0121] If the execution result of step 304 is no, execute step 305;

[0122] If the result of step 304 is yes, execute step 307;

[0123] Step 305: determine whether the aggregation condition is met;

[0124] If the execution result of step 305 is no, execute step 303;

[0125] If the result of step 305 is yes, execute step 306;

[0126] Step 306: Configure MPTCP link aggregation;

[0127] Step 307, determining whether the aggregation termination condition is met;

[0128] If the execution result of step 307 is no, execute step 303;

[0129] If the result of step 307 is yes, execute step 308;

[0130] Step 308: Release the MPTCP link aggregation.

[0131] The method provided in this embodiment first determines whether the first link has been aggregated according to the aggregation identifier of the first link. If the first link is not aggregated, it determines whether the first link and the second link meet the preset aggregation judgment condition according to the link bidirectional delay and current delay jitter of the first link; the first link is the link between the first port of the initiator and the first port of the receiver, and the second link is the link between the second port of the initiator and the second port of the receiver. If the first link and the second link meet the preset aggregation judgment condition, the first link and the second link are aggregated. Correspondingly, if the first link is aggregated, it can be determined whether the first link meets the preset de-aggregation condition. Then, if the first link meets the preset de-aggregation condition, the first link is de-aggregated and the mark is removed at the same time. This embodiment can maximize the utilization and stability of the channel and has strong applicability.

[0132] According to a link delay detection method provided by the present invention, based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end, including:

[0133] Modify the version number and message length of the detection message to obtain a modified detection message;

[0134] Based on the interface address corresponding to the receiving end, the modified detection message is sent to the receiving end.

[0135] Specifically, in some embodiments, the process in step 102 where the initiator sends a detection message to the receiver based on the interface address corresponding to the receiver can be implemented in the following manner:

[0136] First, the version number and message length of the detection message are modified to obtain a modified detection message, wherein it can be understood that the detection message is an extended message of LLDP (Link Layer Discovery Protocol), and the detection message carries the first packet sending timestamp. Therefore, in order to better distinguish the detection message from the protocol message, and to perform targeted parsing of the detection message, the version number of the detection message can be modified in this embodiment. For example, a sub-version number is added to the version number of the detection message to identify the detection message. For another example, in order to distinguish the detection message, the message length of the detection message can also be modified to make it more suitable for the form of the extended message and avoid data parsing errors.

[0137] Furthermore, after obtaining the modified detection message, the modified detection message can be further sent to the receiving end based on the interface address corresponding to the receiving end. The modified detection message is used for the receiving end to parse and reply accordingly (for example, carrying its own packet sending timestamp, that is, the second packet sending timestamp), thereby realizing link delay detection of the first link between the initiator and the receiving end.

[0138] The method provided in this embodiment modifies the version number and message length of the detection message, and then performs link delay detection based on the modified detection message. The receiving end can better distinguish between the detection message and the protocol message, and the response efficiency and accuracy are high, thereby realizing link delay detection based on the link layer discovery protocol.

[0139] According to a link delay detection method provided by the present invention, based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end, including:

[0140] Get the period for sending detection messages;

[0141] According to the detection message period and the interface address corresponding to the receiving end, a detection message is sent to the receiving end.

[0142] Specifically, in some embodiments, the process of the initiator sending the detection message in step 102 can be implemented in the following manner:

[0143] First, the period of sending detection messages can be set according to actual needs. The period of sending detection messages involves how to regularly exchange information between network devices to ensure the stability and reliability of the connection. The length of this period depends on many factors, including network type, protocol requirements, network conditions, and device performance. The period of sending detection messages is, for example, 1 second, that is, the initiator sends a detection message once every second. For another example, the period of sending detection messages is, for example, 0.5 seconds, that is, the initiator sends a detection message every 0.5 seconds.

[0144] Furthermore, after obtaining the period for sending the detection message, the detection message can be sent to the interface address corresponding to the receiving end according to the period of the detection message. For example, the initiating end sends a detection message to the receiving end once every second. The detection message is used for the receiving end to reply after receiving it, thereby performing link delay detection of the first link between the initiating end and the receiving end.

[0145] In the method provided in this embodiment, the period for sending detection messages can be preset, and detection messages are sent to the receiving end according to the period of the detection messages, so as to realize link delay detection based on the link layer discovery protocol, which is convenient for more flexible and convenient application of link bidirectional delay detection in various network environments.

[0146] According to a link delay detection method provided by the present invention, the synchronization message is used for the receiving end to store the link bidirectional delay and current delay jitter of the first link in the synchronization message into the neighbor information table of the receiving end.

[0147] Specifically, in some embodiments, the method further includes storing the measured link delay information, and an example of the storing process is as follows:

[0148] The initiator can first store the link bidirectional delay and current delay jitter of the first link in the neighbor information table of the initiator. In the field of communication, the neighbor information list (NIL) is used to store relevant information about other cells around a cell (base station), which is essential for mobile devices to switch (handover) between different cells. In other words, in the field of link detection, the neighbor information table stores information corresponding to the device that establishes a neighbor relationship with the initiator, as well as link information between neighbors, etc.

[0149] Furthermore, the initiator can encapsulate the link bidirectional delay and current delay jitter of the first link in a synchronization message, and send the synchronization message to the receiving end. It can be understood that the synchronization message is used for the receiving end to store the link bidirectional delay and current delay jitter of the first link in the synchronization message into the neighbor information table of the receiving end, that is, the receiving end can also store relevant information of the neighbor node and the link information (such as link delay and delay jitter) between the neighbor node (such as the initiator).

[0150] In the method provided in this embodiment, the initiator encapsulates the link bidirectional delay and current delay jitter of the first link in a synchronization message, and sends the synchronization message to the receiving end. The synchronization message is used for the receiving end to store the link bidirectional delay and current delay jitter of the first link in the synchronization message into the neighbor information table of the receiving end, thereby realizing the storage of neighbor information in the neighbor information table.

[0151] Figure 4 This is a flow chart of the link delay detection method provided by the present invention. The method is applied to the receiving end in the link delay detection system. The link delay detection system includes: an initiator and a receiving end. The method includes:

[0152] Step 401, in response to receiving a detection message, sending a reply message to the initiator; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving the protocol message of the link layer discovery protocol, the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the receiving time of the reply message and the first packet sending timestamp;

[0153] Specifically, the executor of this embodiment is a receiving end in a link delay detection system, which is used to implement link delay detection based on a link layer discovery protocol.

[0154] like Figure 2 As shown, the link delay detection system includes service device 1 (i.e., the initiator) and service device 2 (i.e., the receiver), wherein there are multiple links between service device 1 (i.e., the initiator) and service device 2 (i.e., the receiver), such as links corresponding to text, links corresponding to sound, links corresponding to pictures, and links corresponding to videos. Service device 1 (i.e., the initiator) and service device 2 (i.e., the receiver) interact with each other through switching device 1 and switching device 2.

[0155] The receiving end sends a reply message to the initiating end in response to receiving the detection message. The detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiating end parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving the protocol message of the link layer discovery protocol. The detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp. The detection message is different from an ordinary protocol message and is a protocol extension message. Specifically, the detection message includes a first packet sending timestamp (the packet sending timestamp corresponding to the detection message sent by the initiating end), that is, the initiating end sends an LLDP extension message carrying the first packet sending timestamp to the receiving end.

[0156] After the reply message is sent to the initiator, the reply message is used by the initiator to determine the bidirectional link delay and current delay jitter of the first link between the initiator and the receiver according to the reception time of the reply message and the first packet sending timestamp. The delay refers to the time required for the data packet to travel from the sender to the receiver, and the delay jitter refers to the inconsistency of the arrival time of the data packet. Even if the average delay is small, the delay jitter may be large.

[0157] Step 402: In response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay and current delay jitter of the first link of the synchronization message are stored in the neighbor information table of the receiving end; the synchronization message is obtained by encapsulating the link bidirectional delay and current delay jitter of the first link by the initiator.

[0158] Specifically, after the initiator calculates the delay information of the first link (the bidirectional link delay and the current delay jitter of the first link), the initiator may synchronize the delay information (the bidirectional link delay and the current delay jitter of the first link) to the receiving end. Specifically, for example, the delay information (the bidirectional link delay and the current delay jitter of the first link) may be encapsulated in a synchronization message and sent to the receiving end in the form of a synchronization message.

[0159] After receiving the synchronization message, the receiving end parses the synchronization message and stores the link bidirectional delay and current delay jitter of the first link of the synchronization message in the neighbor information table of the receiving end.

[0160] The method provided in this embodiment is applied to the receiving end in the link delay detection system. The link delay detection system includes an initiator and a receiving end. First, in response to receiving a detection message, a reply message is sent to the initiator, wherein the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message in response to receiving the protocol message of the link layer discovery protocol and obtains the interface address corresponding to the receiving end. The detection message is a protocol extension message including a first packet sending timestamp. The reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the receiving time and the first packet sending timestamp of the reply message. Further, in response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay and current delay jitter of the first link of the synchronization message are stored in the neighbor information table of the receiving end, wherein the synchronization message is obtained after the initiator encapsulates the link bidirectional delay and current delay jitter of the first link.

[0161] The present invention receives a detection message sent by an initiator and sends a reply message to it. The initiator can determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp, thereby realizing link delay detection based on the link layer discovery protocol.

[0162] The link delay detection device provided by the present invention is described below. The link delay detection device described below and the link delay detection method described above can be referred to each other.

[0163] Figure 5 It is one of the structural schematic diagrams of the link delay detection device provided by the present invention. The device is applied to the initiator in the link delay detection system. The link delay detection system includes: the initiator and the receiving end. The link delay detection device 500 includes the following modules:

[0164] A parsing module 510, configured to, in response to receiving a protocol message of a link layer discovery protocol, parse the protocol message to obtain an interface address corresponding to the receiving end;

[0165] The link delay detection module 520 sends a detection message to the receiving end based on the interface address corresponding to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; according to the receiving time of the received reply message and the first packet sending timestamp, the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end are determined; the reply message is sent by the receiving end to the initiating end after receiving the detection message.

[0166] The synchronization module 530 is used to encapsulate the link bidirectional delay of the first link and the current delay jitter in a synchronization message, and send the synchronization message to the receiving end.

[0167] The device provided in this embodiment is applied to the initiator in a link delay detection system, and the link delay detection system includes: an initiator and a receiving end, and the parsing module 510 parses the protocol message in response to receiving the protocol message of the link layer discovery protocol to obtain the interface address corresponding to the receiving end; then, the link delay detection module 520 sends a detection message to the receiving end based on the interface address corresponding to the receiving end, wherein the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; further, according to the receiving time and the first packet sending timestamp of the received reply message, the link bidirectional delay and the current delay jitter of the first link between the initiator and the receiving end are determined, wherein the reply message is sent by the receiving end to the initiator after receiving the detection message; the synchronization module 530 is used to encapsulate the link bidirectional delay and the current delay jitter of the first link in a synchronization message, and send the synchronization message to the receiving end.

[0168] The present invention obtains the interface address corresponding to the receiving end by parsing the protocol message of the link layer discovery protocol, and sends a detection message to the receiving end based on the interface address corresponding to the receiving end. Since the detection message is a protocol extension message including a first packet sending timestamp, and the reply message is sent by the receiving end to the initiating end after receiving the detection message, the initiating end can determine the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end according to the receiving time of the reply message and the first packet sending timestamp, thereby realizing link delay detection based on the link layer discovery protocol.

[0169] According to a link delay detection device 500 provided by the present invention, the link delay detection module 520 is specifically used for:

[0170] Converting the receiving time into a receiving timestamp;

[0171] Subtract the first packet sending timestamp from the receiving timestamp to obtain a bidirectional link delay of the first link;

[0172] The current delay jitter is determined according to the bidirectional link delay of the first link and the last delay jitter between the initiator and the receiver.

[0173] According to a link delay detection device 500 provided by the present invention, the link delay detection module 520 is further used for:

[0174] Subtract the previous delay jitter from the link bidirectional delay of the first link to obtain a subtraction result;

[0175] Multiplying the subtraction result by a preset coefficient to obtain a multiplication result;

[0176] The multiplication result is added to the previous delay jitter to obtain the current delay jitter.

[0177] According to a link delay detection device 500 provided by the present invention, the device also includes a link aggregation configuration module;

[0178] The link aggregation configuration module is used to:

[0179] Link aggregation is configured according to the bidirectional link delay of the first link and the current delay jitter.

[0180] According to a link delay detection device 500 provided by the present invention, the link aggregation configuration module is specifically used to:

[0181] Determining, according to the aggregation identifier of the first link, whether the first link has been aggregated;

[0182] In the case where the first link is not aggregated, determining whether the first link and the second link meet a preset aggregation judgment condition according to the bidirectional link delay of the first link and the current delay jitter; the first link is a link between the first port of the initiating end and the first port of the receiving end, and the second link is a link between the second port of the initiating end and the second port of the receiving end;

[0183] When the preset aggregation judgment condition is met between the first link and the second link, link aggregation is performed on the first link and the second link;

[0184] In the case where the first link is aggregated, determining whether the first link meets a preset de-aggregation condition;

[0185] When the first link meets the preset de-aggregation condition, the link aggregation of the first link is canceled.

[0186] According to a link delay detection device 500 provided by the present invention, the link delay detection module 520 is further used for:

[0187] Modify the version number and message length of the detection message to obtain a modified detection message;

[0188] Based on the interface address corresponding to the receiving end, the modified detection message is sent to the receiving end.

[0189] According to a link delay detection device 500 provided by the present invention, the link delay detection module 520 is further used for:

[0190] Obtaining a period for sending the detection message;

[0191] The detection message is sent to the receiving end according to the period of the detection message and the interface address corresponding to the receiving end.

[0192] According to a link delay detection device 500 provided by the present invention, the device further includes: a synchronization module;

[0193] The synchronization message is used for the receiving end to store the link bidirectional delay of the first link and the current delay jitter in the synchronization message into the neighbor information table of the receiving end.

[0194] Figure 6 2 is a schematic diagram of the structure of the link delay detection device provided by the present invention. The device is applied to the receiving end of the link delay detection system. The link delay detection system includes: an initiating end and the receiving end. The link delay detection device 600 includes:

[0195] A reply module 610 is used to send a reply message to the initiator in response to receiving a detection message; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving the protocol message of the link layer discovery protocol, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp;

[0196] The storage module 620 is used to parse the synchronization message in response to receiving the synchronization message, and store the link bidirectional delay of the first link and the current delay jitter of the synchronization message into the neighbor information table of the receiving end; the synchronization message is obtained after the initiating end encapsulates the link bidirectional delay and the current delay jitter of the first link.

[0197] The device provided in this embodiment is applied to the receiving end in the link delay detection system, and the link delay detection system includes an initiator and a receiving end. First, the reply module 610 responds to receiving the detection message and sends a reply message to the initiator, wherein the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving the protocol message of the link layer discovery protocol. The detection message is a protocol extension message including a first packet sending timestamp. The reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the receiving time and the first packet sending timestamp of the received reply message. Further, the storage module 620 responds to receiving the synchronization message, parses the synchronization message, and stores the link bidirectional delay and current delay jitter of the first link of the synchronization message in the neighbor information table of the receiving end, wherein the synchronization message is obtained after the initiator encapsulates the link bidirectional delay and current delay jitter of the first link.

[0198] The present invention receives a detection message sent by an initiator and sends a reply message to it. The initiator can determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp, thereby realizing link delay detection based on the link layer discovery protocol.

[0199] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the link delay detection method, which is applied to the initiator in the link delay detection system, the link delay detection system includes: the initiator and the receiving end, and the method includes:

[0200] In response to receiving a protocol message of a link layer discovery protocol, parsing the protocol message to obtain an interface address corresponding to the receiving end;

[0201] Based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp;

[0202] According to the reception time of the received reply message and the first packet sending timestamp, the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver are determined; the reply message is sent by the receiver to the initiator after receiving the detection message.

[0203] Alternatively, a link delay detection method is executed and applied to a receiving end in a link delay detection system, the link delay detection system comprising: an initiating end and the receiving end, the method comprising:

[0204] In response to receiving a detection message, a reply message is sent to the initiator; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving a protocol message of the link layer discovery protocol, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp;

[0205] In response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay of the first link and the current delay jitter of the synchronization message are stored in the neighbor information table of the receiving end; the synchronization message is obtained after the initiating end encapsulates the link bidirectional delay of the first link and the current delay jitter.

[0206] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0207] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the link delay detection method provided by the above methods, applied to the initiator in the link delay detection system, the link delay detection system includes: the initiator and the receiving end, the method includes:

[0208] In response to receiving a protocol message of a link layer discovery protocol, parsing the protocol message to obtain an interface address corresponding to the receiving end;

[0209] Based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp;

[0210] According to the reception time of the received reply message and the first packet sending timestamp, the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver are determined; the reply message is sent by the receiver to the initiator after receiving the detection message.

[0211] Alternatively, a link delay detection method is executed and applied to a receiving end in a link delay detection system, the link delay detection system comprising: an initiating end and the receiving end, the method comprising:

[0212] In response to receiving a detection message, a reply message is sent to the initiator; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving a protocol message of the link layer discovery protocol, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp;

[0213] In response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay of the first link and the current delay jitter of the synchronization message are stored in the neighbor information table of the receiving end; the synchronization message is obtained after the initiating end encapsulates the link bidirectional delay of the first link and the current delay jitter.

[0214] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the link delay detection method provided by the above methods is implemented, and the computer program is applied to an initiator in a link delay detection system. The link delay detection system includes: the initiator and the receiving end. The method includes:

[0215] In response to receiving a protocol message of a link layer discovery protocol, parsing the protocol message to obtain an interface address corresponding to the receiving end;

[0216] Based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp;

[0217] According to the reception time of the received reply message and the first packet sending timestamp, the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver are determined; the reply message is sent by the receiver to the initiator after receiving the detection message.

[0218] Alternatively, a link delay detection method is executed and applied to a receiving end in a link delay detection system, the link delay detection system comprising: an initiating end and the receiving end, the method comprising:

[0219] In response to receiving a detection message, a reply message is sent to the initiator; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message to obtain the interface address corresponding to the receiving end in response to receiving a protocol message of the link layer discovery protocol, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the reception time of the reply message and the first packet sending timestamp;

[0220] In response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay of the first link and the current delay jitter of the synchronization message are stored in the neighbor information table of the receiving end; the synchronization message is obtained after the initiating end encapsulates the link bidirectional delay of the first link and the current delay jitter.

[0221] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0222] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A link delay detection method, characterized in that: The initiator is applied to a link delay detection system, the link delay detection system comprises: the initiator and the receiving end, and the method comprises: In response to receiving a protocol message of a link layer discovery protocol, parsing the protocol message to obtain an interface address corresponding to the receiving end; Based on the interface address corresponding to the receiving end, a detection message is sent to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; Determine the bidirectional link delay and current delay jitter of the first link between the initiator and the receiver according to the reception time of the received reply message and the first packet sending timestamp; the reply message is sent by the receiver to the initiator after receiving the detection message; Encapsulating the link bidirectional delay of the first link and the current delay jitter in a synchronization message, and sending the synchronization message to the receiving end; The determining, according to the receiving time of the received reply message and the first packet sending timestamp, a link bidirectional delay and a current delay jitter of the first link between the initiator and the receiver, comprises: Converting the receiving time into a receiving timestamp; Subtract the first packet sending timestamp from the receiving timestamp to obtain a bidirectional link delay of the first link; Determine the current delay jitter according to the link bidirectional delay of the first link and the last delay jitter between the initiator and the receiver; The determining the current delay jitter according to the link bidirectional delay of the first link and the last delay jitter between the initiator and the receiver includes: Subtract the previous delay jitter from the link bidirectional delay of the first link to obtain a subtraction result; Multiplying the subtraction result by a preset coefficient to obtain a multiplication result; The multiplication result is added to the previous delay jitter to obtain the current delay jitter.

2. The link delay detection method according to claim 1, characterized in that: After determining the link bidirectional delay and current delay jitter of the first link between the initiator and the receiver, the method further includes: Link aggregation is configured according to the bidirectional link delay of the first link and the current delay jitter.

3. The link delay detection method according to claim 2, characterized in that: The configuring link aggregation according to the bidirectional link delay of the first link and the current delay jitter includes: Determining, according to the aggregation identifier of the first link, whether the first link has been aggregated; In the case where the first link is not aggregated, determining whether the first link and the second link meet a preset aggregation judgment condition according to the bidirectional link delay of the first link and the current delay jitter; the first link is a link between the first port of the initiating end and the first port of the receiving end, and the second link is a link between the second port of the initiating end and the second port of the receiving end; When the preset aggregation judgment condition is met between the first link and the second link, link aggregation is performed on the first link and the second link; In the case where the first link is aggregated, determining whether the first link meets a preset de-aggregation condition; When the first link meets the preset de-aggregation condition, the link aggregation of the first link is canceled.

4. The link delay detection method according to claim 1, characterized in that: The sending a detection message to the receiving end based on the interface address corresponding to the receiving end includes: Modify the version number and message length of the detection message to obtain a modified detection message; Based on the interface address corresponding to the receiving end, the modified detection message is sent to the receiving end.

5. The link delay detection method according to claim 1, characterized in that: The sending a detection message to the receiving end based on the interface address corresponding to the receiving end includes: Obtaining a period for sending the detection message; The detection message is sent to the receiving end according to the period of the detection message and the interface address corresponding to the receiving end.

6. The link delay detection method according to claim 1, characterized in that: The synchronization message is used for the receiving end to store the link bidirectional delay of the first link and the current delay jitter in the synchronization message into the neighbor information table of the receiving end.

7. A link delay detection method, characterized in that: The receiving end is applied to a link delay detection system, the link delay detection system comprises: an initiating end and the receiving end, and the method comprises: In response to receiving the detection message, a reply message is sent to the initiator; the detection message is sent to the receiving end based on the interface address corresponding to the receiving end after the initiator parses the protocol message in response to receiving the protocol message of the link layer discovery protocol, and the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; the reply message is used for the initiator to determine the link bidirectional delay and current delay jitter of the first link between the initiator and the receiving end according to the receiving time of the reply message and the first packet sending timestamp; the initiator determines the link bidirectional delay of the first link between the initiator and the receiving end according to the receiving time of the reply message and the first packet sending timestamp. The method comprises: the initiator converts the receiving time into a receiving timestamp; the initiator subtracts the first packet sending timestamp from the receiving timestamp to obtain the bidirectional link delay of the first link; the initiator determines the current delay jitter according to the bidirectional link delay of the first link and the last delay jitter between the initiator and the receiving end; the method comprises: subtracting the last delay jitter from the bidirectional link delay of the first link to obtain a subtraction result; multiplying the subtraction result by a preset coefficient to obtain a multiplication result; adding the multiplication result to the last delay jitter to obtain the current delay jitter; In response to receiving a synchronization message, the synchronization message is parsed, and the link bidirectional delay of the first link and the current delay jitter of the synchronization message are stored in the neighbor information table of the receiving end; the synchronization message is obtained after the initiating end encapsulates the link bidirectional delay of the first link and the current delay jitter.

8. A link delay detection device, characterized in that: The initiator is applied to a link delay detection system, the link delay detection system comprises: the initiator and the receiving end, the device comprises: A parsing module, configured to, in response to receiving a protocol message of a link layer discovery protocol, parse the protocol message to obtain an interface address corresponding to the receiving end; A link delay detection module, for sending a detection message to the receiving end based on the interface address corresponding to the receiving end; the detection message is a protocol extension message, and the protocol extension message includes a first packet sending timestamp; according to the receiving time of the received reply message and the first packet sending timestamp, the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end are determined; the reply message is sent by the receiving end to the initiating end after receiving the detection message; the method for determining the link bidirectional delay and current delay jitter of the first link between the initiating end and the receiving end according to the receiving time of the received reply message and the first packet sending timestamp includes: Convert to a receiving timestamp; subtract the first packet sending timestamp from the receiving timestamp to obtain the bidirectional link delay of the first link; determine the current delay jitter according to the bidirectional link delay of the first link and the last delay jitter between the initiator and the receiving end; the method of determining the current delay jitter according to the bidirectional link delay of the first link and the last delay jitter between the initiator and the receiving end includes: subtracting the last delay jitter from the bidirectional link delay of the first link to obtain a subtraction result; multiplying the subtraction result by a preset coefficient to obtain a multiplication result; adding the multiplication result to the last delay jitter to obtain the current delay jitter; A synchronization module is used to encapsulate the link bidirectional delay of the first link and the current delay jitter in a synchronization message, and send the synchronization message to the receiving end.