Disclosure of Invention
The present disclosure provides a data frame transmission method, an apparatus and a workstation for reducing the number of awakening times of the workstation and reducing the power consumption of the workstation, in order to solve the problems of more awakening times and larger power consumption of the workstation.
In order to achieve the above disclosure purpose, the present disclosure provides the following technical solutions:
in a first aspect, the present disclosure provides a data frame transmission method applied to a first station, the method including:
intercepting a beacon frame of a base station according to a preset interception interval;
updating the locally recorded TIM through the TIM carried by the beacon frame;
and when the discovery window of the NAN is reached, forwarding the locally recorded TIM to a second workstation belonging to the same service group with the first workstation, so that the second workstation receives the TIM forwarded by the first workstation through the discovery window, and acquiring a data frame temporarily stored for the second workstation from the base station based on the TIM.
In a second aspect, the present disclosure further provides a data frame transmission method applied to a second station, the method including:
when a discovery window of a NAN is reached, receiving a TIM forwarded by a first workstation belonging to the same service group as the second workstation, wherein the TIM is obtained by the first workstation from a beacon frame of an intercepted base station;
and if the data frame belonging to the second workstation is temporarily stored in the base station based on the TIM, acquiring the data frame from the base station.
In a third aspect, the present disclosure further provides a data frame transmission apparatus applied to a first workstation, including:
the monitoring unit is used for monitoring the beacon frame of the base station according to a preset monitoring interval;
the updating unit is used for updating the locally recorded TIM through the TIM carried by the beacon frame;
and a forwarding unit, configured to forward the locally recorded TIM to a second workstation belonging to the same service group as the first workstation when a discovery window of a NAN is reached, so that the second workstation receives the TIM forwarded by the first workstation through the discovery window, and acquires a data frame temporarily stored for the second workstation from the base station based on the TIM.
In a fourth aspect, the present disclosure further provides a data frame transmission apparatus applied to a second station, where the apparatus includes:
a receiving unit, configured to receive, when a discovery window of a NAN is reached, a TIM forwarded by a first workstation belonging to the same service group as the second workstation, where the TIM is obtained by the first workstation from a beacon frame of an intercepted base station;
an obtaining unit, configured to obtain the data frame from the base station if it is determined that the data frame belonging to the second station is temporarily stored in the base station based on the TIM.
In a fifth aspect, the present disclosure also provides a first workstation comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the data frame transmission method according to the first aspect is implemented.
In a sixth aspect, the present disclosure also provides a second workstation comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the data frame transmission method according to the second aspect is implemented.
As can be seen from the above description, in the present disclosure, a first workstation is responsible for listening to a beacon frame of a base station, and updates a locally recorded TIM by using a TIM carried in the beacon frame, and when a discovery window of a NAN is reached, forwards the locally recorded TIM to a second workstation in the same service group; and the second workstation receives the TIM forwarded by the first workstation through the discovery window, and acquires the data frame from the base station when determining that the data frame of the second workstation is temporarily stored in the base station based on the TIM. Therefore, in the disclosure, the second workstation only needs to follow the wake-up period of the NAN, wake-up in the discovery window of the NAN, and receive the temporary storage notification (TIM) of the base station forwarded by the first workstation, so that the wake-up times of the second workstation are reduced, and the power consumption of the second workstation is reduced.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, a diagram of the number of awakenings of a conventional workstation operating on a base network and a NAN simultaneously is shown. Wherein the AP represents a base station of the infrastructure network; b represents a beacon frame transmitted by the AP; DW stands for discovery window of NAN; STA represents a workstation; beacon Interval represents the Interval of sending Beacon frames by the AP; listen Interval represents the interception Interval of the STA in the basic network; DW Interval represents discovery Interval of STA under NAN; TU is an abbreviation for Time Unit, which stands for Time Unit.
As can be seen from fig. 1, the STA needs to wake up with Listen Interval as a period to Listen to the beacon frame of the AP, and needs to wake up with DW Interval as a period to complete information interaction of the NAN, so that the number of times of waking up the STA is increased and power consumption is large.
In order to solve the problems of high awakening times and high power consumption, the method includes that a first workstation monitors a beacon frame of a base station, a TIM (Traffic indication map) carried by the beacon frame is acquired for local updating, and when a discovery window of a NAN is reached, the locally recorded TIM is forwarded to a second workstation in the same service group, so that the second workstation acquires a data frame temporarily stored for the TIM from the base station based on the TIM.
Referring to fig. 2, a flowchart of a data frame transmission method according to an embodiment of the present disclosure is shown, where the data frame transmission process is described from the first station side.
Step 201, intercepting a beacon frame of a base station according to a preset interception interval.
Before executing the step, the workstation selects a base station with a certain BSSID (Basic Service Set Identification) to access through a Basic network protocol interaction (including a discovery phase, an authentication phase, and an association phase, which is an existing protocol processing flow and is not described herein again); then, through NAN protocol interaction (including the issuing and registering process, which is the existing protocol processing flow and is not described herein), the workstations accessing the same base station (namely, the same BSSID is selected) form a service group; the roles of the workstations in the service group are determined, i.e. the first workstation and the second workstation in the service group are determined. In an optional implementation manner, a workstation with a stronger power supply capability may be selected as the first workstation according to a power supply manner of the workstation, so as to perform subsequent operations of monitoring a beacon frame of the base station as an agent, which is specifically described below and is not described again; otherwise, the workstation with relatively weak power supply capability is selected as the second workstation, and the subsequent operation of the second workstation is executed, which is not repeated herein. In another alternative embodiment, the workstations in the same service group may elect the first workstation and the second workstation based on a preset election mechanism. The present disclosure does not limit the manner in which the first and second stations are specifically identified.
In this step, the first station listens to a beacon frame of the base station according to a preset listening interval, where the listening interval is smaller than a discovery interval of the NAN (i.e., an interval duration of adjacent discovery windows).
Step 202, updating the locally recorded TIM by the TIM carried in the beacon frame.
The beacon frame sent by the base station contains TIM information, which is used to identify which stations' data frames are temporarily stored in the base station. Since the base station periodically transmits the Beacon frame at a certain Beacon Interval (Beacon Interval), the first station needs to continuously update the locally recorded TIM according to the TIM in the received Beacon frame, so as to keep consistent with the TIM information in the base station.
And step 203, when the discovery window of the NAN is reached, forwarding the locally recorded TIM to a second workstation belonging to the same service group as the first workstation.
When the discovery window of the NAN is reached, the locally recorded TIM is forwarded to the second workstation over the NAN protocol. Since the second station follows the NAN protocol, the second station wakes up in the discovery window, receives the TIM forwarded by the first station in the same service group, and determines whether to receive the data frame from the base station based on the TIM, which is specifically described in the description of the second station side and will not be described again.
Referring to fig. 3, a flowchart of another data frame transmission method according to an embodiment of the present disclosure is shown, where the data frame transmission process is described from the second station side.
Step 301, when the discovery window of the NAN is reached, receiving the TIM forwarded by the first workstation belonging to the same service group as the second workstation.
Before this step is performed, the second station needs to notify the base station of its own listening interval so that the base station determines the length of time to temporarily store the data frame for the second station based on the listening interval. Specifically, the second station determines its own listening interval based on the discovery interval of the NAN and the beacon interval of the base station to which the second station accesses, and optionally, may be represented by the following formula:
equation (1) for Ceiling (DW Interval/Beacon Interval)
Wherein, DW Interval is a discovery Interval of NAN protocol; beacon Interval is the Beacon Interval of the base station; ceiling () represents a rounding-up function; n represents that the second station sleeps for n beacon periods (beacon intervals) between adjacent wakeups.
For example, when DW Interval is 512TU, Beacon Interval is 100TU, n is 6, the second station notifies the base station of the value of n, and the base station temporarily stores the data frame of the second station for at least 6 Beacon periods according to the value of n.
In this step, when the discovery window of the NAN is reached, the second station wakes up (opens the antenna), receives the TIM forwarded by the first station based on the NAN protocol in the discovery window, and as described above, the TIM is obtained by the first station from the intercepted beacon frame of the base station.
Step 302, if it is determined that the data frame belonging to the second station is temporarily stored in the base station based on the TIM, acquiring the data frame from the base station.
The second station determines whether the data frame of the second station is temporarily stored in the base station based on the received TIM, where the specific determination process is related to the prior art and is not described herein again. And if the base station is determined to temporarily store the own data frame, acquiring the temporarily stored data frame from the base station.
As can be seen from the above description, in the present disclosure, the first workstation agent base station forwards the TIM to the second workstation, and the forwarding process follows the NAN protocol specification, so that the second workstation only needs to wake up according to the NAN protocol, and does not need to consider the wake-up periods of the base network and the NAN at the same time, thereby effectively reducing the wake-up times of the second workstation and reducing the power consumption of the second workstation.
The data frame transmission process will now be described in detail by taking the networking shown in fig. 4 as an example.
The networking comprises a base station AP and workstations STA 1-STA 3, wherein the AP sends a Beacon frame Beacon at a 100TU Beacon Interval, the STAs 1-STA 3 can discover the BSSID of the AP and join the BSSID by passively monitoring the Beacon or actively sending a Probe Request frame, namely, the AP is accessed, and the STAs 1-STA 3 use the same BSSID; STAs 1-3 with the same BSSID form a service group through NAN protocol interaction, that is, STAs 1-3 belong to the same service group.
Designating STA1 as the first station, STA2 and STA3 as the second station, presetting listening Interval Listen Interval of STA1 as 300TU, discovery Interval DW Interval of NAN as 512TU, STA2 and STA3 respectively calculating sleep time length between two adjacent wakeups, expressing by multiple n between DW Interval and Beacon Interval, i.e. calculating by the aforementioned formula (1) that n is 6, informing the AP of the n value, and determining by the AP that at least data frame buffer 600TU of STA2 and STA3 is required based on the product of the n value and Beacon Interval (100 TU).
The STA1 listens to the Beacon of the AP with a Listen Interval of 300TU, acquires the TIM carried in the Beacon, and updates the locally recorded TIM, that is, the STA1 always maintains the latest temporary storage state in the AP.
When the discovery window DW of the NAN is reached, the STA1 forwards the locally recorded TIM through the NAN protocol, see fig. 5, which is a forwarding flow based on the NAN protocol, in which the STA1 forwards the TIM to the STA2 and the STA3 of the same service group through a NAN announcement frame. In addition, as can be seen from fig. 5, the NAN release frame also carries a service ID (Instance ID) and a BSSID, and if a new workstation is ready to join the service group, the new workstation can join according to the Instance ID and the BSSID carried in the NAN release frame.
When the discovery window DW of the NAN is reached, both STA2 and STA3 wake up and receive the TIM forwarded by STA1, if STA2 judges that the AP temporarily stores its own data frame based on the TIM, the STA2 may request the temporarily stored data frame from the base station through the PS-Poll frame, and the base station sends the temporarily stored data frame of STA2 to STA 2; if STA3 determines that there is no data frame for itself on the AP based on the TIM, it will not request data from the AP.
Referring to fig. 6, a diagram of wake up times for a workstation operating simultaneously on a base network and a NAN is shown for the present disclosure. As can be seen from fig. 6, STA2 and STA3 both operate in the infrastructure network and the NAN at the same time, but both need to wake up only in the wake-up period (discovery interval) conforming to the NAN protocol, so that the number of times of wake-up can be effectively reduced, and power consumption of STA2 and STA3 can be reduced.
Fig. 7 is a schematic hardware structure diagram of a workstation (including a first workstation and a second workstation) provided by the present disclosure. The workstation includes a processor 701, a machine-readable storage medium 702 having machine-executable instructions stored thereon. The processor 701 and the machine-readable storage medium 702 may communicate via a system bus 703. Also, the processor 701 may perform the data frame transmission method described above by reading and executing machine executable instructions in the machine readable storage medium 702 corresponding to the data frame transmission logic.
The machine-readable storage medium 702 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
As shown in fig. 8, when the station shown in fig. 7 is a first station, the data frame transmission logic may include a listening unit 801, an updating unit 802, and a forwarding unit 803, where:
an interception unit 801, configured to intercept a beacon frame of a base station according to a preset interception interval;
an updating unit 802, configured to update the locally recorded TIM by using the TIM carried in the beacon frame;
a forwarding unit 803, configured to forward, when a discovery window of a NAN is reached, the locally recorded TIM to a second workstation belonging to the same service group as the first workstation, so that the second workstation receives, through the discovery window, the TIM forwarded by the first workstation, and acquires, from the base station, a data frame temporarily stored for the second workstation based on the TIM.
Alternatively to this, the first and second parts may,
the listening interval is less than a discovery interval of the NAN.
As shown in fig. 9, when the workstation shown in fig. 7 is a second workstation, the data frame transmission logic may include a receiving unit 901 and an obtaining unit 902, where:
a receiving unit 901, configured to receive, when a discovery window of a NAN is reached, a TIM forwarded by a first workstation belonging to the same service group as the second workstation, where the TIM is obtained by the first workstation from an intercepted beacon frame of a base station;
an obtaining unit 902, configured to obtain the data frame from the base station if it is determined that the data frame belonging to the second station is temporarily stored in the base station based on the TIM.
Optionally, the data frame transmission logic further includes:
a notification unit, configured to determine a listening interval of the second station based on a discovery interval of the NAN and a beacon interval of the base station, and notify the base station, so that the base station determines a time length for temporarily storing the data frame based on the listening interval.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.