Camera detection method, device, storage medium and electronic device
By matching the changing characteristics of network data packets and the space to be detected, the problem of low accuracy and reliability of camera detection in the prior art is solved, efficient detection of almost all networked cameras is achieved, and the impact of ambient light is reduced.
Patent Information
- Application Number
- CN202110649875.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-06-10
AI Technical Summary
The prior art is difficult to effectively detect cameras hidden in various places, especially those that are not equipped with fill light sources or are affected by ambient light, resulting in lower detection accuracy and reliability.
By obtaining network data packets in the space to be detected and matching their time-changing features with the characteristics of the space to be detected and using differential methods to detect the existence of the camera, it is suitable for almost all cameras that need to be connected to the network and reduce the Effects of ambient light.
Improve the accuracy and reliability of camera detection, reduce the situation of missed and false alarms, and can effectively detect cameras in a variety of environments, including cameras with no fill light source and occlusions.
Smart Images

Figure CN113240053B_ABST
Abstract
Description
Background Art
[0002] With the development of electronic equipment and communication technology, cameras are increasingly used in various industries. However, some criminals install cameras in hotel rooms, toilets, dressing rooms, rental houses and other places to take secret photos, which greatly infringes on people's privacy and personal safety.
[0003] Most of the above cameras are pinhole type. If they are installed in places such as cable jacks, routers, set-top boxes, and wall gaps, they are very hidden and difficult to be found. Therefore, how to effectively detect cameras is a technical problem that the industry needs to solve urgently. Summary of the invention
[0004] The present disclosure provides a camera detection method, a camera detection device, a computer-readable storage medium and an electronic device, thereby solving the problem that hidden cameras are difficult to detect, at least to a certain extent.
[0005] According to a first aspect of the present disclosure, a camera detection method is provided, including: obtaining a network data packet in a space to be detected; matching a first feature of the network data packet that changes over time with a second feature of the space to be detected that changes over time; and determining whether a camera exists in the space to be detected based on a matching result between the first feature and the second feature.
[0006] According to a second aspect of the present disclosure, a camera detection device is provided, including: a data acquisition module, configured to acquire network data packets in a space to be detected; a feature matching module, configured to match a first feature of the network data packet that changes over time with a second feature of the space to be detected that changes over time; and a detection result determination module, configured to determine whether there is a camera in the space to be detected based on the matching result of the first feature and the second feature.
[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the camera detection method of the first aspect and its possible implementation methods are implemented.
[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the camera detection method of the above-mentioned first aspect and its possible implementation method by executing the executable instructions.
[0009] The technical solution disclosed in this disclosure has the following beneficial effects:
[0010] Construct the changes of the space to be detected, match the changes of the obtained network data packets with the changes of the space to be detected, so as to detect whether there is a camera in the space to be detected. On the one hand, since the camera sends the video data packet in a differential manner, it is correlated with the changes of the space to be detected. The camera is detected by matching the characteristics of the changes in the network data packet and the space to be detected, which has high accuracy. On the other hand, this solution is suitable for detecting almost all cameras that need to be connected to the Internet, and is not limited to detecting cameras equipped with supplementary light sources. In addition, this solution is less affected by factors such as ambient lighting, and has low requirements for the scene, which is conducive to reducing missed reports. On the other hand, this solution performs detection based on the changes in the space to be detected, and will not make false alarms for nearby cameras outside the space to be detected, and has high reliability.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A system architecture diagram showing an operating environment in this exemplary embodiment;
[0013] Figure 2 A schematic diagram showing the structure of an electronic device in this exemplary embodiment is shown;
[0014] Figure 3 A flow chart of a camera detection method in this exemplary embodiment is shown;
[0015] Figure 4 A flow chart for determining a second feature in this exemplary embodiment is shown;
[0016] Figure 5 A schematic diagram showing a camera detection interface in this exemplary embodiment;
[0017] Figure 6 A schematic diagram showing a method of matching a network data packet with a flashlight working time in this exemplary embodiment;
[0018] Figure 7 A flow chart for determining a camera position in this exemplary embodiment is shown;
[0019] Figure 8 A flowchart of prompting a camera position in this exemplary embodiment is shown;
[0020] Fig. 9 A schematic structural diagram of a camera detection device in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0022] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0023] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.
[0024] In one solution of the related art, for a camera equipped with a supplementary light source such as infrared, the presence of a camera is determined by detecting whether there is a light source of a specific wavelength in the room. However, the detection of the light source is easily affected by the ambient light, and it is difficult to ensure accuracy; and if the camera is not equipped with a supplementary light source, or if there is an obstruction in front of the camera, this method cannot achieve effective detection.
[0025] In view of the above problems, an exemplary embodiment of the present disclosure first provides a camera detection method. Figure 1 The system architecture diagram of the operating environment of this exemplary embodiment is shown. Figure 1As shown, the system architecture 100 may include a data capture device 110 and a data analysis device 120. The data capture device 110 may be a device with network communication function, such as a mobile phone, a tablet computer, a personal computer, etc. The data capture device 110 is located in the space to be detected, and is used to capture network data packets in the space to be detected. The space to be detected includes but is not limited to hotel rooms, toilets, dressing rooms, and rental houses. The data capture device 110 and the data analysis device 120 can be connected through a wired or wireless communication link, so that the data capture device 110 sends the captured network data packets to the data analysis device 120. The data analysis device 120 may be another terminal connected to the data capture device 110, or a background server that provides camera detection services. The data analysis device 120 is used to analyze network data packets to detect whether there is a camera in the space to be detected.
[0026] In one embodiment, the system architecture 100 may also include a change construction device 130 for actively constructing changes in the space to be detected. For example, the change construction device 130 may be a flash device, which constructs light and dark changes in the space to be detected by flashing the space to be detected. The change construction device 130 may also be a projection device, which constructs pattern and texture changes in the space to be detected by projecting the space to be detected. The change construction device 130 may include a camera module, which is used to capture an image of the space to be detected while constructing changes in the space to be detected, and the image can be sent to the data analysis device 120 to assist the detection camera.
[0027] In one embodiment, any two or more of the data capture device 110, the data analysis device 120, and the change construction device 130 can be integrated into one device. For example, based on a mobile phone with a flashlight, the functions of the data capture device 110 and the change construction device 130 can be realized, and the flashlight can be controlled to construct the changes in the space to be detected, and the network data packets can be captured at the same time, and the network data packets are sent to the background server for analysis to realize camera detection; or, the mobile phone can also realize the function of the data analysis device 120 at the same time, and the network data packets are captured and analyzed locally to realize camera detection.
[0028] The exemplary embodiment of the present disclosure further provides an electronic device for executing the camera detection method, which may be the data analysis device 120.
[0029] Below Figure 2 Taking the mobile terminal 200 in the example, the structure of the above electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The construction in can also be applied to fixed type equipment.
[0030] like Figure 2 As shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a USB (Universal Serial Bus) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, a flash 292, a motor 293, a button 294 and a SIM (Subscriber Identification Module) card interface 295, etc.
[0031] The processor 210 may include one or more processing units, for example, the processor 210 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.
[0032] The encoder can encode (i.e. compress) the image or video data, for example, encode the collected image or video of the space to be detected to form corresponding code stream data to reduce the bandwidth occupied by data transmission; the decoder can decode (i.e. decompress) the code stream data of the image or video to restore the image or video data. The mobile terminal 200 can support one or more encoders and decoders. In this way, the mobile terminal 200 can process images or videos in multiple encoding formats, such as: JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap) and other image formats, MPEG (Moving Picture Experts Group) 1, MPEG2, H.263, H.264, HEVC (High Efficiency Video Coding) and other video formats.
[0033] In one implementation, the processor 210 may include one or more interfaces, and may be connected to other components of the mobile terminal 200 via different interfaces.
[0034] The internal memory 221 may be used to store computer executable program codes, which include instructions. The internal memory 221 may include volatile memory and non-volatile memory. The processor 210 executes various functional applications and data processing of the mobile terminal 200 by running the instructions stored in the internal memory 221.
[0035] The external memory interface 222 can be used to connect an external memory, such as a Micro SD card, to expand the storage capacity of the mobile terminal 200. The external memory communicates with the processor 210 through the external memory interface 222 to implement data storage functions, such as storing images, videos and other files.
[0036] The USB interface 230 is an interface that complies with USB standard specifications and can be used to connect a charger to charge the mobile terminal 200, or to connect headphones or other electronic devices.
[0037] The charging management module 240 is used to receive charging input from a charger. While the charging management module 240 is charging the battery 242, it can also power the device through the power management module 241; the power management module 241 can also monitor the status of the battery.
[0038] The wireless communication function of the mobile terminal 200 can be implemented by antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 250 can provide 2G, 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 200. The wireless communication module 260 can provide WLAN (Wireless Local Area Networks, wireless local area network) (such as Wi-Fi (Wireless Fidelity) network), BT (Bluetooth), GNSS (Global Navigation Satellite System, Global Navigation Satellite System), FM (Frequency Modulation, frequency modulation), NFC (Near Field Communication, short-range wireless communication technology), IR (Infrared, infrared technology) and other wireless communication solutions applied to the mobile terminal 200.
[0039] The mobile terminal 200 can realize the display function and display the user interface through the GPU, the display screen 290 and the AP, etc. For example, when the user performs camera detection, the mobile terminal 200 can display the interface of the camera detection App (Application) on the display screen 290.
[0040] The mobile terminal 200 can realize the shooting function through the ISP, the camera module 291, the encoder, the decoder, the GPU, the display screen 290 and the AP, etc. For example, the user can turn on the image or video shooting function in the camera detection App, and the image of the space to be detected can be collected through the camera module 291.
[0041] The mobile terminal 200 can implement audio functions through the audio module 270, the speaker 271, the receiver 272, the microphone 273, the earphone interface 274 and the AP.
[0042] The sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, an air pressure sensor 2804, etc., to realize corresponding sensing detection functions. Among them, the depth sensor 2801 can collect depth data of the space to be detected, and the gyroscope sensor 2803 can collect the posture data of the mobile terminal 200. These two types of data can assist in realizing the positioning of the camera.
[0043] The flashlight 292 is used to increase the exposure of the space to be detected to change its light and dark state. The flashlight 292 can be set in conjunction with the camera module 291 to form a specific relative position relationship with the camera in the camera module 291. The flashlight 292 can work alone, or it can work in conjunction with the camera module 291 when taking an image, such as flashing according to the shutter time. In addition, the flashlight 292 can also serve as a reminder, such as flashing reminders when there is an incoming call or the battery is too low.
[0044] The motor 293 can generate vibration prompts, and can also be used for touch vibration feedback, etc. The buttons 294 include a power button, a volume button, etc.
[0045] The mobile terminal 200 may support one or more SIM card interfaces 295 for connecting to a SIM card to implement functions such as calls and mobile communications.
[0046] The camera detection method of this exemplary embodiment is described below. The application scenarios of this method include but are not limited to: the user is in a hotel room, uses a mobile phone to open the camera detection App and capture network data packets, and then executes the camera detection method of this exemplary embodiment, and displays the detection results in the App; or the mobile phone captures the network data packets and uploads them to the server, and the server executes the camera detection method of this exemplary embodiment and returns the detection results to the mobile phone for display.
[0047] Figure 3 An exemplary process of a camera detection method is shown, which may include:
[0048] Step S310, obtaining network data packets in the space to be detected;
[0049] Step S320, matching the first feature of the network data packet that changes over time with the second feature of the space to be detected that changes over time;
[0050] Step S330: Determine whether there is a camera in the space to be detected based on the matching result of the first feature and the second feature.
[0051] Based on the above method, the changes of the space to be detected are constructed, and the changes of the obtained network data packets are matched with the changes of the space to be detected, so as to detect whether there is a camera in the space to be detected. On the one hand, since the camera sends the video data packet in a differential manner, it is correlated with the changes of the space to be detected. The camera is detected by matching the characteristics of the changes in the network data packet and the space to be detected, which has high accuracy. On the other hand, this solution is suitable for detecting almost all cameras that need to be connected to the Internet, and is not limited to detecting cameras equipped with supplementary light sources. In addition, this solution is less affected by factors such as ambient lighting, and has low requirements for the scene, which is conducive to reducing missed reports. On the other hand, this solution performs detection based on the changes in the space to be detected, and will not make false alarms for nearby cameras outside the space to be detected, and has high reliability.
[0052] Below Figure 3 Each step in the procedure is described in detail.
[0053] refer to Figure 3 In step S310, a network data packet in the space to be detected is obtained.
[0054] The data capture device located in the space to be detected can capture network data packets, including but not limited to wireless LAN network data packets, Bluetooth network data packets, mobile network data packets, etc. The data capture device can capture network data packets through relevant software or settings. Taking the capture of wireless LAN network data packets as an example, the network card of the data capture device is set to promiscuous mode, and all network data packets passing through can be captured, regardless of their destination address.
[0055] The captured network data packets include data packets sent by all network devices within a certain range. If there is a camera in the space to be detected, the captured network data packets also include video data packets sent by the camera. In subsequent processing, the video data packets of the camera can be identified from the network data packets and detected. Therefore, this exemplary embodiment can realize the detection of the camera when there are cameras and other network devices in the space to be detected.
[0056] In one embodiment, in order to eliminate the influence of other network devices, the user can be guided to actively shut down other network devices. For example, when the user turns on the camera detection service on the data capture device, a prompt message can be displayed to prompt the user to shut down known network devices in the space to be detected, such as smart appliances, or shut down the network connection functions of these network devices. In this way, it is ensured that the captured network data packets are mainly video data packets sent by the camera, which improves the efficiency of subsequent processing and the accuracy of camera detection.
[0057] After the data capture device captures the network data packet, the data analysis device can obtain the network data packet from the data capture device for subsequent processing. If the data capture device and the data analysis device are two devices, the data capture device can send the network data packet to the data analysis device through the network. If the data capture device and the data analysis device are one device, the network data packet can be sent through internal inter-process communication.
[0058] Continue to refer Figure 3 In step S320, the first feature of the network data packet that changes with time is matched with the second feature of the space to be detected that changes with time.
[0059] Among them, the first feature refers to the feature of the network data packet changing over time, and the second feature refers to the feature of the space to be detected changing over time. The first and second are used here to distinguish different subjects of the features.
[0060] The first feature of a network data packet may be a feature of one or more indicators of the network data packet changing over time. Indicators include, but are not limited to: the size of a single data packet, the time interval between adjacent data packets, the number of data packets per unit time, etc., which are generally information belonging to the network communication layer and can be obtained without decrypting the network data packet. The network data packet itself includes a timestamp, and the data capture device can also record time information when capturing the network data packet. Therefore, it is easy to correspond the above indicators to time to analyze the changes in the indicators over time and obtain the first feature.
[0061] The present disclosure does not limit the specific form of the first feature. For example, it can be a sequence formed by multiple time-indicator arrays.
[0062] In this exemplary embodiment, the change of the space to be detected refers to the change of the space to be detected that can cause a significant change in the camera shooting picture. When performing camera detection, an active effect can be exerted on the space to be detected to cause a strong change in brightness, pattern, texture, etc., including but not limited to: by turning on and off the flash, or turning on and off the lights and curtains in the space to be detected, causing the brightness of the space to be detected to change; projecting or moving a pattern with a large contrast with the space to be detected itself in the space to be detected, such as projecting a cartoon animation on the wall of the space to be detected, or moving a cartoon poster in and out of the space to be detected multiple times, causing the pattern and texture of the space to be detected to change.
[0063] The second feature mentioned above can be obtained by recording the time points when the space to be detected changes.
[0064] The present disclosure does not limit the specific form of the second feature. For example, it can be a sequence formed by multiple time points when changes occur in the space to be detected.
[0065] The following is a specific exemplary description of how to obtain the second feature.
[0066] In one embodiment, the switching of the flashlight causes a change in the space to be detected, and the second feature can be determined according to the working time of the flashlight. Figure 4 As shown, the camera detection method may include:
[0067] Step S410, obtaining the working time of the flashlight for flashing or illuminating the space to be inspected;
[0068] Step S420, determining a second characteristic of the space to be detected that changes with time according to the working time of the flash light.
[0069] It should be noted that when the changes in the space to be detected are constructed by a flashlight, the flashlight can be made to flash, or the flashlight can be kept turned on for a period of time for illumination (such as the flashlight function on a mobile phone). The working time of the flashlight can be sent to the data analysis device by a flashlight device (such as the above-mentioned change construction device), or the working time of the flashlight can be directly obtained when the data analysis device controls the flashlight to work. The working time of the flashlight includes the start time and end time of each flash or illumination, or includes the start time and duration of each flash or illumination, and the end time can be calculated. The start time and end time of each flash or illumination are used as the time point when the space to be detected changes, and the sequence formed can be used as the above-mentioned second feature.
[0070] The operation of the flashlight may be automatically controlled by the system or manually controlled by the user. In one implementation, step S410 may include:
[0071] In response to the operation of the flash control in the camera detection interface, the flash is controlled to flash or illuminate the space to be detected, and the working time of the flash is obtained.
[0072] Figure 5 A schematic diagram of a camera detection interface 500 is shown, which may be a user interface in a camera detection App. In the camera detection interface 500, a flash control 510 is provided, and the user may click, long press, etc. on it to flash once, and the system records the working time of the flash. It should be understood that the flash control 510 may also implement functions similar to a lighting switch, such as when a user clicks or long presses the flash control 510, the flash is triggered to turn on and remain on, and when the user clicks or long presses again, the flash is turned off, and the system records the working time of the flash.
[0073] In one embodiment, when a user uses the camera detection app for the first time or uses the flash function in the camera detection app for the first time, the user is required to allow the camera detection app to obtain permission to use the flash. After the user agrees, the app can call related system services to control the flash and obtain data such as the flash's working time.
[0074] In one embodiment, when the user does not use the change configuration device to change the space to be detected, for example, by manually switching curtains, lights, moving cartoon posters, etc., the data analysis device cannot obtain the time when the space to be detected changes from the change configuration device. Based on this, the camera detection method may include:
[0075] In response to an operation on a time control in a camera detection interface, a second feature of the space to be detected that changes with time is determined.
[0076] Among them, the time control is used to allow the user to manually record the time when the space to be detected changes. In the camera detection interface, relevant prompt information can be displayed to prompt the user to operate the time control when manually constructing the change of the control to be detected. For example, the prompt information can be "Please turn on and off the main light of the room several times, and click the xx button each time you turn on or off the light." The system records the time when the user operates the time control as the time when the space to be detected changes, and then the second feature can be obtained.
[0077] When the space to be detected changes, the image captured by the camera also changes. The camera usually processes the image by differential encoding or transmission, so when the image changes, the video data packets sent by the camera will also change, for example, the size or number of the video data packets will increase significantly.
[0078] As can be seen from the above, when there is a camera in the space to be detected, the change of the space to be detected should be correlated with the change of the video data packet sent by the camera. This exemplary embodiment determines whether the network data packet is correlated with the change of the space to be detected by matching the first feature with the second feature.
[0079] In one implementation, step S320 may include:
[0080] The first feature and the second feature are processed using a pre-trained machine learning model to output a matching result.
[0081] For example, a first sample feature of a large number of network data packets that change over time and a second sample feature of the corresponding test scene that changes over time can be obtained in the test scene; a first sample feature and a corresponding second sample feature form a sample data group; a part of the sample data group is obtained when the test scene is actually constructed and changed, and the first sample feature and the second sample feature are correlated, and their annotation data (Ground truth) is 1; the first sample feature and the second sample feature in another part of the sample data group are not correlated, and their annotation data is 0; the sample data group and its annotation data are used to train the initially constructed machine learning model, such as a neural network model, and when the preset accuracy rate is reached, a trained machine learning model is obtained. In actual detection, the above-mentioned first feature and second feature are input into the machine learning model, and the result of whether the two match is output.
[0082] In another embodiment, the first feature includes a first time point at which a network data packet changes, and the number of the first time points may be multiple; the second feature includes a second time point at which a space to be detected changes, and the number of the second time points may also be multiple. Thus, step S320 may include:
[0083] The first time point is matched with the second time point.
[0084] The purpose of matching the first time point with the second time point is to determine whether there is a correlation between the two time points in terms of time distribution.
[0085] For example, extract the timestamp and data packet size from the network data packet, and by fitting the relationship between the data packet size and time, the mutation point obtained by fitting can be determined as the first time point; record the time point when the space to be detected changes, that is, the second time point; pair the first time point with the second time point to obtain multiple time point pairs, each time point pair includes a first time point and a corresponding second time point; if the difference between the first time point and the second time point in each time point pair does not exceed a preset time difference threshold (which can be set according to experience, such as 1 second, 3 seconds, etc.), it is determined that the first time point and the second time point are matched successfully.
[0086] Considering that there may be a certain delay in the video data packet sent by the camera, time compensation can be performed on the first time point or the second time point as a whole. For example, a time compensation value is determined based on the time difference between the first first time point and the first second time point; then the time compensation value is added to all the second time points; then the first time point and the second time point are paired, and it is determined whether the difference between the first time point and the second time point in each time point pair does not exceed the time difference threshold, so as to obtain a matching result.
[0087] Figure 6 A schematic diagram is shown for matching the time when the size of the network data packet changes (i.e., the first time point) with the time when the flash light works (i.e., the second time point). It can be seen that although the first time point and the second time point are not completely consistent, the two show a strong correlation. After pairing the first time point and the second time point in pairs, the time difference value in each time point pair is calculated to be less than the time difference threshold of 3 seconds, and it can be determined that the first time point and the second time point are successfully matched.
[0088] In another embodiment, the first feature and the second feature can be used as two variables for correlation analysis. For example, the first feature can be the size of the network data packet at different times, and the second feature can be whether the flashlight is turned on at different times (the value is 1 if the flashlight is turned on, and the value is 0 if it is not turned on). Then, the statistical method of correlation analysis is used to analyze the two variables, and the probability value of the correlation is output. If the probability value reaches a preset probability threshold (such as 70%, 80%, etc.), it is determined that the first feature and the second feature match successfully.
[0089] Continue to refer Figure 3In step S330, it is determined whether there is a camera in the space to be detected based on the matching result of the first feature and the second feature.
[0090] When the first feature matches the second feature successfully, it is determined that there is a camera in the space to be detected, and when the first feature matches the second feature unsuccessfully, it is determined that there is no camera in the space to be detected. Then, the corresponding detection result can be displayed in the camera detection interface.
[0091] As can be seen from the above, only when the camera is located in the space to be detected and captures the image of the space to be detected, the video data packet it sends will respond to the changes in the space to be detected, so that the first feature matches the second feature. When the camera is located outside the space to be detected and does not capture the image of the space to be detected, even if the signal of the video data packet it sends passes through the space to be detected and is captured by the data capture device, since the video data packet will not respond to the changes in the space to be detected, the first feature will not match the second feature, and this exemplary embodiment will not misjudge the presence of a camera. Therefore, this exemplary embodiment can accurately lock the detection range within the space to be detected to ensure the accuracy of the detection results.
[0092] In one embodiment, the network data packets captured in step S310 may include multiple different types of data packets, such as data packets sent by multiple network devices in the space to be detected. Network data packets from different sources can be grouped according to the header information of the network data packets, and the header information includes but is not limited to: IP address (Internet Protocol, network protocol address), MAC address (Media Access Control, media access control address, i.e. physical address), encoding information, communication protocol information, etc. For example, network data packets can be grouped according to their destination IP addresses, and network data packets with the same destination IP address can be grouped. Furthermore, each group of network data packets can be analyzed for its first feature that changes with time to obtain multiple groups of first features, and each group of first features can be matched with the second feature that changes with time in the space to be detected. When at least one group of first features successfully matches the second feature, it is determined that there is a camera in the space to be detected.
[0093] In one embodiment, in addition to matching the first feature with the second feature, other features of the network data packet may also be analyzed to detect whether it is a video data packet sent by a camera. Specifically, the camera detection method may include:
[0094] Match the format characteristics of the network data packet with the preset format characteristics.
[0095] Correspondingly, in step S330, it can be determined whether there is a camera in the space to be detected based on the matching result of the first feature and the second feature, and the matching result of the format feature of the network data packet and the preset format feature.
[0096] Among them, the format characteristics of the network data packet are characteristics related to the data format, communication protocol, etc., including but not limited to port, traffic, MAC address, etc. When the camera sends a video data packet, it is necessary to make the video data packet have specific format characteristics based on a specific data format, communication protocol, etc., that is, the above-mentioned preset format characteristics. After capturing the network data packet, the format characteristics therein can be parsed and matched with the preset format characteristics, so that it can be detected from the data format whether the network data packet is a video data packet sent by the camera.
[0097] In one embodiment, the format features of the network data packet can be input into another pre-trained machine learning model (different from the machine learning model that matches the first feature and the second feature), and through processing and recognition by the machine learning model, a result of whether it matches the preset format features is output.
[0098] This exemplary embodiment can determine the final detection result by combining the matching results of the first feature and the second feature, and the matching results of the format feature of the network data packet and the preset format feature. Specifically, the matching results of the above two aspects can be set to an "or" relationship, that is, when any of the matching results is a successful match, it is determined that a camera exists, thereby further reducing the situation of missed reports; the matching results of the above two aspects can also be set to an "and" relationship, that is, when both matching results are successful matches, it is determined that a camera exists, thereby further reducing the situation of false alarms. The present disclosure does not limit this.
[0099] When constructing the changes in the space to be detected, the methods adopted can be divided into the following two types:
[0100] The first is to treat the overall changes in the structure of the detection space, such as switching lights and curtains, which will cause changes in the brightness of the entire space;
[0101] The second is to detect local changes in the spatial structure, such as turning on a flashlight or projecting a cartoon animation on a certain area.
[0102] If the second method is adopted, the position of the camera can be further detected. The following takes the local change of the flash structure as an example for explanation. It should be understood that the principle of the scheme is the same when the flash is replaced with other local changes in the structure.
[0103] In one embodiment, a flash can be made to flash the space to be detected in a variety of postures, so that the local area covered by the flash in different postures is different, and the working time of the flash in a variety of postures is obtained. Among them, an INS (Inertia Navagation System), such as the above-mentioned gyroscope sensor, can be configured in the variable structure device to measure the posture change of the device and output the absolute posture of the device based on a certain initial or reference posture. Alternatively, a camera module can be configured in the variable structure device to capture images of the space to be detected in different postures, perform visual positioning, and output the posture of the device. Correspondingly, reference Figure 7 As shown, the camera detection method may include:
[0104] Step S710, determining a second feature corresponding to each posture according to the working time of the flash light in each posture;
[0105] Step S720, matching the first feature with the second feature corresponding to each posture;
[0106] Step S730: When the first feature successfully matches the second feature corresponding to at least one posture, it is determined that there is a camera in the space to be detected.
[0107] Among them, the first feature successfully matches the second feature corresponding to at least one posture, indicating that the change of the network data packet is related to the change of the local area of the space to be detected corresponding to the posture. It can be determined that there is a camera in the space to be detected, and the camera can capture the image of the local area.
[0108] For further reference, Figure 7 As shown, the camera detection method may further include:
[0109] Step S740: determining the position of the camera according to the at least one posture.
[0110] At least one of the above-mentioned postures is called a suspicious posture. For example, the network data packets obtained in the suspicious posture can be parsed, and the orientation of the camera can be determined by combining the principle of radio orientation, and the deviation does not exceed 20 degrees.
[0111] In one implementation, the camera detection method may further include:
[0112] Acquire multiple images collected from the space to be detected, and determine the corresponding relationship between the image and the position and posture of the flash light;
[0113] The position of the camera is estimated based on the above suspicious postures and the correspondence between the image and the posture.
[0114] Among them, the relative position relationship between the camera and the flash used to collect images is fixed. Through pre-calibration, the posture transformation relationship between the two can be determined, so that the posture of the camera when collecting images is converted into the posture of the flash, and the correspondence between the image and the posture of the flash is achieved. The camera and the flash can also be a matching camera module, for example, the variable structure device is a mobile phone, and the camera module on the mobile phone includes an RGB camera and a flash. In order to simplify the calculation, the posture of the camera can also be equated with the posture of the flash.
[0115] In the above-mentioned suspicious posture, the local area covered by the flash is the local area that the camera can capture, and it is inferred that the camera is located in the opposite direction of the local area. Therefore, according to the correspondence between the image and the posture, the image corresponding to the opposite direction of the local area is found. For example, after determining the suspicious posture, the suspicious posture is rotated 180 degrees to obtain the reverse posture, and the image corresponding to the reverse posture is obtained to determine that the camera is located in the area where the image is located.
[0116] In one embodiment, a user holds a mobile phone to flash and capture images of different areas of the space to be detected. The mobile phone can establish map data for the space to be detected based on the captured images and its own posture, such as a map formed by a three-dimensional point cloud; after determining the suspicious posture, the images corresponding to the suspicious posture can be found in the captured images, and the areas where these images are located are the local areas that can be photographed by the camera; then, the area where the image is located is determined in the map data, that is, the local area that can be photographed by the camera, and based on the positional relationship, the area in the opposite direction is further determined as the area where the camera may be located, thereby realizing the estimation of the camera position.
[0117] In one embodiment, when the user holds a mobile phone to flash and capture images of different areas of the space to be detected, guidance information can be presented to enable the user to align the flash and capture images with different areas of the space to be detected in a reasonable posture. For example, the user first uses a mobile phone to capture images of the entire space to be detected and uploads them to the server. The server establishes map data for the space to be detected by executing the SLAM (Simultaneous Localization And Mapping) algorithm. Then, the server plans a reasonable way to construct spatial flash changes for the user based on the map data, guides the user to a suitable position (usually the central position) in the space to be detected, starts flashing from a certain direction, guides the user to rotate clockwise or counterclockwise, and displays a prompt message "Please stay at this position and flash" every time it rotates to a suitable angle, thereby achieving a reasonable and comprehensive detection of the entire space to be detected.
[0118] In one embodiment, reference Figure 8 As shown, after determining the position of the camera, you can also perform the following steps:
[0119] Step S810, determining a candidate image where the camera is located from the multiple images according to the position of the camera;
[0120] Step S820: Prompt the position of the camera according to the candidate image.
[0121] The candidate image may be an image corresponding to the above-mentioned reverse posture, or a corresponding image may be found according to the area where the camera may be located in the map data as a candidate image. The candidate image or a local area in the candidate image (i.e., the local area where the camera is located) may be displayed in the camera detection interface, and related text prompt information may also be displayed at the same time, such as "there may be a camera in the following area", so that the user can further search for the camera in the space to be detected.
[0122] Furthermore, it is also possible to detect whether there is a suspicious light source in the candidate image, or prompt the user to realign the camera to the area of the candidate image. The system detects whether there is a suspicious light source, thereby locking the position of the camera more accurately.
[0123] In one implementation, the area where the camera may be located may be marked in the map data of the space to be detected, and related text prompt information may be displayed to facilitate further searching by the user.
[0124] The exemplary embodiment of the present disclosure also provides a camera detection device, which can be configured in the above-mentioned analysis device. Fig. 9 As shown, the camera detection device 900 may include:
[0125] The data acquisition module 910 is configured to acquire network data packets in the space to be detected;
[0126] The feature matching module 920 is configured to match the first feature of the network data packet that changes over time with the second feature of the space to be detected that changes over time;
[0127] The detection result determination module 930 is configured to determine whether there is a camera in the space to be detected based on the matching result of the first feature and the second feature.
[0128] In one implementation, the data acquisition module 910 is further configured to:
[0129] Obtaining the working time of the flashlight for flashing or illuminating the space to be inspected;
[0130] The second characteristic of the space to be detected that changes with time is determined according to the working time of the flash lamp.
[0131] In one implementation, the operating time of the flashlight includes the operating time of the flashlight in multiple positions.
[0132] The data acquisition module 910 is configured to determine the second feature corresponding to each posture according to the working time of the flash in each posture.
[0133] The detection result determination module 930 is configured to determine that there is a camera in the space to be detected when the first feature successfully matches the second feature corresponding to at least one posture.
[0134] In one implementation, the detection result determination module 930 is further configured to determine the position of the camera according to the at least one posture mentioned above.
[0135] In one implementation, the data acquisition module 910 is further configured to acquire multiple images captured of the space to be detected, and determine the corresponding relationship between the image and the position and posture of the flash.
[0136] The detection result determination module 930 is configured to determine the position of the camera according to the at least one posture and the correspondence between the image and the posture.
[0137] In one implementation, the detection result determination module 930 is configured to:
[0138] After determining the position of the camera, determining a candidate image where the camera is located from the multiple images according to the position;
[0139] Prompt the camera position based on the candidate images.
[0140] In one implementation, the data acquisition module 910 is configured to:
[0141] In response to the operation of the flash control in the camera detection interface, the flash is controlled to flash or illuminate the space to be detected, and the working time of the flash is obtained.
[0142] In one implementation, the data acquisition module 910 is configured to:
[0143] In response to an operation on a time control in a camera detection interface, a second feature of the space to be detected that changes with time is determined.
[0144] In one embodiment, the feature matching module 920 is configured to process the first feature and the second feature using a pre-trained machine learning model and output a matching result.
[0145] In one embodiment, the feature matching module 920 is further configured to match the format feature of the network data packet with a preset format feature;
[0146] The detection result determination module 930 is configured to determine whether there is a camera in the space to be detected based on the matching result of the first feature and the second feature, and the matching result of the format feature of the network data packet and the preset format feature.
[0147] The details of each part of the above device have been described in detail in the method part implementation method, so they will not be repeated here.
[0148] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. In one embodiment, the program product can be implemented as a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.
[0149] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0150] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0151] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0152] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0153] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0154] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0155] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A camera detection method, characterized in that: include: Obtain network data packets in the space to be detected; Matching a first feature of the network data packet that changes over time with a second feature of the space to be detected that changes over time; Determining whether there is a camera in the space to be detected according to a matching result between the first feature and the second feature; The method further includes: obtaining the working time of the flashlight for flashing or illuminating the space to be detected; determining the second characteristic of the space to be detected that changes with time according to the working time of the flashlight; The working time of the flashlight includes the working time of the flashlight in various positions; Determining the second feature of the space to be detected that changes with time according to the working time of the flashlight includes: determining the second feature corresponding to each posture according to the working time of the flashlight in each posture; The determining, based on the matching result between the first feature and the second feature, whether there is a camera in the space to be detected includes: when the first feature successfully matches the second feature corresponding to at least one posture, determining that there is a camera in the space to be detected; The method also includes: acquiring multiple images captured of the space to be detected, and determining the correspondence between the images and the posture of the flash; determining the position of the camera according to the at least one posture and the correspondence between the image and the posture; determining a candidate image where the camera is located in the multiple images according to the position of the camera; and indicating the position of the camera according to the candidate image.
2. The method according to claim 1, characterized in that The obtaining of the working time of the flashlight flashing or illuminating the space to be detected includes: In response to the operation of the flash control in the camera detection interface, the flash is controlled to flash or illuminate the space to be detected, and the working time of the flash is obtained.
3. The method according to claim 1, characterized in that The method further comprises: In response to an operation on a time control in a camera detection interface, a second feature of the space to be detected that changes with time is determined.
4. The method according to claim 1, characterized in that: The matching of the first feature of the network data packet that changes over time with the second feature of the space to be detected that changes over time includes: The first feature and the second feature are processed using a pre-trained machine learning model to output a matching result.
5. The method according to claim 1, characterized in that The method further comprises: Matching the format characteristics of the network data packet with preset format characteristics; The determining, according to the matching result of the first feature and the second feature, whether there is a camera in the to-be-detected space includes: According to the matching result of the first feature and the second feature, and the matching result of the format feature of the network data packet and the preset format feature, it is determined whether there is a camera in the space to be detected.
6. A camera detection device, characterized in that: include: A data acquisition module is configured to acquire network data packets in the space to be detected; A feature matching module, configured to match a first feature of the network data packet that changes over time with a second feature of the space to be detected that changes over time; a detection result determination module, configured to determine whether there is a camera in the to-be-detected space according to a matching result between the first feature and the second feature; Wherein, the data acquisition module is further configured to: acquire the working time of the flashlight for flashing or illuminating the space to be detected; determine the second characteristic of the space to be detected that changes with time according to the working time of the flashlight; The working time of the flashlight includes the working time of the flashlight in various positions; The data acquisition module is configured to determine the second feature corresponding to each posture according to the working time of the flash light in each posture; The detection result determination module is configured to determine that there is a camera in the to-be-detected space when the first feature successfully matches the second feature corresponding to at least one posture; Wherein, the data acquisition module is further configured to: acquire a plurality of images collected from the space to be detected, and determine the corresponding relationship between the images and the position and posture of the flash light; The detection result determination module is also configured to: determine the position of the camera based on the at least one posture and the correspondence between the image and the posture; determine a candidate image where the camera is located in the multiple images based on the position of the camera; and prompt the position of the camera based on the candidate image.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 5 by executing the executable instructions.