Hidden WiFi device area positioning method and system based on channel state information
Through feature extraction and area recognition model based on channel state information, combined with the user's still-turning action, the problems of high positioning cost and complex operation of hidden WiFi devices in the prior art are solved, and the low-cost and reliable positioning effect is achieved. Used by ordinary users.
Patent Information
- Application Number
- CN202411081640.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-24
AI Technical Summary
The existing hidden WiFi device positioning methods are costly, complex in operation, and are easily interfered with technologies such as traffic filling, making it difficult to accurately locate in an independent local area network without active connection.
Using a method based on channel state information (CSI), network and area recognition models are extracted through feature extraction, CSI data is collected in combination with the user's still-turning action, and voting algorithm combines the recognition results for positioning, achieving low-cost and high-reliability hidden WiFi Equipment area positioning.
It provides a low-priced, high-reliability and strong operational positioning method for hidden WiFi devices, which can quickly and accurately locate hidden WiFi devices without additional equipment, avoid traffic filling interference, and is suitable for ordinary users.
Smart Images

Figure CN119179939A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer science and technology, and relates to a method and system for locating a WiFi device area, and in particular to a method and system for locating a hidden WiFi device area based on channel state information. Background Art
[0002] The rapid development of WiFi has made the installation and use of WiFi devices more and more convenient. However, this has also allowed some criminals to use WiFi devices, such as cameras, eavesdroppers and other WiFi sensor surveillance devices, to infringe on citizens' personal privacy and threaten the safety of life and property. There are many relatively mature methods for detecting hidden WiFi devices through traffic analysis, but the location of hidden WiFi devices is still a challenge.
[0003] The existing positioning methods mainly include methods based on traffic characteristics and methods based on physical characteristics. The method based on traffic characteristics mainly changes the traffic characteristics of WiFi devices through certain stimuli, such as the stimulation of activities on cameras and the stimulation of sounds on eavesdroppers. Positioning is performed by observing and analyzing the mapping relationship between such characteristics and positions, but this method is limited by the variable bit rate encoding method and is easily resisted by technologies such as traffic filling. The method based on physical characteristics mainly uses dedicated equipment to observe suspicious thermal radiation or electromagnetic radiation to locate hidden devices. The first weakness of this method is the high cost. In order to obtain high-quality radiation information for accurate positioning, the equipment must be relatively expensive professional equipment, which is generally unaffordable for users; the second weakness is that the user burden is relatively heavy. For example, the detection of suspicious electromagnetic radiation requires the distance between the detection device and the hidden device to be at the centimeter level, which requires users to carefully scan every corner with the device, which requires users to make great efforts, and high positions such as the ceiling may not be scanned.
[0004] Therefore, for users who do not have rich experience, it is very necessary to provide a low-cost, highly reliable, highly operable and time-saving hidden WiFi device positioning method. Channel state information (CSI) is a type of data that can be extracted from WiFi data packets. It can reflect channel changes and is not affected by changes in traffic filling. It can be easily obtained using a smartphone without adding additional costs to users. However, existing CSI-based positioning methods generally require multiple detectors to actively connect to the located device, which is not suitable for locating hidden WiFi devices because these hidden WiFi devices may be in a hidden independent LAN that the detection device cannot access. Summary of the invention
[0005] In view of the limitations of the above traditional hidden WiFi device positioning methods and the limitations of the network in our passive positioning of hidden WiFi devices, the present invention provides a hidden WiFi device area positioning method and system based on channel state information, which is low-cost, highly reliable, highly operable and time-saving.
[0006] The technical solution adopted by the method of the present invention is: a method for locating the area of hidden WiFi devices based on channel state information, collecting (channel state information, CSI) data in different directions, using a feature extraction network to extract regional features, and using a trained regional recognition model to identify whether the data comes from a (line of sight, LOS) area, and using a voting algorithm to obtain a combination of recognition results in different directions to determine the area where the WiFi device is located;
[0007] The feature extraction network consists of 5 neural network layers, wherein the first layer is Conv2D+ReLu, the second layer is BN+Pooling, the third layer is Conv2D+ReLu, the fourth layer is BN+Pooling, and the fifth layer is Dropout; wherein Conv2d represents a two-dimensional convolutional layer, ReLu is a nonlinear rectification activation function, BN represents a batch normalization layer, Pooling represents a pooling layer, and Dropout represents a Dropout layer;
[0008] The region recognition model consists of three neural network layers, wherein the first layer is Dense+ReLu, the second layer is Dropout, and the third layer is Dense+Sigmoid; wherein Dense represents a fully connected layer, and Sigmoid represents an activation function.
[0009] Preferably, the training process of the trained region recognition model comprises the following steps:
[0010] Step 1: Enable the network card monitoring mode;
[0011] Step 2: Collect channel state information (CSI) data in four mutually perpendicular directions in turn;
[0012] Step 3: Extract CSI data collected in different directions from the collected raw data and perform preprocessing;
[0013] Step 4: Extract regional features using feature extraction network;
[0014] Step 5: Based on the extracted regional features, train the region recognition model to obtain a trained region recognition model.
[0015] Preferably, in step 1, the root permission of the monitoring device is enabled, and then the mode of the network card is set to monitoring mode.
[0016] Preferably, in step 2, when collecting CSI data, the user holds the monitoring device and performs four "standstill-turn" actions, then the user returns to the original direction and completes a CSI data collection, and the collected WiFi data packets are grouped according to the MAC address.
[0017] Preferably, in step 3, for each set of data collected, the Pearson correlation coefficients of adjacent CSI measurement values are first calculated to obtain a one-dimensional correlation coefficient array; then, a Hampel filter is used to replace abnormal values in the four segments of data.
[0018] Preferably, in step 5, the data in the four directions are marked with 1 or 0 respectively, the data collected in the LOS area is marked as 1, and the data not collected in the LOS area is marked as 0; then a classifier based on a fully connected layer is used to train the model to obtain a trained area recognition model.
[0019] Preferably, the area where the hidden WiFi device corresponding to the MAC address of the data is located is determined according to a pre-specified reasonable combination;
[0020] If the number of recognition results 1 is not less than half of the number of data in this direction, it is determined to be in the LOS area; if the number of recognition results 1 is less than half of the number of data in this direction, it is determined to be not in the LOS area. Finally, the judgment combination of four directions is obtained;
[0021] The reasonable combinations obtained by logical reasoning are (1,1,1,0), (1,1,0,0), (1,1,1,1) and (0,0,0,0); the first combination means that three consecutive directions are judged to be in the LOS area, which means that the WiFi device is in the second area judged to be in the LOS area; the second combination means that two consecutive directions are judged to be in the LOS area, which means that the WiFi device is at the intersection of the two areas judged to be in the LOS area; the third is that all four directions are judged to be in the LOS area, which means that the WiFi device is in the area directly above the detection device; the fourth is that all four directions are judged not to be in the LOS area, which means that the WiFi device is completely blocked by obstacles and may be on the other side of the wall; other combinations are considered illegal combinations and meaningless.
[0022] The technical solution adopted by the system of the present invention is: a hidden WiFi device area positioning system based on channel state information, characterized in that it includes:
[0023] one or more processors;
[0024] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the hidden WiFi device area positioning method based on channel state information.
[0025] Compared with the prior art, the advantages of the present invention are mainly reflected in the following aspects:
[0026] (1) The present invention designs a hidden WiFi device area positioning method based on channel state information, which can fundamentally solve the disadvantages of traditional positioning methods being interfered by technologies such as traffic filling.
[0027] (2) The present invention designs a data collection method and an area determination method that combines human activities. The method enables the detector to be located in the LOS area of the hidden device WiFi transmission and out of the LOS area respectively by turning the user. According to the determination results in different directions, the hidden area of the WiFi device is located by comparing the effective combination.
[0028] (3) The present invention can be easily deployed on smartphones and other embedded platforms without the cost of additional equipment, and users can quickly and accurately implement positioning without any experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The technical solution of the present invention is further described below using embodiments and specific implementation methods. In addition, in the process of describing the technical solution, some drawings are also used. For those skilled in the art, other drawings and the intention of the present invention can also be obtained based on these drawings without paying creative work.
[0030] Figure 1 It is a schematic diagram of a method flow of an embodiment of the present invention.
[0031] Figure 2 Schematic diagram of a feature extraction network according to an embodiment of the present invention.
[0032] Figure 3 Schematic diagram of a region identification model network according to an embodiment of the present invention.
[0033] Figure 4 It is a schematic diagram of data collection used in the experiment of the present invention. DETAILED DESCRIPTION
[0034] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0035] Please see Figure 1, This embodiment provides a hidden WiFi device area positioning method based on channel state information, firstly collects channel state information (CSI) data in different directions, then uses a feature extraction network to extract regional features, then uses a trained regional recognition model to identify whether the data comes from the LOS area, and finally uses a voting algorithm to obtain a combination of recognition results in four different directions to determine the area where the WiFi device is located;
[0036] Please see Figure 2 In one embodiment, the feature extraction network is composed of 5 neural network layers, wherein the first layer is Conv2D+ReLu, the second layer is BN+Pooling, the third layer is Conv2D+ReLu, the fourth layer is BN+Pooling, and the fifth layer is Dropout; wherein Conv2d represents a two-dimensional convolutional layer, ReLu is a nonlinear rectification activation function, BN represents a batch normalization layer, Pooling represents a pooling layer, and Dropout represents a Dropout layer;
[0037] Please see Figure 3 In one embodiment, the region recognition model is composed of three neural network layers, wherein the first layer is Dense+ReLu, the second layer is Dropout, and the third layer is Dense+Sigmoid; wherein Dense represents a fully connected layer, and Sigmoid represents an activation function.
[0038] In one embodiment, the feature extraction network and the region recognition model are trained models, and the model structure used when the two models are trained together is shown in Table 1 below:
[0039] Table 1
[0040]
[0041] After training the model, the first five layers are used as feature extraction models, and the output of the fifth layer is used as the extracted features; the last three layers are used as region recognition models, and the output of the eighth layer is the probability of being a LOS region.
[0042] In this embodiment, after the device data is acquired and preprocessed, each CSI measurement value of the data in the four directions is input into the feature extraction network to extract the regional features, and a value, i.e., 1 or 0, is output for each CSI measurement value of the data in each direction using the trained model. If the number of recognition results 1 is not less than half of the number of data in this direction, it is determined to be within the LOS area; if the number of recognition results 1 is less than half of the number of data in this direction, it is determined to be not within the LOS area; and finally, a judgment combination of the four directions is obtained, such as (1,1,1,0). The reasonable combinations obtained by logical reasoning are (1,1,1,0), (1,1,0,0), (1,1,1,1) and (0,0,0,0); the first combination means that three consecutive directions are judged to be in the LOS area, which means that the WiFi device is in the second area judged to be in the LOS area; the second combination means that two consecutive directions are judged to be in the LOS area, which means that the WiFi device is at the intersection of the two areas judged to be in the LOS area; the third is that all four directions are judged to be in the LOS area, which means that the WiFi device is in the area directly above the detection device; the fourth is that all four directions are judged not to be in the LOS area, which means that the WiFi device is completely blocked by obstacles and may be on the other side of the wall; other combinations are considered illegal combinations and meaningless.
[0043] In one embodiment, the training process of the trained region recognition model includes the following steps:
[0044] Step 1: Enable the network card monitoring mode;
[0045] In one implementation, it is necessary to enable the root permission of the monitoring device and then set the network card mode to monitoring mode. This mode allows the monitoring device to capture WiFi data packets in the surrounding space without connecting to the local area network.
[0046] Step 2: Collect channel state information (CSI) data in four mutually perpendicular directions in turn;
[0047] In one embodiment, when collecting CSI data, the user holds the monitoring device in front of the chest and performs four "standstill-turn" actions, which means turning 90 degrees to the right after about 5 seconds of standstill; after these four "standstill-turn" actions, the user returns to the original direction and completes a CSI data collection. The collected WiFi data packets are grouped according to the MAC address.
[0048] Step 3: Extract CSI data collected in different directions from the collected raw data and perform preprocessing;
[0049] In one embodiment, for each set of data collected, the Pearson correlation coefficient of adjacent CSI measurement values is first calculated to obtain a one-dimensional correlation coefficient array. Since the correlation coefficient of the turning action is less than 0.9, four segments of data collected when the user is stationary and facing different directions can be extracted based on the correlation coefficient array; then the Hampel filter is used to replace the abnormal values of these four segments of data.
[0050] Step 4: Extract regional features using feature extraction network;
[0051] In one embodiment, each CSI measurement value of data in four directions is input into a feature extraction network to extract regional features.
[0052] Step 5: Based on the extracted regional features, train the region recognition model to obtain a trained region recognition model.
[0053] In one embodiment, the data in four directions are marked with 1 or 0 respectively, the data collected in the LOS area is marked as 1, and the data not collected in the LOS area is marked as 0; then a classifier based on a fully connected layer is used to train the model to obtain a region recognition model.
[0054] The present invention is further described below through specific experiments.
[0055] The floor plan of the room for this experiment is as follows Figure 4 As shown in the figure, the WiFi devices include nine devices of two types, routers and WiFi cameras, as hidden WiFi devices. The WiFi devices work in the 2.4G frequency band with a bandwidth of 20M. The regional positioning method is deployed on a Nexus 5 mobile phone as a detector. Its network card is set to monitoring mode to collect WiFi data packets sent by hidden WiFi devices and extract CSI from them.
[0056] Experimental process. Figure 4 As shown, the tester selected a position in the room, held the detector in front of his chest, started the data collection process, stood still for about 5 seconds, then turned 90 degrees to the right, then stood still for 5 seconds, turned 90 degrees to the right, and repeated it twice, then the body returned to the original facing direction, and the data collection process stopped at the same time. Each device collected data 10 times.
[0057] Evaluation indicators. Area localization probability (ALP) is used as the evaluation indicator of the experiment. It represents the proportion of the number of times N where the hidden WiFi device is correctly identified in M trials. The specific definition is as follows:
[0058]
[0059] Experimental results. The data of each device was used as training data to train a region recognition model, and the data of the remaining devices were used as test data. The test results are shown in Table 2.
[0060] Table 2 Experimental results
[0061]
[0062] The experimental results prove the generalization of the designed model. The data of most devices can be used as training data to train a model with good generalization to extract features and locate hidden WiFi devices.
[0063] The present invention can provide:
[0064] (1) Hidden WiFi device area positioning method: The present invention provides a new hidden WiFi device area positioning method based on channel state information.
[0065] (2) Novel data collection method: The present invention designs a stationary-turning data collection method so that the detector is respectively in the LOS area and out of the LOS area of the hidden device WiFi propagation.
[0066] (3) Efficient regional positioning method: Based on the judgment results in different directions, the hidden area of the WiFi device is located by comparing the effective combination.
[0067] The present invention extracts channel state information (CSI) by collecting data packets sent by WiFi devices from different directions, and trains a regional positioning model that identifies the direction of the WiFi device; when locating the WiFi device, the user uses a detector (such as a smartphone) to collect CSI data in different directions, and then pre-processes the CSI data and extracts data features, and uses the previously trained positioning model to achieve regional positioning of the WiFi device. The present invention can be easily deployed to smartphones and other embedded platforms without the cost of additional equipment, and can provide fast and accurate regional positioning services for hidden WiFi devices for users without any experience.
[0068] It should be understood that the embodiments described above are part of the embodiments of the present invention, rather than all of the embodiments. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be combined with each other arbitrarily to form a feasible technical solution. Such combination is not restricted by the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0069] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.
Claims
1. A method for locating a hidden WiFi device area based on channel state information, characterized in that: Collect channel state information (CSI) data from different directions, use the designed feature extraction network to extract regional features, and use the trained regional recognition model to identify whether the data comes from the line of sight (LOS) area. Then, use the voting algorithm to obtain the combination of recognition results from different directions to determine the area where the WiFi device is located. The feature extraction network consists of 5 neural network layers, wherein the first layer is Conv2D+ReLu, the second layer is BN+Pooling, the third layer is Conv2D+ReLu, the fourth layer is BN+Pooling, and the fifth layer is Dropout; wherein Conv2d represents a two-dimensional convolutional layer, ReLu is a nonlinear rectification activation function, BN represents a batch normalization layer, Pooling represents a pooling layer, and Dropout represents a Dropout layer; The region recognition model consists of three neural network layers, wherein the first layer is Dense+ReLu, the second layer is Dropout, and the third layer is Dense+Sigmoid; wherein Dense represents a fully connected layer, and Sigmoid represents an activation function.
2. The method for locating a hidden WiFi device area based on channel state information according to claim 1, characterized in that: The training process of the trained region recognition model includes the following steps: Step 1: Enable the network card monitoring mode; Step 2: Collect channel state information (CSI) data in four mutually perpendicular directions in turn; Step 3: Extract CSI data collected in different directions from the collected raw data and perform preprocessing; Step 4: Extract regional features using the designed feature extraction network; Step 5: Based on the extracted regional features, train the region recognition model to obtain a trained region recognition model.
3. The method for locating a hidden WiFi device area based on channel state information according to claim 2, characterized in that: In step 1, enable the root permission of the monitoring device, and then set the network card mode to monitoring mode.
4. The method for locating a hidden WiFi device area based on channel state information according to claim 2, characterized in that: In step 2, when collecting CSI data, the user holds the monitoring device and performs four "standstill-turn" actions. Then the user returns to the original direction and completes a CSI data collection. The collected WiFi data packets are grouped according to the MAC address.
5. The method for locating a hidden WiFi device area based on channel state information according to claim 2, characterized in that: In step 3, for each set of collected data, the Pearson correlation coefficient of adjacent CSI measurement values is first calculated to obtain a one-dimensional correlation coefficient array; then the Hampel filter is used to replace the outliers in these four segments of data.
6. The method for locating a hidden WiFi device area based on channel state information according to claim 2, characterized in that: In step 5, the data in the four directions are marked with 1 or 0 respectively, the data collected in the LOS area is marked as 1, and the data not collected in the LOS area is marked as 0; then the model is trained using a classifier based on a fully connected layer to obtain a trained area recognition model.
7. The method for locating a hidden WiFi device area based on channel state information according to any one of claims 1 to 6, characterized in that: Determine the area where the hidden WiFi device corresponding to the MAC address of the data is located based on a reasonable combination specified in advance; If the number of recognition results 1 is not less than half of the number of data in this direction, it is determined to be in the LOS area; if the number of recognition results 1 is less than half of the number of data in this direction, it is determined to be not in the LOS area. Finally, the judgment combination of four directions is obtained; The reasonable combinations obtained by logical reasoning are (1,1,1,0), (1,1,0,0), (1,1,1,1) and (0,0,0,0); the first combination means that three consecutive directions are judged to be in the LOS area, which means that the WiFi device is in the second area judged to be in the LOS area; the second combination means that two consecutive directions are judged to be in the LOS area, which means that the WiFi device is at the intersection of the two areas judged to be in the LOS area; the third is that all four directions are judged to be in the LOS area, which means that the WiFi device is in the area directly above the detection device; the fourth is that all four directions are judged not to be in the LOS area, which means that the WiFi device is completely blocked by obstacles and may be on the other side of the wall; other combinations are considered illegal combinations and meaningless.
8. A hidden WiFi device area positioning system based on channel state information, characterized in that: include: one or more processors; A storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the hidden WiFi device area positioning method based on channel state information as described in any one of claims 1 to 7.
