一种多对等节点通信中主控设备选举方法技术

技术编号:19151806 阅读:52 留言:0更新日期:2018-10-13 10:40
本发明专利技术公开了一种多对等节点通信中主控设备选举方法,包含以下步骤:A、广播本设备上电后将自己置为从模式并记录系统时间作为上线时间T1;B、监控网络上的心跳包并计时,假如在3倍的T1时间内有监控到主控心跳包就保持状态继续监控网络上的心跳包,假如没有监控到说明现网没有主控设备在,则启动选举过程。通过本发明专利技术,可以实现在多对等节点的通信中选举出一个主控设备作为管理接口,以及在网络环境有变动,比如主控或者从设备掉线,重启等的时候重新选举出主控设备。保证在任何时间都会保证有且仅有一个主控设备存在于网络中。在多节点网络通信时,保留网络的管理功能同时,降低组网成本。

An election method for main control equipment in multi peer communication

The invention discloses a method for selecting a master device in multi-peer communication, which comprises the following steps: A, setting itself as a slave mode after broadcasting the device is powered on and recording the system time as the on-line time T1; B, monitoring the heartbeat packet on the network and timing it, if the master heartbeat packet is monitored within 3 times of T1 time, it will be maintained. The status continues to monitor the heartbeat packet on the network, and if it is not monitored to indicate that there is no master device in the network, the election process is started. Through the invention, a master control device can be selected as a management interface in the communication of multi-peer nodes, and the master control device can be re-elected when the network environment changes, such as the master control or slave device is off-line, restart, etc. It is guaranteed that only one master device exists in the network at any time. In the multi node network communication, the management function of the network is retained while the networking cost is reduced.

【技术实现步骤摘要】
一种多对等节点通信中主控设备选举方法
本专利技术涉及通信
,具体是一种多对等节点通信中主控设备选举方法。
技术介绍
在多节点通信中,出于管理的需要,通信节点中需要有一台设备承担用户管理接口及与其他通信设备对话的职能。这个设备通常也被叫做主控设备。常用的做法是在布设网络时就指定一台设备做主控设备,它可以收集其他设备的信息后做一个统一接口供用户管理查看或者和其他通信设备通信。但是这种做法有以下几种缺点:1、设备生产的时候要按照两种产品进行生产,生产管理成本较高。2、组网时候布设需要区分不同设备,增加施工维护复杂度。3、当原来的主控设备出故障或掉线时,整个通信网络出于瘫痪状态,通信系统的稳定性很低。其典型的场景是在电力线通信中,其组网方式为网络入口处布设一个通信节点,在用户端按照需求布设一个或者多个节点用于用户数据接入。入口处的通信节点也叫做主干节点。电力线主干节点因为布设在家庭网络入口处,靠近家庭网关或者前端的路由器,家庭网关和路由器本身通常都具备WiFi功能,如果主干节点设备也具备WiFi功能,就可能和家庭网关或路由器的WiFi互相冲突干扰。基于以上原因以及成本考虑,主干节点的设本文档来自技高网...

【技术保护点】
1.一种多对等节点通信中主控设备选举方法,其特征在于,包含以下步骤:A、广播本设备上电后将自己置为从模式并记录系统时间作为上线时间T1;B、监控网络上的心跳包并计时,假如在3倍的T1时间内有监控到主控心跳包就保持状态继续监控网络上的心跳包,假如没有监控到说明现网没有主控设备在,则启动选举过程。

【技术特征摘要】
1.一种多对等节点通信中主控设备选举方法,其特征在于,包含以下步骤:A、广播本设备上电后将自己置为从模式并记录系统时间作为上线时间T1;B、监控网络上的心跳包并计时,假如在3倍的T1时间内有监控到主控心跳包就保持状态继续监控网络上的心跳包,假如没有监控到说明现网没有主控设备在,则启动选举过...

【专利技术属性】
技术研发人员:吴林严晓谊文剑清胡安文严晓冬熊初星秦兴
申请(专利权)人:深圳市海亿康科技有限公司
类型:发明
国别省市:广东,44

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1