Wireless local area network throughput prediction method and system based on small sample beacon frames
By collecting small sample beacon frame parameters on the terminal side, using weighted empirical Bayesian to calculate packet loss rate and signal strength, combined with the 802.11 communication mechanism, the accuracy and delay problems of wireless LAN communication quality evaluation are solved, and the multi-dimensional network communication quality evaluation is achieved Low latency throughput prediction in Wi-Fi scenarios.
Patent Information
- Application Number
- CN202211260995.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the evaluation of the communication quality of wireless LAN on the terminal side, it is difficult to accurately reflect the real load status of the AP, and it is difficult to evaluate low latency, especially when the AP is not connected.
Using a method based on small sample beacon frames, a small number of beacon frame parameters are collected through the terminal, and the packet loss rate is calculated using weighted empirical Bayesian, and combined with signal strength and 802.11 communication mechanism, the real transmission time of the data frame is estimated and the network connection is predicted. The average throughput after incoming is reached.
It realizes accurate evaluation of the communication quality of AP network at low latency, improves the accuracy of throughput prediction, with an error of less than 20%, and is suitable for network selection in multiple Wi-Fi joint distribution scenarios.
Smart Images

Figure CN115642967B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communications, and in particular to a method and system for predicting wireless local area network throughput based on small sample beacon frames. Background Art
[0002] In recent years, due to the rapid development of smart terminals and wireless LAN technology, people have obtained more flexible, fast, efficient and low-cost wireless network access services through mobile terminals. In typical multi-Wi-Fi joint distribution scenarios such as shopping malls and industrial parks, it is of great significance to effectively evaluate the network communication quality and select access on the terminal side.
[0003] The existing problems in wireless network communication quality assessment are:
[0004] 1. The existing technology evaluates the communication quality of the wireless LAN on the terminal side, usually based on the signal strength of the AP (it is believed that the channel quality is good and the transmission rate is high after associating with the AP with a strong signal strength). However, the signal strength is difficult to reflect the actual load of the AP. The AP may have a large user load, and the data packet congestion, conflict and other reasons may reduce the data transmission rate. Therefore, it is not accurate to evaluate the network quality based only on the signal strength.
[0005] 2. Secondly, some solutions introduce information in the Wi-Fi Basic Service Set (BSS) field to evaluate AP load. However, in practice, most Wi-Fi do not provide this field information, and it is difficult for the terminal side to obtain this information, making it difficult to implement.
[0006] 3. In addition, considering the practicality of the algorithm and network volatility, the evaluation of network quality must meet low latency requirements.
[0007] Therefore, how to accurately evaluate the network communication quality of an AP with small sample information with low latency without accessing the AP becomes an urgent problem to be solved. Summary of the invention
[0008] In order to solve the above technical problems, the present invention provides a method and system for predicting wireless local area network throughput based on small sample beacon frames.
[0009] The technical solution of the present invention is: a wireless local area network throughput prediction method based on a small sample beacon frame, comprising:
[0010] Step S1: Use the terminal to perform network scanning to search for a target AP of an accessible Wi-Fi network;
[0011] Step S2: Collect a small number of beacon frames of the target AP within time t, and read the parameters of the beacon frames: 802.11 protocol version, beacon frame interval t0, guard interval GI, allowed number of spatial streams N SS , the maximum allowed frame aggregation length L A-MPDU , the allowed bandwidth W;
[0012] Step S3: Based on the small sample beacon frame data, using weighted empirical Bayes calculation to accurately estimate the packet loss rate of the beacon frame;
[0013] Step S4: Detect the signal strength of the target AP, and calculate the theoretical transmission rate of the data frame based on the 802.11 modulation and coding strategy according to the relevant parameters of the beacon frame and the signal strength of the Wi-Fi network;
[0014] Step S5: combining the packet loss rate of the beacon frame and the theoretical transmission rate of the data frame, and according to the 802.11 communication mechanism, estimating the actual transmission time of the data frame, and predicting the average achievable throughput after network access.
[0015] Compared with the prior art, the present invention has the following advantages:
[0016] 1. The present invention discloses a wireless local area network throughput prediction method based on small sample beacon frames, which corrects small sample parameters through the weighted empirical Bayes method and estimates the network packet loss rate with low delay.
[0017] 2. The present invention introduces packet loss rate as the weight of transmission duration under different conflict situations, and combines it with the 802.11 communication mechanism to predict the achievable throughput after the smart terminal accesses the AP. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of a method for predicting wireless local area network throughput based on small sample beacon frames in an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of an MSC table used in an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of a cumulative distribution function in an embodiment of the present invention;
[0021] Figure 4 Schematic diagram of the influence of the number of prior scenarios and prediction duration on the experimental results in the weighted empirical Bayes in an embodiment of the present invention;
[0022] Figure 5 The structure block diagram of a wireless local area network throughput prediction system based on small sample beacon frames in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The present invention provides a wireless local area network throughput prediction method based on small sample beacon frames, which accurately evaluates the network communication quality of the AP with low-latency small sample information without accessing the AP.
[0024] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below through specific implementations and in conjunction with the accompanying drawings.
[0025] Embodiment 1
[0026] like Figure 1 As shown, a wireless local area network throughput prediction method based on a small sample beacon frame provided in an embodiment of the present invention includes the following steps:
[0027] Step S1: Use the terminal to perform network scanning to search for a target AP of an accessible Wi-Fi network;
[0028] Step S2: Collect a small number of beacon frames from the target AP within time t, and read the parameters of the beacon frames: 802.11 protocol version, beacon frame interval t0, guard interval GI, allowed number of spatial streams N SS , the maximum allowed frame aggregation length L A-MPDU , the allowed bandwidth W;
[0029] Step S3: Based on a small sample of beacon frame data, use weighted empirical Bayes to accurately estimate the packet loss rate of the beacon frame;
[0030] Step S4: Detect the signal strength of the target AP, and calculate the theoretical transmission rate of the data frame based on the relevant parameters of the beacon frame and the signal strength of the Wi-Fi network and the 802.11 modulation and coding strategy;
[0031] Step S5: Based on the packet loss rate of the beacon frame and the theoretical transmission rate of the data frame, the actual transmission time of the data frame is estimated according to the 802.11 communication mechanism, and the average achievable throughput after network access is predicted.
[0032] In one embodiment, the above step S1: using the terminal to perform network scanning to search for a target AP of an accessible Wi-Fi network;
[0033] The embodiment of the present invention uses but is not limited to using an Android terminal (Nexus 6p) to perform network scanning to search for a target AP of an accessible Wi-Fi network.
[0034] Usually, the Wi-Fi of an Android terminal operates in Manager mode, and beacon frames are filtered by the Wi-Fi chip, so the upper system cannot capture and count the number of beacon frames. In an embodiment of the present invention, nexmon is implanted on an Android device. nexmon is an existing C-based firmware patch framework for Broadcom / Cypress Wi-Fi chips, which enables users to write their own firmware patches. On this basis, the Android Wi-Fi chip can be operated in Monitor mode to capture and count the number of beacon frames.
[0035] The embodiment of the present invention comprehensively considers the influence of different AP types, experimental environment, signal strength, and AP load. Table 1 lists the relevant parameters of the AP involved in the experiment.
[0036] Table 1: AP parameters
[0037] parameter Numeric parameter Numeric Protocol Version IEEE802.11g / n frequency 2.4 / 5GHz bandwidth 20 / 40MHz Packet size 2312bytes <![CDATA[H phy ]]> 192μs <![CDATA[T ACK ]]> 304μs SIFS 10μs DIFS 50μs
[0038] Table 2 lists the experimental conditions designed for the embodiments of the present invention, and tests were performed under various experimental conditions.
[0039] Table 2 Experimental conditions
[0040]
[0041]
[0042] In one embodiment, the above step S2: collects a small number of beacon frames of the target AP within time t, and reads the parameters of the beacon frames: 802.11 protocol version, beacon frame interval t0, guard interval GI, allowed number of spatial streams N SS , the maximum length of frame aggregation allowed is L A-MPDU , the allowed bandwidth W;
[0043] In the embodiment of the present invention, t=1 second;
[0044] In one embodiment, the above step S3: using weighted empirical Bayes to accurately estimate the packet loss rate of beacon frames based on small sample beacon frame data, specifically includes:
[0045] Step S31: K kinds of AP load states are preset. According to the Bayesian statistical law, the packet loss rate θ in the jth state conforms to the following distribution, as shown in formulas (1) to (2):
[0046]
[0047]
[0048] Among them, aj , b j is a known parameter related to scene j; B(a j ,b j ) is the β function, ω is the variable;
[0049] Step S32: In the jth state, according to formula (3), calculate the number of x collected within time t i The probability of a beacon frame from a target AP is:
[0050]
[0051] Where n = t / t0 is the number of beacon frames sent by the AP within time t, C represents the combination number operation, and R, S, and T are variables;
[0052] Step S33: According to formula (4), based on a small number of collected beacon frames, use weighted empirical Bayes to calculate the accurate packet loss rate PLR:
[0053]
[0054] Wherein, K is the number of preset packet loss rate scenarios.
[0055] The embodiment of the present invention calculates the packet loss rate in each scenario by using the Bayesian method, and performs weighted summation on each result to obtain a corrected packet loss rate, wherein the weighted weight is the occurrence probability of each scenario.
[0056] In one embodiment, the above step S4: detecting the signal strength of the target AP, and calculating the theoretical transmission rate of the data frame based on the 802.11 modulation and coding strategy according to the relevant parameters of the beacon frame and the signal strength of the Wi-Fi network, specifically includes:
[0057] Step S41: Measure the signal strength P of the target AP rec ;
[0058] Step S42: According to the signal strength P rec , according to the signal-to-noise ratio calculation method, calculate the signal-to-noise ratio SNR of the current channel, as shown in formula (5):
[0059]
[0060] Where N is the noise power, and the power value that makes the predicted throughput result optimal in the test data is taken;
[0061] Step S43: According to SNR, 802.11 protocol version, guard interval GI, allowed number of spatial streams N SS , the allowed bandwidth W, and the corresponding data frame transmission rate Λ is obtained by querying the MCS table.
[0062] Figure 2 The coding strategy table MSC used.
[0063] In one embodiment, the above step S5: combining the packet loss rate of the beacon frame and the theoretical transmission rate of the data frame, estimating the actual transmission time of the data frame according to the 802.11 communication mechanism, and predicting the average achievable throughput after network access, specifically includes:
[0064] Step S51: Calculate the transmission time T of the data frame body according to Λ and the length of the data frame body frame , as shown in formula (6):
[0065]
[0066] Among them, L frame is the length of the data frame body;
[0067] Step S52: For the target AP, according to the 802.11 protocol communication mechanism, the transmission time t1 of a data frame can be calculated, as shown in formulas (7) to (9), and the additional time t2 consumed when congestion occurs can be calculated, as shown in formula (10):
[0068] For 802.11a / b / g, as shown in formula (7):
[0069] t1=DIFS+H phy +H mac +T frame +SIFS+T ACK (7)
[0070] For 802.11n / ac / ax, there is a frame aggregation mechanism, as shown in formulas (8) to (9):
[0071]
[0072]
[0073] The extra time consumed when congestion occurs is:
[0074] t2=t1+T bf (10)
[0075] Where, DIFS and SIFS in formula (7) are frame intervals, and H phy , H mac are the transmission time of the physical layer and MAC layer frame headers, T ACK is the transmission time of the response data packet;
[0076] n in formula (8) A-MPDU is the number of frames participating in frame aggregation, Lphy , L mac They are the length of the physical layer frame header and the MAC layer frame header respectively;
[0077] In formula (10), T bf is the average backoff time for sending congestion;
[0078] Step S53: Combine the packet loss rate PLR, t1 and t2 of the beacon frame to calculate the actual transmission time of an average data frame. As shown in formula (11):
[0079]
[0080] Here, i is the number of times a data frame conflicts before successful transmission.
[0081] Predict the achievable throughput THR after the terminal accesses the network, as shown in formula (12):
[0082]
[0083] In this step, the packet loss rate, the duration of data frame transmission, and the additional duration consumed when a conflict occurs are combined, and the transmission duration of the data frame is weighted by the packet loss rate to calculate the average duration consumed for a data packet transmission under the current channel conditions, and then calculate the achievable throughput after the terminal accesses the target AP.
[0084] The embodiment of the present invention tests the maximum download rate after the terminal is connected to the network and compares it with the predicted result. The test results are as follows:
[0085] The resulting cumulative distribution function is Figure 3 As shown in the figure, we can see that compared with other methods, weighted empirical Bayes introduces the impact of different scenarios on packet loss rate, and the throughput prediction results are more accurate, with about 85% of the data errors being less than or equal to 20%.
[0086] Figure 4 The influence of the number of prior scenarios and prediction duration in weighted empirical Bayes on the experimental results is demonstrated. It can be seen that as the number of scenarios increases, the number of prior scenarios considered in weighted empirical Bayes increases, the estimated packet loss rate is more accurate, and the final throughput prediction error is smaller. When the number of scenarios is greater than or equal to 6, the error result tends to converge and approaches the minimum value. In addition, as the prediction duration increases, the amount of beacon frame data captured by the terminal increases, and the error gradually decreases. After the introduction of weighted empirical Bayes, the minimum error result for a prediction duration of 1s is close to that for a prediction duration of 5s. Considering the low latency requirement, it can be considered feasible and meaningful to introduce weighted empirical Bayes to solve the throughput prediction problem under a prediction duration of 1s.
[0087] The present invention discloses a method for predicting the throughput of a wireless local area network based on a small sample beacon frame, which not only considers the signal strength factor of the AP, but also introduces the beacon frame as the basis for judging the degree of channel congestion, and corrects the small sample parameters through the weighted empirical Bayes method to estimate the network packet loss rate with low delay. In addition, the present invention introduces the packet loss rate as the weight of the transmission time under different conflict situations, combines the 802.11 communication mechanism, predicts the achievable throughput after the intelligent terminal accesses the AP, accurately evaluates the network communication quality of the target AP, and enables the terminal to better select the network.
[0088] Embodiment 2
[0089] like Figure 5 As shown, an embodiment of the present invention provides a wireless local area network throughput prediction system based on a small sample beacon frame, comprising the following modules:
[0090] The target AP search module 61 is used to use the terminal to perform network scanning and search for a target AP of an accessible Wi-Fi network;
[0091] The beacon frame collection module 62 is used to collect a small number of beacon frames from the target AP within time t, and read the parameters of the beacon frame: 802.11 protocol version, beacon frame interval t0, guard interval GI, allowed number of spatial streams N SS , the maximum allowed frame aggregation length L A-MPDU , the allowed bandwidth W;
[0092] A beacon frame packet loss rate calculation module 63 is used to calculate the beacon frame packet loss rate using weighted empirical Bayes with small sample data;
[0093] The data frame transmission rate calculation module 64 is used to detect the signal strength of the target AP, and calculate the theoretical transmission rate of the data frame based on the relevant parameters of the beacon frame and the signal strength of the Wi-Fi network and the 802.11 modulation and coding strategy;
[0094] The network throughput prediction module 65 is used to estimate the actual transmission time of the data frame based on the packet loss rate of the beacon frame and the theoretical transmission rate of the data frame according to the 802.11 communication mechanism, and predict the average achievable throughput after network access.
[0095] The above embodiments are provided only for the purpose of describing the present invention, and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the present invention should all be included within the scope of the present invention.
Claims
1. A wireless local area network throughput prediction method based on small sample beacon frames, characterized in that: include: Step S1: Use the terminal to perform network scanning to search for a target AP of an accessible Wi-Fi network; Step S2: At time Collect a small number of beacon frames from the target AP and read the parameters of the beacon frames: 802.11 protocol version, beacon frame interval , protection interval , the number of spatial streams allowed , the maximum length of the frame aggregation allowed , the allowed bandwidth ; Step S3: Based on the small sample beacon frame data, using weighted empirical Bayes to accurately estimate the packet loss rate of the beacon frame, specifically including: Step S31: Preset There are two packet loss rate distribution scenarios, namely AP load states, according to Bayesian statistical law, among which Packet loss rate under different load conditions It conforms to the following distribution, as shown in formulas (1) to (2): (1) (2) in, , For and scenes Relevant known parameters; for function, is a variable; Step S32: In the Under this load condition, according to formula (3), calculate the Collected within The probability of a beacon frame from a target AP is: (3) in, For time The number of beacon frames sent by the AP. represents combinatorial number operations, is a variable; Step S33: According to formula (4), based on a small number of collected beacon frames, use weighted empirical Bayes to calculate the accurate packet loss rate : (4) in, is the number of preset packet loss rate scenarios; Step S4: Detecting the signal strength of the target AP, and calculating the theoretical transmission rate of the data frame based on the 802.11 modulation and coding strategy according to the relevant parameters of the beacon frame and the signal strength of the Wi-Fi network, specifically including: Step S41: Measure the signal strength of the target AP ; Step S42: Based on the signal strength According to the signal-to-noise ratio calculation method, the signal-to-noise ratio of the current channel can be calculated , as shown in formula (5): (5) in, is the noise power, and takes the power value that makes the predicted throughput result optimal in the test data; Step S43: According to the SNR, the version of the 802.11 protocol, the protection interval , the number of spatial streams allowed , the allowed bandwidth , query the MCS table to get the theoretical transmission rate of the corresponding data frame ; Step S5: combining the packet loss rate of the beacon frame and the theoretical transmission rate of the data frame, and estimating the actual transmission time of the data frame according to the 802.11 communication mechanism, and predicting the average achievable throughput after network access, specifically including: Step S51: According to and the length of the data frame body, calculate the transmission time of the data frame body , as shown in formula (6): (6) in, is the length of the data frame body, is the theoretical transmission rate of the corresponding data frame; Step S52: For the target AP, according to the 802.11 protocol communication mechanism, the transmission duration of one data frame can be calculated. , as shown in formulas (7) to (9), and the additional time consumed when congestion occurs , as shown in formula (10): For 802.11a / b / g, as shown in formula (7): (7) For 802.11n / ac / ax, there is a frame aggregation mechanism, as shown in formulas (8) to (9): (8) (9) The extra time consumed when congestion occurs is: (10) Among them, in formula (7) , is the frame interval, , are the transmission duration of the physical layer and MAC layer frame headers, respectively. is the transmission time of the response data packet; In formula (8) is the number of frames participating in frame aggregation, , They are the length of the physical layer frame header and the MAC layer frame header respectively. The maximum length of the allowed frame aggregation; In formula (10) is the average backoff time for sending congestion; Step S53: Combine the packet loss rate of the beacon frame , and , calculate the average actual transmission time of one data frame , as shown in formula (11): (11) in, is the number of collisions that occurred before the data frame was successfully transmitted; Predict the achievable throughput of the terminal after accessing the network , as shown in formula (12): (12)。 2. A wireless local area network throughput prediction system based on small sample beacon frames, characterized in that: Includes the following modules: The target AP search module is used to use the terminal to perform network scanning and search for target APs of Wi-Fi networks that can be accessed; The beacon frame acquisition module is used to collect Collect a small number of beacon frames from the target AP and read the parameters of the beacon frames: 802.11 protocol version, beacon frame interval , protection interval , the number of spatial streams allowed , the maximum length of the frame aggregation allowed , the allowed bandwidth ; The module for calculating the packet loss rate of beacon frames is used to calculate the packet loss rate of the beacon frames using weighted empirical Bayes with small sample data, specifically including: Step S31: Preset There are two packet loss rate distribution scenarios, namely AP load states, according to Bayesian statistical law, among which Packet loss rate under different load conditions It conforms to the following distribution, as shown in formulas (1) to (2): (1) (2) in, , For and scenes Relevant known parameters; for function, is a variable; Step S32: In the Under this load condition, according to formula (3), calculate the Collected within The probability of a beacon frame from a target AP is: (3) in, For time The number of beacon frames sent by the AP. represents combinatorial number operations, is a variable; Step S33: According to formula (4), based on a small number of collected beacon frames, use weighted empirical Bayes to calculate the accurate packet loss rate : (4) in, is the number of preset packet loss rate scenarios; The data frame transmission rate calculation module is used to detect the signal strength of the target AP, and calculate the theoretical transmission rate of the data frame based on the 802.11 modulation and coding strategy according to the relevant parameters of the beacon frame and the signal strength of the Wi-Fi network, specifically including: Step S41: Measure the signal strength of the target AP ; Step S42: Based on the signal strength According to the signal-to-noise ratio calculation method, the signal-to-noise ratio of the current channel can be calculated , as shown in formula (5): (5) in, is the noise power, and takes the power value that makes the predicted throughput result optimal in the test data; Step S43: According to the SNR, the version of the 802.11 protocol, the protection interval , the number of spatial streams allowed , the allowed bandwidth , query the MCS table to get the theoretical transmission rate of the corresponding data frame ; The network throughput prediction module is used to estimate the actual transmission time of the data frame based on the packet loss rate of the beacon frame and the theoretical transmission rate of the data frame according to the 802.11 communication mechanism, and predict the average achievable throughput after network access, specifically including: Step S51: According to and the length of the data frame body, calculate the transmission time of the data frame body , as shown in formula (6): (6) in, is the length of the data frame body, is the theoretical transmission rate of the corresponding data frame; Step S52: For the target AP, according to the 802.11 protocol communication mechanism, the transmission duration of one data frame can be calculated. , as shown in formulas (7) to (9), and the additional time consumed when congestion occurs , as shown in formula (10): For 802.11a / b / g, as shown in formula (7): (7) For 802.11n / ac / ax, there is a frame aggregation mechanism, as shown in formulas (8) to (9): (8) (9) The extra time consumed when congestion occurs is: (10) Among them, in formula (7) , is the frame interval, , are the transmission duration of the physical layer and MAC layer frame headers, respectively. is the transmission time of the response data packet; In formula (8) is the number of frames participating in frame aggregation, , They are the length of the physical layer frame header and the MAC layer frame header respectively. The maximum length of the allowed frame aggregation; In formula (10) is the average backoff time for sending congestion; Step S53: Combine the packet loss rate of the beacon frame , and , calculate the average actual transmission time of one data frame , as shown in formula (11): (11) in, is the number of collisions that occurred before the data frame was successfully transmitted; Predict the achievable throughput of the terminal after accessing the network , as shown in formula (12): (12)。
