WO2011020348A1 - Method, device and network management server for implementing polling for network element link state - Google Patents
Method, device and network management server for implementing polling for network element link state Download PDFInfo
- Publication number
- WO2011020348A1 WO2011020348A1 PCT/CN2010/072833 CN2010072833W WO2011020348A1 WO 2011020348 A1 WO2011020348 A1 WO 2011020348A1 CN 2010072833 W CN2010072833 W CN 2010072833W WO 2011020348 A1 WO2011020348 A1 WO 2011020348A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network element
- response result
- communication channel
- asynchronous communication
- polled
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000004044 response Effects 0.000 claims abstract description 149
- 238000004891 communication Methods 0.000 claims description 112
- 239000000523 sample Substances 0.000 claims description 56
- 238000001514 detection method Methods 0.000 abstract 2
- 230000008569 process Effects 0.000 description 16
- 230000001360 synchronised effect Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
Definitions
- the present invention relates to the field of telecommunications network management, and in particular, to a method, a device, and a network management server for implementing network element link status polling. Background technique
- Polling is the basic function of the network management system. That is, the network management server detects whether the network elements can communicate normally by sending probe messages to all network elements managed by the network management server to determine whether the network elements are under management.
- FIG. 1 is a schematic diagram showing the relationship between a network management server and a managed network element in a network management system.
- formula. 2 is a schematic flow chart of a separate worker thread in the synchronous polling of the prior art.
- IP Internet Protocol
- Step 201 The network management server takes out information about a network element to be polled.
- Step 202 The network management server obtains the IP address of the network element, and sends a probe message to the network element.
- Step 204 it is determined whether the response of the network element is received within the specified time; if the response of the network element is not received, step 205 is performed; otherwise, the process proceeds to step 206; Step 205, determining that the state of the network element link is disconnected, that is, determining that the state of the network element is unreachable, and performing step 207;
- Step 206 determining that the state of the network element link is a normal state of communication, that is, determining that the state of the network element is reachable, and performing step 207;
- Step 207 Compare with the stored network element link or the old state of the network element.
- Step 208 determining whether the determined state is the same as the old state of the network element link or the network element; if yes, proceeding to step 201, continuing to read the information of the next to-be-polled network element; otherwise, performing step 209;
- Step 209 Modify the state of the network element in the database of the network management server, and go to step 201 to continue reading the information of the next network element to be polled.
- the defect of the above-mentioned polling mode in the prior art is: When a certain network element fails, it needs to wait for a period of time to find that there is no response message to know that the polled network element is unreachable.
- the length of the above waiting time is configurable, usually 15 seconds. For example, suppose there is only one worker thread in the system, and there are 500 network elements in the system that need to be polled. If there are 10 network elements in the network management system, the 500th network element should be polled for at least 750 seconds. After that, it can be polled.
- timeliness that is, the network element and the network management can be discovered as soon as possible after the chain is broken.
- the present invention provides a method for implementing network element link status polling, where the method includes:
- a probe message sending step performed by the first worker thread, sending a probe message to the plurality of to-be-called polling network elements in a traversal manner;
- a response result processing step performed by the second worker thread determining, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result;
- the first worker thread and the second worker thread are independent of each other.
- the step of transmitting the probe message comprises: registering an asynchronous communication channel for the network element to be polled, and corresponding to a network element to be polled;
- the response result processing step includes: obtaining a response result of the corresponding network element from the channel object corresponding to the registered asynchronous communication channel, and determining a link state of the corresponding network element according to the response result.
- the step of processing the response result further includes: after determining the link state of the network element, canceling the asynchronous communication channel corresponding to the network element.
- the step of processing the response result further includes: after determining a link state of the network element to be polled, determining to determine the to-be-polled network element corresponding to the next response result according to the obtained next response result. Link status.
- the step of transmitting the probe message further includes: when registering the asynchronous communication channel for the network element to be polled, saving the unique identifier of the network element to be polled in the channel object corresponding to the registered asynchronous communication channel ;
- the step of processing the response result further includes: acquiring the unique target of the network element stored in the channel object when the response result of the corresponding network element is obtained from the channel object corresponding to the registered asynchronous communication channel.
- the step of processing the response result obtaining the response result and the network element only After the identification, it also includes:
- the response is a successful response when the asynchronous communication channel receives the response message returned by the corresponding network element within a predetermined time.
- an apparatus for implementing network element link status polling includes: a probe message sending module and a response result processing module;
- a probe sending module configured to send a probe message to the plurality of network elements to be tested in a traversal manner in the first working thread
- a response result processing module configured to determine, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result in the second working thread
- the first worker thread and the second worker thread are independent of each other.
- the probe message sending module includes: an asynchronous communication channel registration module and a sending module;
- the asynchronous communication channel registration module is configured to register an asynchronous communication channel for the network element to be polled, and each asynchronous communication channel corresponds to one network element to be polled;
- the response result processing module includes: a response result obtaining module and a link state determining module; wherein
- the response result obtaining module is configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel
- the response result processing module further includes:
- the asynchronous communication channel unregistering module is configured to: after determining the link state of the network element, cancel the asynchronous communication channel corresponding to the network element.
- a network management server that implements network element link status polling includes at least a device for performing network element link status polling, and the apparatus further includes: a probe message sending module and a response result processing module;
- a probe sending module configured to send a probe message to the plurality of network elements to be tested in a traversal manner in the first working thread
- a response result processing module configured to determine, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result in the second working thread
- the first worker thread and the second worker thread are independent of each other.
- the probe message sending module includes an asynchronous communication channel registration module and a sending module;
- the asynchronous communication channel registration module is configured to register an asynchronous communication channel for the network element to be polled, and each asynchronous communication channel corresponds to one network element to be polled;
- the response result processing module includes a response result obtaining module and a link state determining module;
- the response result obtaining module is configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel
- the response result processing module further includes:
- the asynchronous communication channel unregistering module is configured to: after determining the link state of the network element, cancel the asynchronous communication channel corresponding to the network element.
- the present invention provides a method for implementing network element link status polling by using asynchronous communication mode.
- the steps of the probe message sending and the response result processing steps are respectively implemented in two mutually independent working threads, so that the network management server can be in the direction
- a network element sends a probe message, it does not need to wait for the response of the network element, but immediately sends a probe message to the next network element, and the response message of each network element is uniformly processed in the second working thread, which means that it can be more
- the network elements are polled in the same thread in a linear manner, without having to allocate a separate thread for each network element. Since the time for sending the message is extremely short, the technical solution of the present invention can be used in a relatively short time. A large number of network elements send probe messages. Therefore, compared with the prior art synchronous polling method, the asynchronous polling method of the present invention can improve the timeliness of polling while greatly reducing system thread overhead.
- FIG. 1 is a schematic diagram of a relationship between a network management server and a managed network element in a network management system of the prior art
- FIG. 2 is a schematic flow chart of a synchronous polling method in the prior art
- FIG. 3 is a schematic flowchart of a sending message sending step in a method for implementing a network element link state polling according to an embodiment of the present invention
- FIG. 4 is a schematic flowchart of a process of processing a response result in a method for implementing a link state polling of a network element according to an embodiment of the present invention
- FIG. 5 is a schematic structural diagram of an apparatus for implementing network element link status polling according to an embodiment of the present invention. detailed description
- the asynchronous communication channel is a mechanism for asynchronous communication, and the underlying operating system has the mechanism of asynchronous communication, and various programming platforms provide corresponding system functions to support access to the underlying asynchronous communication channel.
- the basic principle of the asynchronous communication channel technology is to provide a communication channel for each user. The user returns the data to be sent to the asynchronous communication channel, and the system monitors the message response on the channel for the user.
- the asynchronous channel technology can be applied to the polling of the network element state to provide an asynchronous polling method. In the asynchronous polling method, one for each network element is provided. The asynchronous communication channel sends a probe message to the corresponding network element through the asynchronous communication channel without waiting for the response message, that is, the response result.
- the present invention provides a method for implementing network element link status polling, which is a polling method implemented by using an asynchronous communication method, the method comprising: transmitting a probe message in a first working thread, in a traversal manner Sending a probe message to the plurality of to-be-reviewed network elements; and in the response result processing step performed by the second worker thread, determining, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result;
- the first worker thread is independent of the second worker thread.
- the step of transmitting the probe message comprises: registering, for the network element to be polled, an asynchronous communication communication channel corresponding to one to be polled network element; the processing result of the response result comprises: obtaining the corresponding network element from the registered asynchronous communication channel And responding to the result, and determining a link state of the corresponding network element according to the response result.
- the foregoing response result includes: a successful response and a failure response; when the asynchronous communication channel receives the response message of the network element corresponding to the asynchronous communication channel within a predetermined time, the response The result is a successful response; otherwise, the response is a failed response.
- the response is successful, the communication between the NE and the NMS server is normal. The link between the NE and the NMS server is in the normal state of communication and the NE is reachable.
- the response is a failure response, the network is displayed. The communication between the NE and the network management server is abnormal. The link between the NE and the NMS server is in a broken state and the NE is unreachable.
- FIG. 3 is a schematic flowchart of a step of transmitting a probe message in a method for implementing a link status polling of a network element according to an embodiment of the present invention.
- the main body executed in each step is a device for implementing the link state polling of the network element, that is, the device having the function of implementing the link state polling function of the network element,
- the network management server in the network management system is taken as an example for description.
- the process of sending the probe message includes:
- Step 301 The network management server acquires information about a network element to be polled.
- all the information of the network element to be polled is pre-stored in the network management server, for example, in a database set in the network management server, and the network management server takes out a polling network from the database during polling.
- the information of the network element includes: IP address information, port, and the like of the network element to be polled; Step 302, the network management server registers an asynchronous communication channel, where the asynchronous communication channel corresponds to the network element to be polled, The two are - the corresponding relationship, and save the unique identifier of the above-mentioned network element to be polled;
- the network management server registers an asynchronous communication channel with the current operating system; for example, if the asynchronous communication channel of the operating system is not directly accessible, the network management server can perform various programming supported by the corresponding system function.
- the platform registers the asynchronous communication channel;
- the unique identifier of the network element is an IP address of the network element
- Step 303 The network management server sends a probe message, that is, a polling request message, to the network element corresponding to the asynchronous communication channel through the asynchronous communication channel, and then proceeds to step 301 to continue polling the next network element to be polled.
- a probe message that is, a polling request message
- the probe message sending process is characterized in that: the time for waiting for the response of the network element is utilized, and after the probe message, that is, the polling request message, is sent to the network element to be polled, the network element does not need to wait for the network element to return a response message, but immediately The next polling NE sends a probe message. Since the time for sending a message is extremely short, a probe message can be sent to a large number of network elements in a short time. In the manner of sending the probe message, the network management server can poll the multiple threads in the same thread in a linear manner without assigning a separate thread to each network element, thereby saving thread overhead. The timeliness of polling is improved while the system thread overhead is greatly reduced.
- the response message returned by each network element is uniformly processed by the second working thread.
- the response message processing thread centrally processes the received response message, and the workflow is as follows: traversing the asynchronous communication channel registered by the first working thread before, checking whether there is a response message of the network element on the channel, obtaining a response result, and performing corresponding processing. Since there is no need for any blocking or waiting in the middle, it can be traversed quickly. Any network element can be discovered very quickly if it is disconnected from the network management system.
- FIG. 4 is a schematic flowchart of a process of processing a response result in a method for polling a link state of a network element according to an embodiment of the present invention.
- the process of the response result processing step of the embodiment includes: Step 401: The network management server obtains a response result of a ready asynchronous communication channel and a unique identifier of the network element corresponding to the asynchronous communication channel; wherein, the ready asynchronous communication A channel refers to an asynchronous communication channel that already has a response result;
- the network management server obtains the response result of the asynchronous communication channel and the unique identifier of the network element corresponding to the asynchronous communication channel when the network communication server checks the ready asynchronous communication channel, and the unique identifier of the network element is used to identify and respond to the response result.
- Corresponding network element that is, a network element corresponding to the asynchronous communication channel;
- all registered asynchronous communication channels are usually stored in a storage space in a corresponding channel object.
- a response is usually taken out from the storage space.
- the asynchronous communication channel obtains the corresponding response result and the unique identifier of the corresponding network element from the channel object corresponding to the asynchronous communication channel having the response result;
- Step 402 the network management server determines whether the obtained response result is a successful response; if yes, step 403; otherwise, step 404;
- Step 403 determining that the network element corresponding to the asynchronous communication channel, that is, the link state of the network element corresponding to the unique identifier is a communication normal state, and the corresponding network element is reachable;
- Step 404 determining that the network element corresponding to the asynchronous communication channel, that is, the link state of the network element corresponding to the unique identifier is a communication abnormal state, that is, a broken link state, and the corresponding network element is unreachable;
- Step 405 cancel the asynchronous communication channel
- Step 406 The network management server compares the determined link state of the network element with the currently stored old link state of the network element, and determines whether the two are the same. If yes, the process proceeds to step 401, where the next acquisition is continued. The response result of the asynchronous communication channel of the response result; otherwise, step 407 is performed; step 407, updating the link state or the network element state of the network element currently stored in the network management server, exemplarily, by modifying the network stored in the database The link state of the element or the state of the network element, and then proceeds to step 401 to continue to obtain the response result of the next asynchronous communication channel having the response result.
- the working thread for sending the probe message that is, the first working thread
- the network management server does not wait for the network element after issuing the probe message.
- the response message but continues to send the probe message to the next polling network element, the response message of all network elements is processed in the second working thread, and the network management server processes the response result of the network element corresponding to a registered asynchronous communication channel. After that, the response result of the network element corresponding to the next registered asynchronous communication channel is processed.
- Send a probe message to the network management server to Asynchronous communication channel after the asynchronous communication channel sends the probe message, the operating system monitors the response message on the asynchronous communication channel.
- the network management server determines whether the communication link between the network element and the network management server is normal by obtaining the response result of the asynchronous communication channel.
- FIG. 5 is a schematic structural diagram of an apparatus for implementing network element link status polling according to an embodiment of the present invention.
- an apparatus for implementing network element link status polling includes: a probe message sending module 501 and a response result processing module 502.
- the probe message sending module 501 is configured to be in the first working thread. Sending a probe message to the plurality of network elements to be tested in a traversal manner;
- the response result processing module 502 is configured to determine, according to the obtained response result, the link of the network element to be polled corresponding to the response result in the second working thread.
- the probe message sending module includes: an asynchronous communication channel registration module, configured to register an asynchronous communication channel for the network element to be polled, each asynchronous communication channel corresponding to one to be polled network element; And a module, configured to send a probe message to the to-be-polled network element by using the asynchronous communication channel.
- the response result processing module includes: a response result obtaining module, configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel; and a link state determining module, and preferably, in the apparatus of the embodiment, the response result
- the processing module further includes: an asynchronous communication channel deregistration module, configured to: after determining the link state of the network element, cancel the asynchronous communication channel corresponding to the network element.
- the foregoing apparatus for implementing network element link status polling may be implemented. It is a functional module or a physical device. When the device is implemented as a function module, it can be set in a device that needs to implement a polling function.
- the present invention also provides a network management server including the above apparatus for implementing network element link status polling.
- the embodiment of the present invention describes a case where polling is performed using an SNMP message.
- the key difference is that there is no need to wait for the return of the probe message, which means that multiple network elements can be polled in the same thread in a linear fashion without having to assign a separate thread to each network element.
- the asynchronous polling mode compared with the traditional synchronous polling method, it takes only two working threads: a thread that sends a polling message and a thread that receives a polling response message; this not only saves a lot System overhead, and because of the small number of threads, both worker threads can run at full speed, and the polling speed is greatly improved.
- an enterprise network with a network element size of about 1000 is used as an example.
- the synchronous polling method of the prior art more than 40 working threads need to be started, and the average time of network element broken links is 5-10 minutes. And because polling is too resource intensive, the performance of other functions of the network management system is seriously affected.
- the asynchronous polling process of the present invention only one probe message sending thread and one response message processing thread are needed for the enterprise network of the same size, and the average time of the network element broken link discovery is within 10 seconds; and the asynchronous method of the present invention The polling process has no effect on other functions of the network management software.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Environmental & Geological Engineering (AREA)
- Small-Scale Networks (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
A method, device and network management server for implementing polling for network element link state are provided, and the method includes: at the detection message sending step executed by a first work thread, sending a detection message to a plurality of network elements to be polled in traversal manner; at the response result processing step executed by a second work thread, according the obtained response result, determining the link states of the network elements to be polled corresponding to the response result; wherein, the first and second work threads are independent of each other. Using present invention can improve the timeliness of polling while greatly reducing the system thread overhead.
Description
实现网元链路状态轮询的方法、 装置及网管服务器 Method, device and network management server for implementing network element link status polling
技术领域 Technical field
本发明涉及电信网管领域, 特别是涉及一种实现网元链路状态轮询的 方法、 装置及网管服务器。 背景技术 The present invention relates to the field of telecommunications network management, and in particular, to a method, a device, and a network management server for implementing network element link status polling. Background technique
轮询是网管系统的基本功能, 就是网管服务器对其所管理的所有网元 通过发送探测消息的方式, 检测与各个网元是否能正常通讯, 以确定网元 是否在被管理状态之下。 Polling is the basic function of the network management system. That is, the network management server detects whether the network elements can communicate normally by sending probe messages to all network elements managed by the network management server to determine whether the network elements are under management.
大部分情况下, 被管网元都安装了筒单网络管理协议( Simple Network Management Protocol, SNMP )代理,网管服务器通过向被管网元发送 SNMP 消息, 通过是否收到响应消息来判断网管服务器与被管网元之间的通讯状 况。 图 1示出了网管系统中网管服务器与被管网元之间的关系示意图。 式。 图 2为现有技术的同步轮询中一个单独的工作线程的流程示意图。 现 有技术的同步轮询中, 网元信息将依次被读取, 并根据其互联网协议(IP ) 地址发送 SNMP探测消息然后等待响应, 等完成一个网元的轮询后, 才轮 到下一个网元。 如图 2, 现有技术的同步轮询中, 在一个单独的工作线程中 包括如下步骤: In most cases, the managed network element has a Simple Network Management Protocol (SNMP) agent installed. The network management server sends an SNMP message to the managed network element to determine whether the network management server is The communication status between the managed network elements. FIG. 1 is a schematic diagram showing the relationship between a network management server and a managed network element in a network management system. formula. 2 is a schematic flow chart of a separate worker thread in the synchronous polling of the prior art. In the synchronous polling of the prior art, the network element information will be read in turn, and the SNMP probe message is sent according to its Internet Protocol (IP) address and then waits for a response. After completing the polling of one network element, it is the next turn. Network element. As shown in Figure 2, in the prior art synchronous polling, the following steps are included in a separate worker thread:
步骤 201 , 网管服务器取出一个待轮询网元的信息; Step 201: The network management server takes out information about a network element to be polled.
步骤 202, 网管服务器取得网元的 IP地址, 向网元发出探测消息; 步骤 203 , 网管服务器等待网元响应; Step 202: The network management server obtains the IP address of the network element, and sends a probe message to the network element. Step 203: The network management server waits for the network element to respond.
步骤 204,判断规定时间内是否收到网元的响应;如未收到网元的响应, 则执行步骤 205 , 否则, 进入步骤 206;
步骤 205 , 确定网元链路的状态为断链状态, 即确定网元的状态为不可 达, 并执行步骤 207; Step 204, it is determined whether the response of the network element is received within the specified time; if the response of the network element is not received, step 205 is performed; otherwise, the process proceeds to step 206; Step 205, determining that the state of the network element link is disconnected, that is, determining that the state of the network element is unreachable, and performing step 207;
步骤 206, 确定网元链路的状态为通讯正常状态, 即确定网元的状态为 可达, 并执行步骤 207; Step 206, determining that the state of the network element link is a normal state of communication, that is, determining that the state of the network element is reachable, and performing step 207;
步骤 207, 与存储的网元链路或网元的旧状态比较; Step 207: Compare with the stored network element link or the old state of the network element.
步骤 208, 判断确定的状态与网元链路或网元的旧状态是否相同; 如果 是, 则转入步骤 201 , 继续读取下一个待轮询网元的信息; 否则, 执行步骤 209; Step 208, determining whether the determined state is the same as the old state of the network element link or the network element; if yes, proceeding to step 201, continuing to read the information of the next to-be-polled network element; otherwise, performing step 209;
步骤 209,修改网管服务器的数据库中该网元的状态,并转入步骤 201 , 继续读取下一个待轮询网元的信息。 Step 209: Modify the state of the network element in the database of the network management server, and go to step 201 to continue reading the information of the next network element to be polled.
现有技术的上述轮询方式的缺陷是: 当某个网元不通时, 需要等待一 段时间发现没有响应消息才能得知该轮询的网元不可达。 上述等待的时间 长短可配置, 一般是 15秒。 举例说明, 假设系统中只有一个工作线程, 且 这个系统有 500个网元需要轮询, 该网管系统中如果有 10个网元不通, 则 轮询到第 500个网元至少要等到 750秒以上之后才能被轮询。 本领域的技 术人员知道, 轮询最基本的要求是及时性, 即网元与网管断链后能尽快发 现, 因此现有技术的上述轮询流程由于延迟时间太长是不能被接受的。 利 用上述方式的轮询要提高及时性只能增加工作线程的数目, 让尽可能多的 线程同时工作, 但这样只能部分提高及时性, 并不能从根本上解决问题; 同时又带来另一个严重的问题: 使用过多的线程使系统开销增加, 加大了 The defect of the above-mentioned polling mode in the prior art is: When a certain network element fails, it needs to wait for a period of time to find that there is no response message to know that the polled network element is unreachable. The length of the above waiting time is configurable, usually 15 seconds. For example, suppose there is only one worker thread in the system, and there are 500 network elements in the system that need to be polled. If there are 10 network elements in the network management system, the 500th network element should be polled for at least 750 seconds. After that, it can be polled. Those skilled in the art know that the most basic requirement for polling is timeliness, that is, the network element and the network management can be discovered as soon as possible after the chain is broken. Therefore, the above-mentioned polling process of the prior art is unacceptable because the delay time is too long. Using the above method of polling to improve timeliness can only increase the number of worker threads, allowing as many threads as possible to work at the same time, but this can only partially improve the timeliness, and can not solve the problem fundamentally; Serious problem: Using too many threads increases system overhead and increases
CPU的负荷, 使整个网管系统的运行效率降低。 发明内容 The load on the CPU reduces the operating efficiency of the entire network management system. Summary of the invention
本发明的目的是提供一种实现网元链路状态轮询的方法、 装置及网管 系统线程开销来实现及时轮询的技术问题。
为了实现上述目的, 本发明提供了一种实现网元链路状态轮询的方法, 其中, 该方法包括: It is an object of the present invention to provide a method, a device, and a network management system thread overhead for implementing network element link status polling to implement timely polling. In order to achieve the above object, the present invention provides a method for implementing network element link status polling, where the method includes:
在第一工作线程执行的探测消息发送步骤, 以遍历方式向多个待轮询 网元发送探测消息; a probe message sending step performed by the first worker thread, sending a probe message to the plurality of to-be-called polling network elements in a traversal manner;
在第二工作线程执行的响应结果处理步骤, 根据获取的响应结果确定 与所述响应结果相对应的待轮询网元的链路状态; a response result processing step performed by the second worker thread, determining, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result;
所述第一工作线程与所述第二工作线程相互独立。 The first worker thread and the second worker thread are independent of each other.
优选地, 所述探测消息发送步骤包括: 为待轮询网元注册异步通讯通 通讯通道对应一个待轮询网元; Preferably, the step of transmitting the probe message comprises: registering an asynchronous communication channel for the network element to be polled, and corresponding to a network element to be polled;
所述响应结果处理步骤包括: 从注册的异步通讯通道对应的通道对象 中获取对应网元的响应结果, 并 ^据所述响应结果确定所述对应网元的链 路状态。 The response result processing step includes: obtaining a response result of the corresponding network element from the channel object corresponding to the registered asynchronous communication channel, and determining a link state of the corresponding network element according to the response result.
优选地, 在所述响应结果处理步骤中还包括: 在确定所述网元的链路 状态后, 注销所述网元对应的异步通讯通道。 Preferably, the step of processing the response result further includes: after determining the link state of the network element, canceling the asynchronous communication channel corresponding to the network element.
优选地, 在所述响应结果处理步骤中还包括: 在确定一个待轮询网元 的链路状态后, 继续根据获取的下一个响应结果确定所述下一个响应结果 对应的待轮询网元的链路状态。 Preferably, the step of processing the response result further includes: after determining a link state of the network element to be polled, determining to determine the to-be-polled network element corresponding to the next response result according to the obtained next response result. Link status.
优选地, 所述探测消息发送步骤中还包括: 为待轮询网元注册异步通 讯通道时, 在与所述注册的异步通讯通道对应的通道对象中保存所述待轮 询网元的唯一标识; Preferably, the step of transmitting the probe message further includes: when registering the asynchronous communication channel for the network element to be polled, saving the unique identifier of the network element to be polled in the channel object corresponding to the registered asynchronous communication channel ;
相应地, 所述响应结果处理步骤中还包括: 在从注册的异步通讯通道 对应的通道对象中获取对应网元的响应结果时, 获取所述通道对象中存储 的网元的唯一标只。 Correspondingly, the step of processing the response result further includes: acquiring the unique target of the network element stored in the channel object when the response result of the corresponding network element is obtained from the channel object corresponding to the registered asynchronous communication channel.
优选地, 所述响应结果处理步骤中, 在获取所述响应结果和网元的唯
一标识后, 还包括: Preferably, in the step of processing the response result, obtaining the response result and the network element only After the identification, it also includes:
判断所述响应结果是否为成功响应; 如果是, 则确定所述唯一标识对 应的网元的链路状态为通讯正常状态; 否则, 确定所述唯一标识对应的网 元的链路状态为断链状态; 其中, 当所述异步通讯通道在预定时间内收到 所述对应网元返回的响应消息时, 所述响应结果为成功响应。 Determining whether the response result is a successful response; if yes, determining that the link state of the network element corresponding to the unique identifier is a communication normal state; otherwise, determining that the link state of the network element corresponding to the unique identifier is a broken link The response is a successful response when the asynchronous communication channel receives the response message returned by the corresponding network element within a predetermined time.
另一方面, 提供一种实现网元链路状态轮询的装置, 其中, 该装置包 括: 探测消息发送模块和响应结果处理模块; 其中, In another aspect, an apparatus for implementing network element link status polling is provided, where the apparatus includes: a probe message sending module and a response result processing module;
探测消息发送模块, 用于在第一工作线程中以遍历方式向多个待测网 元发送探测消息; a probe sending module, configured to send a probe message to the plurality of network elements to be tested in a traversal manner in the first working thread;
响应结果处理模块, 用于在第二工作线程中根据获取的响应结果确定 与所述响应结果相对应的待轮询网元的链路状态; a response result processing module, configured to determine, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result in the second working thread;
所述第一工作线程和第二工作线程相互独立。 The first worker thread and the second worker thread are independent of each other.
优选地, 所述探测消息发送模块包括: 异步通讯通道注册模块和发送 模块; 其中, Preferably, the probe message sending module includes: an asynchronous communication channel registration module and a sending module;
异步通讯通道注册模块, 用于为待轮询网元注册异步通讯通道, 每个 异步通讯通道对应一个待轮询网元; 息; The asynchronous communication channel registration module is configured to register an asynchronous communication channel for the network element to be polled, and each asynchronous communication channel corresponds to one network element to be polled;
所述响应结果处理模块包括: 响应结果获取模块和链路状态确定模块; 其中, The response result processing module includes: a response result obtaining module and a link state determining module; wherein
响应结果获取模块, 用于从注册的异步通讯通道获取对应网元的响应 结果; 状态。 The response result obtaining module is configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel;
优选地, 所述响应结果处理模块进一步包括:
异步通讯通道注销模块, 用于在确定所述网元的链路状态后, 注销所 述网元对应的异步通讯通道。 Preferably, the response result processing module further includes: The asynchronous communication channel unregistering module is configured to: after determining the link state of the network element, cancel the asynchronous communication channel corresponding to the network element.
又一方面, 提供一种实现网元链路状态轮询的网管服务器, 至少包括 实现网元链路状态轮询的装置, 该装置进一步包括: 探测消息发送模块和 响应结果处理模块; 其中, In another aspect, a network management server that implements network element link status polling includes at least a device for performing network element link status polling, and the apparatus further includes: a probe message sending module and a response result processing module;
探测消息发送模块, 用于在第一工作线程中以遍历方式向多个待测网 元发送探测消息; a probe sending module, configured to send a probe message to the plurality of network elements to be tested in a traversal manner in the first working thread;
响应结果处理模块, 用于在第二工作线程中根据获取的响应结果确定 与所述响应结果相对应的待轮询网元的链路状态; a response result processing module, configured to determine, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result in the second working thread;
所述第一工作线程和第二工作线程相互独立。 The first worker thread and the second worker thread are independent of each other.
优选地, 所述探测消息发送模块包括异步通讯通道注册模块和发送模 块; 其中, Preferably, the probe message sending module includes an asynchronous communication channel registration module and a sending module;
异步通讯通道注册模块, 用于为待轮询网元注册异步通讯通道, 每个 异步通讯通道对应一个待轮询网元; 息; The asynchronous communication channel registration module is configured to register an asynchronous communication channel for the network element to be polled, and each asynchronous communication channel corresponds to one network element to be polled;
所述响应结果处理模块包括响应结果获取模块和链路状态确定模块; 其中, The response result processing module includes a response result obtaining module and a link state determining module;
响应结果获取模块, 用于从注册的异步通讯通道获取对应网元的响应 结果; 状态。 The response result obtaining module is configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel;
优选地, 所述响应结果处理模块进一步包括: Preferably, the response result processing module further includes:
异步通讯通道注销模块, 用于在确定所述网元的链路状态后, 注销所 述网元对应的异步通讯通道。
本发明的技术效果在于: The asynchronous communication channel unregistering module is configured to: after determining the link state of the network element, cancel the asynchronous communication channel corresponding to the network element. The technical effects of the present invention are:
本发明提供了一种使用异步通讯方式实现网元链路状态轮询的方法, 通过在两个相互独立的工作线程分别实现探测消息发送的步骤和响应结果 处理的步骤, 使得网管服务器可以在向一个网元发送探测消息后, 无需等 待网元的响应, 而是立即又向下一个网元发送探测消息, 而各网元的响应 消息在第二工作线程统一处理, 这就意味着可以对多个网元以线性的方式 在同一个线程中进行轮询, 而无需为每个网元分配单独的线程, 由于发送 消息的时间极其短, 所以利用本发明的技术方案可以在较短的时间内向大 量的网元发送探测消息, 因此与现有技术的同步轮询方法相比, 利用本发 明的异步轮询方法可以在大量减少系统线程开销的同时, 提高轮询的及时 性。 附图说明 The present invention provides a method for implementing network element link status polling by using asynchronous communication mode. The steps of the probe message sending and the response result processing steps are respectively implemented in two mutually independent working threads, so that the network management server can be in the direction After a network element sends a probe message, it does not need to wait for the response of the network element, but immediately sends a probe message to the next network element, and the response message of each network element is uniformly processed in the second working thread, which means that it can be more The network elements are polled in the same thread in a linear manner, without having to allocate a separate thread for each network element. Since the time for sending the message is extremely short, the technical solution of the present invention can be used in a relatively short time. A large number of network elements send probe messages. Therefore, compared with the prior art synchronous polling method, the asynchronous polling method of the present invention can improve the timeliness of polling while greatly reducing system thread overhead. DRAWINGS
图 1 为现有技术的网管系统中网管服务器与被管网元之间的关系示意 图; 1 is a schematic diagram of a relationship between a network management server and a managed network element in a network management system of the prior art;
图 2为现有技术的同步轮询方法的流程示意图; 2 is a schematic flow chart of a synchronous polling method in the prior art;
图 3 为本发明实施例的实现网元链路状态轮询的方法中, 探测消息发 送步骤的流程示意图; FIG. 3 is a schematic flowchart of a sending message sending step in a method for implementing a network element link state polling according to an embodiment of the present invention;
图 4为本发明实施例的实现网元链路状态轮询的方法中, 响应结果处 理步骤的流程示意图; 4 is a schematic flowchart of a process of processing a response result in a method for implementing a link state polling of a network element according to an embodiment of the present invention;
图 5为本发明实施例的实现网元链路状态轮询的装置的结构示意图。 具体实施方式 FIG. 5 is a schematic structural diagram of an apparatus for implementing network element link status polling according to an embodiment of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图及具 体实施例对本发明进行详细描述。 The present invention will be described in detail below with reference to the drawings and specific embodiments.
在实现本发明的过程中发现, 现有技术的网元链路状态的同步轮询方
法, 在对网元的轮询过程中, 向网元发送探测消息后, 还继续占用线程时 间等待响应消息, 因此耗费时间。 In the process of implementing the present invention, it is found that the synchronous polling party of the state of the network element link state in the prior art In the polling process of the network element, after sending the probe message to the network element, the thread still waits for the thread time to wait for the response message, which is time consuming.
在实现本发明的过程中还发现, 异步通讯通道是一种异步通讯的机制, 操作系统底层具有该异步通讯的机制, 各种编程平台都提供了相应的系统 函数支持访问该底层的异步通讯通道。 异步通讯通道技术的基本原理是为 每个用户提供一个通讯通道, 用户将需要发送的数据交给异步通讯通道后 就返回, 由系统为用户监控通道上的消息响应。 在实现本发明的过程中发 现, 可以将上述异步通道技术应用到网元状态的轮询中来提供一种异步的 轮询方法, 在该异步的轮询方法中, 为每个网元提供一个异步通讯通道, 通过异步通讯通道向对应的网元发送探测消息, 而无需等待响应消息即响 应结果。 In the process of implementing the present invention, it is also found that the asynchronous communication channel is a mechanism for asynchronous communication, and the underlying operating system has the mechanism of asynchronous communication, and various programming platforms provide corresponding system functions to support access to the underlying asynchronous communication channel. . The basic principle of the asynchronous communication channel technology is to provide a communication channel for each user. The user returns the data to be sent to the asynchronous communication channel, and the system monitors the message response on the channel for the user. In the process of implementing the present invention, it is found that the asynchronous channel technology can be applied to the polling of the network element state to provide an asynchronous polling method. In the asynchronous polling method, one for each network element is provided. The asynchronous communication channel sends a probe message to the corresponding network element through the asynchronous communication channel without waiting for the response message, that is, the response result.
本发明提供了一种实现网元链路状态轮询的方法, 该方法为使用异步 通讯方式实现的轮询方法, 该方法包括: 在第一工作线程执行的探测消息 发送步骤, 以遍历的方式向多个待轮询网元发送探测消息; 在第二工作线 程执行的响应结果处理步骤, 根据获取的响应结果确定与所述响应结果相 对应的待轮询网元的链路状态; 所述第一工作线程与所述第二工作线程相 互独立。 优选地, 所述探测消息发送步骤包括: 为待轮询网元注册异步通讯通 通讯通道对应一个待轮询网元; 所述响应结果处理步骤包括: 从注册的异 步通讯通道获取对应网元的响应结果, 并 ^据所述响应结果确定所述对应 网元的链路状态。 The present invention provides a method for implementing network element link status polling, which is a polling method implemented by using an asynchronous communication method, the method comprising: transmitting a probe message in a first working thread, in a traversal manner Sending a probe message to the plurality of to-be-reviewed network elements; and in the response result processing step performed by the second worker thread, determining, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result; The first worker thread is independent of the second worker thread. Preferably, the step of transmitting the probe message comprises: registering, for the network element to be polled, an asynchronous communication communication channel corresponding to one to be polled network element; the processing result of the response result comprises: obtaining the corresponding network element from the registered asynchronous communication channel And responding to the result, and determining a link state of the corresponding network element according to the response result.
示例性地, 上述响应结果包括: 成功响应和失败响应; 当异步通讯通 道在预定时间内收到与该异步通讯通道对应的网元的响应消息时, 该响应
结果为成功响应; 否则, 该响应为失败响应。 当响应结果为成功响应时, 表明网元与网管服务器之间的通讯正常, 网元与网管服务器之间的链路为 通讯正常状态, 网元可达; 当响应结果为失败响应时, 表明网元与网管月良 务器之间的通讯不正常, 网元与网管服务器之间的链路为断链状态, 网元 不可达。 Exemplarily, the foregoing response result includes: a successful response and a failure response; when the asynchronous communication channel receives the response message of the network element corresponding to the asynchronous communication channel within a predetermined time, the response The result is a successful response; otherwise, the response is a failed response. When the response is successful, the communication between the NE and the NMS server is normal. The link between the NE and the NMS server is in the normal state of communication and the NE is reachable. When the response is a failure response, the network is displayed. The communication between the NE and the network management server is abnormal. The link between the NE and the NMS server is in a broken state and the NE is unreachable.
图 3 为本发明实施例的实现网元链路状态轮询的方法中, 探测消息发 送步骤的流程示意图。 在本发明实施例的实现网元链路状态轮询的方法中, 各步骤执行的主体为实现网元链路状态轮询的装置, 即具有实现网元链路 状态轮询功能的装置, 在图 3及图 4中以网管系统中的网管服务器为例进 行说明。 如图 3 , 该探测消息发送步骤的流程包括: FIG. 3 is a schematic flowchart of a step of transmitting a probe message in a method for implementing a link status polling of a network element according to an embodiment of the present invention. In the method for implementing the link state polling of the network element in the embodiment of the present invention, the main body executed in each step is a device for implementing the link state polling of the network element, that is, the device having the function of implementing the link state polling function of the network element, In FIG. 3 and FIG. 4, the network management server in the network management system is taken as an example for description. As shown in Figure 3, the process of sending the probe message includes:
步骤 301 , 网管服务器获取一个待轮询网元的信息; Step 301: The network management server acquires information about a network element to be polled.
示例性地, 该步骤中, 所有待轮询网元的信息预先存储在网管服务器 中, 如存储在设置在网管服务器的数据库中, 网管服务器在轮询时从该数 据库中取出一个待轮询网元的信息; Exemplarily, in this step, all the information of the network element to be polled is pre-stored in the network management server, for example, in a database set in the network management server, and the network management server takes out a polling network from the database during polling. Meta information
示例性地, 网元的信息包括: 该待轮询网元的 IP地址信息、 端口等; 步骤 302, 网管服务器注册一个异步通讯通道, 该异步通讯通道与上述 待轮询的网元相对应, 两者是——对应的关系, 并保存上述待轮询网元的 唯一标识; Illustratively, the information of the network element includes: IP address information, port, and the like of the network element to be polled; Step 302, the network management server registers an asynchronous communication channel, where the asynchronous communication channel corresponds to the network element to be polled, The two are - the corresponding relationship, and save the unique identifier of the above-mentioned network element to be polled;
示例性地, 该步骤中, 网管服务器向当前的操作系统注册一个异步通 讯通道; 示例性地, 如果操作系统的异步通讯通道不可以直接访问, 网管 服务器可以通过有相应系统函数支持的各种编程平台来注册异步通讯通 道; Exemplarily, in this step, the network management server registers an asynchronous communication channel with the current operating system; for example, if the asynchronous communication channel of the operating system is not directly accessible, the network management server can perform various programming supported by the corresponding system function. The platform registers the asynchronous communication channel;
示例性地, 上述网元的唯一标识为网元的 IP地址; Exemplarily, the unique identifier of the network element is an IP address of the network element;
示例性地, 该步骤中, 在注册异步通讯通道后, 在异步通讯通道对应 的通道对象中保存上述待轮询网元的唯一标识;
步骤 303 ,网管服务器通过异步通讯通道向该异步通讯通道对应的网元 发出探测消息即轮询请求消息, 然后, 转入步骤 301 , 继续对下一个待轮询 的网元进行轮询。 Illustratively, in this step, after the asynchronous communication channel is registered, the unique identifier of the to-be-polled network element is saved in the channel object corresponding to the asynchronous communication channel; Step 303: The network management server sends a probe message, that is, a polling request message, to the network element corresponding to the asynchronous communication channel through the asynchronous communication channel, and then proceeds to step 301 to continue polling the next network element to be polled.
该探测消息发送流程的特点在于: 把等待网元响应的时间利用起来, 在向当前待轮询的网元发出探测消息即轮询请求消息后, 无需等待网元返 回响应消息, 而是立即向下一个待轮询网元发出探测消息。 因为发送消息 的时间极短, 所以可以在较短的时间内向大量的网元发送探测消息。 且网 管服务器在这样的发送探测消息的方式下, 对多个网元就可以以线性的方 式在同一线程中进行轮询, 而无需为每个网元分配单独的线程, 从而节省 了线程开销, 在大量减少系统线程开销的同时, 提高了轮询的及时性。 The probe message sending process is characterized in that: the time for waiting for the response of the network element is utilized, and after the probe message, that is, the polling request message, is sent to the network element to be polled, the network element does not need to wait for the network element to return a response message, but immediately The next polling NE sends a probe message. Since the time for sending a message is extremely short, a probe message can be sent to a large number of network elements in a short time. In the manner of sending the probe message, the network management server can poll the multiple threads in the same thread in a linear manner without assigning a separate thread to each network element, thereby saving thread overhead. The timeliness of polling is improved while the system thread overhead is greatly reduced.
本发明实施例的网元链路状态轮询的方法中, 各网元返回的响应消息 由第二工作线程统一处理。 响应消息处理线程集中处理收到的响应消息, 其工作流程为: 遍历之前由第一工作线程注册的异步通讯通道, 检查通道 上是否有网元的响应消息, 获得响应结果, 并做相应处理。 由于中间无需 任何阻塞或等待, 因此可以快速遍历, 任何网元如果与网管系统断链, 很 快就能被发现。 In the method for polling the link state of the network element in the embodiment of the present invention, the response message returned by each network element is uniformly processed by the second working thread. The response message processing thread centrally processes the received response message, and the workflow is as follows: traversing the asynchronous communication channel registered by the first working thread before, checking whether there is a response message of the network element on the channel, obtaining a response result, and performing corresponding processing. Since there is no need for any blocking or waiting in the middle, it can be traversed quickly. Any network element can be discovered very quickly if it is disconnected from the network management system.
图 4为本发明实施例的网元链路状态轮询的方法中, 响应结果处理步 骤的流程示意图。 如图 4, 该实施例的响应结果处理步骤的流程包括: 步骤 401 ,网管服务器获取一个就绪的异步通讯通道的响应结果和该异 步通讯通道对应的网元的唯一标识; 其中, 就绪的异步通讯通道指已具有 响应结果的异步通讯通道; FIG. 4 is a schematic flowchart of a process of processing a response result in a method for polling a link state of a network element according to an embodiment of the present invention. As shown in FIG. 4, the process of the response result processing step of the embodiment includes: Step 401: The network management server obtains a response result of a ready asynchronous communication channel and a unique identifier of the network element corresponding to the asynchronous communication channel; wherein, the ready asynchronous communication A channel refers to an asynchronous communication channel that already has a response result;
该步骤中, 网管服务器在检查到就绪的异步通讯通道时, 获取该异步 通讯通道的响应结果和该异步通讯通道对应的网元的唯一标识, 该网元的 唯一标识用于标识与该响应结果相对应的网元, 也即与该异步通讯通道相 对应的网元;
示例性地, 在利用程序模块实现本发明时, 通常将所有注册的异步通 讯通道以对应通道对象的方式存储在一个存储空间中, 在执行该步骤中, 通常是从该存储空间中取出具有响应结果的异步通讯通道, 并从具有响应 结果的异步通讯通道对应的通道对象中获取对应的响应结果和对应网元的 唯一标识; In this step, the network management server obtains the response result of the asynchronous communication channel and the unique identifier of the network element corresponding to the asynchronous communication channel when the network communication server checks the ready asynchronous communication channel, and the unique identifier of the network element is used to identify and respond to the response result. Corresponding network element, that is, a network element corresponding to the asynchronous communication channel; Illustratively, when the present invention is implemented by using a program module, all registered asynchronous communication channels are usually stored in a storage space in a corresponding channel object. In this step, a response is usually taken out from the storage space. As a result, the asynchronous communication channel obtains the corresponding response result and the unique identifier of the corresponding network element from the channel object corresponding to the asynchronous communication channel having the response result;
步骤 402, 网管服务器判断获取的响应结果是否为成功响应; 如果是, 执行步骤 403; 否则, 执行步骤 404; Step 402, the network management server determines whether the obtained response result is a successful response; if yes, step 403; otherwise, step 404;
步骤 403 ,确定该异步通讯通道对应的网元即上述唯一标识对应的网元 的链路状态为通讯正常状态, 该对应网元可达; Step 403, determining that the network element corresponding to the asynchronous communication channel, that is, the link state of the network element corresponding to the unique identifier is a communication normal state, and the corresponding network element is reachable;
步骤 404,确定该异步通讯通道对应的网元即上述唯一标识对应的网元 的链路状态为通讯异常状态即断链状态, 该对应网元不可达; Step 404, determining that the network element corresponding to the asynchronous communication channel, that is, the link state of the network element corresponding to the unique identifier is a communication abnormal state, that is, a broken link state, and the corresponding network element is unreachable;
步骤 405 , 注销该异步通讯通道; Step 405, cancel the asynchronous communication channel;
步骤 406 ,网管服务器将确定出的网元的链路状态与当前存储的该网元 的旧链路状态相比较, 判断两者是否相同; 如果是, 则转入步骤 401 , 继续 获取下一个具有响应结果的异步通讯通道的响应结果;否则 ,执行步骤 407; 步骤 407 , 更新网管服务器中当前存储的该网元的链路状态或网元状 态, 示例性地, 通过修改数据库中存储的该网元的链路状态或网元状态, 之后转入步骤 401 ,继续获取下一个具有响应结果的异步通讯通道的响应结 果。 Step 406: The network management server compares the determined link state of the network element with the currently stored old link state of the network element, and determines whether the two are the same. If yes, the process proceeds to step 401, where the next acquisition is continued. The response result of the asynchronous communication channel of the response result; otherwise, step 407 is performed; step 407, updating the link state or the network element state of the network element currently stored in the network management server, exemplarily, by modifying the network stored in the database The link state of the element or the state of the network element, and then proceeds to step 401 to continue to obtain the response result of the next asynchronous communication channel having the response result.
与现有技术的同步轮询方法不同, 该实施例的轮询方法中, 在用于发 送探测消息的工作线程即第一工作线程中不再等待, 网管服务器发出探测 消息后不再等待网元的响应消息, 而是继续向下一个待轮询网元发送探测 消息, 所有网元的响应消息在第二工作线程集中处理, 网管服务器处理完 一个注册的异步通讯通道对应的网元的响应结果后, 继续处理下一个注册 的异步通讯通道对应的网元的响应结果。 在网管服务器将探测消息发送至
异步通讯通道, 异步通讯通道将该探测消息发出后, 由操作系统监控异步 通讯通道上的响应消息, 如果网元与网管服务器之间的链路通讯正常即网 元可达, 异步通讯通道将在预定时间内接收到网元返回的响应消息, 则异 步通讯通道输出一成功响应的响应结果; 否则, 如果网元与网管服务器之 间的链路断链即网元不可达, 则异步通讯通道将不能在预定时间内接收到 网元返回的响应消息, 则异步通讯通道输出一失败响应的响应结果。 网管 服务器通过获取异步通讯通道的响应结果来确定网元与网管服务器之间的 通讯链路是否正常。 Different from the synchronous polling method of the prior art, in the polling method of the embodiment, the working thread for sending the probe message, that is, the first working thread, is no longer waiting, and the network management server does not wait for the network element after issuing the probe message. The response message, but continues to send the probe message to the next polling network element, the response message of all network elements is processed in the second working thread, and the network management server processes the response result of the network element corresponding to a registered asynchronous communication channel. After that, the response result of the network element corresponding to the next registered asynchronous communication channel is processed. Send a probe message to the network management server to Asynchronous communication channel, after the asynchronous communication channel sends the probe message, the operating system monitors the response message on the asynchronous communication channel. If the link between the network element and the network management server is normal, the network element is reachable, and the asynchronous communication channel will be If the response message returned by the network element is received within the predetermined time, the asynchronous communication channel outputs a response result of the successful response; otherwise, if the link between the network element and the network management server is broken, that is, the network element is unreachable, the asynchronous communication channel will If the response message returned by the network element cannot be received within the predetermined time, the asynchronous communication channel outputs a response result of the failure response. The network management server determines whether the communication link between the network element and the network management server is normal by obtaining the response result of the asynchronous communication channel.
图 5 为本发明实施例的实现网元链路状态轮询的装置的结构示意图。 如图 5 , 该实施例的一种实现网元链路状态轮询的装置, 包括: 探测消息发 送模块 501及响应结果处理模块 502; 其中, 探测消息发送模块 501 , 用于 在第一工作线程以遍历的方式向多个待测网元发送探测消息; 响应结果处 理模块 502,用于在第二工作线程根据获取的响应结果确定与所述响应结果 相对应的待轮询网元的链路状态: 所述第一工作线程和第二工作线程相互 独立。 FIG. 5 is a schematic structural diagram of an apparatus for implementing network element link status polling according to an embodiment of the present invention. As shown in FIG. 5, an apparatus for implementing network element link status polling includes: a probe message sending module 501 and a response result processing module 502. The probe message sending module 501 is configured to be in the first working thread. Sending a probe message to the plurality of network elements to be tested in a traversal manner; the response result processing module 502 is configured to determine, according to the obtained response result, the link of the network element to be polled corresponding to the response result in the second working thread. Status: The first worker thread and the second worker thread are independent of each other.
优选地, 该实施例的装置中, 探测消息发送模块包括: 异步通讯通道 注册模块, 用于为待轮询网元注册异步通讯通道, 每个异步通讯通道对应 一个待轮询网元; 及发送模块, 用于通过所述异步通讯通道向所述待轮询 网元发送探测消息。 所述响应结果处理模块包括: 响应结果获取模块, 用 于从注册的异步通讯通道获取对应网元的响应结果; 及链路状态确定模块, 优选地, 该实施例的装置中, 所述响应结果处理模块进一步包括: 异 步通讯通道注销模块, 用于在确定所述网元的链路状态后, 注销所述网元 对应的异步通讯通道。 Preferably, in the apparatus of the embodiment, the probe message sending module includes: an asynchronous communication channel registration module, configured to register an asynchronous communication channel for the network element to be polled, each asynchronous communication channel corresponding to one to be polled network element; And a module, configured to send a probe message to the to-be-polled network element by using the asynchronous communication channel. The response result processing module includes: a response result obtaining module, configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel; and a link state determining module, and preferably, in the apparatus of the embodiment, the response result The processing module further includes: an asynchronous communication channel deregistration module, configured to: after determining the link state of the network element, cancel the asynchronous communication channel corresponding to the network element.
示例性地, 具体实现中, 上述实现网元链路状态轮询的装置可以实现
为一功能模块或一实体装置。 当该装置实现为功能模块时, 可设置在需要 实现轮询功能的设备中。 Exemplarily, in the specific implementation, the foregoing apparatus for implementing network element link status polling may be implemented. It is a functional module or a physical device. When the device is implemented as a function module, it can be set in a device that needs to implement a polling function.
本发明还提供了一种包含上述实现网元链路状态轮询的装置的网管服 务器。 The present invention also provides a network management server including the above apparatus for implementing network element link status polling.
示例性地, 本发明实施例描述的是使用 SNMP消息进行轮询的情况。 的关键区别在于不需要等待探测消息的返回, 这就意味可以对多个网元以 线性的方式在同一个线程中进行轮询, 而无需为每个网元分配单独的线程。 采用异步轮询方式后, 与传统的同步轮询方式需要花费大量工作线程相比 , 只需要两个工作线程: 发送轮询消息的线程和接收处理轮询响应消息的线 程; 这不仅节省了大量系统开销, 并且由于线程数量少, 所以两个工作线 程都可以全速运行, 这样轮询速度也大大提高。 Illustratively, the embodiment of the present invention describes a case where polling is performed using an SNMP message. The key difference is that there is no need to wait for the return of the probe message, which means that multiple network elements can be polled in the same thread in a linear fashion without having to assign a separate thread to each network element. With the asynchronous polling mode, compared with the traditional synchronous polling method, it takes only two working threads: a thread that sends a polling message and a thread that receives a polling response message; this not only saves a lot System overhead, and because of the small number of threads, both worker threads can run at full speed, and the polling speed is greatly improved.
举例说明, 以一个网元规模为 1000左右的企业网为例, 利用现有技术 的同步轮询方法, 需要启动 40个以上的工作线程, 且网元断链发现的平均 时间是 5-10分钟; 并且由于轮询对资源开销太大, 网管系统其他功能的性 能受到严重影响。 而采用本发明的异步轮询流程后, 对于同样规模的企业 网, 只需要一个探测消息发送线程和一个响应消息处理线程, 网元断链发 现的平均时间在 10秒以内; 且本发明的异步轮询流程对网管软件的其它功 能没有影响。 For example, an enterprise network with a network element size of about 1000 is used as an example. With the synchronous polling method of the prior art, more than 40 working threads need to be started, and the average time of network element broken links is 5-10 minutes. And because polling is too resource intensive, the performance of other functions of the network management system is seriously affected. After the asynchronous polling process of the present invention, only one probe message sending thread and one response message processing thread are needed for the enterprise network of the same size, and the average time of the network element broken link discovery is within 10 seconds; and the asynchronous method of the present invention The polling process has no effect on other functions of the network management software.
以上所述仅是本发明的优选实施方式, 应当指出, 对于本技术领域的 普通技术人员来说, 在不脱离本发明原理的前提下, 还可以作出若干改进 和润饰, 这些改进和润饰也应视为本发明的保护范围。
The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It is considered as the scope of protection of the present invention.
Claims
1、 一种实现网元链路状态轮询的方法, 其特征在于, 该方法包括: 在第一工作线程执行的探测消息发送步骤, 以遍历方式向多个待轮询 网元发送探测消息; A method for implementing a network element link status polling, the method comprising: transmitting, in a traversal manner, a probe message to a plurality of to-be-polled network elements in a probe message sending step performed by the first working thread;
在第二工作线程执行的响应结果处理步骤, 根据获取的响应结果确定 与所述响应结果相对应的待轮询网元的链路状态; a response result processing step performed by the second worker thread, determining, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result;
所述第一工作线程与所述第二工作线程相互独立。 The first worker thread and the second worker thread are independent of each other.
2、 根据权利要求 1所述的方法, 其特征在于, 2. The method of claim 1 wherein
所述探测消息发送步骤包括: 为待轮询网元注册异步通讯通道, 并通 对应一个待轮询网元; The sending of the probe message includes: registering an asynchronous communication channel for the network element to be polled, and corresponding to a network element to be polled;
所述响应结果处理步骤包括: 从注册的异步通讯通道对应的通道对象 中获取对应网元的响应结果, 并 ^据所述响应结果确定所述对应网元的链 路状态。 The response result processing step includes: obtaining a response result of the corresponding network element from the channel object corresponding to the registered asynchronous communication channel, and determining a link state of the corresponding network element according to the response result.
3、 根据权利要求 2所述的方法, 其特征在于, 在所述响应结果处理步 骤中还包括: 在确定所述网元的链路状态后, 注销所述网元对应的异步通 讯通道。 The method according to claim 2, wherein the step of processing the response result further comprises: after determining the link state of the network element, canceling the asynchronous communication channel corresponding to the network element.
4、 根据权利要求 1至 3任一项所述的方法, 其特征在于, 4. A method according to any one of claims 1 to 3, characterized in that
在所述响应结果处理步骤中还包括: 在确定一个待轮询网元的链路状 态后, 继续根据获取的下一个响应结果确定所述下一个响应结果对应的待 轮询网元的链路状态。 The step of the response result processing further includes: after determining a link state of the network element to be polled, determining to determine, according to the obtained next response result, the link of the to-be-polled network element corresponding to the next response result. status.
5、 根据权利要求 2或 3所述的方法, 其特征在于, 5. A method according to claim 2 or 3, characterized in that
所述探测消息发送步骤中还包括: 为待轮询网元注册异步通讯通道时, 在与所述注册的异步通讯通道对应的通道对象中保存所述待轮询网元的唯 一标识;
相应地, 所述响应结果处理步骤中还包括: 在从注册的异步通讯通道 对应的通道对象中获取对应网元的响应结果时, 获取所述通道对象中存储 的网元的唯一标只。 The step of transmitting the probe message further includes: when registering the asynchronous communication channel for the network element to be polled, storing the unique identifier of the network element to be polled in the channel object corresponding to the registered asynchronous communication channel; Correspondingly, the step of processing the response result further includes: acquiring the unique target of the network element stored in the channel object when the response result of the corresponding network element is obtained from the channel object corresponding to the registered asynchronous communication channel.
6、 根据权利要求 5所述的方法, 其特征在于, 所述响应结果处理步骤 中, 在获取所述响应结果和网元的唯一标识后, 还包括: The method according to claim 5, wherein, in the step of processing the response result, after obtaining the response result and the unique identifier of the network element, the method further includes:
判断所述响应结果是否为成功响应; 如果是, 则确定所述唯一标识对 应的网元的链路状态为通讯正常状态; 否则, 确定所述唯一标识对应的网 元的链路状态为断链状态; 其中, 当所述异步通讯通道在预定时间内收到 所述对应网元返回的响应消息时, 所述响应结果为成功响应。 Determining whether the response result is a successful response; if yes, determining that the link state of the network element corresponding to the unique identifier is a communication normal state; otherwise, determining that the link state of the network element corresponding to the unique identifier is a broken link The response is a successful response when the asynchronous communication channel receives the response message returned by the corresponding network element within a predetermined time.
7、 一种实现网元链路状态轮询的装置, 其特征在于, 该装置包括: 探 测消息发送模块和响应结果处理模块; 其中, A device for implementing a network element link status polling, the device comprising: a probe message sending module and a response result processing module;
探测消息发送模块, 用于在第一工作线程中以遍历方式向多个待测网 元发送探测消息; a probe sending module, configured to send a probe message to the plurality of network elements to be tested in a traversal manner in the first working thread;
响应结果处理模块, 用于在第二工作线程中根据获取的响应结果确定 与所述响应结果相对应的待轮询网元的链路状态; a response result processing module, configured to determine, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result in the second working thread;
所述第一工作线程和第二工作线程相互独立。 The first worker thread and the second worker thread are independent of each other.
8、 根据权利要求 7所述的装置, 其特征在于, 所述探测消息发送模块 包括: 异步通讯通道注册模块和发送模块; 其中, The device according to claim 7, wherein the probe message sending module comprises: an asynchronous communication channel registration module and a sending module;
异步通讯通道注册模块, 用于为待轮询网元注册异步通讯通道, 每个 异步通讯通道对应一个待轮询网元; 息; The asynchronous communication channel registration module is configured to register an asynchronous communication channel for the network element to be polled, and each asynchronous communication channel corresponds to one network element to be polled;
所述响应结果处理模块包括: 响应结果获取模块和链路状态确定模块; 其中, The response result processing module includes: a response result obtaining module and a link state determining module; wherein
响应结果获取模块, 用于从注册的异步通讯通道获取对应网元的响应
结果; 状态。 a response result obtaining module, configured to obtain a response of the corresponding network element from the registered asynchronous communication channel Result; status.
9、 根据权利要求 8所述的装置, 其特征在于, 所述响应结果处理模块 进一步包括: 9. The apparatus according to claim 8, wherein the response result processing module further comprises:
异步通讯通道注销模块, 用于在确定所述网元的链路状态后, 注销所 述网元对应的异步通讯通道。 The asynchronous communication channel unregistering module is configured to, after determining the link state of the network element, log off the asynchronous communication channel corresponding to the network element.
10、 一种实现网元链路状态轮询的网管服务器, 其特征在于, 至少包 括实现网元链路状态轮询的装置, 该装置进一步包括: 探测消息发送模块 和响应结果处理模块; 其中, A network management server that implements network element link status polling, and is characterized in that it includes at least a device for implementing network element link status polling, and the apparatus further includes: a probe message sending module and a response result processing module;
探测消息发送模块, 用于在第一工作线程中以遍历方式向多个待测网 元发送探测消息; a probe sending module, configured to send a probe message to the plurality of network elements to be tested in a traversal manner in the first working thread;
响应结果处理模块, 用于在第二工作线程中根据获取的响应结果确定 与所述响应结果相对应的待轮询网元的链路状态; a response result processing module, configured to determine, according to the obtained response result, a link state of the to-be-polled network element corresponding to the response result in the second working thread;
所述第一工作线程和第二工作线程相互独立。 The first worker thread and the second worker thread are independent of each other.
11、 根据权利要求 10所述的网关服务器, 其特征在于, 所述探测消息 发送模块包括异步通讯通道注册模块和发送模块; 其中, The gateway server according to claim 10, wherein the probe message sending module comprises an asynchronous communication channel registration module and a sending module;
异步通讯通道注册模块, 用于为待轮询网元注册异步通讯通道, 每个 异步通讯通道对应一个待轮询网元; 息; The asynchronous communication channel registration module is configured to register an asynchronous communication channel for the network element to be polled, and each asynchronous communication channel corresponds to one network element to be polled;
所述响应结果处理模块包括响应结果获取模块和链路状态确定模块; 其中, The response result processing module includes a response result obtaining module and a link state determining module;
响应结果获取模块, 用于从注册的异步通讯通道获取对应网元的响应 结果;
状态。 a response result obtaining module, configured to obtain a response result of the corresponding network element from the registered asynchronous communication channel; status.
12、 根据权利要求 11所述的网关服务器, 其特征在于, 所述响应结果 处理模块进一步包括: The gateway server according to claim 11, wherein the response result processing module further comprises:
异步通讯通道注销模块, 用于在确定所述网元的链路状态后, 注销所 述网元对应的异步通讯通道。
The asynchronous communication channel unregistering module is configured to, after determining the link state of the network element, log off the asynchronous communication channel corresponding to the network element.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100914098A CN101997704A (en) | 2009-08-20 | 2009-08-20 | Method, device and network management server for realizing element location link state polling |
CN200910091409.8 | 2009-08-20 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011020348A1 true WO2011020348A1 (en) | 2011-02-24 |
Family
ID=43606607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/072833 WO2011020348A1 (en) | 2009-08-20 | 2010-05-17 | Method, device and network management server for implementing polling for network element link state |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101997704A (en) |
WO (1) | WO2011020348A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103684841A (en) * | 2012-09-26 | 2014-03-26 | 中兴通讯股份有限公司 | Network management server and link discovery comparison method |
CN104486188B (en) * | 2014-11-18 | 2018-04-27 | 深圳达实智能股份有限公司 | A kind of method to set up and device for receiving and dispatching separate threads |
CN109495303A (en) * | 2018-11-19 | 2019-03-19 | 广州开信通讯系统有限公司 | Obtain the method, device network managing device and system, electronic device and storage medium of equipment parameter information |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4380065A (en) * | 1980-09-29 | 1983-04-12 | Honeywell Information Systems Inc. | Communication multiplexer variable priority scheme |
CN1859183A (en) * | 2005-12-30 | 2006-11-08 | 华为技术有限公司 | Method and device for realizing equipment state polling |
CN1975680A (en) * | 2006-11-27 | 2007-06-06 | 浙江大学 | Method for realizing interprocess asynchronous communication based on Java |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100588197C (en) * | 2005-12-31 | 2010-02-03 | 华中科技大学 | A grid simulation method and its simulator |
-
2009
- 2009-08-20 CN CN2009100914098A patent/CN101997704A/en active Pending
-
2010
- 2010-05-17 WO PCT/CN2010/072833 patent/WO2011020348A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4380065A (en) * | 1980-09-29 | 1983-04-12 | Honeywell Information Systems Inc. | Communication multiplexer variable priority scheme |
CN1859183A (en) * | 2005-12-30 | 2006-11-08 | 华为技术有限公司 | Method and device for realizing equipment state polling |
CN1975680A (en) * | 2006-11-27 | 2007-06-06 | 浙江大学 | Method for realizing interprocess asynchronous communication based on Java |
Non-Patent Citations (1)
Title |
---|
CHEN, MINGFENG ET AL.: "Application of Distributed Object Asynchronous Messaging Technology in TT&C Software.", JORNAL OF SPACECRAFT TT&C TECHNOLOGY., vol. 26, no. 1, February 2007 (2007-02-01), pages 85 - 89 * |
Also Published As
Publication number | Publication date |
---|---|
CN101997704A (en) | 2011-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8910248B2 (en) | Terminal connection status management with network authentication | |
US8782160B2 (en) | Cluster control system, cluster control method, and program | |
US10470111B1 (en) | Protocol to detect if uplink is connected to 802.1D noncompliant device | |
US8472336B2 (en) | Network management apparatus for setting communication method of network apparatus | |
WO2019052058A1 (en) | Domain name redirecting method and system | |
JP5508273B2 (en) | Network location service | |
JP3153129B2 (en) | Server selection method | |
WO2011020348A1 (en) | Method, device and network management server for implementing polling for network element link state | |
CN115309498A (en) | Container state adjustment method, device, device and storage medium for K8s cluster | |
KR20110063328A (en) | Remote Frazier Load (RCPC) Bind Service with Physical Interface Query and Selection | |
US7948983B2 (en) | Method, computer program product, and apparatus for providing passive automated provisioning | |
JP2010044553A (en) | Data processing method, cluster system, and data processing program | |
US7738362B2 (en) | System and method for address notification in a network | |
WO2007059667A1 (en) | A method for obtaining the network element alarm data | |
WO2019119269A1 (en) | Network fault detection method and control center device | |
WO2021083375A1 (en) | Method and apparatus for detecting link states | |
JP3730545B2 (en) | Service control application execution method and system | |
CN112039792B (en) | Network scanning scheduling method for avoiding congestion | |
JP6014068B2 (en) | Relay device, relay method, and computer program | |
CN101616025B (en) | Method and device for determining active and standby services on a control board | |
CN110912997B (en) | Method and device for checking Loopback interface of triangular networking | |
JP5514153B2 (en) | Transmission apparatus, relay apparatus, monitoring control apparatus, IP network system, and network device existence confirmation method | |
CN117896350A (en) | Address conflict detection method, device, equipment and computer readable storage medium | |
JP2008098698A (en) | Radio communication system | |
CN119828668A (en) | Processing method and device for vehicle fault diagnosis message and electronic 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: 10809481 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: 10809481 Country of ref document: EP Kind code of ref document: A1 |