The control method and device of resource contention
Technical field
The present invention relates to field of communication technology more particularly to a kind of control method and device of resource contention.
Background technique
IEEE 802.11 is aerial for one group of WLAN of short range communication exploitation by 802.11 committee of IEEE
Interface standard, 802.11 provide any wireless network services competition-based.Distributed coordination function therein (DCF,
Distributed Coordination Function) and enhanced distributed channel access (EDCA, Ehanced
Distributed Channel Access) using the Carrier Sense Multiple Access mechanism with collision detection.The DCF and
EDCA mechanism is for each website (STA, Station) or access point (AP, Access in 802.11 wireless network of IEEE
Point it whether idle) needs first to listen to channel, data could be sent when listening to channel idle and after undergoing random back
Packet.
When using DCF mechanism, STA or AP in wireless network first listen to net before needing to send data packet
Network is not sent if channel busy, postpones access;Reach DIFS (DCF when the time for listening to the channel duration free time
Interframe Space) after, start random back, the time span kept out of the way is K1 time slot (Slot).Wherein K 1 be between
Uniformly random integer between parameter 2^DCFWmin-1 and 2^DCFCWmax-1, DCFWmin and DCFWmax are corresponding to DCF mechanism
Contention window parameter.After having waited K1 time slot, if listening to channel remains as the free time, data frame is sent;Otherwise
It does not send, is accessed into postponing.
EDCA is the channel competition mechanism that Wi-Fi multimedia (WMM, Wi-Fi Multimedia) defines, and is conducive to Gao You
The message of first grade enjoys the right preferentially sent and more bandwidth.When using EDCA mechanism, STA in wireless network or
AP first listens to network equally before needing to send data packet, does not send if channel is to hurry, postpones access;When listening to
After the time of channel duration free time reaches AIFS (Arbitrary Inter Frame Space), start random back.Keep out of the way
Time span is K2 time slot (Slot).K2 is uniformly random whole between parameter 2^EDCAWmin-1 and 2^EDCAWmax-1
Number, EDCAWmin and EDCAWmax are the contention window parameter corresponding to EDCA mechanism.After having waited K2 time slot, if detectd
It hears that channel remains as the free time, then sends data frame;Otherwise it cannot send, be accessed into postponing.
Four kinds of different types of service of priority or access class (AC, Access are defined in EDCA mechanism
Category).WMM is divided into AC-VO (voice flow), AC-VI (video flowing), AC-BE (to the greatest extent according to the sequence of priority from high to low
Power and be stream), four priority queries of AC-BK (background stream), guarantee get over high-priority queue in message, seize the energy of channel
Power is higher.It can be different corresponding to different access class AC, corresponding waiting time AIFS and contention window parameter.WMM is provided
The AIFS of various access classes and the default value of contention window parameter.
In the prior art, under any channel condition, DCF or EDCA all in accordance with the default value provided of IEEE 802.11 or
The numerical value of the other fixations set sets the parameter of the competition window under DCF or EDCA mechanism, DIFS or AIFS etc.,
In this way to causing radio channel resource that cannot make full use of, it is difficult to realize that the optimization of throughput uses.
Summary of the invention
Problems solved by the invention be when being listened to and kept out of the way in resource contention can not adaptively adjust DCF or
The parameter of EDCA causes radio channel resource that cannot make full use of, the lower problem of throughput.
To solve the above problems, technical solution of the present invention provides a kind of control method of resource contention, for wireless network
Resource contention in network communication is controlled;The described method includes:
The noisy degree of channel is obtained, the noisy degree of the channel is associated with received the of first terminal within the period 1
The number of one data, the first terminal are station or access point in wireless network environment, and first data include polymerization
Frame or non-polymeric frame;
Distributed coordination function used in first terminal described in second round is determined based on the noisy degree of the channel
Or the parameter of enhanced distributed channel access, the second round are adjacent next week on a timeline period 1
Phase.
Optionally, the parameter of the distributed coordination function include the corresponding distributed coordination function minimum parameter and
Maximum parameter, the parameter of the enhancement distributed channel access include the minimum of the corresponding enhancement distributed channel access
Parameter, maximum parameter and Arbitration Inter Frame Space.
Optionally, the noisy degree of the channel reduces with the increase of the first ratio, and first ratio is described
The received MAC of first terminal (the Media Access Control) destination address is the first terminal in period 1
The ratio of the number of the number of first data and received all first data of the first terminal.
Optionally, the distributed coordination function or enhanced distributed channel access parameter with the channel noise
The increase of miscellaneous degree and increase.
Optionally, the noisy degree of the channel is demarcated by channel noisy degree index, the channel noisy degree index
It is obtained in the following way:
First number is obtained, first number is of the first terminal received PPDU within the period 1
Number;
Obtain second number, second number be the first terminal within the period 1 received ACK or
The number of BLOCK_ACK;
Third number is obtained, the third number is the first terminal received MAC purpose within the period 1
Address be the first terminal and be not ACK or Block Ack frame the first data number;
When first number and second several difference are greater than or equal to first several threshold value, pass through formulaDetermine that the channel noisy degree refers to
Mark;
Wherein, CCA_Freq is the channel noisy degree index, and Rx_PPDU_Cnt is first number, Rx_ACK_
Cnt is second number, and Rx_MPDU_Cnt is the third number.
Optionally, further includes: when first number and second several difference are less than first several threshold value, really
The fixed channel noisy degree index value is zero.
Optionally, the value range of described first several threshold values is [1,10].
Optionally, the range of the period 1 and second round are [100ms, 500ms].
Optionally, the parameter is determined in the following way:
It is obtained and distributed coordination function corresponding to the noisy degree index by searching for preset mapping relations
Or the parameter of enhanced distributed channel access, the mapping relations are the noisy degree index and the distributed coordination function
Or the corresponding relationship between the parameter of enhanced distributed channel access.
In order to solve the above technical problems, technical solution of the present invention also provides a kind of control device of resource contention, for pair
Resource contention in wireless communication is controlled;Include:
Noisy degree determination unit, for obtaining the noisy degree of channel, the noisy degree of the channel is associated with first terminal and exists
The number of received first data in period 1, the first terminal be wireless network environment in station or access point,
First data include aggregate frame or non-polymeric frame;
Parameter determination unit, for determining that first terminal described in second round is used based on the noisy degree of the channel
Distributed coordination function or enhanced distributed channel access parameter, the second round be the period 1 on a timeline
Adjacent next cycle.
Compared with prior art, technical solution of the present invention has the advantage that
It is carried out adaptively by obtaining the noisy degree of channel, and then according to parameter of the noisy degree of channel to DCF or EDCA
Adjustment, website or access point apparatus can be enabled adaptively to measure the noisy degree of channel, and then on this basis
The parameter of adjust automatically DCF or EDCA, realize to channel circumstance it is effective, accurately listen to and keep out of the way, make full use of channel to provide
The effect in real time, adaptively optimizing throughput is realized in source.
By the acquisition of the noisy degree index to channel, it can effectively identify the noisy degree of channel, accurately reflect channel
Physical transfer performance, and then the parameter of DCF or EDCA are accordingly adjusted, it is correspondingly right according to the noisy degree of the channel to realize
The parameter of DCF or EDCA is adjusted, and makes full use of channel resource, optimizes throughput.
Detailed description of the invention
Fig. 1 is the flow diagram of the control method for the resource contention that technical solution of the present invention provides;
Fig. 2 is the flow diagram of the control method of resource contention provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the noisy degree index of determining channel provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the control device of resource contention provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of noisy degree determination unit provided in an embodiment of the present invention.
Specific embodiment
Exist in the prior art under any channel condition, DCF or EDCA all in accordance with the default value provided of IEEE 802.11 or
The numerical value of the other fixations set sets the parameter under DCF or EDCA mechanism, carry out listening in resource contention and
When keeping out of the way, the parameter of DCF or EDCA can not be adaptively adjusted, causes radio channel resource that cannot make full use of, throughput is lower
The problem of.
To solve the above problems, technical solution of the present invention provides a kind of control method of resource contention.As shown in Figure 1, first
Step S1 is first carried out, the noisy degree of channel is obtained, the noisy degree of the channel is associated with first terminal connecing within the period 1
The number for the first data received.
First data include aggregate frame or non-polymeric frame.The aggregate frame is A-MPDU, A-MSDU and polymerization mix
Any one in frame, the polymerization mix frame are by MPDU (MAC Protocol Data unit) and MSDU (MAC
Service Data unit) it is combined made of multi-step polymerization frame.The non-polymeric frame can refer to MPDU.
The first terminal is the STA or AP in wireless network environment.
In order to access (EDCA) to distributed coordination function (DCF) or enhanced distributed channel according to the noisy degree of channel
Parameter be adjusted correspondingly, time interval sequence can be divided time into, namely be divided into the different time cycles, can
With the statistical data of STA or the received MPDU of AP based on current period, determine the noisy degree of channel, so with the period
The parameter of the DCF or EDCA is adjusted correspondingly in adjacent next cycle.
In present specification, the period 1 be the STA or AP the time cycle being presently in, will with work as
Preceding period, i.e. period 1, adjacent next cycle was known as second round on a timeline.
Step S2 is executed, distribution used in first terminal described in second round is determined based on the noisy degree of the channel
Formula coordination function or the parameter of enhanced distributed channel access.
First terminal described in second round is adaptively set according to the noisy degree of channel determined in the period 1
The parameter of used DCF or EDCA.
For example, the parameter of the DCF or EDCA increases with the increase of the noisy degree of the channel.
The control method of resource contention provided by technical solution of the present invention, can enable STA or AP adaptively
The noisy degree of channel, and then the parameter of adjust automatically DCF or EDCA on this basis are measured, realization has channel circumstance
Effect is accurately listened to and is kept out of the way, and channel resource is made full use of, and realizes the effect in real time, adaptively optimizing throughput.
To make the above purposes, features and advantages of the invention more obvious and understandable, with reference to the accompanying drawing to the present invention
Specific embodiment be described in detail.
In the present embodiment, the noisy degree of channel in the period 1 is determined first, and then according to the noisy of channel
Degree and the correspondence mappings relationship between DCF or the parameter of EDCA, determine first terminal within second round used DCF or
The parameter of EDCA.
In the present embodiment, the statistics time interval sequence of T is divided between can dividing time into, current length is T's
Time interval is the period 1, and the next time interval adjacent with current time interval is second round.
In order in real time according to it is current when time interval T in the noisy degree of channel adjust next time interval in real time
The parameter of DCF or EDCA in T, in order to guarantee real-time, the time interval T is not suitable for the too big of setting, in the present embodiment
In, the value range of the T time interval can be set to [100ms, 500ms], i.e., the described period 1 and second round
Value range is [100ms, 500ms].It in other embodiments, can also be right in conjunction with actual experimental data, channel situation etc.
The period 1, second round value range set accordingly, the value model of the period 1 and second round
It encloses and is not specifically limited.
Fig. 2 is the flow diagram of the control method of resource contention provided in this embodiment, as shown in Fig. 2, being first carried out
Step S201, obtains the noisy degree of the channel in the period 1, the noisy degree of the channel by the noisy degree index of channel into
Rower is fixed.
In the present embodiment, the channel noisy degree can be in conjunction with the MAC mesh that first terminal receives within the period 1
Address be that the number of the first data of the first terminal is determined accordingly.
Specifically, the noisy degree of the channel reduces with the increase of the first ratio, and first ratio is described
The received MAC destination address of first terminal is the number of the first data of the first terminal in period 1, and described
The ratio of the number of received all first data of first terminal.First ratio is bigger, illustrates that the noisy degree of channel is lower;
If otherwise the ratio gets over hour, illustrates that the noisy degree of channel is higher.
The i.e. described channel noisy degree is accounted for the number for the first data that received MAC destination address is the first terminal
The increase of the ratio of the number of received the first total data and reduce.
The noisy degree for determining channel is described in detail below with reference to specific formula.
The noisy degree of the channel is demarcated especially by channel noisy degree index accordingly in this embodiment, when described
When channel noisy degree index is bigger, illustrate that the noisy degree of channel is more serious.
Fig. 3 is the flow diagram of the noisy degree index of determining channel provided in this embodiment.As shown in figure 3, in determination
When the noisy degree index of channel, relevant statistical data can be obtained first by executing step S301 to step S303.
Step S301, obtains first number, and first number is that the first terminal receives within the period 1
PPDU number.
Statistics first terminal receives total number of PPDU (PHY Protocol Data Unit) within the period 1,
This can be denoted as first several Rx_PPDU_Cnt.
Step S302, obtains second number, and second number is that the first terminal receives within the period 1
ACK or BLOCK_ACK number.
Total number of ACK or BLOCK_ACK that statistics first terminal receives within the period 1 can be denoted as the herein
Two several Rx_ACK_Cnt.
The ACK or BLOCK_ACK is a kind of message affirmation mechanism, and the mechanism is for guaranteeing the reliable of data transmission of eating dishes without rice or wine
Property.
In message transmission procedure, each 802.11 message of IEEE that sender's (such as described first terminal) sends,
Recipient is intended to carry out ACK or BLOCK_ACK reply confirmation upon receipt.When sender receives ACK transmitted by recipient
Or after BLOCK_ACK confirmation, just assert that message has sent success, to send next frame data;Otherwise sender again into
Row message is sent.
Step S303, obtains third number, and the third number is that the first terminal receives within the period 1
MAC destination address be the first terminal and be not ACK or Block Ack frame the first data number.
The MAC destination address that is received within the period 1 of statistics first terminal be the first terminal and be not ACK or
The number of first data of Block Ack frame can be denoted as third number Rx_MPDU_Cnt herein.
Such as when first data are aggregate frame, then third number is that first terminal receives within the period 1
MAC destination address is the first terminal, and is not the number of the aggregate frame of ACK or Block Ack frame;When first data
When for non-polymeric frame, the third number be the MAC destination address that is received within the period 1 of first terminal be described the
One terminal, and be not the number of the MPDU of ACK or BlockAck frame.
The third number is obtained by the way of the filtering of frame type, such as contains ACK or Block by filtering out
The frame of ACK and then the number for obtaining the first data that destination address is the first terminal.
First terminal obtains the first data by PPDU received by physical layer modulation, and is uploaded to MAC layer.If described
The destination address of MAC in first data is the first terminal, then is counted by this step.
According to step S301 to the obtained statistical data of step S303, the noisy degree of description channel noisy degree can be referred to
Mark is obtained.
It should be noted that step S301 executes sequence to step 303 and there is no successive, can be executed according to arbitrary
Sequence executes step S301, step S302 and step S303, as long as statistical data required for obtaining as above.
After through step S301, step S302 and step S303, step S304 is executed, judges first number and second
Whether the difference of number is greater than or equal to first several threshold value.
Described first several threshold values can rule of thumb data, experimental data etc. be determined accordingly.
In the present embodiment, the value range in conjunction with the period 1, second round is the basis [100ms, 500ms]
On, by relevant experimental data, the value range of described first several threshold values can be set as [1,10].In other embodiments
In, described first several threshold values can also be set accordingly in conjunction with actual experimental data, channel situation etc., it is described
The value range of first several threshold value is not specifically limited.
If the judging result of step S304 be it is yes, then follow the steps S305;It is no to then follow the steps S306.
Step S305 determines the noisy degree index of channel in conjunction with first number, second number and third number.
The noisy degree index CCA_Freq of the channel is determined by formula (1).
Wherein, CCA_Freq is the channel noisy degree index, and Rx_PPDU_Cnt is first number, Rx_ACK_
Cnt is second number, and Rx_MPDU_Cnt is the third number.
It can be in first several and second several difference more than or equal to first by formula as described above (1)
When number threshold value, the noisy degree index of the channel is determined.
Step S306 determines that the noisy degree index of channel is zero.
Due to first number indicate be first terminal received PPDU within the period 1 number, and second
What number indicated is the number of the first terminal received ACK or BLOCK_ACK within the period 1, first number
With second several difference indicate be the received non-ACK and BLOCK_ACK of first terminal PPDU frame number.If described
Difference is too small, then shows that first terminal received PPDU data within the period 1 are substantially using ACK or BLOCK_ACK
It is the obtained data packet of message affirmation mechanism, the noisy degree of the channel does not have too many influence to statistical result,
Under this mechanism, channel is occupied by the first terminal, it is possible to which the noisy degree for thinking channel is zero, i.e., in first number
When being less than described first several threshold value with second several difference, it is believed that the noisy degree index of channel is zero.
By step S301 to step S306 as described above, the noisy degree of the channel of available period 1 it is noisy
Spend index value.
With continued reference to FIG. 2, executing step S202 after determining noisy degree index by step S201.
Step S202 obtains the mapping relations between noisy degree index and parameter.
When determining the mapping relations between noisy degree index and parameter, when the noisy degree of channel is more serious, i.e. institute
State noisy degree index value it is larger when, the parameter of the DCF or EDCA should be arranged larger accordingly;In the noisy degree of channel
When lighter, i.e., when described noisy degree index value is smaller, the parameter of the DCF or EDCA should be arranged smaller accordingly.
The mapping relations can be preset by experimental data, by combine channel actual transmissions performance,
The indexs of correlation such as noisy degree and handling capacity can be determined by many experiments and are adapted from different noisy degree indexs
The parameter of DCF or EDCA, in the more noisy environment of channel circumstance, using corresponding with the noisy degree index of the channel circumstance
DCF or EDCA parameter, can radio channel resource be made full use of, effectively improve throughput efficiency.
By taking DCF as an example, the parameter of DCF includes the contention window parameter DCFWmin and DCFCWmax of corresponding DCF mechanism, institute
State minimum parameter and maximum parameter that DCFWmin and DCFCWmax is referred to as the DCF.In the ginseng of noisy degree index and DCF
In several mapping relations, noisy degree index is smaller, and corresponding DCFWmin and DCFCWmax are also smaller;Otherwise noisy degree index is got over
Greatly, corresponding DCFWmin and DCFCWmax are also bigger.
By taking EDCA as an example, the parameter of EDCA includes contention window parameter EDCAWmin, EDCAWmax of corresponding EDCA mechanism
And AIFS.The EDCAWmin and EDCAWmax is referred to as the minimum parameter of the EDCA and maximum parameter, the AIFS claim
For the Arbitration Inter Frame Space parameter of EDCA.In the mapping relations of noisy degree index and the parameter of EDCA, noisy degree index is smaller,
Corresponding EDCAWmin, EDCAWmax and AIFS are also smaller;Otherwise noisy degree index is bigger, corresponding EDCAWmin,
EDCAWmax and AIFS are also bigger.
Step S203 is executed, according to corresponding to the determining noisy degree index with the period 1 channel of the mapping relations
DCF or EDCA parameter.
In this step, it is obtained in corresponding mapping relations according to the noisy degree index of period 1 channel and described the
The parameter of DCF or EDCA corresponding to the noisy degree index of one periodic channel.
Specifically, it if institute's channel uses DCF mechanism, is obtained in the mapping relations of noisy degree index and the parameter of DCF
The parameter of DCF corresponding to noisy degree index with the period 1 channel;If described arrive first using EDCA mechanism, in noise
It is obtained corresponding to the noisy degree index with the period 1 channel in the mapping relations of miscellaneous degree index and the parameter of EDCA
The parameter of EDCA.
Step S204 is executed, first terminal is in the second cycle using the parameter logistic of the DCF or EDCA according to being passed
It is defeated.
In the second cycle, first terminal uses the DCF or EDCA of the noisy degree index of the corresponding period 1 channel
Parameter logistic according to being transmitted.
It should be noted that in the present embodiment, using current time interval as the period 1, on a timeline close to
The time interval in one period is second round, adjacent after being determined in real time according to the channel noisy degree index of current period
The parameter of DCF or EDCA in period.It can be according to its previous time interval for the arbitrary time span on time shaft
Channel noisy degree index realizes the determination of the parameter of DCF or EDCA used to current time interval, corresponding current period
The noisy degree index of channel can be used as the foundation that the latter time interval determines the parameter of DCF or EDCA again, and so on, it can
The parameter of DCF or EDCA in each time cycle is neatly adjusted and formulated with intelligence, realizes the effect of real-time optimization throughput.
In the present embodiment, with the corresponding statistical data of the acquisition of period 1, corresponding system is utilized in the second cycle
Count and be adjusted, in other embodiments, can also in the same period for the previous period in obtain corresponding statistics
Data, and be adjusted within the back segment time in this period using statistical data, it is construed as according to previous time interval
Data technical solution that the related data of the latter time interval is adjusted, each fall within present invention model claimed
Within enclosing.
It should be noted that in the present embodiment, believing by searching for preset mapping relations are determining with the period 1
The parameter of DCF or EDCA corresponding to the noisy degree index in road, it is noisy in the reality in real time according to the channel of period 1 in this way
Degree can quickly and accurately determine the parameter of DCF or EDCA.In other embodiments, it can not also preset corresponding
Mapping relations, and according to the parameter of the DCF or EDCA of corresponding noisy degree index channel noisy degree index it is bigger when
Wait, what should accordingly be arranged is larger, and the noisy degree index of channel it is smaller when, what should accordingly be arranged is lesser
Rule sets the parameter of the DCF or EDCA of the noisy degree index of corresponding present channel accordingly.
In the present embodiment by the acquisition of the noisy degree index to channel, the noisy degree of channel can be effectively identified,
And then adaptive adjustment carried out to the parameter of DCF or EDCA according to the noisy degree index of channel, it can enable STA or AP
The noisy degree of channel, and then the parameter of adjust automatically DCF or EDCA on this basis are adaptively measured, is realized to channel ring
Border it is effective, accurately listen to and keep out of the way, make full use of channel resource, realize the effect in real time, adaptively optimizing throughput.
The control method of corresponding above-mentioned resource contention, the embodiment of the present invention also provide a kind of control device of resource contention.
As shown in figure 4, described device includes noisy degree determination unit U11 and parameter determination unit U12.
The noisy degree determination unit U11, for obtaining the noisy degree of channel, the noisy degree of the channel is associated with first
The number of received first data of the terminal within the period 1, the first terminal is the station in wireless network environment or connects
Access point, first data include aggregate frame or non-polymeric frame.
The noisy degree of the channel reduces with the increase of the first ratio, and first ratio is in the period 1
The interior received MAC destination address of the first terminal is that the number of the first data of the first terminal connects with the first terminal
The ratio of the number for all first data received.
The parameter determination unit U12, for determining the first end described in second round based on the noisy degree of the channel
Distributed coordination function used in holding or the parameter of enhanced distributed channel access, the second round are to exist the period 1
Adjacent next cycle on time shaft.
The distributed coordination function or the parameter of enhanced distributed channel access with the channel noisy degree
Increase and increases.
The noisy degree determination unit U11 can be labeled the noisy degree of channel by the noisy degree index of channel.
Fig. 5 is the structural schematic diagram of noisy degree determination unit U11 provided in this embodiment.As shown in figure 5, the noisy degree
Determination unit U11 includes PPDU statistic unit U111, ACK statistic unit U112, the first data statistics unit U113 and first true
Order member U114.
The PPDU statistic unit U111, for obtaining first number, first number is the first terminal in institute
State the number of received PPDU in the period 1.
The ACK statistic unit U112, for obtaining second number, second number is the first terminal described
The number of received ACK or BLOCK_ACK in period 1.
The first data statistics unit U113, for obtaining third number, the third number is the first terminal
Within the period 1 received MAC destination address be the first terminal and be not ACK or Block Ack frame first number
According to number.
The first determination unit U114, for being greater than or equal in first number with second several difference
When first several threshold value, pass through formula
Determine the channel noisy degree index.
Wherein, CCA_Freq is the channel noisy degree index, and Rx_PPDU_Cnt is first number, Rx_ACK_
Cnt is second number, and Rx_MPDU_Cnt is the third number.
The noisy degree determination unit U11 further includes the second determination unit U115, for first number with it is described
When second several difference is less than described first several threshold value, determine that the channel noisy degree index value is zero.
Described device further includes searching unit U13, for obtaining and the noise by searching for preset mapping relations
Distributed coordination function corresponding to miscellaneous degree index or the parameter of enhanced distributed channel access, the mapping relations are described
Corresponding relationship between noisy degree index and the distributed coordination function or the parameter of enhanced distributed channel access.
Although present disclosure is as above, present invention is not limited to this.Anyone skilled in the art are not departing from this
It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
Subject to the range of restriction.