Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent. To this end, an object of the present invention is to propose a method, an apparatus, a device and a storage medium for scheduling transmission opportunities.
In order to solve the technical problems, the embodiment of the invention provides the following technical scheme:
A method of scheduling transmission opportunities, applied to an AP, comprising:
receiving a request for acquiring the HCCA TXOP sent by the STA;
generating scoring parameters based on the request;
Evaluating the HCCA TXOP authority of the STA based on the scoring parameter to obtain an evaluation result;
comparing the evaluation result with a first preset threshold value;
And if the evaluation result is greater than or equal to the first preset threshold value, allocating the HCCA TXOP to the STA.
Optionally, the generating, based on the request, a scoring parameter includes:
Determining the number of times that the STA is actively polled in the current CAP, and generating a first parameter;
after determining that the history request for acquiring the HCCA TXOP sent by the STA is received, the AP allocates the number of times of HCCA TXOP to the STA, and generates a second parameter and a third parameter;
and after determining that the history request of acquiring the HCCA TXOP sent by the STA is received, the AP does not allocate the HCCA TXOP to the STA for times, and generates a fourth parameter.
Optionally, the generating a scoring parameter based on the request further includes:
determining the length of the allocable HCCA TXOP of the AP in the current CAP, and comparing the length of the allocable HCCA TXOP with a second preset threshold;
generating a fifth parameter if the length of the allocable HCCA TXOP is greater than or equal to the second preset threshold;
And if the length of the allocable HCCA TXOP is smaller than the second preset threshold, generating a sixth parameter.
Optionally, the generating a scoring parameter based on the request further includes:
Determining whether the effective time of the life cycle of the data frame reported by the STA exceeds a third preset threshold based on the received QOS frame;
And if the effective time of the data frame reported by the STA is greater than or equal to the third preset threshold value, generating a seventh parameter.
Optionally, if the evaluation result is greater than or equal to the first preset threshold, allocating the HCCA TXOP to the STA further includes:
If the evaluation result is greater than or equal to a first preset threshold value, acquiring the current residual time of the CAP;
Comparing the remaining time with a fourth preset threshold value to obtain a comparison result;
based on the comparison result, a target length of the HCCA TXOP allocated to the STA is determined.
The embodiment of the invention also provides a method for scheduling transmission opportunities, which is applied to the STA and comprises the following steps:
transmitting a request for acquiring the HCCA TXOP to the AP;
receiving the HCCA TXOP allocated by the AP;
monitoring the effective time of the life cycle of the data to be transmitted;
and when the effective time is smaller than a third preset threshold value, transmitting a QoS frame to the AP.
Optionally, the QoS frame carries information of a TXOP duration request.
Optionally, the monitoring the effective time of the life cycle of the data to be sent further includes:
Monitoring the effective time of the life cycle of the data to be transmitted, and obtaining the effective time;
Comparing the effective time with a third preset threshold value;
if the effective time is greater than or equal to the third preset threshold value, adjusting the data of the QoS frame to obtain an adjusted QoS frame;
and sending the QoS adjustment frame to the AP.
The embodiment of the invention also provides a device for scheduling transmission opportunities, which is applied to the AP and comprises the following steps:
A receiving module, configured to receive a request sent by an STA to acquire an HCCA TXOP;
the generation module is used for generating scoring parameters based on the request;
the evaluation module is used for evaluating the HCCA TXOP authority of the STA based on the scoring parameter to acquire an evaluation result;
the comparison module is used for comparing the evaluation result with a first preset threshold value;
and the allocation module is used for allocating the HCCA TXOP to the STA if the evaluation result is greater than or equal to the first preset threshold value.
The embodiment of the invention also provides a device for scheduling transmission opportunities, which is applied to the STA and comprises:
a request module, configured to send a request for obtaining an HCCA TXOP to an AP;
an acquisition module, configured to receive the HCCA TXOP allocated by the AP;
the monitoring module is used for monitoring the effective time of the life cycle of the data to be transmitted;
And the sending module is used for sending a QoS frame to the AP when the effective time is smaller than a third preset threshold value.
Embodiments of the present invention also provide an electronic device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method as described above when executing the computer program.
Embodiments of the present invention also provide a computer readable storage medium comprising a stored computer program, wherein the computer program when run controls a device in which the computer readable storage medium is located to perform a method as described above.
The embodiment of the invention has the following technical effects:
According to the technical scheme, 1) a scoring system is provided for HC in the AP, aiming at the STA which has proposed the HCCA TXOP application, the set of system can be used for providing an evaluation result so as to determine whether the HCCA TXOP needs to be allocated for the STA and how much HCCA TXOP needs to be allocated, the scoring system integrates multiple dimensions so that the evaluation result is more reasonable, the related dimensions mainly comprise two aspects of HC resources and STA resources, wherein the HC resources in the AP comprise residual available HCCA TXOP length and the HCCA TXOP resources which are already actively polled/allocated for the STA, the STA resources comprise the life cycle of data messages queued by the STA, the life cycle is related to the storage capacity of the STA and the time of the data packets, and when the life cycle remained by the data packets is short, the AP can be considered to allocate the resources for the STA as soon as possible so as to reduce the probability of data packet loss.
2) In the traditional resource allocation strategy, only the AP end always considers the self resource condition and does not have the information reported by the STA, and the embodiment of the invention newly adds the link of reporting the information by the STA, thereby being more beneficial to the measurement of the resource allocation strategy by the AP end.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
To facilitate an understanding of the embodiments by those skilled in the art, some terms are explained:
(1) HC hybrid coordinator, the central coordinator, specifically, the central coordinator that allocates HCCA TXOP for the STA in HCCA, and the HC function is usually completed by the AP, so the HC function can be considered to be integrated in the AP, that is, the process of allocating HCCA TXOP for the STA by the AP mentioned in the embodiment of the invention is performed based on HC.
(2) QoS Quality of Service, quality of service.
(3) Info, status statistics.
(4) Request, request.
(5) CAP controlled ACCESS PHASE, controlled access phase.
(6) Control field.
(7) Duration Requested duration request.
(8) TBTT: target beacon transmission interval time.
(9) Beacon.
As shown in fig. 1, an embodiment of the present invention provides a method for scheduling transmission opportunities, which is applied to an AP, and includes:
Step S11, receiving a request for acquiring the HCCA TXOP sent by the STA;
specifically, the AP needs to set the TXOP Request bit in the QoS Info sent by itself to 1, which indicates that the current AP can process the TXOP Request proposed by the STA.
Thus, the AP referred to in the embodiments of the present invention is an AP capable of handling TXOP requests for STAs.
Step S12, generating scoring parameters based on the request;
Specifically, the generating, based on the request, a scoring parameter includes:
Determining the number of times that the STA is actively polled in the current CAP, and generating a first parameter;
The method comprises the steps that the number of times that the STA is actively polled in a current CAP is set to be L, and a first parameter is set to be-L;
after determining that the history request for acquiring the HCCA TXOP sent by the STA is received, the AP allocates the number of times of HCCA TXOP to the STA, and generates a second parameter and a third parameter;
The second parameter is-2*M if the number of times of allocating the full-scale HCCA TXOP to the STA by the AP is set as M;
Setting the number of times of the HCCA TXOP, to which the AP does not allocate a full amount to the STA, as N, and setting a third parameter as-N;
In the practical application scenario, after receiving the request of the HCCA TXOP from the STA, the AP allocates a certain length of HCCA TXOP to the STA, but the length of HCCA TXOP actually allocated to the STA by the AP is not necessarily equal to the length actually requested by the STA, so when the length of HCCA TXOP actually allocated to the STA is equal to the number of times the length actually requested by the STA increases by 1, the value of M is updated to m+1, the second parameter is updated to-2 x (m+1), and when the length of HCCA TXOP actually allocated to the STA by the AP is less than the number of times the length actually requested by the STA increases by 1, the value of N is updated to n+1, and the third parameter is updated to- (n+1).
And after determining that the history request of acquiring the HCCA TXOP sent by the STA is received, the AP does not allocate the HCCA TXOP to the STA for times, and generates a fourth parameter.
The fourth parameter is +p, if the AP does not allocate the number of times P of HCCA TXOP to the STA.
Specifically, the generating the scoring parameter based on the request further includes:
Determining the length of the allocable HCCA TXOP of the AP in the current CAP, and comparing the length of the allocable HCCA TXOP with a second preset threshold; generating a fifth parameter if the length of the allocable HCCA TXOP is greater than or equal to the second preset threshold;
The second preset threshold is the length of HCCA TXOP requested by the STA.
And presetting x, wherein the fifth parameter is +x, and the value of x can be preset or adjusted according to the length of the HCCA TXOP which can be distributed in the current CAP. And if the length of the allocable HCCA TXOP is smaller than the second preset threshold, generating a sixth parameter.
And if y is preset, the sixth parameter is-y, and the value of y can be preset or adjusted according to the length of the allocable HCCA TXOP.
Specifically, the generating the scoring parameter based on the request further includes:
determining whether the effective time of the life cycle of the data frame reported by the STA exceeds a third preset threshold based on the received QoS frame;
And if the effective time of the data frame reported by the STA is greater than or equal to the third preset threshold value, generating a seventh parameter.
Wherein, the value of the seventh parameter is +z, and the AP can preset or adjust the value of z.
The third preset threshold is a trigger condition for the STA to report the data frame to be sent in an urgent need, and specifically, the third preset threshold is an effective time of the life cycle of the data frame when the STA reports the data frame to be sent in an urgent need.
In an actual application scenario, the third preset threshold may be 1/2 or 1/3 of the life cycle of the data frame, etc.
Step S13, evaluating the HCCA TXOP authority of the STA based on the scoring parameter to obtain an evaluation result;
Wherein, the initial value or default value of the scoring result is 0, and the scoring result needs to be counted again each time the CAP is restarted.
In an actual application scenario, the scoring result may be obtained based on the following table 1:
TABLE 1
That is, the scoring result= -L-2*M-n+p+x-y+z.
S14, comparing the evaluation result with a first preset threshold value;
And step S15, if the evaluation result is greater than or equal to the first preset threshold value, the HCCA TXOP is distributed to the STA.
The first preset threshold is a preset evaluation result, and the value of the first preset threshold can be preset or adjusted according to actual needs.
Specifically, if the evaluation result is greater than or equal to the first preset threshold, allocating the HCCA TXOP to the STA further includes:
If the evaluation result is greater than or equal to a first preset threshold value, acquiring the current residual time of the CAP;
Comparing the remaining time with a fourth preset threshold value to obtain a comparison result;
based on the comparison result, a target length of the HCCA TXOP allocated to the STA is determined.
Specifically, since the CAP cannot span two TBTT intervals, the maximum remaining time of the CAP refers to the time before the arrival of the next TBTT, so the current CAP is about to end when the next Beacon transmission occurs. Of course, the AP may end the CAP itself earlier, but this may result in a shorter CAP time remaining.
The fourth preset threshold is the remaining time of the CAP when the next Beacon sends.
By default, if the AP also needs to allocate HCCA TXOP for STAs within the BSS, the CAP may use the longest time as possible (i.e., before the next TBTT).
In an actual application scene, determining a value of a fourth preset threshold according to actual requirements;
When the remaining time is smaller than the fourth preset threshold value, the AP distributes the HCCA TXOP with a certain length to the STA according to the remaining time of the current CAP;
and if the evaluation result is smaller than a first preset threshold value, the AP does not allocate the HCCA TXOP to the STA.
The embodiment of the invention provides a scoring system for HC in an AP, aiming at the STA which has proposed the HCCA TXOP application, the scoring system can be used for providing an evaluation result so as to determine whether the HCCA TXOP needs to be allocated for the STA and how much HCCA TXOP needs to be allocated, the scoring system integrates a plurality of dimensions so that the evaluation result is more reasonable, the related dimensions mainly comprise two aspects of HC resources in the AP and STA resources, wherein the HC resources in the AP comprise residual available HCCA TXOP length and the HCCA TXOP resources which are already actively polled/allocated for the STA, the STA resources comprise the life cycle of data messages queued by the STA, the life cycle is related to the storage capacity of the STA and the data packet inventory time, and when the life cycle remained by the data packet is short, the AP can be considered to allocate the resources for the STA as soon as possible so as to reduce the probability of data packet loss.
As shown in fig. 2, an embodiment of the present invention further provides a method for scheduling transmission opportunities, which is applied to an STA and includes:
step S21, a request for acquiring the HCCA TXOP is sent to the AP;
step S22, receiving the HCCA TXOP distributed by the AP;
Step S23, monitoring the effective time of the life cycle of the data to be transmitted;
Specifically, the monitoring the effective time of the life cycle of the data to be sent further includes:
Monitoring the effective time of the life cycle of the data to be transmitted, and obtaining the effective time;
Comparing the effective time with a third preset threshold value;
if the effective time is greater than or equal to the third preset threshold value, adjusting the data of the QoS frame to obtain an adjusted QoS frame;
and sending the QoS adjustment frame to the AP.
And step S24, when the effective time is smaller than a third preset threshold value, a QoS frame is sent to the AP.
Specifically, the QoS frame carries information of the TXOP duration request.
The third preset threshold may be 1/2 or 1/3, etc.
In a practical application scenario, if the STA still has data to be transmitted when the HCCA TXOP allocated by the current AP is about to end, it cannot transmit the data for a period of time in the future unless the AP reallocates a new HCCA TXOP to it, but since the access priority requirement on the channel is high when the AP allocates HCCA TXOP in the current CAP, the STA cannot compete for the channel when the AP allocates HCCA TXOP in the current CAP, and thus the data to be transmitted is delayed to be transmitted.
Therefore, in the embodiment of the present invention, when the STA is about to end the HCCA TXOP allocated to the current AP, the STA needs to send a QoS frame carrying TXOP Duration Requested to the AP, and the QoS frame carries the TXOP duration information requested by the STA itself.
In addition, if any data to be transmitted wait for more than 1/2 or 2/3 of the life cycle of the data to be transmitted in the queue, the STA needs to set Bit7 of QoS Control field carrying the QoS frame TXOP Duration Requested to be 1, send the QoS frame to the AP, and report the data to be transmitted to the AP that needs to be transmitted urgently.
In the traditional resource allocation strategy, only the AP end always considers the self resource condition and does not have the information reported by the STA, and the embodiment of the invention newly adds the link of reporting the information by the STA, thereby being more beneficial to the measurement of the resource allocation strategy by the AP end.
As shown in fig. 3, the embodiment of the present invention further provides an apparatus 300 for scheduling transmission opportunities, which is applied to an AP, and includes:
A receiving module 301, configured to receive a request sent by an STA to acquire an HCCA TXOP;
a generating module 302, configured to generate a scoring parameter based on the request;
An evaluation module 303, configured to evaluate HCCA TXOP permission of the STA based on the scoring parameter, and obtain an evaluation result;
a comparison module 304, configured to compare the evaluation result with a first preset threshold;
An allocation module 305, configured to allocate the HCCA TXOP to the STA if the evaluation result is greater than or equal to the first preset threshold.
Optionally, the generating, based on the request, a scoring parameter includes:
determining the number L of times of polling the STA in the current CAP, and generating a first parameter;
After determining that the history request for acquiring the HCCA TXOP sent by the STA is received, the AP allocates the number M of HCCA TXOPs to the STA, and generates a second parameter;
and after determining that the history request of acquiring the HCCA TXOP sent by the STA is received, the AP does not allocate the HCCA TXOP to the STA for times N, and generates a third parameter.
Optionally, the generating a scoring parameter based on the request further includes:
Determining the length of the allocable HCCA TXOP in the CAP, and comparing the length of the allocable HCCA TXOP with a second preset threshold;
generating a fourth parameter if the length of the allocable HCCA TXOP is greater than or equal to the second preset threshold;
And if the length of the allocable HCCA TXOP is smaller than the second preset threshold, generating a fifth parameter.
Optionally, the generating a scoring parameter based on the request further includes:
Determining whether the effective time of the life cycle of the data frame reported by the STA exceeds a third preset threshold based on the received QOS frame;
and if the effective time of the data frame reported by the STA is greater than or equal to the third preset threshold value, generating a sixth parameter.
Optionally, if the evaluation result is greater than or equal to the first preset threshold, allocating the HCCA TXOP to the STA further includes:
If the evaluation result is greater than or equal to a first preset threshold value, acquiring the current residual time of the CAP;
Comparing the remaining time with a fourth preset threshold value to obtain a comparison result;
based on the comparison result, a target length of the HCCA TXOP allocated to the STA is determined.
As shown in fig. 4, an embodiment of the present invention further provides an apparatus 400 for scheduling transmission opportunities, which is applied to an STA and includes:
A request module 401, configured to send a request for obtaining an HCCA TXOP to an AP;
An acquisition module 402, configured to receive the HCCA TXOP allocated by the AP;
a monitoring module 403, configured to monitor an effective time of a lifecycle of data to be transmitted;
and a sending module 404, configured to send a QoS frame to the AP when the effective time is less than a third preset threshold.
Optionally, the QoS frame carries information of a TXOP duration request.
Optionally, the monitoring the effective time of the life cycle of the data to be sent further includes:
Monitoring the effective time of the life cycle of the data to be transmitted, and obtaining the effective time;
Comparing the effective time with a third preset threshold value;
if the effective time is greater than or equal to the third preset threshold value, adjusting the data of the QoS frame to obtain an adjusted QoS frame;
and sending the QoS adjustment frame to the AP.
Embodiments of the present invention also provide an electronic device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method as described above when executing the computer program.
Embodiments of the present invention also provide a computer readable storage medium comprising a stored computer program, wherein the computer program when run controls a device in which the computer readable storage medium is located to perform a method as described above.
In addition, other structures and functions of the device according to the embodiments of the present invention are known to those skilled in the art, and are not described herein for redundancy reduction.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include an electrical connection (an electronic device) having one or more wires, a portable computer diskette (a magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of techniques known in the art, discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed, mechanically connected, electrically connected, directly connected, indirectly connected through an intervening medium, or in communication between two elements or in an interaction relationship between two elements, unless otherwise explicitly specified. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.