Method, device and equipment for judging hidden camera based on wifi, and storage medium
Patent Information
- Application Number
- CN202610408450.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-31
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-03-31
AI Technical Summary
[0002]随着监控技术的广泛应用,不仅在安防监控、消防监控、公安取证及道路检测等方面的积极作用,但监控技术的负面的作用也比较大,例如,隐藏摄像头的泛滥使用,造成个人隐私的泄露,财产生命受到威胁
Smart Images

Figure CN122053820B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hidden camera detection technology, and in particular to a method, apparatus, device and storage medium for identifying hidden cameras based on Wi-Fi. Background Technology
[0002] With the widespread application of surveillance technology, it has played a positive role in security monitoring, fire monitoring, police evidence collection, and road inspection. However, its negative effects are also significant. For example, the rampant use of hidden cameras has led to the leakage of personal privacy and threats to property and life. Hidden cameras are generally small in size and typically require a Wi-Fi connection to operate, such as connecting to the internet via Wi-Fi signals for video transmission. Therefore, there is an urgent need for a Wi-Fi-based method for detecting the presence of hidden cameras. Summary of the Invention
[0003] This application aims to at least address one of the technical problems existing in the prior art. To this end, this application proposes a method, apparatus, device, and storage medium for detecting hidden cameras based on Wi-Fi, capable of detecting the presence of hidden cameras via Wi-Fi signals.
[0004] The method for determining a hidden camera based on Wi-Fi according to the first aspect of this application includes: Obtain multiple Wi-Fi data frames from the Wi-Fi signal, and obtain the transmission rate of the multiple Wi-Fi data frames; When the transmission rate is greater than a preset rate threshold, the data transmission direction of multiple Wi-Fi data frames is detected to obtain uplink and downlink detection results; If the uplink and downlink detection results indicate that multiple Wi-Fi data frames are all uplink data, determine the cumulative number of Wi-Fi data frames that belong to Quality of Service (QoS) data frames among the multiple Wi-Fi data frames; Obtain the frame sequence number of each Wi-Fi data frame, detect the continuity of each frame sequence number, and obtain a continuity detection result; the continuity detection result is used to characterize whether each frame sequence number is continuous or non-continuous. Obtain block confirmation frames for the Quality of Service (QoS) data frames from the Wi-Fi signal, perform image transmission detection on the block confirmation frames, and obtain image transmission detection results; the image transmission detection results are used to characterize whether the QoS data frames are suspected of being used to transmit image data, or whether the QoS data frames are suspected of being used to transmit non-image data. Obtain the data length of each of the service quality data frames; Based on the cumulative number, the continuity detection result, the image transmission detection result, and the data length, the determination result of the hidden camera is obtained.
[0005] The method for determining a hidden camera based on Wi-Fi according to embodiments of this application has at least the following beneficial effects: First, multiple Wi-Fi data frames are obtained from the Wi-Fi signal, and the transmission rate of these multiple Wi-Fi data frames is also obtained. Hidden cameras typically use Wi-Fi signals to transmit video, so the transmission rate needs to be determined. If the transmission rate is greater than a preset rate threshold, the next step is performed. When the transmission rate is greater than the preset rate threshold, the data transmission direction of the Wi-Fi data frames is detected. Since hidden cameras typically send video to the router emitting the Wi-Fi signal, if a hidden camera exists, each Wi-Fi data frame should be uplink data. When the uplink / downlink detection results indicate that the Wi-Fi data frame is uplink data, the cumulative number of Quality of Service (QoS) data frames in the Wi-Fi data frames is determined. QoS data frames are mainly used for communication writing, video conferencing, multimedia IoT, and real-time monitoring. If the Wi-Fi data frames are emitted by a hidden camera, the frequency of QoS data frames will inevitably be high; therefore, the cumulative number can be used as one of the indicators for determining whether it is a hidden camera. Furthermore, when transmitting video using Wi-Fi signals, since the hidden camera operates continuously, the frame sequence numbers of each Wi-Fi data frame should be continuous. Therefore, the continuity of each frame sequence number is detected, and the continuity detection result can be used as one of the indicators for determining whether it is a hidden camera. Block confirmation frames for Quality of Service (QoS) data frames are obtained from the Wi-Fi signal, and image transmission detection is performed on these blocks to obtain image transmission detection results. Since the image transmission detection results are used to characterize whether the QoS data frame is suspected of transmitting image data or suspected of transmitting non-image data, the image transmission detection results can be used as one of the indicators for determining whether it is a hidden camera. Moreover, the resolution of a hidden camera is usually fixed, so the size of the transmitted image is usually fixed, i.e., the data length is fixed. Therefore, the data length of the QoS data frame is obtained, and the data length can be used as one of the indicators for determining whether it is a hidden camera. Then, based on the cumulative number, continuity detection results, image transmission detection results, and data length, the determination result of the hidden camera is obtained. Thus, this application realizes the detection of the existence of a hidden camera through Wi-Fi signals, and simultaneously makes a determination based on multiple indicators, with a high accuracy rate.
[0006] According to some embodiments of the first aspect of this application, obtaining the determination result of the hidden camera based on the cumulative number, the continuous detection result, the image transmission detection result, and the data length includes: If the cumulative number is greater than or equal to a preset number threshold, and the continuity detection result indicates that the sequence numbers of each frame are consecutive, and the image transmission detection result indicates that the quality of service data frame is suspected of being used to transmit image data, and the data length of each quality of service data frame is greater than a preset length threshold, the terminal that sends the Wi-Fi data frame is determined to be a suspected hidden camera.
[0007] According to some embodiments of the first aspect of this application, the step of detecting the data transmission direction of multiple Wi-Fi data frames to obtain uplink and downlink detection results includes: Obtain the Frame Control field information for each of the Wi-Fi data frames; If the value of the 8th bit in the Frame Control field is 1 and the value of the 9th bit is 0, the Wi-Fi data frame corresponding to the Frame Control field information is determined to be uplink data. If the value of the 8th bit in the Frame Control field is 0 and the value of the 9th bit is 1, the Wi-Fi data frame corresponding to the Frame Control field information is determined to be downlink data.
[0008] According to some embodiments of the first aspect of this application, the step of acquiring multiple Wi-Fi data frames from a Wi-Fi signal includes: Obtain multiple Wi-Fi frames from the Wi-Fi signal; The type of each Wi-Fi frame is determined based on the Frame Control field information of each Wi-Fi frame, and the Wi-Fi frame of type data frame is used as the Wi-Fi data frame.
[0009] According to some embodiments of the first aspect of this application, image transmission detection is performed on the block confirmation frame to obtain image transmission detection results, including: Extract the category information of the block confirmation frame; if the category information represents a bitmap compression list, extract the BlockAck Bitmap field information of the block confirmation frame. The image transmission detection result is obtained based on the BlockAck Bitmap field information of the block confirmation frame.
[0010] According to some embodiments of the first aspect of this application, obtaining the image transmission detection result based on the extracted BlockAckBitmap field information of the block confirmation frame includes: Calculate the first percentage of bits with a value of 1 in the BlockAck Bitmap field information; If the first proportion is detected to be greater than or equal to a preset proportion threshold, the bitmap compression detection result is determined to indicate that the quality of service data frame is suspected of being used to transmit image data. If the first proportion is detected to be less than the preset proportion threshold, the bitmap compression detection result is determined to indicate that the quality of service data frame is suspected of being used to transmit non-image data.
[0011] According to some embodiments of the first aspect of this application, determining the type of each Wi-Fi frame based on the Frame Control field information of each Wi-Fi frame, and designating the Wi-Fi frame of type data frame as the Wi-Fi data frame, includes: If the value of the second bit in the Frame Control field information is 0 and the value of the third bit is 0, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a management frame. If the value of the second bit in the Frame Control field information is 0 and the value of the third bit is 1, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a control frame. If the value of the second bit in the Frame Control field is 1 and the value of the third bit is 0, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a data frame, and the Wi-Fi frame of type data frame is used as the Wi-Fi data frame.
[0012] A second aspect of this application provides a Wi-Fi-based hidden camera detection device, comprising: The first acquisition module is used to acquire multiple Wi-Fi data frames from the Wi-Fi signal and acquire the transmission rate of the multiple Wi-Fi data frames; The first detection module is used to detect the data transmission direction of multiple Wi-Fi data frames when the transmission rate is greater than a preset rate threshold, and obtain uplink and downlink detection results. The second detection module is used to determine the cumulative number of quality of service data frames among the multiple Wi-Fi data frames when the uplink and downlink detection results indicate that multiple Wi-Fi data frames are all uplink data. The third detection module is used to obtain the frame sequence number of each Wi-Fi data frame, detect the continuity of each frame sequence number, and obtain a continuity detection result; the continuity detection result is used to indicate whether each frame sequence number is continuous or not. The fourth detection module is used to obtain block confirmation frames for the quality of service data frames from the Wi-Fi signal, perform image transmission detection on the block confirmation frames, and obtain image transmission detection results; the image transmission detection results are used to characterize the quality of service data frames as suspected of being used to transmit image data, or to characterize the quality of service data frames as suspected of being used to transmit non-image data. The second acquisition module is used to acquire the data length of each of the service quality data frames; The determination module is used to determine the hidden camera based on the cumulative number, the continuity detection result, the image transmission detection result, and the data length.
[0013] A third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the Wi-Fi-based hidden camera detection method described in any of the first aspects of the embodiment.
[0014] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the Wi-Fi-based hidden camera detection method described in any one of the first aspects of the embodiment.
[0015] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0016] The present application will be further described below with reference to the accompanying drawings and embodiments, wherein: Figure 1 This is a flowchart illustrating the steps of the WiFi-based hidden camera detection method according to an embodiment of this application. Figure 2 for Figure 1 A detailed flowchart of step S120; Figure 3 for Figure 1 A detailed flowchart of step S110; Figure 4 for Figure 1 A detailed flowchart of step S150; Figure 5 This is a schematic diagram of the structure of the WiFi hidden camera detection device according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0017] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0018] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0019] In the description of this application, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0020] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0021] In the description of this application, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0022] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0023] The first aspect of this application provides a method for detecting hidden cameras based on Wi-Fi. This method can be deployed and executed on a terminal, on a server, or as software running on either the terminal or the server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the Wi-Fi-based hidden camera detection method, but is not limited to the above forms.
[0024] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0025] Reference Figure 1 , Figure 1This is a flowchart illustrating the steps of a Wi-Fi-based hidden camera detection method according to an embodiment of this application. The Wi-Fi-based hidden camera detection method may include, but is not limited to, steps S110 to S170.
[0026] Step S110: Obtain multiple Wi-Fi data frames from the Wi-Fi signal and obtain the transmission rate of the multiple Wi-Fi data frames; It is worth noting that the Wi-Fi-based hidden camera detection method of this application embodiment can be applied to a terminal. The terminal is equipped with a wireless network card, which detects Wi-Fi signals. When the wireless network card is in Monitor Mode, it can capture all 802.11 frames passing through the air within the signal range. 802.11 frames are Wi-Fi frames, and they are the basic unit of data transmission in a Wireless Local Area Network (WLAN). They conform to the IEEE 802.11 standard, which defines the physical layer and Media Access Control (MAC) layer specifications of WLANs. Wi-Fi frames mainly include three types: data frames, control frames, and management frames. Here, data frames are equivalent to Wi-Fi data frames. Management frames are used for establishing, maintaining, and disconnecting wireless network connections. They are responsible for the "negotiation" between the station (STA) and the access point (AP), similar to the "signaling" part of a network connection. Control frames assist in the reliable transmission of data frames and are mainly used to manage access to and acknowledgment of the wireless medium. Data Frame: A frame that carries the actual layer data (such as HTTP or TCP packets). When it carries QoS (Quality of Service) information, it is called a QoS Data Frame, and its header contains a QoS Control field to indicate the priority of the data stream (such as voice or video).
[0027] Step S120: When the transmission rate is greater than the preset rate threshold, the data transmission direction of multiple Wi-Fi data frames is detected to obtain uplink and downlink detection results. It is worth noting that the uplink and downlink detection results are used to characterize whether a Wi-Fi data frame is uplink or downlink data. Downlink data refers to data sent by the router emitting the Wi-Fi signal to the terminal accessing the Wi-Fi signal. Uplink data refers to data sent by the terminal accessing the Wi-Fi signal to the router emitting the Wi-Fi signal. It should be noted that this application does not limit the preset rate threshold; those skilled in the art can set the preset rate threshold according to actual conditions.
[0028] It is worth noting that if the detected Wi-Fi data frame is downlink data, no further steps are required.
[0029] Step S130: If the uplink and downlink detection results indicate that multiple Wi-Fi data frames are uplink data, determine the cumulative number of Wi-Fi data frames that belong to the Quality of Service (QoS) data frames among the multiple Wi-Fi data frames. Step S140: Obtain the frame sequence number of each Wi-Fi data frame, detect the continuity of each frame sequence number, and obtain the continuity detection result; the continuity detection result is used to characterize whether each frame sequence number is continuous or non-continuous. It's worth noting that extracting the 22nd and 23rd bits of the Frame Control field information from the Wi-Fi data frame yields the Seq Number field. The value of the Seq Number field is the frame sequence number, used to record the number of times the frame was sent. Thus, by obtaining the frame sequence number of each Wi-Fi data frame, if all Wi-Fi data frames meet the continuity condition, the continuity detection result is used to characterize that the frame sequence numbers are consecutive. The continuity condition is: the frame sequence number of the current Wi-Fi data frame is equal to the frame sequence number of the next Wi-Fi data frame - 1, and equal to the frame sequence number of the previous Wi-Fi data frame + 1. If there are Wi-Fi data frames that do not meet the continuity condition, the continuity detection result characterizes that the frame sequence numbers are non-consecutive.
[0030] It's worth noting that after acquiring a Wi-Fi frame, the Wi-Fi protocol is parsed. The Frame Control field of the Wi-Fi frame is used to define the frame type (management frame, control frame, or data frame), subtype, protocol version, frame direction, and some control flags. The Frame Control field is usually located in the first two bytes of the Wi-Fi frame.
[0031] Step S150: Obtain block confirmation frames for quality of service data frames from the Wi-Fi signal, perform image transmission detection on the block confirmation frames, and obtain image transmission detection results; the image transmission detection results are used to characterize whether the quality of service data frame is suspected of being used to transmit image data, or to characterize whether the quality of service data frame is suspected of being used to transmit non-image data. It is worth noting that block acknowledgment frames (BACKs) are an efficient acknowledgment mechanism introduced in the IEEE 802.11e / n / ac / ax protocol. Unlike traditional frame-by-frame acknowledgment, the BACK mechanism allows the receiver to reply with only one BACK after receiving a set of consecutive QoS data frames, using a bitmap to inform the sender which frames have been successfully received. This mechanism significantly reduces the number of acknowledgment frames and channel occupancy time.
[0032] Step S160: Obtain the data length of each Quality of Service (QoS) data frame; Step S170: Based on the cumulative number, continuous detection results, image transmission detection results, and data length, the determination result of the hidden camera is obtained.
[0033] According to the embodiments of this application, the method for determining a hidden camera based on Wi-Fi, through steps S110 to S170, first obtains multiple Wi-Fi data frames from the Wi-Fi signal and their transmission rates. Hidden cameras typically use Wi-Fi signals to transmit video, therefore, the transmission rate needs to be determined. If the transmission rate exceeds a preset rate threshold, the next step is performed. When the transmission rate exceeds the preset rate threshold, the data transmission direction of the Wi-Fi data frames is detected. Since hidden cameras typically send video to the router emitting the Wi-Fi signal, if a hidden camera exists, each Wi-Fi data frame should be uplink data. When the uplink / downlink detection results indicate that the Wi-Fi data frame is uplink data, the cumulative number of Quality of Service (QoS) data frames is determined. QoS data frames are mainly used for communication writing, video conferencing, multimedia IoT, and real-time monitoring. If the Wi-Fi data frame is emitted by a hidden camera, the frequency of QoS data frame occurrences will inevitably be high; therefore, the cumulative number can be used as one of the indicators for determining whether it is a hidden camera. Furthermore, when transmitting video using Wi-Fi signals, since the hidden camera operates continuously, the frame sequence numbers of each Wi-Fi data frame should be continuous. Therefore, the continuity of each frame sequence number is detected, and the continuity detection result can be used as one of the indicators for determining whether it is a hidden camera. Block confirmation frames for Quality of Service (QoS) data frames are obtained from the Wi-Fi signal, and image transmission detection is performed on these blocks to obtain image transmission detection results. Since the image transmission detection results are used to characterize whether the QoS data frame is suspected of transmitting image data or suspected of transmitting non-image data, the image transmission detection results can be used as one of the indicators for determining whether it is a hidden camera. Moreover, the resolution of a hidden camera is usually fixed, so the size of the transmitted image is usually fixed, i.e., the data length is fixed. Therefore, the data length of the QoS data frame is obtained, and the data length can be used as one of the indicators for determining whether it is a hidden camera. Then, based on the cumulative number, continuity detection results, image transmission detection results, and data length, the determination result of the hidden camera is obtained. Thus, this application realizes the detection of the existence of a hidden camera through Wi-Fi signals, and simultaneously makes a determination based on multiple indicators, with a high accuracy rate.
[0034] In some embodiments, step S170 specifically includes: when the cumulative number detected is greater than or equal to a preset number threshold, and the continuity detection result indicates that the sequence numbers of each frame are consecutive, and the image transmission detection result indicates that the quality of service data frame is suspected to be used to transmit image data, and the data length of each quality of service data frame is greater than a preset length threshold, the terminal that sends the Wi-Fi data frame is determined to be a suspected hidden camera.
[0035] It's worth noting that when cameras transmit video, the data volume is enormous, and they typically use fragmented transmission. Compared to other transmission methods, this results in a more regular pattern, capturing multiple (e.g., 2 to 4) Quality of Service (QoS) data frames per second on average. When the cumulative number is greater than or equal to a preset threshold, it indicates that the terminal sending the Wi-Fi frame is highly likely to be transmitting video. Since cameras operate continuously, the Seq Numbers in the Wi-Fi frames emitted by hidden cameras should be continuous. Therefore, if the continuity detection result indicates that the sequence numbers of each frame are consecutive, it indicates that the terminal sending the Wi-Fi frame is highly likely to be transmitting video. Furthermore, the resolution of hidden cameras is usually fixed, so the size of the transmitted image is usually fixed, i.e., the data length is fixed. For example, cameras typically transmit RGB565; assuming the camera resolution is 600*600, the length of a single image is 600*600*2. Therefore, if the data length of the Wi-Fi frame exceeds the preset length threshold, it indicates that the terminal sending the Wi-Fi frame is highly likely to be transmitting video. If the image transmission detection results indicate that the service quality data frame is suspected of being used to transmit image data, then the terminal sending the Wi-Fi data frame can be identified as a suspected hidden camera.
[0036] It should be noted that those skilled in the art can set preset quantity thresholds and preset length thresholds according to actual circumstances, and this application does not make specific limitations in this regard.
[0037] In some embodiments, after determining that the terminal sending the Wi-Fi data frame is a suspected hidden camera, a prompt text is generated and output. The prompt text may be "There may be a hidden camera device in the current Wi-Fi environment", and the prompt text can be displayed on the terminal's screen.
[0038] In some embodiments, refer to Figure 2 , Figure 2 for Figure 1 A schematic diagram of a specific process for step S120. Step S120 may include, but is not limited to, steps S210 to S230.
[0039] Step S210: Obtain the Frame Control field information of each Wi-Fi data frame; Step S220: If the value of the 8th bit in the Frame Control field information is 1 and the value of the 9th bit is 0, it is determined that the Wi-Fi data frame corresponding to the Frame Control field information is uplink data. In step S230, if the value of the 8th bit in the Frame Control field information is 0 and the value of the 9th bit is 1, it is determined that the Wi-Fi data frame corresponding to the Frame Control field information is downlink data.
[0040] It is worth noting that bits 8 and 9 of the Frame Control field information are the to_ds and from_ds information, respectively. To DS and From DS are two key flag bits (each occupying 1 bit) in the frame control field, used to indicate the transmission direction of the data frame in the infrastructure network. Therefore, through steps S210 to S230, this method of confirming uplink and downlink data is highly efficient and consumes few computational resources.
[0041] In some embodiments, refer to Figure 3 , Figure 3 for Figure 1 A schematic diagram of a specific process for step S110. Step S110 may include, but is not limited to, steps S310 and S320.
[0042] Step S310: Obtain multiple Wi-Fi frames from the Wi-Fi signal; Step S320: Determine the type of each Wi-Fi frame based on the Frame Control field information of each Wi-Fi frame, and designate the Wi-Fi frame of type data frame as a Wi-Fi data frame.
[0043] It is worth noting that step S320 may specifically include steps S321 to S323.
[0044] Step S321: If the value of the second bit in the Frame Control field information is 0 and the value of the third bit is 0, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a management frame. Step S322: If the value of the second bit in the Frame Control field information is 0 and the value of the third bit is 1, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a control frame. Step S323: If the value of the second bit in the Frame Control field information is 1 and the value of the third bit is 0, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a data frame, and the Wi-Fi frame of type data frame is used as a Wi-Fi data frame.
[0045] It is worth noting that the second and third bits in the Frame Control field information are used to indicate the type of Wi-Fi frame. Therefore, the type of each Wi-Fi frame can be determined through steps S321 to S323, and Wi-Fi frames of type data frame are designated as Wi-Fi data frames.
[0046] In some embodiments, refer to Figure 4 , Figure 4 for Figure 1 A specific flowchart of step S150 is shown. Step S140 may include, but is not limited to, steps S410 and S420.
[0047] Step S410: Extract the category information of the block confirmation frame. If the category information indicates that the block confirmation frame belongs to the bitmap compression list, extract the BlockAck Bitmap field information of the block confirmation frame. It is worth noting that category information is extracted from the block acknowledgment frame. For example, bits 16 and 17 of the block acknowledgment frame are used as category information. When the 16th bit is 0 and the 17th bit is 1, it indicates that the category information of the block acknowledgment frame belongs to a bitmap compressed list. Bitmap compressed list: refers to the type identifier of the block acknowledgment frame. According to the protocol standard, block acknowledgment frames can be divided into basic block acknowledgments and compressed block acknowledgments. Among them, compressed block acknowledgment (Compressed BlockAck) is an efficient acknowledgment format. Its BlockAck Bitmap field is 8 bytes (64 bits) long, and each bit corresponds to the reception status of a Media Access Control Service Data Unit (MSDU, i.e., MAC Service Data Unit), replacing the 16-bit fragment-level bitmap required for each MSDU in the traditional basic block acknowledgment, significantly reducing overhead. If the Wi-Fi frame in step S110 is used to transmit image data, the category information of the block acknowledgment frame for the Wi-Fi frame is usually a bitmap compressed list.
[0048] Step S420: Obtain the image transmission detection result based on the BlockAck Bitmap field information of the block confirmation frame.
[0049] Step S420 specifically includes steps S421 to S423.
[0050] Step S421: Calculate the first proportion of bits with a value of 1 in the BlockAck Bitmap field information; Step S422: If the first proportion is detected to be greater than or equal to the preset proportion threshold, the bitmap compression detection result is determined to be a data frame representing the quality of service that is suspected of being used to transmit image data. Step S423: If the first proportion is less than the preset proportion threshold, the bitmap compression detection result is determined to be a data frame representing the quality of service that is suspected of being used to transmit non-image data.
[0051] It is worth noting that the BlockAck Bitmap field is a core component of the Block Ack frame in the 802.11 protocol, used to efficiently confirm the reception status of multiple data frames, reduce retransmission overhead, and improve the throughput of the wireless network. In the BlockAck Bitmap field, a bit with a value of 1 indicates that the QoS Data frame with the corresponding sequence number has been successfully received and verified by the receiver in this block acknowledgment session. Due to the continuous and real-time requirements of video encoding, the sender typically fills the transmission queue in a near-saturated manner, resulting in an extremely high proportion of successfully received frames in each block acknowledgment session. This application directly captures this core characteristic by calculating the proportion of "1". When the first proportion is higher than a preset proportion threshold, it means that the vast majority of Wi-Fi data frames in a continuous set have been successfully received. This high-density, continuous successful acknowledgment pattern is precisely the typical performance of large-volume, continuous services such as images / videos on wireless links. Therefore, the bitmap compression detection result can be used to identify QoS Data frames as potentially used for transmitting image data. When the first proportion is lower than the preset proportion threshold, it may correspond to sporadic data interactions (such as heartbeat packets from web browsing or text messages from instant messaging). The transmission of these services is intermittent and low-density, which is represented by sparse "1"s on the bitmap. Therefore, the bitmap compression detection result is determined as a data frame that is suspected of being used to transmit non-image data. The embodiments of this application utilize the essential difference in wireless confirmation density between image transmission and non-image transmission through steps S421 to S423 to achieve efficient differentiation.
[0052] A second aspect of this application provides a Wi-Fi-based hidden camera detection device. (See also...) Figure 5 , Figure 5 This is a schematic diagram of the structure of a Wi-Fi hidden camera detection device according to an embodiment of this application. The Wi-Fi hidden camera detection device includes: The first acquisition module 510 is used to acquire multiple Wi-Fi data frames from the Wi-Fi signal and acquire the transmission rate of the multiple Wi-Fi data frames. The first detection module 520 is used to detect the data transmission direction of multiple Wi-Fi data frames when the transmission rate is greater than a preset rate threshold, and obtain uplink and downlink detection results. The second detection module 530 is used to determine the cumulative number of Wi-Fi data frames that belong to the Quality of Service (QoS) data frames when the uplink and downlink detection results indicate that multiple Wi-Fi data frames are uplink data. The third detection module 540 is used to obtain the frame sequence number of each Wi-Fi data frame, detect the continuity of each frame sequence number, and obtain the continuity detection result; the continuity detection result is used to characterize whether each frame sequence number is continuous or not. The fourth detection module 550 is used to obtain block confirmation frames for quality of service data frames from the Wi-Fi signal, perform image transmission detection on the block confirmation frames, and obtain image transmission detection results; the image transmission detection results are used to characterize whether the quality of service data frame is suspected of being used to transmit image data, or whether the quality of service data frame is suspected of being used to transmit non-image data. The second acquisition module 560 is used to acquire the data length of each quality of service data frame; The determination module 570 is used to determine the hidden camera based on the cumulative number, continuous detection results, image transmission detection results, and data length.
[0053] The second aspect of the embodiment of the hidden camera detection device based on Wi-Fi is used to execute the hidden camera detection method based on Wi-Fi of the first aspect of this application. When executing the method, multiple Wi-Fi data frames and their transmission rates are first obtained from the Wi-Fi signal. Since hidden cameras typically use Wi-Fi signals to transmit video, the transmission rate needs to be judged. If the transmission rate is greater than a preset rate threshold, further judgment is performed. When the transmission rate is greater than the preset rate threshold, the data transmission direction of the Wi-Fi data frames is detected. Since hidden cameras typically send video to the router emitting the Wi-Fi signal, if a hidden camera exists, each Wi-Fi data frame should be uplink data. When the uplink / downlink detection results indicate that the Wi-Fi data frame is uplink data, the cumulative number of Quality of Service (QoS) data frames in the Wi-Fi data frames is determined. QoS data frames are mainly used for communication writing, video conferencing, multimedia IoT, and real-time monitoring. If the Wi-Fi data frames are emitted by a hidden camera, the frequency of QoS data frames will inevitably be high; therefore, the cumulative number can be used as one of the indicators for determining whether it is a hidden camera. Furthermore, when transmitting video using Wi-Fi signals, since the hidden camera operates continuously, the frame sequence numbers of each Wi-Fi data frame should be continuous. Therefore, the continuity of each frame sequence number is detected, and the continuity detection result can be used as one of the indicators for determining whether it is a hidden camera. Block confirmation frames for Quality of Service (QoS) data frames are obtained from the Wi-Fi signal, and image transmission detection is performed on these blocks to obtain image transmission detection results. Since the image transmission detection results are used to characterize whether the QoS data frame is suspected of transmitting image data or suspected of transmitting non-image data, the image transmission detection results can be used as one of the indicators for determining whether it is a hidden camera. Moreover, the resolution of a hidden camera is usually fixed, so the size of the transmitted image is usually fixed, i.e., the data length is fixed. Therefore, the data length of the QoS data frame is obtained, and the data length can be used as one of the indicators for determining whether it is a hidden camera. Then, based on the cumulative number, continuity detection results, image transmission detection results, and data length, the determination result of the hidden camera is obtained. Thus, this application realizes the detection of the existence of a hidden camera through Wi-Fi signals, and simultaneously makes a determination based on multiple indicators, with a high accuracy rate.
[0054] It should be noted that the specific implementation of this Wi-Fi-based hidden camera detection device is basically the same as the specific embodiment of the Wi-Fi-based hidden camera detection method described above, and will not be repeated here. Subject to meeting the requirements of the embodiments of this application, the Wi-Fi-based hidden camera detection device may also be equipped with other functional units to implement the Wi-Fi-based hidden camera detection method in the above embodiments.
[0055] A third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the Wi-Fi-based hidden camera detection method of any of the first aspects of the embodiment. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0056] Reference Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device according to one embodiment. The electronic device includes: The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 602 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called and executed by the processor 601 to execute the Wi-Fi-based hidden camera detection method of the embodiments of this application. The input / output interface 603 is used to implement information input and output; The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601, memory 602, input / output interface 603, and communication interface 604 are connected to each other within the device via bus 605.
[0057] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the Wi-Fi-based hidden camera detection method of any one of the first aspects of this application.
[0058] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0059] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0060] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0061] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0062] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0063] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0064] It should be understood that in this application, "at least one (item)" means one or more, and "more than one" means two or more. "And / or" is used to describe the mapping relationship between the mapped objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following mapped objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0065] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0066] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0067] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0068] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for detecting hidden cameras based on Wi-Fi, characterized in that, include: Obtain multiple Wi-Fi data frames from the Wi-Fi signal, and obtain the transmission rate of the multiple Wi-Fi data frames; When the transmission rate is greater than a preset rate threshold, the data transmission direction of multiple Wi-Fi data frames is detected to obtain uplink and downlink detection results; If the uplink and downlink detection results indicate that multiple Wi-Fi data frames are all uplink data, determine the cumulative number of Wi-Fi data frames that belong to Quality of Service (QoS) data frames among the multiple Wi-Fi data frames; Obtain the frame sequence number of each Wi-Fi data frame, detect the continuity of each frame sequence number, and obtain the continuity detection result; The continuity detection result is used to characterize whether the frame sequence numbers are consecutive or non-consecutive. Obtain block confirmation frames for the Quality of Service (QoS) data frames from the Wi-Fi signal, perform image transmission detection on the block confirmation frames, and obtain image transmission detection results; the image transmission detection results are used to characterize whether the QoS data frames are suspected of being used to transmit image data, or whether the QoS data frames are suspected of being used to transmit non-image data. Obtain the data length of each of the service quality data frames; Based on the cumulative number, the continuity detection result, the image transmission detection result, and the data length, the determination result of the hidden camera is obtained; Image transmission detection is performed on the block confirmation frame to obtain the image transmission detection result, including: Extract the category information of the block confirmation frame; if the category information represents a bitmap compression list, extract the BlockAck Bitmap field information of the block confirmation frame. The image transmission detection result is obtained based on the BlockAck Bitmap field information of the block confirmation frame; The image transmission detection result is obtained based on the BlockAck Bitmap field information of the block confirmation frame, including: Calculate the first percentage of bits with a value of 1 in the BlockAck Bitmap field information; If the first proportion is detected to be greater than or equal to a preset proportion threshold, the bitmap compression detection result is determined to indicate that the quality of service data frame is suspected of being used to transmit image data. If the first proportion is detected to be less than the preset proportion threshold, the bitmap compression detection result is determined to indicate that the quality of service data frame is suspected of being used to transmit non-image data.
2. The method for detecting hidden cameras based on Wi-Fi according to claim 1, characterized in that, The determination of a hidden camera based on the cumulative number, the continuous detection result, the image transmission detection result, and the data length includes: If the cumulative number is greater than or equal to a preset number threshold, and the continuity detection result indicates that the sequence numbers of each frame are consecutive, and the image transmission detection result indicates that the quality of service data frame is suspected of being used to transmit image data, and the data length of each quality of service data frame is greater than a preset length threshold, the terminal that sends the Wi-Fi data frame is determined to be a suspected hidden camera.
3. The method for detecting hidden cameras based on Wi-Fi according to claim 1, characterized in that, The step of detecting the data transmission direction of multiple Wi-Fi data frames to obtain uplink and downlink detection results includes: Obtain the Frame Control field information for each of the Wi-Fi data frames; If the value of the 8th bit in the Frame Control field is 1 and the value of the 9th bit is 0, the Wi-Fi data frame corresponding to the Frame Control field information is determined to be uplink data. If the value of the 8th bit in the Frame Control field is 0 and the value of the 9th bit is 1, the Wi-Fi data frame corresponding to the Frame Control field information is determined to be downlink data.
4. The method for detecting hidden cameras based on Wi-Fi according to claim 1, characterized in that, The step of acquiring multiple Wi-Fi data frames from a Wi-Fi signal includes: Obtain multiple Wi-Fi frames from the Wi-Fi signal; The type of each Wi-Fi frame is determined based on the Frame Control field information of each Wi-Fi frame, and the Wi-Fi frame of type data frame is used as the Wi-Fi data frame.
5. The method for detecting hidden cameras based on Wi-Fi according to claim 4, characterized in that, The step of determining the type of each Wi-Fi frame based on the Frame Control field information of each Wi-Fi frame, and designating the Wi-Fi frame of type data frame as the Wi-Fi data frame, includes: If the value of the second bit in the Frame Control field information is 0 and the value of the third bit is 0, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a management frame. If the value of the second bit in the Frame Control field information is 0 and the value of the third bit is 1, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a control frame. If the value of the second bit in the Frame Control field is 1 and the value of the third bit is 0, the type of the Wi-Fi frame corresponding to the Frame Control field information is determined to be a data frame, and the Wi-Fi frame of type data frame is used as the Wi-Fi data frame.
6. A hidden camera detection device based on Wi-Fi, characterized in that, include: The first acquisition module is used to acquire multiple Wi-Fi data frames from the Wi-Fi signal and acquire the transmission rate of the multiple Wi-Fi data frames; The first detection module is used to detect the data transmission direction of multiple Wi-Fi data frames when the transmission rate is greater than a preset rate threshold, and obtain uplink and downlink detection results. The second detection module is used to determine the cumulative number of quality of service data frames among the multiple Wi-Fi data frames when the uplink and downlink detection results indicate that multiple Wi-Fi data frames are all uplink data. The third detection module is used to obtain the frame sequence number of each Wi-Fi data frame, detect the continuity of each frame sequence number, and obtain a continuity detection result. The continuity detection result is used to characterize whether the frame sequence numbers are consecutive or non-consecutive. The fourth detection module is used to obtain block confirmation frames for the quality of service data frames from the Wi-Fi signal, perform image transmission detection on the block confirmation frames, and obtain image transmission detection results; the image transmission detection results are used to characterize the quality of service data frames as suspected of being used to transmit image data, or to characterize the quality of service data frames as suspected of being used to transmit non-image data. The second acquisition module is used to acquire the data length of each of the service quality data frames; The determination module is used to determine the hidden camera based on the cumulative number, the continuity detection result, the image transmission detection result, and the data length. Image transmission detection is performed on the block confirmation frame to obtain the image transmission detection result, including: Extract the category information of the block confirmation frame; if the category information represents a bitmap compression list, extract the BlockAck Bitmap field information of the block confirmation frame. The image transmission detection result is obtained based on the BlockAck Bitmap field information of the block confirmation frame; The image transmission detection result is obtained based on the BlockAck Bitmap field information of the block confirmation frame, including: Calculate the first percentage of bits with a value of 1 in the BlockAck Bitmap field information; If the first proportion is detected to be greater than or equal to a preset proportion threshold, the bitmap compression detection result is determined to indicate that the quality of service data frame is suspected of being used to transmit image data. If the first proportion is detected to be less than the preset proportion threshold, the bitmap compression detection result is determined to indicate that the quality of service data frame is suspected of being used to transmit non-image data.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the Wi-Fi-based hidden camera detection method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the WiFi-based hidden camera detection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Network camera detection and positioning method based on WIFI transmission characteristics
CN115967931A
Hidden camera discovery method and system based on multi-instance learning
CN118741233A