Hidden camera identification method and system based on GoP features
Through the GoP feature-based recognition method, the structural-level features of wireless traffic in WiFi networks are extracted and the LightGBM model is used for identification, which solves the problem of difficult to identify different types of cameras and extracts information from encrypted traffic in the prior art, and realizes efficient hidden camera recognition.
Patent Information
- Application Number
- CN202411726211.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to accurately identify cameras of different brands and models when identifying hidden cameras, and it is difficult to extract effective information from encrypted traffic, and ignores the structural attributes of wireless traffic.
Using GoP feature-based recognition method, the WiFi network wireless traffic data is scanned through a sniffer, pre-processed and GoP reconstruction is performed, features are extracted using aggregate functions, and training and inference are used using the LightGBM model to achieve accurate recognition of hidden cameras.
It improves the performance of hidden camera recognition, can extract effective information from encrypted traffic, and pay attention to the structural attributes of wireless traffic, so as to achieve accurate recognition of different models of cameras.
Smart Images

Figure CN119893560A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a hidden camera recognition method and system based on GoP features. Background Art
[0002] Driven by the Internet of Things technology, smart cameras have rapidly penetrated into every corner of daily life. They are widely used in many fields such as home security, commercial monitoring, and public safety management. However, this ubiquitous visual coverage has quietly spawned a series of privacy and security concerns, making the boundaries of personal space blurred. Therefore, conducting research on hidden camera identification technology has important practical significance for privacy protection and public safety. Most of the existing research work stays at distinguishing hidden cameras from other devices, which is far from enough for practical work. When hidden cameras are found in sensitive locations, police or other government personnel need to track down suspects based on existing information and promptly eliminate the adverse effects of sensitive video data transmission. If the device model of the original commercial camera used for hidden camera modification can be obtained with the help of device identification methods, the manufacturer can be contacted as soon as possible to query key information such as serial number, origin, sales channel, and purchaser. By performing correlation analysis on the above information, the identity of the suspect can be locked, greatly improving the efficiency of handling similar incidents. However, the existing methods have made some progress in distinguishing different IoT devices, but there are still the following problems in identifying the specific models of hidden cameras:
[0003] 1) Insufficient feature mining between different camera models
[0004] Most of the existing hidden camera identification work uses statistical features such as packet length distribution, bandwidth stability, special fields, etc. based on machine learning models to characterize the traffic characteristics of the camera, but does not mine the maximum packet length, retransmission mode, address-related fields and other in-depth information related to the manufacturer and model, making it difficult to accurately identify cameras of different brands and models.
[0005] 2) It is difficult to extract valid information from encrypted traffic
[0006] Previous work has proven that some network layer information such as IP and DNS is highly correlated with the type of network devices and can be used to identify wired network devices and wireless IoT devices. However, these works all assume that one has sufficient privileges on the network and can obtain this information on the router or other network layers. In actual threat scenarios, security personnel often cannot obtain this fine-grained information, and the data sniffed by a wireless sniffer is only encrypted 802.11 protocol cluster messages, which results in very limited effective information that can be extracted by traditional methods.
[0007] 3) Ignoring the structural properties of wireless traffic
[0008] The camera audio and video encoding part involves converting the captured visual and audio data from analog signals to digital signals, followed by encoding. In the encoding, the video data is compressed based on GoP (Group of Pictures), and each GoP consists of an I frame and multiple P frames and B frames. Therefore, the key structural information of the camera traffic is retained in the GoP. Existing methods fail to fully utilize similar structural attributes, resulting in poor recognition performance. Summary of the invention
[0009] In order to at least partially solve the problems in the prior art that it is difficult to accurately identify cameras of different brands and models, difficult to extract effective information from encrypted traffic, and ignores the structural properties of wireless traffic when identifying cameras, the present invention provides a hidden camera identification method and system based on GoP features. First, a sniffer is used to scan and capture the wireless traffic of the WiFi network on all nearby channels, the data that may be lost is supplemented, and key data that is helpful for identification is sorted out. A GoP reconstruction method is proposed, and an aggregation function is applied to the traffic corresponding to each GoP to extract features. LightGBM (Light Gradient Boosting Machine) is used to train and infer the features extracted by the aggregation function, so as to facilitate the extraction of effective information from the encrypted traffic, pay attention to the structural properties of the wireless traffic, and achieve accurate identification of hidden cameras.
[0010] In order to achieve the above object, the technical solution of the present invention is:
[0011] The first aspect of the present invention proposes a hidden camera identification method based on GoP features, comprising:
[0012] Step 1: Collect WiFi network wireless traffic data on all channels in the target area to facilitate the detection of hidden cameras;
[0013] Step 2: Preprocess the wireless traffic data of the WiFi network to facilitate sorting out key data that is helpful for identifying hidden cameras;
[0014] Step 3: Construct multiple GoPs based on the preprocessed WiFi network wireless traffic data, and use aggregation functions to extract features on each GoP to facilitate the identification of hidden cameras;
[0015] Step 4: Input the features into the LightGBM model to complete hidden camera recognition.
[0016] Furthermore, the preprocessing of the wireless traffic data of the WiFi network specifically includes:
[0017] The wireless traffic data of the WiFi network is grouped according to the MAC address to obtain several frames. The type of each frame is obtained according to the type field, and the data frame is retained to retain key data.
[0018] Recover lost data packets in WiFi network wireless traffic data to ensure data accuracy.
[0019] Furthermore, the recovery of lost data packets in the wireless traffic data of the WiFi network specifically includes:
[0020] Calculate the inter-frame interval Δt1 near the packet loss, the intra-frame interval Δt2, and the two data packets before and after the packet loss p n and p n+2 The time interval t between them;
[0021] If t≤2Δt1, at p n and p n+2 A data packet with a length equal to the fragmentation unit size is added between the two data packets;
[0022] If 2Δt1<t≤Δt1+Δt2, and p n and p n+2 The length is equal to the fragmentation unit size, and no additional data packets are added. Otherwise, in p n+2 A data packet with a length equal to the fragmentation unit size is added at the front Δt2;
[0023] If t>Δt1+Δt2, no data packet is added.
[0024] Further, the constructing of GoP according to the pre-processed WiFi network wireless traffic data specifically includes:
[0025] Define a sliding time window of preset duration, slide it in a given data packet sequence according to the sliding time window, and obtain multiple dense areas, which is convenient for constructing GoP;
[0026] For each dense area, reduce the time boundary of the sliding time window to maximize the density of the dense area and obtain the dense center;
[0027] Construct GoPs based on dense centers.
[0028] Furthermore, obtaining the dense area according to the sliding time window specifically includes:
[0029] Set the number of data packets that reach the maximum packet length within the sliding time window to N l , the number of remaining packets is Ns , if N l >5 and N l >N s , then the area where the sliding time window is located is a dense area.
[0030] Furthermore, the time boundary of the sliding time window is reduced to maximize the density of the dense area, which is expressed by the following formula:
[0031]
[0032] Among them, t ei is the end time, t si is the start time, and T is the sliding window size.
[0033] Furthermore, the constructing of GoP according to the dense center specifically includes:
[0034] Multiple dense centers whose distance is less than a preset time length are merged into one dense center, and the preset front and back areas are removed from the area in the middle of the merged adjacent dense centers, and the remaining area is the GoP.
[0035] The second aspect of the present invention proposes a hidden camera recognition system based on GoP features, comprising:
[0036] The collection module is used to collect WiFi network wireless traffic data on all channels in the target area to facilitate the detection of hidden cameras;
[0037] A preprocessing module, used to preprocess the wireless traffic data of the WiFi network to facilitate sorting out key data that is helpful for identifying hidden cameras;
[0038] The feature extraction module is used to construct multiple GoPs based on the preprocessed WiFi network wireless traffic data, and use the aggregation function to extract features on each GoP to facilitate the identification of hidden cameras;
[0039] The recognition module is used to input the features into the LightGBM model to complete the hidden camera recognition.
[0040] The third aspect of the present invention proposes an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the hidden camera identification method based on GoP features as described in the first aspect above is implemented.
[0041] The fourth aspect of the present invention proposes a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the hidden camera identification method based on GoP features as described in the first aspect above.
[0042] Beneficial effects of the present invention:
[0043] (1) The present invention recovers lost data packets by adopting a neighbor time interval comparison strategy and constructs a GoP (Group of Pictures) based on the camera video encoding and transmission principle. This method uses an aggregation function to extract feature vectors at the GoP level, effectively recovering and extracting structural attributes from encrypted wireless traffic, and improving the performance of hidden camera recognition.
[0044] (2) The present invention uses the LightGBM machine learning model to accurately infer the device category and model. This framework combines data recovery, feature extraction, and machine learning classification to provide an efficient and comprehensive solution for identifying the specific model of hidden cameras.
[0045] (3) The present invention pre-processes the wireless traffic data of the WiFi network, retains the data frames and recovers the lost data packets, thereby facilitating the extraction of valid information from the encrypted traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flowchart of a hidden camera identification method based on GoP features provided in an embodiment of the present invention.
[0047] Figure 2 The second flowchart of the hidden camera identification method based on GoP features provided in an embodiment of the present invention.
[0048] Figure 3 A schematic diagram of GoP division provided in an embodiment of the present invention.
[0049] Figure 4 A schematic diagram of GoP construction on different traffic flows provided in an embodiment of the present invention.
[0050] Figure 5 A schematic diagram of the production location information in a field provided in an embodiment of the present invention.
[0051] Figure 6 A schematic diagram of the distribution of data packet length ratios of cameras of different models provided in an embodiment of the present invention.
[0052] Figure 7 An architecture diagram of a hidden camera recognition system based on GoP features provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Example 1
[0055] like Figure 1 As shown, the hidden camera recognition method based on GoP features includes:
[0056] S101: Collect wireless traffic data of WiFi networks on all channels in a target area.
[0057] Specifically, use a sniffer to scan and capture wireless traffic data of WiFi networks on all nearby channels.
[0058] S102: Preprocessing the wireless traffic data of the WiFi network.
[0059] Specifically, in the data preprocessing part, the method first groups the captured wireless data according to the MAC address. The 802.11 protocol divides the frame types into three types: management frames, control frames, and data frames. These three types of frames jointly complete the functions of access, data transmission, and exit of the WiFi network. The message header of the 802.11 protocol is plain text. The method can obtain the frame type from the type field, such as "00" for management frames, "01" for control frames, and "10" for data frames. The data packets of management frames and control frames are small and account for a large proportion of the total number. For this reason, this method removes these data packets and only retains data frames.
[0060] Affected by the device and network status, packet loss may occur. To address this situation, the method proposes a lost packet recovery method. In a Wi-Fi network, in order to transmit video frames, frames larger than the FU (Fragmentation Unit) size are divided into multiple FU-sized packets for transmission. In order to facilitate packet loss recovery, the inter-frame interval Δt1 and intra-frame interval Δt2 near the packet loss are calculated. The method mainly implements this process by analyzing the packet sequence number and the inter-packet interval. If the packet p with sequence number n, n+2 n and p n+2 If the two packets appear continuously, it means that packet loss has occurred between the two packets. The time interval t between the two packets is calculated. There are three cases:
[0061] If t≤2Δt1, it means that the lost packet belongs to the previous frame. n and p n+2 A data packet with a length equal to FU is added between the two data packets.
[0062] If 2Δt1<t≤Δt1+Δt2, and p n and p n+2 The length is equal to FU, indicating that the length of the lost data packet is less than FU, and no data packet is supplemented. Otherwise, it means that the lost data packet belongs to the next video frame. n+2 A data packet with a length equal to FU is added before Δt2.
[0063] If t>Δt1+Δt2, it means that the lost data packet does not belong to any of the previous and next data frames and may be a B frame, which does not reach the length of FU. Therefore, the impact on the overall traffic is small, so no data packet is added.
[0064] S103: construct multiple GoPs according to the preprocessed WiFi network wireless traffic data, and perform feature extraction on each GoP using an aggregation function.
[0065] S104: Input the features into the LightGBM model to complete hidden camera recognition.
[0066] Specifically, gradient boosting is a machine learning algorithm for classification and regression. It combines models from different algorithms to generate new iterative models. It has high accuracy and efficiency. It started with AdaBoost (Adaptive Boosting) and developed to many algorithms and techniques such as GBM (Grandient Boosting Machine) and MBoost (Model-based Boosting), and then developed to CatBoost, XGBoost and LightGBM.
[0067] LightGBM is a gradient boosting framework based on decision tree algorithm proposed by Microsoft. It supports multiple algorithms such as GBM, GBDT, GBRT (Boosted Regression Tree), MART (Multiple Additive Regression Tree). LightGBM's decision tree grows leaf-wise, which optimizes the loss of generating branches. Compared with the layer-by-layer growth strategy that expands the tree depth, the algorithm is faster and less complex. The time complexity of LightGBM is O(#Data*#Feature). XGBoost is a simple solution that uses a sorting-based algorithm for decision tree learning, but it is not smooth and difficult to optimize. LightGBM can improve training performance and reduce memory usage by using a histogram-based algorithm.
[0068] The goal of this invention is not only to distinguish cameras from other devices, but also to identify the specific brands and models of different cameras, so as to provide a reference for tracing the source. Therefore, LightGBM is selected as the classifier, which has the advantages of faster training speed, lower memory consumption, higher accuracy, support for distribution, and the ability to quickly process massive data, which can support the completion of multi-classification tasks.
[0069] The present invention classifies devices into non-camera applications and IoT devices, cameras of different models, collects a large amount of wireless traffic in 4 different scenarios, and conducts a large amount of training on the data sets of each category. During the training process, LightGBM minimizes the multi-classification cross entropy loss function.
[0070] Then the probability that device d belongs to category k is:
[0071]
[0072] Where P is the probability that device d is of category k, d is the device, k is the category, G j is the feature vector corresponding to the jth GoP, K is the total number of all device types, and F k (G j ) is the score function for the device being of category k.
[0073] For each device, the class with the highest probability is selected as its predicted class.
[0074] like Figure 2As shown, the present invention first uses a sniffer to scan and capture the wireless traffic of the WiFi network on all nearby channels. In the data preprocessing part, the data that may be lost is supplemented, and the key data that is helpful for identification is sorted out. A GoP reconstruction method is proposed, and an aggregation function is applied to the traffic corresponding to each GoP. The LightGBM model is used to train and infer the features extracted by the aggregation function to obtain the specific brand and model of the hidden camera.
[0075] Example 2
[0076] Based on the above embodiment, the embodiment of the present invention provides a GoP construction method and feature extraction method, which specifically include:
[0077] In order to accurately identify hidden miniature cameras, it is necessary to find effective features and organize them reasonably. In the selection of features, manual construction is combined with large-scale selection. 51 features were selected from the header of the 802.11 protocol data packet, 8 features were manually constructed, and after removing the features with higher correlation, a total of 43 features were retained. The present invention proposes a GoP construction method for the first time, which can divide a group of traffic into multiple GoP units, and use aggregation functions (average, variance, maximum, minimum, entropy, sum, histogram, etc.) based on the above features on a single GoP unit to construct a feature set. The GoP construction method and effective features are described in detail below.
[0078] GoP consists of a group of video frames, among which the reference frame is the Instantaneous Decoding Refresh (IDR) frame, which contains the complete information of a picture. Other frames are reference frames. Therefore, the size of the data packet corresponding to the IDR frame is the largest, and it appears as multiple continuous FUs with relatively small time slots in the traffic. The size of the data packet corresponding to the forward prediction coding (P) frame is second, and the size of the data packet corresponding to the bidirectional prediction interpolation coding (B) frame is the smallest. The interval between the timestamps of multiple data packets belonging to the same frame is significantly smaller than the time interval between data packets of different frames. Because the size of the data packet corresponding to the IDR frame is the largest, within a certain size of the time window, the time density of multiple data packets that reach the maximum packet length that make up the IDR frame reaches the maximum. Based on this principle, a GoP construction method is designed, which mainly has three steps: initializing dense areas, searching for dense centers, and constructing GoP.
[0079] Initialize the dense area: In the data packet sequence, a sliding time window of 1 second is defined empirically, and the number of data packets reaching the maximum packet length in the window is N l , the number of remaining packets is N s The number of consecutive packets corresponding to IDR is usually more than 5. When the window slides to the i-th packet, if N l >5 and Nl >N s , the area where the current window is located is defined as a dense area, and its start time and end time are t ei and t si .
[0080] Search for the dense center: In each dense area, keep shrinking the left and right time boundaries until N l The density in the area reaches the maximum, and the specific process is expressed by the following formula:
[0081]
[0082] Among them, t ei is the end time, t si is the start time, and T is the sliding window size.
[0083] At this time, the center of the dense area is the location where data packets with the maximum packet length are densely packed, that is, the dense center, and the location of the dense center is the location of the IDR.
[0084] Constructing GoP: Due to the interference caused by network delay and jitter, small-sized data packets may be mixed in the original continuous data packets of length FU. In order to eliminate this adverse effect, the middle of the dense centers that are less than 1 second apart are merged into one dense center. The first 5% and the last 5% of the area in the middle of the merged adjacent dense centers are removed, and the remaining area is the GoP.
[0085] The measured results are as follows Figure 3 As shown in the figure, the orange vertical line is the data packet that reaches the maximum packet length, the blue vertical line is other data packets, the green vertical line is the location of the dense center, and the part between adjacent green is GoP. It can be seen that the length of each GoP is almost the same. Inside the GoP, except for the area where the IDR is located, the distribution of other data packets is relatively sparse.
[0086] Based on the above features, an aggregation function is used to construct a feature set on a single GoP unit, so as to facilitate the determination of the hidden camera model according to the feature set. The feature set includes GoP-related features, maximum group length and address field.
[0087] For GoP-related features, the single device function and special video encoding method make the camera show different traffic patterns. Considering the most stringent conditions, the traffic of live broadcast, short video, media video, uploaded video, etc. through the WiFi network is compared with the traffic of the camera to explore the rules of different traffic patterns.
[0088] When different traffic flows are imported into the GoP to build the model, it is found that the situation is very different from the camera traffic. Figure 4The data with a duration of 60 seconds is shown. The traffic generated by live broadcast, short video and platform video is very similar to the characteristics of camera traffic. They all generate a large number of data packets in a short period of time, and the bandwidth is relatively stable. The traffic of uploaded videos is another mode, which only transmits data in blocks during individual time periods. Only live broadcast and video upload traffic generate a small number of dense centers that meet the GoP construction rules, which can provide a reference for distinguishing these traffic. The present invention takes the number of dense centers within a certain period of time, GoP size, GoP variance, GoP density, etc. as part of the feature set.
[0089] The maximum packet length varies for different traffic flows due to differences in device functions, hardware facilities, and transmission protocols. For cameras, there are limited SoC chip options, and firmware varies greatly between different manufacturers. Even different products from the same manufacturer have different firmware due to different functional designs, which results in differences in the maximum packet length between these products.
[0090] From Table 1, we can see the specific maximum packet lengths of different devices and applications. In general, the maximum packet length of cameras is smaller than that of other traffic. The maximum packet lengths of different manufacturers and even different products of the same manufacturer are also different. This creates conditions for distinguishing different devices and models.
[0091] Table 1 Maximum packet length for different devices and applications
[0092]
[0093] For the address field, the firmware is the program written into EROM (Erasable Read Only Memory) or EEPROM (Electrically Erasable Programmable read only memory). Specifically, for most routers and cameras on the market, the firmware is the program in the 25 series Flash chip on the circuit board, which stores the embedded operating system, usually the Linux system.
[0094] Since the data is encrypted, in order to facilitate product traceability, the firmware of the camera often marks the address-related information in the address field of the unencrypted header. In addition to the camera, many devices such as mobile phones, computers, smart desk lamps, etc. will not mark similar fields. For example, one manufacturer writes SichuanA_04:61:3e in the address field, another manufacturer writes Shenzhen_dc:62:67 in the address field, and another manufacturer writes Hangzhou_36:7a:9a in the address field. The front of this information marks the place of production, and the back marks the second half of the MAC address, which exposes the production address information of these three products. Figure 5 In addition, some products have address information specific to the province, some products have address information specific to the city, and some products have other characters added after the address information. By comparing the data collected in the early stage or the production location information disclosed by various manufacturers, it is easy to infer the category, origin and brand information of these three products.
[0095] Today's wireless cameras have many functions, such as human tracking, abnormal light perception, abnormal sound perception, etc. Each camera product has a unique product positioning, and there are differences in specific functions and software and hardware configurations, which will lead to differences in traffic patterns of different models of cameras. Among them, the distribution of packet length is an important indicator to distinguish different models, such as Figure 6 The figure shows three camera models. Model 3 has only one main data packet length, while models 1 and 2 have two main data packet lengths. However, the proportion of data packets with the two lengths of model 1 is quite different, and both lengths are smaller than those of model 2, which makes it easier to judge the camera model based on this feature.
[0096] Example 3
[0097] Corresponding to the above method, such as Figure 7 As shown, the hidden camera recognition system based on GoP features includes:
[0098] A collection module is used to collect wireless traffic data of WiFi networks on all channels in the target area;
[0099] A preprocessing module, used for preprocessing the wireless traffic data of the WiFi network;
[0100] A feature extraction module is used to construct multiple GoPs based on the preprocessed WiFi network wireless traffic data, and perform feature extraction on each GoP using an aggregation function;
[0101] The recognition module is used to input the features into the LightGBM model to complete the hidden camera recognition.
[0102] It should be noted that the hidden camera recognition system based on GoP features provided in the embodiments of the present invention is for implementing the hidden camera recognition method based on GoP features in the above embodiments. Its specific functions can be referred to the above method embodiments and will not be repeated here.
[0103] Example 4
[0104] Corresponding to the above method, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the hidden camera recognition method based on GoP features as in the above embodiment.
[0105] Preferably, an embodiment of the present invention provides a computer-readable storage medium, the storage medium including a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the hidden camera identification method based on GoP features as in the above-mentioned embodiment.
[0106] In summary, the present invention recovers lost data packets by adopting a neighbor time interval comparison strategy, and constructs a GoP (Group of Pictures) based on the camera video encoding and transmission principle. This method uses an aggregation function to extract feature vectors at the GoP level, effectively recovers and extracts structural attributes from encrypted wireless traffic, and improves the performance of hidden camera recognition. The present invention accurately infers the device category and model through the LightGBM machine learning model. This framework combines data recovery, feature extraction, and machine learning classification to provide an efficient and comprehensive solution for identifying specific models of hidden cameras. The present invention preprocesses the wireless traffic data of the WiFi network, retains the data frames, and recovers the lost data packets, so as to facilitate the extraction of effective information from the encrypted traffic.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A hidden camera identification method based on GoP features, characterized in that: include: Step 1: Collect WiFi network wireless traffic data on all channels in the target area; Step 2: Preprocessing the wireless traffic data of the WiFi network; Step 3: Construct multiple GoPs based on the preprocessed WiFi network wireless traffic data, and use aggregation functions to extract features on each GoP; Step 4: Input the features into the LightGBM model to complete hidden camera recognition.
2. The method for identifying hidden cameras based on GoP features according to claim 1, characterized in that: The step 2 specifically includes: The wireless traffic data of the WiFi network is grouped according to the MAC address to obtain several frames. The type of each frame is obtained according to the type field, and the data frame is retained. Recover lost data packets in WiFi network wireless traffic data.
3. The hidden camera identification method based on GoP feature according to claim 2 is characterized in that: The recovery of the lost data packets in the wireless traffic data of the WiFi network specifically includes: Calculate the inter-frame interval Δt1 near the packet loss, the intra-frame interval Δt2, and the two data packets before and after the packet loss p n and p n+2 The time interval t between them; If t≤2Δt1, at p n and p n+2 A data packet with a length equal to the fragmentation unit size is added between the two data packets; If 2Δt1<t≤Δt1+Δt2, and p n and p n+2 The length is equal to the fragmentation unit size, and no additional data packets are added. Otherwise, in p n+2 A data packet with a length equal to the fragmentation unit size is added at the front Δt2; If t>Δt1+Δt2, no data packet is added.
4. The hidden camera identification method based on GoP feature according to claim 1 is characterized in that: The step of constructing a GoP based on the pre-processed WiFi network wireless traffic data specifically includes: A sliding time window of a preset duration is defined, and a given data packet sequence is slid according to the sliding time window to obtain multiple dense areas; For each dense area, reduce the time boundary of the sliding time window to maximize the density of the dense area and obtain the dense center; Construct GoPs based on dense centers.
5. The method for identifying hidden cameras based on GoP features according to claim 4, characterized in that: The method of obtaining a dense area according to the sliding time window specifically includes: Set the number of data packets that reach the maximum packet length within the sliding time window to N l , the number of remaining packets is N s , if N l >5 and N l >N s , then the area where the sliding time window is located is a dense area.
6. The method for identifying hidden cameras based on GoP features according to claim 4, characterized in that: The time boundary of the sliding time window is reduced to maximize the density of the dense area, which is expressed by the following formula: Among them, t ei is the end time, t si is the start time, and T is the sliding window size.
7. The method for identifying hidden cameras based on GoP features according to claim 4, characterized in that: The constructing of the GOP according to the dense center specifically includes: Multiple dense centers whose distance is less than a preset time length are merged into one dense center, and the preset front and back areas are removed from the area in the middle of the merged adjacent dense centers, and the remaining area is the GoP.
8. A hidden camera recognition system based on GoP features, characterized in that: include: A collection module is used to collect wireless traffic data of WiFi networks on all channels in the target area; A preprocessing module, used for preprocessing the wireless traffic data of the WiFi network; A feature extraction module is used to construct multiple GoPs based on the preprocessed WiFi network wireless traffic data, and perform feature extraction on each GoP using an aggregation function; The recognition module is used to input the features into the LightGBM model to complete the hidden camera recognition.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for identifying a hidden camera based on GoP features as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the hidden camera identification method based on GoP features as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Detection method for hidden camera in local area network
CN112073988A
Wireless wifi flow data acquisition method, hidden camera identification method and related equipment
CN117221935A
Hidden camera detection method, terminal device, electronic device, and storage medium
WO2023045519A1