A kind of one-touch scan method on scanning device and scanning system
Technical field
The present invention relates to device scan control technology field, refer more particularly to a kind of one-touch scan method on scanning device and scanning system.
Background technology
Carrying out in scanning process to equipment, the general scanning technique all needing employing broadcast packet, but existingly utilizing broadcast packet to carry out in the process scanned, if the object that peripherals is responded is more simultaneously, the data responded can produce collision when transmitting at the same time, and then cause the loss of data, the object this existing solution being generally to response is giving a response after wait random time section, but when this kind of mode can responded owing to can not know other object between each response object, thus the phenomenon of passback data loss can still be there is.For this reason, for how searching out a kind of phenomenon can effectively avoiding peripherals to return data loss simultaneously and the equipment that can effectively reduce costs just seems particularly important.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of one-touch scan method on scanning device can effectively avoiding peripherals to return the phenomenon of data loss is provided.
For achieving the above object, technical scheme provided by the present invention is: a kind of one-touch scan method on scanning device, and it comprises the following steps: first S1, scanning element send a broadcast packet making scanning system return to init state " response scan request "; S2, scanning element send the broadcast packet of " scanning requires " subsequently again; S3, peripherals N1, N2 ... N
kaccept the broadcast packet of " scanning requires " that scanning element sends and give a response simultaneously; The peripherals received is responded R and is carried out superposition aggregation process by S4, scanning element, response number of peripheral devices sum Size (the R)≤actual peripheral total quantity k after wherein gathering; S5, scanning element send the broadcast packet of " not responding scanning again " to each peripherals in the above-mentioned response peripherals R given a response; S6, the peripherals of broadcast packet receiving " not responding scanning again " temporarily do not give a response the broadcast packet of " scanning require " that scanning element sends; S7, scanning element repeated execution of steps S2 to S6, till the broadcast packet of " scanning requires " that send scanning element without any peripherals is made a response; S8, by scanning result the most final for the response R of final all peripherals.
Simultaneously, the present invention also provides a kind of one-touch device scan system realizing above-mentioned one-touch scan method on scanning device, it comprises sending the scanning element of broadcast packet and multiple stage peripherals to be scanned, and wherein said scanning element comprises transmitter unit for sending from broadcast packet to peripherals described in multiple stage, the receiving element for accepting peripherals return path signal described in multiple stage, the processing unit that is connected for the storage unit and controlling with described transmitter unit and storage unit respectively storing peripherals back information described in multiple stage; Peripherals described in each comprise be respectively used to accept broadcast packet that described transmitter unit sends accept module and for the transmitter module to described receiving unit return path signal.
Preferably, described transmitter unit comprises and utilizes the wireless transmitting unit of wireless 433MHz communications protocol, wired network transmitter unit and wireless WiFi transmitter unit.
This programme comprises scanning element and multiple stage peripherals to be scanned by adopting, and wherein scanning element comprises transmitter unit for sending from broadcast packet to multiple stage peripherals, the receiving element for accepting multiple stage peripherals return path signal, the processing unit that is connected for the storage unit and controlling with transmitter unit and storage unit respectively storing multiple stage peripherals back information, each peripherals comprise be respectively used to accept broadcast packet that transmitter unit sends accept module and the version for the transmitter module to receiving unit return path signal, processing unit when can make work in scanning element successively can send different scanning by transmitter unit peripheral device and respond the broadcast packet required, peripherals requires to make a response accordingly after receiving above-mentioned broadcast packet and according to the difference of broadcast packet, and be stored in storage unit to the quantity of the peripherals of making a response is accumulative, and then obtain number of peripheral devices, complete scanning process, compared to existing technology, the scanning system structure in this programme is simple, and cost is lower, can complete the scanning motion to peripherals effectively fast and accurately.
Accompanying drawing explanation
Fig. 1 is scanning step schematic flow sheet of the present invention.
Fig. 2 is theory structure block diagram of the present invention.
In figure: 100-scanning element, 1-processing unit, 2-transmitter unit, 3-receiving unit, 4-storage unit, 5-peripherals, 21-wireless transmitting unit, 22-wired network transmitter unit, 23-is wireless WiFi transmitter unit, 51-accepts module, 52-transmitter module.
Embodiment
Below in conjunction with specific embodiment, the invention will be further described:
Shown in accompanying drawing 2, the one-touch device scan system of one described in the present embodiment, it comprises sending the scanning element 100 of broadcast packet and multiple stage peripherals 5 to be scanned, and wherein above-mentioned scanning element 100 comprises transmitter unit 2 for sending from broadcast packet to the above-mentioned peripherals 5 of multiple stage, the receiving element 3 for accepting multiple stage peripherals 5 return path signal, the processing unit 1 that is connected for the storage unit 4 and controlling with transmitter unit 2 and storage unit 4 respectively storing multiple stage peripherals 5 back information.Preferably, above-mentioned transmitter unit 2 comprises and utilizes the wireless transmitting unit 21 of wireless 433MHz communications protocol, wired network transmitter unit 22 and wireless WiFi transmitter unit 223.Simultaneously each above-mentioned peripherals 5 comprise be respectively used to accept broadcast packet that transmitter unit 2 sends accept module 51 and for the transmitter module 52 to receiving unit 3 return path signal.
Shown in accompanying drawing 1, during work, first step S1: first the processing unit 1 in scanning element 100 sends the broadcast packet of " response scan request " information to above-mentioned multiple peripherals 5 by transmitter unit 2, be provided for whole scanning system and return to original state, namely for eliminating the impact performing follow-up work step S5 and bring; Second step S2: scanning element 100 sends the broadcast packet of " scanning requires " subsequently; 3rd step S3: accepting in peripherals 5 is made a response after module 51 receives above-mentioned broadcast packet simultaneously; 4th step S4: the receiving unit 3 in scanning element 100 accepts peripherals 5 quantity of making a response and is stored in storage unit 4, peripherals 5 quantity sum Size (the R)≤K now made a response in storage unit 4, wherein K is the substantial amt of peripherals 5; 5th step S5: due in first time scanning process not way confirm that peripherals 5 quantity sum Size (R) accepting in storage unit 4 to make a response is the total K of actual peripheral 5 just, therefore need the broadcast packet each object in the peripherals R made a response in said memory cells 4 being sent to " not responding scanning again "; 6th step S6: receive " not responding scanning again " and require that the peripherals 5 of broadcast packet temporarily will not made a response to the broadcast packet of " scanning requires " that scanning element 100 sends; 7th step S7: scanning element 100 repeats step S2 to S6, till the broadcast packet of " scanning requires " that send without any peripherals 5 pairs of scanning elements 100 is made a response; 8th step S8: after being completed by step S7 scanning motion, the whole peripherals 5 be stored in storage unit 4 are responded the net result of R as scanning, thus complete the scanning motion to peripherals 5.
The examples of implementation of the above are only the preferred embodiment of the present invention, not limit practical range of the present invention with this, therefore the change that all shapes according to the present invention, principle are done, all should be encompassed in protection scope of the present invention.