CN101699420A - Method for improving communication efficiency by improving equipment polling mode - Google Patents

Method for improving communication efficiency by improving equipment polling mode Download PDF

Info

Publication number
CN101699420A
CN101699420A CN200910236845A CN200910236845A CN101699420A CN 101699420 A CN101699420 A CN 101699420A CN 200910236845 A CN200910236845 A CN 200910236845A CN 200910236845 A CN200910236845 A CN 200910236845A CN 101699420 A CN101699420 A CN 101699420A
Authority
CN
China
Prior art keywords
slave unit
poll
connect
main equipment
equipment
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.)
Granted
Application number
CN200910236845A
Other languages
Chinese (zh)
Other versions
CN101699420B (en
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.)
Beijing Jiaxun Feihong Electrical Co Ltd
Original Assignee
Beijing Jiaxun Feihong Electrical 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 Beijing Jiaxun Feihong Electrical Co Ltd filed Critical Beijing Jiaxun Feihong Electrical Co Ltd
Priority to CN200910236845XA priority Critical patent/CN101699420B/en
Publication of CN101699420A publication Critical patent/CN101699420A/en
Application granted granted Critical
Publication of CN101699420B publication Critical patent/CN101699420B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method for improving communication efficiency by improving an equipment polling mode, which belongs to the technical field of computers. The method comprises the following steps: allocating an address for each secondary equipment for the polling of the primary equipment; polling the secondary equipment connected with the primary equipment in a polling period by the primary equipment, judging whether secondary equipment is not connected with the primary equipment, and polling the unconnected secondary equipment if secondary equipment is not connected with the primary equipment; judging whether the primary equipment receives a response of the polled secondary equipment which is not connected, and marking the secondary equipment as the connected secondary equipment by the primary equipment if the response is received; and performing the next polling process after one polling process is finished. Through the method, the communication traffic occupied by the polled secondary equipment is improved, the waste of bandwidth is reduced and the communication efficiency is improved.

Description

Improve the method for communication efficiency by the polling mode that improves equipment
Technical field
The invention belongs to field of computer technology, relate in particular to a kind of method that improves communication efficiency by the polling mode that improves equipment.
Background technology
A bit in the communication process of multiple spot, all adopt the mode of all slave units of main equipment order poll traditional usually.This polling mode is very big in the slave unit quantity of main equipment management, and is mounted under the smaller situation of slave unit quantity on the bus, tends to cause waiting as long for of slave unit; And the communication flows that each slave unit occupies is low excessively, can cause the waste of bandwidth.Therefore, Chang Yong polling mode communication efficiency is very low usually.
Summary of the invention
The objective of the invention is to, the low problem of device polling mode communication efficiency at commonly used proposes a kind of improved device polling mode, in order to improve the communication efficiency in the device polling process.
Technical scheme of the present invention is that a kind of method by the polling mode raising communication efficiency that improves equipment is characterized in that described method comprises the following steps:
Step 1:, use during for master polls for each slave unit distributes an address;
Step 2: main equipment is all slave units that are connected with main equipment of poll in rounds of inquiry cycle;
Step 3: in this polling cycle, judge whether the slave unit that is not connected with main equipment, if then execution in step 4; Otherwise, return step 2, carry out the next round poll;
Step 4: this slave unit that does not connect of poll;
Step 5: judge whether main equipment receives the response of the slave unit that does not connect that is polled to, if then execution in step 6; Otherwise, return step 2, carry out the next round poll;
Step 6: main equipment is labeled as this slave unit and connects slave unit, and returns step 2, carries out the next round poll.
16 systems are adopted in described address, and series arrangement.
The described slave unit that does not connect when the main equipment poll first time, is the slave unit that is not connected with main equipment of address minimum; At main equipment is not for the first time during poll, the slave unit that the next one of the slave unit that does not connect for last round of poll does not connect.
When the slave unit that described last round of poll does not connect was the slave unit of address maximum in all slave units that do not connect, the slave unit that its next one does not connect was the slave unit of address minimum in all slave units that do not connect.
Effect of the present invention is that main equipment equipment that a poll has connected in a polling cycle and an equipment that is not connected have shortened the poll time; Simultaneously, because the slave unit that part does not connect does not carry out poll in polling cycle, thereby the communication flows that the slave unit of poll is occupied is improved, and has reduced the waste of bandwidth.
Description of drawings
Fig. 1 is the present invention improves the method for communication efficiency by the polling mode that improves equipment a process flow diagram;
Fig. 2 is the operation chart of the improved device polling mode that provides of the embodiment of the invention; Wherein, (a) be slave unit view before the N wheel poll; (b) be the slave unit synoptic diagram that the N wheel needs poll; (c) be the slave unit synoptic diagram that the N+1 wheel needs poll; (d) be the slave unit synoptic diagram that the N+2 wheel needs poll; (e) be the slave unit synoptic diagram that the N+3 wheel needs poll; (f) be the slave unit synoptic diagram that the N+11 wheel needs poll; (g) be the slave unit synoptic diagram that the N+12 wheel needs poll.
Embodiment
Below in conjunction with accompanying drawing, preferred embodiment is elaborated.Should be emphasized that following explanation only is exemplary, rather than in order to limit the scope of the invention and to use.
Fig. 1 is the present invention improves the method for communication efficiency by the polling mode that improves equipment a process flow diagram.Among Fig. 1, implementation procedure of the present invention is:
Step 1:, use during for master polls for each slave unit distributes an address.
Step 2: main equipment is all slave units that are connected with main equipment of poll in rounds of inquiry cycle.
Step 3: in this polling cycle, judge whether the slave unit that is not connected with main equipment, if then execution in step 4; Otherwise, return step 2, carry out the next round poll.
Step 4: this slave unit that does not connect of poll.
Step 5: judge whether main equipment receives the response of the slave unit that does not connect that is polled to, if then execution in step 6; Otherwise, return step 2, carry out the next round poll.
Step 6: main equipment is labeled as this slave unit and connects slave unit, and returns step 2, carries out the next round poll.
Be example with 16 slave units of main equipment management below, implementation process of the present invention is described.
For each slave unit distributes an address, use during for master polls.Wherein, 16 systems are adopted in the address of slave unit.Fig. 2 is the operation chart of the improved device polling mode that provides of the embodiment of the invention.Wherein, (a) be slave unit view before the N wheel poll.In Fig. 2 (a), have 16 slave units, comprise slave unit that has been connected with main equipment and the slave unit that is not connected with main equipment, 16 systems are all adopted in their address, and the sequence of addresses arrangement, from 0x00 to 0x0f.Wherein, the address is the slave unit of slave unit for being connected with main equipment of 0x01,0x04,0x07 and 0x0f, and other slave unit is the slave unit that is not connected with main equipment.
Main equipment is all slave units that are connected with main equipment of poll in rounds of inquiry cycle.Fig. 2 (b) is the slave unit synoptic diagram that the N wheel needs poll.N takes turns poll, slave unit 0x01,0x04,0x07 and 0x0f that master polls has been connected with main equipment.
In this polling cycle, judge whether the slave unit that is not connected with main equipment.The slave unit of Lian Jieing when the main equipment poll first time, when promptly the main equipment electrifying startup carries out poll, is not the slave unit that is not connected with main equipment of address minimum, is 0x00 in this example.At main equipment for the first time in other polling cycles after the poll, the slave unit of Lian Jieing not is the slave unit that the next one of the slave unit that do not connect of last round of poll does not connect.
In the present embodiment, the slave unit that does not connect is arranged obviously.In the present embodiment, suppose the slave unit that not connect of N wheel poll from the address minimum, then main equipment except poll with slave unit that main equipment is connected, the slave unit 0x00 that also wants poll not connect.When main equipment is not received the response of the slave unit 0x00 that does not connect that is polled to, return step 2, carry out the next round poll, i.e. N+1 wheel poll.
Fig. 2 (c) is the slave unit synoptic diagram that the N+1 wheel needs poll.Wherein, slave unit 0x01, the 0x04,0x07 and the 0x0f that have been connected with main equipment of main equipment elder generation poll.Judge whether the slave unit that is not connected with main equipment again.This slave unit that does not connect is the slave unit that the next one of the slave unit 0x00 that do not connect of N wheel poll does not connect, and is 0x02 according to Fig. 2 (a).The slave unit 0x02 that master polls does not connect, when main equipment was received the response of the slave unit 0x02 that does not connect that is polled to, main equipment was labeled as this slave unit and connects slave unit, and returns step 2, carries out the next round poll, i.e. N+2 wheel poll.
Fig. 2 (d) is the slave unit synoptic diagram that the N+2 wheel needs poll.Wherein, slave unit 0x01, the 0x02,0x04,0x07 and the 0x0f that have been connected with main equipment of main equipment elder generation poll.The slave unit 0x02 of this moment becomes the slave unit that has connected in last once poll, therefore the each poll after all will be by master polls.Judge whether the slave unit that is not connected with main equipment afterwards again.This slave unit that does not connect is the slave unit that the next one of the slave unit 0x02 that do not connect of N+1 wheel poll does not connect, and is 0x03 according to Fig. 2 (a).The slave unit 0x03 that master polls does not connect when main equipment is not received the response of the slave unit 0x03 that does not connect that is polled to, returns step 2, carries out the next round poll, i.e. N+3 wheel poll.
Fig. 2 (e) is the slave unit synoptic diagram that the N+3 wheel needs poll.Wherein, slave unit 0x01, the 0x02,0x04,0x07 and the 0x0f that have been connected with main equipment of main equipment elder generation poll.Judge whether the slave unit that is not connected with main equipment afterwards again.This slave unit that does not connect is the slave unit that the next one of the slave unit 0x03 that do not connect of N+2 wheel poll does not connect, and is 0x05 according to Fig. 2 (a).The slave unit 0x05 that master polls does not connect when main equipment is not received the response of the slave unit 0x05 that does not connect that is polled to, returns step 2, carries out the next round poll, i.e. N+4 wheel poll.
Fig. 2 (f) is the slave unit synoptic diagram that the N+11 wheel needs poll.Through behind several polls, not slave unit 0x06, the 0x08 of Lian Jieing, 0x09,0x0a, 0x0b, 0x0c, 0x0d all by master polls once.And main equipment is not all received the response of above-mentioned slave unit, and main equipment carries out N+11 wheel poll.Slave unit 0x01,0x02,0x04,0x07 and 0x0f that main equipment elder generation poll has been connected with main equipment.Judge whether the slave unit that is not connected with main equipment afterwards again.This slave unit that does not connect is the slave unit that the next one of the slave unit 0x0d that do not connect of N+10 wheel poll does not connect, and is 0x0f according to Fig. 2 (a).The slave unit 0x0f that master polls does not connect when main equipment is not received the response of the slave unit 0x0f that does not connect that is polled to, returns step 2, carries out the next round poll, i.e. N+12 wheel poll.
Fig. 2 (g) is the slave unit synoptic diagram that the N+12 wheel needs poll.Slave unit 0x01,0x02,0x04,0x07 and 0x0f that main equipment elder generation poll has been connected with main equipment.Judge whether the slave unit that is not connected with main equipment afterwards again.Because the address of the slave unit that the poll of last round of i.e. N+11 wheel does not connect is 0x0f, in all slave units that do not connect, the slave unit of address maximum, so the slave unit that do not connect of the next one of this slave unit that does not connect is the slave unit that does not connect of address minimum, is 0x00.The slave unit 0x00 that master polls does not connect when main equipment is not received the response of the slave unit 0x00 that does not connect that is polled to, returns step 2, carries out the next round poll.
With above-mentioned steps, reciprocal poll of cycle is closed or power down just stops poll up to main equipment.According to said method, but in the system of a carry m slave unit, the time of a poll is made as a, and maximum frame length is n, current connection device number be c (c≤m), then:
The every node of traditional communication mode (slave unit) data throughout is: and N1=n/ (m * a)
Adopt the every node of the present invention (slave unit) data throughout to be:
Figure G200910236845XD00051
The communication efficiency ratio is: N2/N1=m/ (c+1)
Obviously, by following formula as can be known, the slave unit of main equipment carry is many more, and promptly m is big more, and the communication efficiency of method provided by the invention is just more obvious than the advantage of the communication efficiency of classic method.The change of the polling mode that the present invention proposes has improved communication efficiency effectively.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (4)

1. the method by the polling mode raising communication efficiency that improves equipment is characterized in that described method comprises the following steps:
Step 1:, use during for master polls for each slave unit distributes an address;
Step 2: main equipment is all slave units that are connected with main equipment of poll in rounds of inquiry cycle;
Step 3: in this polling cycle, judge whether the slave unit that is not connected with main equipment, if then execution in step 4; Otherwise, return step 2, carry out the next round poll;
Step 4: this slave unit that does not connect of poll;
Step 5: judge whether main equipment receives the response of the slave unit that does not connect that is polled to, if then execution in step 6; Otherwise, return step 2, carry out the next round poll;
Step 6: main equipment is labeled as this slave unit and connects slave unit, and returns step 2, carries out the next round poll.
2. according to claim 1ly a kind ofly improve the method for communication efficiency, it is characterized in that described address adopts 16 systems by the polling mode that improves equipment, and series arrangement.
3. a kind of method by the polling mode raising communication efficiency that improves equipment according to claim 1 is characterized in that the described slave unit that does not connect, and when the main equipment poll first time, is the slave unit that is not connected with main equipment of address minimum; At main equipment is not for the first time during poll, the slave unit that the next one of the slave unit that does not connect for last round of poll does not connect.
4. a kind of method that improves communication efficiency by the polling mode that improves equipment according to claim 3, when it is characterized in that slave unit that described last round of poll does not connect is the slave unit of address maximum in all slave units that do not connect, the slave unit that its next one does not connect is the slave unit of address minimum in all slave units that do not connect.
CN200910236845XA 2009-11-02 2009-11-02 Method for improving communication efficiency by improving equipment polling mode Expired - Fee Related CN101699420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910236845XA CN101699420B (en) 2009-11-02 2009-11-02 Method for improving communication efficiency by improving equipment polling mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910236845XA CN101699420B (en) 2009-11-02 2009-11-02 Method for improving communication efficiency by improving equipment polling mode

Publications (2)

Publication Number Publication Date
CN101699420A true CN101699420A (en) 2010-04-28
CN101699420B CN101699420B (en) 2011-12-28

Family

ID=42147880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910236845XA Expired - Fee Related CN101699420B (en) 2009-11-02 2009-11-02 Method for improving communication efficiency by improving equipment polling mode

Country Status (1)

Country Link
CN (1) CN101699420B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107276630A (en) * 2017-08-10 2017-10-20 北京图森未来科技有限公司 A kind of frequency-hopping communication method and system
CN107272553A (en) * 2017-06-19 2017-10-20 煤科集团沈阳研究院有限公司 A kind of method for improving pipe jacking tunnelling machine DCS communication efficiencies
CN107547305A (en) * 2017-07-19 2018-01-05 上海因士环保科技有限公司 A kind of network communicating system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107272553A (en) * 2017-06-19 2017-10-20 煤科集团沈阳研究院有限公司 A kind of method for improving pipe jacking tunnelling machine DCS communication efficiencies
CN107547305A (en) * 2017-07-19 2018-01-05 上海因士环保科技有限公司 A kind of network communicating system and method
CN107276630A (en) * 2017-08-10 2017-10-20 北京图森未来科技有限公司 A kind of frequency-hopping communication method and system
CN107276630B (en) * 2017-08-10 2019-08-02 北京图森未来科技有限公司 A kind of frequency-hopping communication method and system

Also Published As

Publication number Publication date
CN101699420B (en) 2011-12-28

Similar Documents

Publication Publication Date Title
CN109450662B (en) Ad hoc network communication manager, networking method and ad hoc network communication system
CN102301648A (en) Scaled ethernet OAM for mesh and hub-and-spoke networks
CN204305072U (en) A kind of Multi-protocol converter
CN103425219A (en) Power supply control system and method
CN105677608A (en) Multi-master RS485 bus arbitration method and system
CN102185801A (en) Information processing method in instant messaging and instant messaging tool
CN101699420B (en) Method for improving communication efficiency by improving equipment polling mode
CN105704256B (en) A kind of IP address management methods, devices and systems
CN103530335B (en) In-stockroom operation method and device of electric power measurement acquisition system
CN101808132A (en) Communication method of application layer in CAN bus system
CN203399150U (en) Electric energy meter networking system capable of automatically sending address information
CN103401716A (en) Network performance measurement method, network management equipment and network element equipment
CN101324989A (en) Automatic recognition technique of electrical energy meter in centralized meter reading system
CN105337850A (en) Internet of Things data processing method and internet of Things gateway
CN102148702B (en) Method for managing network by utilizing network configuration protocol
CN116233200B (en) Electric energy meter communication method and system based on subsequent frame dynamic registration
CN108429703A (en) Dhcp client loading method and device
CN111314495A (en) Communication method, device, equipment, storage medium and system based on LoRaWAN of Internet of things
CN107864097B (en) Power utilization data distribution method and system
CN106875660B (en) Method and collector for the communication of meter equipment
CN102497306A (en) Method for realizing data transmission of distribution network substation and system thereof
CN112860703A (en) Data processing method and device, energy information gateway and energy internet system
CN103813294B (en) State information searching method and system, Interworking gateway
CN105577759A (en) Server node allocation method and device
CN207926643U (en) A kind of Internet of things middleware equipment of low-power consumption

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111228

Termination date: 20181102