WO2017215537A1 - Method and apparatus for updating link state of communication port - Google Patents

Method and apparatus for updating link state of communication port Download PDF

Info

Publication number
WO2017215537A1
WO2017215537A1 PCT/CN2017/087863 CN2017087863W WO2017215537A1 WO 2017215537 A1 WO2017215537 A1 WO 2017215537A1 CN 2017087863 W CN2017087863 W CN 2017087863W WO 2017215537 A1 WO2017215537 A1 WO 2017215537A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication port
communication
result
link
time period
Prior art date
Application number
PCT/CN2017/087863
Other languages
French (fr)
Chinese (zh)
Inventor
仇兵
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017215537A1 publication Critical patent/WO2017215537A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • 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

Definitions

  • the present disclosure relates to the field of communications, and in particular, to a link state update method and apparatus for a communication port.
  • the communication port link state update generally adopts a synchronization mechanism.
  • the state of the communication port is synchronously updated to the software table, and the service module is notified, and the service module passes the configuration of the current device and the communication port.
  • the link status is related to the business action. Under normal circumstances, the faster the update speed, the more sensitive the device response speed, and the anti-interference and robustness of the device are correspondingly worse.
  • the communication port In a network environment with poor link quality, the communication port is normally flashed. If the link status of the communication port is reported in real time, for some services, the service may be interrupted for several minutes, and the stability of the device work may be deteriorated.
  • the technical problem to be solved by the present disclosure is to provide a reliable link state update method for a communication port, by which the update policy can be selected to update the link state of the communication port according to the communication quality of the communication port, thereby avoiding the abnormality of the link state of the communication port.
  • the update causes business errors to be updated, avoiding business interruptions and ensuring stable operation of the communication device.
  • a link state update method for a communication port includes:
  • a policy for updating the status of the communication port is determined based on the detection result.
  • the detection result includes a first result and a second result
  • the communication port is an optical communication port
  • the communication quality detection of the communication port obtains a detection result, including:
  • the optical signal loss LOS signal of the communication port is checked according to a time period t1. If the number of times the LOS signal is generated and eliminated by the communication port is not c1 times, the communication quality of the communication port is determined to be a first result;
  • the detection result includes a first result and a second result
  • the communication port is an electrical communication port
  • the communication quality detection of the communication port obtains a detection result, including:
  • the determining, according to the detection result, a policy for updating a status of the communication port includes:
  • the link state of the communication port is updated in real time
  • the link status of the communication port is updated in real time, and the link status of the communication port is reported to the service module in real time.
  • the link status of the communication port is delayed, including:
  • the embodiment of the present disclosure further provides a link state update device of a communication port, where the update device includes:
  • a detecting module configured to detect a communication quality of the communication port, and obtain a detection result
  • the processing module is configured to determine to perform real-time update or delayed update on the status of the communication port according to the detection result.
  • the detection result includes a first result and a second result
  • the communication port is an optical communication port
  • the detection module is configured to:
  • the detection result includes a first result and a second result
  • the communication port is an electrical communication port
  • the detection module is configured to:
  • the processing module is configured to:
  • the link state of the communication port is updated in real time
  • the embodiment of the present disclosure further provides a storage medium configured to store a program code, the program code being set to perform a link state update method of the communication port according to any one of the above.
  • the communication quality of the communication port is detected, and the update policy is performed on the status of the communication port according to the detection result.
  • the service error update may be avoided due to the abnormality of the communication port link status, and the service abnormality is avoided. Interrupt, to ensure that the communication equipment works stably.
  • the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.
  • FIG. 1 shows a flow chart of adaptive selection of a communication port network environment
  • FIG. 2 is a schematic diagram showing a communication port link state update device
  • FIG. 3 is a schematic diagram showing adaptive selection of a network environment of a communication port according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart showing a link state update of a communication port according to an embodiment of the present disclosure.
  • the embodiment of the present disclosure provides a reliable link state update method for a communication port, which is directed to an abnormal update of a communication port link state in the related art, resulting in a service error update, an abnormal interruption, and a communication device instability.
  • the communication quality is detected by the communication port, and an update policy is performed on the state of the communication port according to the detection result.
  • the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and improving the reliability of the communication device.
  • this embodiment divides the network environment quality into two categories:
  • a network environment with good communication quality Such environments are generally used in operators such as mobile and China Unicom.
  • the quality requirements for the network cable and the optical fiber are extremely strict, the wiring must also meet certain specifications, the device is responsive, and the link state changes in real time, even if the link generates a very short flash, the device Can catch it, and the business will make the corresponding action.
  • the network environment with poor communication quality This kind of environment is generally used in government, enterprise, finance and other industries. In this environment, the stable operation of the business is crucial, and it is more concerned than the sensitivity of the equipment. It is the stability and anti-interference of the device. Therefore, the device used in this environment needs to filter out the small interference in the link. When a flash occurs in the link, the device considers it as a normal phenomenon in the link. Filtered out, the business does not remain processed due to flash processing.
  • this embodiment provides a link state update method for a communication port, and the update method includes:
  • Step S1 detecting communication quality of the communication port, and obtaining a detection result
  • Step S2 According to the detection result, it is determined that the status of the communication port is updated in real time or delayed.
  • the embodiment of the present disclosure detects the communication quality of the communication port, and performs an update policy on the status of the communication port according to the detection result. Through this solution, it is possible to avoid the update of the service error due to the abnormality of the link state of the communication port, to avoid the abnormal interruption of the service, and to ensure the stable operation of the communication device.
  • the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.
  • the communication port of the communication device is divided into an optical communication port and an electrical communication port, and the standards for judging the communication quality are different for different communication ports.
  • the communication quality detection of the communication port is detected, including:
  • the LOS signal of the communication port is checked according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times during the T1 time period, it is judged that the communication quality of the communication port is the second result.
  • the communication quality detection of the communication port is detected, including:
  • the policy for determining the status of the communication port according to the detection result including:
  • the link state of the communication port is updated in real time
  • the link status of the communication port is updated in real time, and the link status of the communication port is reported to the service module in real time.
  • delay updating the link status of the communication port including:
  • the embodiment further provides a link state update device for the communication port.
  • the update device includes:
  • the detecting module 21 is configured to detect a communication quality of the communication port, and obtain a detection result
  • the processing module 22 is configured to determine a policy for updating the status of the communication port according to the detection result.
  • the communication quality of the communication port is detected, and an update policy is performed on the state of the communication port according to the detection result.
  • the communication port of the communication device is divided into an optical communication port and an electrical communication port, and the standards for judging the communication quality are different for different communication ports.
  • the detection module is configured to:
  • the LOS signal of the communication port is checked according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times during the T1 time period, it is judged that the communication quality of the communication port is the second result.
  • the detection module is configured to:
  • processing module is set to:
  • the link state of the communication port is updated in real time
  • the link status update device When the link status of the automatic switching communication port is real-time update or delayed update, the link status update device will perform different processing according to the current selection:
  • the link state update device selects the link state of the communication port to be updated in real time, when the link state of the communication port changes, the service module is immediately notified;
  • the link state update device selects the link state delay update of the communication port, the link state of the communication port is periodically scanned, and the change of the link state is confirmed. If the link state changes, in one embodiment, the link state that can be divided into the communication port changes from the link disconnection frequent LINK DOWN to the link normal LINK UP and from the LINK UP to the LINK DOWN.
  • the link state update device If the link state of the communication port is changed from LINK UP to LINK DOWN, the link state update device considers that the link state of the communication port has not changed, the current link state is still LINK UP, and the link state update device starts the LINK DOWN timer and starts.
  • the link state update device considers that the link state of the communication port changes, and the current LINK DOWN state Reporting the notification to the service module; when the LINK DOWN status has not reached the specified threshold, the hardware status of the communication port becomes LINK UP, the link status update device clears the LINK DOWN timer, and considers that the LINK DOWN has not occurred, nor will it This status change is reported to the business module.
  • the link status of the communication port is changed from LINK DOWN to LINK UP, the LINK DOWN timer is cleared and the link status of the communication port is reported to the service module.
  • the communication port includes PORT1 and PORT2, PORT1 is in a network environment with good communication quality, and PORT2 is in a network environment with poor communication quality:
  • the communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as the delay. new;
  • the communication port PORT1 waits for the next cycle to continue scanning the link state of the communication port PORT1;
  • the communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as delayed update;
  • the communication port PORT1 waits for the next cycle to continue scanning the link state of the communication port PORT1;
  • the link status of communication port PORT1 and communication port PORT2 changes from LINK UP to LINK DOWN
  • the communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as delayed update;
  • the link status of the communication port PORT1 is reported to the service module, waiting for the next cycle to continue scanning the link state of the communication port PORT1;
  • the LINK DOWN timer of the communication port PORT2 is accumulated. If the link state of the port PORT2 is kept LINK DOWN for a specified threshold, the current LINK DOWN status is reported to the service module; otherwise, the link status of the default communication port PORT2 is LINK. UP, does not report the business module, and scans for the next cycle.
  • the communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as delayed update;
  • the link status of the communication port PORT1 is reported to the service module, waiting for the next cycle to continue scanning the link state of the communication port PORT1;
  • the LINK DOWN timer of the communication port PORT2 is cleared, the link state of the communication port PORT2 is reported to the service module, and the next cycle is continued to scan the link state of the communication port PORT2;
  • FIG. 3 is a schematic diagram of network adaptive selection in the present disclosure, including the following steps:
  • Step 101 Query the i-th communication port (i starts from 1), and proceed to step 102;
  • Step 102 Determine whether the communication port is an optical communication port, if it is an optical communication port, proceed to step 103; if it is not an optical communication port, proceed to step 104;
  • Step 103 Waiting for time t1, proceeding to step 105;
  • Step 104 Waiting for time t2, proceeding to step 106;
  • Step 105 Determine whether the number of times the communication port generates and cancels the LOS times in the time t1 reaches c1 times, if yes, proceeds to step 107; if not, proceeds to step 109;
  • Step 106 Determine whether the communication port network line disconnection and recovery times in c2 time c2 times, if yes, proceed to step 108; if not, proceed to step 109;
  • Step 107 Determine whether the number of times the communication port generates c1 in the time period T1 reaches C1 times. If it is reached, it proves that the communication quality of the network environment is not good, the link connection is poor, and the probability of flashing is high, and the link state updating device is Adapting the selection to delay reporting, proceeding to step 110; if not, proving that the network communication environment is normal, the probability of flashing is low, proceeding to step 109;
  • Step 108 Determine whether the communication port generates c2 times in the time period T2 to reach C2 times, if yes, proceed to step 110; if not, proceed to step 109;
  • Step 109 The link status update device reports the port link status in real time, and proceeds to step 111.
  • Step 110 The link state update device delays reporting the port link state, and proceeds to step 111.
  • Step 201 Set the timer threshold T of the communication port LINK DOWN, and go to step 202.
  • Step 202 Clear the LINK DOWN timer t of each communication port recorded in the software table to step 203.
  • Step 203 Query the port of the i-th (i from 0) communication port, and go to step 204.
  • Step 204 Obtain a link status of the i-th communication port, determine whether the link status of the port changes, if the link status changes, proceed to step 205; if the link status does not change, proceed to step 209.
  • Step 205 Confirm whether the link status of the communication port is changed from LINK DOWN to LINK UP. If it changes from LINK DOWN to LINK UP, go to step 206. If it has not changed from LINK DOWN to LINK UP, go to step 210.
  • step 206 it is confirmed that the link state update device adapts the communication port to the time delay report or the real-time report. If the time delay is reported, it indicates that the environment is applied to the environment with strong anti-interference requirements, and step 207 is performed. When applied to an environment requiring fast convergence, step 208 is performed.
  • Step 207 Clear the ith communication port LINK DOWN timer to 0, and go to step 208.
  • Step 208 Reporting to the upper layer software, performing step 209.
  • Step 209 Delay the time T1, query the i+1th port, and return to step 203.
  • step 210 it is confirmed that the link state update device adapts the communication port to the time delay report or the real time report. If the time is reported, the process proceeds to step 211.
  • Step 211 The communication port LINK DOWN timer t is cumulatively incremented by one, and step 212 is performed.
  • Step 212 Confirm whether the current LINK DOWN timer t is greater than the set threshold T. If it is greater than the set threshold T, proceed to step 208. If it is not greater than the set threshold T, proceed to step 213.
  • Step 213 The link state update device considers that the communication port is not LINK DOWN, and is still LINK UP, and proceeds to step 209.
  • the method and device for updating the link status of the communication port provided by the embodiment of the present disclosure can detect the communication quality of the communication port and perform an update policy on the status of the communication port according to the detection result.
  • the abnormal status of the update causes the service error to be updated, avoiding the abnormal interruption of the service, and ensuring the stable operation of the communication device.
  • the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Provided in the present disclosure are a method and apparatus for updating a link state of a communication port, the updating method comprising: detecting communication quality of a communication port to obtain a detection result; and determining a policy for updating a state of the communication port according to the detection result. According to a technical solution of the present disclosure, it is possible to update a link state of a communication port in a real time manner or to update a link state of a communication port in a delayed manner according to the communication quality of the communication port. The present disclosure takes both fast convergence and anti-jamming of the communication equipment into consideration, and ensures the stable operation of the communication equipment.

Description

一种通信端口的链接状态更新方法及装置Link state update method and device for communication port 技术领域Technical field
本公开涉及通信领域,特别涉及一种通信端口的链接状态更新方法以及装置。The present disclosure relates to the field of communications, and in particular, to a link state update method and apparatus for a communication port.
背景技术Background technique
目前,通信端口链接状态更新普遍采用的是一种同步机制,通过读取通信端口的实际链接状态,将其状态同步更新到软件表,并通知业务模块,业务模块通过当前设备的配置以及通信端口的链接状态进行相关的业务动作。通常情况下,该更新速度越快,设备反应速度也就越灵敏,而设备的抗干扰性和鲁棒性相应变差。At present, the communication port link state update generally adopts a synchronization mechanism. By reading the actual link state of the communication port, the state of the communication port is synchronously updated to the software table, and the service module is notified, and the service module passes the configuration of the current device and the communication port. The link status is related to the business action. Under normal circumstances, the faster the update speed, the more sensitive the device response speed, and the anti-interference and robustness of the device are correspondingly worse.
在链接质量稍差的网络环境中,通信端口的一次正常闪断,如果将通信端口的链接状态实时上报,对某些业务,有可能会导致业务中断若干分钟,设备工作的稳定性变差。In a network environment with poor link quality, the communication port is normally flashed. If the link status of the communication port is reported in real time, for some services, the service may be interrupted for several minutes, and the stability of the device work may be deteriorated.
发明内容Summary of the invention
本公开要解决的技术问题是提供一种可靠的通信端口的链接状态更新方法,利用此方法可以按照通信端口的通信质量,选择更新策略更新通信端口的链接状态,避免因通信端口链接状态的异常更新而导致业务错误更新,避免业务异常中断,保证通信设备稳定工作。The technical problem to be solved by the present disclosure is to provide a reliable link state update method for a communication port, by which the update policy can be selected to update the link state of the communication port according to the communication quality of the communication port, thereby avoiding the abnormality of the link state of the communication port. The update causes business errors to be updated, avoiding business interruptions and ensuring stable operation of the communication device.
为解决上述技术问题,本公开的提供技术方案如下:In order to solve the above technical problem, the technical solution of the present disclosure is as follows:
一种通信端口的链接状态更新方法,所述更新方法包括:A link state update method for a communication port, the update method includes:
对所述通信端口的通信质量检测,得到检测结果;Detecting communication quality of the communication port, and obtaining a detection result;
根据所述检测结果,确定对所述通信端口的状态进行更新的策略。A policy for updating the status of the communication port is determined based on the detection result.
在一实施例中,所述检测结果包括第一结果和第二结果,所述通信端口为光通信端口,所述对所述通信端口的通信质量检测得到检测结果,包括:In an embodiment, the detection result includes a first result and a second result, the communication port is an optical communication port, and the communication quality detection of the communication port obtains a detection result, including:
按时间周期t1检查所述通信端口的光信号丢失LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数未达到c1次,则判断所述通信端口的通信质量为第一结果;The optical signal loss LOS signal of the communication port is checked according to a time period t1. If the number of times the LOS signal is generated and eliminated by the communication port is not c1 times, the communication quality of the communication port is determined to be a first result;
按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1未达到C1次,则判断所述通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 does not reach C1 times in the T1 time period, it is determined that the The communication quality of the communication port is the first result;
按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1达到C1次,则判断所述通信端口的通信质量为第二结果。Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times in the T1 time period, the communication is judged. The communication quality of the port is the second result.
在一实施例中,所述检测结果包括第一结果和第二结果,所述通信端口为电通信端口,所述对所述通信端口的通信质量检测得到检测结果,包括:In an embodiment, the detection result includes a first result and a second result, the communication port is an electrical communication port, and the communication quality detection of the communication port obtains a detection result, including:
按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线 产生断开和恢复的次数未达到c2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2, if the communication port network line is accumulated If the number of times of disconnection and recovery does not reach c2 times, determining that the communication quality of the communication port is the first result;
按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2未达到C2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 does not reach C2 times within the T2 time period, the communication is judged. The communication quality of the port is the first result;
按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2达到C2次,则判断所述通信端口的通信质量为第二结果。Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 reaches C2 times during the T2 time period, the communication port is judged. The quality of communication is the second result.
在一实施例中,所述根据所述检测结果确定所述通信端口的状态进行更新的策略,包括:In an embodiment, the determining, according to the detection result, a policy for updating a status of the communication port includes:
在所述检测结果为第一结果时,对所述通信端口的链接状态进行实时更新;When the detection result is the first result, the link state of the communication port is updated in real time;
在所述检测结果为第二结果时,对所述通信端口的链接状态进行延时更新。When the detection result is the second result, the link state of the communication port is delayedly updated.
在一实施例中,对所述通信端口的链接状态进行实时更新,所述通信端口的链接状态实时上报给业务模块。In an embodiment, the link status of the communication port is updated in real time, and the link status of the communication port is reported to the service module in real time.
在一实施例中,对所述通信端口的链接状态进行延时更新,包括:In an embodiment, the link status of the communication port is delayed, including:
在所述通信端口的链接状态从链接正常变为链接中断时,如果保持链接中断的时间超过阈值时间,则在链接中断超过阈值时间之后,将所述通信端口的当前链接状态上报给业务模块;When the link state of the communication port is changed from the link normal to the link interruption, if the link interruption time exceeds the threshold time, the current link state of the communication port is reported to the service module after the link interruption exceeds the threshold time;
在所述通信端口的链接状态从链接正常变为链接中断时,如果保持链接中断的时间不超过阈值时间,则不将所述通信端口的当前链接状态上报给业务模块。When the link state of the communication port is changed from the link normal to the link interruption, if the link interruption time does not exceed the threshold time, the current link state of the communication port is not reported to the service module.
本公开实施例还提供了一种通信端口的链接状态更新装置,所述更新装置包括:The embodiment of the present disclosure further provides a link state update device of a communication port, where the update device includes:
检测模块,设置为对所述通信端口的通信质量检测,得到检测结果;a detecting module, configured to detect a communication quality of the communication port, and obtain a detection result;
处理模块,设置为根据所述检测结果,确定对所述通信端口的状态进行实时更新或延时更新。The processing module is configured to determine to perform real-time update or delayed update on the status of the communication port according to the detection result.
在一实施例中,所述检测结果包括第一结果和第二结果,所述通信端口为光通信端口,所述检测模块设置为:In an embodiment, the detection result includes a first result and a second result, the communication port is an optical communication port, and the detection module is configured to:
按时间周期t1检查所述通信端口的LOS信号,如果累计所述通信端口产生和消除LOS信号的次数未达到c1次,则判断所述通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to the time period t1. If the number of times the LOS signal is generated and eliminated by the communication port is not up to c1 times, determining the communication quality of the communication port is the first result;
按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1未达到C1次,则判断所述通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 does not reach C1 times in the T1 time period, it is determined that the The communication quality of the communication port is the first result;
按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1达到C1次,则判断所述通信端口的通信质量为第二结果。Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times in the T1 time period, the communication is judged. The communication quality of the port is the second result.
在一实施例中,所述检测结果包括第一结果和第二结果,所述通信端口为电通信端口,所述检测模块设置为: In an embodiment, the detection result includes a first result and a second result, the communication port is an electrical communication port, and the detection module is configured to:
按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数未达到c2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is not c2 times, determining the communication quality of the communication port is the first result;
按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2未达到C2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 does not reach C2 times within the T2 time period, the communication is judged. The communication quality of the port is the first result;
按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2达到C2次,则判断所述通信端口的通信质量为第二结果。Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 reaches C2 times during the T2 time period, the communication port is judged. The quality of communication is the second result.
在一实施例中,所述处理模块设置为:In an embodiment, the processing module is configured to:
在所述检测结果为第一结果时,对所述通信端口的链接状态进行实时更新;When the detection result is the first result, the link state of the communication port is updated in real time;
在所述检测结果为第二结果时,对所述通信端口的链接状态进行延时更新。When the detection result is the second result, the link state of the communication port is delayedly updated.
本公开实施例还提供了一种存储介质,设置为存储程序代码,所述程序代码设置为执行如上任一项所述的通信端口的链接状态更新方法。The embodiment of the present disclosure further provides a storage medium configured to store a program code, the program code being set to perform a link state update method of the communication port according to any one of the above.
本公开所带来的有益效果如下:The beneficial effects brought by the present disclosure are as follows:
上述方案中,对通信端口的通信质量进行检测,并根据检测结果对所述通信端口的状态执行更新策略通过此方案,可以避免因通信端口链接状态的异常而更新导致业务错误更新,避免业务异常中断,保证通信设备稳定工作。此外,本公开支持不同通信质量的通信端口,兼顾了通信设备的灵敏性和抗干扰性,大大提高了通信设备的可靠性。In the above solution, the communication quality of the communication port is detected, and the update policy is performed on the status of the communication port according to the detection result. According to the solution, the service error update may be avoided due to the abnormality of the communication port link status, and the service abnormality is avoided. Interrupt, to ensure that the communication equipment works stably. In addition, the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.
附图说明DRAWINGS
图1表示通信端口网络环境自适应选择流程图;1 shows a flow chart of adaptive selection of a communication port network environment;
图2表示通信端口链接状态更新装置示意图;2 is a schematic diagram showing a communication port link state update device;
图3表示本公开实施例提供的通信端口的网络环境自适应选择示意图;FIG. 3 is a schematic diagram showing adaptive selection of a network environment of a communication port according to an embodiment of the present disclosure;
图4表示本公开实施例提供的通信端口的链接状态更新流程图。FIG. 4 is a flowchart showing a link state update of a communication port according to an embodiment of the present disclosure.
具体实施方式detailed description
为使本公开的实施例要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。The technical problems, the technical solutions, and the advantages of the embodiments of the present disclosure will become more apparent from the following detailed description.
本公开的实施例针对相关技术中通信端口链接状态的异常更新而导致业务错误更新、异常中断,通信设备不稳定的问题,提供一种可靠的通信端口的链接状态更新方法。通过通信端口的通信质量检测,并根据检测结果对所述通信端口的状态执行更新策略。本公开支持不同通信质量的通信端口,兼顾了通信设备的灵敏性和抗干扰性,提高了通信设备的可靠性。The embodiment of the present disclosure provides a reliable link state update method for a communication port, which is directed to an abnormal update of a communication port link state in the related art, resulting in a service error update, an abnormal interruption, and a communication device instability. The communication quality is detected by the communication port, and an update policy is performed on the state of the communication port according to the detection result. The present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and improving the reliability of the communication device.
考虑到设备所在的网络环境质量各有差异,本实施例将网络环境质量分为两类:Considering the differences in the quality of the network environment where the devices are located, this embodiment divides the network environment quality into two categories:
1、通信质量好的网络环境,这类环境一般应用于移动、联通等运营商,在这种环境 下,对网线、光纤的质量要求极为严格,布线也要满足一定的规范,设备反应灵敏,对链路的状态变化做出实时反应,即使是链路中产生时间极短的闪断,设备也能捕捉的到,并且业务会做出相应的动作。1. A network environment with good communication quality. Such environments are generally used in operators such as mobile and China Unicom. The quality requirements for the network cable and the optical fiber are extremely strict, the wiring must also meet certain specifications, the device is responsive, and the link state changes in real time, even if the link generates a very short flash, the device Can catch it, and the business will make the corresponding action.
2、通信质量差的网络环境,这类环境一般用于政府、企业、金融等行业,在这种环境中,业务的稳定运行是至关重要的,比起设备的灵敏性,更要关心的是设备的稳定性和抗干扰性,因此,用于这种环境的设备,需要过滤掉链路中的微小干扰,当链路中出现闪断时,设备将其认为链路中的正常现象并过滤掉,业务不因闪断做出处理而保持正常运行。2. The network environment with poor communication quality. This kind of environment is generally used in government, enterprise, finance and other industries. In this environment, the stable operation of the business is crucial, and it is more concerned than the sensitivity of the equipment. It is the stability and anti-interference of the device. Therefore, the device used in this environment needs to filter out the small interference in the link. When a flash occurs in the link, the device considers it as a normal phenomenon in the link. Filtered out, the business does not remain processed due to flash processing.
通过以上标准,可以判断出链路状态的好坏。Through the above criteria, it can be judged whether the link status is good or bad.
如图1所示,本实施例提出一种通信端口的链接状态更新方法,更新方法包括:As shown in FIG. 1 , this embodiment provides a link state update method for a communication port, and the update method includes:
步骤S1:对通信端口的通信质量检测,得到检测结果;Step S1: detecting communication quality of the communication port, and obtaining a detection result;
步骤S2:根据检测结果,确定对通信端口的状态进行实时更新或延时更新。Step S2: According to the detection result, it is determined that the status of the communication port is updated in real time or delayed.
本公开实施例对通信端口的通信质量进行检测,并根据检测结果对通信端口的状态执行更新策略。通过此方案,可以避免因通信端口链接状态的异常而更新导致业务错误更新,避免业务异常中断,保证通信设备稳定工作。此外,本公开支持不同通信质量的通信端口,兼顾了通信设备的灵敏性和抗干扰性,大大提高了通信设备的可靠性。The embodiment of the present disclosure detects the communication quality of the communication port, and performs an update policy on the status of the communication port according to the detection result. Through this solution, it is possible to avoid the update of the service error due to the abnormality of the link state of the communication port, to avoid the abnormal interruption of the service, and to ensure the stable operation of the communication device. In addition, the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.
通信设备的通信端口分为光通信端口和电通信端口,对于不同的通信端口,判断通信质量的标准不尽相同。The communication port of the communication device is divided into an optical communication port and an electrical communication port, and the standards for judging the communication quality are different for different communication ports.
可选地,当通信端口为光通信端口时,对通信端口的通信质量检测得到检测结果,包括:Optionally, when the communication port is an optical communication port, the communication quality detection of the communication port is detected, including:
按时间周期t1检查通信端口的光信号丢失LOS信号,如果累计通信端口产生和消除LOS信号的次数未达到c1次,则判断通信端口的通信质量为第一结果;Checking the optical signal loss LOS signal of the communication port according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal does not reach c1 times, determining the communication quality of the communication port is the first result;
按时间周期t1检查通信端口的LOS信号,如果累计通信端口产生和消除LOS信号的次数达到c1次,且在T1时间段内c1未达到C1次,则判断通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal reaches c1 times, and c1 does not reach C1 times in the T1 time period, it is determined that the communication quality of the communication port is the first result;
按时间周期t1检查通信端口的LOS信号,如果累计通信端口产生和消除LOS信号的次数达到c1次,且在T1时间段内c1达到C1次,则判断通信端口的通信质量为第二结果。The LOS signal of the communication port is checked according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times during the T1 time period, it is judged that the communication quality of the communication port is the second result.
可选地,当通信端口为电通信端口时,对通信端口的通信质量检测得到检测结果,包括:Optionally, when the communication port is an electrical communication port, the communication quality detection of the communication port is detected, including:
按时间周期t2检查通信端口网线的线路连接状态,如果累计通信端口网线产生断开和恢复的次数未达到c2次,则判断通信端口的通信质量为第一结果;Checking the line connection status of the communication port network cable according to the time period t2. If the number of disconnection and recovery of the accumulated communication port network line does not reach c2 times, determining the communication quality of the communication port is the first result;
按时间周期t2检查通信端口网线的线路连接状态,如果累计通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2未达到C2次,则判断通信端口的通信质量为第一结果;Check the line connection status of the communication port network cable according to the time period t2. If the number of disconnection and recovery of the accumulated communication port network line reaches c2 times, and c2 does not reach C2 times within the T2 time period, it is judged that the communication quality of the communication port is the first. a result
按时间周期t2检查通信端口网线的线路连接状态,如果累计通信端口网线产生断开 和恢复的次数达到c2次,且在T2时间段内c2达到C2次,则判断通信端口的通信质量为第二结果。Check the line connection status of the communication port network cable according to the time period t2, if the accumulated communication port network line is disconnected The number of times of recovery and recovery reaches c2 times, and c2 reaches C2 times during the T2 time period, and then the communication quality of the communication port is judged to be the second result.
可选地,根据检测结果确定通信端口的状态进行更新的策略,包括:Optionally, the policy for determining the status of the communication port according to the detection result, including:
在检测结果为第一结果时,对通信端口的链接状态进行实时更新;When the detection result is the first result, the link state of the communication port is updated in real time;
在检测结果为第二结果时,对通信端口的链接状态进行延时更新。When the detection result is the second result, the link state of the communication port is delayedly updated.
可选地,对通信端口的链接状态进行实时更新,通信端口的链接状态实时上报给业务模块。Optionally, the link status of the communication port is updated in real time, and the link status of the communication port is reported to the service module in real time.
可选地,对通信端口的链接状态进行延时更新,包括:Optionally, delay updating the link status of the communication port, including:
在通信端口的链接状态从链接正常变为链接中断时,如果保持链接中断的时间超过阈值时间,则在链接中断超过阈值时间之后将通信端口的当前链接状态上报给业务模块;When the link state of the communication port is changed from the link normal to the link interruption, if the link interruption time exceeds the threshold time, the current link state of the communication port is reported to the service module after the link interruption exceeds the threshold time;
在通信端口的链接状态从链接正常变为链接中断时,如果保持链接中断的时间不超过阈值时间,则不将所述通信端口的当前链接状态上报给业务模块。When the link state of the communication port is changed from the link normal to the link interruption, if the link interruption time does not exceed the threshold time, the current link state of the communication port is not reported to the service module.
本实施例还提供了一种通信端口的链接状态更新装置,如图2所示,所述更新装置包括:The embodiment further provides a link state update device for the communication port. As shown in FIG. 2, the update device includes:
检测模块21,设置为对所述通信端口的通信质量检测,得到检测结果;The detecting module 21 is configured to detect a communication quality of the communication port, and obtain a detection result;
处理模块22,设置为根据所述检测结果,确定对所述通信端口的状态进行更新的策略。The processing module 22 is configured to determine a policy for updating the status of the communication port according to the detection result.
本实施例对通信端口的通信质量进行检测,并根据检测结果对所述通信端口的状态执行更新策略。通过此方案,可以避免因通信端口链接状态的异常而更新导致业务错误更新,避免业务异常中断,保证通信设备稳定工作。此外,本公开支持不同通信质量的通信端口,兼顾了通信设备的灵敏性和抗干扰性,大大提高了通信设备的可靠性。In this embodiment, the communication quality of the communication port is detected, and an update policy is performed on the state of the communication port according to the detection result. Through this solution, it is possible to avoid the update of the service error due to the abnormality of the link state of the communication port, to avoid the abnormal interruption of the service, and to ensure the stable operation of the communication device. In addition, the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.
通信设备的通信端口分为光通信端口和电通信端口,对于不同的通信端口,判断通信质量的标准不尽相同。The communication port of the communication device is divided into an optical communication port and an electrical communication port, and the standards for judging the communication quality are different for different communication ports.
可选地,当通信端口为光通信端口时,检测模块设置为:Optionally, when the communication port is an optical communication port, the detection module is configured to:
按时间周期t1检查通信端口的LOS信号,如果累计通信端口产生和消除LOS信号的次数未达到c1次,则判断通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal does not reach c1 times, it is determined that the communication quality of the communication port is the first result;
按时间周期t1检查通信端口的LOS信号,如果累计通信端口产生和消除LOS信号的次数达到c1次,且在T1时间段内c1未达到C1次,则判断通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal reaches c1 times, and c1 does not reach C1 times in the T1 time period, it is determined that the communication quality of the communication port is the first result;
按时间周期t1检查通信端口的LOS信号,如果累计通信端口产生和消除LOS信号的次数达到c1次,且在T1时间段内c1达到C1次,则判断通信端口的通信质量为第二结果。The LOS signal of the communication port is checked according to the time period t1. If the number of times the accumulated communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times during the T1 time period, it is judged that the communication quality of the communication port is the second result.
可选地,当通信端口为电通信端口时,检测模块设置为:Optionally, when the communication port is an electrical communication port, the detection module is configured to:
按时间周期t2检查通信端口网线的线路连接状态,如果累计通信端口网线产生断开和恢复的次数未达到c2次,则判断通信端口的通信质量为第一结果; Checking the line connection status of the communication port network cable according to the time period t2. If the number of disconnection and recovery of the accumulated communication port network line does not reach c2 times, determining the communication quality of the communication port is the first result;
按时间周期t2检查通信端口网线的线路连接状态,如果累计通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2未达到C2次,则判断通信端口的通信质量为第一结果;Check the line connection status of the communication port network cable according to the time period t2. If the number of disconnection and recovery of the accumulated communication port network line reaches c2 times, and c2 does not reach C2 times within the T2 time period, it is judged that the communication quality of the communication port is the first. a result
按时间周期t2检查通信端口网线的线路连接状态,如果累计通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2达到C2次,则判断通信端口的通信质量为第二结果。Check the line connection status of the communication port network cable according to the time period t2. If the number of disconnection and recovery of the accumulated communication port network line reaches c2 times, and c2 reaches C2 times within the T2 time period, it is judged that the communication quality of the communication port is the second. result.
可选地,处理模块设置为:Optionally, the processing module is set to:
在检测结果为第一结果时,对通信端口的链接状态进行实时更新;When the detection result is the first result, the link state of the communication port is updated in real time;
在检测结果为第二结果时,对通信端口的链接状态进行延时更新。When the detection result is the second result, the link state of the communication port is delayedly updated.
当自动切换通信端口的链接状态为实时更新或延时更新后,链接状态更新装置将根据当前选择做出不同的处理:When the link status of the automatic switching communication port is real-time update or delayed update, the link status update device will perform different processing according to the current selection:
若链接状态更新装置选择的是通信端口的链接状态实时更新,则当通信端口的链接状态发生变化时,立即通知业务模块;If the link state update device selects the link state of the communication port to be updated in real time, when the link state of the communication port changes, the service module is immediately notified;
若链接状态更新装置选择的是通信端口的链接状态延时更新,则定时扫描通信端口的链接状态,并确认链接状态的变化情况。如果链接状态发生变化,在一实施例中可以分为通信端口的链接状态发生的变化从链接断开常LINK DOWN变为链接正常LINK UP和从LINK UP变为LINK DOWN。If the link state update device selects the link state delay update of the communication port, the link state of the communication port is periodically scanned, and the change of the link state is confirmed. If the link state changes, in one embodiment, the link state that can be divided into the communication port changes from the link disconnection frequent LINK DOWN to the link normal LINK UP and from the LINK UP to the LINK DOWN.
如果通信端口的链接状态为从LINK UP变为LINK DOWN,则链接状态更新装置认为通信端口的链接状态未发生变化,当前的链接状态仍为LINK UP,链接状态更新装置开启LINK DOWN计时器,开始计时,当通信端口的链接状态持续保持LINK DOWN达到指定阈值时间,即LINK DOWN的计时时间达到指定阈值时间,链接状态更新装置才认为通信端口的链接状态发生变化,此时将当前的LINK DOWN状态上报通知给业务模块;当LINK DOWN状态尚未达到指定阈值时,通信端口的硬件状态变为LINK UP,则链接状态更新装置将LINK DOWN计时器清零,认为本次LINK DOWN未发生,也不将此次状态变化上报给业务模块。If the link state of the communication port is changed from LINK UP to LINK DOWN, the link state update device considers that the link state of the communication port has not changed, the current link state is still LINK UP, and the link state update device starts the LINK DOWN timer and starts. Timing, when the link state of the communication port continues to keep the LINK DOWN time reaches the specified threshold time, that is, the time of the LINK DOWN reaches the specified threshold time, the link state update device considers that the link state of the communication port changes, and the current LINK DOWN state Reporting the notification to the service module; when the LINK DOWN status has not reached the specified threshold, the hardware status of the communication port becomes LINK UP, the link status update device clears the LINK DOWN timer, and considers that the LINK DOWN has not occurred, nor will it This status change is reported to the business module.
如果通信端口的链接状态是从LINK DOWN变为LINK UP,则将LINK DOWN计时器清零,并将通信端口的链接状态上报给业务模块。If the link status of the communication port is changed from LINK DOWN to LINK UP, the LINK DOWN timer is cleared and the link status of the communication port is reported to the service module.
通过这样的技术手段的处理,我们即可以在设备上同时支持链路质量好的网络环境和链路质量差的网络环境,兼顾了设备的灵敏性和抗干扰性,使设备的可靠性大大提高。Through the processing of such technical means, we can support both the network environment with good link quality and the network environment with poor link quality on the device, taking into account the sensitivity and anti-interference of the device, so that the reliability of the device is greatly improved. .
本公开的技术方案的步骤,可以用下面四个具体的实施例来进行说明。The steps of the technical solutions of the present disclosure can be explained by the following four specific embodiments.
例如,通信端口包括PORT1和PORT2,PORT1所在的是通信质量好的网络环境,PORT2所在的是通信质量差的网络环境:For example, the communication port includes PORT1 and PORT2, PORT1 is in a network environment with good communication quality, and PORT2 is in a network environment with poor communication quality:
实施例一 Embodiment 1
通信端口PORT1和通信端口PORT2的链接状态保持LINK UP不变The link status of communication port PORT1 and communication port PORT2 remains LINK UP unchanged
1、通信端口PORT1自适应选择为实时更新,通信端口PORT2自适应选择为延时更 新;1. The communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as the delay. new;
2、通信端口PORT1等待下一周期继续扫描通信端口PORT1的链接状态;2. The communication port PORT1 waits for the next cycle to continue scanning the link state of the communication port PORT1;
3、读取通信端口PORT2的LINK DOWN计时器,若计时器不为零,清零,等待下一周期继续扫描通信端口PORT2的链接状态;3. Read the LINK DOWN timer of the communication port PORT2. If the timer is not zero, clear it, wait for the next cycle to continue scanning the link state of the communication port PORT2;
4、通信端口LINK UP状态更新完成。4. The communication port LINK UP status update is completed.
实施例二Embodiment 2
通信端口PORT1和通信端口PORT2的链接状态保持LINK UP不变The link status of communication port PORT1 and communication port PORT2 remains LINK UP unchanged
1、通信端口PORT1自适应选择为实时更新,通信端口PORT2自适应选择为延时更新;1. The communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as delayed update;
2、通信端口PORT1等待下一周期继续扫描通信端口PORT1的链接状态;2. The communication port PORT1 waits for the next cycle to continue scanning the link state of the communication port PORT1;
3、累计通信端口PORT2的LINK DOWN计时器,等待下一周期继续扫描通信端口PORT2的链接状态;3. Accumulating the LINK DOWN timer of the communication port PORT2, waiting for the next cycle to continue scanning the link state of the communication port PORT2;
4、通信端口LINK UP状态更新完成。4. The communication port LINK UP status update is completed.
实施例三Embodiment 3
通信端口PORT1和通信端口PORT2的链接状态从LINK UP变为LINK DOWNThe link status of communication port PORT1 and communication port PORT2 changes from LINK UP to LINK DOWN
1、通信端口PORT1自适应选择为实时更新,通信端口PORT2自适应选择为延时更新;1. The communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as delayed update;
2、通信端口PORT1的链接状态上报给业务模块,等待下一周期继续扫描通信端口PORT1的链接状态;2. The link status of the communication port PORT1 is reported to the service module, waiting for the next cycle to continue scanning the link state of the communication port PORT1;
3、累计通信端口PORT2的LINK DOWN计时器,如果端口PORT2的链接状态持续保持LINK DOWN达到指定阈值时间,则将当前的LINK DOWN状态上报给业务模块;否则,默认通信端口PORT2的链接状态为LINK UP,不上报业务模块,进行下一周期的扫描。3. The LINK DOWN timer of the communication port PORT2 is accumulated. If the link state of the port PORT2 is kept LINK DOWN for a specified threshold, the current LINK DOWN status is reported to the service module; otherwise, the link status of the default communication port PORT2 is LINK. UP, does not report the business module, and scans for the next cycle.
4、通信端口从LINK UP到LINK DOWN的状态更新完成。4. The status update of the communication port from LINK UP to LINK DOWN is completed.
实施例四Embodiment 4
通新端口PORT1和PORT2的链接状态从LINK DOWN变为LINK UPLink status of new port PORT1 and PORT2 changed from LINK DOWN to LINK UP
1、通信端口PORT1自适应选择为实时更新,通信端口PORT2自适应选择为延时更新;1. The communication port PORT1 is adaptively selected for real-time update, and the communication port PORT2 is adaptively selected as delayed update;
2、通信端口PORT1的链接状态上报给业务模块,等待下一周期继续扫描通信端口PORT1的链接状态;2. The link status of the communication port PORT1 is reported to the service module, waiting for the next cycle to continue scanning the link state of the communication port PORT1;
3、通信端口PORT2的LINK DOWN计时器清零,通信端口PORT2的链接状态上报业务模块,等待下一周期继续扫描通信端口PORT2的链接状态;3. The LINK DOWN timer of the communication port PORT2 is cleared, the link state of the communication port PORT2 is reported to the service module, and the next cycle is continued to scan the link state of the communication port PORT2;
4、完成端口从LINK DOWN到LINK UP的状态更新动作。4. Complete the status update action of the port from LINK DOWN to LINK UP.
图3为本公开中网络自适应选择示意图,包含以下步骤:FIG. 3 is a schematic diagram of network adaptive selection in the present disclosure, including the following steps:
步骤101:查询第i个通信端口(i从1开始),进行步骤102; Step 101: Query the i-th communication port (i starts from 1), and proceed to step 102;
步骤102:判断该通信端口是否为光通信端口,若是光通信端口,进行步骤103;若非光通信端口,进行步骤104;Step 102: Determine whether the communication port is an optical communication port, if it is an optical communication port, proceed to step 103; if it is not an optical communication port, proceed to step 104;
步骤103:等待时间t1,进行步骤105;Step 103: Waiting for time t1, proceeding to step 105;
步骤104:等待时间t2,进行步骤106;Step 104: Waiting for time t2, proceeding to step 106;
步骤105:判断在t1时间内通信端口产生和消除LOS次数是否达到c1次,若达到,进行步骤107;若未达到,进行步骤109;Step 105: Determine whether the number of times the communication port generates and cancels the LOS times in the time t1 reaches c1 times, if yes, proceeds to step 107; if not, proceeds to step 109;
步骤106:判断在t2时间内通信端口网线断开和恢复次数是否达到c2次,若达到,进行步骤108;若未达到,进行步骤109;Step 106: Determine whether the communication port network line disconnection and recovery times in c2 time c2 times, if yes, proceed to step 108; if not, proceed to step 109;
步骤107:判断通信端口在时间周期T1内产生c1的次数是否达到C1次,若达到,证明该网络环境通信质量不好,链路连接较差,出现闪断概率较高,链接状态更新装置自适应选择为延时上报,进行步骤110;若未达到,证明该网络通信环境正常,出现闪断概率较低,进行步骤109;Step 107: Determine whether the number of times the communication port generates c1 in the time period T1 reaches C1 times. If it is reached, it proves that the communication quality of the network environment is not good, the link connection is poor, and the probability of flashing is high, and the link state updating device is Adapting the selection to delay reporting, proceeding to step 110; if not, proving that the network communication environment is normal, the probability of flashing is low, proceeding to step 109;
步骤108:判断通信端口在时间周期T2内产生c2次数是否达到C2次,若达到,进行步骤110;若未达到,进行步骤109;Step 108: Determine whether the communication port generates c2 times in the time period T2 to reach C2 times, if yes, proceed to step 110; if not, proceed to step 109;
步骤109:链接状态更新装置实时上报端口链接状态,进行步骤111。Step 109: The link status update device reports the port link status in real time, and proceeds to step 111.
步骤110:链接状态更新装置延时上报端口链接状态,进行步骤111。Step 110: The link state update device delays reporting the port link state, and proceeds to step 111.
步骤111:i=i+1,扫描下一通信端口,进行步骤101。Step 111: i=i+1, scan the next communication port, and proceed to step 101.
图4为本公开通信端口链接状态更新流程图,包括以下步骤:4 is a flow chart of updating the link status of the communication port of the present disclosure, including the following steps:
步骤201:设定通信端口LINK DOWN的计时器阈值T,进行步骤202。Step 201: Set the timer threshold T of the communication port LINK DOWN, and go to step 202.
步骤202:将软件表中记录的每个通信端口的LINK DOWN计时器t清零,进行步骤203。Step 202: Clear the LINK DOWN timer t of each communication port recorded in the software table to step 203.
步骤203:查询第i(i从0开始)个通信端口的端口,进行步骤204。Step 203: Query the port of the i-th (i from 0) communication port, and go to step 204.
步骤204:获得第i个通信端口的链接状态,判断端口的链接状态是否发生变化,如果链接状态发生变化,则进行步骤205;如果链接状态未发生变化,则进行步骤209。Step 204: Obtain a link status of the i-th communication port, determine whether the link status of the port changes, if the link status changes, proceed to step 205; if the link status does not change, proceed to step 209.
步骤205:确认通信端口的链接状态是否从LINK DOWN变为LINK UP,若从LINK DOWN变为LINK UP,进行步骤206;若未从LINK DOWN变为LINK UP,进行步骤210。Step 205: Confirm whether the link status of the communication port is changed from LINK DOWN to LINK UP. If it changes from LINK DOWN to LINK UP, go to step 206. If it has not changed from LINK DOWN to LINK UP, go to step 210.
步骤206:确认链接状态更新装置将该通信端口自适应为延时上报还是实时上报,若是延时上报,表明此时应用于要求抗干扰性较强的环境,进行步骤207,若是实时上报表明此时应用于要求快速收敛性的环境,进行步骤208。In step 206, it is confirmed that the link state update device adapts the communication port to the time delay report or the real-time report. If the time delay is reported, it indicates that the environment is applied to the environment with strong anti-interference requirements, and step 207 is performed. When applied to an environment requiring fast convergence, step 208 is performed.
步骤207:将第i个通信端口LINK DOWN计时器清0,进行步骤208。Step 207: Clear the ith communication port LINK DOWN timer to 0, and go to step 208.
步骤208:上报给上层软件,进行步骤209。Step 208: Reporting to the upper layer software, performing step 209.
步骤209:延时T1时间,查询第i+1个端口,返回步骤203。Step 209: Delay the time T1, query the i+1th port, and return to step 203.
步骤210:确认链接状态更新装置将该通信端口自适应为延时上报还是实时上报,若是延时上报,则进行步骤211,若是实时上报,进行步骤208。In step 210, it is confirmed that the link state update device adapts the communication port to the time delay report or the real time report. If the time is reported, the process proceeds to step 211.
步骤211:通信端口LINK DOWN计时器t累积加1,进行步骤212。 Step 211: The communication port LINK DOWN timer t is cumulatively incremented by one, and step 212 is performed.
步骤212:确认当前LINK DOWN计时器t是否大于设定阈值T,若大于设定阈值T,进行步骤208,若不大于设定阈值T,进行步骤213。Step 212: Confirm whether the current LINK DOWN timer t is greater than the set threshold T. If it is greater than the set threshold T, proceed to step 208. If it is not greater than the set threshold T, proceed to step 213.
步骤213:链接状态更新装置认为通信端口不是LINK DOWN,仍为LINK UP,进行步骤209。Step 213: The link state update device considers that the communication port is not LINK DOWN, and is still LINK UP, and proceeds to step 209.
在本公开各方法实施例中,各步骤的序号并不能用于限定各步骤的先后顺序,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,对各步骤的先后变化也在本公开的保护范围之内。In the method embodiments of the present disclosure, the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the sequential changes of the steps are also performed without any creative work. Within the scope of protection of the present disclosure.
以上是本公开的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本公开原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本公开的保护范围。The above is a preferred embodiment of the present disclosure, and it should be noted that those skilled in the art can also make several improvements and refinements without departing from the principles of the present disclosure. These improvements and retouchings should also be considered as The scope of protection disclosed.
工业实用性Industrial applicability
本公开实施例提供的通信端口的链接状态更新方法及装置,通过对通信端口的通信质量进行检测,并根据检测结果对所述通信端口的状态执行更新策略通过此方案,可以避免因通信端口链接状态的异常而更新导致业务错误更新,避免业务异常中断,保证通信设备稳定工作。此外,本公开支持不同通信质量的通信端口,兼顾了通信设备的灵敏性和抗干扰性,大大提高了通信设备的可靠性。 The method and device for updating the link status of the communication port provided by the embodiment of the present disclosure can detect the communication quality of the communication port and perform an update policy on the status of the communication port according to the detection result. The abnormal status of the update causes the service error to be updated, avoiding the abnormal interruption of the service, and ensuring the stable operation of the communication device. In addition, the present disclosure supports communication ports of different communication qualities, taking into account the sensitivity and anti-interference of the communication device, and greatly improving the reliability of the communication device.

Claims (11)

  1. 一种通信端口的链接状态更新方法,包括:A link state update method for a communication port, comprising:
    对所述通信端口的通信质量检测,得到检测结果;Detecting communication quality of the communication port, and obtaining a detection result;
    根据所述检测结果,确定对所述通信端口的状态进行更新的策略。A policy for updating the status of the communication port is determined based on the detection result.
  2. 根据权利要求1所述的更新方法,其中,所述检测结果包括第一结果和第二结果,所述通信端口为光通信端口,所述对所述通信端口的通信质量检测得到检测结果,包括:The updating method according to claim 1, wherein the detection result comprises a first result and a second result, the communication port is an optical communication port, and the communication quality detection of the communication port obtains a detection result, including :
    按时间周期t1检查所述通信端口的光信号丢失LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数未达到c1次,则判断所述通信端口的通信质量为第一结果;The optical signal loss LOS signal of the communication port is checked according to a time period t1. If the number of times the LOS signal is generated and eliminated by the communication port is not c1 times, the communication quality of the communication port is determined to be a first result;
    按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1未达到C1次,则判断所述通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 does not reach C1 times in the T1 time period, it is determined that the The communication quality of the communication port is the first result;
    按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1达到C1次,则判断所述通信端口的通信质量为第二结果。Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times in the T1 time period, the communication is judged. The communication quality of the port is the second result.
  3. 根据权利要求1所述的更新方法,其中,所述检测结果包括第一结果和第二结果,所述通信端口为电通信端口,所述对所述通信端口的通信质量检测得到检测结果,包括:The updating method according to claim 1, wherein the detection result comprises a first result and a second result, the communication port is an electrical communication port, and the communication quality detection of the communication port obtains a detection result, including :
    按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数未达到c2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is not c2 times, determining the communication quality of the communication port is the first result;
    按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2未达到C2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 does not reach C2 times within the T2 time period, the communication is judged. The communication quality of the port is the first result;
    按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2达到C2次,则判断所述通信端口的通信质量为第二结果。Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 reaches C2 times during the T2 time period, the communication port is judged. The quality of communication is the second result.
  4. 根据权利要求2或3所述的更新方法,其中,所述根据所述检测结果,确定对所述通信端口的状态进行更新的策略,包括:The updating method according to claim 2 or 3, wherein the determining, according to the detection result, a policy for updating a status of the communication port comprises:
    在所述检测结果为第一结果时,对所述通信端口的链接状态进行实时更新;When the detection result is the first result, the link state of the communication port is updated in real time;
    在所述检测结果为第二结果时,对所述通信端口的链接状态进行延时更新。When the detection result is the second result, the link state of the communication port is delayedly updated.
  5. 根据权利要求4所述的更新方法,其中,对所述通信端口的链接状态进行实时更新,包括:The updating method according to claim 4, wherein the real-time updating of the link status of the communication port comprises:
    所述通信端口的链接状态实时上报给业务模块。The link status of the communication port is reported to the service module in real time.
  6. 根据权利要求4所述的更新方法,其中,对所述通信端口的链接状态进行延时更新,包括:The update method of claim 4, wherein the delaying the update of the link state of the communication port comprises:
    在所述通信端口的链接状态从链接正常变为链接中断时,如果保持链接中断的时间超 过阈值时间,则在链接中断超过阈值时间之后将所述通信端口的当前链接状态上报给业务模块;When the link state of the communication port changes from link normal to link interruption, if the link is interrupted for a longer time After the threshold time expires, the current link status of the communication port is reported to the service module after the link interruption exceeds the threshold time;
    在所述通信端口的链接状态从链接正常变为链接中断时,如果保持链接中断的时间不超过阈值时间,则不将所述通信端口的当前链接状态上报给业务模块。When the link state of the communication port is changed from the link normal to the link interruption, if the link interruption time does not exceed the threshold time, the current link state of the communication port is not reported to the service module.
  7. 一种通信端口的链接状态更新装置,包括:A link state update device for a communication port, comprising:
    检测模块,设置为对所述通信端口的通信质量检测,得到检测结果;a detecting module, configured to detect a communication quality of the communication port, and obtain a detection result;
    处理模块,设置为根据所述检测结果,确定对所述通信端口的状态进行更新的策略。The processing module is configured to determine a policy for updating the status of the communication port according to the detection result.
  8. 根据权利要求7所述的更新装置,其中,所述检测结果包括第一结果和第二结果,所述通信端口为光通信端口,所述检测模块设置为:The updating apparatus according to claim 7, wherein the detection result comprises a first result and a second result, the communication port is an optical communication port, and the detecting module is configured to:
    按时间周期t1检查所述通信端口的LOS信号,如果累计所述通信端口产生和消除LOS信号的次数未达到c1次,则判断所述通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to the time period t1. If the number of times the LOS signal is generated and eliminated by the communication port is not up to c1 times, determining the communication quality of the communication port is the first result;
    按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1未达到C1次,则判断所述通信端口的通信质量为第一结果;Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 does not reach C1 times in the T1 time period, it is determined that the The communication quality of the communication port is the first result;
    按时间周期t1检查所述通信端口的所述LOS信号,如果累计所述通信端口产生和消除所述LOS信号的次数达到c1次,且在T1时间段内c1达到C1次,则判断所述通信端口的通信质量为第二结果。Checking the LOS signal of the communication port according to a time period t1. If the number of times the communication port generates and cancels the LOS signal reaches c1 times, and c1 reaches C1 times in the T1 time period, the communication is judged. The communication quality of the port is the second result.
  9. 根据权利要求7所述的更新装置,其中,所述检测结果包括第一结果和第二结果,所述通信端口为电通信端口,所述检测模块设置为:The updating apparatus according to claim 7, wherein the detection result comprises a first result and a second result, the communication port is an electrical communication port, and the detecting module is configured to:
    按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数未达到c2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is not c2 times, determining the communication quality of the communication port is the first result;
    按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2未达到C2次,则判断所述通信端口的通信质量为第一结果;Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 does not reach C2 times within the T2 time period, the communication is judged. The communication quality of the port is the first result;
    按时间周期t2检查所述通信端口网线的线路连接状态,如果累计所述通信端口网线产生断开和恢复的次数达到c2次,且在T2时间段内c2达到C2次,则判断所述通信端口的通信质量为第二结果。Checking the line connection status of the communication port network line according to the time period t2. If the number of disconnection and recovery of the communication port network line is c2 times, and c2 reaches C2 times during the T2 time period, the communication port is judged. The quality of communication is the second result.
  10. 根据权利要求8或9所述的更新装置,其中,所述处理模块设置为:The updating device according to claim 8 or 9, wherein the processing module is configured to:
    在所述检测结果为第一结果时,对所述通信端口的链接状态进行实时更新;When the detection result is the first result, the link state of the communication port is updated in real time;
    在所述检测结果为第二结果时,对所述通信端口的链接状态进行延时更新。When the detection result is the second result, the link state of the communication port is delayedly updated.
  11. 一种存储介质,设置为存储程序代码,所述程序代码设置为执行权利要求1至6中任一项所述的通信端口的链接状态更新方法。 A storage medium, configured to store a program code, the program code being set to perform a link state update method of the communication port according to any one of claims 1 to 6.
PCT/CN2017/087863 2016-06-16 2017-06-12 Method and apparatus for updating link state of communication port WO2017215537A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610429113.2 2016-06-16
CN201610429113.2A CN107517114B (en) 2016-06-16 2016-06-16 Method and device for updating link state of communication port

Publications (1)

Publication Number Publication Date
WO2017215537A1 true WO2017215537A1 (en) 2017-12-21

Family

ID=60662988

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087863 WO2017215537A1 (en) 2016-06-16 2017-06-12 Method and apparatus for updating link state of communication port

Country Status (2)

Country Link
CN (1) CN107517114B (en)
WO (1) WO2017215537A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094157A (en) * 2007-08-20 2007-12-26 中兴通讯股份有限公司 Method for implementing network interconnection by using link aggregation
CN101212462A (en) * 2006-12-27 2008-07-02 华为技术有限公司 Event reporting method and reporting device
US20100235914A1 (en) * 2009-03-13 2010-09-16 Alcatel Lucent Intrusion detection for virtual layer-2 services
CN101867502A (en) * 2010-06-02 2010-10-20 中兴通讯股份有限公司 Method and device for inhibiting port oscillation
CN104426693A (en) * 2013-08-27 2015-03-18 杭州华三通信技术有限公司 Method for managing port state of exchange transmitting device in software definition network, and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9231892B2 (en) * 2012-07-09 2016-01-05 Vmware, Inc. Distributed virtual switch configuration and state management
CN105323104B (en) * 2014-08-04 2020-04-03 中兴通讯股份有限公司 Alarm management method and device and packet transmission equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212462A (en) * 2006-12-27 2008-07-02 华为技术有限公司 Event reporting method and reporting device
CN101094157A (en) * 2007-08-20 2007-12-26 中兴通讯股份有限公司 Method for implementing network interconnection by using link aggregation
US20100235914A1 (en) * 2009-03-13 2010-09-16 Alcatel Lucent Intrusion detection for virtual layer-2 services
CN101867502A (en) * 2010-06-02 2010-10-20 中兴通讯股份有限公司 Method and device for inhibiting port oscillation
CN104426693A (en) * 2013-08-27 2015-03-18 杭州华三通信技术有限公司 Method for managing port state of exchange transmitting device in software definition network, and device

Also Published As

Publication number Publication date
CN107517114B (en) 2022-08-02
CN107517114A (en) 2017-12-26

Similar Documents

Publication Publication Date Title
CN110149220B (en) Method and device for managing data transmission channel
CN109347705B (en) Loop detection method and device
EP3148119B1 (en) Ageing detection method and device
EP2600542B1 (en) Process method and apparatus for preventing alarm jitter
CN101640818B (en) Protection device and protection method of optical network
WO2016086607A1 (en) Method and apparatus for determining antenna fault, and terminal
US8775869B2 (en) Device and method for coordinating automatic protection switching operation and recovery operation
CN110601919A (en) Loopback detection method and system
EP2866388A1 (en) Method for detecting correctness of optic fiber connection based on radio remote unit (rru) looped network, and base band unit (bbu)
WO2017215537A1 (en) Method and apparatus for updating link state of communication port
CN104735697A (en) Mobile terminal automated calling field test method and system based on AT instruction
CN102325245B (en) The automatic circuit reverse method of TV conference system and device
CN113489613B (en) Message forwarding method and device
JP2010245589A (en) Communication system, communication device, method for specifying suspect portion, and program
CN110138657B (en) Aggregation link switching method, device, equipment and storage medium between switches
CN103378899A (en) Control method and system by application of cross-polarization interference counteracter
CN103067101A (en) Communication terminal testing and monitoring method and device
CN114938346B (en) Method and device for realizing service fast switching by cooperation of chip and CPU
CN115361306B (en) Port state reporting method and switch
CN116488724B (en) Optical fiber communication test method, medium and system using same
CN104735696A (en) Mobile terminal communication switchover field test method and system based on AT command
US10652139B1 (en) Automatic communication network failure detection and remediation
CN109379133A (en) The processing method and system of PON network packet loss
CN110138446B (en) Detection method for redundancy degradation fault of dual-redundancy fiber channel network
CN118019037A (en) Fault detection method and system based on mobile communication equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17812648

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17812648

Country of ref document: EP

Kind code of ref document: A1