Link detection method and device, electronic equipment, storage medium and program product

By sending service packets carrying link probe information to network devices in high-speed service flow conditions and constructing dedicated link probe packets in non-high-speed conditions, the bandwidth and CPU load issues in existing technologies are resolved, enabling support for latency-sensitive and extremely low packet loss services.

CN118802671BActive Publication Date: 2026-01-23CHINA MOBILE GROUP DESIGN INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410678485.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2026-01-23
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Existing link detection technologies, while avoiding excessive bandwidth and CPU load, can negatively impact latency-sensitive and low-packet-loss-rate services, thus failing to meet actual usage requirements.

Method used

When the gateway device determines that the current service state is a high-speed service flow state, it sends a service message carrying link probe information to the network device and adds an extension header to the message header; when the service state is not a high-speed service flow state, it constructs a special link probe message to probe.

Benefits of technology

Without interfering with normal business transmission, the number of link probe messages sent is reduced, which solves the bandwidth and CPU load problems and meets the needs of latency-sensitive and extremely low packet loss services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802671B_ABST
    Figure CN118802671B_ABST
Patent Text Reader

Abstract

The present disclosure provides a link detection method, device, electronic equipment, storage medium and program product. The method is applied to a gateway device, and the method comprises: determining a current service state; when the current service state is a high-speed service flow state, sending a first service packet to a network device, and the packet header of the first service packet carries link detection information. In summary, when the gateway device determines that the current service state is a high-speed service flow state, the gateway device sends a first service packet to the network device. The first service packet is specific, and the packet header of the first service packet carries link detection information. In this way, during the link detection process in the high-speed service flow state, the sending of link detection packets can be reduced without interfering with normal service transmission. The problem of occupying a large amount of bandwidth and CPU load can be solved, and the detection time interval does not need to be increased, the demand for latency-sensitive and extremely low-packet-loss services can be met, and the method is suitable for various application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a link detection method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] Currently, most existing link detection methods involve gateway devices sending Bidirectional Forwarding Detection (BFD) messages to network devices. If the gateway device receives a response from the network device to the BFD message, it determines that the link is normal; if the gateway device does not receive a response from the network device to the BFD message, it considers the link to be faulty.

[0003] However, in existing link detection technologies, in order to avoid consuming a lot of bandwidth and CPU load during link detection, the link detection interval is increased. This will have an adverse effect on latency-sensitive and extremely low packet loss rate services, and cannot meet the business needs in actual use. Summary of the Invention

[0004] This disclosure provides a link detection method, apparatus, electronic device, storage medium, and program product to address, to some extent, the adverse effects on latency-sensitive and extremely low packet loss rate services, which fail to meet the business needs in actual use.

[0005] In a first aspect, this disclosure provides a link detection method applied to a gateway device. The method includes: determining the current service state; when the current service state is a high-speed service flow state, sending a first service message to the network device, wherein the header of the first service message carries link detection information.

[0006] Furthermore, according to the method of the first aspect of this disclosure, the method further includes: when the current service state is a non-high-speed service flow state, constructing a link probe message and sending the link probe message to the network device.

[0007] Furthermore, according to the method of the first aspect of this disclosure, sending a first service message to a network device includes: adding an extension header to the header of a second service message, the extension header carrying link probe information.

[0008] Furthermore, according to the method of the first aspect of this disclosure, the first service message includes: an Ethernet header, an Internet Protocol (IP) header, a User Datagram Protocol (UDP) header, and a Bidirectional Forwarding Detection (BFD) header; wherein the IP header includes a selection header; the selection header includes: general fields, probe sequence number information, and timestamp information.

[0009] Furthermore, according to the method of the first aspect of this disclosure, when the second service message is an IPv4 protocol message, the selection header further includes: an extension header type; when the second service message is an IPv6 protocol message, the selection header further includes: a next extension header type.

[0010] Furthermore, according to the method of the first aspect of this disclosure, the second service message is the service message corresponding to the next detection time indicated by the detection interval.

[0011] Furthermore, according to the method of the first aspect of this disclosure, the link probe message includes: an Ethernet header, an IP header, a UDP header, and a link probe header; wherein the link probe header includes: a general field, probe sequence number information, and timestamp information.

[0012] Furthermore, according to the method of the first aspect of this disclosure, the method further includes: receiving a response message from a network device; and determining the link status between the gateway device and the network device based on the response message.

[0013] Secondly, this disclosure provides a link detection method applied to a network device. The method includes: receiving a first service message from a gateway device; wherein the first service message is sent by the gateway device when it determines that the current service state is a high-speed service flow state, and the header of the first service message carries link detection information; and sending a response message to the gateway device.

[0014] Furthermore, according to the second aspect of the method of this disclosure, the method further includes: receiving a link probe message from a gateway device; wherein the link probe message is sent by the gateway device when it determines that the current service state is a non-high-speed service flow state; and sending a response message to the gateway device.

[0015] Furthermore, according to the method of the second aspect of this disclosure, sending a response message to a gateway device includes: performing a security assessment on a target message; wherein the target message includes: a first service message or a link probe message; when the target message passes the security assessment, forwarding the target message as a response message to the gateway device; when the target message fails the security assessment, constructing a response message and sending the response message to the gateway device.

[0016] Thirdly, this disclosure provides a link detection device, which is installed in a gateway device. The device includes: a determining unit for determining the current service state; and a sending unit for sending a first service message to the network device when the current service state is a high-speed service flow state, wherein the header of the first service message carries link detection information.

[0017] Fourthly, this disclosure provides a link detection device, which is installed in a network device. The device includes: a receiving unit for receiving a first service message from a gateway device; wherein the first service message is sent by the gateway device when the current service state is a high-speed service flow state, and the header of the first service message carries link detection information; and a sending unit for sending a response message to the gateway device.

[0018] Fifthly, this disclosure provides an electronic device, including: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions, causing the electronic device to perform the method as described in any embodiment of the first aspect.

[0019] In a sixth aspect, this disclosure provides a non-transitory computer-readable storage medium for storing computer-readable instructions that, when executed by a processor, cause the processor to perform the method as described in any embodiment.

[0020] In a seventh aspect, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in any embodiment.

[0021] This disclosure provides a link probing method, apparatus, electronic device, storage medium, and program product. The gateway device of this disclosure can obtain the current service status, and when it determines that the current service status is a high-speed service flow state, it sends a first service packet to the network device. The header of the first service packet carries link probing information. In summary, the technical solution provided by this disclosure allows the gateway device to send a first service packet to the network device when it determines that the current service status is a high-speed service flow state. This first service packet is specific, and its header carries link probing information. Thus, during link probing in a high-speed service flow state, the number of link probing packets sent can be reduced without interfering with normal service transmission. This solves the problem of consuming large amounts of bandwidth and CPU load, while not requiring increased probing time intervals, meeting the needs of latency-sensitive and extremely low packet loss services, and is suitable for various application scenarios.

[0022] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0023] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0024] Figure 1 This is a schematic diagram of an existing link detection system.

[0025] Figure 2 This disclosure provides a schematic diagram of the architecture of a link detection system.

[0026] Figure 3 An interaction diagram of a link detection method provided in an embodiment of this disclosure.

[0027] Figure 4 An interaction diagram illustrating another link detection method provided in an embodiment of this disclosure.

[0028] Figure 5 A flowchart of a link detection method provided in an embodiment of this disclosure.

[0029] Figure 6 This is a schematic diagram of a preferred IPv4 protocol with a newly added link extension header format provided in an embodiment of this disclosure.

[0030] Figure 7 This is a schematic diagram of the preferred IPv6 protocol with a newly added link extension header format provided in the embodiments of this disclosure.

[0031] Figure 8 The complete format of the link probe message provided in the embodiments of this disclosure.

[0032] Figure 9 A schematic diagram of a preferred complete link detection method provided in the embodiments of this disclosure.

[0033] Figure 10 This is a structural block diagram of a link detection device provided in an embodiment of the present disclosure.

[0034] Figure 11 This is a structural block diagram of a link detection device provided in an embodiment of the present disclosure.

[0035] Figure 12 A hardware block diagram of an electronic device provided in an embodiment of this disclosure;

[0036] Figure 13 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this disclosure. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.

[0038] Currently, most existing link probing methods involve gateway devices sending Bidirectional Forwarding Detection (BFD) packets to network devices. If the gateway device receives a response from the network device to the BFD packet, it determines that the link is normal; if the gateway device does not receive a response from the network device to the BFD packet, it considers the link to be faulty. For example, ... Figure 1 As shown, Figure 1 A schematic diagram of an existing link detection system:

[0039] Business gateways can be deployed within the security resource pool, and various types of security atomic capability devices can be deployed under these gateways. When link probing is required, BFD probing can be configured on the business gateway, allowing it to periodically send BFD link probing messages to each security atomic capability device. Each type of security atomic capability device determines whether to respond to the link probing messages. If the business gateway receives a response message, it considers the link to be normal. Conversely, if a security atomic capability device fails, the business gateway will not receive a response, thus assuming a link failure and ceasing traffic transmission to that device.

[0040] However, in existing link detection technologies, in order to avoid consuming a lot of bandwidth and CPU load during link detection, the link detection interval is increased. This will have an adverse effect on latency-sensitive and extremely low packet loss rate services, and cannot meet the business needs in actual use.

[0041] Therefore, this disclosure provides a method for link detection. Please refer to... Figure 2 , Figure 2 The following is an overview of application scenarios according to embodiments of this disclosure. Figure 2 This is a schematic diagram of the architecture of a link detection system provided in an embodiment of this disclosure. Figure 2 As shown, the link detection system includes at least: gateway devices and network devices.

[0042] Gateway devices, also known as gateways, service gateways, security gateways, etc., can act as bridges between different networks, responsible for conversion between networks with different protocols, data formats, or architectures.

[0043] Network devices can be any electronic device, functional module, or atomic capability that uses the network. For example, a network device can be such as... Figure 1 The illustrated scenario includes various security atomic capability devices. Network devices can perform at least one function, such as data transmission, assistance, monitoring, management, analysis, security, and backup. Network devices can be at least one type of network security device, such as hardware firewalls, software firewalls, Distributed Denial of Service (DDoS) attack mitigation devices, or Intrusion Prevention Systems (IPS). Network devices can be at least one type of traffic analysis device, such as network process monitoring or traffic analysis. Network devices can be at least one type of testing and measurement device, such as network performance testers or tensile testing machines. Network devices can be at least one type of application performance device, such as application performance monitoring or application analysis. There are no specific restrictions on the specific form of network devices; an exhaustive list is not provided.

[0044] This disclosure provides a link detection method. Please refer to... Figure 3 , Figure 3 This is an interaction diagram of a link detection method provided in an embodiment of this disclosure. For example... Figure 3 As shown, the method includes:

[0045] In step S301, the gateway device determines the current service status.

[0046] In this embodiment of the disclosure, the current service status can be an assessment or identification result of the service flow that the gateway device is currently processing or serving. The gateway device can determine the current service status by at least one method, such as detecting and analyzing network traffic, checking the characteristics of service flows, referring to user configuration, checking interface service bandwidth usage, and checking interface packet forwarding rate. The specific determination method is not limited herein.

[0047] In step S302, when the current service state is a high-speed service flow state, the gateway device sends a first service message to the network device. The header of the first service message carries link detection information.

[0048] In this embodiment of the disclosure, the service state may include a high-speed service flow state and a non-high-speed service flow state. A high-speed service flow state may be a service state with at least one of the following characteristics: high network bandwidth usage and high data transmission rate. A non-high-speed service flow state may be a service state with at least one of the following characteristics: low network bandwidth usage and slow data transmission rate.

[0049] Specifically, a high-speed service flow state can be a service state characterized by at least one of the following: high network bandwidth usage and high data transmission rate. High network bandwidth usage means that bandwidth resources are approaching or reaching the maximum processing capacity of the device. High data transmission rate means that a large amount of data needs to be uploaded or downloaded within a short period of time. A high-speed service flow state can be caused by at least one of the following: a large number of users simultaneously accessing a service, transmitting large amounts of data (such as video streaming, large file transfers), or engaging in real-time interaction (such as video conferencing, online games). For example, whether a high-speed service flow state is established can be determined based on at least one factor such as network bandwidth and data transmission rate; the specific method for determining a high-speed service flow state is not limited here.

[0050] Service messages are used to transmit service data. A service message can include a header and a payload. The header specifies the transmission rules for the service data, and the payload carries the service data. In this disclosure, the first service message can be a message that includes link probe information in the header of a normal service message. Thus, the first service message can not only transmit normal service messages but also serve as a link probe message to perform link probes.

[0051] Specifically, the gateway device can determine whether the current service state is a high-traffic state. This can be achieved through at least one method, such as comparing the service state with a preset threshold (e.g., network bandwidth threshold, data transmission rate threshold, etc.) or comparing the service state with preset conditions (e.g., meeting preset conditions for network bandwidth, meeting preset conditions for data transmission rate, etc.). When the current service state is determined to be a high-traffic state, the gateway device can determine to send a first service packet to the network device. It is important to note that the header of the first service packet carries link probe information. This link probe information is used to probe the link status between the gateway device and the network device. In this way, when performing link probes under high-traffic conditions, the number of probe packets sent can be reduced without interfering with normal service transmission.

[0052] In step S303, the network device receives the first service message from the gateway device.

[0053] In step S304, the network device sends a response message to the gateway device.

[0054] In this embodiment, the network device can receive a first service packet sent by the gateway device and determine a response packet based on the received first service packet. It is important to note that the first service packet is a normal service packet with added link probe information; that is, in addition to transmitting service data as a normal service packet, the first service packet can also be used for link probe. Generally, when the gateway device sends a normal service packet, the network device can process and respond to the received normal service packet, or it can only process the received normal service packet. However, when the gateway device sends a link probe packet, the network device can determine and respond to the link probe based on the received link probe packet. Therefore, when the gateway device sends a first service packet, the network device, in addition to performing normal service processing on the first service packet, also needs to respond to the link probe of the first service packet and respond back to the gateway device. In this way, the gateway device can determine the link connectivity between the two based on the feedback from the network device. In other words, this disclosure implements the link probe function using existing service packets in a high-speed service flow scenario.

[0055] Specifically, this could involve the network device parsing the first service packet it receives. The device then performs normal service processing on the first service packet; simultaneously, it determines a response packet based on the link probe information parsed from the first service packet and sends the response packet to the gateway device, as will be explained in detail later.

[0056] As described above, when the current service state is determined to be a high-speed service flow state, the gateway device sends the first service packet to the network device. This first service packet is specific; its header carries link probe information. In this way, during link probe operations in a high-speed service flow state, the number of link probe packets sent can be reduced without interfering with normal service transmission. This solves the problem of excessive bandwidth and CPU load, and does not require increasing the probe interval, meeting the needs of latency-sensitive and extremely low packet loss services, making it suitable for various application scenarios.

[0057] at the same time, Figure 4 An interaction diagram illustrating another link detection method provided in this disclosure embodiment. (See diagram below.) Figure 4 As shown, the method includes:

[0058] In step S401, the gateway device determines the current service status.

[0059] In step S402, when the current service state is a non-high-speed service flow state, the gateway device constructs a link probe message and sends the link probe message to the network device.

[0060] In this embodiment, a non-high-speed service flow state can be understood as a service state with at least one of the following: low network bandwidth usage and slow data transmission rate. Low network bandwidth usage means that the network bandwidth resources used by the device are relatively limited. Slow data transmission rate means that the required data transmission speed per unit time is relatively slow. In this state, the network may be relatively idle or lightly loaded, and the gateway device can send link probe messages individually to determine the state of the network link. The link probe message can be a data unit for evaluating the network link state.

[0061] Specifically, after obtaining the current service status, the gateway device determines whether the current service status is a non-high-speed service flow state. The method for the gateway device to determine the unit service status has been described previously and will not be repeated here. Determining whether the current service status is a non-high-speed state can be achieved through at least one method, such as comparing the service status with at least one preset threshold (e.g., network bandwidth threshold, data transmission rate threshold, etc.) or comparing the service status with at least one preset condition (e.g., meeting preset conditions for network bandwidth, meeting preset conditions for data transmission rate, etc.). When the current service status is determined to be a non-high-speed service flow state, the gateway device can construct a link probe message and send it to the network device. This link probe message is a completely new, constructed link probe message containing the necessary link probe information. Compared to existing link probe messages (such as BFD messages), the new link probe message simplifies the data content of the probe message and can occupy fewer bytes. Thus, the new link probe message is more functionally focused, and when link probe is needed, it can complete the link probe between the gateway device and the network device more quickly and efficiently.

[0062] In step S403, the network device receives a link probe message from the gateway device.

[0063] In step S404, the network device sends a response message to the gateway device.

[0064] In this embodiment of the disclosure, the network device can receive a link probe packet sent by a gateway device and determine whether to send a response packet to the gateway device based on the link probe packet. Specifically, the network device can determine the link probe information in the link probe packet and evaluate the link status between itself and the gateway device based on the link probe information. Based on the result of the link status evaluation, the network device can determine the response packet and send it to the gateway device, as described in detail below.

[0065] In summary, when the current service status is determined to be a non-high-speed service flow status, the gateway device will construct a brand-new link probe message. This message contains the information necessary for link probe, and compared with the existing link probe message (such as BFD message), the new message can occupy fewer bytes, thereby improving transmission efficiency.

[0066] Figure 5 A flowchart illustrating the link detection method provided in this embodiment of the disclosure. Figure 5 As shown, the complete link detection method, applied to gateway devices, is as follows:

[0067] In step S501, the current business status is determined.

[0068] In step S502, when the current service state is high-speed service flow state, a first service message is sent to the network device, and the header of the first service message carries link detection information.

[0069] In step S503, when the current service state is a non-high-speed service flow state, a link probe message is constructed and sent to the network device.

[0070] In this embodiment, the gateway device first needs to determine the current service state. This can be done by detecting and analyzing network traffic, checking the characteristics of the service flow, referring to user configuration, checking interface service bandwidth usage, and checking interface packet forwarding rate, among other methods. Next, it can be determined whether the current service state is a high-speed service flow state, i.e., a service state with at least one of the following: high network bandwidth usage and fast data transmission rate. When the current service state is determined to be a high-speed service flow state, a first service packet can be sent to the network device. It should be noted that the header of the first service packet carries link probe information, enabling the first service packet to perform link probes in addition to normal service transmission. Simultaneously, it can be determined whether the current service state is a non-high-speed service flow state, i.e., a service state with at least one of the following: low network bandwidth usage and slow data transmission rate. When the current service state is determined to be a non-high-speed service flow state, a link probe packet can be sent to the network device. It should be noted that the link probe packet is a completely new, constructed link probe packet containing the necessary link probe information, simplifying the content of existing link probe packets and occupying fewer bytes.

[0071] In summary, the gateway device can obtain the current service status and determine whether it is a high-speed or low-speed service flow. When the current service status is determined to be a high-speed service flow, it sends the first service packet to the network device. When the current service status is determined to be a low-speed service flow, it sends a constructed link probe packet to the network device. This allows for flexible adjustment of the transmission of different probe packets based on the service status, ensuring normal link probing under different states and meeting various service requirements in actual use.

[0072] The following details the first service message and link probe message that the gateway device determines to send.

[0073] As shown below, according to the embodiments of this disclosure, the first service message can be an extension header added to the header of the second service message, and the extension header carries link probe information.

[0074] In this embodiment of the disclosure, the second service message can be any service message that is normally transmitted in the network, and the second service message can be encapsulated and transmitted in accordance with the provisions of the network protocol.

[0075] It is important to note that in actual implementation scenarios, the second service packet can be the service packet corresponding to the next probe time indicated by the probe interval. The probe interval can be a preset time interval, which can be customized according to the actual network conditions and requirements.

[0076] Specifically, the first service message can be obtained by adding an extension header to the header of the second service message, and this extension header carries link probe information. It's important to note that the first service message can be obtained by modifying the header of the second service message corresponding to the next probe time indicated by the probe interval; that is, by adding an extension header to the header of the second service message. At other times besides the next probe time indicated by the probe interval, the second service message (i.e., service messages involved in normal service processing) can be processed normally without requiring header modification.

[0077] In layman's terms, when the current service state is determined to be a high-speed service flow state, the gateway device can add an extension header to the header of the service packet (i.e., the second service packet) corresponding to the next probe time (i.e., the time indicated by the probe interval) to obtain the first service packet. This extension header carries link probe information. In this way, the second service packet with the extension header becomes the first service packet. By doing so, the gateway device can embed link probe information into normal service packets without adding extra packets, thus achieving the goal of link probe without interfering with normal service transmission.

[0078] It should be noted that the first service message according to the embodiments of this disclosure includes: an Ethernet header, an Internet Protocol (IP) header, a User Datagram Protocol (UDP) header, and a Bidirectional Forwarding Detection (BFD) header; wherein, the IP header includes a selection header; the selection header includes: general fields, probe sequence number information, and timestamp information.

[0079] In this embodiment, the first service packet includes: an Ethernet header (Eth header), an Internet Protocol header (IP header), a User Datagram Protocol header (UDP header), and a Bidirectional Forwarding Detection Header (BFD header). It should be noted that, in this embodiment, to enable link probing under high-speed service flow conditions, the IP header of the first service packet is designed to have an added selection header. This selection header includes general fields, probe sequence number information, and timestamp information. In this disclosure, the aforementioned extended header can be understood as the selection header.

[0080] Specifically, the Ethernet header describes the physical address and the type of Ethernet frame. The Ethernet header allows network devices to identify and process different types of frames. The UDP header describes the source and destination ports, as well as the length and checksum of the UDP datagram. The BDF header describes whether the forwarding path between the gateway device and the network device is faulty.

[0081] The IP header contains the source IP address and the destination IP address. A key feature of this embodiment is the addition of a selection header to the existing IP header. This selection header allows the gateway device to include additional link probe information within the IP header. The selection header includes general fields, probe sequence number information, and timestamp information. The general fields describe standard or common fields in the IP selection header and can be version fields, message type fields (request or response), or reserved fields. Both version fields and reserved fields allow for version compatibility and extension. The probe sequence number information and timestamp information describe the link probe information. The probe sequence number information is used to track the order of probe messages in the communication protocol; the timestamp information is used to record the current time of the network devices through which the data passes.

[0082] In this way, the IP header in the first service message can contain link detection information, and based on this link detection information, the gateway device can perform link detection normally under high-speed service flow conditions.

[0083] In this embodiment of the disclosure, the first service message can be an IP header with an added selection header to the second service message. The construction of the selection header in different protocol messages is described in detail below.

[0084] When the second service message is an IPv4 protocol message, the selection header also includes an extension header type. An extension header type can be understood as adding optional extension fields after the IP header of the IPv4 protocol message. Content can be added to the extension header type of the IPv4 protocol selection header as needed, so that the message can not only undergo normal IPv4 protocol message transmission processing, but also be processed accordingly based on the content of the extension header type. In this embodiment of the disclosure, the extension header type can be fixed and can be link probe information.

[0085] When the second service message is an IPv6 protocol message, the selection header also includes: Next Extension Header Type. The Next Extension Header Type can be a field describing the type of the next extension header immediately following the current one. The chained structure of IPv6 extension headers allows multiple extension headers to be added after the IPv6 base header to support various functions. Content can be directly filled into the Next Extension Header Type as needed, and the chained structure of the IPv6 protocol will sequentially execute the relevant processing. In this embodiment, the Next Extension Header Type can be fixed, and it can be link probe information.

[0086] For example, Figure 6 A schematic diagram illustrating the preferred IPv4 protocol format for adding a link extension header, as provided in this embodiment of the disclosure, is shown below. Figure 6 As shown:

[0087] The entire extension header includes an option field, a version field, a type field, a reserve field, a sequence number field, and a timestamp field. The option field can be the IPv4 extension type header disclosed herein; the version, type, and reserve fields can be common fields disclosed herein; the sequence number field can be the probe sequence number information disclosed herein; and the timestamp field can be the timestamp information disclosed herein.

[0088] The detailed explanations of the six fields are as follows:

[0089] 1. The option field occupies one byte, for a total of 8 bits.

[0090] Generally, the first bit of the selection field in the IPv4 protocol is the replication flag: 0 (representing no replication) or 1 (representing replication). The second and third bits represent various option categories, i.e., various functions. The fourth to eighth bits can represent option data, i.e., the specific information or parameters of the option.

[0091] When determining the link probe options: the copy bit can be 0, which means no copying; the option type can be 2, which means debugging and measurement; the option number can be (26), which means link probe.

[0092] For example, the IPv4 extended type header for link detection can be 01011010. It should be noted that this field can be fixed.

[0093] 2. version: 1 byte, defaults to 0, used for future expansion compatibility.

[0094] 3. type: 1 byte (1 represents a request, 2 represents a response).

[0095] 4. Reserve: Reserved field, 1 byte in total (for expansion).

[0096] 5. id: Detection sequence number id.

[0097] 6. Stamp time: The timestamp is used by the sending device to record the time when the message was sent and compare it with the timestamp of the received response to record the delay.

[0098] The above is the complete extended header format of the IPv4 protocol. In practical applications, the link probe information mentioned above can include a probe sequence number (id) field and a timestamp field. That is, the option field in the second service message can be determined as link probe, and the probe sequence number (id) field and timestamp field can be added to represent link probe information, thereby identifying the first service message.

[0099] For example, Figure 7 A schematic diagram illustrating the preferred IPv6 protocol format for adding a link extension header, as provided in this embodiment of the disclosure, is shown below. Figure 7 As shown:

[0100] The entire extension header includes the Next header field, the version field, the type field, the Reserve field, the sequence number field, and the timestamp field. The Next header field can be the IPv6 next extension type header disclosed herein; the version, type, and Reserve fields can be common fields disclosed herein; the sequence number field can be the probe sequence number information disclosed herein; and the timestamp field can be the timestamp information disclosed herein.

[0101] The detailed explanations of the six fields are as follows:

[0102] 1. Next header: IPv6 extension type, 1 byte, link detection is 86.

[0103] 2. version: 1 byte, defaults to 0, used for future expansion compatibility.

[0104] 3. type: 1 byte (1 represents a request, 2 represents a response).

[0105] 4. Reserve: Reserved field, 1 byte in total (for expansion).

[0106] 5. id: Detection sequence number id.

[0107] 6. Stamp time: The timestamp is used by the sending device to record the time when the message was sent and compare it with the timestamp of the received response to record the delay.

[0108] The above is the complete extension header format of the IPv6 protocol. In practical applications, the link probe information mentioned above can include a probe sequence number (id) field and a timestamp field. That is, the next extension header type field can be determined to be link probe in the second service packet, and the probe sequence number (id) field and timestamp field can be added to represent link probe information, thereby identifying the first service packet.

[0109] The above details the first service message that the gateway device determines to send. The following details the link probe message that the gateway device determines to send.

[0110] The link probe message provided in this embodiment includes: Ethernet header, IP header, UDP header, and link probe header; wherein, the link probe header includes: general fields, probe sequence number information, and timestamp information.

[0111] Specifically, the Ethernet header in a link probe message can be used to describe the physical address and the type of Ethernet frame. The Ethernet header allows network devices to identify and process different types of frames. The IP header can be used to describe the source and destination IP addresses, other fields (such as IP packet version, header length, type of service), and other information. The UDP header can be used to describe the source and destination ports, as well as the length and checksum of the UDP datagram.

[0112] The link probe header is a unique part of the link probe message, containing link probe information used to detect link status. The link probe header may include: general fields, probe sequence number information, and timestamp information. The general fields describe standard or common fields in the IP selection header, and can be version fields, message type fields (request or response), or reserved fields. Version fields and reserved fields allow for version compatibility and extension. The probe sequence number information and timestamp information both describe link probe information. The probe sequence number information is used to track the order of probe messages in the communication protocol; the timestamp information is used to record the current time of the network devices through which the data passes.

[0113] In this way, the constructed link probe message, compared with the existing probe message, not only contains the necessary information such as probe sequence number and timestamp information, but also saves resources for selective probes, thus speeding up the device link probe process.

[0114] For example, Figure 8 The complete format of the link probe message provided in the embodiments of this disclosure is as follows: Figure 8 As shown:

[0115] The link probe message (i.e., the link probe message disclosed herein) includes: Ethernet header, IP header, UDP header, and link probe header.

[0116] Compared to existing link probe messages, the Ethernet header, IP header, and UDP header remain the same. However, a new link probe protocol is defined in the UDP header, specifying the port number for the link probe protocol message as 3786. Importantly, the link probe header has been reconstructed, occupying only 12 fields compared to the original 24 bytes, making the design simpler and easier to implement.

[0117] The specific link detection header consists of 5 parts:

[0118] 1. version: 1 byte, defaults to 0, used for future expansion compatibility.

[0119] 2. type: 1 byte (1 represents a request, 2 represents a response).

[0120] 3. Reserve: Reserved field, 2 bytes in total (for expansion).

[0121] 4. id: Detection sequence number id.

[0122] 5. Stamp time: The timestamp is used by the sending device to record the time when the message was sent and compare it with the timestamp of the received response to record the delay.

[0123] The above details how the gateway device can flexibly adjust whether to send a first service packet or a link probe packet for link probing. The following explains how the gateway device determines the link status between the gateway device and the network device after receiving a response packet from the network device for either the first service packet or the link probe packet.

[0124] The method for determining link status according to embodiments of this disclosure includes:

[0125] The gateway device receives response messages from the network device;

[0126] The gateway device determines the link status between the gateway device and the network device based on the response message.

[0127] In this embodiment, the gateway device can receive response messages from the network device. This can be confirmed by at least one method, such as establishing a listening process or using third-party listening software. Once a response message is received, the gateway device can parse its content. Based on the parsed response message content, the gateway device can determine the link status between itself and the network device. This can be determined by determining whether a response message has been received within a preset time interval. Specifically, this can be done by determining the timestamp information of the received response message. If the timestamp information is within the preset time interval, the link status between the gateway device and the network device is determined to be normal. If the timestamp information is not within the preset time interval or no timestamp information is received, the link status between the gateway device and the network device is determined to be faulty. The specific method for determining the link status is not limited here.

[0128] As described above, the gateway device can determine the link status between itself and the network device based on the response message sent by the received network device. This disclosure also provides a method for the network device to determine the response message.

[0129] The method for determining a response message according to embodiments of this disclosure includes:

[0130] A security assessment is performed on the target packets; the target packets include: first service packets or link probe packets;

[0131] When the target message passes the security assessment, the target message is forwarded to the gateway device as a response message.

[0132] If the target message fails the security assessment, a response message is constructed and sent to the gateway device.

[0133] In this embodiment, the network device can receive a target packet sent by a gateway device. The target packet can be a first service packet sent by the gateway device in a high-speed service flow state, or a link probe packet sent by the gateway device in a non-high-speed service flow state. Next, the network device performs a security assessment on the target packet. This can be done through at least one method, such as checking packet integrity, verifying packet content, checking packet timestamps, and applying security policies. Checking packet integrity can involve using at least one method, such as a hash function or message authentication code, to check whether the packet has been tampered with during transmission. Verifying packet content can involve executing corresponding verification policies based on the packet type and content, such as checking business logic or protocol compliance. Checking the packet timestamp can be done for packets requiring real-time processing to ensure their freshness. Applying security policies can be done based on actual needs to determine whether the target file contains attacks such as viruses or worms, which can be further evaluated by applying at least one security policy, such as firewall rules or intrusion detection systems. Finally, if the target packet passes the security assessment, it can be considered secure. A response packet can be directly generated based on the target packet (or modified as needed), and forwarded to the gateway device, which then determines the link status. If the target packet fails the security assessment, it can be considered a security risk. In this case, a new response packet can be constructed, containing link probe information. This response can be a reply to the aforementioned link probe packet. This reply packet is then sent to the gateway device, which determines the link status.

[0134] For example, Figure 9 A schematic diagram of a preferred complete link detection method provided in the embodiments of this disclosure is shown below. Figure 9 As shown, the complete implementation method of link detection is as follows:

[0135] 1. Determine the message sent by the gateway:

[0136] When the traffic flow is very small (i.e., the non-high-speed traffic flow state of this disclosure), the gateway (i.e. the gateway device of this disclosure) constructs a complete probe protocol message and sends it to the security network element (i.e. the network device of this disclosure), and the security network element responds to the probe message.

[0137] When the traffic flow is large (i.e., the high-speed traffic flow state of this disclosure), the gateway can add a selection header (i.e. the first traffic packet of this disclosure) to the existing traffic packet IP header according to the probe interval, and send it with link probe information to the security network element.

[0138] If the security element determines that the packet is not under attack, it forwards the packet normally without processing the service header information, and then the traffic flows back to the service gateway. If the security element determines that the packet has been attacked and needs to be discarded, it reconstructs a probe response packet based on the information in the probe header.

[0139] 2. The gateway records the received probe ID information based on the received response information (whether it is a complete probe message or information in the IP extension header of the stream), and decides whether to evaluate whether the link is normal (UP) or faulty (DOWN) according to the set probe interval.

[0140] If no probe message is received after the probe time has elapsed, the link is considered to be down.

[0141] If a probe response message is received within the probe time, the link is considered to be UP.

[0142] This disclosure also provides a link detection device. Figure 10 This is a structural block diagram of a link detection device provided in an embodiment of the present disclosure, such as... Figure 10 As shown, the link detection device 1000, installed in the gateway device, includes:

[0143] Unit 1001 is used to determine the current business status.

[0144] The sending unit 1002 is used to send a first service message to the network device when the current service state is a high-speed service flow state. The header of the first service message carries link detection information.

[0145] In one exemplary embodiment, the method further includes: when the current service state is a non-high-speed service flow state, constructing a link probe message and sending the link probe message to the network device.

[0146] In one exemplary embodiment, sending a first service message to a network device includes adding an extension header to the header of a second service message, the extension header carrying link probe information.

[0147] In one exemplary embodiment, the first service message includes: an Ethernet header, an Internet Protocol (IP) header, a User Datagram Protocol (UDP) header, and a Bidirectional Forwarding Detection (BFD) header; wherein the IP header includes a selection header; the selection header includes: general fields, probe sequence number information, and timestamp information.

[0148] In one exemplary embodiment, when the second service message is an IPv4 protocol message, the selection header further includes: an extension header type; when the second service message is an IPv6 protocol message, the selection header further includes: a next extension header type.

[0149] In one exemplary embodiment, the second service message is the service message corresponding to the next detection time indicated by the detection interval.

[0150] In one exemplary embodiment, the link probe message includes: an Ethernet header, an IP header, a UDP header, and a link probe header; wherein the link probe header includes: general fields, probe sequence number information, and timestamp information.

[0151] In one exemplary embodiment, the method further includes: receiving a response message from a network device; and determining the link status between the gateway device and the network device based on the response message.

[0152] This disclosure also provides a link detection device. Figure 11 This is a structural block diagram of a link detection device provided in an embodiment of the present disclosure, such as... Figure 11 As shown, the link detection device 1100, installed in a network device, includes:

[0153] The receiving unit 1101 is used to receive a first service message from the gateway device; wherein the first service message is sent by the gateway device when the current service state is a high-speed service flow state, and the header of the first service message carries link detection information.

[0154] The sending unit 1102 is used to send a response message to the gateway device.

[0155] In one exemplary embodiment, the method further includes: receiving a link probe message from a gateway device; wherein the link probe message is sent by the gateway device when it determines that the current service state is a non-high-speed service flow state; and sending a response message to the gateway device.

[0156] In one exemplary embodiment, sending a response message to a gateway device includes: performing a security assessment on a target message; wherein the target message includes: a first service message or a link probe message; when the target message passes the security assessment, the target message is forwarded to the gateway device as a response message; when the target message fails the security assessment, a response message is constructed and sent to the gateway device.

[0157] Figure 12 This is a hardware block diagram of an electronic device provided according to an embodiment of the present disclosure. The electronic device 1200 according to an embodiment of the present disclosure includes at least a processor and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor performs the link detection method described in any of the preceding embodiments of the present disclosure.

[0158] Figure 12The illustrated electronic device 1200 specifically includes a central processing unit (CPU) 1201, a graphics processing unit (GPU) 1202, and a memory 1203. These units are interconnected via a bus 1204. The CPU 1201 and / or GPU 1202 can function as the aforementioned processor, and the memory 1203 can function as the aforementioned memory storing computer-readable instructions. Furthermore, the electronic device 1200 may also include a communication unit 1205, a storage unit 1206, an output unit 1207, an input unit 1208, and an external device 1209, all of which are also connected to the bus 1204.

[0159] Figure 13 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this disclosure. (As shown...) Figure 13 As shown, a computer-readable storage medium 1300 according to an embodiment of the present disclosure stores computer-readable instructions 1301 thereon. When the computer-readable instructions 1301 are executed by a processor, the link detection method described above with reference to any embodiment of the present disclosure is performed. The computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.

[0160] This disclosure further provides a computer program product, including a computer program that, when executed by a processor, implements the link detection method described in any of the preceding embodiments of this disclosure.

[0161] As described above, the gateway device of this disclosure can obtain the current service status. When it determines that the current service status is a high-speed service flow state, it will send a first service packet to the network device. The header of the first service packet carries link probe information. In summary, the gateway device provided by this disclosure sends a first service packet to the network device when it determines that the current service status is a high-speed service flow state. This first service packet is specific, and its header carries link probe information. In this way, during link probe in a high-speed service flow state, the number of link probe packets sent can be reduced without interfering with normal service transmission. This solves the problem of consuming large amounts of bandwidth and CPU load, while not requiring an increased probe interval, meeting the needs of latency-sensitive and extremely low packet loss services, and is suitable for various application scenarios.

[0162] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0163] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0164] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0165] Additionally, as used herein, the “or” used in a list of items beginning with “at least one” indicates a separate list, such that a list of, for example, “at least one of A, B, or C” means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word “exemplary” does not imply that the described example is preferred or better than other examples.

[0166] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0167] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0168] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0169] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A link detection method, characterized in that, Applied to a gateway device, the method includes: Determine the current business status; When the current service state is a high-speed service flow state, a first service message is sent to the network device, and the header of the first service message carries link detection information. When the current service state is a non-high-speed service flow state, a link probe message is constructed and sent to the network device; The first service message includes: an Ethernet header, an Internet Protocol (IP) header, a User Datagram Protocol (UDP) header, and a Bidirectional Forwarding Detection (BFD) header; wherein the IP header includes a selection header; the selection header includes: general fields, probe sequence number information, and timestamp information; The link probe message includes: Ethernet header, IP header, UDP header, and link probe header; wherein, the link probe header includes: general fields, probe sequence number information, and timestamp information.

2. The method according to claim 1, characterized in that, Sending the first service message to the network device includes: An extension header is added to the header of the second service message, and the extension header carries the link probe information.

3. The method according to claim 1 or 2, characterized in that, When the second service message is an IPv4 protocol message, the selection header also includes: extension header type; When the second service message is an IPv6 protocol message, the selection header also includes: the next extension header type.

4. The method according to claim 2, characterized in that, The second service message is the service message corresponding to the next detection time indicated by the detection interval.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Receive response messages from the network device; Based on the response message, the link status between the gateway device and the network device is determined.

6. A link detection method, characterized in that, Applied to network devices, the method includes: Receive a first service message from a gateway device; wherein the first service message is sent by the gateway device when it determines that the current service state is a high-speed service flow state, and the header of the first service message carries link probe information; Receive a link probe message from the gateway device; wherein the link probe message is sent by the gateway device when it determines that the current service state is a non-high-speed service flow state; Send a response message to the gateway device.

7. The method according to claim 6, characterized in that, Sending a response message to the gateway device includes: A security assessment is performed on the target message; wherein the target message includes: the first service message or the link probe message; When the target message passes the security assessment, the target message is forwarded to the gateway device as the response message. When the target message fails the security assessment, the response message is constructed and sent to the gateway device.

8. A link detection device, characterized in that, The device, configured in a gateway device, includes: The determination unit is used to determine the current business status; The sending unit is configured to send a first service packet to the network device when the current service state is a high-speed service flow state, wherein the header of the first service packet carries link probe information; and to construct a link probe packet and send the link probe packet to the network device when the current service state is a non-high-speed service flow state. The first service message includes: an Ethernet header, an Internet Protocol (IP) header, a User Datagram Protocol (UDP) header, and a Bidirectional Forwarding Detection (BFD) header; wherein the IP header includes a selection header; the selection header includes: general fields, probe sequence number information, and timestamp information; The link probe message includes: Ethernet header, IP header, UDP header, and link probe header; wherein, the link probe header includes: general fields, probe sequence number information, and timestamp information.

9. A link detection device, characterized in that, The device, configured in a network device, includes: The receiving unit is configured to receive a first service message from a gateway device; wherein the first service message is sent by the gateway device when the current service state is a high-speed service flow state, and the header of the first service message carries link probe information; and to receive a link probe message from the gateway device; wherein the link probe message is sent by the gateway device when it determines that the current service state is a non-high-speed service flow state. The sending unit is used to send a response message to the gateway device.

10. An electronic device, characterized in that, include: Memory, used to store computer-readable instructions; as well as A processor for executing the computer-readable instructions, causing the electronic device to perform the method as described in any one of claims 1-7.

11. A non-transitory computer-readable storage medium for storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by a processor, the processor performs the method as described in any one of claims 1-7.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Bandwidth resource saving method

    CN101360046A

  • Message processing method and device, network equipment and computer readable storage medium

    CN114143089A