Embodiment
Different from wired local area network, media access control layer (MAC, the Medium Access Control) agreement of WLAN can not detect the conflict in transmission.For this reason, what in WLAN (wireless local area network), adopt is that (CSMA/CA) mechanism is avoided in carrier sense/conflict, and whether each website detects channel by perception carrier wave idle, and the conflict of channel in the time of transfer of data just can have been avoided like this.CSMA/CA communication mode is closely linked the division of time-domain and frame format, guarantees that a certain moment only has website to send.On the one hand, carrier sense---check that whether medium is idle; On the other hand, avoid colliding---by random time wait, it is minimum that the probability that signal conflict is occurred is reduced to.
Under CSMA/CA method, signal transmission flow is specific as follows: certain work station (STA) is before sending message, whether idlely detect channel, and whether free time is greater than the frame period time (IFS) of IEEE802.11 regulation, if not, this STA just postpones access, until the current end of transmission.Afterwards, namely once successfully transmission just finishes, at this moment the incidence of conflicting is the highest, because all STA to be sent postpone to wait for the arrival in this moment, for further reducing conflict, STA selects random back (Backoff) again to postpone access, and Backofftime counter reciprocal in detecting channel, until its value is decremented to 0.At this moment,, if the Backofftime time that other work station is selected is shorter, it has just won channel occupancy power.If this STA detects again channel busy, have to again postpone access, otherwise, if channel idle sends message.
IEEE802.11 has stipulated computing formula specially to determining of Backofftime:
Backofftime=Random()*aSlotTime
Here, Backofftime represents back off time, and Random () represents the random random integers between [0, CW] that produce, and has peaked restriction.ASlotTime represents total propagation delay, and its value depends on physical layer; CW is " competition window " parameter, and between aCWmin and aCWmax, the initial value of CW parameter is taken as aCWmin, and when each transmission is unsuccessful later, CW value is with regard to double increase, until reach aCWmax.From above process, can find out that CSMA/CA mechanism still has certain probability to clash, particularly in high density subordinate's wireless network environment.
It is the existence of concealed nodes that another one exists the scene of conflict, as shown in Figure 2, distant between A and C, cannot receive the other side's radio wave.From the angle of A, C belongs to concealed nodes.Suppose that A forward B passes data, C also will pass data to B.Because A can't detect the existence of C, cause A and C simultaneously to B transmission data.If send data more than two nodes simultaneously, will, in the conflict of B place, when receiving data, B make a mistake.Because wireless link is semiduplex, node conflict of not knowing in sending exists, and therefore in the time of A and C transmission long message, clashes and will cause the waste of bandwidth.In WLAN (wireless local area network), the collision problem causing due to concealed nodes is difficult to monitor, because normally half-duplex mode of operation of wireless transceiver, cannot while transceiving data.
The existence of concealed nodes, has a great impact for the practical application of wireless network, and the situation that there will be some wireless terminal business almost cannot use even may show as the problem of wireless connections.The place covering in some high density, for example Campus Wireless LAN, may need an AP signal can cover 4-6 dormitory, is probably concealed nodes for the terminal in AP two ends, as shown in Figure 3, terminal 1 and terminal 2 concealed nodes each other.
For the generation of avoiding a conflict, 802.11 agreements allow transmitting terminal to use request to send/allowed to send (RTS/CTS) mechanism to empty transit area.As shown in Figure 4, for the operation principle schematic diagram of RTS/CTS mechanism, transmitting terminal is in the time that needs send message to receiving terminal, after waiting for through the distributed coordination frame period time (DIFS), send RTS frame to receiving terminal, receiving terminal through the short frame period time (SIFS) afterwards, return to CTS frame to transmitting terminal, transmitting terminal is after through a SIFS, send Frame to receiving terminal, receiving terminal is after receiving all Frames, and send ACK acknowledgement frame to transmitting terminal after a SIFS, after the SIFS waiting for from receiving terminal starts to send ACK frame to receiving terminal to transmitting terminal, in the duration between a DIFS, other transmitting terminal is all in postponing Access status, afterwards, each transmitting terminal sends data to receiving terminal after waiting for by competition window.As shown in Figure 4, RTS frame and CTS frame can extend message transmission procedure, bring certain overhead, therefore, should for example, needs (having conflict) in the situation that, re-use RTS/CTS mechanism as far as possible, rather than all use in any case.
Based on this, the embodiment of the present invention provides a kind of file transmitting method and device, in order to accurately to judge whether open channel future mechanism, avoids the unreasonable reduction of speed in wireless network, in improving wireless network performance, reduces Radio Network System expense.
It should be noted that, the channel reservation mechanism that the embodiment of the present invention relates to includes but not limited to RTS/CTS mechanism.
Below in conjunction with Figure of description, the application's preferred embodiment is described, be to be understood that, preferred embodiment described herein is only for description and interpretation the application, and be not used in restriction the application, and in the situation that not conflicting, the feature in embodiment and embodiment in the application can combine mutually.
As shown in Figure 5, the implementing procedure schematic diagram of the file transmitting method providing for the embodiment of the present invention, comprises the following steps:
S501, transmitting terminal, in the time that this sends message, judge that whether the channel reservation parameter value of self storing is lower than channel reservation parameter threshold, if so, and execution step S502, if not, execution step S503;
For example, channel reservation parameter threshold can be set to zero.
S502, close channel reservation mechanism;
S503, open channel future mechanism, and to receiving terminal transmitting channel reserving message, and after receiving this receiving terminal acknowledge message that send, channel reservation message, this channel reservation parameter value is subtracted to 1.
When concrete enforcement, transmitting terminal can pre-stored channel reservation information table, and a kind of form wherein can be as shown in table 1:
Table 1
| Parameter name |
Explanation |
Parameter value |
| MinThSucc |
The successful threshold value of minimum transmission |
10 |
| MaxThSucc |
The successful threshold value of maximum transmission |
60 |
| ThSucc |
Send continuously number of success threshold value |
[MinThSucc,MaxThSucc] |
| ThFail |
Send continuously frequency of failure threshold value |
2 |
| nSuccess |
Send continuously successful counter |
[0,ThSucc] |
| nFailed |
Send continuously fail counter |
[0,ThFail] |
| MinRtsWnd |
Channel reservation parameter value minimum value |
1 |
| MaxRtsWnd |
Channel reservation parameter value maximum |
40 |
| RtsWnd |
Channel reservation parameter preset value |
[MinRtsWnd,MaxRtsWnd] |
| rtsCounter |
The continuous usage counter of RTS/CTS |
[0,RtsWnd] |
The parameter value of each parameter can arrange according to the actual conditions of radio network information channel quality, and the parameter value providing in table 1 is only a kind of example, is not used in limitation of the invention, wherein:
The successful threshold value of minimum transmission refers to the minimum value that continuous transmission number of success threshold value can arrange;
The successful threshold value of maximum transmission refers to the maximum that continuous transmission number of success threshold value can arrange;
Sending continuously number of success threshold value is to specify big or small value, the span of its value is [MinThSucc, MaxThSucc], in the time that continuous transmission number of success reaches this threshold value, can carry out raising speed transmission upper while once sending message, in the embodiment of the present invention, send continuously number of success threshold value and be the first predetermined threshold value;
Send continuously successful counter and be used for adding up continuous transmission number of success, its span is 0~send continuously number of success threshold value, when continuous transmission number of success reaches while sending number of success threshold value, by zero clearing, and restarts counting;
In like manner, send continuously fail counter and be used for adding up the continuous transmission frequency of failure, its span is 0~send continuously frequency of failure threshold value, in the time that the continuous transmission frequency of failure reaches continuous transmission frequency of failure threshold value, and determine that this sends message not when open channel future mechanism, while sending message, need to carry out reduction of speed transmission next time, in the embodiment of the present invention, send continuously frequency of failure threshold value and be the second predetermined threshold value;
Channel reservation parameter value minimum value refers to the minimum value that channel reservation parameter preset value can arrange;
Channel reservation parameter value maximum refers to the maximum that channel reservation parameter preset value can arrange;
Channel reservation parameter preset value is to specify big or small value, refers to the number of times that can use continuously RTS/CTS mechanism, and the span of its value is [MinRtsWnd, MaxRtsWnd];
The continuous usage counter of RTS/CTS is for adding up the continuous access times after RTS/CTS mechanism is opened, its span is 0~channel reservation parameter preset value, when RTS/CTS mechanism access times reach after channel reservation parameter preset value, the continuous usage counter zero clearing of RTS/CTS.
In concrete enforcement, after this message is sent completely, can also comprise the following steps:
Step 1, transmitting terminal judge whether this message sends successful, if so, and execution step two, if not, execution step three;
Step 2, transmitting terminal will send number of success increase once continuously;
Step 3, transmitting terminal will send frequency of failure increase once continuously.
When concrete enforcement, if this message sends successfully, and after will sending continuously number of success increase once, transmitting terminal can continue to judge whether continuous transmission number of success exceedes default continuous transmission number of success threshold value, exceed default continuous transmission number of success threshold value if send continuously number of success, transmitting terminal while once sending message, can carry out raising speed transmission upper.This is because if all successes of continuous several times message transmission illustrate that radio network information channel condition is better, can carry out raising speed transmission in the time that send next time.Simultaneously, for fear of clashing, cause sending unsuccessfully, preferably, in the embodiment of the present invention, transmitting terminal is upper while once sending message, the no matter last channel reservation mechanism of whether having opened while sending message, all by open channel future mechanism, simultaneously, channel reservation parameter value is reset to preset value, for example, preset value can be set to 20 times, be that transmitting terminal at most can continuous 20 open channel future mechanisms, every use channel reservation mechanism sends a message, and after the acknowledge message of channel reservation message that receives receiving terminal transmission, channel reservation parameter value will subtract 1, for example, until (be kept to channel reservation parameter threshold, can be set to 0) till, do not exceed default continuous transmission number of success threshold value if send continuously number of success, transmitting terminal while once sending message, keeps this transmission rate constant upper.
Preferably, if this message sends unsuccessfully, transmitting terminal by continuous frequency of failure increase once, simultaneously, transmitting terminal further judges that this sends message and whether has opened channel reservation mechanism, if this sends message and has opened future mechanism, transmitting terminal need to continue to judge whether the continuous transmission frequency of failure has reached default continuous transmission frequency of failure threshold value, if reached continuous transmission frequency of failure threshold value, transmitting terminal will carry out reduction of speed transmission upper while once sending message, if do not reach continuous transmission frequency of failure threshold value, while sending message, keep this transmission rate constant next time.This be because, opening in channel reservation mechanism situation, still send message failure, the failed reason of explanation transmission is not because conflict, but because radio network information channel condition declines to be caused, so transmitting terminal needs reduction of speed to send upper while once sending message, meanwhile, close channel reservation mechanism; If this message sends not open channel future mechanism, transmitting terminal is at upper open channel future mechanism while once sending message.This be because, open channel future mechanism not when this message sends, send unsuccessfully may be because conflict causes for this message, thus while sending message next time by open channel future mechanism, preferably, the now success rate in order to guarantee that message sends, transmitting terminal can increase channel reservation parameter preset value, for example, can be set to original preset multiple by channel reservation parameter preset value, for example original preset value is set to 20, can be set to 40 by preset value now.
Especially, in the embodiment of the present invention, if this message sends unsuccessfully, transmitting terminal is by after continuous frequency of failure increase once, can also first judge whether the continuous transmission frequency of failure has reached the 3rd predetermined threshold value, if reached the 3rd predetermined threshold value, continue to judge that this message sends the channel reservation mechanism of whether having opened, if opened channel reservation mechanism, illustrate that current network channel condition is poor, therefore, can control and while sending message, carry out reduction of speed transmission next time, and close channel reservation mechanism, if this message sends not open channel future mechanism, while sending message next time, open channel future mechanism, and increase channel reservation parameter preset value, do not reach the 3rd predetermined threshold value if send continuously the frequency of failure,, in the time that send message next time, can control transmission next time message rate and remain unchanged.
In order to understand better the present invention, below the complete procedure that sends take message as example, the implementation process of the embodiment of the present invention is described, in the embodiment of the present invention, be set to 0 as example take channel reservation parameter threshold.
As shown in Figure 6, be the complete procedure of a message transmission, can comprise the following steps:
S601, transmitting terminal, in the time that this sends message, judge whether the channel reservation parameter of self storing is 0, if so, and execution step S602, otherwise execution step S603;
S602, transmitting terminal are closed channel reservation mechanism, and perform step S604;
S603, transmitting terminal open channel future mechanism, and to receiving terminal transmitting channel reserving message, and after receiving this receiving terminal acknowledge message that send, channel reservation message, channel reservation parameter value is subtracted to 1;
S604, transmitting terminal judge whether this message sends successful, if so, and execution step S605, if not, execution step S606;
S605, transmitting terminal will send continuously number of success increase once, and perform step S607;
S606, transmitting terminal will send continuously frequency of failure increase once, and perform step S610;
Whether S607, the transmitting terminal further continuous number of success that sends of judgement reach the first predetermined threshold value, if so, and execution step S608, if not, execution step S609;
When sending message next time, S608, transmitting terminal control carries out raising speed transmission;
When concrete enforcement, transmitting terminal, in the time that upper once raising speed sends message, by open channel future mechanism, and resets to preset value by channel reservation parameter value.
S609, transmitting terminal control keep this transmission rate constant next time while sending message;
S610, transmitting terminal further judge that this sends message and whether has opened channel reservation mechanism, if so, and execution step S611, if not, execution step S614;
S611, transmitting terminal continue the continuous frequency of failure that sends of judgement and whether have reached the second predetermined threshold value, if so, and execution step S612, if not, execution step S613;
When sending message next time, S612, transmitting terminal control carries out reduction of speed transmission;
When concrete enforcement, transmitting terminal, in the time that upper once reduction of speed sends message, will be closed channel reservation mechanism.
S613, transmitting terminal control keep this transmission rate constant next time while sending message;
S614, transmitting terminal in the time that send message next time, open channel future mechanism, and increase channel reservation parameter value preset value.
When concrete enforcement, step S611 can carry out prior to step S610, in the time that this message sends unsuccessfully, first whether the continuous frequency of failure that sends of judgement exceedes the 3rd predetermined threshold value, exceed the 3rd predetermined threshold value if send continuously the frequency of failure, perform step again S610, continue to judge that this message sends the channel reservation mechanism of whether having opened, correspondingly, if this message sends the channel reservation mechanism of having opened, while controlling transmission next time message, carry out reduction of speed transmission, if this message sends not open channel future mechanism, open channel future mechanism when send message next time, and increase channel reservation parameter preset value, be no more than the 3rd predetermined threshold value if send continuously the frequency of failure, control while sending message next time and keep this transmission rate constant.
Can be found out by said process, the file transmitting method that the embodiment of the present invention provides, in the time carrying out raising speed transmission message, by open channel future mechanism, or last in the time of open channel future mechanism not, send message when failure by open channel future mechanism, and by the continuous access times of channel reservation parameter preset value control open channel future mechanism that arrange, if transmitting terminal is found channel reservation parameter value and is kept at 0 o'clock, to close channel reservation mechanism, or while carrying out reduction of speed transmission message, to close channel reservation mechanism, thereby can reasonably judge whether to need open channel future mechanism, avoid increasing overhead because using too much channel reservation mechanism, simultaneously, avoid in the time occurring that message sends unsuccessfully by reasonable use channel reservation mechanism, adopt simply reduction of speed to improve the success rate that message sends, thereby, avoid reduction of speed unreasonably, improve wireless network performance.
Based on same inventive concept, a kind of packet transmission device is also provided in the embodiment of the present invention, because the principle that this device is dealt with problems is similar to above-mentioned file transmitting method, therefore the enforcement of this device can be referring to the enforcement of above-mentioned file transmitting method, repeats part and repeat no more.
As shown in Figure 7, the structural representation of the packet transmission device providing for the embodiment of the present invention, comprising:
Memory cell 701, for pre-stored channel reservation parameter value;
The first judging unit 702, for sending when message at this, judges that whether channel reservation parameter value that memory cell 701 stores is lower than channel reservation parameter threshold;
Closing unit 703, in the judged result of the first judging unit 702 when being, close channel reservation mechanism;
Open unit 704, when being no in the judged result of the first judging unit 702, open channel future mechanism;
Transmitting element 705, for after opening unit 704 open channel future mechanisms, to receiving terminal transmitting channel reserving message;
Receiving element 706, for receiving receiving terminal acknowledge message that send, channel reservation message;
The first counting unit 707, for after receiving the acknowledge message of channel reservation message, subtracts 1 by channel reservation parameter value.
When concrete enforcement, packet transmission device, can also comprise:
The second counting unit, in the time that this message sends successfully, will send number of success increase once continuously;
The second judging unit, for further judging whether send continuously number of success exceedes the first predetermined threshold value;
First rate control unit, in the judged result of the second judging unit when being, be controlled at and while sending message, carry out raising speed transmission next time;
The second speed control unit, when being no in the judged result of the second judging unit, controlling while sending message next time and keeps this transmission rate constant.
In concrete enforcement, packet transmission device, can also comprise reset cell, wherein:
Open unit 704, if also carry out raising speed when sending message while sending next time, open channel future mechanism when message once on sending;
Reset cell, for resetting to preset value by described channel reservation parameter value.
In concrete enforcement, open unit 704, also for sending unsuccessfully at this message and definite this transmission message not when open channel future mechanism, open channel future mechanism;
Reset cell, also for increasing channel reservation parameter preset value.
In concrete enforcement, packet transmission device, can also comprise:
The 3rd counting unit, in the time that this message sends unsuccessfully, will send frequency of failure increase once continuously;
The 3rd judging unit, while having opened channel reservation mechanism, continues the continuous transmission of the judgement frequency of failure and whether has reached the second predetermined threshold value for definite this transmission message;
Third speed control unit, in the judged result of the 3rd judging unit when being, control and while sending message, carry out reduction of speed transmission next time;
Four-speed rate control unit, when being no in the judged result of the 3rd judging unit, controlling while sending message next time and keeps current transmission rate constant.
In concrete enforcement, packet transmission device, can also comprise the 4th counting unit, the 4th judging unit and the 5th speed control unit and the 6th speed control unit, wherein:
The 4th counting unit, in the time that this message sends unsuccessfully, will send frequency of failure increase once continuously;
The 4th judging unit, in the time that the transmission frequency of failure has reached the 3rd predetermined threshold value continuously, continues to judge that this sends message and whether has opened channel reservation mechanism;
The 5th speed control unit, in the judged result of the 4th judging unit when being, control and while sending message, carry out reduction of speed transmission next time;
Open unit 704, when being no in the judged result of the 4th judging unit, open channel future mechanism;
Reset cell, in the time opening unit open channel future mechanism, increases channel reservation parameter preset value;
The 6th speed control unit, in the time that the transmission frequency of failure does not reach the 3rd predetermined threshold value continuously, controls while sending message next time and keeps this transmission rate constant.
In concrete enforcement, if closing unit 703 also carries out reduction of speed when sending message while sending next time, on sending, once close channel reservation mechanism when message.
Those skilled in the art should understand, the application's embodiment can be provided as method, system or computer program.Therefore, the application can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the application can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The application is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present application, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Although described the application's preferred embodiment, once those skilled in the art obtain the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the modification of the application's scope.
The file transmitting method that the embodiment of the present invention provides and device, by pre-stored channel reservation parameter value, make transmitting terminal before sending message, first judge that whether channel reservation parameter value is lower than the reserved parameter threshold of preset channel, if, explanation has reached the maximum times that continuous use channel reservation mechanism is carried out message transmission, and this message sends will close channel reservation mechanism; If not, transmitting terminal can continue to use channel reservation mechanism to carry out message transmission, and open channel future mechanism, to receiving terminal transmitting channel reserving message, after the acknowledge message of channel reservation message that receives receiving terminal transmission, channel reservation parameter value is subtracted to 1, like this, by the setting to channel reservation parameter value and renewal, in the time that transmitting terminal sends message, can accurately judge whether open channel future mechanism, avoid the unreasonable reduction of speed in wireless network, in improving wireless network performance, reduce Radio Network System expense.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.