CN112910742A - Link state detection method and device - Google Patents

Link state detection method and device Download PDF

Info

Publication number
CN112910742A
CN112910742A CN202110276232.XA CN202110276232A CN112910742A CN 112910742 A CN112910742 A CN 112910742A CN 202110276232 A CN202110276232 A CN 202110276232A CN 112910742 A CN112910742 A CN 112910742A
Authority
CN
China
Prior art keywords
link
detection
state
normal
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110276232.XA
Other languages
Chinese (zh)
Inventor
李强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202110276232.XA priority Critical patent/CN112910742A/en
Publication of CN112910742A publication Critical patent/CN112910742A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The disclosure relates to a link state detection method, a link state detection device, an electronic device and a computer readable medium. The method comprises the following steps: determining the current state of a target link to be detected; when the current state is a normal state, starting rapid link detection; detecting the target link based on a rapid link detection mode to generate a detection result; when the result of the rapid link detection is normal, feeding back the normal information of the link state; and continuously detecting the target link based on a normal detection state mode. The link state detection method, the link state detection device, the electronic equipment and the computer readable medium can improve the flexibility and the accuracy of link detection and obviously improve the link detection efficiency under the condition of not obviously increasing the link burden and the equipment load.

Description

Link state detection method and device
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a link state detection method, apparatus, electronic device, and computer readable medium.
Background
As IP networks become larger, link detection technology becomes one of the important technologies indispensable for network expansion. Two network devices (which may be, for example, a router and a firewall) belong to a direct connection device in view of the network topology, now assuming that the router is configured with link health check detection to the firewall. The specific treatment method comprises the following steps: the router sends detection messages to the firewall periodically, the messages are not received within a certain time and are replied as failure once, when the continuous failure reaches a set threshold value for multiple times, the problem of the link is declared, other modules are informed, and the link is required to be processed if the problem occurs.
In a specific application scenario, for example, the static routing module needs to perform link detection, and when detecting a link, the set message sending interval is 5 seconds, and a link is reported as a link interruption after 3 times of failures. According to the prior art solution, the user does not know whether the actual link condition is normal or abnormal within a certain time (15 seconds) from the start of the detection. In the prior art, when it is unknown whether the current link is connected or disconnected, the default is connected, and other service messages to be processed are transmitted according to the condition of the connection. However, if the link is actually not through, but is not detected yet, it needs to be known after multiple link detection failures, and in this case, the time for obtaining the detection result is too long, which may delay the transmission of the service message.
Therefore, a new link state detection method, apparatus, electronic device and computer readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides a link status detection method, a link status detection apparatus, an electronic device, and a computer readable medium, which can improve the flexibility and accuracy of link detection without significantly increasing the load of the link and the load of the device, and significantly improve the link detection efficiency.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a method for detecting a link state is provided, where the method includes: determining the current state of a target link to be detected; when the current state is a normal state, starting rapid link detection; detecting the target link based on a rapid link detection mode to generate a detection result; when the result of the rapid link detection is normal, feeding back the normal information of the link state; and continuously detecting the target link based on a normal detection state mode.
In an exemplary embodiment of the present disclosure, further comprising: when the result of the rapid link detection is abnormal, feeding back link state abnormal information; and continuously detecting the target link based on a normal detection state mode.
In an exemplary embodiment of the present disclosure, before determining the current state of the target link to be detected, the method further includes: receiving a link detection instruction, wherein the link detection instruction comprises a link identifier; determining, in a database, a currently detected link of the links based on a link identification; determining the link as the target link when a currently detected link of the links does not exist in the database.
In an exemplary embodiment of the present disclosure, includes: and when the current detection link of the links exists in the database, generating feedback information based on the result of the current detection link.
In an exemplary embodiment of the present disclosure, after continuously detecting the target link based on a normal detection state manner, the method further includes: starting rapid link detection when the detection result of continuously detecting the target link based on the normal detection state mode is abnormal; and detecting the target link based on a rapid link detection mode to generate a detection result.
In an exemplary embodiment of the present disclosure, when a detection result of continuously detecting the target link based on a normal detection state mode is abnormal, the method includes: continuously detecting the target link based on a normal detection state mode; and when the feedback message cannot be received, determining that the detection result is abnormal.
In an exemplary embodiment of the present disclosure, detecting the target link based on a fast link detection method to generate a detection result includes: sending a message to the target link based on a first detection frequency; and determining the detection result according to the feedback message of the message.
In an exemplary embodiment of the present disclosure, continuously detecting the target link based on a normal detection state manner includes: sending a message to the target link based on a second detection frequency; and determining the detection result according to the feedback message of the message.
In an exemplary embodiment of the present disclosure, determining the detection result according to a feedback packet of the packet includes: and when the feedback message is not received for three times continuously, determining that the detection result is abnormal.
According to an aspect of the present disclosure, a link status detection apparatus is provided, the apparatus including: the retrieval module is used for determining the current state of the target link to be detected; the starting module is used for starting the rapid link detection when the current state is a normal state; the fast detection module is used for detecting the target link based on a fast link detection mode to generate a detection result; the normal module is used for feeding back the normal information of the link state when the result of the rapid link detection is normal; and continuously detecting the target link based on a normal detection state mode.
In an exemplary embodiment of the present disclosure, further comprising: the abnormal module is used for feeding back abnormal information of the link state when the result of the rapid link detection is abnormal; and continuously detecting the target link based on a normal detection state mode.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the link state detection method, the link state detection device, the electronic equipment and the computer readable medium, the current state of a target link to be detected is determined; when the current state is a normal state, starting rapid link detection; detecting the target link based on a rapid link detection mode to generate a detection result; when the result of the rapid link detection is normal, feeding back the normal information of the link state; the target link is continuously detected based on the normal detection state mode, so that the flexibility and the accuracy of link detection can be improved under the condition of not obviously increasing link load and equipment load, and the link detection efficiency is obviously improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a system block diagram illustrating a link state detection method and apparatus according to an example embodiment.
Fig. 2 is a flow diagram illustrating a method of link state detection in accordance with an example embodiment.
Fig. 3 is a flow chart illustrating a method of link state detection according to another example embodiment.
Fig. 4 is a block diagram illustrating a link state detection apparatus according to an example embodiment.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 6 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
The inventor of the present application finds that, for different network environment requirements, there are cases where link detection has time requirement of high accuracy, which generally uses BFD to perform network link detection, and cases where link detection is not so demanding, which generally has accuracy of more than seconds, and typically is link health check. Among them, health check is a network link detection method, and its time precision is generally lower than the BFD protocol. The BFD (Bidirectional Forwarding Detection) may provide millisecond Detection, and may implement fast Detection of the link.
If the static routing module needs to perform link detection, the set message sending interval is 5 seconds during the link detection, and the link is interrupted if 3 times of failures (namely 15 seconds) occur. The specific process is as follows: the static routing module notifies the link detection module of the link detection request, the static routing module considers that the link is open in a period of time (the specific time is 15 seconds from the beginning) when the link detection module is not reached to the link detection module, the link detection module considers that the link is open until the link detection module continuously sends three messages and does not receive a response message, the link detection module subsequently sends the detection message at a fixed time interval (5 seconds in the example) until the response message is received, and the static routing module is notified of the link recovery.
In the link detection process, if the link fails to be detected, the link can be determined to have a problem even after multiple detection failures, and the prior art cannot meet the requirements for updating and recovering the link state in a scene with higher requirements for the link transmissibility. Therefore, the present application provides a link state detection method and device, which are dedicated to improve the accuracy of the ordinary link detection time of network equipment, and make the link detection perception more sensitive without increasing the equipment burden greatly.
Fig. 1 is a system block diagram illustrating a link state detection method, apparatus, electronic device, and computer readable medium in accordance with an example embodiment.
As shown in fig. 1, system architecture 10 may include network devices 101, 102, 103, network 104. Network 104 is the medium by which communication links are provided between network devices 101, 102, 103. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the network devices 101, 102, 103 to receive or send messages or the like over the network 104. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the network devices 101, 102, 103.
Network devices 101, 102, 103 may have various electronic devices with network transport capabilities including, but not limited to, routers, firewalls, smartphones, tablets, laptop and desktop computers, and the like.
Network device 101 may, for example, determine a current state of a target link to be detected of network device 102; network device 101 may, for example, initiate fast link detection when the current state is a normal state; the network device 101 may detect the target link, for example, based on a fast link detection manner, and generate a detection result; the network device 101 may, for example, feed back link state normal information when the result of the fast link detection is normal; network device 101 may perform continuous detection of the target link, for example, based on a normal detection state approach.
The network device 101 may also feed back link state abnormality information, for example, when the result of the fast link detection is abnormal; network device 101 may also perform continuous detection of the target link, e.g., based on a normal detection state approach.
It should be noted that the link state detection method provided by the embodiment of the present disclosure may be executed by any of the network devices 101, 102, and 103, and accordingly, the link state detection apparatus may be disposed in any of the network devices 101, 102, and 103.
Fig. 2 is a flow diagram illustrating a method of link state detection in accordance with an example embodiment. The link state detection method 20 includes at least steps S202 to S212.
As shown in fig. 2, in S202, the current state of the target link to be detected is determined.
Before determining the current state of the target link to be detected, the method further comprises the following steps: receiving a link detection instruction, wherein the link detection instruction comprises a link identifier; determining, in a database, a currently detected link of the links based on a link identification; determining the link as the target link when a currently detected link of the links does not exist in the database. And when the current detection link of the links exists in the database, generating feedback information based on the result of the current detection link.
Receiving a link detection instruction, after other modules which refer to the health check link detection send a notice to the link detection module, checking whether other modules are detecting the same link or not, if so, immediately finding the corresponding link detection state, and sending back to the link state which is currently detected by the module which refers to the link detection.
In S204, when the current state is a normal state, fast link detection is started. If no other module is detecting the same link, the link detection is newly added, and the corresponding module starts to default the link to be in a normal state, namely starts to consider the link to be communicated.
And rapidly detecting the target address according to the link detection setting value to acquire the current link state. The fast detection may not be limited to increasing the packet transmission frequency, e.g. from 5 seconds per message to 1 second per message,
in S206, the target link is detected based on a fast link detection method, and a detection result is generated. A message may be sent to the target link, for example, based on a first detection frequency; and determining the detection result according to the feedback message of the message.
In S208, when the result of the fast link detection is normal, the link state normal information is fed back. If the data packet received the feedback indicates that the link is through, i.e. consistent with the initial default value, the link status is not reported to the reference module (since the corresponding module would have considered the link to be through), and the detection frequency is changed to the normal frequency (5 seconds for detection).
In S210, when the result of the fast link detection is abnormal, the link state abnormality information is fed back. If the first message does not receive the feedback message within a given time, the link detection is always failed after a certain number of times of attempts (the value can be set, and if the number is 3), the feedback detection module fails to communicate the link and timely informs the reference module. According to the assumed value of 1 second, one message is sent, the link is known to be not connected within 3 times of timeout, namely, the link is known to be not connected within 3 seconds according to the scheme before optimization, and after the link is determined to be not connected, the detection frequency is changed to be in a normal state (for example, 5 seconds).
In one embodiment, if a successful message is fed back before the threshold is not reached (3 times), the link is considered to be in a pass state and no longer detected quickly, but is returned to normal frequency (5 seconds) detection.
In S212, the target link is continuously detected based on the normal detection state. A message may be sent to the target link, for example, based on a second detection frequency; and determining the detection result according to the feedback message of the message. More specifically, for example, when no feedback packet is received three times consecutively, it may be determined that the detection result is abnormal.
According to the link state detection method disclosed by the invention, the current state of a target link to be detected is determined; when the current state is a normal state, starting rapid link detection; detecting the target link based on a rapid link detection mode to generate a detection result; when the result of the rapid link detection is normal, feeding back the normal information of the link state; the target link is continuously detected based on the normal detection state mode, so that the flexibility and the accuracy of link detection can be improved under the condition of not obviously increasing link load and equipment load, and the link detection efficiency is obviously improved.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 3 is a flow chart illustrating a method of link state detection according to another example embodiment. The process 30 shown in fig. 3 is a supplementary description of the process shown in fig. 2.
As shown in fig. 3, in S302, the target link is continuously detected based on a normal detection state manner.
In S304, when the detection result is abnormal, the fast link detection is started. The target link can be continuously detected based on a normal detection state mode; and when the feedback message cannot be received, determining that the detection result is abnormal.
In S306, the target link is detected based on a fast link detection method, and a detection result is generated.
In the link detection process, a link is in a communication state, a response message cannot be received by a detection message suddenly sent, the link is suspected to have a problem, the sending frequency of the detection message is increased (one detection message can be changed into 1 second, and continuous 3 messages cannot be received, namely the link is not communicated), if the response message is received before a threshold value is reached, the link state is considered to be in the communication state, the sending frequency of the detection message is changed back to the common frequency, if the threshold value is reached (3 times) or not, the link state is changed into the non-communication state, a relevant module for referring to the link detection is informed that the link state changes, and the detection frequency of the message is changed to be in the common frequency (5 seconds).
In one embodiment, the link state is a non-communication state in the link detection process, if the link is suddenly detected to be communicated, the link is directly considered to be communicated, a corresponding module for introducing the link detection is immediately notified, the link state changes, and the link packet sending detection frequency is still kept at a common frequency (5 seconds).
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 4 is a block diagram illustrating a link state detection apparatus according to an example embodiment. As shown in fig. 4, the link state detection device 40 includes: a retrieval module 402, a start module 404, a quick check module 406, a normal module 408, and an exception module 410.
The retrieval module 402 is configured to determine a current state of a target link to be detected;
the starting module 404 is configured to start fast link detection when the current state is a normal state;
the fast detection module 406 is configured to detect the target link based on a fast link detection manner, and generate a detection result;
the normal module 408 is configured to feed back normal information of the link status when the result of the fast link detection is normal; continuously detecting the target link based on a normal detection state mode;
the exception module 410 is configured to feed back link state exception information when a result of the fast link detection is an exception; and continuously detecting the target link based on a normal detection state mode.
According to the link state detection device disclosed by the invention, the current state of a target link to be detected is determined; when the current state is a normal state, starting rapid link detection; detecting the target link based on a rapid link detection mode to generate a detection result; when the result of the rapid link detection is normal, feeding back the normal information of the link state; the target link is continuously detected based on the normal detection state mode, so that the flexibility and the accuracy of link detection can be improved under the condition of not obviously increasing link load and equipment load, and the link detection efficiency is obviously improved.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 500 according to this embodiment of the disclosure is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one memory unit 520, a bus 530 that couples various system components including the memory unit 520 and the processing unit 510, a display unit 540, and the like.
Wherein the storage unit stores program code that is executable by the processing unit 510 to cause the processing unit 510 to perform the steps according to various exemplary embodiments of the present disclosure described in this specification. For example, the processing unit 510 may perform the steps as shown in fig. 2, fig. 3.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
The memory unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 500' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which the electronic device 500 interacts, and/or any devices (e.g., router, modem, etc.) with which the electronic device 500 can communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 6, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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 of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable 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. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: determining the current state of a target link to be detected; when the current state is a normal state, starting rapid link detection; detecting the target link based on a rapid link detection mode to generate a detection result; when the result of the rapid link detection is normal, feeding back the normal information of the link state; and continuously detecting the target link based on a normal detection state mode.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (12)

1. A method for link state detection, comprising:
determining the current state of a target link to be detected;
when the current state is a normal state, starting rapid link detection;
detecting the target link based on a rapid link detection mode to generate a detection result;
when the result of the rapid link detection is normal, feeding back the normal information of the link state;
and continuously detecting the target link based on a normal detection state mode.
2. The method of claim 1, further comprising:
when the result of the rapid link detection is abnormal, feeding back link state abnormal information;
and continuously detecting the target link based on a normal detection state mode.
3. The method of claim 1, wherein prior to determining the current state of the target link to be detected, further comprising:
receiving a link detection instruction, wherein the link detection instruction comprises a link identifier;
determining, in a database, a currently detected link of the links based on a link identification;
determining the link as the target link when a currently detected link of the links does not exist in the database.
4. The method of claim 3, comprising:
and when the current detection link of the links exists in the database, generating feedback information based on the result of the current detection link.
5. The method of claim 1, wherein after continuously detecting the target link based on a normal detection state manner, further comprising:
starting rapid link detection when the detection result of continuously detecting the target link based on the normal detection state mode is abnormal;
and detecting the target link based on a rapid link detection mode to generate a detection result.
6. The method as claimed in claim 5, wherein when the detection result of the continuous detection of the target link based on the normal detection state mode is abnormal, the method comprises:
continuously detecting the target link based on a normal detection state mode;
and when the feedback message cannot be received, determining that the detection result is abnormal.
7. The method of claim 1, wherein detecting the target link based on a fast link detection method to generate a detection result comprises:
sending a message to the target link based on a first detection frequency;
and determining the detection result according to the feedback message of the message.
8. The method of claim 1, wherein continuously detecting the target link based on a normal detection state comprises:
sending a message to the target link based on a second detection frequency;
and determining the detection result according to the feedback message of the message.
9. The method according to claim 7 or 8, wherein determining the detection result according to the feedback message of the message comprises:
and when the feedback message is not received for three times continuously, determining that the detection result is abnormal.
10. A link state detection apparatus, comprising:
the retrieval module is used for determining the current state of the target link to be detected;
the starting module is used for starting the rapid link detection when the current state is a normal state;
the fast detection module is used for detecting the target link based on a fast link detection mode to generate a detection result;
the normal module is used for feeding back the normal information of the link state when the result of the rapid link detection is normal; and continuously detecting the target link based on a normal detection state mode.
11. The apparatus of claim 10, further comprising:
the abnormal module is used for feeding back abnormal information of the link state when the result of the rapid link detection is abnormal; and continuously detecting the target link based on a normal detection state mode.
12. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
CN202110276232.XA 2021-03-15 2021-03-15 Link state detection method and device Pending CN112910742A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110276232.XA CN112910742A (en) 2021-03-15 2021-03-15 Link state detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110276232.XA CN112910742A (en) 2021-03-15 2021-03-15 Link state detection method and device

Publications (1)

Publication Number Publication Date
CN112910742A true CN112910742A (en) 2021-06-04

Family

ID=76105719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110276232.XA Pending CN112910742A (en) 2021-03-15 2021-03-15 Link state detection method and device

Country Status (1)

Country Link
CN (1) CN112910742A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615178A (en) * 2022-03-16 2022-06-10 北京轻网科技有限公司 Link quality detection method and device
CN116170235A (en) * 2023-04-24 2023-05-26 北京中安星云软件技术有限公司 Database optimized access method, system, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533113A (en) * 2003-03-20 2004-09-29 华为技术有限公司 Method for detecting transmission link state by using medium gateway control protocol
CN1925429A (en) * 2006-09-30 2007-03-07 杭州华为三康技术有限公司 Method and equipment for realizing fast detection
CN101123542A (en) * 2007-07-30 2008-02-13 华为技术有限公司 Method and system for link failure detection and device for link failure detection
CN101232406A (en) * 2007-01-26 2008-07-30 华为技术有限公司 OAM fast detecting method, apparatus and system
CN102368720A (en) * 2011-10-28 2012-03-07 华为技术有限公司 Link state detection method, apparatus and system
CN102480753A (en) * 2010-11-24 2012-05-30 中兴通讯股份有限公司 Link state detecting method and device
CN104991850A (en) * 2015-06-27 2015-10-21 广州华多网络科技有限公司 Heartbeat package control method and apparatus for application program
CN106549774A (en) * 2015-09-17 2017-03-29 中兴通讯股份有限公司 A kind of link failure report method and forwarding unit based on software defined network

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533113A (en) * 2003-03-20 2004-09-29 华为技术有限公司 Method for detecting transmission link state by using medium gateway control protocol
CN1925429A (en) * 2006-09-30 2007-03-07 杭州华为三康技术有限公司 Method and equipment for realizing fast detection
CN101232406A (en) * 2007-01-26 2008-07-30 华为技术有限公司 OAM fast detecting method, apparatus and system
CN101123542A (en) * 2007-07-30 2008-02-13 华为技术有限公司 Method and system for link failure detection and device for link failure detection
CN102480753A (en) * 2010-11-24 2012-05-30 中兴通讯股份有限公司 Link state detecting method and device
CN102368720A (en) * 2011-10-28 2012-03-07 华为技术有限公司 Link state detection method, apparatus and system
CN104991850A (en) * 2015-06-27 2015-10-21 广州华多网络科技有限公司 Heartbeat package control method and apparatus for application program
CN106549774A (en) * 2015-09-17 2017-03-29 中兴通讯股份有限公司 A kind of link failure report method and forwarding unit based on software defined network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615178A (en) * 2022-03-16 2022-06-10 北京轻网科技有限公司 Link quality detection method and device
CN114615178B (en) * 2022-03-16 2024-02-13 北京轻网科技股份有限公司 Link quality detection method and device
CN116170235A (en) * 2023-04-24 2023-05-26 北京中安星云软件技术有限公司 Database optimized access method, system, equipment and medium
CN116170235B (en) * 2023-04-24 2023-08-25 北京中安星云软件技术有限公司 Database optimized access method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN108696589B (en) Block chain data transmission method, device, equipment and storage medium
US10257316B2 (en) Monitoring of node.js applications
EP4060958B1 (en) Attack behavior detection method and apparatus, and attack detection device
CN112910742A (en) Link state detection method and device
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
US8332690B1 (en) Method and apparatus for managing failures in a datacenter
CN111954240A (en) Network fault processing method and device and electronic equipment
US10191844B2 (en) Automatic garbage collection thrashing monitoring
US20210112025A1 (en) Method and server for processing messages
CN110620806A (en) Information generation method and device
CN114449040B (en) Configuration issuing method and device based on cloud platform
CN114257632B (en) Method and device for reconnecting broken wire, electronic equipment and readable storage medium
CN114679295B (en) Firewall security configuration method and device
US7558770B2 (en) Method and system to detect application non-conformance
CN114741158A (en) Page switching method, device, equipment and storage medium
CN112217718A (en) Service processing method, device, equipment and storage medium
CN110764932A (en) Data processing method, system, medium and computing device
CN113411800B (en) Method and device for assisting client in wireless network switching
CN114598524B (en) Method, device, equipment and storage medium for detecting agent tool
CN114448703B (en) Request processing method, request processing device, electronic equipment and storage medium
CN115277506B (en) Load balancing equipment testing method and system
CN113360939B (en) Security access control method and device
CN114938341B (en) Environment detection method and device, electronic equipment and storage medium
CN116260855B (en) Communication method, communication device, electronic equipment and storage medium
CN114826886B (en) Disaster recovery method and device for application software and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210604