CN107342915B - 基于自适应轮询的设备管理方法 - Google Patents

基于自适应轮询的设备管理方法 Download PDF

Info

Publication number
CN107342915B
CN107342915B CN201710470602.7A CN201710470602A CN107342915B CN 107342915 B CN107342915 B CN 107342915B CN 201710470602 A CN201710470602 A CN 201710470602A CN 107342915 B CN107342915 B CN 107342915B
Authority
CN
China
Prior art keywords
message
polling
time
management method
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710470602.7A
Other languages
English (en)
Other versions
CN107342915A (zh
Inventor
周丹丹
陈水明
范孜文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Gogenius Technology Co ltd
Original Assignee
Hangzhou Gogenius Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Gogenius Technology Co ltd filed Critical Hangzhou Gogenius Technology Co ltd
Priority to CN201710470602.7A priority Critical patent/CN107342915B/zh
Publication of CN107342915A publication Critical patent/CN107342915A/zh
Application granted granted Critical
Publication of CN107342915B publication Critical patent/CN107342915B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/103Active monitoring, e.g. heartbeat, ping or trace-route with adaptive polling, i.e. dynamically adapting the polling rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1825Adaptation of specific ARQ protocol parameters according to transmission conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1848Time-out mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/188Time-out mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Communication Control (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种基于自适应轮询的设备管理方法,本发明从轮询应答和消息发送应答两个方面着手,根据设定范围动态调整轮询的回复时间,适应不同数据和设备的回复时间;根据设定范围调整设定轮询间隔时间,节省轮询等待时间;根据设定范围动态调整轮询超时时间,降低丢失概率;可以动态跳过掉线子设备,提高有效轮询次数;根据设定智能调整重发次数,有效提高数据发送的成功率,从而实现自适应调整轮询时间和频率。

Description

基于自适应轮询的设备管理方法
技术领域
本发明涉及通信技术领域,具体涉及一种基于自适应轮询的设备管理方法。
背景技术
在现有技术当中,RS485通信协议是广泛应用的通信协议标准,RS-485的电气特性:采用差分信号负逻辑,逻辑"1”以两线间的电压差为-(2~6)V表示;逻辑"0"以两线间的电压差为+(2~6)V表示。RS485接口是采用平衡驱动器和差分接收器的组合,抗共模干扰能力增强,即抗噪声干扰性好。现有技术的RS485 通信协议,多采用轮询方式对子设备进行访问和数据交互。由于轮询时间固定,效率较低,不能根据数据的回复动态调整轮询时间和频率。例如,一旦中间某个设备在轮询中多次未进行回复,对其的轮询就影响整体的效率。
发明内容
有鉴于此,本发明的目的在于提供一种自适应调整轮询时间和频率的基于自适应轮询的设备管理方法,用以解决现有技术存在的轮询时间固定而导致效率低的技术问题。
本发明的技术解决方案是,提供一种以下步骤的基于自适应轮询的设备管理方法,包括以下步骤:
轮询和轮询应答:第一次轮询,在设定的超时时间的一半还未收到回复,进入下一个设备询问,待到第二次轮询该设备的超时时间达到设定超时时间的三分之二,如果没有收到回复,进入下一个设备询问,第三次轮询超时时间为设定的超时时间,
当达到三次超时的情况下,之后的该设备的轮询将每N次轮询只进行一次,超时时间为设定时间;在上述过程中,保持其他设备的轮询超时时间不变。
可选的,在对该设备每N次轮询只进行一次的过程中,当收到轮询回复后,则立即恢复正常轮询。
可选的,所述的N为3~8。
可选的,所述设备管理方法还包括:
消息发送和消息应答:当消息队列中有下一次轮询设备的消息时,进入消息发送模式,直接发送消息,同时消息应答时间按消息长度的一定比例延长。
可选的,所述的消息发送和消息应答还包括:当第一次发送消息没有收到消息应答,根据设定消息重发次数决定是否在下一次轮询时重发发送消息。
可选的,当重发超过次数限制仍没有消息应答,则在消息队列中删除消息。
可选的,当子设备有消息上报时,子设备在收到轮询消息后直接发送消息,等待主机设备发送消息应答,如果收到消息应答则从消息队列中删除消息,如果没有收到消息应答则在下一次被轮询时,由设定的重发次数决定是否重发消息。
可选的,当子设备有消息上报时,在等待主机设备发送消息应答,如果超过设定的超时时间后消息还在消息队列中,则从消息队列中移除。
采用本发明的方法,与现有技术相比,具有以下优点:本发明从轮询应答和消息发送应答两个方面着手,根据设定范围动态调整轮询的回复时间,适应不同数据和设备的回复时间;根据设定范围调整设定轮询间隔时间,节省轮询等待时间;根据设定范围动态调整轮询超时时间,降低丢失概率;可以动态跳过掉线子设备,提高有效轮询次数;根据设定智能调整重发次数,有效提高数据发送的成功率,从而实现自适应调整轮询时间和频率。
可以根据设定时间动态调整队列的有效等待时间,节省时间提高系统实时性。
具体实施方式
以下对本发明的优选实施例进行详细描述,但本发明并不仅仅限于这些实施例。本发明涵盖任何在本发明的精神和范围上做的替代、修改、等效方法以及方案。
为了使公众对本发明有彻底的了解,在以下本发明优选实施例中详细说明了具体的细节,而对本领域技术人员来说没有这些细节的描述也可以完全理解本发明。
本发明为基于自适应轮询的设备管理方法,以RS485通讯协议为例,包括以下步骤:
轮询和轮询应答:第一次轮询,在设定的超时时间的一半还未收到回复,进入下一个设备询问,待到第二次轮询该设备的超时时间达到设定超时时间的三分之二,如果没有收到回复,进入下一个设备询问,第三次轮询超时时间为设定的超时时间,
当达到三次超时的情况下,之后的该设备的轮询将每N次轮询只进行一次,超时时间为设定时间;在上述过程中,保持其他设备的轮询超时时间不变。
在对该设备每N次轮询只进行一次的过程中,当收到轮询回复后,则立即恢复正常轮询。
所述的N为3~8。
所述设备管理方法还包括:
消息发送和消息应答:当消息队列中有下一次轮询设备的消息时,进入消息发送模式,直接发送消息,同时消息应答时间按消息长度的一定比例延长。
所述的消息发送和消息应答还包括:当第一次发送消息没有收到消息应答,根据设定消息重发次数决定是否在下一次轮询时重发发送消息。
当重发超过次数限制仍没有消息应答,则在消息队列中删除消息。
当子设备有消息上报时,子设备在收到轮询消息后直接发送消息,等待主机设备发送消息应答,如果收到消息应答则从消息队列中删除消息,如果没有收到消息应答则在下一次被轮询时,由设定的重发次数决定是否重发消息。
当子设备有消息上报时,在等待主机设备发送消息应答,如果超过设定的超时时间后消息还在消息队列中,则从消息队列中移除。
以上所提及的超时时间可以设定和调整,超时的次数也可以根据应用场景而有所不同。
虽然以上将实施例分开说明和阐述,但涉及部分共通之技术,在本领域普通技术人员看来,可以在实施例之间进行替换和整合,涉及其中一个实施例未明确记载的内容,则可参考有记载的另一个实施例。
以上所述的实施方式,并不构成对该技术方案保护范围的限定。任何在上述实施方式的精神和原则之内所作的修改、等同替换和改进等,均应包含在该技术方案的保护范围之内。

Claims (8)

1.一种基于自适应轮询的设备管理方法,包括以下步骤:
轮询和轮询应答:第一次轮询,在设定的超时时间的一半还未收到一个设备的回复,进入下一个设备询问,待到第二次轮询该未收到回复的设备的超时时间达到设定超时时间的三分之二,如果没有收到回复,进入下一个设备询问,第三次轮询超时时间为设定的超时时间,
当达到三次超时的情况下,之后的该未收到回复的设备的轮询将每N次轮询只进行一次,超时时间为设定时间;在上述过程中,保持其他设备的轮询超时时间不变。
2.根据权利要求1所述的基于自适应轮询的设备管理方法,其特征在于:在对该未收到回复的设备每N次轮询只进行一次的过程中,当收到轮询回复后,则立即恢复正常轮询。
3.根据权利要求2所述的基于自适应轮询的设备管理方法,其特征在于:所述的N为3~8。
4.根据权利要求1或2所述的基于自适应轮询的设备管理方法,其特征在于:所述设备管理方法还包括:
消息发送和消息应答:当消息队列中有下一次轮询设备的消息时,进入消息发送模式,直接发送消息,同时消息应答时间按消息长度的一定比例延长。
5.根据权利要求4所述的基于自适应轮询的设备管理方法,其特征在于:所述的消息发送和消息应答还包括:当第一次发送消息没有收到消息应答,根据设定消息重发次数决定是否在下一次轮询时重发发送消息。
6.根据权利要求5所述的基于自适应轮询的设备管理方法,其特征在于:当重发超过次数限制仍没有消息应答,则在消息队列中删除消息。
7.根据权利要求6所述的基于自适应轮询的设备管理方法,其特征在于:当子设备有消息上报时,子设备在收到轮询消息后直接发送消息,等待主机设备发送消息应答,如果收到消息应答则从消息队列中删除消息,如果没有收到消息应答则在下一次被轮询时,由设定的重发次数决定是否重发消息。
8.根据权利要求7所述的基于自适应轮询的设备管理方法,其特征在于:当子设备有消息上报时,在等待主机设备发送消息应答,如果超过设定的超时时间后消息还在消息队列中,则从消息队列中移除。
CN201710470602.7A 2017-06-20 2017-06-20 基于自适应轮询的设备管理方法 Active CN107342915B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710470602.7A CN107342915B (zh) 2017-06-20 2017-06-20 基于自适应轮询的设备管理方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710470602.7A CN107342915B (zh) 2017-06-20 2017-06-20 基于自适应轮询的设备管理方法

Publications (2)

Publication Number Publication Date
CN107342915A CN107342915A (zh) 2017-11-10
CN107342915B true CN107342915B (zh) 2020-04-21

Family

ID=60220766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710470602.7A Active CN107342915B (zh) 2017-06-20 2017-06-20 基于自适应轮询的设备管理方法

Country Status (1)

Country Link
CN (1) CN107342915B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464372B (zh) * 2019-01-18 2021-09-24 广东天创同工大数据应用有限公司 一种提高通讯刷新速度的方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859183A (zh) * 2005-12-30 2006-11-08 华为技术有限公司 一种实现设备状态轮询的方法及装置
CN104022515A (zh) * 2013-08-01 2014-09-03 上海致维电气有限公司 无功补偿柜及其的无功补偿单元的控制方法
CN106101022A (zh) * 2016-06-15 2016-11-09 珠海迈科智能科技股份有限公司 一种数据请求处理方法和系统
CN106301969A (zh) * 2016-10-25 2017-01-04 广东亿迅科技有限公司 Http长链接的管理方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7590100B2 (en) * 2005-12-23 2009-09-15 Motorola, Inc. Method for packet polling in a WLAN
CN101753246A (zh) * 2008-11-28 2010-06-23 华为技术有限公司 轮询的方法和装置
CN102184253A (zh) * 2011-05-30 2011-09-14 北京搜狗科技发展有限公司 对网络资源进行抓取及更新消息推送的方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859183A (zh) * 2005-12-30 2006-11-08 华为技术有限公司 一种实现设备状态轮询的方法及装置
CN104022515A (zh) * 2013-08-01 2014-09-03 上海致维电气有限公司 无功补偿柜及其的无功补偿单元的控制方法
CN106101022A (zh) * 2016-06-15 2016-11-09 珠海迈科智能科技股份有限公司 一种数据请求处理方法和系统
CN106301969A (zh) * 2016-10-25 2017-01-04 广东亿迅科技有限公司 Http长链接的管理方法及系统

Also Published As

Publication number Publication date
CN107342915A (zh) 2017-11-10

Similar Documents

Publication Publication Date Title
DE69935802T2 (de) Modem mit einer programmierbaren, universellen datenzugriffsanordnung
KR20030084422A (ko) 래디오 링크 콘트롤의 폴링방법
US7120847B2 (en) Powerline network flood control restriction
TWI466564B (zh) 應用在通訊系統之傳輸功率調整方法及其裝置
JP2018507630A5 (zh)
CN103517386B (zh) 无线局域网的数据传输方法及设备
CN103973414B (zh) 一种数据传输方法及装置
US20120327770A1 (en) Flow control for powerline communications
JP2002135357A (ja) 通信システムにおけるデータ流れの制御方法
CN101068419A (zh) 无线通讯系统计时器的预设值设定方法及其相关装置
CN101202608B (zh) 一种确认方式数据的传输方法及系统
CN107342915B (zh) 基于自适应轮询的设备管理方法
US20200137203A1 (en) Data transmission method and system, and apparatus
CN102801692B (zh) 一种基于分裂连接的传输控制协议优化方法及系统
CN109586932B (zh) 组播方法及终端设备
CN104283716A (zh) 数据传输方法、设备及系统
CN108040332B (zh) 基于蓝牙的音频传输方法及装置、存储介质、终端
CN103733600A (zh) 一种建立链路的方法、节点及装置
US10420140B2 (en) Multi-destination burst protocol
CN108988994B (zh) 报文的重传方法及装置
CN105517058A (zh) 移动终端数据传输控制方法及装置
CN114449661A (zh) Tws耳机的主副耳机通信方法及tws耳机
US20030181212A1 (en) Shared-communications channel utilization for applications having different class of service requirements
US20180109463A1 (en) Method of dynamically adjusting frame aggregation size
EP2073425A3 (en) Apparatus and method for optimizing status report time in mobile communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant