The content of the invention
In order to solve the above technical problems, enabling dispensing device accurately to receive confirmation bag, the one of embodiment of the present invention useIndividual technical scheme is:A kind of multi-to-multi wireless data sending method is provided, including:Dispensing device broadcast data packet, the dataBag includes ACK concordance lists (AckTable) field, and the field includes that some reception devices are identified and correspondence is described and each connectsReceiving apparatus identify whether to need to reply the value for confirming bag;What the reception device that the dispensing device receives the packet was repliedConfirm bag;The dispensing device confirms the corresponding reception device of bag according to described, updates the ACK index literary names of the packetSection, the corresponding value of reception device mark that will have been received by packet is revised as that confirmation bag need not be replied.
Wherein, the ACK concordance lists are a mapping table, store whether some reception device marks need to reply with correspondingConfirm the corresponding relation of bag value.
Wherein, before the dispensing device broadcast data packet, also include:The dispensing device is mutual with the reception deviceThe software address of other side is exchanged and stores, the software address indicates the dispensing device and the reception device successful matching.
Wherein, the packet includes Target id (G_ID) field, the software address for writing reception device;WithAnd, source ID (S_ID) field, the software address for writing dispensing device;The reception device is according to source ID (S_ID) wordThe packet that the software address filtering of dispensing device is received in section, when the software of dispensing device in source ID (S_ID) fieldAddress is different from the software address of the dispensing device that the reception device is stored, and filters out corresponding packet.
Wherein, the dispensing device is identical with the hardware address of the reception device, and the dispensing device is according to described hardPart address sends the packet.
Embodiment of the present invention use another technical scheme be:A kind of multi-to-multi wireless data sending device is provided,Including:Transmit-Receive Unit, for broadcast data packet, the packet includes ACK index literary name sections, if the field includes stem graftingReceiving apparatus are identified and correspondence each reception device identifies whether to need to reply the value for confirming bag, and, receive the numberAccording to the confirmation bag that the reception device of bag is replied;Processor, for confirming the corresponding reception device of bag according to described, updates the numberAccording to the ACK index literary name sections of bag, the corresponding value of reception device mark that will have been received by packet is revised as that confirmation need not be repliedBag.
Wherein, recording unit is further included, for receiving confirmation bag according to, the confirmation is recorded and is wrapped corresponding connecingReceiving apparatus have received the packet.
Wherein, clock unit is further included, for the calendar scheduling time for confirming bag to be returned, when time-out is waited, is triggeredProcessor judges whether that whole reception devices receive the packet success according to the confirmation bag for receiving.
Wherein, the clock end unit, is additionally operable to count the sending times of the packet, when not up to maximum retransmission is secondaryDuring number, triggering processor statistics is returned and confirms the corresponding reception device of bag.
Embodiment of the present invention use another technical scheme be:A kind of multi-to-multi wireless data method of reseptance is provided,Including:Reception device receives packet, and the packet includes ACK concordance lists (AckTable) field, and the field includesSome reception device marks and correspondence each reception device identify whether to need to reply the value for confirming bag;The reception deviceJudge whether to need to reply according to the ACK indexes literary name section to confirm bag, if desired reply, then to dispensing device after random delayReply and confirm bag.
Wherein, the reception device judges whether to need to reply to confirm to wrap according to the ACK indexes literary name section, if need notReply, then do not reply confirmation bag.
Wherein, the ACK concordance lists are a mapping table, store whether some reception device marks need to reply with correspondingConfirm the corresponding relation of bag value.
Wherein, before the reception device receives packet, also include:The dispensing device is mutual with the reception deviceThe software address of other side is exchanged and stores, the software address indicates the dispensing device and the reception device successful matching.
Wherein, the confirmation includes Target id (G_ID) field, the software address for writing dispensing device;WithAnd, source ID (S_ID) field, the software address for writing reception device;The dispensing device is according to source ID (S_ID) wordThe confirmation bag that the software address filtering of reception device is received in section, when the software of reception device in source ID (S_ID) fieldAddress, the software address from the reception device that the dispensing device is stored is different, filters out corresponding confirmation bag.
Embodiment of the present invention use another technical scheme be:A kind of multi-to-multi Wireless data receiving device is provided,Including:Transmit-Receive Unit, for receiving packet, the packet includes ACK index literary name sections, if the field includes stem graftingReceiving apparatus are identified and correspondence each reception device identifies whether to need to reply the value for confirming bag;Processor, for according to instituteState ACK index literary name sections to judge whether to need to reply to confirm bag, if desired reply, then the Transmit-Receive Unit is triggered after random delayReplied to dispensing device and confirm bag.
Wherein, when the processor is additionally operable to judge to reply confirmation bag according to the ACK indexes literary name section, then notReply and confirm bag.
Wherein, the ACK concordance lists are a mapping table, store whether some reception device marks need to reply with correspondingConfirm the corresponding relation of bag value.
The beneficial effect of embodiment of the present invention is:The packet that dispensing device sends includes ACK index literary name sections, shouldField can indicate whether the reception device for receiving packet needs to reply confirmation bag, reply true without all of reception deviceRecognize bag, reduce and confirm packet conflict, reduce the interference of 2.4GHz radiofrequency signals, improve the success rate for confirming that bag is received.In addition, receiving dressPut can be in packet ACK index literary name sections judge whether need reply confirm bag, when need reply confirm bag when, canConfirm bag to be retransmited after random delay.The confirmation packet conflict problem of same period is reduced, while also improve confirmation bag connecingThe success rate of receipts.Dispensing device can accurately receive confirmation bag, decrease the number of times that packet is repeated.
Specific embodiment
In embodiment of the present invention, dispensing device broadcast data packet gives multiple reception devices, the packet employ asData packet format shown in Fig. 2.The packet includes following field:Packet header (Header), destination address (G_Id), source address(S_Id), frame number (SeqNum), Bale No. (PacNum), Packet type (PackType, including DATA and ACK), ACK concordance lists(AckTable), data length of fields (Len), data domains content (Data), the XOR result (Xor) of G_Id to Data, bag tail(End)。
Wherein, ACK concordance lists (AckTable) field includes that some reception devices are identified and correspondence each the reception fillsPut and identify whether to need to reply the value for confirming bag, can be mapping table form.Each reception device mark one value of correspondence, accounts for oneIndividual bit.If the corresponding value of reception device mark is 1, illustrate that the reception device identifies corresponding reception device and needs to replyConfirm bag;Or if the corresponding value of reception device mark is 0, illustrate that the reception device identifies corresponding reception device and do not needReply and confirm bag.Even if so dispensing device is always in broadcast data packet, but limitation has been received by confirming the reception device wrapped notReply and confirm bag, though so there is multiple reception devices, can also be gradually decreased in repeatedly broadcast because reply confirm to contract for fixed output quotas it is rawWireless data collision problem, improve packet is successfully transmitted rate.
Wherein, Packet type field is used to indicate the packet for packet or confirms bag.
Wherein, DAF destination address field is used to store the software address of all reception devices for receiving the packet.
Wherein, source address field is used to store the software address of the dispensing device for sending the packet.
The following implementation method that will be combined shown in Fig. 3 to 7, further illustrates the purposes of each field in the packet.
As shown in figure 3, method stream of the dispensing device broadcast data packet provided for embodiment of the present invention to reception deviceJourney schematic diagram.
, it is necessary to be interacted between dispensing device and reception device and store the soft of other side before dispensing device broadcast data packetPart address, to realize that dispensing device is successfully matched with reception device.
Step S101:Dispensing device broadcast data packet is to reception device;
Dispensing device broadcast data packet, the packet includes ACK index literary name sections, and the field includes some receptionsDevice identification and correspondence each reception device identify whether to need to reply the value for confirming bag.
Step S102:Dispensing device receives the confirmation bag that the reception device of the packet is replied;
Step S103:Dispensing device judges the confirmation bag for receiving, if be the confirmation of the reception device transmission for having matchedBag;If it is not, performing step S104;If so, performing step S105;
The confirmation includes Target id (G_ID) field, the software address for writing dispensing device;And, source ID(S_ID) field, the software address for writing reception device;The dispensing device connects according in source ID (S_ID) fieldThe confirmation bag that the software address filtering of receiving apparatus is received, when the software address of reception device in source ID (S_ID) field,Software address from the reception device that foregoing pairing process dispensing device is stored is different, filters out corresponding confirmation bag.
Step S104:Dispensing device filters out the confirmation bag of the reception device transmission for not being successful matching;
Step S105:When confirming that bag is the reception device transmission of successful matching, record corresponding reception device and receivePacket success;
Step S106:Dispensing device such as can preset at the time for confirming bag to be received, if the stand-by period has exceeded Preset Time;
Step S107:Dispensing device judges whether that all reception devices are returned really according to all confirmation bags for receivingRecognize bag;If so, performing step S108;If it is not, performing step S110;
Step S108:The whole reception devices of dispensing device record receive packet success;
Step S109:Dispensing device reports whole reception devices to receive packet and successfully sends result;
Step S110:Dispensing device judges whether to reach maximum number of retransmissions;If so, performing step S111;If it is not, performingStep S113;
When the dispensing device stand-by period time of the bag to be confirmed such as default is reached, packet can be re-broadcast, untilDefault maximum number of retransmissions is reached, or the reception device of whole receives packet, then can stop re-broadcasting packet.
Step S111:Dispensing device records not all reception device and receives packet success;
Step S112:Dispensing device reports not all reception device to receive packet and successfully sends result;
Step S113:Dispensing device statistics is all to return to the reception device for confirming bag;
Step S114:ACK index literary name sections in dispensing device updated data package;
According to the corresponding reception device of bag is confirmed, the ACK index literary name sections of updated data package will have been received by number to dispensing deviceCorresponding value is identified according to the reception device of bag to be revised as that confirmation bag need not be replied.
Using embodiments of the present invention, dispensing device sends packet with the forms of broadcasting, can be by the ACK in packetIndex literary name section informs whether corresponding reception device needs to reply confirmation bag, has been received by confirming the reception device of bag, just informsIt confirms bag without replying.A packet is often broadcasted, the confirmation bag for returning can all be counted, have been received by confirming the reception of bagDevice can be notified that confirmation bag need not be replied by dispensing device, so in each broadcasting process, it is aerial to confirm the wireless of bagData can be fewer and feweri, and collision also can be less and less.
Alternatively, in other embodiments of the present invention, in many-many communication, in order to reduce hardware cost, to hairDevice and reception device configuration identical physical address are sent, meanwhile, configure unique software address, reception device to dispensing deviceAlso unique software address is configured.Dispensing device is all with the Same Physical address by the physical address broadcast data packetReception device can receive the packet.And dispensing device and reception device are by interaction and the software of storage other sidePairing is realized in address, and the packet for receiving is filtered by the software address of other side or bag is confirmed.
As shown in figure 4, for the reception device that embodiment of the present invention is provided receives packet and returns to the method for confirming bagSchematic flow sheet.
Step S201:Reception device receives packet;
The packet includes ACK index literary name sections, and the field includes that some reception devices are identified and correspondence is describedEach reception device identifies whether to need to reply the value for confirming bag.
Step S202:Reception device judges the packet for receiving, if be the data of the dispensing device transmission for having matchedBag;If it is not, performing step S203;If so, performing step S204;
The packet includes Target id (G_ID) field, the software address for writing reception device;And, source ID(S_ID) field, the software address for writing dispensing device;The reception device is sent out according in source ID (S_ID) fieldSend the software address of device to filter the packet that receives, when in source ID (S_ID) field software address of dispensing device withThe software address of the dispensing device of the reception device storage is different, filters out corresponding packet.
Step S203:Reception device filters out the packet of the dispensing device transmission for not being successful pairing;
Step S204:ACK index literary name section of the reception device in packet judges whether to need to reply to confirm bag;IfIt is to perform step S205;If it is not, confirmation bag need not be replied, the flow terminates;
Step S205:Replied to dispensing device after reception device random delay and confirm bag.
Under normal circumstances, the random delay time of reception device be less than what the dispensing device bag to be confirmed such as default was repliedTime.The random delay time is to confirm bag, the data severe crash of generation to prevent a large amount of reception devices from replying simultaneously.
As shown in figure 5, being the real schematic diagram of multi-to-multi wireless data packet communication logic that embodiment of the present invention is provided.
Assuming that having 2 dispensing devices and 6 reception devices in network, dispensing device indicated by the solid line sends packet, emptyLine represents that reception device is replied and confirms bag.
Before communicating, the dispensing device and reception device being in communication with each other need to first be mutually paired.Wherein, dispensing device 1 with connectReceiving apparatus 3, reception device 4, reception device 5 and the successful matching of reception device 6;Dispensing device 2 and reception device 1 and reception device2 successful matchings.
Send device 1 need send packet when, can in the form of broadcasting broadcast data packet because hardware address is identical, instituteSome reception devices can receive packet.But because dispensing device 1 only with reception device 3, reception device 4, reception device 5 andReception device 6 has carried out software address pairing, although so reception device 1 and reception device 2 can receive packet, can pass throughSoftware address filtering packet, the i.e. reception device 1 and reception device 2 of dispensing device do not store the software of dispensing device 1The packet received described in address, reception device 1 and reception device 2 pairs is not processed.
After reception device 3, reception device 4, reception device 5 and reception device 6 receive broadcast data packet, if check be it intoThe dispensing device 1 of work(pairing is sent, and ACK index literary name sections in packet judge whether to need to reply to confirm to wrap,If desired, then replied after random delay and confirm bag.
Assuming that have received the confirmation from reception device 3 and reception device 5 after dispensing device 1 first time broadcast data packetBag, confiscates the confirmation bag that reception device 4 and reception device 6 are replied.During 1 retransmission data bag of dispensing device, will be in packetACK index literary name sections in identify reception device 3 and reception device 5 without reply confirmation bag again, reception device 4 and receiving is filledPut 6 needs and reply and confirm bag.So reception device 3, reception device 4, reception device 5 and reception device 6 can just do corresponding placeReason, can gradually reduce the aerial collision situation for confirming bag after retransmitting every time.
As shown in fig. 6, the composition structural representation of the dispensing device provided for embodiment of the present invention.
Dispensing device 10 includes:Transmit-Receive Unit 110, processor 120, recording unit 130 and clock unit 140.
Transmit-Receive Unit 110, for broadcast data packet, the packet includes ACK index literary name sections, and the field includesSome reception device marks and correspondence each reception device identify whether to need to reply the value for confirming bag, and, receiveThe confirmation bag that the reception device of the packet is replied.
Processor 120, for confirming the corresponding reception device of bag according to described, updates the ACK concordance lists of the packetField, the corresponding value of reception device mark that will have been received by packet is revised as that confirmation bag need not be replied.
Recording unit 130, for receiving confirmation bag according to, records the corresponding reception device of the confirmation bag and has receivedTo the packet.
Clock unit 140, for the calendar scheduling time for confirming bag to be returned, when time-out is waited, triggering processor is according to receiptsThe confirmation bag for arriving, judges whether that whole reception devices receive the packet success.Clock unit 140, is additionally operable to statistics describedThe sending times of packet, when not up to maximum number of retransmissions, triggering processor statistics return confirms that bag is corresponding and receives dressPut.
As shown in fig. 7, the composition structural representation of the reception device provided for embodiment of the present invention.
Reception device 20 includes:Transmit-Receive Unit 210, processor 220 and clock unit 230.
Transmit-Receive Unit 210, for receiving packet, the packet includes ACK index literary name sections, and the field includesSome reception device marks and correspondence each reception device identify whether to need to reply the value for confirming bag;
Processor 220, for judging whether to need to reply according to the ACK indexes literary name section to confirm bag, if desired replys,The temporal information for then being provided according to clock unit 230, triggers the Transmit-Receive Unit 210 and replys true to dispensing device after random delayRecognize bag.
The beneficial effect of embodiment of the present invention is:The packet that dispensing device sends includes ACK index literary name sections, shouldField can indicate whether the reception device for receiving packet needs to reply confirmation bag, reply true without all of reception deviceRecognize bag, reduce and confirm packet conflict, reduce the interference of 2.4GHz radiofrequency signals, improve the success rate for confirming that bag is received.In addition, receiving dressPut can be in packet ACK index literary name sections judge whether need reply confirm bag, when need reply confirm bag when, canConfirm bag to be retransmited after random delay.The confirmation packet conflict problem of same period is reduced, while also improve confirmation bag connecingThe success rate of receipts.Dispensing device can accurately receive confirmation bag, decrease the number of times that packet is repeated.
Embodiments of the present invention are the foregoing is only, the scope of the claims of the invention is not thereby limited, it is every using thisEquivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlationsTechnical field, is included within the scope of the present invention.