Summary of the invention
The technical scheme is that, a kind of communication data receiving/transmission method for high density communication environment, it is characterised in that comprise the following steps:
Step one, application software arrange service end basis beacon;
Step 2, application software arrange service end ballot beacon to beginning state;
Step 3, service end Broadcast Fundamental beacon and ballot beacon;
Step 4, feedback end enter corresponding feedback model;
Whether step 5, service end inquiry feedback end has data to submit to;
Step 6, feedback end transfer data to service end;
Step 7, application software inquiry service end data;
Step 8, service end by packed for data to application software;
Data are resolved and process by step 9, application software;
Step 10, application software arrange service end ballot beacon to done state.
Preferably, it includes the data communication between application software and service end, and wherein the idiographic flow of the data communication between application software and service end includes:
(1) application software inquiry service end data;
(2) data packing is submitted to application software by service end;
(3) packet is confirmed by application software to service end;
(4) packet of service end is resolved by application software;
(5) application software has asked whether that instruction to forward, and without then jumping to (1), has, performs next step;
(6) server device is sent instructions to;
(7) application software asks whether to wait to be answered, will then perform next step, no then to jump to (10);
(8) application software waits service end response, and service end waits feedback end response;
(9) application software, service end have response just to process;
(10) judge whether forwarding time has arrived the limit, be, jump to (1), otherwise jump to (5).
Preferably, it includes the data communication between service end and feedback end, and wherein the idiographic flow of the data communication between service end and feedback end includes:
(1) service end energising, starts the data communication between service end and feedback end;
(2) during service end judgement basis, the target execution time arrives the most, is, service end sends basis beacon and performs the associative operation of remote control kind equipment, otherwise continues executing with next step;
(3) service end sends basis beacon to feedback end;
(4) service end sends ballot beacon to feedback end;
(5) feedback end submits to result or application to service end;
(6) service end preserves result or application and confirms feedback end;
(7) whether service end inquiry application software has instruction to forward, and has, jumps to (2), without then performing next step;
(8) service end forwards application software instructions;
(9) feedback end reply process;
(10) whether feedback end inquiry forwarding time arrives default ultimate value, is to jump to (2), otherwise performs next step;
(11) service end power-off, preserves parameter and arranges, stop the data communication between service end and feedback end.
Preferably, between described service end and feedback end, data interactive mode includes following 3 kinds:
(1) the 1st kind is that service end specifies the feedback end of certain particular number to submit data to, and we are polling type;
(2) the 2nd kinds is after service end is issued an order, as long as feedback end has data, can submit to, but is intended to submit data to by certain method preventing conflict, and we are competitive mode;
Feedback end is grouped by (3) the 3rd kinds by certain strategy, and feedback end submits data a group by a group to, and we are group call mode.
Detailed description of the invention
Below with reference to accompanying drawing, the present invention is described in further detail, as it is shown in figure 1, the technical scheme is that communication data receiving/transmission method under a kind of high density communication environment, it is characterised in that comprise the following steps:
Step one, in computer, service end basis beacon is set by application software;
Step 2, application software arrange service end ballot beacon to beginning state;
Step 3, service end Broadcast Fundamental beacon and ballot beacon;
Step 4, feedback end enter corresponding feedback model;
Whether step 5, service end inquiry feedback end has data to submit to;
Step 6, feedback end transfer data to service end;
Step 7, application software inquiry service end data;
Step 8, service end by packed for data to application software;
Data are resolved and process by step 9, application software;
Step 10, application software arrange service end ballot beacon to done state.
Wherein, application software can be various ballot feedback software known in the field, such as: TurningPoint, PowerVoteQuizz.Application software sends instructions to service end, and notice service end collects feedback end data, no matter feedback end quantity have many most mostly collect within the time of regulation complete.
The communication between application software and service end is all referred to, it is preferred that the communication flow between application software and service end controls as shown in Figure 2, comprises the steps: in above-mentioned steps one, two, seven, eight, ten
(1) application software inquiry service end data;
(2) data packing is submitted to application software by service end;
(3) packet is confirmed by application software to service end;
(4) packet of service end is resolved by application software;
(5) application software has asked whether that instruction to forward, and without then jumping to (1), has, performs next step;
(6) server device is sent instructions to;
(7) application software asks whether to wait to be answered, will then perform next step, no then to jump to (10);
(8) application software waits service end response, and service end waits feedback end response;
(9) application software, service end have response just to process;
(10) judge whether forwarding time has arrived the limit, be, jump to (1), otherwise jump to (5).
Further, the data communication between service end and feedback end is all referred to according to the step 3 six, seven of the receiving-transmittimethod method of communication data in high-density communication environment of the present invention, it is preferred that this idiographic flow is as it is shown on figure 3, it comprises the steps:
(1) service end energising, starts the data communication between service end and feedback end;
(2) during service end judgement basis, the target execution time arrives the most, is, service end sends basis beacon and performs the associative operation of remote control kind equipment, otherwise continues executing with next step;
(3) service end sends basis beacon to feedback end;
(4) service end sends ballot beacon to feedback end;
(5) feedback end submits to result or application to service end;
(6) service end preserves result or application and confirms feedback end;
(7) whether service end inquiry application software has instruction to forward, and has, jumps to (2), without then performing next step;
(8) service end forwards application software instructions;
(9) feedback end reply process;
(10) whether feedback end inquiry forwarding time arrives default ultimate value, is to jump to (2), otherwise performs next step;
(11) service end power-off, preserves parameter and arranges, stop the data communication between service end and feedback end.
Further the data receiving-transmitting method according to the present invention will be illustrated below.
Known, data transfer direction includes 2 kinds, uploads and downloads, and uploads and refers to that feedback end submits to data, download to be that service end is sent to feedback end data to service end.
Generally, data volume is divided into Dan Bao and Duo Bao by size.The packet of single Bao Zhiyi fixed length just can be with the information of complete transmission.Many bags refer to be divided into multiple single bag, and the data that just can complete are transmitted several times.
For improving communication efficiency, the communication between service end and feedback end can be divided into 4 types: upper leaflet bag, uploads many bags, download single bag, download many bags.Ensure that the transmitting of these four packet just can meet the demand of high density communication environment communication data communication real-time tranception.
For guarantee packet transmitting to the other side, any packet has been desirable that reception is correct and has confirmed, i.e. after 1 packet of transmission, recipient should reply data and have received, without this response, sender just should resend, until counting out after success or repeatedly trial.
Owing to sending if data the most simultaneously, have communication conflict cause all cannot communication, so there to be the mechanism solving communication conflict.The present invention uses host-guest architecture, and is target of taking a message, and the order that feedback end all sends with service end is as beacon, and feedback end the most actively sends data, and service end requires that sending out data just submits data to.
Preferably, service end requires that the mode sending out data includes 2 kinds, and a kind is referred to as polling type, as shown in accompanying drawing 4, it is characterized in that being specified the feedback end of certain particular number to submit data to by service end, feedback end, according to the instruction sequences of service end, submits data to service end successively.Preferably, polling mode has one and puies forward high efficiency mode of texturing, is to submit data a group by a group to, and we are group call mode, as shown in Figure 5.2nd kind is referred to as competitive mode, as shown in Figure 6, different from polling type, after service end broadcast type question (i.e. asking a question to nonspecific feedback end), as long as feedback end has data, can submit to.But now need to take certain to prevent the method for conflict from submitting data to.Such as, as shown in Figure 6, if No. A3 is submitted to data with No. A5 at synchronization, produce data collision, then data are cancelled.
Polling mode conflict is few, but efficiency is low, and competitive mode is exactly that efficiency is high, and above pattern is respectively arranged with feature, all can use under the high density communication environment according to the present invention in communication data receiving/transmission method.
The realization of upper leaflet bag, as it is shown in fig. 7, the flow process of upper leaflet bag data is as follows:
Step 1, service end inquiry data, the mode of inquiry uses poll, group to exhale, compete;
Step 2, feedback end check whether there is data are uploaded;
Step 3, feedback end uploads data;
Step 4, after service end receives data, confirms data to feedback end;
Step 5, checks whether and receives the confirmation from feedback end, otherwise returns to step 1. without receiving repetition step 3
Upload the realization of many bags
Upload many packet modes and have two kinds:
(1) with discontinuous upper leaflet bag realization repeatedly,
(2) many bags data have the most once been passed.
Such as: once pass the packet of a NK byte, it is achieved mode has 2 kinds of situations: one is that service end requires to submit certain type of many bags to, and one is that feedback end requirement sends many bags, and 2 kinds of situations are likely to.
If feedback end requires transmission is wrapped more, we use, and feedback end first to file biography wraps, and then more service end is used to wrap to receive to instruct again and do not stopped reception until the flow process received.Feedback end first to file passes the request of many bags and submits to service end when of leaflet bag in service end inquiry, then the feedback end number record that service end uploads many bags application is got off, and receives command reception data with many bags the most again appropriate when.
Many bags receive instruction 1 can be used to ask 1 answers or 1 asks that the pattern of many biographies realizes.
Download the realization of single bag
Download single bag usually service end and send out packet to appointment feedback end, then wait the confirmation response of feedback end, the most again send out packet.
Download the realization of many bags
Refer to disposably download many bags data continuously, it is achieved have 11 confirmation, many biographies 1 confirmation both of which.
(1) 11 affirmation mode
Service end, to the 1st bag of the packet specifying feedback end transmission types to be T, then waits that feedback end confirms response, confiscates confirmation and just resend, and receives confirmation and just sends next bag, until all packets receive correct.
(2) pass 1 affirmation mode more
Service end transmits multiple packet continuously, first transmits 16 packets such as 1 time, inquires and proper reception of which bag inside 16 bags, resend the packet not being properly received the most again, inquire situation about being properly received the most again.Greatly reducing due to the number of times of inquiry in this mode, it is intended that the when that single feedback end being downloaded, efficiency improves about 1 times.If broadcast type, substantially can receive correctly owing to repeating to send the most all feedback ends, the sequential of the most surplus inquiry result, the sequential sending data greatly reduces, and efficiency can increase many times.