CN102684923A - Self-healing networking method for half-duplex asynchronous communication - Google Patents

Self-healing networking method for half-duplex asynchronous communication Download PDF

Info

Publication number
CN102684923A
CN102684923A CN201210163930XA CN201210163930A CN102684923A CN 102684923 A CN102684923 A CN 102684923A CN 201210163930X A CN201210163930X A CN 201210163930XA CN 201210163930 A CN201210163930 A CN 201210163930A CN 102684923 A CN102684923 A CN 102684923A
Authority
CN
China
Prior art keywords
node
slave
message
roll
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201210163930XA
Other languages
Chinese (zh)
Inventor
徐魁
蒋瑀瀛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JIANGSU HUADE ELECTRIC POWER TECHNOLOGY Co Ltd
Original Assignee
JIANGSU HUADE ELECTRIC POWER 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 JIANGSU HUADE ELECTRIC POWER TECHNOLOGY Co Ltd filed Critical JIANGSU HUADE ELECTRIC POWER TECHNOLOGY Co Ltd
Priority to CN201210163930XA priority Critical patent/CN102684923A/en
Publication of CN102684923A publication Critical patent/CN102684923A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a self-healing networking method for half-duplex asynchronous communication. The self-healing networking method comprises the following steps: firstly, a node in a network competes to become a host in a circular roll call mode; when a node smaller than the ID (Identity) of the network node is received and a roll call message is sent by the network node, the network node is converted into a slave; if only slave response is received after one round of roll call and no other completion roll calls are in the presence, the slave becomes the host; a status inquiry message (or practically required application message) is circularly sent to all slaves by the host; the slaves which do not respond three times continuously are rejected from a network; at the end of each polling, a new inquired node message is sent; if the host finds that the ID of the host is bigger than the ID of the new node, the host is converted into the slave; and otherwise, the new node is added to a slave list. Therefore, according to the self-healing networking method, the concept that the host and the slave must be appointed for avoiding conflict caused by sending messages by multiple nodes in the traditional half-duplex asynchronous communication network is cancelled. In addition, nodes can be flexibly added and deleted in the network without affecting normal networking application.

Description

A kind of half-duplex asynchronous communication self-healing network-building method
Technical field
The present invention relates to a kind of data communication field, more specifically, relate to the self-healing network-building method under the half-duplex asynchronous communication condition.
Background technology
Half-duplex asynchronous communication bus is by the widely used data communication bus of each research and development institution, and it often is applied between centralized control hinge and the decentralized control unit, because in the real application systems; The decentralized control element number is more; Receive the restriction of asynchronous communication, node can not be received and dispatched message simultaneously, can not have two or more nodes to send message simultaneously; Must specify a host node (main frame); Let host node successively question and answer realize mutual communication from node, if cause the host node fault to reassign like this, otherwise maybe network failure.
Therefore, need a kind of new network-building method to solve the problem that exists in the prior art.
Summary of the invention
Goal of the invention: technical problem to be solved by this invention is the deficiency to prior art, and the self-healing network-building method under a kind of half-duplex asynchronous communication condition is provided.
In order to solve the problems of the technologies described above, the invention discloses a kind of half-duplex asynchronous communication self-healing network-building method, may further comprise the steps:
Step 1, node are sent roll-call message competition hosted, roll-call order 1 ~ N, and N is the communication network maximum node number; Can set random delay before sending, the message of avoiding calling the roll sends conflict.
Step 2 call the roll to receive: receive that the node littler than own ID sends the roll-call message and transfer slave to, set up all slave lists, if one takes turns to call the roll and only receives that slave responds then transfers main frame to.
Step 3, main frame is to all slave circulation transmit status query messages or use message.
Step 4, main frame is not received the slave response continuous n time, then from communication network, rejects this node; N is a set point, generally is set at 1 ~ 6.
Step 5, main frame are sent inquiry new node message.
Step 6, bigger then transfer slave to if main frame is found own ID than new node, otherwise add new node to slave list.
The node ID information and the roll-call id information that comprise node self in the roll-call message in the step 1 of the present invention.
The node ID information and the poll node ID information that comprise node self in the status poll message in the step 3 of the present invention.
Inquiry new node message in the step 5 of the present invention comprises all present node id informations.
Among the present invention,, return step 1 again if the overtime status poll message of not receiving main frame of slave in the step 3 then is judged to be hostdown.
Beneficial effect: do not need special designated host (main frame) before the inventive method networking; All networking nodes can be competed hosted, and algorithm has also guaranteed the flexibility of networking simultaneously, no matter are to increase new node; Node failure is still arranged, can not influence the normal operation of network.Through the present invention; Under half-duplex asynchronous communication bus environment, can easily realize controlling the communication between hinge and the decentralized control unit, networking flexibility is convenient; Do not need special designated host (main frame); Newly add node or malfunctioning node if having, also do not need the people for reconfiguring, major network is operate as normal automatically still.
Description of drawings
Below in conjunction with accompanying drawing and embodiment the present invention is done specifying further, above-mentioned and/or otherwise advantage of the present invention will become apparent.
Fig. 1 is the overall flow figure of the inventive method.
Fig. 2 is the flow chart of the roll-call process of the inventive method.
Fig. 3 is the flow chart of the status poll of the inventive method.
Embodiment
As shown in Figure 1, the invention discloses a kind of half-duplex asynchronous communication self-healing network-building method, may further comprise the steps: step 1, node are sent roll-call message competition hosted, roll-call order 1 ~ N, N is the communication network maximum node number; Can set random delay before sending, the message of avoiding calling the roll sends conflict.Step 2 call the roll to receive: receive that the node littler than own ID sends the roll-call message and transfer slave to, set up all slave lists, if one takes turns to call the roll and only receives that slave responds then transfers main frame to.Step 3, main frame is to all slave circulation transmit status query messages or use message.Step 4, main frame is not received the slave response continuous n time, then from communication network, rejects this node; N is a set point, generally is set at 1 ~ 6.Step 5, main frame are sent inquiry new node message.Step 6, bigger then transfer slave to if main frame is found own ID than new node, otherwise add new node to slave list.
 
Embodiment
Like Fig. 1 and Fig. 2 and shown in Figure 3, the present embodiment implementation step is following:
1. the normal networking stage
1) after equipment (being node) started, random delay (ID*300+rand (10) * 20) ms began to send the roll-call message, roll-call scope 1~N, and the overtime 300ms that calls the roll receives and responds then Record ID to slave list, and is overtime or receive and respond the ID+1 of roll-call afterwards; Send in the time-delay before the roll-call message, if do not find other message, then think own main frame, if find to have any message, then the roll-call message is sent in cancellation, and getting into is called the roll waits for.
2) slave is replied roll-call after receiving rand (10) the * 20ms that delays time behind the roll-call message.
3) in the roll-call process, be illegal message then repeat some this ID if main frame is found response message, up to response or overtime is arranged.
4) in the roll-call process, if main frame finds that response message ID than own little, then reduces to slave, getting into is called the roll waits for; If slave is found own ID less than host id, be upgraded to main frame after then having sent response message, restart slave is called the roll one by one.
5) main frame roll-call one is taken turns, if roll-call ID>N, networking finishes, and the beginning poll is if < N then returns step 1 to roll-call ID.
6) main frame is to online slave poll successively, the online slave of a poll, and query timeout 300ms does not receive that slave responds this equipment of then from network list, rejecting, and is overtime or receive and respond back slave index i+1; Time-delay rand (10) * 20ms before the each poll of main frame.
7) slave is replied inquiry after receiving rand (10) the * 20ms that delays time behind the polling message.
8) behind the intact 1 time slave of host computer polls (slave index i>communication network in slave number); Main frame is initiated once new oil (gas) filling device inquiry (message comprises all known online slave ID tabulations); If new equipment is found not in tabulation, to reply inquiry behind rand (10) the * 20ms that then delays time.
9) in the new equipment inquiry,, get into and waited for by poll if main frame finds that new equipment ID than own little, then reduces to slave; If new equipment is found own ID less than host id, be upgraded to main frame after then having sent response message, beginning poll slave.
The equipment change stage
Newly-increased node: receive any message during starting time-delay (ID*300+rand (10) * 20) ms, just entering is called the roll and is waited for or new equipment inquiry wait.
Node failure: if the slave fault, continuous 3 polls do not have response with regard to disallowable network; If hostdown, the minimum adapter network hosted of ID in the slave, wait timeout 3s.
The invention provides the self-healing network-building method under a kind of half-duplex asynchronous communication condition; The method and the approach of concrete this technical scheme of realization are a lot, and the above only is a preferred implementation of the present invention, should be understood that; For those skilled in the art; Under the prerequisite that does not break away from the principle of the invention, can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.The all available prior art of each part not clear and definite in the present embodiment realizes.

Claims (5)

1. a half-duplex asynchronous communication self-healing network-building method is characterized in that, may further comprise the steps:
Step 1, node are sent roll-call message competition hosted, roll-call order 1 ~ N, and N is the communication network maximum node number;
Step 2 call the roll to receive: receive that the node littler than own ID sends the roll-call message and transfer slave to, set up all slave lists, if one takes turns to call the roll and only receives that slave responds then transfers main frame to;
Step 3, main frame is to all slave circulation transmit status query messages or use message;
Step 4, main frame is not received the slave response continuous n time, then from communication network, rejects this node;
Step 5, main frame are sent inquiry new node message;
Step 6, bigger then transfer slave to if main frame is found own ID than new node, otherwise add new node to slave list.
2. a kind of half-duplex asynchronous communication self-healing network-building method according to claim 1 is characterized in that, comprises the node ID information and the roll-call id information of node self in the roll-call message in the step 1.
3. a kind of half-duplex asynchronous communication self-healing network-building method according to claim 1 is characterized in that, comprises the node ID information and the poll node ID information of node self in the status poll message in the step 3.
4. a kind of half-duplex asynchronous communication self-healing network-building method according to claim 1 is characterized in that the inquiry new node message in the step 5 comprises all present node id informations.
5. a kind of half-duplex asynchronous communication self-healing network-building method according to claim 1 is characterized in that, if the overtime status poll message of not receiving main frame of slave in the step 3 then is judged to be hostdown, returns step 1 again.
CN201210163930XA 2012-05-24 2012-05-24 Self-healing networking method for half-duplex asynchronous communication Pending CN102684923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210163930XA CN102684923A (en) 2012-05-24 2012-05-24 Self-healing networking method for half-duplex asynchronous communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210163930XA CN102684923A (en) 2012-05-24 2012-05-24 Self-healing networking method for half-duplex asynchronous communication

Publications (1)

Publication Number Publication Date
CN102684923A true CN102684923A (en) 2012-09-19

Family

ID=46816318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210163930XA Pending CN102684923A (en) 2012-05-24 2012-05-24 Self-healing networking method for half-duplex asynchronous communication

Country Status (1)

Country Link
CN (1) CN102684923A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767663A (en) * 2014-01-07 2015-07-08 艾默生网络能源有限公司 Ring communication network main node switching method, device and system
CN104811339A (en) * 2015-04-23 2015-07-29 光一科技股份有限公司 Intelligent networking method based on arbitration-free bus
CN104954213A (en) * 2015-04-23 2015-09-30 光一科技股份有限公司 Arbitration bus-free networking system applicable to intelligent capacitor
CN104954216A (en) * 2014-03-31 2015-09-30 奇点新源国际技术开发(北京)有限公司 485 bus fault self-processing method and device
CN106357301A (en) * 2016-08-25 2017-01-25 阳光电源股份有限公司 Cascaded power line carrier wave method and device
CN106550421A (en) * 2016-10-27 2017-03-29 新疆美特智能安全工程股份有限公司 A kind of method of Internet of Things 433M wireless device networkings
CN106788948A (en) * 2016-12-05 2017-05-31 雷蕾 A kind of multi-host communication mechanism based on half-duplex operation
CN107547305A (en) * 2017-07-19 2018-01-05 上海因士环保科技有限公司 A kind of network communicating system and method
CN108712244A (en) * 2018-04-26 2018-10-26 烽火通信科技股份有限公司 One-to-many half-duplex operation method and system
CN108848199A (en) * 2018-05-28 2018-11-20 浙江嘉宏电力科技有限公司 A kind of peer-to-peer network automatic seeking main system and method
CN113572820A (en) * 2021-07-01 2021-10-29 西安震有信通科技有限公司 Cluster construction method and device, terminal equipment and storage medium
CN113825122A (en) * 2021-08-03 2021-12-21 中联重科股份有限公司 Device for engineering machinery, communication method, controller and engineering machinery
CN115442182A (en) * 2022-08-31 2022-12-06 厦门熵基科技有限公司 Polling method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026393A (en) * 2007-02-12 2007-08-29 雷柏元 Method and device for realizing communication between peer devices
CN101154093A (en) * 2006-09-26 2008-04-02 力博特公司 Method and apparatus for competing for host computer position in parallel system
CN101163075A (en) * 2006-10-10 2008-04-16 中兴通讯股份有限公司 Method of implementing embedded device address installation by RS 485 bus competition
CN101404604A (en) * 2008-11-03 2009-04-08 浪潮电子信息产业股份有限公司 485 bus type monitoring system and its high extendibility method
CN101494383A (en) * 2008-01-23 2009-07-29 力博特公司 Control method for parallel connection system of inverter
CN101852472A (en) * 2009-04-01 2010-10-06 欧威尔空调(中国)有限公司 Automatic addressing method for air conditioning system and air conditioning controller

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154093A (en) * 2006-09-26 2008-04-02 力博特公司 Method and apparatus for competing for host computer position in parallel system
CN101163075A (en) * 2006-10-10 2008-04-16 中兴通讯股份有限公司 Method of implementing embedded device address installation by RS 485 bus competition
CN101026393A (en) * 2007-02-12 2007-08-29 雷柏元 Method and device for realizing communication between peer devices
CN101494383A (en) * 2008-01-23 2009-07-29 力博特公司 Control method for parallel connection system of inverter
CN101404604A (en) * 2008-11-03 2009-04-08 浪潮电子信息产业股份有限公司 485 bus type monitoring system and its high extendibility method
CN101852472A (en) * 2009-04-01 2010-10-06 欧威尔空调(中国)有限公司 Automatic addressing method for air conditioning system and air conditioning controller

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767663A (en) * 2014-01-07 2015-07-08 艾默生网络能源有限公司 Ring communication network main node switching method, device and system
CN104954216A (en) * 2014-03-31 2015-09-30 奇点新源国际技术开发(北京)有限公司 485 bus fault self-processing method and device
CN104811339A (en) * 2015-04-23 2015-07-29 光一科技股份有限公司 Intelligent networking method based on arbitration-free bus
CN104954213A (en) * 2015-04-23 2015-09-30 光一科技股份有限公司 Arbitration bus-free networking system applicable to intelligent capacitor
CN106357301A (en) * 2016-08-25 2017-01-25 阳光电源股份有限公司 Cascaded power line carrier wave method and device
CN106550421A (en) * 2016-10-27 2017-03-29 新疆美特智能安全工程股份有限公司 A kind of method of Internet of Things 433M wireless device networkings
CN106788948A (en) * 2016-12-05 2017-05-31 雷蕾 A kind of multi-host communication mechanism based on half-duplex operation
CN107547305A (en) * 2017-07-19 2018-01-05 上海因士环保科技有限公司 A kind of network communicating system and method
CN108712244A (en) * 2018-04-26 2018-10-26 烽火通信科技股份有限公司 One-to-many half-duplex operation method and system
CN108712244B (en) * 2018-04-26 2021-08-03 烽火通信科技股份有限公司 One-to-many half-duplex communication method and system
CN108848199A (en) * 2018-05-28 2018-11-20 浙江嘉宏电力科技有限公司 A kind of peer-to-peer network automatic seeking main system and method
CN113572820A (en) * 2021-07-01 2021-10-29 西安震有信通科技有限公司 Cluster construction method and device, terminal equipment and storage medium
CN113572820B (en) * 2021-07-01 2024-02-02 西安震有信通科技有限公司 Cluster construction method and device, terminal equipment and storage medium
CN113825122A (en) * 2021-08-03 2021-12-21 中联重科股份有限公司 Device for engineering machinery, communication method, controller and engineering machinery
CN113825122B (en) * 2021-08-03 2024-02-27 中联重科股份有限公司 Device and communication method for engineering machinery, controller and engineering machinery
CN115442182A (en) * 2022-08-31 2022-12-06 厦门熵基科技有限公司 Polling method, device, equipment and storage medium
CN115442182B (en) * 2022-08-31 2023-07-07 厦门熵基科技有限公司 Polling method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102684923A (en) Self-healing networking method for half-duplex asynchronous communication
CN105847456B (en) A kind of RS485 distributes address methods, devices and systems automatically
CN102185718B (en) System upgrading method and device
CN102231689B (en) Method for determining connection topology of home network
EP3229420A1 (en) Method for establishing persistent connection between multiple smart devices and server, and smart device
CN103595768B (en) A kind of method that realizes configuration synchronization between virtual equipment
CN102761528A (en) System and method for data management
CN109040184B (en) Host node election method and server
CN104317765A (en) Serial communication based one-to-many communication system and implementation method
CN104468869B (en) For the method for terminal distribution IP address, the method and device of acquisition IP address
CN104811371A (en) Brand-new instant messaging system
CN106452921B (en) Stacking system splitting detection method and device
CN106101171B (en) Server connection method and device
CN104811339A (en) Intelligent networking method based on arbitration-free bus
CN103036775A (en) Information exchange device, system and method
CN108848199A (en) A kind of peer-to-peer network automatic seeking main system and method
CN106302032A (en) A kind of point-to-multipoint poll means of communication
CN105608037A (en) RS485 bus-based communication method and device
CN104954214B (en) Improve the method and system of RS485 communication autgmentabilities
CN102857876A (en) Synchronizing method for cluster information in radio cluster communication system and corresponding devices
CN106788948A (en) A kind of multi-host communication mechanism based on half-duplex operation
CN108491337A (en) A method of realizing group control
CN101656683B (en) Self-adaptive instant messaging system and method for implementing same
CN103209213A (en) Data transmission method and system for data subscription
CN106304241B (en) Data transmission method, repeater and gateway

Legal Events

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

Application publication date: 20120919