Summary of the invention
Technical scheme of the present invention is that a kind of communication data receiving/transmission method to the high density communication environment is characterized in that may further comprise the steps:
Step 1, application software are provided with service end basis beacon;
Step 2, application software are provided with service end ballot beacon to initial state;
Step 3, service end are broadcasted basic beacon and ballot beacon;
Step 4, feedback end get into corresponding feedback model;
Whether step 5, service end inquiry feedback end have data to submit to;
Step 6, feedback end transmit data and give service end;
Step 7, application software inquiry service end data;
Step 8, service end with packing data good give application software;
Step 9, application software are resolved and are handled data;
Step 10, application software are provided with service end ballot beacon to done state.
Preferably, it comprises the data communication between application software and the service end, and wherein the idiographic flow of the data communication between application software and the service end comprises:
(1) application software inquiry service end data;
(2) service end is submitted to application software with packing data;
(3) application software is confirmed packet to service end;
(4) application software is resolved the packet of service end;
(5) whether the application software inquiry has instruction to transmit, and does not have then to jump to (1), has and then carries out next step;
(6) send instruction and give server device;
(7) whether the application software inquiry wants wait acknowledge, then carry out next step, will then not jump to (10);
(8) application software wait service end is replied, and service end wait feedback end is replied;
(9) application software, service end are just replied and are handled;
(10) judge whether forwarding time arrived the limit, be then to jump to (1), otherwise jump to (5).
Preferably, it comprises the data communication between service end and the feedback end, and wherein the idiographic flow of the data communication between service end and the feedback end comprises:
(1) service end energising starts the data communication between service end and the feedback end;
(2) the target execution time whether arrive during the service end judgement basis, be that then service end is sent basic beacon and carried out the associative operation of remote control kind equipment, otherwise continue to carry out next step;
(3) service end is sent basic beacon and is given feedback end;
(4) service end is sent the ballot beacon and is given feedback end;
(5) feedback end submits to result or application to give service end;
(6) service end saving result or application and feedback end confirmed;
(7) whether service end inquiry application software has instruction to transmit, and has then to jump to (2), does not have and then carries out next step;
(8) service end is transmitted application software instructions;
(9) feedback end is replied processing;
(10) whether the feedback end inquiry arrives preset ultimate value forwarding time, is then to jump to (2), otherwise carries out next step;
(11) the parameter setting is preserved in service end outage, stops the data communication between service end and the feedback end.
Preferably, data interactive mode comprises following 3 kinds between said service end and the feedback end:
(1) the 1st kind is that service end specifies the feedback end of certain particular number to submit data to, and we are the poll formula;
(2) the 2nd kinds is after service end is issued an order, as long as feedback end has data, can submit to, but will submit data to by certain method of avoiding a conflict, and we are competitive mode;
(3) the 3rd kinds are divided into groups feedback end by certain strategy, data are submitted on one group one group ground of feedback end to, and we are group call mode.
Embodiment
Below will combine accompanying drawing to come the present invention is further specified, as shown in Figure 1, technical scheme of the present invention is a communication data receiving/transmission method under a kind of high density communication environment, it is characterized in that may further comprise the steps:
Step 1, in computer, service end basis beacon is set through application software;
Step 2, application software are provided with service end ballot beacon to initial state;
Step 3, service end are broadcasted basic beacon and ballot beacon;
Step 4, feedback end get into corresponding feedback model;
Whether step 5, service end inquiry feedback end have data to submit to;
Step 6, feedback end transmit data and give service end;
Step 7, application software inquiry service end data;
Step 8, service end with packing data good give application software;
Step 9, application software are resolved and are handled data;
Step 10, application software are provided with service end ballot beacon to done state.
Wherein, application software can be a various ballot feedback software known in the field, for example: TurningPoint, PowerVoteQuizz.Application software is sent instruction and is given service end, and the notification service end is collected the feedback end data, and feedback end quantity has much all in official hour, collecting to finish.
In above-mentioned steps one, two, seven, eight, ten, all relate to the communication between application software and the service end, preferred, the communication flow control between application software and the service end comprises the steps: shown in accompanying drawing 2
(1) application software inquiry service end data;
(2) service end is submitted to application software with packing data;
(3) application software is confirmed packet to service end;
(4) application software is resolved the packet of service end;
(5) whether the application software inquiry has instruction to transmit, and does not have then to jump to (1), has and then carries out next step;
(6) send instruction and give server device;
(7) whether the application software inquiry wants wait acknowledge, then carry out next step, will then not jump to (10);
(8) application software wait service end is replied, and service end wait feedback end is replied;
(9) application software, service end are just replied and are handled;
(10) judge whether forwarding time arrived the limit, be then to jump to (1), otherwise jump to (5).
Further, according to the data communication that the step 3 six, seven of communication data receiving/transmission method under the high density communication environment of the present invention all relates between service end and the feedback end, preferred, this idiographic flow is as shown in Figure 3, and it comprises the steps:
(1) service end energising starts the data communication between service end and the feedback end;
(2) the target execution time whether arrive during the service end judgement basis, be that then service end is sent basic beacon and carried out the associative operation of remote control kind equipment, otherwise continue to carry out next step;
(3) service end is sent basic beacon and is given feedback end;
(4) service end is sent the ballot beacon and is given feedback end;
(5) feedback end submits to result or application to give service end;
(6) service end saving result or application and feedback end confirmed;
(7) whether service end inquiry application software has instruction to transmit, and has then to jump to (2), does not have and then carries out next step;
(8) service end is transmitted application software instructions;
(9) feedback end is replied processing;
(10) whether the feedback end inquiry arrives preset ultimate value forwarding time, is then to jump to (2), otherwise carries out next step;
(11) the parameter setting is preserved in service end outage, stops the data communication between service end and the feedback end.
Below will further describe data receiving-transmitting method according to the present invention.
Known, data transfer direction comprises 2 kinds, uploads and downloads, and uploads to be meant that feedback end submits data to service end, and download is that service end sends to the feedback end data.
Usually, data volume is divided into Dan Bao and Duo Bao by size.The packet of single Bao Zhiyi fixed length just can complete transmission information.Many bags are meant and will be divided into a plurality of single bags, repeatedly transmit the data that could accomplish.
For improving communication efficiency, the communication between service end and the feedback end can be divided into 4 types: go up the leaflet bag, upload many bags, download single bag, download many bags.Guarantee that the reliable transmission of these four kinds of packets just can satisfy the demand of high density communication environment communication data communication real-time tranception.
For guaranteeing the packet reliable transmission to the other side, any packet has all required to receive correctly to be confirmed, promptly transmit 1 packet after; The take over party should reply data and receive; If there is not this to reply, transmit leg just should resend, and counts out up to success or after repeatedly attempting.
Owing to all send data simultaneously, having that the communication conflict causes all can't communication, so the mechanism that solves the communication conflict will be arranged.The present invention adopts host-guest architecture, and is the target of taking a message, and feedback end is a beacon with the order that service end is sent all, and feedback end does not initiatively send data, and service end requires to send out data and just submits data to.
Preferably, the mode that service end requires to send out data includes 2 kinds, and a kind is called the poll formula; Shown in accompanying drawing 4; It is characterized in that specifying the feedback end of certain particular number to submit data to by service end, feedback end is submitted data to service end successively according to the instruction sequences of service end.Preferably, polling mode has a kind of mode of texturing of raising the efficiency, and is that data are submitted on one group one group ground to, and we are group call mode, shown in accompanying drawing 5.The 2nd kind is called competitive mode, different with the poll formula shown in accompanying drawing 6, after service end broadcast type question (promptly to nonspecific feedback end question), as long as feedback end has data, can submit to.But need take this moment certain method of avoiding a conflict to submit data to.For example, shown in the accompanying drawing 6, if A3 number is submitted to data with A5 number at synchronization, produce data collision, then data are cancelled.
The polling mode conflict is few, but efficient is low, and competitive mode is exactly the efficient height, and above pattern respectively has characteristics, under high density communication environment according to the present invention, all can adopt in the communication data receiving/transmission method.
The realization of last leaflet bag, as shown in Figure 7, the flow process of last leaflet bag data is following:
Step 1, service end inquiry data, the mode of inquiry adopts poll, group calling, competition;
Step 2, whether the feedback end inspection has data upload;
Step 3, feedback end is uploaded data;
Step 4 after service end is received data, is confirmed data to feedback end;
Step 5, whether inspection receives the affirmation from feedback end, if do not receive repeating step 3 otherwise get back to step 1.
Upload the realization of many bags
Upload many packet modes and have two kinds:
(1) usefulness discontinuous upward leaflet bag is repeatedly realized,
(2) many bag data have once been passed continuously.
For example: once pass the packet of a NK byte, implementation has 2 kinds of situation: a kind of is that service end requires to submit to many bags of certain type, and a kind of is that many bags are sent in the feedback end requirement, and 2 kinds of situation are all possible.
If feedback end require to send many bags, what we adopted is, the feedback end first to file passes many bags, and service end receives instruction with many bags again and do not stop to receive the flow process that finishes up to reception then.The request that the feedback end first to file passes many bags is in the service end inquiry, to submit to service end in the leaflet bag; The feedback end number record of bag were got off more than service end was uploaded application then, wrapped at appropriate time standby more as required more then and received the command reception data.
Many bags receive instruction and can adopt 1 to ask that 1 answers or 1 asks that the patterns that pass realize more.
Download the realization of single bag
Downloading single bag generally is that service end is sent out packet to the appointment feedback end, waits for that then the affirmation of feedback end is replied, otherwise sends out packet again.
Download the realization of many bags
Refer to disposable many bag data of downloading continuously, realize having 11 affirmations, pass two kinds of patterns of 1 affirmation more.
(1) 11 affirmation mode
Service end is the 1st bag of the packet of T to specifying the feedback end transmission types, waits for that then feedback end confirms to reply, and confiscates and confirms just to resend, and receives that affirmation just sends next bag, receives correct up to all packets.
(2) 1 affirmation modes that pass more
Service end is transmitted a plurality of packets continuously, for example transmits 16 packets earlier 1 time, and then inquires which bag 16 bags the insides have correctly received, and then resends the correct packet that receives, and then inquires correct situation about receiving.Because the number of times of inquiry significantly reduces, when specifying single feedback end to download, efficient improves about 1 times under this pattern.If broadcast type, all feedback ends of back can both receive correctly basically owing to repeat to send repeatedly, only surplus inquiry result's sequential, and the sequential of sending data significantly reduces, and efficient can increase many times.