Link state detection methods, apparatus, devices and computer-readable media

By using a private link detection protocol and network control messages, the adaptability and time consumption issues of link state detection are resolved, enabling fast and resource-efficient link state detection.

CN116633827BActive Publication Date: 2026-03-10北京东土军悦科技有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing link state detection methods suffer from poor hardware adaptability, long processing time, cumbersome development, and wasted computing resources, especially when devices do not support hardware detection, use slow Hello mechanisms, or bidirectional forwarding detection.

Method used

It adopts a private link detection protocol, sends link status detection messages through the network control message protocol, and determines the link status based on the feedback information. The timeout and sending period are configured to be 20ms and 60ms, respectively. It supports cross-network detection and simplifies the development process.

Benefits of technology

It improves the adaptability and speed of detection, reduces data loss and waste of computing resources, shortens detection time, and requires no additional hardware configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116633827B_ABST
    Figure CN116633827B_ABST
Patent Text Reader

Abstract

This disclosure provides embodiments of a link state detection method, apparatus, device, and computer-readable medium. One specific implementation of the method includes: in response to detecting initiation information for a target link terminal, the initiation information containing target identification information of the target link terminal, and the target link terminal supporting the Network Control Message Protocol (NCLP), performing the following steps: sending a link state detection message to the target link terminal based on the target identification information; receiving feedback information from the target link terminal based on the link state detection message; and determining the current link state between a configuration terminal and the target link terminal based on the feedback information. This implementation can shorten the time required for link state detection, improve adaptability to device detection, increase the speed of link state detection, reduce the loss of large amounts of transmitted data due to undetected link faults, eliminate the need for additional hardware configuration for link state detection, and reduce the waste of computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of computer, and specifically to a link state detection method, device, equipment and computer readable medium. BACKGROUND

[0002] The link state is detected to find whether the link exists fault. At present, when the link state is detected, the commonly used way is to detect the link by hardware, slow Hello mechanism in routing protocol or bidirectional forwarding detection function, so as to determine whether the link fails.

[0003] However, the inventor finds that when the link state is detected by using the above way, the following technical problems often exist: when the hardware is used to detect the link and the device does not support the hardware detection, the adaptability of using the hardware to detect the link is poor, which leads to poor practicability of detecting the link by using the hardware, and when the hardware is used to detect the link, the hardware needs to be additionally configured to detect the link; when the slow Hello mechanism in the routing protocol is used to detect, the time consumption of detection is long, which leads to long time consumption of finding the link fault, and causes a large amount of transmission data to be lost due to the link fault not being found; when the bidirectional forwarding detection function is used to detect the link, the development steps of the developer are more complicated, which leads to long time consumption of development, and causes long time consumption and more computing resources to be consumed to detect the link.

[0004] The above information disclosed in the background section is only intended to enhance the understanding of the background of the present inventive concept, and therefore, it can include information that does not form the prior art known by those skilled in the art in the country. SUMMARY

[0005] The summary section is provided to introduce the concepts briefly in a simplified form, which will be described in detail in the specific embodiments section. The summary section is not intended to identify key or essential features of the claimed technology nor is it intended to be used to limit the scope of the claimed technology.

[0006] Some embodiments of the present disclosure propose a link state detection method, device, electronic equipment and computer readable medium to solve one or more of the technical problems mentioned in the background section.

[0007] In a first aspect, some embodiments of the present disclosure provide a link state detection method, which comprises: in response to detecting start information of a target link terminal, the start information containing target identification information of the target link terminal, the target link terminal supporting a network control packet protocol, performing the following steps: sending a link state detection packet to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection packet, and determining a current link state between the configuration terminal and the target link terminal according to the feedback information.

[0008] In a second aspect, some embodiments of the present disclosure provide a link state detection device, which supports a private link detection protocol, and comprises: a link detection unit configured to, in response to detecting start information of a target link terminal, send a link state detection packet to the target link terminal according to target identification information in the start information, receive feedback information of the target link terminal according to the link state detection packet, and determine a current link state between the configuration terminal and the target link terminal according to the feedback information; wherein the target link terminal supports a network control packet protocol, and the start information contains target identification information of the target link terminal.

[0009] In a third aspect, some embodiments of the present disclosure provide a primary / backup switching method of a redundant network, the redundant network comprising a primary switching device and a backup switching device, the backup switching device supporting a private link detection protocol, the backup switching device being configured with a preset timeout period and a preset sending period, the primary switching device supporting a network control packet protocol, the method being applied to the backup switching device, and the method comprising: in response to detecting monitoring start information containing target identification information of the primary switching device, sending a link state detection packet to the primary switching device according to the target identification information within the preset timeout period and with the preset sending period, and switching to the primary switching device if no reply packet fed back by the primary switching device is received within the preset timeout period.

[0010] In a fourth aspect, some embodiments of the present disclosure provide a redundant network, the redundant network comprising a primary switching device and a backup switching device, the backup switching device supporting a private link detection protocol, the backup switching device being configured with a preset timeout period and a preset sending period, the primary switching device supporting an ICMP (network control packet) protocol, and the backup switching device comprising: a detection and switching module configured to, in response to detecting monitoring start information containing target identification information of the primary switching device, send a link state detection packet to the primary switching device according to the target identification information within the preset timeout period and with the preset sending period, and switch to the primary switching device if no reply packet fed back by the primary switching device is received within the preset timeout period.

[0011] In a fifth aspect, some embodiments disclosed herein provide an electronic device, comprising: one or more processors; and a memory device storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described in any implementation of the first aspect.

[0012] In a sixth aspect, some embodiments disclosed herein provide a computer-readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, performs the method described in any implementation of the first aspect.

[0013] The above various embodiments of the present disclosure have the following beneficial effects: through the link state detection method of some embodiments of the present disclosure, the adaptability of device detection is improved, the situation that a large amount of transmission data is lost due to undetected link failure is reduced, the time-consuming of link detection is shortened, the waste of computing resources is reduced, and additional hardware configuration is not required for link detection. Specifically, the reasons for causing the need for additional hardware configuration for detection, the situation that a large amount of transmission data is lost due to undetected link failure, the long time-consuming of link state detection, and the waste of computing resources are as follows: when using hardware for link detection and the device does not support hardware detection, the adaptability of using hardware for link detection is poor, which leads to poor practicability of link detection by hardware, and additional hardware configuration is required for link detection when using hardware; when detection is performed through the slow Hello mechanism in the routing protocol, the time-consuming of detection is long, which leads to a long time-consuming of discovering link failure and a large amount of transmission data lost due to undetected link failure; when the link is detected through the bidirectional forwarding detection function, the development steps of the developer are complicated, which leads to a long development time-consuming, a long time-consuming of implementing link detection, and a large amount of computing resources consumed. Based on this, in response to detecting the start information of the target link terminal, the target identification information of the target link terminal is contained in the start information, the target link terminal supports the network control message protocol, and the following steps are performed: sending a link state detection message to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection message, and determining the link state between the configuration terminal and the target link terminal according to the feedback information. Thus, when the start information of the target link terminal is detected, the link state detection message can be sent, and the feedback information can be determined according to the feedback information, so that the link state can be determined according to the feedback information. Because the link state is generated according to the private link detection protocol supported by the configuration terminal, rather than generated according to hardware detection, additional hardware configuration is not required for link detection. Because the interval time of sending the link state detection message corresponding to the private link detection protocol can be configured as 20 ms, and the timeout time configuration can be configured as 60 ms. The time interval of sending the link state detection message of the existing protocol standard for link detection is 1 second. The timeout time configuration is 3 seconds, and because the existing link detection protocol cannot be cross-network detection, the time for link detection in multiple networks is long, and the private link detection protocol can cross-network detection, so the time-consuming of link state detection can be shortened, and the situation that a large amount of transmission data is lost due to undetected link failure can be reduced.In addition, the private link state detection protocol is based on the network control message protocol, and the target link terminal supports the network control message protocol, so that the link state is detected by the private link state detection protocol based on the network control message protocol supported by most devices. Instead of being based on the bidirectional forwarding detection function, thereby simplifying the development steps of the developer, shortening the development time, and reducing the waste of computing resources. Therefore, the time-consuming of the link state detection is shortened, the adaptability of the device detection is improved, the speed of the link state detection is improved, the situation that a large amount of transmission data is lost due to link failure is reduced, the link state does not need to be detected by additional hardware configuration, and the waste of computing resources is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0014] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail some embodiments thereof with reference to the attached drawings. The same or similar components have the same or similar reference numbers throughout the drawings. It should be understood that the drawings are schematic and elements and features are not necessarily drawn to scale.

[0015] Figure 1 is a flowchart schematic diagram of some embodiments of the link state detection method according to the present disclosure;

[0016] Figure 2 shows a flowchart schematic diagram of some embodiments of the master-slave switching method of the redundant network according to the present disclosure;

[0017] Figure 3 is a structural example diagram of some embodiments of the link state detection device according to the present disclosure;

[0018] Figure 4 is a structural schematic diagram of some embodiments of the redundant network according to the present disclosure;

[0019] Figure 5 is a structural schematic diagram of an electronic device of some embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes, and are not intended to limit the scope of protection of the present disclosure.

[0021] It should be noted that only parts related to the present application are shown in the drawings for the purpose of description. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0022] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modification of "one", "multiple" mentioned in the present disclosure is illustrative but not restrictive, and those skilled in the art should understand that unless otherwise explicitly indicated in the context, it should be understood as "one or more".

[0024] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not used to limit the scope of the messages or information.

[0025] The present disclosure will be described in detail below with reference to the drawings and in conjunction with embodiments.

[0026] Figure 1 Flow 100 of some embodiments of the link state detection method according to the present disclosure is shown. The link state detection method comprises the following steps:

[0027] Step 101, in response to detecting the start information of the target link terminal, the start information contains the target identification information of the target link terminal, the target link terminal supports network control message protocol, the following steps are executed: sending a link state detection message to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection message, and determining the current link state between the configuration terminal and the target link terminal according to the feedback information.

[0028] In some embodiments, in response to detecting start information of a target link terminal, the start information containing target identification information of the target link terminal, the target link terminal supporting a network control packet protocol, the performing subject can perform the following steps: sending a link state detection packet to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection packet, and determining a current link state between the configuration terminal and the target link terminal according to the feedback information. The start information can be information for starting to detect the link state. The start information can contain target identification information of multiple target link terminals, and the multiple target link terminals can all support the network control packet protocol. The network control packet protocol can be an ICMP protocol. The target identification information can be an IP (Internet Protocol) address of the target link terminal. The target link terminal can be, but is not limited to, one or more of the following: a three-layer switch, a server, a PC, a router, and a firewall. The feedback information can be a reply of the target link terminal device to the link state detection packet. The current link state can be a normal link or a link failure. The link state detection packet can be an ICMP request. The network control packet protocol can be an ICMP function. The feedback information can be an ICMP reply. In practice, in response to detecting start information of a target link terminal, the start information containing target identification information of the target link terminal, the target link terminal supporting a network control packet protocol, the performing subject can perform the following steps: sending a link state detection packet to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection packet, and determining a current link state between the configuration terminal and the target link terminal according to the feedback information.

[0029] In some optional implementations of some embodiments, the execution subject can send the link state detection packet to the target link terminal in the preset sending period within the preset timeout period. If a reply packet fed back by the target link terminal is received within the preset timeout period, it is determined that the current link between the configuration terminal and the target link terminal is normal, otherwise, it is determined that the current link between the configuration terminal and the target link terminal is abnormal. The preset timeout period and the preset sending period of the link state detection packet can be contained in the start information. The preset timeout period can be greater than the preset sending period. The preset timeout period can be a preset number of times of the preset sending period. For example, the preset number of times can be 3 times. The preset sending period can be an interval time at which the execution subject sends the link state detection packet. The preset timeout period can be a maximum interval time during which the reply packet fed back by the target link terminal is not received. The preset sending period and the preset timeout period can be time periods configured by default. For example, the preset sending period can be 20 ms, and the preset timeout period can be 60 ms.

[0030] In some optional implementations of some embodiments, in response to detecting the start information of the target link terminal, the execution subject can adjust the preset sending period and the preset timeout period according to the configuration information to obtain a configuration sending period and a configuration timeout period, and send the link state detection packet to the target link terminal in the configuration sending period within the configuration timeout period. If a reply packet fed back by the target link terminal is received within the configuration timeout period, it is determined that the current link between the configuration terminal and the target link terminal is normal, otherwise, it is determined that the current link between the configuration terminal and the target link terminal is abnormal. The configuration information can be a new configuration of link detection. The configuration information can represent change information of the default configuration of link detection. The configuration sending period can be a period of sending the link state detection packet after the change. The configuration timeout period can be a maximum time period during which the feedback information of the link state detection packet is not received after the change.

[0031] The timeout period and the sending period can be configured before link state detection, which improves the flexibility of link state detection and meets the link detection requirements in different scenarios.

[0032] It can be understood that in the above two embodiments, the purpose of setting the timeout period to be greater than the sending period is to send the link state detection packet multiple times within the timeout period to avoid the situation that the current link state detection is wrong due to the fact that the reply packet of the target link terminal is not received because the link state detection packet has a problem.

[0033] Optionally, after step 101, first, the above execution subject can acquire the target link state of the private link detection protocol in the last timeout period in response to determining that the above configuration information includes protocol linkage configuration information representing configuring the private link detection protocol and the target link detection protocol for link state detection linkage. The target link detection protocol can be, but is not limited to, one of the following: static routing, network address translation protocol, virtual routing redundancy protocol, and link state routing protocol. The target link state can be the previous link state of the current link state detected. Thus, the target link state detected by the private link detection protocol can be obtained.

[0034] Then, the current link state detected by the private link detection protocol can be notified to the linkage device supporting the target link detection protocol in response to determining that the current link state detected by the private link detection protocol is inconsistent with the target link state, so that the linkage device adjusts the state according to the current link state. The state adjustment can be understood as that when the private link detection protocol is not linked with the target link detection protocol, the linkage device supporting the target link detection protocol only receives the link state detected by the target link detection protocol. When the private link detection protocol is linked with the target link detection protocol, the linkage device supporting the target link detection protocol receives the link state detected by the target link detection protocol and the link state detected by the private link detection protocol. Because the preset sending period and the preset timeout period of the private link detection protocol can be flexibly configured, a shorter period can be configured, and the private link detection protocol will definitely detect the current link state earlier than the target link detection protocol, so that the linkage device can know the current link state earlier by sending the link state detected by the private link detection protocol in time, especially when the link state changes, so as to make state adjustment processing in time. For example, the target link detection protocol can be a VRRP protocol, when the linkage device receives the link state sent by the private link detection protocol as link failure, the linkage device quickly performs master-slave switching and adjusts to the standby link to replace the failed link to perform forwarding work. Because the private link detection protocol detects the link state in a shorter time, the interruption time of the data flow can be shortened. The linkage device will adjust to receive only the link state detected by the private link detection protocol which detects the link state faster.

[0035] It is worth mentioning that in the protocol linkage configuration scheme, one linkage device can simultaneously receive the current link state detected by the private link detection protocol and the current link state detected by the target link detection protocol. When the link state does not change, the current link state detected by the target link detection protocol is used as the state of the current link, which does not have too much influence on the reception and forwarding of data. When the link state changes, the current link state detected by the private link detection protocol is sent to the linkage device, so that the linkage device can obtain the changed state of the link in time, make adjustment, and improve the reliability of data forwarding.

[0036] The various embodiments disclosed in the present application have the following beneficial effects: the link state detection method of some embodiments of the present application improves the adaptability of device detection, reduces the loss of a large amount of transmission data due to undetected link faults, shortens the time-consuming of link detection, reduces the waste of computing resources, and does not require additional hardware configuration for link detection. Specifically, the reasons for the need for additional hardware configuration for detection, the frequent loss of a large amount of transmission data due to undetected link faults, the long time-consuming of link state detection, and the waste of computing resources are as follows: when using hardware for link detection and the device does not support hardware detection, the adaptability of using hardware for link detection is poor, resulting in poor practicability of link detection by hardware, and additional hardware configuration is required for link detection when using hardware; when detecting by the slow Hello mechanism in the routing protocol, the time-consuming of detection is long, resulting in a long time-consuming of discovering link faults and a large amount of transmission data lost due to undetected link faults; when detecting the link by the bidirectional forwarding detection function, the development steps of the developer are complicated, resulting in a long development time-consuming, a long time-consuming of implementing link detection, and a large amount of computing resources consumed. Based on this, the link state detection method of some embodiments of the present application, in response to detecting the start information of the target link terminal, the start information containing the target identification information of the target link terminal, and the target link terminal supporting the network control message protocol, performs the following steps: sending a link state detection message to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection message, and determining the link state between the configuration terminal and the target link terminal according to the feedback information. Thus, when the start information of the target link terminal is detected, the link state detection message can be sent, and the feedback information can be received to determine whether the link state has failed according to the feedback information. Because the link state is generated according to the private link detection protocol supported by the configuration terminal, rather than generated according to hardware detection, additional hardware configuration is not required for link detection. Because the interval time of sending the link state detection message corresponding to the private link detection protocol can be configured as 20 ms, and the timeout time configuration can be configured as 60 ms. The time interval of sending the link state detection message of the existing link detection protocol standard is 1 second. The timeout time configuration is 3 seconds, and because the existing link detection protocol cannot perform cross-network detection, the time for detecting the link in multiple networks is long, and the private link detection protocol can perform cross-network detection of the link. Therefore, the time-consuming of detecting the link state can be shortened, and the loss of a large amount of transmission data due to undetected link faults can be reduced.Further, the private link state detection protocol is based on the network control message protocol, and the target link terminal supports the network control message protocol, so that the link state is detected by the private link state detection protocol based on the network control message protocol supported by most devices. Instead of being based on the bidirectional forwarding detection function, thereby simplifying the development steps of the developer, shortening the development time, and reducing the waste of computing resources. Therefore, the time-consuming of the link state detection is shortened, the adaptability of the device detection is improved, the speed of the link state detection is improved, a large amount of transmission data loss due to link failure is reduced, the link state detection does not need to be detected by additional hardware, and the waste of computing resources is reduced.

[0037] Figure 2 A flowchart of a method for switching a master and a backup of a redundant network according to the present disclosure is shown.

[0038] The redundant network in the method for switching a master and a backup of a redundant network includes a master switching device and a backup switching device. The backup switching device supports a private link state detection protocol. The backup switching device is configured with a preset timeout period and a preset sending period. The master switching device supports a network control message protocol. The method is applied to the backup switching device. The method includes the following steps:

[0039] In step 201, in response to detecting monitoring start information containing target identification information of the master switching device, link state detection messages are sent to the master switching device at a preset sending period within a preset timeout period according to the target identification information. If no reply message fed back by the master switching device is received within the preset timeout period, the master switching device is switched.

[0040] In some embodiments, the execution subject can send the link state detection message to the master switching device at the preset sending period within the preset timeout period according to the target identification information in response to detecting monitoring start information containing target identification information of the master switching device. If no reply message fed back by the master switching device is received within the preset timeout period, the master switching device is switched. The redundant network includes a master switching device and a backup switching device. The backup switching device supports a private link state detection protocol. The backup switching device is configured with a preset timeout period and a preset sending period. The master switching device supports a network control message protocol. The method is applied to the backup switching device. The monitoring start information can be start information of the master switching device.

[0041] It can be understood that the monitoring start information containing the target identification information of the master switching device can be configured when the redundant network starts to work, that is, the backup switching device starts to monitor the state of the master switching device.

[0042] Further referring to Figure 3 , as the implementation of the method shown in the above figures, the present disclosure provides some embodiments of a link state detection device, which device embodiments correspond to those method embodiments, and the device can be specifically applied in various electronic devices. Figure 1

[0043] As shown in Figure 3 , the link state detection device 300 of some embodiments includes: the device supports a private link probe protocol, and the device includes: a link detection unit 301 configured to, in response to detecting startup information of a target link terminal, send a link state detection packet to the target link terminal according to target identification information in the startup information, receive feedback information of the target link terminal according to the link state detection packet, and determine the current link state between the configuration terminal and the target link terminal according to the feedback information; wherein the target link terminal supports a network control packet protocol, and the startup information contains target identification information of the target link terminal.

[0044] It can be understood that the units recorded in the device 300 correspond to the steps in the method described with reference to Figure 1 . Therefore, the operations, features and beneficial effects described above for the method also apply to the device 300 and the units contained therein, and will not be repeated here.

[0045] Figure 4 An example structure diagram of some embodiments of the redundant network disclosed by the present disclosure is shown. A redundant network, the redundant network includes a primary switching device 403 and a backup switching device 401, the backup switching device supports a private link probe protocol, the backup switching device is configured with a preset timeout period and a preset sending period, the primary switching device supports a network control packet protocol, and the backup switching device includes: a detection switching module 402 configured to, in response to detecting monitoring startup information containing target identification information of the primary switching device, send the link state detection packet to the primary switching device according to the target identification information within the preset timeout period with the preset sending period, and if no reply packet feedback by the primary switching device is received within the preset timeout period, switch to the primary switching device.

[0046] ​In some embodiments, the execution entity may configure the detection switching module to, in response to detecting monitoring start information containing target identification information of the primary switching device, send the link status detection message to the primary switching device within the preset timeout period and at the preset transmission period according to the target identification information. If no reply message is received from the primary switching device within the preset timeout period, the primary switching device is switched over. The redundant network includes a primary switching device and a backup switching device. The backup switching device supports a private link detection protocol. The backup switching device is configured with a preset timeout period and a preset transmission period. The primary switching device supports the Network Control Message Protocol. It should be noted that... Figure 4 The switch 404 shown is a general-purpose switch that forwards data to various computer terminals 405 and expands ports to enable the main and backup switching devices to connect to more computer terminals.

[0047] The redundant network in this embodiment enables rapid switching from backup switching equipment to primary switching equipment, with a switching time of milliseconds, greatly reducing the problem of data not being forwarded in time or data loss caused by long switching times between primary and backup switching equipment.

[0048] The following is for reference. Figure 5 This document illustrates a structural schematic of an electronic device 500 (e.g., a computing device) suitable for implementing some embodiments of the present invention. The electronic devices in some embodiments of this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0049] like Figure 5 As shown, the electronic device 500 may include a processing unit 501 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 308 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0050] Generally, the following devices can be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, a magnetic tape, a hard disk, and the like; and communication devices 509. The communication devices 509 can allow the electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it is understood that all of the shown devices are not required to be implemented or present. More or fewer devices can alternatively be implemented or present. Figure 5 Each block shown in the flowcharts can represent a device or multiple devices as needed.

[0051] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to some embodiments of the present disclosure. For example, some embodiments of the present disclosure include a computer program product including a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In some such embodiments, the computer program can be downloaded and installed from a network through the communication devices 509, or installed from the storage devices 508, or installed from the ROM 502. When the computer program is executed by the processing devices 501, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.

[0052] Note that the computer-readable medium in some embodiments of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In some embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer-readable program code is carried. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination thereof.

[0053] In some embodiments, the client, server, or both can communicate using any known or future developed network protocols, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.

[0054] The computer readable medium can be included in the electronic device; or can exist outside of the electronic device, and can be separate from the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the following steps in response to detecting start-up information of a target link terminal, the start-up information containing target identification information of the target link terminal, the target link terminal supporting a network control message protocol: sending a link state detection message to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection message, and determining a current link state between the configuration terminal and the target link terminal according to the feedback information.

[0055] Computer program code for carrying out operations of some embodiments of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0056] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by special-purpose hardware-based systems that perform the specified functions or operations, or combinations of special-purpose hardware and computer instructions.

[0057] The units described in the embodiments of the present application can be implemented by software or by hardware. The described units can also be implemented in a processor, for example, a processor can be described as comprising a link detection unit. In some cases, the name of the unit does not constitute a limitation on the unit itself, for example, the link detection unit can also be described as a unit that "in response to detecting the start information of the target link terminal, sends a link state detection packet to the target link terminal according to the target identification information in the start information, receives feedback information of the target link terminal according to the link state detection packet, and determines the current link state between the configuration terminal and the target link terminal according to the feedback information".

[0058] The functions described above can be performed at least in part by one or more hardware logic components. For example, non-limiting examples of exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip (SOCs), complex programmable logic devices (CPLDs), etc.

[0059] The above description is merely some of the preferred embodiments of the present application and a description of the principles of the technology used. Those skilled in the art should understand that the scope of the application involved in the embodiments of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features without departing from the above inventive concept. For example, the above features can be replaced with technical features with similar functions disclosed in the embodiments of the present application (but not limited to) to form technical solutions.

Claims

1. A method of link state detection, the method comprising: The method is applied to a configuration terminal supporting a private link detection protocol, and comprises the following steps: In response to detecting start information of a target link terminal, the start information containing target identification information of the target link terminal, the target link terminal supporting a network control message protocol, the following steps are performed: Sending a link state detection message to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection message, and determining a current link state between the configuration terminal and the target link terminal according to the feedback information, wherein a preset timeout period contained in the start information is greater than a preset sending period; In response to determining that the received configuration information includes protocol linkage configuration information representing linkage configuration of the private link detection protocol and a target link detection protocol for link state detection, obtaining a target link state detected by the private link detection protocol in a last timeout period, wherein the configuration information is new configuration for link detection, the configuration information represents change information of default configuration for link detection, and the target link state is a previous link state of a current link state detected; In response to determining that the current link state detected by the private link detection protocol is inconsistent with the target link state, notifying the current link state detected by the private link detection protocol to a linkage device supporting the target link detection protocol, so that the linkage device performs state adjustment according to the current link state, wherein after the private link detection protocol and the target link detection protocol are linked, the linkage device supporting the target link detection protocol receives a link state detected by the target link detection protocol and a link state detected by the private link detection protocol.

2. The method of claim 1, wherein, The start information contains a preset timeout period and a preset sending period of the link state detection message; The step of sending the link state detection message to the target link terminal according to the target identification information, receiving feedback information of the target link terminal according to the link state detection message, and determining a current link state between the configuration terminal and the target link terminal according to the feedback information comprises the following steps: Sending the link state detection message to the target link terminal at the preset sending period within the preset timeout period, and determining that a current link between the configuration terminal and the target link terminal is normal if a reply message fed back by the target link terminal is received within the preset timeout period, or determining that the current link between the configuration terminal and the target link terminal is abnormal.

3. The method of claim 2, wherein, In response to detecting the start information of the target link terminal, the method further comprises the following steps: In response to receiving configuration information, adjusting the preset sending period and the preset timeout period according to the configuration information to obtain a configuration sending period and a configuration timeout period; and In response to detecting the start information of the target link terminal, the method further comprises the following steps: In response to receiving configuration information, adjusting the preset sending period and the preset timeout period according to the configuration information to obtain a configuration sending period and a configuration timeout period; and The sending of the link state detection packet to the target link terminal according to the target identification information, the receiving of feedback information of the target link terminal according to the link state detection packet, and the determining of a current link state between the configuration terminal and the target link terminal according to the feedback information comprise: The sending of the link state detection packet to the target link terminal according to the target identification information, the receiving of feedback information of the target link terminal according to the link state detection packet, and the determining of a current link state between the configuration terminal and the target link terminal according to the feedback information comprise:

4. The method of claim 1, wherein, The start information contains target identification information of a plurality of target link terminals, and the plurality of target link terminals all support a network control packet protocol. 5.An electronic device, comprising: one or more processors; a memory device having stored thereon one or more programs, when the one or more programs are executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1-4.

6. A computer readable medium having stored thereon a computer program, wherein, The computer program is executed by the processor to implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Primary / standby route equipment switching method and route equipment

    CN101841408A

  • Detection method and device for communication link

    CN107332726A

  • Link state detection method and device

    CN112910742A

  • Link detection method, device, system and equipment and readable storage medium

    CN115842751A