Identification model training method and device for wireless network terminal, identification method and device, equipment, storage medium and product
By constructing sample set data and training the LSTM model, feature data in wireless protocol frames are extracted to identify the type of wireless network terminals, and the problems of low identification efficiency and high computing overhead in the prior art are solved, achieving a more efficient and accurate recognition effect.
Patent Information
- Application Number
- CN202411993595.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, the type recognition efficiency of wireless network terminals is low, the real-time performance is poor, and the calculation overhead is high in high density environments, making it difficult to accurately identify the actual type of STA.
By constructing sample set data, including wireless protocol frames transmitted in the wireless network, extracting feature data such as MAC address, STA-PS mode and IE, selecting important features, and training the LSTM model to identify the type of wireless network terminal.
It improves the accuracy and processing efficiency of wireless network terminal type identification, reduces the requirements for AP performance, and avoids the risks of packet forgery and tampering.
Smart Images

Figure CN119939244A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to wireless network technology, and in particular to a recognition model training method, recognition method, device, equipment, storage medium and product of a wireless network terminal. Background Art
[0002] In a wireless network environment, a wireless access point (AP) needs to identify and classify the types of wireless network terminals (STAs, also known as stations) that access the network in order to perform network security protection, service quality optimization, resource allocation, and network policy adjustment based on the types of wireless network terminals identified.
[0003] In the related art, AP usually sniffs the message sent by STA and identifies the type of STA based on the characteristic fields in the collected message. However, the terminal identification method in the related art needs to rely on STA to send a specific message so that AP can collect the characteristic field that can be used to identify the terminal type, which has low identification efficiency and poor real-time performance; the message content is easy to be forged and tampered with, and AP may not be able to identify the actual type of STA; in a wireless network environment with high-density terminals, a large number of messages of multiple protocols need to be identified, which has a large computational overhead and places too high performance requirements on AP. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a recognition model training method, recognition method, device, equipment, storage medium and product for a wireless network terminal, aiming to improve the accuracy and processing efficiency of type recognition of wireless network terminals.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for training a wireless network terminal recognition model, the training method comprising:
[0007] Constructing sample set data, wherein the sample set data at least includes a wireless protocol frame transmitted in a wireless network;
[0008] Extracting features from the sample set data to obtain a feature data set of each wireless network terminal in the wireless network;
[0009] Performing feature selection on the feature data sets of each wireless network terminal to obtain a target feature set of each wireless network terminal;
[0010] A wireless network terminal recognition model is trained based on the target feature set of each wireless network terminal to obtain a trained wireless network terminal recognition model.
[0011] In the above solution, the feature extraction of the sample set data to obtain a feature data set of each wireless network terminal in the wireless network includes:
[0012] Based on the MAC address of the wireless network terminal carried by each sample data in the sample set data, each sample data is classified, and after classification, sample data of each wireless network terminal is obtained;
[0013] Extracting features from the sample data of each wireless network terminal to obtain a feature data set of each wireless network terminal;
[0014] Constructing the sample set data based on the wireless protocol frames transmitted in the wireless network and the network card information of each wireless network terminal in the wireless network;
[0015] The extracted characteristic data at least includes: a terminal power saving (Station Power Save, STA-PS) mode and information elements (Information Elements, IE).
[0016] In the above solution, the constructing of sample set data includes:
[0017] Constructing the sample set data based on the wireless protocol frames transmitted in the wireless network and the network card information of each wireless network terminal in the wireless network;
[0018] The sample data of the wireless network terminal also includes the network card information of the wireless network terminal; the extracted feature data also includes at least one of the following: a request to send threshold (RTS threshold) and a received signal strength indicator (RSSI).
[0019] In the above solution, the step of performing feature selection on the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal includes:
[0020] Performing standardization processing on each feature data in the feature data set to obtain a standardized feature data set;
[0021] Performing feature importance evaluation on each feature data in the standardized feature data set;
[0022] Based on the feature importance evaluation results of each feature data, the target feature data in each feature data set is determined to obtain a target feature set for each wireless network terminal.
[0023] In the above scheme, the feature importance evaluation of each feature data in the standardized feature data set includes:
[0024] Based on the random forest algorithm, performing feature importance evaluation on each feature data in the standardized feature data set; or,
[0025] Based on the L1 regularization algorithm, feature importance evaluation is performed on each feature data in the standardized feature data set.
[0026] In the above solution, the wireless network terminal recognition model is trained based on the target feature set to obtain the trained wireless network terminal recognition model, including:
[0027] The target feature set of each wireless network terminal is input into a long short-term memory network (LSTM) model, and the LSTM model is trained to obtain a trained wireless network terminal recognition model.
[0028] In a second aspect, an embodiment of the present application provides a method for identifying a wireless network terminal, the method comprising:
[0029] Acquire a wireless protocol frame sent by a wireless network terminal to be predicted;
[0030] Extracting features from the acquired wireless protocol frame to obtain a target feature set of the wireless network terminal to be predicted;
[0031] Inputting the target feature set of the wireless network terminal to be predicted into a wireless network terminal recognition model to obtain a type recognition result of the wireless network terminal to be predicted;
[0032] The wireless network terminal identification model is obtained by training based on a target feature set of each wireless network terminal in the wireless network, and the target feature set of each wireless network terminal is extracted from a wireless protocol frame transmitted in the wireless network.
[0033] In the above solution, the identification method further includes:
[0034] Acquire the network card information of the wireless network terminal to be predicted;
[0035] Perform feature extraction on the acquired network card information;
[0036] The step of obtaining the target feature set of the wireless network terminal to be predicted includes:
[0037] Based on the target feature data extracted from the acquired wireless protocol frame and network card information, a target feature set of the wireless network terminal to be predicted is obtained.
[0038] In a third aspect, an embodiment of the present application provides a training device for a wireless network terminal recognition model, the training device comprising:
[0039] A construction module, used to construct sample set data, wherein the sample set data at least includes a wireless protocol frame transmitted in a wireless network;
[0040] A first feature extraction module, configured to extract features from the sample set data to obtain a feature data set of each wireless network terminal in the wireless network;
[0041] A feature selection module, used to perform feature selection on the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal;
[0042] The model training module is used to train the wireless network terminal recognition model based on the target feature set of each wireless network terminal to obtain the trained wireless network terminal recognition model.
[0043] In a fourth aspect, an embodiment of the present application provides an identification device for a wireless network terminal, the identification device comprising:
[0044] An acquisition module, used for acquiring a wireless protocol frame sent by a wireless network terminal to be predicted;
[0045] A second feature extraction module is used to extract features from the acquired wireless protocol frame to obtain a target feature set of the wireless network terminal to be predicted;
[0046] The identification module is used to input the target feature set of the wireless network terminal to be predicted into the wireless network terminal identification model to obtain the type identification result of the wireless network terminal to be predicted.
[0047] In a fifth aspect, an embodiment of the present application provides a training device for a wireless network terminal recognition model, which is applied to an AP and includes: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the first aspect.
[0048] In a sixth aspect, an embodiment of the present application provides an identification device for a wireless network terminal, which is applied to an AP and includes: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the second aspect.
[0049] In a seventh aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described in the first aspect and the second aspect are implemented.
[0050] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first and second aspects.
[0051] The embodiment of the present application provides a training method for a wireless network terminal identification model, the method comprising: constructing sample set data, the sample set data at least including wireless protocol frames transmitted in the wireless network; performing feature extraction on the sample set data to obtain a feature data set of each wireless network terminal in the wireless network; performing feature selection on the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal; training a wireless network terminal identification model based on the target feature set of each wireless network terminal to obtain a trained wireless network terminal identification model. In this way, since there are obvious differences in the total number of feature data and the number of unique values of feature data carried by wireless protocol frames sent by various types of STAs, the wireless network terminal identification model obtained by training based on the wireless protocol frames sent by STAs in the embodiment of the present application can accurately identify the type of STA, feature extraction is not affected by the message format and content, and the wireless protocol frames will not be forged or tampered with, thereby improving the accuracy and processing efficiency of type identification of wireless network terminals. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of a method for training a wireless network terminal recognition model according to an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a flow chart of a method for identifying a wireless network terminal according to an embodiment of the present application;
[0054] Figure 3 A schematic diagram of the structure of a training device for a wireless network terminal recognition model according to an embodiment of the present application;
[0055] Figure 4 This is a schematic diagram of the structure of an identification device of a wireless network terminal according to an embodiment of the present application;
[0056] Figure 5 A schematic diagram of the structure of a training device for a wireless network terminal recognition model according to an embodiment of the present application;
[0057] Figure 6 This is a schematic diagram of the structure of an identification device of a wireless network terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0058] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0060] The present application embodiment provides a method for training a wireless network terminal recognition model, such as Figure 1 As shown, the method includes:
[0061] Step 101: construct sample set data, where the sample set data at least includes wireless protocol frames transmitted in a wireless network.
[0062] Step 102: extract features from the sample set data to obtain a feature data set of each wireless network terminal in the wireless network.
[0063] Step 103: Perform feature selection on the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal.
[0064] Step 104: training a wireless network terminal recognition model based on the target feature set of each wireless network terminal to obtain a trained wireless network terminal recognition model.
[0065] Here, the wireless network terminal identification model trained in the embodiment of the present application is applied to the AP, so that the AP can identify the type of the accessed STA.
[0066] It should be noted that in a wireless network environment, the AP needs to identify and classify the types of accessed STAs in order to perform network security protection, service quality optimization, resource allocation, and network policy adjustment according to the identified types of wireless network terminals.
[0067] In the related art, AP usually sniffs the message sent by STA and identifies the type of STA based on the characteristic fields in the collected message. However, the terminal identification method in the related art needs to rely on STA to send a specific message so that AP can collect the characteristic field that can be used to identify the terminal type, which has low identification efficiency and poor real-time performance; the message content is easy to be forged and tampered with, and AP may not be able to identify the actual type of STA; in a wireless network environment with high-density terminals, AP needs to identify a large number of messages of multiple protocols, which has a large computational overhead and places too high performance requirements on AP.
[0068] Here, the wireless protocol frame is specifically an 802.11 frame, also known as a Wifi frame, including three types of frames: control frame, management frame and data frame. It is the basic transmission unit in the wireless network and is used to establish access, exit, authentication and data transmission between STA and AP; the frame structure of the wireless protocol frame usually consists of nine parts: frame control (Frame Control), duration / identifier (Duration / ID), address 1 (Address1), address 2 (Address2), address 3 (Address3), sequence control (SequenceControl), address 4 (Address4), frame body (Frame Body) and frame check sequence (Frame Check Sequence, FCS).
[0069] It should be noted that since the wireless protocol frames sent by different types of STAs will carry different characteristic data, such as STA-PS mode and IE and other characteristic data, the embodiment of the present application trains a wireless network terminal recognition model based on the wireless protocol frames sent by the STA in the wireless network, so that the trained wireless network terminal recognition model classifies and identifies the type of STA based on the differences in the characteristic data carried by the wireless protocol frames.
[0070] Exemplarily, the training method further includes: acquiring a wireless protocol frame transmitted in the wireless network.
[0071] Here, the AP captures a large number of wireless protocol frames transmitted in the wireless network, and constructs a training sample set based on the captured wireless protocol frames.
[0072] Exemplarily, feature extraction is performed on sample set data to obtain a feature data set of each wireless network terminal in the wireless network, including: based on the MAC address of the wireless network terminal carried by each sample data in the sample set data, each sample data is classified to obtain sample data of each wireless network terminal; feature extraction is performed on the sample data of each wireless network terminal to obtain a feature data set of each wireless network terminal; wherein the extracted feature data includes at least: terminal power saving STA-PS mode and information element IE.
[0073] It should be noted that the address 2 field of the wireless protocol frame is used to carry the MAC address of the source STA. Based on the MAC address of the source STA carried by the wireless protocol frame, the AP can classify the captured wireless protocol frames. The sample data of each STA after classification includes the wireless protocol frames sent by the STA.
[0074] Here, if the training set samples include wireless protocol frames sent by the AP, the wireless protocol frames sent by the AP are removed from the training samples after classification.
[0075] It can be understood that after obtaining the classified sample data, feature data that can be used to train the wireless network terminal recognition model is extracted from the sample data of each STA, and a feature data set of each wireless network terminal is constructed. Here, the difference in feature data sets of different STAs is mainly reflected in the difference in the total amount of feature data and the difference in the numerical value of the feature data.
[0076] Here, the frame control field of the wireless protocol frame usually carries a STA-PS mode field to characterize the type of STA-PS mode and the current power mode of the STA. Since the types and numbers of STA-PS modes set by different STAs are different, the types of STAs can be classified based on the characteristic data of the STA-PS mode in the wireless protocol frames sent by different STAs.
[0077] Here, the management frame of the wireless protocol frame includes a probe request frame. The frame body of the probe request frame carries an information element IE with an unlimited field length. The IE includes one or more marking parameters related to STA information. The marking parameters include but are not limited to: service set identifier (SSID) parameter set, supported rates, extended supported rates, high throughput (HT) capability, specific vendors, interoperability, robust security network (RSN) information, AP channel report, direct sequence (DS) parameter set, extended function and very high throughput (VHT) function.
[0078] It is understandable that since the marking parameters carried by IE are adjustable, the number and types of marking parameters carried by IE in the detection request frames sent by different STAs are not the same. Based on the characteristic data of IE in the detection request frames sent by different STAs, the type of STA can be classified.
[0079] It can be understood that since the wireless protocol frames sent by STA carry multiple adjustable feature data related to STA information, there will be obvious differences in the total amount of feature data and the value of the feature data carried by the wireless protocol frames sent by different STAs, and the data carried by the wireless protocol frames will not be forged or tampered with. Training the wireless network terminal recognition model based on the feature data carried in the wireless protocol frames can improve the accuracy of STA type recognition.
[0080] It can be understood that since the wireless protocol frame has a fixed format, compared with the method of extracting the feature fields of the message sent by the STA in the related art, the embodiment of the present application extracts features from the wireless protocol frame sent by the STA, which is not restricted by the message format and message content of the STA, and there is no need to sniff and analyze a large amount of redundant and useless information carried in the message during the feature extraction process, so the feature extraction is simple and efficient; and the wireless protocol frame does not carry STA user data, so the privacy information of the STA user is protected during the feature extraction process, and is suitable for different types of wireless network environments and STAs, thereby improving data processing efficiency.
[0081] It should be noted that the feature data extracted from the sample data of each wireless network terminal is not limited to the STA-PS mode and IE extracted from the wireless protocol frame, and other adjustable and / or STA information-related feature data in the wireless protocol frame can also be extracted. The extractable feature data includes but is not limited to: frame type, frame sequence number, timing, beacon frame, Beacon period and delayed transmission indication map (Delivery Traffic Inication Map, DTIM).
[0082] It should be noted that in some embodiments, in addition to capturing wireless protocol frames transmitted in a wireless network for training a wireless network terminal recognition model, the wireless network terminal recognition model can also be trained using wireless protocol frames and network information by obtaining network card information of STAs in the wireless network.
[0083] Exemplarily, constructing sample set data includes: constructing sample set data based on wireless protocol frames transmitted in the wireless network and network card information of each wireless network terminal in the wireless network; wherein the sample data of the wireless network terminal also includes the network card information of the wireless network terminal; the extracted feature data also includes at least one of the following: RTS threshold and received signal strength indication RSSI.
[0084] Exemplarily, the training method further includes: acquiring network card information of a wireless network terminal in the wireless network.
[0085] It should be noted that the embodiment of the present application does not specifically limit the method for obtaining the network card information of the wireless network terminal in the wireless network. The AP can obtain the network card information of each STA in the wireless network by setting specific hardware and / or computer programs.
[0086] It should be noted that since the network card information also carries the MAC address of the STA, the network card information in the sample set data can also be classified based on the MAC address carried in the network card information. The sample data of each STA obtained includes at least the wireless protocol frame and network card information sent by the STA.
[0087] Here, the RTS threshold and RSSI can be extracted from the network card information of the STA.
[0088] It should be noted that the control frames of the wireless protocol frame include RTS frames and CTS (Clear to Send) frames. AP and STA perform data transmission based on the RTS / CTS handshake mechanism, which can avoid channel conflicts caused by synchronous data transmission of hidden nodes. In order to avoid frequent triggering of the RTS / CTS handshake mechanism and occupying too much channel bandwidth, the sender in the wireless network usually sets an RTS threshold, that is, when the length of the transmitted data frame exceeds the RTS threshold, the sender sends an RTS frame to the receiver before sending the data frame, and waits for the receiver's CTS frame confirmation.
[0089] It can be understood that the RTS threshold is an adjustable parameter. Different types of STAs have different configured RTS thresholds based on different functions and services. The types of STAs can be classified based on the RTS thresholds in the network card information of different STAs.
[0090] It should be noted that the RSSI value is related to factors such as the distance between the STA and the AP, obstacles, and the STA's receiving antenna gain. Due to the differences in the receiving antenna gain, distance to the AP, and obstacles on the propagation path of different STAs, the type of STA can be classified based on the RSSI in the network card information of different STAs.
[0091] It is understandable that since the STA's network card information is not easy to be forged or tampered with, and there is no need to sniff and analyze a large amount of redundant and useless information when extracting features from the network card information, and the network card information does not carry STA user data, the wireless network terminal recognition model is trained based on the wireless protocol frames and network card information sent by the STA, thereby improving the accuracy of STA type recognition and data processing efficiency.
[0092] It should be noted that the feature data extracted from the network card information of each wireless network terminal is not limited to the RTS threshold and RSSI, and other adjustable and / or STA information-related feature data can also be extracted. The extractable feature data includes but is not limited to: frequency, bandwidth, signal strength, noise strength and transmission rate.
[0093] Exemplarily, feature selection is performed on a feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal, including: standardizing each feature data in the feature data set to obtain a standardized feature data set; performing feature importance evaluation on each feature data in the standardized feature data set; and determining target feature data in each feature data set based on the feature importance evaluation result of each feature data to obtain a target feature set of each wireless network terminal.
[0094] Here, each feature data in the feature data set is standardized so that each feature data in the feature data set has the same scale, so as to facilitate subsequent selection of target feature data.
[0095] It can be understood that although each feature data in the feature data set of each STA is associated with the type of STA, the degree of contribution of each feature data to the classification of STA is not the same. The embodiment of the present application determines the degree of contribution of each feature data to the classification of STA by performing a feature importance evaluation on each feature data, and selects the target feature data based on the feature importance evaluation result for training the wireless network terminal recognition model, which can reduce the difficulty of model training, improve the efficiency of model training and the accuracy of the model in identifying the type of STA.
[0096] Exemplarily, performing feature importance evaluation on each feature data in the standardized feature data set includes: performing feature importance evaluation on each feature data in the standardized feature data set based on a random forest algorithm; or performing feature importance evaluation on each feature data in the standardized feature data set based on an L1 regularization algorithm.
[0097] Here, the Random Forest algorithm is an ensemble learning algorithm based on the decision tree as the base learner, which can be used to evaluate the importance of features to quantitatively describe the contribution of feature data to classification or regression. For example, the Mean Decrease Impurity (MDI) algorithm and the Mean Decrease Accuracy (MDA) algorithm based on the Random Forest algorithm evaluate the importance of feature data to obtain the information gain of each feature data.
[0098] It can be understood that the information gain of each feature data calculated based on the random forest algorithm can intuitively reflect the contribution of each feature data to the classification of STA, so as to indicate the selection of target feature data.
[0099] Here, the L1 regularization algorithm adds a penalty term for the absolute value of the model parameters in the loss function, which prompts the weight of the feature data that contributes to the classification of STA to be set to zero or close to zero, thereby evaluating the feature importance of the feature data, reducing the number of target feature data used for model training, improving the efficiency of model training, and correcting the deviation of the feature data with the largest unique value to prevent the model from overfitting during training.
[0100] It should be noted that the above-mentioned method of performing feature importance evaluation on each feature data in a standardized feature data set based on the random forest algorithm or the L1 regularization algorithm is only some specific examples of the feature importance evaluation method provided in the embodiments of the present application. The embodiments of the present application do not specifically limit the feature importance evaluation method. The target feature set obtained by using other feature importance evaluation methods or feature selection methods can also be used to train the wireless network terminal recognition model.
[0101] Exemplarily, training a wireless network terminal recognition model based on a target feature set to obtain a trained wireless network terminal recognition model includes: inputting the target feature set of each wireless network terminal into a long short-term memory network LSTM model, training the LSTM model, and obtaining a trained wireless network terminal recognition model.
[0102] Here, the target feature set of each STA is specifically target feature sequence data.
[0103] Here, the LSTM model is a recurrent neural network (RNN) model for sequence data processing, which has memory units and can capture long-term dependencies in sequence data.
[0104] It can be understood that the embodiment of the present application uses the LSTM model as the base model, takes the target training set of each STA as the model input, takes the type recognition result of the STA as the model output, trains the LSTM, and obtains the trained wireless network terminal recognition model.
[0105] It should be noted that obtaining a wireless network terminal identification model based on training an LSTM model is only a specific example provided in the embodiment of the present application. The embodiment of the present application does not specifically limit the structure and form of the base model used to train the wireless network terminal identification model.
[0106] The present application also provides a method for identifying a wireless network terminal. Figure 2 As shown, the identification method includes:
[0107] Step 201: Acquire a wireless protocol frame sent by a wireless network terminal to be predicted.
[0108] Here, the wireless network terminal to be predicted is a STA newly accessing the AP. During the STA access process, the AP obtains the wireless protocol frame sent by the STA.
[0109] Step 202: extract features from the acquired wireless protocol frames to obtain a target feature set of the wireless network terminal to be predicted.
[0110] Here, the target feature set of the wireless network terminal to be predicted is specifically target feature sequence data, which at least includes target feature data extracted from the wireless protocol frame sent by the wireless network terminal to be predicted, such as feature data such as STA-PS mode and IE.
[0111] Step 203: input the target feature set of the wireless network terminal to be predicted into the wireless network terminal recognition model to obtain the type recognition result of the wireless network terminal to be predicted.
[0112] The wireless network terminal identification model is trained based on a target feature set of each wireless network terminal in the wireless network, and the target feature set of each wireless network terminal is extracted from a wireless protocol frame transmitted in the wireless network.
[0113] In some embodiments, the wireless network terminal recognition model used to generate the type recognition result of the wireless network terminal to be predicted in step 203 can be trained based on the training method of the wireless network terminal recognition model described above in the embodiments of the present application.
[0114] It should be noted that, in some embodiments, the training set data constructed when training the wireless network terminal recognition model includes not only the wireless protocol frames captured from the wireless network, but also the network card information of the STA. If the wireless network terminal recognition model is trained based on the target feature data in the wireless protocol frames and the network card information, the wireless network terminal recognition method of the embodiment of the present application also includes: obtaining the network card information of the wireless network terminal to be predicted; and performing feature extraction on the obtained network card information.
[0115] Exemplarily, obtaining a target feature set of the wireless network terminal to be predicted includes: obtaining the target feature set of the wireless network terminal to be predicted based on target feature data extracted from the acquired wireless protocol frame and network card information.
[0116] Here, the type and range of the extracted target feature data may be determined based on the feature selection result of step 103 .
[0117] In some embodiments, in order to improve the accuracy of identifying the type of wireless network terminals, before obtaining the target feature set of the wireless network terminal to be predicted, the identification method includes: performing standardization processing on the extracted target feature data.
[0118] It should be noted that in order to improve the type recognition accuracy and generalization ability of the wireless network terminal recognition model trained by the aforementioned training method, when the wireless network terminal recognition model is used to identify the type of STA, the output results of the wireless network terminal recognition model can be verified and evaluated, and the hyperparameters of the wireless network terminal recognition model such as the learning rate, batch size, and number of units in the LSTM layer can be adjusted and optimized based on the verification and evaluation results.
[0119] It should be noted that in order to improve the type recognition accuracy and generalization ability of the wireless network terminal recognition model trained by the aforementioned training method, data enhancement means can also be used to transform, rotate and crop the obtained target feature set, and optimize the wireless network terminal recognition model based on the obtained new target feature set training. It can be understood that the wireless network terminal recognition method provided in the embodiment of the present application only needs to collect the wireless protocol frame and / or network card information sent by the wireless network terminal to be predicted. The feature data extraction is simple and direct and not easy to forge and tamper with. There is no need to sniff and analyze a large amount of useless redundant information. The extracted target feature data does not involve user data, and the performance requirements for the AP are low. While protecting the privacy information of STA users, the accuracy and efficiency of STA category recognition are improved.
[0120] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a training device for a wireless network terminal recognition model. The training device corresponds to the above training method, and each step in the above training method embodiment is also fully applicable to the present device embodiment. Figure 3 As shown, the embodiment of the present application provides a training device for a wireless network terminal recognition model, and the training device includes: a construction module 301, a first feature extraction module 302, a feature selection module 303 and a model training module 304. The construction module 301 is used to construct sample set data, and the sample set data at least includes a wireless protocol frame transmitted in the wireless network; the first feature extraction module 302 is used to extract features from the sample set data to obtain a feature data set of each wireless network terminal in the wireless network; the feature selection module 303 is used to select features from the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal; the model training module 304 is used to train the wireless network terminal recognition model based on the target feature set of each wireless network terminal to obtain a trained wireless network terminal recognition model.
[0121] In some embodiments, the first feature extraction module 302 is specifically used to: classify each sample data based on the MAC address of the wireless network terminal carried by each sample data in the sample set data, and obtain the sample data of each wireless network terminal after classification; extract features from the sample data of each wireless network terminal to obtain a feature data set of each wireless network terminal. The extracted feature data at least includes: STA-PS mode and IE.
[0122] In some embodiments, the construction module 301 is specifically used to: construct sample set data based on the wireless protocol frames transmitted in the wireless network and the network card information of each wireless network terminal in the wireless network. The sample data of the wireless network terminal also includes the network card information of the wireless network terminal; the extracted feature data also includes at least one of the following: RTS threshold and RSSI.
[0123] In some embodiments, the feature selection module 303 is specifically used to: standardize each feature data in the feature data set to obtain a standardized feature data set; perform feature importance evaluation on each feature data in the standardized feature data set; based on the feature importance evaluation results of each feature data, determine the target feature data in each feature data set to obtain the target feature set of each wireless network terminal.
[0124] In some embodiments, the feature selection module 303 is specifically used to: perform feature importance evaluation on each feature data in the standardized feature data set based on a random forest algorithm; or, perform feature importance evaluation on each feature data in the standardized feature data set based on an L1 regularization algorithm.
[0125] In some embodiments, the feature selection module 303 is specifically used to: input the target feature set of each wireless network terminal into the LSTM model, train the LSTM model, and obtain a trained wireless network terminal recognition model.
[0126] It should be noted that the training device provided in the above embodiment is only illustrated by the division of the above program modules when performing training. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the training device provided in the above embodiment and the training method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0127] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an identification device for a wireless network terminal, which corresponds to the above identification method, and each step in the above identification method embodiment is also completely applicable to the embodiment of the device. Figure 4 As shown, an embodiment of the present application provides a wireless network terminal identification device, which includes: an acquisition module 401, a second feature extraction module 402 and an identification module 403. The acquisition module 401 is used to acquire a wireless protocol frame sent by a wireless network terminal to be predicted. The second feature extraction module 402 is used to extract features from the acquired wireless protocol frame to obtain a target feature set of the wireless network terminal to be predicted. The identification module 403 is used to input the target feature set of the wireless network terminal to be predicted into a wireless network terminal identification model to obtain a type identification result of the wireless network terminal to be predicted. Among them, the wireless network terminal identification model is trained based on the target feature set of each wireless network terminal in the wireless network, and the target feature set of each wireless network terminal is extracted from the wireless protocol frame transmitted in the wireless network.
[0128] In some embodiments, the acquisition module 401 is further used to: acquire network card information of the wireless network terminal to be predicted.
[0129] In some embodiments, the second feature extraction module 402 is further used to: extract features from the acquired network card information.
[0130] In some embodiments, the second feature extraction module 402 is specifically used to obtain a target feature set of the wireless network terminal to be predicted based on the target feature data extracted from the acquired wireless protocol frame and network card information.
[0131] It should be noted that the recognition device provided in the above embodiment only uses the division of the above program modules as an example when performing recognition. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the recognition device and the recognition method embodiment provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0132] Here, the above-mentioned training device and recognition device are both applied to AP.
[0133] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a training device for a wireless network terminal recognition model. Figure 5 Only an exemplary structure of the training device is shown, not all structures, and can be implemented as needed. Figure 5 Partial or complete structure shown.
[0134] like Figure 5 As shown, the training device 500 for wireless network terminal recognition model provided by the embodiment of the present application includes: at least one processor 501, a memory 502, a user interface 503 and at least one network interface 504. The various components in the training device 500 are coupled together through a bus system 505. It can be understood that the bus system 505 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 5 Various buses are labeled as bus system 505 .
[0135] The user interface 503 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0136] The memory 502 in the embodiment of the present application is used to store various types of data to support the operation of the training device 500. Examples of such data include: any computer program used to operate on the training device 500.
[0137] The training method disclosed in the embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the training method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above-mentioned processor 501 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 501 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 502, and the processor 501 reads the information in the memory 502, and completes the steps of the training method provided in the embodiment of the present application in combination with its hardware.
[0138] In an exemplary embodiment, the training device 500 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), FPGA, general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned training method.
[0139] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an identification device for a wireless network terminal. Figure 6 Only an exemplary structure of the wireless network terminal identification device is shown, not all structures, and it can be implemented as needed. Figure 6 Partial or complete structure shown.
[0140] like Figure 6As shown, the identification device 600 of the wireless network terminal provided in the embodiment of the present application includes: at least one processor 601, a memory 602, a user interface 603 and at least one network interface 604. The various components in the identification device 600 are coupled together through a bus system 605. It can be understood that the bus system 605 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 605 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 6 Various buses are labeled as bus system 605 .
[0141] The user interface 603 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0142] The memory 602 in the embodiment of the present application is used to store various types of data to support the operation of the recognition device 600. Examples of such data include: any computer program used to operate on the recognition device 600.
[0143] The identification method disclosed in the embodiment of the present application can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the identification method can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above-mentioned processor 601 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 601 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 602, and the processor 601 reads the information in the memory 602, and completes the steps of the identification method provided in the embodiment of the present application in combination with its hardware.
[0144] In an exemplary embodiment, the identification device 600 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general processors, controllers, MCUs, Microprocessors or other electronic components to execute the aforementioned wireless network terminal identification method.
[0145] It can be understood that the memory 502, 602 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an EEPROM, a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.
[0146] Here, the training device 500 and the identification device 600 are applied to the AP and may be subordinate sub-devices of the AP.
[0147] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, which can be a computer-readable storage medium, for example, a memory 502 storing a computer program, which can be executed by a processor 501 of a training device 500 to complete the steps described in the training method of the present application embodiment; for example, a memory 602 storing a computer program, which can be executed by a processor 601 of an identification device 600 to complete the steps described in the wireless network terminal identification method of the present application embodiment. The computer-readable storage medium can be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.
[0148] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the processor 501 of the training device 500 to complete the steps described in the method of the embodiment of the present application; the computer program can be executed by the processor 601 of the identification device 600 to complete the steps described in the method of the embodiment of the present application.
[0149] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0150] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0151] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for training a wireless network terminal recognition model, characterized in that: The training method comprises: Constructing sample set data, wherein the sample set data at least includes a wireless protocol frame transmitted in a wireless network; Extracting features from the sample set data to obtain a feature data set of each wireless network terminal STA in the wireless network; Performing feature selection on the feature data sets of each wireless network terminal to obtain a target feature set of each wireless network terminal; A wireless network terminal recognition model is trained based on the target feature set of each wireless network terminal to obtain a trained wireless network terminal recognition model.
2. The training method according to claim 1, characterized in that: The extracting features from the sample set data to obtain a feature data set of each wireless network terminal in the wireless network includes: Based on the MAC address of the wireless network terminal carried by each sample data in the sample set data, each sample data is classified, and after classification, sample data of each wireless network terminal is obtained; Extracting features from the sample data of each wireless network terminal to obtain a feature data set of each wireless network terminal; The extracted characteristic data at least includes: a terminal power saving STA-PS mode and an information element IE.
3. The training method according to claim 2, characterized in that: The constructing of sample set data includes: Constructing the sample set data based on the wireless protocol frames transmitted in the wireless network and the network card information of each wireless network terminal in the wireless network; The sample data of the wireless network terminal also includes the network card information of the wireless network terminal; the extracted characteristic data also includes at least one of the following: a request to send RTS threshold and a received signal strength indication RSSI.
4. The training method according to claim 1, characterized in that: The performing feature selection on the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal includes: Performing standardization processing on each feature data in the feature data set to obtain a standardized feature data set; Performing feature importance evaluation on each feature data in the standardized feature data set; Based on the feature importance evaluation results of each feature data, the target feature data in each feature data set is determined to obtain a target feature set for each wireless network terminal.
5. The training method according to claim 4, characterized in that: The step of evaluating the importance of each feature data in the standardized feature data set includes: Based on the random forest algorithm, performing feature importance evaluation on each feature data in the standardized feature data set; or, Based on the L1 regularization algorithm, feature importance evaluation is performed on each feature data in the standardized feature data set.
6. The training method according to claim 1, characterized in that: The step of training the wireless network terminal recognition model based on the target feature set to obtain the trained wireless network terminal recognition model includes: The target feature set of each wireless network terminal is input into a long short-term memory network LSTM model, and the LSTM model is trained to obtain a trained wireless network terminal recognition model.
7. A method for identifying a wireless network terminal, characterized in that: The identification method comprises: Acquire a wireless protocol frame sent by a wireless network terminal to be predicted; Extracting features from the acquired wireless protocol frame to obtain a target feature set of the wireless network terminal to be predicted; Inputting the target feature set of the wireless network terminal to be predicted into a wireless network terminal recognition model to obtain a type recognition result of the wireless network terminal to be predicted; The wireless network terminal identification model is trained based on a target feature set of each wireless network terminal in the wireless network, and the target feature set of each wireless network terminal is extracted from a wireless protocol frame transmitted in the wireless network.
8. The identification method according to claim 7, characterized in that: The method further comprises: Acquire the network card information of the wireless network terminal to be predicted; Perform feature extraction on the acquired network card information; The step of obtaining the target feature set of the wireless network terminal to be predicted includes: Based on the target feature data extracted from the acquired wireless protocol frame and network card information, a target feature set of the wireless network terminal to be predicted is obtained.
9. A training device for a wireless network terminal recognition model, characterized in that: The training device comprises: A construction module, used to construct sample set data, wherein the sample set data at least includes a wireless protocol frame transmitted in a wireless network; A first feature extraction module is used to extract features from the sample set data to obtain a feature data set of each wireless network terminal STA in the wireless network; A feature selection module, used to perform feature selection on the feature data set of each wireless network terminal to obtain a target feature set of each wireless network terminal; The model training module is used to train the wireless network terminal recognition model based on the target feature set of each wireless network terminal to obtain the trained wireless network terminal recognition model.
10. An identification device for a wireless network terminal, characterized in that: The identification device comprises: An acquisition module, used for acquiring a wireless protocol frame sent by a wireless network terminal to be predicted; A second feature extraction module is used to extract features from the acquired wireless protocol frame to obtain a target feature set of the wireless network terminal to be predicted; An identification module, used for inputting a target feature set of the wireless network terminal to be predicted into a wireless network terminal identification model to obtain a type identification result of the wireless network terminal to be predicted; The wireless network terminal identification model is trained based on a target feature set of each wireless network terminal in the wireless network, and the target feature set of each wireless network terminal is extracted from a wireless protocol frame transmitted in the wireless network.
11. A training device for a wireless network terminal recognition model, characterized in that: The training device is applied to a wireless access point AP, and comprises: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method according to any one of claims 1 to 6.
12. An identification device for a wireless network terminal, characterized in that: The identification device is applied to a wireless access point, and comprises: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of the method according to any one of claims 7 to 8 when running the computer program.
13. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Wireless network environment scene classification and sub-classification method and system and storage medium
CN116127380A