WO2022083343A1 - 用于检测视频监控设备的方法和电子设备 - Google Patents

用于检测视频监控设备的方法和电子设备 Download PDF

Info

Publication number
WO2022083343A1
WO2022083343A1 PCT/CN2021/117425 CN2021117425W WO2022083343A1 WO 2022083343 A1 WO2022083343 A1 WO 2022083343A1 CN 2021117425 W CN2021117425 W CN 2021117425W WO 2022083343 A1 WO2022083343 A1 WO 2022083343A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
target device
port
protocol
video surveillance
Prior art date
Application number
PCT/CN2021/117425
Other languages
English (en)
French (fr)
Inventor
龙水平
赵晓娜
黄庆超
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US18/250,185 priority Critical patent/US20230396580A1/en
Priority to EP21881762.5A priority patent/EP4221133A4/en
Publication of WO2022083343A1 publication Critical patent/WO2022083343A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/35Network arrangements, protocols or services for addressing or naming involving non-standard use of addresses for implementing network functionalities, e.g. coding subscription information within the address or functional addressing, i.e. assigning an address to a function
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the present application relates to the technical field of video surveillance equipment detection, and in particular, to a method and electronic equipment for detecting video surveillance equipment.
  • IPC internet protocol camera
  • Wi-Fi wireless fidelity
  • the monitoring screen can be uploaded to the cloud for storage in real time, and can also be viewed in real time by the user through a monitoring application (application, APP), thereby leading to the occurrence of an event of user privacy violation.
  • these testing equipment mainly use optics, heat, electromagnetic wave principle to test IPC equipment. For example, use a flash to illuminate the surroundings and observe whether there are reflective spots; use a thermal imager to scan the surroundings to observe whether there are local hot spots; use a video scanner to scan 50MHz-3GHz fluctuations to observe whether there are devices in this band.
  • these specialized detection devices are relatively expensive, and the hardware used is difficult to integrate into the mobile phone; and users are often required to actively search for detections in the space to be searched, resulting in an unfriendly user experience.
  • the camera detection function in their own APPs, generally scanning and detecting other devices under the network in the local area network connected to the mobile phone to obtain device information.
  • the detection methods used are relatively simple, and the fingerprint database data maintained is not comprehensive or updated in time, and there are many missed detections. Not only that, after the actual test, these detection functions are still very unstable, the number of each detection is different, the fluctuation is large, and the missed detection rate is high.
  • the method and electronic device for detecting video surveillance equipment provided by the present application can improve the detection accuracy and reduce the missed detection rate.
  • the applicable scene of the technical solution of the present application may be a hotel lobby, a room, etc., and the electronic device of the present application can effectively detect maliciously installed IPCs in such places, thereby reducing the occurrence of user privacy violations.
  • a method for detecting a video surveillance device is provided, the method is applied to an electronic device, and includes: acquiring media access control MAC address information of at least one target device, wherein the electronic device and the target device Access the same wireless network; obtain the port information of the target device; determine whether the target device is a video surveillance device according to the MAC address information; if it cannot be determined that the target device is the video surveillance device according to the MAC address information The device determines whether the target device is the video surveillance device according to first information, where the first information includes the MAC address information and the port information, or the first information includes the port information ; If it cannot be determined that the target device is the video surveillance device according to the first information, then the detection protocol based on the TCP port or the detection protocol based on the UDP port obtains the fingerprint information of the target device; Determine according to the fingerprint information Whether the target device is the video surveillance device.
  • the solution provided by this application determines the target device by obtaining the MAC address information/port information of the target device connected to the same wireless network, and obtaining the fingerprint information of the target device based on the detection protocol of the TCP port or the UDP port according to different situations. Whether it is a video surveillance device.
  • the technical solution of the present application uses a variety of detection methods including MAC address information, port information, detection protocols based on TCP ports or UDP ports, and provides a more comprehensive detection method for various types of video surveillance equipment on the market.
  • the solution effectively improves the detection accuracy and reduces the missed detection rate.
  • the applicable scene of the technical solution of the present application may be a hotel lobby, a room, etc., and the electronic device of the present application can effectively detect maliciously installed IPCs in such places, thereby reducing the occurrence of user privacy violations.
  • the determining whether the target device is a video surveillance device according to the MAC address information includes: if the MAC address information is first-level MAC address information, determining the target device The device is the video surveillance device; if the MAC address information is not the first-level MAC address information, it cannot be determined that the target device is the video surveillance device.
  • the solution provided by the present application by determining whether the acquired MAC address information of the target device is the first-level MAC address information, and identifying whether the target device is an IPC device, can save the time for the electronic device to detect the IPC device and improve the detection efficiency.
  • determining whether the target device is the video surveillance device according to the first information includes: if the port information is the first-level port information, determining that the target device is The video surveillance device; if the port information is second-level port information and the MAC address information is second-level MAC address information, determine that the target device is the video surveillance device.
  • the solution provided by the present application identifies whether the target device is an IPC device through the port information of the target device, or the port information combined with the MAC address information. At the same time, improve the comprehensiveness of detection.
  • the TCP port-based detection protocol obtains the fingerprint information of the target device, including:
  • the solution provided by this application can further ensure the accuracy of the obtained information and effectively improve the detection accuracy by determining the corresponding detection protocol according to the port information, then sending the corresponding detection message, and then extracting the fingerprint information from the received response message. .
  • the TCP port-based detection protocol includes web protocol/hypertext transfer protocol Http, domain name system DNS protocol, Telnet protocol, text transfer protocol FTP, and real-time streaming protocol RTSP. one or more protocols.
  • the UDP port-based detection protocol obtains the fingerprint information of the target device, including:
  • a corresponding UDP detection message is sent to the address and port corresponding to each detection protocol according to a preset detection protocol list, and a response message is received on the corresponding listening port, and then the received response message is extracted from the Fingerprint information can further ensure the accuracy of the obtained information and effectively improve the detection accuracy.
  • the UDP port-based detection protocol includes the Open Network Video Interface Forum ONVIF protocol, the Multicast Domain Name System (MDNS) protocol, the Session Initiation Protocol (SIP), the Domain Name System (DNS) protocol, and a proprietary protocol. one or more of the protocols.
  • MDNS Multicast Domain Name System
  • SIP Session Initiation Protocol
  • DNS Domain Name System
  • the fingerprint information of the target device includes one or more of the following information:
  • the method further includes:
  • auxiliary information of the target device includes one or more of the following information: location information, Wi-Fi SSID or Wi-Fi name;
  • the detection accuracy can be improved.
  • the method further includes:
  • the electronic device if it does not detect the video surveillance device under the currently accessed first AP, it switches to the second AP under the wireless network to continue to identify the video surveillance device, which can improve the comprehensiveness of detection.
  • a method for detecting a video surveillance device is provided. The method is applied to an electronic device, including: acquiring media access control MAC address information of at least one target device, wherein the electronic device and the target device Access the same wireless network; determine whether the target device is a video surveillance device according to the MAC address information.
  • whether the target device is a video surveillance device is determined by the MAC address information of the target device, which can save the time for the electronic device to detect the IPC device and improve the detection efficiency.
  • the determining whether the target device is a video surveillance device according to the MAC address information includes:
  • the MAC address information is the first-level MAC address information, then determine that the target device is the video surveillance device;
  • the target device is the video surveillance device.
  • the method further includes:
  • the target device is the video surveillance device according to the MAC address information
  • determine whether the target device is the video surveillance device according to first information where the first information includes the MAC address information and port information, or, the first information includes the port information, and the port information is acquired according to the state of the port.
  • the electronic device if the electronic device cannot determine that the target device is a video surveillance device according to the MAC address information, it can further determine according to the first information, which can improve the detection accuracy.
  • determining whether the target device is the video surveillance device according to the first information includes:
  • the port information is the first-level port information, determine that the target device is the video surveillance device;
  • the target device is the video surveillance device.
  • the method further includes:
  • the target device is the video surveillance device according to the first information, obtain the fingerprint information of the target device by a TCP port-based detection protocol or a UDP port-based detection protocol;
  • the electronic device if the electronic device cannot determine that the target device is the video surveillance device according to the first information, it can be further determined based on the fingerprint information obtained by the detection protocol, which can improve the detection accuracy.
  • the method further includes:
  • the target device cannot be determined to be the video surveillance device according to the MAC address information, obtain the fingerprint information of the target device by a TCP port-based detection protocol or a UDP port-based detection protocol;
  • the target device cannot be determined to be a video surveillance device according to the MAC address information, and the determination is made based on the detection protocol, which saves the time for the electronic device to detect the IPC device and improves the detection efficiency.
  • the TCP port-based detection protocol obtains the fingerprint information of the target device, including:
  • the solution provided by this application can further ensure the accuracy of the obtained information and effectively improve the detection accuracy by determining the corresponding detection protocol according to the port information, sending the corresponding detection message, and then extracting the fingerprint information from the received response message.
  • the TCP port-based detection protocol includes web protocol/hypertext transfer protocol Http, domain name system DNS protocol, Telnet protocol, text transfer protocol FTP protocol, real-time streaming protocol RTSP One or more of the protocols.
  • the UDP port-based detection protocol obtains the fingerprint information of the target device, including:
  • the fingerprint information of the target device is extracted according to the response message.
  • a corresponding UDP detection message is sent to the address and port corresponding to each detection protocol according to a preset detection protocol list, and a response message is received on the corresponding listening port, and then the received response message is extracted from the Fingerprint information can further ensure the accuracy of the obtained information and effectively improve the detection accuracy.
  • the UDP port-based detection protocol includes the Open Network Video Interface Forum ONVIF protocol, the Multicast Domain Name System (MDNS) protocol, the Session Initiation Protocol (SIP) protocol, the Domain Name System (DNS) protocol, and the proprietary protocol.
  • MDNS Multicast Domain Name System
  • SIP Session Initiation Protocol
  • DNS Domain Name System
  • proprietary protocol One or more of the protocols.
  • the fingerprint information of the target device includes one or more of the following information:
  • the method further includes:
  • auxiliary information of the target device includes one or more of the following information: location information, Wi-Fi SSID or Wi-Fi name;
  • the detection accuracy can be improved.
  • the method further includes:
  • the electronic device if it does not detect the video surveillance device under the currently accessed first AP, it switches to the second AP under the wireless network to continue to identify the video surveillance device, which can improve the comprehensiveness of detection.
  • a method for detecting a video surveillance device is provided, the method is applied to an electronic device, and includes: acquiring fingerprint information of at least one target device based on a UDP port detection protocol, wherein the electronic device and the target The device is connected to the same wireless network; whether the target device is a video surveillance device is determined according to the fingerprint information.
  • the technical solution provided by the present application is to obtain the device fingerprint information of the target device through a UDP port-based detection protocol, and match the obtained device fingerprint information with a preset fingerprint information database to determine whether the detected target device is an IPC device .
  • the technical solution can effectively improve the detection efficiency of the IPC equipment while reducing the cost.
  • the method before the device fingerprint information of at least one target device is acquired by the UDP port-based detection protocol, the method further includes:
  • the MAC address information is the first-level MAC address information, then determine that the target device is a video surveillance device;
  • the target device is a video surveillance device
  • the device fingerprint information of the target device is acquired based on the detection protocol of the UDP port.
  • the electronic device before the electronic device determines that the target device is a video surveillance device based on the UDP port detection protocol, it first performs a priori judgment according to the acquired MAC address information. If it can be determined that the target device is a video surveillance device according to the MAC address information, it is not necessary to judge based on the detection protocol; if the target device cannot be determined to be a video surveillance device according to the MAC address information, the judgment is made based on the detection protocol, which saves the electronic equipment detecting IPC equipment. time and improve the detection efficiency.
  • the UDP port-based detection protocol obtains fingerprint information of at least one target device, including:
  • the UDP port-based detection protocol includes one or more of the following protocols:
  • the fingerprint information of the target device includes one or more of the following information:
  • the method further includes:
  • auxiliary information of the target device includes one or more of the following information: location information, Wi-Fi SSID or Wi-Fi name;
  • the method further includes:
  • a method for detecting a video surveillance device is provided.
  • the method is applied to an electronic device and includes: acquiring port information of at least one target device, wherein the electronic device and the target device are connected to the same wireless network ; Determine whether the target device is a video surveillance device according to the port information.
  • whether the target device is a video surveillance device is determined by the port information of the target device, which can save the time for the electronic device to detect the IPC device and improve the detection efficiency.
  • the determining whether the target device is a video surveillance device according to the port information includes:
  • the port information is the first-level port information, determine that the target device is a video surveillance device
  • the port information is not the first-level port information, it cannot be determined that the target device is a video surveillance device.
  • the method further includes:
  • the target device is a video surveillance device according to the port information
  • determine whether the target device is a video surveillance device according to second information where the second information includes MAC address information and the port information, or, The second information includes the MAC address information, wherein the MAC address information is obtained through host discovery.
  • the electronic device if the electronic device cannot determine that the target device is a video surveillance device according to the port information, it can further determine according to the second information, which can improve the detection accuracy.
  • the determining whether the target device is a video surveillance device according to the second information includes:
  • the target device is the video surveillance device
  • the target device is the video surveillance device.
  • the method further includes:
  • the target device is a video surveillance device according to the second information, obtain the fingerprint information of the target device by a TCP port-based detection protocol or a UDP port-based detection protocol;
  • the electronic device if the electronic device cannot determine that the target device is the video surveillance device according to the second information, it can be further determined based on the fingerprint information obtained by the detection protocol, which can improve the detection accuracy.
  • the TCP port-based detection protocol obtains the fingerprint information of the target device, including:
  • the TCP port-based detection protocol includes one or more of the web/Http protocol, the DNS protocol, the Telnet protocol, the FTP protocol, and the RTSP protocol.
  • the UDP port-based detection protocol obtains the fingerprint information of the target device, including:
  • the UDP port-based detection protocol includes one or more of ONVIF protocol, MDNS protocol, SIP protocol, DNS protocol, and proprietary protocol.
  • the fingerprint information of the target device includes one or more of the following information:
  • the method further includes:
  • auxiliary information of the target device includes one or more of the following information: location information, Wi-Fi SSID or Wi-Fi name;
  • the method further includes:
  • an apparatus in a fifth aspect, is provided, the apparatus is included in an electronic device, and the apparatus has a function of implementing the behavior of the electronic device in the above-mentioned aspect and possible implementations of the above-mentioned aspect.
  • the functions can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions.
  • an electronic device comprising: one or more processors; a memory; one or more application programs; and one or more computer programs. Wherein, one or more computer programs are stored in the memory, the one or more computer programs comprising instructions.
  • the electronic device is caused to perform the method for detecting a video surveillance device in the above-mentioned first aspect to the fourth aspect or any one of the possible implementations of the first aspect to the fourth aspect.
  • a chip system comprising at least one processor, and when program instructions are executed in the at least one processor, any one of the first to fourth aspects or the first to fourth aspects described above is implemented.
  • the function of the method for detecting a video surveillance device in a possible implementation is realized on the electronic device.
  • a computer storage medium comprising computer instructions, when the computer instructions are executed on an electronic device, the electronic device may perform any one of the first to fourth aspects or the first to fourth aspects.
  • a ninth aspect provides a computer program product that, when the computer program product runs on an electronic device, enables the electronic device to perform any possible design of the first to fourth aspects or the first to fourth aspects.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a wireless communication system provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an augmented service set provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a group of GUIs provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of an internal algorithm of a detection device provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a detection device interacting with a target device in an RTSP detection manner according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a detection device interacting with a target device in an ONVIF protocol detection manner provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram illustrating that a detection device according to an embodiment of the present application interacts with a target device and a media server in a SIP protocol detection manner.
  • FIG. 10 is a schematic flowchart of another method for detecting a video surveillance device provided by an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of another electronic device provided by an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of another electronic device provided by an embodiment of the present application.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • An embodiment of the present application provides a method for detecting a video surveillance device, and the method is applied to an electronic device.
  • the electronic device obtains the MAC address information/port information of a target device connected to the same wireless network, and according to different situations
  • the detection protocol based on the TCP port or the UDP port obtains the fingerprint information of the target device, so as to determine whether the target device is a video surveillance device.
  • the technical solution of the present application uses a variety of detection methods including MAC address information, port information, detection protocols based on TCP ports or UDP ports, and provides a more comprehensive detection method for various types of video surveillance equipment on the market. The solution effectively improves the detection accuracy and reduces the missed detection rate.
  • the applicable scene of the technical solution of the present application may be a hotel lobby, a room, etc., and the electronic device of the present application can effectively detect maliciously installed IPCs in such places, thereby reducing the occurrence of user privacy violations.
  • the method and electronic device provided in the present application can also be used for the detection of ordinary IPC in a home environment.
  • the method for detecting a video surveillance device can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, and laptops.
  • AR augmented reality
  • VR virtual reality
  • ultra-mobile personal computer ultra-mobile personal computer
  • netbook personal digital assistant
  • PDA personal digital assistant
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194 and user Identity module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc.
  • different processing units may be independent components, or may be integrated in one or more processors.
  • the construction and sending of the detection message, the construction of the device fingerprint information database, the matching of the acquired device fingerprint information with the fingerprint information database to identify the IPC device, the switching of the wireless access point, etc. in the embodiments of the present application can all be performed by the processor. 110 to complete.
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • the processor 110 may further be provided with a memory for storing instructions and data, for example, information of some IPC devices may be stored to form a fingerprint information database.
  • the memory in the processor 110 may be a cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 101 in processing data or executing instructions.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interface, SIM card interface and/or USB interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices.
  • the USB interface 130 can also be used to connect an earphone, and play audio through the earphone.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode, or an active matrix organic light emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • electronic device 100 may include one or more display screens 194.
  • the display screen 194 in FIG. 1 can be bent.
  • the above-mentioned display screen 194 can be bent means that the display screen can be bent to any angle at any position, and can be maintained at the angle.
  • the display screen 194 of the electronic device 100 may be a flexible screen.
  • the flexible screen has attracted much attention due to its unique characteristics and great potential.
  • flexible screens have the characteristics of strong flexibility and bendability, which can provide users with new interactive methods based on the bendable characteristics, and can meet more needs of users for electronic devices.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize parameters such as exposure and color temperature of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or more cameras 193 .
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 may execute the above-mentioned instructions stored in the internal memory 121, thereby causing the electronic device 101 to execute the volume control method, various applications and data processing provided in some embodiments of the present application.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the stored program area may store the operating system; the stored program area may also store one or more applications (such as gallery, contacts, etc.) and the like.
  • the storage data area may store data (such as photos, contacts, etc.) created during the use of the electronic device 101 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 110 may cause the electronic device 101 to execute the instructions provided in the embodiments of the present application by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110 . Methods of controlling volume, and other applications and data processing.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime environment (Android runtime) and system libraries, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application package may also include the application of the first application mentioned below.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer, and the application framework layer includes some predefined functions.
  • API application programming interface
  • the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage the window program.
  • the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and take screenshots.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, and the like.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, which can disappear automatically after a short stay, without user interaction, or with user interaction for the next step.
  • the notification manager may notify the user of a message or the like related to the detection of the video surveillance device.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, prompt text information in the status bar, sound a prompt, electronic equipment vibrates, indicator lights flash, etc.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library media library
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of many common audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG and PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, compositing and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the workflow of the software and hardware of the electronic device 100 is exemplarily described below with reference to the scenario of starting the first application.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the first application icon, as an example, the first application invokes the interface of the application framework layer, starts the first application, and then starts the Wi-Fi by calling the kernel layer.
  • -Fi and other drivers receive data from other electronic devices through the wireless communication module 160, such as Wi-Fi data from the target device.
  • Wireless access point It is the creator of a wireless network and the central node of the network.
  • a wireless router used in a general home or office can be considered an AP.
  • FIG. 3 is a schematic diagram of a wireless communication system according to an embodiment of the present application.
  • a wireless communication system may generally include one or more wireless APs and one or more terminal devices.
  • FIG. 3 takes the wireless communication system 300 including wireless AP10 , terminal device 30 , terminal device 40 , and terminal device 50 as an example.
  • the wireless communication system 300 further includes the server 20
  • FIG. 3 is only a schematic diagram, and the communication system may also include other network devices, such as core network devices, wireless relay devices and wireless backhaul devices, which are not shown in FIG. 3 .
  • the embodiments of the present application do not limit the number of network devices and terminal devices included in the mobile communication system.
  • each terminal device connected to the wireless AP can be called a station, such as terminal device 30, terminal device 40, terminal device 50 or other terminal devices that can be networked as shown in FIG. 3 or user equipment.
  • BSS Basic Service Set
  • LAN local area network
  • Extended service set (extension service set, ESS): Multiple BSSs can form an extended network, called an ESS network, which can be understood as a larger network formed by multiple BSSs using the same service set identifier (SSID). Scaled virtual BSS. Among them, STAs within an ESS network can communicate with each other.
  • ESS network which can be understood as a larger network formed by multiple BSSs using the same service set identifier (SSID).
  • SSID service set identifier
  • STAs within an ESS network can communicate with each other.
  • FIG. 4 is a schematic diagram of an ESS 400 according to an embodiment of the present application. As shown in FIG. 4, the ESS 400 consists of two BSSs (BSS1 and BSS2, respectively).
  • SSID It is the network identifier of an ESS, which can be understood as the name of the WIFI searched by the user with a mobile phone and other networked devices. All APs in the same ESS must have the same SSID, otherwise they cannot communicate.
  • Basic Service Set Identifier (basic SSID, BSSID): The identifier of a BSS, which is actually the media access control (MAC) address of the AP (router), which is used to identify the BSS managed by the AP.
  • MAC media access control
  • a company has a relatively large area and has installed several wireless access points. Company employees only need to know one SSID to access the wireless network anywhere within the company.
  • the BSSID is actually the MAC address of each wireless access point. When employees move within the company, the SSID is constant, but the BSSID is constantly changing as employees switch to different wireless access points.
  • the router can form a wireless network.
  • Figure 5 shows a set of GUIs of the mobile phone, wherein from (a) in Figure 5 to (e) in Figure 5 shows that the mobile phone can detect whether there is an IPC device in the current space under the first application (that is, in the figure camera).
  • the GUI is the desktop of the mobile phone.
  • the mobile phone detects that the user clicks the icon 501 of the first application on the desktop, the first application can be started, and the GUI shown in (b) of FIG. 5 is displayed, which can be called a detection interface.
  • the mobile phone can start to detect whether there is an IPC device in the current space, and the display is shown in (c) of FIG. 5 . GUI shown.
  • FIG. 5 it is an interface in which the mobile phone is scanning.
  • the 2% shown in the figure indicates that the detection progress of the mobile phone is 2% at this time.
  • the current mobile phone can also be displayed in real time. Accessed AP, Wi-Fi name, MAC address, device name and other information.
  • the mobile phone interface can display "two cameras found", and can also display the detected video surveillance equipment (camera) Detailed information, as shown in Figure 5 "Device 1" shown in (e): the name “A” of the connected network and the MAC address information of the device “AA:BB:CC:11:22:33”, “Device 2": the access network The name "A” and the MAC address information of the device "11:22:33:AA:BB:CC”.
  • the first application suggests locating detailed locations.
  • the user clicks the device name or the control corresponding to the right side of the device name the selected camera can be further positioned.
  • the above process can also implement the detection of the video surveillance device in the form of voice. For example, if the mobile phone detects that there is a video surveillance device in the current network space, it can remind the user that there is a video surveillance device in the current network space in the form of voice playback; if the mobile phone detects that there is no video surveillance device in the network space, it can prompt the user in the form of voice playback. There are currently no video surveillance devices in the cyberspace.
  • the process is basically the same as the process shown in FIG. 5 , only the display form is different, and for brevity, it will not be repeated here.
  • the user can be prompted to open the first application to detect whether there is an IPC device in the current network space, and the detection result can be displayed or voice prompted to the user; or , if the user's mobile phone is connected to the WIFI network of the hotel or hotel, it can independently detect whether there is an IPC device in the current network space, and display the detection result or give a voice prompt to the user; this application does not have any information on how to start the first application for IPC detection. be restricted.
  • FIG. 6 shows a flowchart of an internal algorithm of a detection device provided by an embodiment of the present application.
  • the detection device acquires the MAC address information of the target device by using the host discovery process.
  • the embodiment of the present application uses the protocol in the open system interconnection model (open system interconnection model, OSI) to perform host discovery.
  • the address resolution protocol (ARP) in the data link layer, or the network control message protocol (ICMP) in the network layer is used to determine whether there are other surviving targets in the network to which it is connected.
  • the device that is, the device that is connected to the network and is in normal working state
  • IP Internet Protocol
  • the detection device matches and identifies the acquired MAC address corresponding to each target device based on the MAC information base.
  • the information in the above-mentioned MAC information database includes but is not limited to the MAC identification information corresponding to the WiFi manufacturer and its corresponding level.
  • the multiple MAC identification information included in the MAC information base can be classified into different levels according to different manufacturers, and different levels represent the probability that the corresponding device is an IPC device.
  • the MAC addresses corresponding to manufacturers A and B can be divided into level 1
  • the MAC addresses corresponding to manufacturers C and D can be divided into 2 levels
  • the MAC addresses corresponding to manufacturer E can be divided into 3 levels, the higher the level (such as Level 1), the higher the probability that the device is an IPC device, and the lower the level (eg, level 3), the lower the probability that the device is an IPC device.
  • the detection device obtains the MAC addresses of 4 target devices (target device 1, target device 2, target device 3 and target device 4 respectively), it is assumed that the MAC address of target device 1 matches the information in the specific MAC information database as The MAC address corresponding to manufacturer A, the MAC addresses of target device 2 and target device 3 are the MAC address corresponding to manufacturer C and the MAC address corresponding to manufacturer D respectively after matching, and the MAC address corresponding to manufacturer E after matching is the MAC address of target device 4 MAC address, then it can be determined that the level of target device 1 is level 1, which is very likely to be an IPC device.
  • the detection device can notify the user that target device 1 is an IPC device, target device 2 and target device 3 are level 2, and target device 4.
  • the level is level 3, and whether the target device 2-4 is an IPC device can wait for further confirmation.
  • the detection device determines whether the target device is an IPC device after matching and identifying the acquired MAC address with the information in the MAC information base. If it can be determined that the target device is an IPC device, the user can be notified that there is an IPC device in the current space; UDP port protocol detection information) to determine whether the target device is an IPC device.
  • S730 use port scanning to acquire port information of the target device, and identify the port information.
  • the detection device can use the transmission control protocol (TCP)/user datagram protocol (UDP) port scan to obtain the port information of the target device.
  • TCP transmission control protocol
  • UDP user datagram protocol
  • the detection device constructs a TCP probe message or UDP probe message and sends it to the target device, and then judges whether the port of the target device is in an open state according to the response of the target device to the probe message, thereby obtaining the open port list corresponding to the target device. For example, the detection device sends a TCP connection request to a certain port number of the target device. If it receives an RST response from the target device, it confirms that the port of the target device is in a closed state. If it receives an acknowledgement character (ACK) response, the port is open.
  • ACK acknowledgement character
  • the above-mentioned port list may be a fixed number of port lists set based on common protocol types, for example, the number of ports may be set based on TCP or UDP; or, the port list may also be updated according to each/previous detection result Dynamic port list.
  • the update and scan of the port list can be based on the following methods:
  • the detection device can keep the frequently used or open service port numbers of the IPC devices detected each time, and delete the remaining port numbers to update the port list; or, the detection device can update the port list according to the number of detections, the detection duration, and the number of IPCs detected. . Exemplarily, if each detection time exceeds a certain threshold and the number of target devices to be determined exceeds a certain threshold, the port list is refreshed, for example, the less commonly used ports are deleted.
  • the detection device can prioritize the ports in the port list, such as high priority and low priority (which can be defined according to expert experience or dynamically adjusted according to previous detection results), and scan the high priority at least once. , scan low priority once or randomly, etc.
  • high priority and low priority which can be defined according to expert experience or dynamically adjusted according to previous detection results
  • the detection device After acquiring the port information of the target device, the detection device matches the port information of the target device with the port information in the port information database, so as to further identify whether the target device is an IPC device.
  • the port information in the port information database includes, but is not limited to, port numbers related to video transmission.
  • the plurality of port information in the port information database can also be divided into different levels according to the port numbers, and the different levels represent the probability that the corresponding device is an IPC device. For example, ports can be divided into 1, 2, 3, etc., according to a port number or a combination of multiple port numbers. Low (such as level 3), indicating that the device is less likely to be an IPC device.
  • the port information in the port information database includes three types of port information, namely X, Y, and Z, wherein, the X-type port information is divided into 1-level port information, for example, the X-type port information includes the X1 port number, and the Y-type port information is divided into 2-level port information Port information, for example, type Y port information includes port numbers or combinations of port numbers such as Y1, Y2+Y3, Y2+Y4+Y5, and type Z port information is divided into 3-level ports, for example, type Z port information includes Z1, Z2+Z5 Equal port number or combination of port numbers.
  • the target device 2 can be determined to be an IPC device, and the detection device can notify the user that the target device 2 is an IPC device. If the port numbers of target device 3 and target device 4 are Y1, Y2+Y3 respectively, and after matching with the port information in the port information database, it is determined that both target devices 3 and 4 include level 2 port information, then target device 3 and target device 4. Whether it is an IPC device can be further identified according to the subsequent step S740 in combination with the MAC address information, or further identified through protocol detection according to the subsequent step S750 or S760.
  • the port opening status of the corresponding target device can be determined, and further, the specific application program and version information running on the open port can be determined by using version detection; or the operating system ( operating system, OS) probe detects the type of operating system running on the target device and the type of the target device and other information. Then, such information can be used as one or more kinds of device fingerprint information, which can be used in combination with the device fingerprint information such as MAC and port obtained earlier, and whether the corresponding device is an IPC device is determined by the obtained device fingerprint information.
  • S740 Identify the IPC device by using the port information and the MAC address information.
  • whether the target device is an IPC device can also be identified by combining the MAC address information and the port information. If it cannot be determined that the corresponding target device is an IPC device according to the port information, it is further determined according to the port information and the MAC address.
  • the target device 3 and the target device 4 both include 2-level port information, because the equipment belonging to this level is an IPC device. If the probability is relatively high, the target device 3 and the target device 4 may be IPC devices, and further, the determination can be made in combination with the MAC address information of the target device.
  • the MAC address information of the target device 3 is matched to the level 2 MAC address in the specific MAC information base, and the MAC address information of the target device 4 is matched to the level 3 MAC address. and port information are both level 2, therefore, it can be determined that the target device 3 is an IPC device, and the detection device can notify the user that the target device 3 is an IPC device.
  • the detection device identifies that the target device 1, the target device 2 and the target device 3 are all IPC devices, and the target device 4 can be further based on the detection protocol based on the TCP port and/or the UDP port according to the step S750 or S760.
  • the information obtained by the probe protocol is further identified.
  • the device fingerprint information is acquired based on the detection protocol of the TCP port, and is matched with the constructed device fingerprint information database to further identify the IPC device.
  • the detection protocol based on the TCP port may include Web protocol/hypertext transfer protocol (http), domain name system (domain name system, DNS) protocol, Telnet protocol, text transfer protocol (file transfer protocol, FTP), One or more of Real Time Streaming Protocol (RTSP).
  • http Web protocol/hypertext transfer protocol
  • domain name system domain name system
  • Telnet Telnet protocol
  • text transfer protocol file transfer protocol, FTP
  • RTSP Real Time Streaming Protocol
  • the open port list includes the first port (such as port 23) corresponding to the Telnet protocol, the Telnet detection method is used, that is, to the The first port of the target device sends a Telnet probe request, and waits to receive the returned response message; if the open port list includes the second port (such as port 21) corresponding to the FTP protocol, the FTP probe method is used, that is, to the target device's The second port sends an FTP probe request, and waits to receive the returned response message; if the open port list includes the third port corresponding to the RTSP protocol (such as port 554), the RTSP probe method is used, that is, the third port of the target device is used.
  • the open port list includes the first port (such as port 23) corresponding to the Telnet protocol
  • the Telnet detection method is used, that is, to the The first port of the target device sends a Telnet probe request, and waits to receive the returned response message
  • the open port list includes the second port (such as port 21) corresponding to the F
  • the open port list includes the fourth port corresponding to the DNS protocol (such as port 53), use the DNS probe method (you can also not judge whether there is a fourth port, and is to use this method directly), that is, send a DNS reverse query request to the router AP or other DNS server of the network connected to the detection device, and wait for the response message returned; if the open port list includes the fifth corresponding to the Http protocol If the port (such as port 80, port 81, port 8000, etc.) or other ports are included in the list, use the Web/Http detection method, that is, send an HTTP detection request (such as GET or POST) to the first port of the target device, and wait for Receive the returned reply message.
  • the DNS protocol such as port 53
  • the DNS probe method you can also not judge whether there is a fourth port, and is to use this method directly
  • the open port list includes the fifth corresponding to the Http protocol
  • the port such as port 80, port 81, port 8000, etc.
  • the detection device receives a response message according to the above-mentioned various TCP-based protocol detection methods, it processes the corresponding response message according to the corresponding fingerprint extraction method to determine whether there is valid fingerprint information that can match the fingerprint database.
  • One fingerprint database can be set for each detection method, one fingerprint database can be set for multiple detection methods, and one fingerprint database can be set for all detection methods. If there is valid fingerprint information, it is confirmed that the target device is an IPC device, otherwise it needs to be further judged by other methods (such as the subsequent step S760).
  • the device fingerprint information is obtained by taking the RTSP detection method as an example for description.
  • the RTSP detection method please refer to the following.
  • RTSP is a text-based application layer protocol. Generally, RTSP itself is not used to transmit streaming media data, but to control streaming media (such as play, pause, etc.).
  • the request messages provided by this protocol include available method query (OPTIONS), media initialization/session description (DESCRIBE), create session (SETUP), play (PLAY), record (RECORD), update session description (ANNOUNCE), redirect server ( REDIRECT) and get parameter information (GET_PARAMETER) and other methods.
  • OPTIONS DESCRIBE, SETUP, ANNOUNCE, REDIRECT and GET_PARAMETER can mean the following:
  • OPTIONS can be sent by either end, and can be used to obtain a list of methods supported by the other end.
  • DESCRIBE Sent by the client, it can be used to obtain the media description information specified by the URL, such as IP, media type + port + transmission protocol, etc., which can generally be described by the SDP protocol.
  • SETUP sent by the client, which can be used to negotiate the transmission method (such as real-time transport protocol (RTP), unicast, port), create an RTSP session (can also change the transmission parameters for the media stream being played) .
  • RTP real-time transport protocol
  • unicast unicast
  • port create an RTSP session
  • ANNOUNCE Optionally, if sent by the server, it can be used to update the session description in real time; if sent by the client, it can be used to submit the media description information specified by the URL to the server.
  • REDIRECT Sent by the server, it can be used to tell the client to connect to another server location.
  • the command carries the URL of the new target. If the client wants to continue to send or receive media streams, it can disconnect from the original server (Teardown), and then Establish a connection with the new server (setup).
  • GET_PARAMETER Optionally, it can be sent by either end, which can be used to obtain the media stream parameter value specified by the URL (requires session ID and may require authentication). Commands without subject can be used to test whether the peer end is alive.
  • the embodiment of this application mainly uses the REDIRECT and SETUP defined by the RTSP protocol, and the detection device acts as a server defined by the protocol, and sends the corresponding detection message to other devices under the AP (which may be the target device determined based on the previous steps). After the corresponding response message, the device fingerprint information is extracted, and then based on the constructed device fingerprint library, it is determined whether the target device is an IPC device. In addition, it can also be judged whether there are other APs in the network that have not been detected, and if so, the detection is continued after switching from the current AP to the next AP.
  • the detection device obtains the fingerprint information of the target device by RTSP detection, which is described in detail below with reference to the interaction diagram between the detection device and the target device shown in FIG. 7 , which may include steps S910-S918.
  • S910 Obtain URLs of other devices under the current AP, and construct REDIRECT requests for reconnecting to other servers respectively.
  • the other devices described in this step may be target devices obtained through the host discovery process described in the above step S710, or may be targets obtained through the port scanning process described in the above step S730, with a specific port (such as 554) in an open state equipment.
  • the acquisition of the URL in this step may be constructed according to the IP address of the device, the open port and the RTSP service address naming rules of mainstream IPC manufacturers, or, according to the open network video interface forum (open network video interface forum, ONVIF) protocol equipment Discovery process, media capability/media stream URL acquisition process, etc.
  • This embodiment of the present application does not limit the acquisition method of the above URL.
  • the detection device sends a REDIRECT request to the target device.
  • the REDIRECT request can be used to tell the target device to connect to another server location.
  • the command can carry the URL of the new target. If the target device wants to continue sending or receiving media streams, it can disconnect from the original server and then contact the original server. The new server establishes a connection.
  • the target device sends a message to the detection device, where the message indicates that the target device is disconnected from the original server.
  • the message may be a TEARDOWN message, which includes the original server URL, the original session identifier and other information.
  • the detection device sends a response message to the target device.
  • the response message may be 200ok to indicate that the target device has received a message that it has disconnected from the origin server.
  • the target device sends a message to the detection device, the message indicating that the target device is connected to the new server.
  • the message may be a SETUP message, which includes the URL of the new server, the type of the transmission protocol used for transmitting the media stream, the sending method, the sending port, and other information.
  • the detection device sends a response message to the target device.
  • the response message can be 200ok, which can include the new session identifier and the negotiated transmission protocol type, sending method, sending port and other information for transmitting the media stream negotiated by both parties, which is used to indicate that the target device has received the message that it is connected to the new server. .
  • the detection device may further acquire the streaming media information of the target device, such as address port, media type, transmission protocol, etc.
  • the detection device sends a GET_PARAMETER message to the target device.
  • the GET_PARAMETER message can be used to obtain the media stream parameter value specified by the URL of the target device (requires session ID, possibly requires authentication).
  • the target device sends a response message to the detection device.
  • the response message may be 200ok, and the message may include streaming media information of the target device and the like.
  • the target device sends an ANNOUNCE message to the detection device.
  • the ANNOUNCE message can make the target device submit the media description information specified by the URL to the detection device when sending.
  • the detection device sends a response message to the target device.
  • the response message may be 200ok, which indicates that the streaming media information of the target device has been received, and the like.
  • steps S916-S917, S918 and S919 can exist at the same time, or can exist independently, that is, detect
  • the device can obtain the streaming media information of the target device through steps S916-S917, can also obtain the streaming media information of the target device through steps S918-S919, and can also obtain the streaming media information of the target device through steps S916-S917 and S918-S919, This application does not limit this.
  • the detection device acquires other auxiliary information.
  • the auxiliary information may be global positioning system (global positioning system, GPS) location information, WIFI SSID or name (such as xxx hotel/hotel) of the detected target device.
  • global positioning system global positioning system, GPS
  • WIFI SSID wireless fidelity location information
  • name such as xxx hotel/hotel
  • the detection device extracts device fingerprint information according to the acquired information, matches the fingerprint information, and determines whether the target device is a video surveillance device.
  • the extracted device fingerprint information may include: the type of the target device, the transmission protocol type, the sending method, the IP address, the supported media type, and the like.
  • the device fingerprint information database may include, but is not limited to: device type information, which may be, for example, key information such as IPC, IPCam (also known as IP network camera), camera, and Network Video Transmitter. word, or other characters that characterize the device type; MAC information, which can be a list of MAC (the first half of the field), a list of MAC manufacturers, etc.; IP information, which can be an IP list, a relevant location, or a network area to which it belongs; ports information, the port information may be a list of port numbers, a list of corresponding port service types; transmission protocol type information, media type information, and so on.
  • device type information which may be, for example, key information such as IPC, IPCam (also known as IP network camera), camera, and Network Video Transmitter. word, or other characters that characterize the device type
  • MAC information which can be a list of MAC (the first half of the field), a list of MAC manufacturers, etc.
  • IP information which can be an IP list, a
  • the device type information of the target device detected by the above steps includes keyword information such as camera, it can be confirmed that the target device is an IPC device; or, the MAC address of the target device detected by the above steps corresponds to a specific manufacturer, Then it can be confirmed that the detected target device is an IPC device; or, if the port information of the target device detected through the above steps includes a specific port (such as port 554), it can be confirmed that the detected target device is an IPC device; or , the protocol type of the target device detected by the above steps is a video-related protocol, such as ONVIF protocol or GB/T 28181/session initiation protocol (session initiation protocol, SIP), or the supported transmission protocol is a dedicated transmission protocol for streaming media, For example, RTP, etc., it can be confirmed that the detected target device is an IPC device.
  • a video-related protocol such as ONVIF protocol or GB/T 28181/session initiation protocol (session initiation protocol, SIP)
  • the supported transmission protocol is a dedicated transmission protocol for
  • the similarity calculation method may include, but is not limited to, one or more of the following methods: cosine similarity, Pearson correlation coefficient, Jaccard correlation coefficient, mutual information/information gain, and so on.
  • cosine similarity is to evaluate the similarity of two vectors by calculating the cosine value of the angle between them.
  • Cosine similarity draws vectors into vector space based on coordinate values.
  • the similarity between two vectors can be determined from the cosine of the angle between the two vectors.
  • the cosine value of the angle between two vectors is 1, it means that the two vectors have the same direction and a high degree of similarity; when the cosine value of the angle between two vectors is 0, then It means that the two vectors are independent; when the cosine value of the angle between the two vectors is -1, it means that the two vectors have opposite directions, and the similarity is extremely low or can be considered completely dissimilar .
  • the cosine value between two vectors can be calculated by formula (1):
  • the device fingerprint information of the target device mentioned above can be used as a component of A.
  • the type information of the detected target device can be A 1
  • the MAC information of the detected target device can be A 2 , . . . and so on.
  • the device fingerprint information base mentioned above may be a component of B, for example, the device type information may be B 1
  • the MAC information may be B 2 , . . . and so on.
  • the distance calculation method may include, but is not limited to, one or more of the following methods: Euclidean distance, Mahalanobis distance, Manhattan distance, Chebyshev distance, Hamming distance, and the like.
  • Euclidean distance is a commonly used definition of distance that refers to the true distance between two points in n-dimensional space. Euclidean distance in 2D and 3D space is the actual distance between two points.
  • the Euclidean distance (represented by ⁇ hereinafter) can be calculated based on the following formula (2):
  • the device fingerprint information of the target device mentioned above can be used as the component of x, for example, the type information of the detected target device can be x 1 , and the MAC information of the detected target device can be x 2 , etc.;
  • the mentioned device fingerprint information base can be a component of y, for example, the device type information can be y 1 , the MAC information can be y 2 , . . . and so on.
  • an n-dimensional coordinate system can be created first, in which the coordinates of the target device and the detection device can be drawn respectively, and the Euclidean distance can be calculated by using the above formula (2). Determine whether the detected target device is an IPC device through the calculated Euclidean distance.
  • Weights can be assigned to different features, for example, the weight of keyword matching degree is w1, the weight of MAC matching degree is w2, the weight of IP matching degree is w3, the weight of port matching degree is w4, etc.
  • each feature of the target device can be matched, and then the matching degree of each feature is multiplied by the corresponding weight and added. If the value obtained after the addition is greater than or equal to a preset threshold, the target can be considered
  • the device is an IPC device, and corresponding risk prompts are given (such as text or picture or voice prompts through the user interface), otherwise it can be considered not an IPC device.
  • some weight limit cases can also be set, for example, the weight of some keywords, some MAC information, and some port information can be 100%.
  • the authentication value of the target device is obtained by weighting and summing up multiple features of the obtained target device. If the authentication value is greater than or equal to 100, the target device can be considered to be an IPC device. And prompt the user that there is a risk device around; if the authentication value is less than the preset threshold of 100, it can be considered that the target device is not an IPC device.
  • a test sample may be constructed using device fingerprint information, and then a machine learning (ML) and/or deep learning (DL) algorithm model may be used to perform inference judgment on the sample.
  • ML machine learning
  • DL deep learning
  • the ML algorithm model or the DL algorithm model may be obtained by training based on a large number of positive and negative sample sets.
  • the heartbeat data of the IPC device interacting with the server in the networked non-live state as a positive sample for feature extraction (such as heartbeat cycle/frequency, heartbeat duration, number of heartbeats in a specific period, target address, etc.)
  • the data that the non-IPC device interacts with the outside world is used as a negative sample for feature extraction, and then the algorithm is trained; for another example, the data that the IPC device interacts with the server in the online live broadcast state is used as a positive sample for feature extraction, and the data in other states or non-IPC devices is extracted.
  • the data that the device interacts with the outside world is used as a negative sample for feature extraction, and then for algorithm training.
  • the detection device displays the judgment result to the user, and if the current network still uses other APs, switches the BSSID to connect to other APs.
  • the determination result can be displayed to the user. For example, if the detected target device mentioned above is an IPC device, a risk reminder can be given to the user, such as the text "found 2 cameras" shown in (e) in Figure 5 above; if the detected target device is an IPC device The target device is not an IPC device, and can also prompt the user that the current surrounding environment is free of risks, such as the text "no camera found" displayed in (d) of the above Figure 5 .
  • the detection device when the detection device switches the BSSID to connect to other APs, it can obtain information such as the corresponding SSID, BSSID list and signal strength under the network through system services (such as WIFI management of Android system). and other information to sort the BSSID.
  • system services such as WIFI management of Android system.
  • this step it is also possible to judge whether to switch the BSSID according to the detection results of the above steps S910-S921. For example, if the IPC device is not detected in the above steps, the BSSID can be switched to continue the detection, otherwise it will not be switched.
  • the detection device can also obtain target information based on the process of obtaining the method list defined by RSTP, that is, sending the OPTIONS command, mainly to determine whether the target device of the opposite end responds to which methods/commands it supports, so as to determine whether it is an IPC device; or, obtain target information based on the process of obtaining parameters defined by the RTSP, that is, send a GET_PARAMETER command to test whether the target device of the opposite end is alive, so as to determine whether it is an IPC device.
  • the UDP port-based detection protocol obtains the device fingerprint information, and matches it with the constructed device fingerprint information database to further identify the IPC device.
  • step S760 is not a necessary condition for the execution of steps S720-S750, and S760 can be directly executed after S710, that is, after the host discovery process, the UDP port detection protocol is used to obtain the device fingerprint information; After the identification of the MAC address information is completed, the UDP port detection protocol in S760 is executed to obtain the device fingerprint information (refer to the second embodiment for details); and the execution order of step S750 and the above-mentioned step S760 are also not sequential.
  • step S730 after the port information of the target device is obtained and the identification is completed, step S750 is performed, and after obtaining the device fingerprint information based on the TCP port detection protocol, step S760 is performed, and the UDP port detection protocol is used to obtain the device fingerprint information; in other embodiments , step S730 may be performed first, and after the port information of the target device is obtained and identified, step S760 may be performed, and then step S750 may be performed.
  • the detection protocols based on UDP ports include but are not limited to ONVIF protocol, multicast domain name system (multicast domain name system, MDNS) protocol (including physical security interoperability alliance (physical security interoperability alliance, PSIA) protocol MDNS), session Initialization protocol (session initiation protocol, SIP) (including GB/T 28181 protocol SIP), domain name system (domain name system, DNS) protocol, private protocol.
  • MDNS multicast domain name system
  • PSIA physical security interoperability alliance
  • SIP session Initialization protocol
  • SIP session initiation protocol
  • DNS domain name system protocol
  • private protocol private protocol.
  • the port (for example, the multicast address corresponding to ONVIF is 239:255:255:250, the port is 3702, the multicast address corresponding to MDNS is 224.0.0.251, the port is 5353, etc.) Waiting on the listening port to receive the response message returned by the target device to extract the device fingerprint information of the target device; and/or, according to a preset list of broadcast detection protocols (such as private SDK detection protocols), to each broadcast detection protocol corresponding to The broadcast address and port (for example, the broadcast address corresponding to private SDK protocol 1 is IP1, the port is P1, the broadcast address corresponding to private SDK protocol 2 is IP2, the port is P2, etc.) to send the corresponding UDP detection message, and monitor the corresponding The port waits to receive the reply message returned by the target device to extract the device fingerprint information of the target device.
  • multicast detection protocols such as ONVIF detection protocol, MDNS detection protocol, SIP detection protocol, COAP detection protocol, private SDK detection protocol, etc.
  • the corresponding response message is processed according to the device fingerprint extraction method corresponding to the multicast or broadcast detection protocol (extract the device fingerprint information), and match according to the corresponding matching method, for example, according to the preset fingerprint database (one fingerprint database can be set for each detection method, one fingerprint database can be set for multiple detection methods, and one fingerprint database can be set for all detection methods Set up a fingerprint database) and the corresponding matching rules (such as specific keywords, specific MAC information, specific ports and other information matching) to match and so on. If there is matching valid fingerprint information, it is confirmed that the target device sending the response message is an IPC device, otherwise it is not an IPC device.
  • the preset fingerprint database one fingerprint database can be set for each detection method, one fingerprint database can be set for multiple detection methods, and one fingerprint database can be set for all detection methods Set up a fingerprint database
  • the corresponding matching rules such as specific keywords, specific MAC information, specific ports and other information matching
  • Step S710 may be performed again, or, further, step S710 may be performed for the newly discovered other target device, so as to obtain the MAC address information of the other target device to help further locate the other target device subsequently.
  • the MAC address information can also be used as the identification operation in the above step S720. Not limited here.
  • the identification and detection results of the above steps S710 to S760 may be combined.
  • the target device 1 is identified as an IPC device according to the MAC address information in the above step S720
  • the target device 2 is identified as an IPC device according to the port information in the above step S730
  • the target device 3 is identified in the above step S740 in combination with the MAC information and the port information.
  • the device fingerprint information obtained by the detection protocol based on the TCP port in the above-mentioned step S750 or the detection protocol based on the UDP port in the step S760 determines whether the target device 4 is an IPC device, so that the identified IPC device is merged according to the above judgment result. as a class.
  • the target device 1 after identifying the target device 1, target device 2, and target device 3 as IPC devices based on the above steps S710-S740, in order to ensure the accuracy of the identification, the target device 1 can also be determined according to step S750 or step S760. , whether target device 2, target device 3, and target device 4 are IPC devices, and combine the identification results.
  • step S730, S750 or S760 may perform corresponding detection and judgment on the remaining target devices that have not yet been determined to be IPC devices after excluding the identified IPC devices.
  • the identified IPC devices may not be excluded, but all target devices found in step S710 may be detected and judged accordingly.
  • the detection device may obtain device fingerprint information respectively according to at least two of the various detection protocols described in S750 and S760 above.
  • the device fingerprint information 1 can be obtained according to the RTSP protocol, and the device fingerprint information 2 can be obtained according to the ONVIF protocol or the SIP protocol, and then the device fingerprint information 1 and the device fingerprint information 2 are merged and removed to generate new device fingerprint information; The new device fingerprint information is matched to determine whether there is an IPC device.
  • the detection device can first perform steps S910-S919 in the above-mentioned FIG. 7 to obtain the device fingerprint information 1 of the target device, and then obtain the device fingerprint information 2 of the target device according to steps S1010-S1016 in FIG. 8 , or, it can Steps S1110-S1113 in FIG. 9 are performed to obtain device fingerprint information 2 of the target device.
  • the above device fingerprint information 1 or 2 may be composed of multiple or multiple types of fingerprint information.
  • the information can be combined and de-redundant to generate new device fingerprint information, and then the new device fingerprint information can be matched to determine whether the target device is for IPC equipment.
  • the device fingerprint information 1 includes the IP, MAC address information of the target device and its corresponding manufacturer, the corresponding port information and its status (open or closed or filtered, etc.), the corresponding service type, the application running on the port and its version, the target Information such as the operating system running on the device and the type of the target device;
  • the device fingerprint information 2 includes the IP address, device type, device service range and MAC address information of the target device, as well as the profile capability and streaming capability of the target device. Then the detection device can remove the IP address, device type, and MAC address in the device fingerprint information 2, combine the remaining information, and then match the new device fingerprint information to determine whether the target device is an IPC device.
  • the device fingerprint information of the target device is obtained through different detection protocols, and the device fingerprint information of the respectively obtained target device is merged and de-redundant to obtain new device fingerprint information, which can further ensure the correctness of the information and improve the detection accuracy of IPC devices. precision.
  • the detection device can combine the session initialization process based on the GB/T 28181 protocol with the redirection server process of the RTSP protocol to obtain device fingerprint information; then match the device fingerprint information to determine whether there is an IPC device.
  • the detection device may obtain the device fingerprint information of the target device based on the combination of the session initialization process of the GB/T 28181 protocol and the redirection server process of the RTSP protocol. Specifically, the detection device can first perform steps S1110-S1115 in FIG. 9 to obtain the device fingerprint information 1 of the target device, and then perform steps S910-S919 in FIG. 7 , so that the target device disconnects from the original server and reconnects with the original server. After the new server is connected, the device fingerprint information 2 of the target device is obtained, and then the obtained device fingerprint information is merged and matched to determine whether the target device is an IPC device.
  • the device fingerprint information of the target device is obtained by combining the session initialization process based on the GB/T 28181 protocol and the redirection server process of the RTSP protocol, which can further ensure the accuracy of the obtained fingerprint information and improve the accuracy of IPC device detection.
  • step S710 may be performed first to complete the host discovery to obtain other online/surviving target devices in the network, and then port scanning is performed to obtain the openness of each target device. port list, and then steps S720 and S740 may be sequentially performed, or, steps S740 and S720 may be sequentially performed, or, steps S720 or S740 may be skipped and subsequent steps S750 or S760 may be performed.
  • the IPC device may not be arranged in the room where the user of the detection device is located, for example, the IPC is arranged in the next room or corridor, etc., such scenarios may not bring any impact on user privacy. Therefore, the risk of the detected IPC equipment can be further filtered to achieve a more refined assessment. For example, channel state information (CSI) data and received signal strength indicator (RSSI) data can be acquired for each detected IPC device, and then it is determined whether to filter out the acquired CSI and RSSI data.
  • CSI channel state information
  • RSSI received signal strength indicator
  • the above CSI and RSSI data can be used to characterize the distance between the detection mobile phone and the IPC device to a certain extent Whether there are obstacles such as walls between the two, or whether the APs connected to the two belong to different channels, etc.
  • the solution provided by this application integrates host discovery, port scanning, detection protocols based on TCP ports, detection protocols based on UDP ports, and corresponding device fingerprint extraction and matching methods to identify IPC devices.
  • the solution in this embodiment can effectively help users detect maliciously installed candid cameras in hotels and other places while reducing costs.
  • IPC improves the accuracy of IPC device detection, thereby reducing the occurrence of user privacy violations.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the detection device can be used as a client or server defined by the protocol, using multicast or broadcast mode, and a fixed multicast or broadcast address and port to the same wireless network.
  • the target device publishes the message. Therefore, the detection device does not need to use detection methods such as host discovery, port scanning or TCP port-based detection protocol, and can directly obtain the device fingerprint information of the target device based on the UDP port detection protocol, and determine whether the target device is a video surveillance device.
  • the MAC address information of the target device can also be obtained first.
  • the fingerprint information obtained by the UDP port-based detection protocol is further used to judge the target device, and this solution can further improve the detection accuracy.
  • UDP port-based detection protocols include, but are not limited to, one or more of ONVIF detection protocols, PSIA/MDNS protocols, GB/T28181 protocols, DNS protocols, and proprietary protocols.
  • the acquisition of device fingerprint information based on the ONVIF protocol will be described in detail in conjunction with the interaction process between the detection device and the target device shown in FIG. 8 .
  • ONVIF Open Network Video Interface Forum, Open Network Video Interface Forum
  • the forum formulates the industry-wide ONVIF standard based on the principle of openness and openness, and defines a common protocol for information exchange between network video devices, including device search, real-time video, audio, metadata and control information.
  • the embodiments of the present application mainly use the device discovery process (WS-Discovery), the process of acquiring service capabilities (GetServiceCapabilities, optional step), and the process of acquiring media stream URIs (GetStreamUri, optional step) defined by the ONVIF protocol to detect that the device sends the AP to the AP.
  • the other devices (which can be the target devices determined based on the previous steps) send the corresponding probe messages, extract the device fingerprint information after receiving the corresponding response message, and then determine whether there is an IPC device in the target device based on the constructed device fingerprint information.
  • it can also be judged whether there are other APs in the network that have not been detected, and if so, the detection is continued after switching from the current AP to the next AP.
  • the above-mentioned device discovery process is that the client uses multicast to publish Probe messages, including Types, service Scopes and Xaddrs (device management service address), etc. After the target device (IPC) confirms the match, it uses unicast to respond. Probe Match messages, which include Types, Scopes, and Xaddrs.
  • the above-mentioned GetServiceCapabilities is to obtain the functions and services supported by the target device, which may include: Profile capabilities, such as the total number of supported static and dynamic media profiles, whether to support screenshot/rotation/video source mode switching/OSD configuration/mask configuration etc.; Media streaming (Streaming) capabilities, such as whether to support RTSP media streaming protocol, whether to support UDP multicast, whether to support RTP/RTSP/TCP transmission, etc.
  • the above process of obtaining the media stream URL (GetStreamUri) is to use the IP address of the target device to obtain its media stream URL (this URL can be used for the RTSP protocol detection method shown in Figure 7 above, and can also be used as a kind of device fingerprint, etc.).
  • Figure 8 includes steps S1010-S1060.
  • the detection device constructs a detection message, and sends it out in a multicast mode under the current AP.
  • the detection device may construct a detection message, and the detection message may include the type of the target device, the service scope, and the management service address of the target device, and the like.
  • the probe message may be a Probe request message defined in the device discovery process of the ONVIF protocol.
  • multicast can also be called multicast, and it can be a "one-to-many" method, that is, the detection device sends the above-mentioned detection message to a specific multicast address and port by multicast, which can achieve one-time delivery to all targets in the network.
  • the device sends a probe message.
  • the multicast address port can be 239.255.255.250:3702.
  • the target device receives the detection message.
  • step S1010 the detection device sends the probe message through multicast, and there may be multiple devices that receive the probe message. In response to the probe message, these devices are the target devices in this application.
  • the target device sends a response message to the detection device.
  • the response message may include the IP address, device type, device service range, and MAC address information of the target device.
  • the response message may be a Probe Match message defined by the device discovery process of the ONVIF protocol.
  • the target device may send a response message to the detection device in a unicast manner, or may send a response message to the detection device in a multicast manner, which is not limited.
  • the unicast mode may be a "one-to-one" mode, that is, one device can send a message to another target device at a time.
  • the detection device can obtain the fingerprint device information of the target device, so that the fingerprint device information can be matched with the fingerprint database to determine whether the detected target device is an IPC device.
  • the detection device can obtain the service capability information and media stream information of the target device through the above-mentioned process of obtaining the service capability and the process of obtaining the media stream URL, which can be realized through steps S1013-S1016.
  • the detection device sends a request message for obtaining a service capability to the target device.
  • the request message for obtaining the service capability may include information such as the IP address of the target device, and the request message may be the GetServiceCapability Request defined in the process of obtaining the service capability of the ONVIF protocol.
  • the target device sends service capability related information to the detection device.
  • the service capability-related information may include profile capability, that is, whether the target device supports screenshot, rotation, video mode switching, object sequence diagram (on-screen display, OSD) configuration, mask configuration, etc. These information can be configured through ONVIF protocol. Get the GetServiceCapability Response defined by the Get Service Capability process.
  • the detection device sends a request message for obtaining a media stream URL to the target device.
  • the request message for obtaining the media stream URL may include information such as the IP address of the target device.
  • the request message may be the GetStreamUri Request defined in the process of obtaining a media stream URL of the ONVIF protocol.
  • the target device sends media stream related information to the detection device.
  • the media stream-related information may include streaming capabilities, that is, whether the target device supports RTSP media stream protocol, whether it supports UDP multicast, whether it supports RTP or RTSP or TCP transmission, etc. These information can be obtained through ONVIF protocol.
  • Media stream URL GetStreamUri Response defined by the procedure.
  • the detection device acquires other auxiliary information.
  • the auxiliary information can be the GPS location information, WIFI SSID or name (such as xxx hotel/hotel) of the detected target device.
  • the detection device extracts device fingerprint information according to the acquired information, matches the fingerprint information, and determines whether the target device is a video surveillance device.
  • the detection device displays the judgment result to the user, and if the current network still uses other APs, switches the BSSID to connect to the other APs.
  • steps S1017-S1019 For the description of steps S1017-S1019, reference may be made to the description of steps S920-S922 in FIG. 7 , which are not repeated here for brevity.
  • the following takes the transmission channel negotiation protocol GB/T 28181 as an example, combined with the interaction process between the detection device, the media server, and the target device shown in Figure 9, to obtain the device fingerprint information based on the GB/T 28181 protocol.
  • GB/T 28181 protocol can include SIP signaling control protocol and RTP/RTCP protocol.
  • SIP protocol There are many kinds of SIP signaling defined by SIP protocol, such as Invite, ACK, BAY, OPTIONS, Message, etc.
  • the format description protocol of SIP signaling includes session description protocol (SDP), monitoring and alarm networking system control description Protocol (monitoring and alarming network system control description protocol, MANSCDP) and monitoring and alarm networking system real-time streaming protocol (monitoring and alarming network system real-time streaming protocol, MANSRTSP) and so on.
  • SDP session description protocol
  • MANSCDP monitoring and alarm networking system control description Protocol
  • MANSRTSP monitoring and alarm networking system real-time streaming protocol
  • SIP can be used to establish sessions between devices and transmit system control commands.
  • session negotiation and media negotiation in session establishment between devices can use SDP as the format protocol of SIP signaling; IPC device control, device information query and status information For reporting, etc.
  • MANSCDP can be used as the format protocol of SIP signaling; for playback, pause or disconnection, etc.
  • MANSRTSP can be used as the format protocol for SIP signaling.
  • the session initialization (Invite) process is the first step in the real-time on-demand, playback, download and other business processes, mainly the SIP server establishes a session between the media server and the media sender (IPC), negotiates the media transmission method, etc.
  • the media server transmits the media stream data; then a session is established between the media server and the media receiver (user equipment, such as electronic devices such as mobile phones), and the media transmission mode is negotiated, so that the media server transmits the media stream data to the receiver.
  • the embodiment of this application mainly uses the session initialization process defined by the SIP signaling protocol in the GB/T 28181 protocol, the detection device sends the corresponding detection message to other devices under the AP, and extracts the device fingerprint information after receiving the corresponding response message. , and then determine whether there is an IPC device in the target device based on the constructed device fingerprint information. In addition, it can also be judged whether there are other APs in the network that have not been detected, and if so, the detection is continued after switching from the current AP to the next AP.
  • FIG. 9 may include steps S1110-S1116.
  • the detection device acquires the IP, port, media format, etc. of the media server.
  • the detection device can initiate a session initialization request (such as an Invite request) to the media server, and after receiving the session initial request, the media server can send a 200 success response message to the detection device, which can include the media server's SDP message body, For example, the media server IP, port, and media format, etc.; or, the detection device can also construct an invite message to be sent to the target device according to the maintained media server list, which may include the media server IP, port, and media format.
  • a session initialization request such as an Invite request
  • the media server can send a 200 success response message to the detection device, which can include the media server's SDP message body, For example, the media server IP, port, and media format, etc.; or, the detection device can also construct an invite message to be sent to the target device according to the maintained media server list, which may include the media server IP, port, and media format.
  • the detection device initiates a session initiation process to the target device.
  • the detection device may initiate a session initiation request to the target device, aiming to obtain the SDP message body of the target device, which may include the IP, port, media format, synchronization source (SSRC) and media parameters of the target device. Wait.
  • SDP message body may include the IP, port, media format, synchronization source (SSRC) and media parameters of the target device. Wait.
  • SSRC synchronization source
  • the target device sends a response message to the detection device.
  • the target device may respond to it, and the target device may send a response message to the detection device, which may include information such as the IP, port, media format, SSRC, and media parameters of the target device.
  • the detection device sends an ACK to the target device.
  • the ACK may indicate that the detection device has received the final response of the target device to the session initialization request.
  • the detection device acquires other auxiliary information.
  • the detection device extracts device fingerprint information according to the acquired information, matches the fingerprint information, and determines whether the target device is a video surveillance device.
  • the detection device displays the judgment result to the user, and if there are other APs in the current network, switches the BSSID to connect to the other APs.
  • steps S1114-S1116 For the description of steps S1114-S1116, reference may be made to the description of steps S920-S922 in FIG. 7 , which are not repeated here for brevity.
  • the device fingerprint information of the target device is obtained through a detection protocol based on the UDP port, and the obtained device fingerprint information is matched with the preset fingerprint information database, so as to determine whether the detected target device is not. for IPC equipment.
  • the technical solution can effectively improve the detection efficiency of the IPC equipment while reducing the cost.
  • the following introduces the flow of a method for detecting a video surveillance device provided by the present application.
  • FIG. 10 shows a schematic flowchart of a method 1200 for detecting a video surveillance device.
  • the devices involved in the flow chart of the method include the electronic device 100 and the video monitoring device.
  • the video surveillance device may be the camera shown in FIG. 5 above.
  • the method 1200 may include:
  • S1210 Acquire media access control MAC address information of at least one target device, wherein the electronic device and the target device access the same wireless network.
  • the MAC address information of at least one target device may be acquired by using a host discovery process.
  • a host discovery process please refer to the content of the foregoing step S710.
  • S1212 Acquire port information of the target device.
  • the port information of the target device may be acquired by using port scanning.
  • port scanning For details, please refer to the content of the foregoing step S730.
  • S1214 Determine whether the target device is a video surveillance device according to the MAC address information.
  • step S720 whether the target device is a video surveillance device is determined according to the MAC address information, and the video surveillance device can be identified by matching the acquired MAC address information of the target device with the information in the MAC information database.
  • the target device cannot be determined to be the video surveillance device according to the MAC address information, determine whether the target device is the video surveillance device according to first information, where the first information includes the MAC address The address information and the port information, or the first information includes the port information.
  • the target device if it cannot be determined whether the target device is a video surveillance device according to the MAC address information, it can be further determined according to the first information (MAC address information and port information, or port information).
  • the first information MAC address information and port information, or port information.
  • sequence numbers of the above steps do not represent the sequence of execution.
  • sequence of S1210, S1214, S1212, and S1216 may be executed without limitation.
  • S1218 If it cannot be determined that the target device is the video surveillance device according to the first information, acquire fingerprint information of the target device by a TCP port-based detection protocol or a UDP port-based detection protocol.
  • the fingerprint information in this embodiment of the present application may be the device fingerprint information in step S750 and/or step S760, and the device fingerprint information may include one or more of the following information of the target device: the device type of the target device, the device manufacturer Information, port status, port number, application running on the port, port service type, running operating system, whether video mode switching or OSD configuration is supported, supported transport protocol type, media format, sending method, service range, IP address , MAC address.
  • the TCP port-based detection protocol may be the protocol involved in step S750, such as one or more of Web protocol/Http, DNS protocol, Telnet protocol, FTP, and RTSP.
  • the UDP port-based detection protocol may be one or more of the protocols involved in step S760: ONVIF detection protocol, MDNS protocol, SIP, DNS protocol, and proprietary protocol.
  • S1220 Determine whether the target device is the video surveillance device according to the device fingerprint information.
  • the matching rule may include a keyword matching method, a similarity calculation method, a distance calculation method, a preset model, and a feature vector matching method.
  • a keyword matching method For the specific matching process, reference may be made to the content of the foregoing step S921, which is not repeated here for brevity.
  • auxiliary information of the target device includes one or more of the following information: location information, Wi-Fi SSID, or Wi-Fi name.
  • S1224 Determine whether the target device is a video surveillance device according to the fingerprint information and the auxiliary information.
  • steps S920-S921 in FIG. 7 above or steps S1017-S1018 in FIG. the contents of steps S1114-S1115 in the above.
  • S1228 Determine whether at least one target device connected under the second AP is the video surveillance device.
  • the solution provided by this application determines the target device by obtaining the MAC address information/port information of the target device connected to the same wireless network, and obtaining the fingerprint information of the target device based on the detection protocol of the TCP port or the UDP port according to different situations. Whether it is a video surveillance device.
  • the technical solution of the present application uses a variety of detection methods including MAC address information, port information, detection protocols based on TCP ports or UDP ports, and provides a more comprehensive detection method for various types of video surveillance equipment on the market.
  • the solution effectively improves the detection accuracy and reduces the missed detection rate.
  • the applicable scene of the technical solution of the present application may be a hotel lobby, a room, etc., and the electronic device of the present application can effectively detect maliciously installed IPCs in such places, thereby reducing the occurrence of user privacy violations.
  • step S1218 may be performed to obtain fingerprint information of at least one target device, and then step S1220 may be performed according to the The fingerprint information determines whether the target device is a video surveillance device.
  • step S1210 may be performed first to obtain the MAC address information of at least one target device, and then step S1214 may be performed to determine whether the target device is a video surveillance device according to the MAC address information. If it is determined that the target device is a video surveillance device, the UDP port-based detection protocol in step S1218 can be executed to obtain fingerprint information of at least one target device, and step S1220 is performed to determine whether the target device is a video surveillance device according to the fingerprint information. .
  • S1218 can be directly executed after steps S1210, S1212, and S1214 are executed, and when the target device cannot be determined to be a video surveillance device according to the MAC address information, the fingerprint information of the target device is obtained based on the detection protocol of the TCP port, That is, the logic of judging based on port information is omitted. Even after step S1212 is executed, the TCP port-based detection protocol in S1218 can be directly executed to obtain the fingerprint information of the target device.
  • steps S1222-S1224 or S1226-S1228 may be omitted.
  • step S1212 may be performed to obtain port information of at least one target device, and then similar to S1214, it may be determined whether the target device is video surveillance according to the port information. device, and then perform step S1210 to obtain the MAC address information of the target device, and similar to S1216, when it is impossible to determine whether the target device is a video surveillance device according to the port information, then combine the MAC information information to determine whether the target device is a video surveillance device device, and finally perform step S1218 and subsequent steps.
  • the device fingerprint information of the target device is obtained through a UDP port-based detection protocol, and the obtained device fingerprint information is matched with a preset fingerprint information database to determine whether the detected target device is an IPC device.
  • the technical solution can effectively improve the detection efficiency of the IPC equipment while reducing the cost.
  • an electronic device such as the above-mentioned first electronic device
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the electronic device can be divided into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 11 shows a possible schematic diagram of the composition of the electronic device 1120 involved in the above embodiment.
  • the electronic device 1120 may include: an acquisition unit 1121 , a determining unit 1122 and a switching unit 1123 .
  • the obtaining unit 1121 may be used to support the electronic device 1120 to perform the above steps S1210, S1212, S1218, S1222, etc., and/or other processes for the techniques described herein.
  • the determination unit 1122 may be used to support the electronic device 1120 to perform the above-mentioned steps S1214, S1216, S1220, S1224, S1228, etc., and/or other processes for the techniques described herein.
  • the switching unit 1123 may be used to support the electronic device 1120 to perform the above-mentioned step S1226, etc., and/or other processes for the techniques described herein.
  • the electronic device provided in this embodiment is used to execute the above positioning method, so the same effect as the above implementation method can be achieved.
  • the electronic device may include a processing module, a memory module and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device, for example, may be used to support the electronic device to perform the steps performed by the above units.
  • the storage module may be used to support the electronic device to execute stored program codes and data, and the like.
  • the communication module can be used to support the communication between the electronic device and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the electronic device involved in this embodiment may be a device having the structure shown in FIG. 1 .
  • FIG. 12 shows another possible composition diagram of the electronic device 1230 involved in the above embodiment.
  • the electronic device 1230 may include a communication unit 1231, an input unit 1232, a processing unit 1233, an output unit 1234, A peripheral interface 1235 , a storage unit 1236 and a power supply 1237 .
  • the communication unit 1231 is used to establish a communication channel, so that the electronic device 1230 can connect to a remote server through the communication channel, and download media data from the remote server.
  • the communication unit 1231 may include communication modules such as a WLAN module, a Bluetooth module, an NFC module, a baseband module, and the like, and a radio frequency (RF for short) circuit corresponding to the communication module, which is used for wireless local area network communication, Bluetooth communication, NFC communication, infrared communication and/or cellular communication system communication, such as wideband code division multiple access (W-CDMA) and/or high speed downlink packet access (HSDPA).
  • the communication unit 1231 is used to control the communication of various components in the electronic device, and can support direct memory access.
  • the input unit 1232 may be used to realize the interaction between the user and the electronic device and/or the input of information into the electronic device.
  • the input unit may be a touch panel, or other human-computer interaction interfaces, such as physical input keys, a microphone, etc., or other external information capturing devices, such as a camera.
  • the processing unit 1233 is the control center of the electronic device, and can use various interfaces and lines to connect various parts of the entire electronic device, by running or executing the software programs and/or modules stored in the storage unit, and calling the software programs stored in the storage unit. data to perform various functions of the electronic device and/or process data.
  • the output unit 1234 includes, but is not limited to, a video output unit and a sound output unit.
  • the video output unit is used to output text, pictures and/or videos.
  • the touch panel used by the input unit 1232 can also be used as the display panel of the output unit 1234 at the same time. For example, when the touch panel detects a touch or an approaching gesture operation on it, it is transmitted to the processing unit to determine the type of the touch event, and then the processing unit provides corresponding visual output on the display panel according to the type of the touch event.
  • the input unit 1232 and the output unit 1234 are used as two independent components to realize the input and output functions of the electronic device, but in some embodiments, the touch panel and the display panel can be integrated to realize Input and output functions of electronic equipment.
  • the image output unit can display various graphical user interfaces as virtual control components, including but not limited to windows, scroll bars, icons, and scrapbooks, for the user to operate by touch.
  • the information displaying whether there is a video surveillance device in the current environment can be implemented by the output unit 1234 .
  • the storage unit 1236 can be used to store software programs and modules, and the processing unit executes various functional applications of the electronic device and implements data processing by running the software programs and modules stored in the storage unit.
  • This embodiment also provides a computer storage medium, where a computer instruction is stored in the computer storage medium, and when the computer instruction is executed on the electronic device, the electronic device executes the above-mentioned related method steps to realize the video detection method in the above-mentioned embodiment. Methods of monitoring equipment.
  • This embodiment also provides a computer program product, when the computer program product runs on the computer, the computer executes the above-mentioned relevant steps, so as to realize the method for detecting a video surveillance device in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the method for detecting a video surveillance device in the above method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Alarm Systems (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

本申请提供了用于检测视频监控设备的方法和电子设备,该方法包括:获取与电子设备接入同一无线网络的至少一个目标设备的MAC地址信息和端口信息,根据MAC地址信息确定目标设备是否为视频监控设备;若根据MAC地址信息无法确定时,则根据端口信息,或者,MAC地址信息和端口信息确定目标设备是否为视频监控设备;若仍然无法确定时,则基于TCP端口或UDP端口的探测协议获取目标设备的指纹信息,根据指纹信息进一步确定目标设备是否为视频监控设备。本申请提供的技术方案可以提高检测精准度,降低漏检率。

Description

用于检测视频监控设备的方法和电子设备
本申请要求于2020年10月22日提交中国专利局、申请号为202011137743.5、申请名称为“用于检测视频监控设备的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频监控设备检测技术领域,尤其涉及用于检测视频监控设备的方法和电子设备。
背景技术
近年来,市场上微型摄像头种类繁多、数量庞大、使用泛滥,酒店等隐私场所偷拍案件频发,呈日益上升趋势,国家司法执法等相关部门也日益重视。目前这些摄像头大都属于网络摄像头(internet protocol camera,IPC)设备,支持联网和存储功能,90%以上连接无线保真(wireless fidelity,Wi-Fi)网络。监控画面可以实时上传到云端进行存储,也可以通过监控应用(application,APP)被用户端实时观看,从而导致用户隐私被侵犯事件的发生。
目前,市场上已有一些专门的检测设备在售,这些检测设备主要利用光学、热学、电磁波原理对IPC设备进行检测。例如,利用闪光灯向周围打光,并观察是否有反光点;利用热成像仪扫描周围,观察是否有局部发热点;利用视频扫描仪对50MHz-3GHz波动扫描,观察是否有该波段设备。但是这些专门的检测设备价格比较昂贵,所用硬件难以集成到手机中;且往往需要用户在要查找的空间内到处主动去查找探测,用户体验不友好。此外,普通场景下反光、发热、电磁波动的环境干扰都比较多,设备误检率和漏检率都比较高。
针对上述问题,一些互联网厂商在自己的APP中推出摄像头检测功能,一般是在手机接入的局域网内对该网络下的其他设备进行扫描探测以获取设备信息。但其所用探测手段相对比较单一,所维护的指纹库数据不全面或未及时更新,存在不少漏检情况。不仅如此,经过实际测试,这些检测功能还很不稳定,每次检测出的数量不一、浮动较大,漏检率较高。
发明内容
本申请提供的用于检测视频监控设备的方法和电子设备,可以提高检测精准度,降低了漏检率。本申请技术方案所适用的场景可以是酒店大堂、房间等场所,使用本申请的电子设备能够有效检测此类场所中被恶意安装的偷拍类IPC,从而可以减少用户隐私被侵犯事件的发生。
第一方面,提供一种用于检测视频监控设备的方法,该方法应用于电子设备,包括: 获取至少一个目标设备的媒体接入控制MAC地址信息,其中,所述电子设备与所述目标设备接入同一无线网络;获取所述目标设备的端口信息;根据所述MAC地址信息确定所述目标设备是否为视频监控设备;若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,根据第一信息确定所述目标设备是否为所述视频监控设备,其中,所述第一信息包括所述MAC地址信息和所述端口信息,或者,所述第一信息包括所述端口信息;若根据所述第一信息无法确定所述目标设备为所述视频监控设备,则基于TCP端口的探测协议或基于UDP端口的探测协议获取所述目标设备的指纹信息;根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
本申请提供的方案,通过对接入同一无线网络下的目标设备进行MAC地址信息/端口信息获取,以及根据不同情况基于TCP端口或UDP端口的探测协议获取目标设备的指纹信息,从而确定目标设备是否为视频监控设备。本申请技术方案针对市面上形态多样的视频监控设备,使用了包括MAC地址信息、端口信息、基于TCP端口或UDP端口的探测协议在内的多种检测手段,提供了一种更为全面的检测方案,有效提高了检测精准度,降低了漏检率。本申请技术方案所适用的场景可以是酒店大堂、房间等场所,使用本申请的电子设备能够有效检测此类场所中被恶意安装的偷拍类IPC,从而可以减少用户隐私被侵犯事件的发生。
结合第一方面,在一些可能的实现方式中,所述根据MAC地址信息确定所述目标设备是否为视频监控设备,包括:若所述MAC地址信息为第一级MAC地址信息,确定所述目标设备为所述视频监控设备;若所述MAC地址信息不是第一级MAC地址信息,则无法确定所述目标设备为所述视频监控设备。
本申请提供的方案,通过确定获取的目标设备的MAC地址信息是否为第一级MAC地址信息,识别该目标设备是否为IPC设备,可以节省电子设备检测IPC设备的时间,提高检测效率。
结合第一方面,在一些可能的实现方式中,根据第一信息确定所述目标设备是否为所述视频监控设备,包括:若所述端口信息为第一级端口信息,确定所述目标设备为所述视频监控设备;若所述端口信息为第二级端口信息,且所述MAC地址信息是第二级MAC地址信息,则确定所述目标设备为所述视频监控设备。
本申请提供的方案,通过目标设备的端口信息,或者端口信息结合MAC地址信息识别该目标设备是否为IPC设备,能够依据端口、MAC信息进一步快速识别IPC,在节省电子设备检测IPC设备的时间的同时,提高检测的全面性。
结合第一方面,在一些可能的实现方式中,所述基于TCP端口的探测协议获取所述目标设备的指纹信息,包括:
根据所述端口信息确定所述基于TCP端口的探测协议;
基于所述确定的探测协议,向所述目标设备发送探测消息;
接收来自所述目标设备的应答消息;
根据所述应答消息提取所述目标设备的指纹信息。
本申请提供的方案,通过根据端口信息确定对应的探测协议后再发送相应的探测消息,然后从接收的应答消息中提取指纹信息,可以进一步保证获取的信息的精准性,有效提高了检测精准度。
结合第一方面,在一些可能的实现方式中,所述基于TCP端口的探测协议包括web协议/超文本传输协议Http、域名系统DNS协议、Telnet协议、文本传输协议FTP、实时流传输协议RTSP中的一种或多种协议。
结合第一方面,在一些可能的实现方式中,所述基于UDP端口的探测协议获取所述目标设备的指纹信息,包括:
根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP探测消息;
在对应的监听端口上接收所述目标设备返回的应答消息;
根据所述应答消息提取所述目标设备的指纹信息。
本申请提供的方案,通过根据预设的探测协议列表向每个探测协议对应的地址和端口发送对应的UDP探测消息,并在对应的监听端口上接收应答消息,然后从接收的应答消息中提取指纹信息,可以进一步保证获取的信息的精准性,有效提高了检测精准度。
结合第一方面,在一些可能的实现方式中,所述基于UDP端口的探测协议包括开放式网络视频接口论坛ONVIF协议、多播域名系统MDNS协议、会话初始协议SIP、域名系统DNS协议、私有协议中的一种或多种协议。
结合第一方面,在一些可能的实现方式中,所述目标设备的指纹信息包括以下信息中的一种或多种:
所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
结合第一方面,在一些可能的实现方式中,所述方法还包括:
获取所述目标设备的辅助信息,其中,所述辅助信息包括以下信息中的一种或多种:位置信息、无线保真服务集标识Wi-Fi SSID或Wi-Fi名称;
根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
本申请提供的方案,通过根据获取的指纹信息和辅助信息共同确定目标设备是否为视频监控设备,可以提高检测的精准度。
结合第一方面,在一些可能的实现方式中,所述方法还包括:
若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
本申请提供的方案,若电子设备在当前接入的第一AP下未检测到视频监控设备,则切换到该无线网络下的第二AP继续识别视频监控设备,可以提高检测的全面性。
第二方面,提供一种用于检测视频监控设备的方法,该方法应用于电子设备,包括:获取至少一个目标设备的媒体接入控制MAC地址信息,其中,所述电子设备与所述目标设备接入同一无线网络;根据所述MAC地址信息确定所述目标设备是否为视频监控设备。
本申请提供的方案,通过目标设备的MAC地址信息确定目标设备是否为视频监控设备,可以节省电子设备检测IPC设备的时间,提高检测效率。
结合第二方面,在一些可能的实现方式中,所述根据所述MAC地址信息确定所述目标设备是否为视频监控设备,包括:
若所述MAC地址信息为第一级MAC地址信息,则确定所述目标设备为所述视频监 控设备;
若所述MAC地址信息不是第一级MAC地址信息,则无法确定所述目标设备为所述视频监控设备。
结合第二方面,在一些可能的实现方式中,所述方法还包括:
若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,根据第一信息确定所述目标设备是否为所述视频监控设备,其中,所述第一信息包括所述MAC地址信息和端口信息,或,所述第一信息包括所述端口信息,所述端口信息是根据所述端口的状态获取到的。
本申请提供的方案,若电子设备根据MAC地址信息无法确定目标设备为视频监控设备,则根据第一信息进一步进行确定,可以提高检测的精准度。
结合第二方面,在一些可能的实现方式中,根据第一信息确定所述目标设备是否为所述视频监控设备,包括:
若所述端口信息为第一级端口信息,确定所述目标设备为所述视频监控设备;
若所述端口信息为第二级端口信息,且所述MAC地址信息是第二级MAC地址信息,则确定所述目标设备为所述视频监控设备。
结合第二方面,在一些可能的实现方式中,所述方法还包括:
若根据所述第一信息无法确定所述目标设备为所述视频监控设备,则基于TCP端口的探测协议或基于UDP端口的探测协议获取所述目标设备的指纹信息;
根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
本申请提供的方案,若电子设备根据第一信息无法确定目标设备为所述视频监控设备,则可以基于探测协议获取的指纹信息进一步确定,可以提高检测的精准度。
结合第二方面,在一些可能的实现方式中,所述方法还包括:
若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,则基于TCP端口的探测协议或基于UDP端口的探测协议获取所述目标设备的指纹信息;
根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
本申请提供的方案,根据MAC地址信息无法确定目标设备为视频监控设备,则基于探测协议进行判断,节约了电子设备检测IPC设备的时间,提高了检测的效率。
结合第二方面,在一些可能的实现方式中,所述基于TCP端口的探测协议获取所述目标设备的指纹信息,包括:
根据所述端口信息确定所述基于TCP端口的探测协议;
基于所述确定的探测协议,向所述目标设备发送探测消息;
接收来自所述目标设备的应答消息;
根据所述应答消息提取所述目标设备的指纹信息。
本申请提供的方案,通过根据端口信息确定对应的探测协议并发送相应的探测消息,然后从接收的应答消息中提取指纹信息,可以进一步保证获取的信息的精准性,有效提高了检测精准度。
结合第二方面,在一些可能的实现方式中,所述基于TCP端口的探测协议包括web协议/超文本传输协议Http、域名系统DNS协议、Telnet协议、文本传输协议FTP协议、实时流传输协议RTSP协议中的一种或多种协议。
结合第二方面,在一些可能的实现方式中,所述基于UDP端口的探测协议获取所述目标设备的指纹信息,包括:
根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP探测消息;
在对应的监听端口上接收所述目标设备返回的应答消息;
根据所述应答消息提取所述目标设备的所述指纹信息。
本申请提供的方案,通过根据预设的探测协议列表向每个探测协议对应的地址和端口发送对应的UDP探测消息,并在对应的监听端口上接收应答消息,然后从接收的应答消息中提取指纹信息,可以进一步保证获取的信息的精准性,有效提高了检测精准度。
结合第二方面,在一些可能的实现方式中,所述基于UDP端口的探测协议包括开放式网络视频接口论坛ONVIF协议、多播域名系统MDNS协议、会话初始协议SIP协议、域名系统DNS协议、私有协议中的一种或多种协议。
结合第二方面,在一些可能的实现方式中,所述目标设备的指纹信息包括以下信息中的一种或多种:
所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
结合第二方面,在一些可能的实现方式中,所述方法还包括:
获取所述目标设备的辅助信息,其中所述辅助信息包括以下信息中的一种或多种:位置信息、无线保真服务集标识Wi-Fi SSID或Wi-Fi名称;
根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
本申请提供的方案,通过根据获取的指纹信息和辅助信息共同确定目标设备是否为视频监控设备,可以提高检测的精准度。
结合第二方面,在一些可能的实现方式中,所述方法还包括:
若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
本申请提供的方案,若电子设备在当前接入的第一AP下未检测到视频监控设备,则切换到该无线网络下的第二AP继续识别视频监控设备,可以提高检测的全面性。
第三方面,提供一种用于检测视频监控设备的方法,该方法应用于电子设备,包括:基于UDP端口的探测协议获取至少一个目标设备的指纹信息,其中,所述电子设备与所述目标设备接入同一无线网络;根据所述指纹信息确定所述目标设备是否为视频监控设备。
本申请提供的技术方案,通过基于UDP端口的探测协议获取目标设备的设备指纹信息,并将获取到的设备指纹信息与预设的指纹信息库进行匹配,以判断探测的目标设备是否为IPC设备。该技术方案可以在降低成本的同时,有效提高了IPC设备检出效率。
结合第三方面,在一些可能的实现方式中,在基于UDP端口的探测协议获取至少一个目标设备的设备指纹信息之前,所述方法还包括:
获取所述目标设备的媒体接入控制MAC地址信息;
若所述MAC地址信息为第一级MAC地址信息,则确定所述目标设备为视频监控设 备;
若所述MAC地址信息不为第一级MAC地址信息,则无法确定所述目标设备为视频监控设备;
若根据所述MAC地址信息无法确定所述目标设备为视频监控设备,则基于所述UDP端口的探测协议获取所述目标设备的设备指纹信息。
本申请提供的方案,电子设备在基于UDP端口的探测协议确定目标设备为视频监控设备前,先根据获取的MAC地址信息进行先验判断。若可以根据MAC地址信息确定目标设备为视频监控设备,则不用基于探测协议进行判断;若根据MAC地址信息无法确定目标设备为视频监控设备,则基于探测协议进行判断,节约了电子设备检测IPC设备的时间,提高了检测的效率。
结合第三方面,在一些可能的实现方式中,所述基于UDP端口的探测协议获取至少一个目标设备的指纹信息,包括:
根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP探测消息;
在对应的监听端口上接收所述目标设备返回的应答消息;
根据所述应答消息提取所述目标设备的指纹信息。
结合第三方面,在一些可能的实现方式中,所述基于UDP端口的探测协议包括以下协议中的一种或多种:
开放式网络视频接口论坛ONVIF协议、多播域名系统MDNS协议、会话初始协议SIP、域名系统DNS协议、私有协议。
结合第三方面,在一些可能的实现方式中,所述目标设备的指纹信息包括以下信息中的一种或多种:
所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
结合第三方面,在一些可能的实现方式中,所述方法还包括:
获取所述目标设备的辅助信息,其中,所述辅助信息包括以下信息中的一种或多种:位置信息、无线保真服务集标识Wi-Fi SSID或Wi-Fi名称;
根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
结合第三方面,在一些可能的实现方式中,所述方法还包括:
若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
第三方面的其它可能的实现方式的有益效果可以参考上述第一方面的有益效果,这里不再赘述。
第四方面,提供一种用于检测视频监控设备的方法,该方法应用于电子设备,包括:获取至少一个目标设备的端口信息,其中,所述电子设备与所述目标设备接入同一无线网络;根据所述端口信息确定所述目标设备是否为视频监控设备。
本申请提供的方案,通过目标设备的端口信息确定目标设备是否为视频监控设备,可以节省电子设备检测IPC设备的时间,提高检测效率。
结合第四方面,在一些可能的实现方式中,所述根据所述端口信息确定所述目标设备是否为视频监控设备,包括:
若所述端口信息为第一级端口信息,则确定所述目标设备为视频监控设备;
若所述端口信息不为所述第一级端口信息,则无法确定所述目标设备为视频监控设备。
结合第四方面,在一些可能的实现方式中,所述方法还包括:
若根据所述端口信息无法确定所述目标设备为视频监控设备,根据第二信息确定所述目标设备是否为视频监控设备,所述第二信息包括MAC地址信息和所述端口信息,或,所述第二信息包括所述MAC地址信息,其中,所述MAC地址信息是通过主机发现获得的。
本申请提供的方案,若电子设备根据端口信息无法确定目标设备为视频监控设备,则根据第二信息进一步进行确定,可以提高检测的精准度。
结合第四方面,在一些可能的实现方式中,所述根据第二信息确定所述目标设备是否为视频监控设备,包括:
若所述MAC地址信息为第一级MAC地址信息,确定所述目标设备为所述视频监控设备;
若所述端口信息为第二级端口信息,且所述MAC地址信息是第二级MAC地址信息,确定所述目标设备为所述视频监控设备。
结合第四方面,在一些可能的实现方式中,所述方法还包括:
若根据所述第二信息无法确定所述目标设备为视频监控设备,则基于TCP端口的探测协议或基于UDP端口的探测协议获取所述目标设备的指纹信息;
根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
本申请提供的方案,若电子设备根据第二信息无法确定目标设备为所述视频监控设备,则可以基于探测协议获取的指纹信息进一步确定,可以提高检测的精准度。
结合第四方面,在一些可能的实现方式中,所述基于TCP端口的探测协议获取所述目标设备的指纹信息,包括:
根据所述端口信息确定所述基于TCP端口的探测协议;
基于所述确定的探测协议,向所述目标设备发送探测消息;
接收来自所述目标设备的应答消息;
根据所述应答消息提取所述目标设备的指纹信息。
结合第四方面,在一些可能的实现方式中,所述基于TCP端口的探测协议包括web/Http协议、DNS协议、Telnet协议、FTP协议、RTSP协议中的一种或多种协议。
结合第四方面,在一些可能的实现方式中,所述基于UDP端口的探测协议获取所述目标设备的指纹信息,包括:
根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP探测消息;
在对应的监听端口上接收所述目标设备返回的应答消息;
根据所述应答消息提取所述目标设备的指纹信息。
结合第四方面,在一些可能的实现方式中,所述基于UDP端口的探测协议包括ONVIF 协议、MDNS协议、SIP协议、DNS协议、私有协议中的一种或多种协议。
结合第四方面,在一些可能的实现方式中,所述目标设备的指纹信息包括以下信息中的一种或多种:
所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
结合第四方面,在一些可能的实现方式中,所述方法还包括:
获取所述目标设备的辅助信息,其中,所述辅助信息包括以下信息中的一种或多种:位置信息、Wi-Fi SSID或Wi-Fi名称;
根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
结合第四方面,在一些可能的实现方式中,所述方法还包括:
若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
第四方面的其它可能的实现方式的有益效果可以参考上述第一方面的有益效果,这里不再赘述。
第五方面,提供了一种装置,该装置包含在电子设备中,该装置具有实现上述方面及上述方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。
第六方面,提供了一种电子设备,包括:一个或多个处理器;存储器;一个或者多个应用程序;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述第一方面至第四方面或第一方面至第四方面中任一项可能的实现中的用于检测视频监控设备的方法。
第七方面,提供了一种芯片系统,包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得上述第一方面至第四方面或第一方面至第四方面任一项可能的实现中的用于检测视频监控设备的方法在所述电子设备上的功能得以实现。
第八方面,提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面至第四方面或第一方面至第四方面任一项可能的实现中的用于检测视频监控设备的方法。
第九方面,提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面至第四方面或第一方面至第四方面任一项可能的设计中的用于检测视频监控设备的方法。
附图说明
图1是本申请实施例提供的一种电子设备的硬件结构示意图。
图2是本申请实施例提供的一种电子设备的软件结构示意图。
图3是本申请实施例提供的一个无线通信系统的示意图。
图4是本申请实施例提供的一个扩增服务集的示意图。
图5是本申请实施例提供的一组GUI的示意图。
图6是本申请实施例提供的一种检测设备的内部算法流程图。
图7是本申请实施例提供的一种检测设备以RTSP探测方式与目标设备进行交互的示意图。
图8是本申请实施例提供的一种检测设备以ONVIF协议探测方式与目标设备进行交互的示意图。
图9是本申请实施例提供的一种检测设备以SIP协议探测方式与目标设备以及媒体服务器进行交互的示意图。
图10是本申请实施例提供的另一种用于检测视频监控设备的方法的示意性流程图。
图11是本申请实施例提供的另一种电子设备的示意性框图。
图12是本申请实施例提供的又一种电子设备的示意性框图。
具体实施方式
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个、两个或两个以上。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
本申请实施例提供一种用于检测视频监控设备的方法,该方法应用于电子设备,该电子设备通过对接入同一无线网络下的目标设备进行MAC地址信息/端口信息获取,以及根据不同情况基于TCP端口或UDP端口的探测协议获取目标设备的指纹信息,从而确定目标设备是否为视频监控设备。本申请技术方案针对市面上形态多样的视频监控设备,使用了包括MAC地址信息、端口信息、基于TCP端口或UDP端口的探测协议在内的多种检测手段,提供了一种更为全面的检测方案,有效提高了检测精准度,降低了漏检率。本申请技术方案所适用的场景可以是酒店大堂、房间等场所,使用本申请的电子设备能够有效检测此类场所中被恶意安装的偷拍类IPC,从而可以减少用户隐私被侵犯事件的发生。此外,本申请提供的方法和电子设备也可以用于家居环境下的普通IPC的检测。
本申请实施例提供的用于检测视频监控设备的方法可以应用于手机、平板电脑、可穿 戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110、外部存储器接口120、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、传感器模块180、指南针190、马达191、指示器192、摄像头193、显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。其中,本申请实施例中的构建与发送探测消息、构建设备指纹信息库、将获取到的设备指纹信息与所述指纹信息库匹配以识别IPC设备、无线接入点的切换等均可由处理器110来完成。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据,例如可以存储一些IPC设备的信息以形成指纹信息库。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备101处理数据或执行指令的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口、集成电路间音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、用输入输出(general-purpose input/output,GPIO)接口、SIM卡接口和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110、内部存储器121、外部存储器、显示屏194、摄像头193和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量、电池循环次数、电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像、视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、Miniled、MicroLed、Micro-oLed、量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施 例中,电子设备100可以包括1个或多个显示屏194。
在本申请的一些实施例中,当显示面板采用OLED、AMOLED、FLED等材料时,上述图1中的显示屏194可以被弯折。这里,上述显示屏194可以被弯折是指显示屏可以在任意部位被弯折到任意角度,并可以在该角度保持。
电子设备100的显示屏194可以是一种柔性屏,目前,柔性屏以其独特的特性和巨大的潜力而备受关注。柔性屏相对于传统屏幕而言,具有柔韧性强和可弯曲的特点,可以给用户提供基于可弯折特性的新交互方式,可以满足用户对于电子设备的更多需求。
电子设备100可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点、亮度、肤色进行算法优化。ISP还可以对拍摄场景的曝光、色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或多个摄像头193。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1、MPEG2、MPEG3、MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别、人脸识别、语音识别、文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备101执行本申请一些实施例中所提供的控制音量的方法,以及各种应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用(比如图库、联系人等)等。存储数据区可存储电子设备101使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可 以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得电子设备101执行本申请实施例中所提供的控制音量的方法,以及其他应用及数据处理。电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放、录音等。
传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时环境(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机、图库、日历、通话、地图、导航、WLAN、蓝牙、音乐、视频、短信息等应用程序。
该应用程序包也可以包括下文中提到的第一应用的应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架,应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器、内容提供器、视图系统、电话管理器、资源管理器、通知管理器等。
窗口管理器用于管理窗口程序,窗口管理器可以获取显示屏大小,判断是否有状态栏、锁定屏幕、截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频、图像、音频、拨打和接听的电话、浏览历史和书签、电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂 断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串、图标、图片、布局文件、视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互,也可以与用户交互进行下一步骤。在本申请中,通知管理器可以通知用户与视频监控设备的检测相关的消息等。
通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息、发出提示音、电子设备振动、指示灯闪烁等。
系统库可以包括多个功能模块。例如:表面管理器(surface manager)、媒体库(media libraries)、三维图形处理库(例如:OpenGL ES)、2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频、视频格式回放和录制以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4、H.264、MP3、AAC、AMR、JPG和PNG等。
三维图形处理库用于实现三维图形绘图、图像渲染、合成和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动、摄像头驱动、音频驱动、传感器驱动。
下面结合启动第一应用的场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为第一应用图标的控件为例,第一应用调用应用框架层的接口,启动第一应用,进而通过调用内核层启动Wi-Fi等驱动,通过无线通信模块160接收来自其他电子设备的数据,例如来自目标设备的Wi-Fi数据。
为了便于理解本申请的方案,下文先对本申请所涉及到的术语进行说明。
无线接入点(access point,AP):是一个无线网络的创建者,是网络的中心节点。一般家庭或办公室使用的无线路由器可以认为是一个AP。
如图3所示为本申请实施例提供的一个无线通信系统的示意图。无线通信系统通常可以包括一个或多个无线AP,一个或多个终端设备,图3以无线通信系统300包括无线AP10、终端设备30、终端设备40、终端设备50为示例。此外,该无线通信系统300还包括服务器20
应理解,图3只是示意图,该通信系统中还可以包括其它网络设备,如还可以包括核心网设备、无线中继设备和无线回传设备,在图3中未画出。本申请的实施例对该移动通信系统中包括的网络设备和终端设备的数量不做限定。
站点(station,STA):每一个连接到无线AP中的终端设备都可以称为一个站点,例如图3中所示出的终端设备30、终端设备40、终端设备50或其它可以联网的终端设备或用户设备。
基本服务集(basic service set,BSS):是802.11局域网(local area network,LAN)的基本组成模块。能互相进行无线通信的STA可以组成一个BSS。
扩增服务集(extension service set,ESS):多个BSS可以构成一个扩展网络,称为ESS网络,可理解为由使用相同服务集标识(service set identifier,SSID)的多个BSS形成的更大规模的虚拟BSS。其中,一个ESS网络内部的STA可以互相进行通信。
如图4所示为本申请实施例提供的一个ESS400的示意图。如图4所示,该ESS400由两个BSS(分别为BSS1和BSS2)构成。
SSID:是一个ESS的网络标识,可以理解为用户用手机等联网设备搜索出来的WIFI的名称。在同一ESS内的所有AP必须具有相同的SSID,否则无法进行通信。
基本服务集标识(basic SSID,BSSID):一个BSS的标识,实际上就是AP(路由器)的媒体接入控制(media access control,MAC)地址,用来标识AP管理的BSS。
举例说明SSID和BSSID的关系:
一家公司面积比较大,安装了若干台无线接入点,公司员工只需要知道一个SSID就可以在公司范围内任意地方接入无线网络。BSSID其实就是每个无线接入点的MAC地址。当员工在公司内部移动的时候,SSID是不变的,但BSSID随着员工切换到不同的无线接入点,是在不停变化的。
如果在家居等场景下安装了一个路由器,则该路由器即可组成一个无线网络。
为了便于理解,本申请以下实施例将以具有图1和图2所示结构的手机为例,结合附图对本申请实施例提供的用于检测视频监控设备的方法进行具体阐述。
图5示出了手机的一组GUI,其中,从图5中的(a)到图5中的(e)示出了手机可以在第一应用下检测当前空间是否存在IPC设备(即图中的摄像头)。
参见图5中的(a)所示的GUI,该GUI为手机的桌面。当手机检测到用户点击桌面上的第一应用的图标501的操作后,可以启动该第一应用,显示如图5中的(b)所示的GUI,该GUI可以称为检测界面。
参见图5中的(b)所示的GUI,当手机检测到用户点击知道了的图标502的操作后,手机可以开始对当前空间是否存在IPC设备进行检测,显示如图5中的(c)所示的GUI。
参见图5中的(c)所示的GUI,为手机正在进行扫描中的界面,其中,图中所示出的2%表示手机此时检测进度为2%,扫描中还可以实时显示手机当前接入的AP、Wi-Fi名称、MAC地址、设备名称等信息。
若手机检测进度完成后,检测到当前网络空间(可以是手机当前所接入的局域网)不存在IPC设备,在手机界面可以显示“未发现摄像头”,参考图5中的(d)所示的GUI。
若手机检测进度完成后,检测到当前网络空间存在IPC设备,在手机界面可以显示“发现2个摄像头”,且还可以显示检测到的视频监控设备(摄像头)的详细信息,如图5中的(e)所示的“设备1”:所接入网络的名称“A”和设备的MAC地址信息“AA:BB:CC:11:22:33”、“设备2”:所接入网络的名称“A”和设备的MAC地址信息“11:22:33:AA:BB:CC”。
对于发现的摄像头,所述第一应用建议定位详细位置。当用户点击设备名称或设备名称右侧对应的控件时,可以进一步对选中的摄像头进行定位。
需要说明的是,上述过程也可以以语音的形式实现视频监控设备的检测。例如,若手 机检测到当前网络空间存在视频监控设备,可以以语音播放的形式提示用户当前网络空间存在视频监控设备;若手机检测到网络空间不存在视频监控设备,可以以语音播放的形式提示用户当前网络空间不存在视频监控设备。其过程与图5所示的过程基本一致,仅是显示形式的不同,为了简洁,这里不再赘述。
在一些实施例中,若用户的手机连接到酒店或宾馆的WIFI网络后,可以向用户提示打开第一应用以检测当前网络空间是否存在IPC设备,并将检测结果显示或语音提示给用户;或者,若用户手机连接到酒店或宾馆的WIFI网络后,可以自主检测当前网络空间是否存在IPC设备,并将检测结果显示或语音提示给用户;本申请对于如何启动第一应用进行IPC检测的方式不予限制。
下面结合附图6介绍本申请实施例中电子设备判断是否存在IPC设备的内部实现过程与判断逻辑,为与目标设备进行功能区分,下文将用于检测IPC等目标设备的电子设备称为“检测设备”。图6示出了本申请实施例提供的一种检测设备的内部算法流程图。
实施例一:
S710,检测设备利用主机发现过程获取目标设备的MAC地址信息。
本申请实施例利用开放式系统互联模型(open system interconnection model,OSI)中的协议进行主机发现。一般使用数据链路层中的地址解析协议(address resolution protocol,ARP),或者网络层中的网络控制报文协议(internet control message protocol,ICMP)判断其所接入网络下是否有其他存活的目标设备(即接入该网络并处于正常工作状态的设备),并记录存活目标设备的网际协议(internet protocol,IP)地址,也可以利用其他能实现ping功能的协议判断是否存在其他存活的目标设备。然后利用ARP协议获取每个目标设备对应的MAC地址。
S720,对获取到的每个目标设备对应的MAC地址信息进行匹配识别。
检测设备基于MAC信息库,对获取到的每个目标设备对应的MAC地址进行匹配识别。其中,上述MAC信息库中的信息包括但不限于WiFi厂商对应的MAC标识信息及其对应的级别。MAC信息库中包括的多个MAC标识信息可以根据不同厂商而划分为不同级别,不同的级别代表对应设备为IPC设备的概率。
示例性地,可以将A、B厂商对应的MAC地址划分为1级,将C、D厂商对应的MAC地址划分为2级,将E厂商对应的MAC地址划分为3级,级别越高(如1级),表明该设备为IPC设备的概率越大,级别越低(如3级),表明该设备为IPC设备的概率越小。若检测设备获取到4个目标设备(分别为目标设备1、目标设备2、目标设备3以及目标设备4)的MAC地址,假设目标设备1的MAC地址与特定MAC信息库中的信息匹配后为A厂商对应的MAC地址,目标设备2和目标设备3的MAC地址经匹配后分别为C厂商对应的MAC地址和D厂商对应的MAC地址,目标设备4的MAC地址经匹配后为E厂商对应的MAC地址,则可以确定目标设备1的级别为1级,极有可能为IPC设备,检测设备可以通知用户目标设备1为IPC设备,目标设备2、目标设备3的级别为2级,目标设备4的级别为3级,目标设备2-4是否为IPC设备可以等待进一步确认。
检测设备基于获取到的MAC地址与MAC信息库中的信息进行匹配识别后,判断目标设备是否为IPC设备。若可以确定目标设备为IPC设备,则可以通知用户当前空间存在IPC设备,若不能确定目标设备是否为IPC设备,则可以进一步通过其它信息(端口信息、 基于TCP端口的协议探测获取的信息、基于UDP端口的协议探测获取的信息)判断目标设备是否为IPC设备。
S730,利用端口扫描获取目标设备的端口信息,并识别该端口信息。
检测设备可以利用传输控制协议(transmission control protocol,TCP)/用户数据报协议(user datagram protocol,UDP)端口扫描获取目标设备的端口信息。检测设备构建TCP探测消息或UDP探测消息并发送至目标设备,然后根据目标设备对该探测消息的响应情况判断该目标设备的端口是否处于开放状态,从而获取到目标设备对应的开放端口列表。例如,检测设备向目标设备的某端口号发送TCP连接请求,若收到目标设备应答的RST响应,则确认目标设备的该端口处于关闭状态,若收到的是确认字符(acknowledge character,ACK)响应,则该端口处于开放状态。
其中,上述端口列表可以是基于常见协议类型设置的固定数量的端口列表,例如,可以基于TCP或UDP设置端口的数量进行设置;或者,该端口列表也可以是根据每次/历次检测结果更新的动态端口列表。关于端口列表的更新与扫描可以基于以下方式:
1)、可以根据历次(预设次数)检测结果决定是否调整端口列表
检测设备可以保留每次检测到的IPC设备经常使用或开放的服务端口号,删除其余端口号,以更新端口列表;或者,检测设备可以根据检测次数、检测时长、探测到的IPC数量更新端口列表。示例性地,若每次检测时长超过一定阈值,需要判断的目标设备数量超过一定阈值,则对端口列表进行刷新,如对其中更不常用的端口进行删除等。
2)、调整端口扫描策略
检测设备可以将端口列表中的端口进行优先级的划分,如可以划分为高优先级和低优先级(可根据专家经验定义或根据历次检测结果动态调整),对其中高优先级进行至少一次扫描、对低优先级进行一次或随机抽样扫描等。
检测设备在获取到目标设备的端口信息之后,将目标设备的端口信息与端口信息库中的端口信息进行匹配,以进一步识别目标设备是否为IPC设备。其中,端口信息库中的端口信息包括但不限于与视频传输相关的端口号。类似地,端口信息库中的多个端口信息也可以根据端口号划分为不同级别,不同的级别代表对应设备为IPC设备的概率。例如,可以根据一个端口号或多个端口号的组合将端口分为1级、2级、3级等,级别越高(如1级),表明该设备为IPC设备的概率越大,级别越低(如3级),表明该设备为IPC设备的概率越小。
假设端口信息库中的端口信息包括X、Y、Z三类端口信息,其中,X类端口信息划分为1级端口信息,例如X类端口信息包括X1端口号,Y类端口信息划分为2级端口信息,例如Y类端口信息包括Y1、Y2+Y3、Y2+Y4+Y5等端口号或端口号的组合,Z类端口信息划分为3级端口,例如Z类端口信息包括Z1、Z2+Z5等端口号或端口号的组合。
仍以S720中检测设备获取到目标设备1-4的MAC地址为例,若目标设备2的端口号为X1,将该端口号与端口信息库中的端口信息进行匹配后确定目标设备2包括1级端口信息,则可以确定目标设备2为IPC设备,检测设备可以通知用户目标设备2为IPC设备。若目标设备3和目标设备4的端口号分别为Y1、Y2+Y3,与端口信息库中的端口信息进行匹配后确定目标设备3和4均包括2级端口信息,则目标设备3和目标设备4是否为IPC设备可按后续步骤S740结合MAC地址信息做进一步识别,或者,根据后续步骤S750或 S760通过协议探测进行进一步识别。
在一些实施例中,在获取到端口信息后,可以确定对应目标设备的端口开放情况,进一步地,可以利用版本侦测确定开放端口上运行的具体的应用程序及版本信息;或利用操作系统(operating system,OS)探测检测目标设备上运行的操作系统类型以及该目标设备的类型等信息。然后将此类信息作为设备指纹信息的一种或多种,可以与前面获取到的MAC、端口等设备指纹信息结合使用,通过获得的设备指纹信息判断对应的设备是否为IPC设备。
S740,利用端口信息和MAC地址信息识别IPC设备。
在一些实施例中,也可以结合MAC地址信息和端口信息识别目标设备是否为IPC设备。若根据端口信息无法判断对应目标设备为IPC设备,则进一步根据端口信息和MAC地址进行判断。
仍以S720中检测设备获取到目标设备1-4的MAC地址为例,在上述步骤S730中,目标设备3和目标设备4均包括2级端口信息,由于属于该级别中的设备为IPC设备的概率相对较高,则目标设备3和目标设备4可能为IPC设备,进一步地,可以结合目标设备的MAC地址信息进行判断。在上述步骤S720中,目标设备3的MAC地址信息经匹配为特定MAC信息库中的2级MAC地址,目标设备4的MAC地址信息经匹配为3级MAC地址,由于目标设备2的MAC地址信息和端口信息均为2级,因此,可以确定目标设备3为IPC设备,检测设备可以通知用户目标设备3为IPC设备。
通过上述步骤S710~S740,检测设备识别出目标设备1、目标设备2以及目标设备3均为IPC设备,关于目标设备4可以进一步根据步骤S750或S760基于TCP端口的探测协议和/或基于UDP端口的探测协议获取的信息进行进一步的识别。
S750,基于TCP端口的探测协议获取设备指纹信息,并将其与构建的设备指纹信息库进行匹配,以进一步识别IPC设备。
其中,基于TCP端口的探测协议可以包括Web协议/超文本传输协议(hypertext transfer protocol,Http)、域名系统(domain name system,DNS)协议、Telnet协议、文本传输协议(file transfer protocol,FTP)、实时流传输协议(real time streaming protocol,RTSP)中的一种或多种。
具体地,针对每个目标设备,可根据上述步骤S730获取其对应的开放端口列表,若该开放端口列表中包括Telnet协议对应的第一端口(如端口23),则使用Telnet探测方式,即向目标设备的第一端口发送Telnet探测请求,并等待接收返回的应答消息;若该开放端口列表中包括FTP协议对应的第二端口(如端口21),则使用FTP探测方式,即向目标设备的第二端口发送FTP探测请求,并等待接收返回的应答消息;若该开放端口列表中包括RTSP协议对应的第三端口(如端口554),则使用RTSP探测方式,即向目标设备的第三端口发送RTSP探测请求,并等待接收返回的应答消息;若该开放端口列表中包括DNS协议对应的第四端口(如端口53),则使用DNS探测方式(也可以不判断是否存在第四端口,而是直接使用该方式),即向检测设备所接入网络的路由器AP或其他DNS服务器发送DNS反向查询请求,并等待接收返回的应答消息;若该开放端口列表中包括Http协议对应的第五端口(如端口80、端口81、端口8000等)或者该列表中包括其他端口,则使用Web/Http探测方式,即向目标设备的第一端口发送HTTP探测请求(如 GET或POST),并等待接收返回的应答消息。
若检测设备根据上述各种基于TCP的协议探测方式接收到应答消息,则根据对应的指纹提取方式对对应的应答消息进行处理,以判断是否存在能匹配指纹库的有效指纹信息。可以为每种探测方式设置一个指纹库,也可以为多个探测方式设置一个指纹库,还可以为所有探测方式设置一个指纹库。若存在有效的指纹信息,则确认目标设备为IPC设备,否则需要进一步通过其他方式(如后续步骤S760)进行判断。
示例性地,以RTSP探测方式获取设备指纹信息为例进行说明,具体请参见下文。
RTSP是一种基于文本的应用层协议,一般情况RTSP本身并不用于传送流媒体数据,而是对流媒体进行控制(如播放、暂停等)。该协议提供的请求消息包括可用方法查询(OPTIONS)、媒体初始化/会话描述(DESCRIBE)、创建会话(SETUP)、播放(PLAY)、录制(RECORD)、更新会话描述(ANNOUNCE)、重定向服务器(REDIRECT)以及获得参数信息(GET_PARAMETER)等方法。
其中,关于上述提到的OPTIONS、DESCRIBE、SETUP、ANNOUNCE、REDIRECT以及GET_PARAMETER可以表示以下含义:
·OPTIONS:任一端可发送,可以用于获取对端支持的方法列表。
·DESCRIBE:客户端发送,可以用于获取URL指定的媒体描述信息,如IP、媒体类型+端口+传输协议等,一般可以用SDP协议描述。
·SETUP:客户端发送,可以用于协商传输方式(如实时传输协议(real-time transport protocol,RTP)、单播、端口)、创建RTSP会话(也可对正在播放的媒体流改变传输参数)。
·ANNOUNCE:可选地,若由服务器发送,可以用于实时更新会话描述;若由客户端发送,可以用于将URL指定的媒体描述信息提交给服务器。
·REDIRECT:服务器发送,可以用于告知客户端连接到另一个服务器位置,命令中携带新目标的URL,若客户端要继续发送或接收媒体流,可以与原服务器断开连接(Teardown),然后与新服务器建立连接(setup)。
·GET_PARAMETER:可选地,任一端可发送,可以用于获取URL指定的媒体流参数值(需要会话ID、可能需要鉴权),不带主体的命令可用来测试对端是否存活。
本申请实施例主要是利用RTSP协议定义的REDIRECT和SETUP,检测设备作为协议定义的服务器,向该AP下的其他设备(可以是基于前面步骤确定的目标设备)发送对应的探测消息,在收到对应的应答消息后提取设备指纹信息,然后基于构建的设备指纹库判断目标设备是否为IPC设备。此外,还可以判断该网络下是否还有其他AP未探测,若是,则从当前AP切换到下一个AP后继续进行上述探测。
具体地,对检测设备以RTSP探测方式获取目标设备指纹信息,下面结合图7所示检测设备与目标设备之间的交互图进行详细说明,该图7中可以包括步骤S910-S918。
S910、获取当前AP下其他设备的URL,并分别构建重连接其他服务器的REDIRECT请求。
本步骤中所述的其他设备可以是通过上述步骤S710描述的主机发现过程获取的目标设备,也可以是通过上述步骤S730描述的端口扫描过程获取的、特定端口(如554)为开放状态的目标设备。
本步骤中URL的获取可以是根据设备的IP地址、开放端口以及主流IPC厂商的RTSP服务地址命名规则构建的,或者,根据开放式网络视频接口论坛(open network video interface forum,ONVIF)协议的设备发现过程、媒体能力/媒体流URL获取过程得到的,等等。本申请实施例不对上述URL的获取方式进行限定。
S911、检测设备向目标设备发送REDIRECT请求。
如上所述,该REDIRECT请求可以用于告知目标设备连接到另一个服务器位置,命令中可以携带新目标的URL,若目标设备要继续发送或接收媒体流,可以与原服务器断开连接,然后与新服务器建立连接。
S912、目标设备向检测设备发送消息,该消息中指示目标设备与原服务器断开连接。
该消息可以是TEARDOWN消息,其中包括原服务器URL、原会话标识等信息。
S913、检测设备向目标设备发送响应消息。
该响应消息可以为200ok,用于指示目标设备已接收到其与原服务器断开连接的消息。
S914、目标设备向检测设备发送消息,该消息指示目标设备与新服务器连接。
该消息可以是SETUP消息,其中包括新服务器URL,用于传输媒体流的传输协议类型、发送方式、发送端口等信息。
S915、检测设备向目标设备发送响应消息。
该响应消息可以为200ok,其中可包括新会话标识以及双方协商的用于传输媒体流的传输协议类型、发送方式、发送端口等信息,用于指示目标设备已接收到其与新服务器连接的消息。
可选的,检测设备可通过如下步骤S916-S917描述的方式或者步骤S918-S919描述的方式,进一步获取目标设备的流媒体信息,如地址端口、媒体类型、传输协议等。
S916、检测设备向目标设备发送GET_PARAMETER消息。
如上所述,该GET_PARAMETER消息可以用于获取目标设备的URL指定的媒体流参数值(需要会话ID、可能需要鉴权)。
S917、目标设备向检测设备发送响应消息。
该响应消息可以为200ok,该消息中可以包括目标设备的流媒体信息等。
S918、目标设备向检测设备发送ANNOUNCE消息。
如上所述,该ANNOUNCE消息可以使得目标设备发送时将URL指定的媒体描述信息提交给检测设备。
S919、检测设备向目标设备发送响应消息。
该响应消息可以为200ok,该消息指示已接收目标设备的流媒体信息等。
需要说明的是,上述步骤S916和S917、S918和S919其目的均是为了获取目标设备的流媒体信息,因此,步骤S916-S917、步骤S918-S919可以同时存在,也可以单独存在,即,检测设备可以通过步骤S916-S917获取目标设备的流媒体信息,也可以通过步骤S918-S919获取目标设备的流媒体信息,还可以通过步骤S916-S917和步骤S918-S919获取目标设备的流媒体信息,本申请对此不予限制。
S920、检测设备获取其它辅助信息。
该辅助信息可以为探测的目标设备的全球定位系统(global positioning system,GPS) 位置信息、WIFI SSID或名称(如xxx酒店/hotel)。
S921、检测设备根据获取的信息提取设备指纹信息,对该指纹信息进行匹配,判断目标设备是否为视频监控设备。
其中,在该方式下,提取的设备指纹信息可以包括:目标设备的类型、传输协议类型、发送方式、IP地址、支持的媒体类型等。
在具体实现上,可以基于如下几种方式进行匹配。
(1)、基于关键字进行匹配
具体地,设备指纹信息库可以包括但不限于:设备类型信息,该设备类型信息例如可以为IPC、IPCam(也可以称为IP network camera)、camera、网络视频传输器(Network Video Transmitter)等关键字,或者其他表征设备类型的;MAC信息,该MAC信息可以为MAC(前半部分字段)列表、MAC厂商列表等;IP信息,该IP信息可以为IP列表、相关位置或所属网络区域等;端口信息,该端口信息可以为端口号列表、对应的端口服务类型列表;传输协议类型信息、媒体类型信息等等。
假设通过上述步骤检测到的目标设备的设备类型信息中包括诸如camera等关键字信息,则可以确认该目标设备为IPC设备;或者,通过上述步骤检测到的目标设备的MAC地址对应某特定厂商,则可以确认检测到的该目标设备为IPC设备;或者,通过上述步骤检测到的目标设备的端口信息包括某特定端口(如554端口),则可以确认检测到的该目标设备为IPC设备;或者,通过上述步骤检测到的目标设备的协议类型为视频相关协议,如ONVIF协议或GB/T 28181/会话初始协议(session initiation protocol,SIP),或者支持的传输协议为流媒体专用的传输协议,如RTP等,则可以确认检测到的该目标设备为IPC设备。
(2)、基于相似度计算方式进行匹配
其中,相似度计算方式可以包括但不限于以下方式中的一种或多种:余弦相似度、皮尔森相关系数、杰卡德相关系数、互信息/信息增益等等。
以余弦相似度为例进行说明,余弦相似度是通过计算两个向量的夹角余弦值来评估他们的相似度。余弦相似度将向量根据坐标值,绘制到向量空间中。
可以根据两个向量之间的角度的余弦值确定两个向量之间的相似度。当两个向量之间的角度的余弦值为1时,则说明这两个向量之间有相同的指向,具有高度的相似性;当连个向量之间的角度的余弦值为0时,则说明这两个向量之间是独立的;当连个向量之间的角度的余弦值为-1时,则说明这两个向量之间有相反的指向,相似度极低或者可以认为完全不相似。
两个向量之间的余弦值可以通过公式(1)计算:
Figure PCTCN2021117425-appb-000001
其中,上文中提到的目标设备的设备指纹信息可以作为A的分量,例如,检测的目标设备的类型信息可以为A 1,检测的目标设备的MAC信息可以为A 2,…等。上文中提到的设备指纹信息库可以为作为B的分量,例如,设备类型信息可以为B 1,MAC信息可以 为B 2,…等。
(3)、基于距离计算方式进行匹配
其中,距离计算方式可以包括但不限于以下方式中的一种或多种:欧氏距离、马氏距离、曼哈顿距离、切比雪夫距离、汉明距离等等。
以欧式距离为例进行说明。欧氏距离(也可以称为欧几里得度量或欧几里得距离)是一个通常采用的距离定义,指在n维空间中两个点之间的真实距离。在二维和三维空间中的欧氏距离就是两点之间的实际距离。
欧氏距离(下文以ρ表示)可以基于以下公式(2)计算:
Figure PCTCN2021117425-appb-000002
其中,上文中提到的目标设备的设备指纹信息可以作为x的分量,例如,检测的目标设备的类型信息可以为x 1,检测的目标设备的MAC信息可以为x 2,…等;上文中提到的设备指纹信息库可以为作为y的分量,例如,设备类型信息可以为y 1,MAC信息可以为y 2,…等。
具体地,可以先制作一个n维的坐标系,在这个n维坐标系中可以分别画出目标设备和检测设备的坐标,利用上述公式(2)计算其欧氏距离。通过计算得到的欧氏距离判断探测的目标设备是否为IPC设备。
(4)、基于多个特征的权重叠加进行匹配
可以对不同的特征分配权重,例如,关键字匹配度的权重为w1,MAC匹配度的权重为w2,IP匹配度的权重为w3,端口匹配度的权重为w4,…等。
具体地,可以对目标设备的每个特征进行匹配,然后将每个特征的匹配度乘以对应的权重后相加,若相加后得到的值大于或等于预设阈值,则可以认为该目标设备为IPC设备,并给出相应的风险提示(如通过用户界面进行文字或图片或语音提示),否则可以认为不是IPC设备。当然,也可以设置某些权重极限情况,如某些关键字、某些MAC信息、某些端口信息的权重可以为100%。
例如,假设预设阈值为100,通过对获得的目标设备的多个特征进行加权求和得到该目标设备的认证值,若该认证值大于或等于100,则可以认为该目标设备为IPC设备,并提示用户当前周围存在风险设备;若该认证值小于预设阈值100,则可以认为该目标设备不是IPC设备。
(5)、基于构建的算法模型进行匹配
具体地,可以利用设备指纹信息构建测试样本,然后使用机器学习(machine learning,ML)和/或深度学习(deep learning,DL)算法模型对该样本进行推理判断。其中,该ML算法模型或DL算法模型可以是基于大量正负样本集训练得到的。
例如,将IPC设备在联网非直播状态下与服务器交互的心跳数据作为正样本进行特征提取(如心跳周期/频率、心跳时长、特定时段的心跳数量、目标地址等特征),将其他状态下或非IPC设备与外部交互的数据作为负样本进行特征提取,然后进行算法训练;又如,将IPC设备在联网直播状态下与服务器交互的数据作为正样本进行特征提取,将其他状态下或非IPC设备与外部交互的数据作为负样本进行特征提取,然后进行算法训练。
S922、检测设备向用户展示判断结果,如果当前网络还用其它AP,则切换BSSID连 接到其他AP。
通过上述方式进行指纹匹配,判断目标设备是否为IPC设备后,可以向用户展示判断结果。例如,上文中所提到的若检测到的目标设备为IPC设备,则可以向用户进行风险提示,如上述图5中的(e)所显示的文字“发现2个摄像头”;若检测到的该目标设备不是IPC设备,也可以向用户提示当前周围环境无风险,如上述图5中的(d)所显示的文字“未发现摄像头”。
此外,检测设备在切换BSSID连接到其他AP的时候,可以通过系统服务(如安卓系统的WIFI管理)获取该网络下对应的SSID、BSSID列表以及信号强度等信息,检测设备可以根据信号强度、SSID等信息对BSSID进行排序。
需要说明的是,本步骤中还可以根据上述步骤S910-S921的检测结果判断是否切换BSSID,例如,若上述步骤未检出IPC设备,则可以进行BSSID切换以继续检测,否则不切换。
在一些实施例中,检测设备也可以基于RSTP定义的获取方法列表过程获取目标信息,也就是发送OPTIONS命令,主要是判断对端的目标设备是否应答支持都哪些方法/命令,从而判断其是否为IPC设备;或者,基于所述RTSP定义的获取参数过程获取目标信息,也就是发送GET_PARAMETER命令,测试对端的目标设备是否存活,从而判断其是否为IPC设备。
S760,基于UDP端口的探测协议获取设备指纹信息,并将其与构建的设备指纹信息库进行匹配,以进一步识别IPC设备。
需要说明的是,该步骤S760的执行不以步骤S720-S750的执行为必要条件,可以在S710之后直接执行S760,即主机发现过程之后采用UDP端口探测协议获取设备指纹信息;或者,在S720对MAC地址信息识别完成之后执行S760中的UDP端口探测协议获取设备指纹信息(具体参见实施例二);且步骤S750与上述步骤S760的执行顺序也不分先后,在一些实施例中,可以先执行步骤S730,获取到目标设备的端口信息并识别完成后执行步骤S750,基于TCP端口探测协议获取设备指纹信息之后,再执行步骤S760,采用UDP端口探测协议获取设备指纹信息;在另一些实施例中,可以先执行步骤S730,获取到目标设备的端口信息并识别完成后执行步骤S760,之后再执行步骤S750。
其中,基于UDP端口的探测协议包括但不限于ONVIF协议、多播域名系统(multicast domain name system,MDNS)协议(包括物理安防互操作性联盟(physical security interoperability alliance,PSIA)协议的MDNS)、会话初始协议(session initiation protocol,SIP)(包括GB/T 28181协议的SIP)、域名系统(domain name system,DNS)协议、私有协议。
具体地,根据预设的多播探测协议列表(如ONVIF探测协议、MDNS探测协议、SIP探测协议、COAP探测协议、私有SDK探测协议等),向每个多播探测协议对应的多播地址和端口(如ONVIF对应的多播地址为239:255:255:250、端口为3702,MDNS对应的多播地址为224.0.0.251、端口为5353等等)发送对应的UDP探测消息,并在对应的监听端口上等待接收目标设备返回的应答消息,以提取所述目标设备的设备指纹信息;和/或,根据预设的广播探测协议列表(如私有SDK探测协议),向每个广播探测协议对应的广播地址和端口(如私有SDK协议1对应的广播地址为IP1、端口为P1,私有SDK协议2 对应的广播地址为IP2、端口为P2等)发送对应的UDP探测消息,并在对应的监听端口上等待接收目标设备返回的应答消息,以提取目标设备的设备指纹信息。
如果在每个多播或广播探测协议对应的监听端口上接收到目标设备返回的应答消息,则根据该多播或广播探测协议对应的设备指纹提取方式对相应的应答消息进行处理(提取设备指纹信息),并根据对应的匹配方式进行匹配,例如,根据预设的指纹库(可以为每种探测方式设置一个指纹库,也可以为多个探测方式设置一个指纹库,还可以为所有探测方式设置一个指纹库)及对应的匹配规则(如特定关键字、特定MAC信息、特定端口等信息匹配)进行匹配等。若存在匹配的有效指纹信息,则确认发送该应答消息的目标设备为IPC设备,否则不为IPC设备。
需要说明的是,若本步骤中检测设备接收到上述步骤S710发现的目标设备之外的其他目标设备发送的应答消息,然后根据该应答消息提取设备指纹信息,并成功匹配为IPC设备,则还可以再执行步骤S710,或者说,更进一步的,针对新发现的该其他目标设备执行步骤S710,从而获取该其他目标设备的MAC地址信息,以帮助后续进一步定位该其他目标设备。当然也可以对该MAC地址信息作为上述步骤S720的识别操作。此处不进行限定。
S770,合并检测结果。
该步骤可以将上述步骤S710~S760识别检测的结果进行合并。例如,上述步骤S720中根据MAC地址信息识别出目标设备1为IPC设备,上述步骤S730中根据端口信息识别出目标设备2为IPC设备,上述步骤S740中结合MAC信息和端口信息识别出目标设备3为IPC设备,上述步骤S750中基于TCP端口的探测协议或步骤S760中基于UDP端口的探测协议获取的设备指纹信息判断目标设备4是否为IPC设备,从而根据以上判断结果将识别出的IPC设备合并为一类。
在一些实施例中,基于上述步骤S710-S740识别出目标设备1、目标设备2、目标设备3为IPC设备后,为了保证识别的准确性,也可以根据步骤S750或步骤S760继续判断目标设备1、目标设备2、目标设备3以及目标设备4是否为IPC设备,并将识别结果进行合并。
需要说明的是,本申请实施例中,步骤S730、S750或S760可以在排除已识别出的IPC设备后,对剩余还未确定是否为IPC设备的目标设备进行相应的检测与判断。当然,也可以不排除已识别出的IPC设备,而是对步骤S710发现的所有目标设备做相应的检测与判断。
检测设备可以根据以上S750、S760所描述的多种探测协议中的至少两种方式分别获取设备指纹信息。
示例1:
可以根据RTSP协议获取设备指纹信息1,并根据ONVIF协议或SIP协议获取设备指纹信息2,然后将设备指纹信息1和设备指纹信息2进行合并、去冗后,生成新的设备指纹信息;然后对新的设备指纹信息进行匹配,判断是否存在IPC设备。
具体地,检测设备可以先执行上述图7中的步骤S910-S919以获取目标设备的设备指纹信息1,再根据图8中的步骤S1010-S1016以获取目标设备的设备指纹信息2,或者,可以执行图9中的步骤S1110-S1113以获取目标设备的设备指纹信息2。以上设备指纹信 息1或2可以是由多个或多种类型的指纹信息组成。
在通过不同的方式获取到设备指纹信息1和设备指纹信息2后,可以将这个信息合并、去冗后生成新的设备指纹信息,然后再对新的设备指纹信息进行匹配,判断该目标设备是否为IPC设备。
假设设备指纹信息1中包括目标设备的IP、MAC地址信息及其对应厂商,对应的端口信息及其状态(打开或关闭或过滤等)、对应服务类型、端口上运行的应用程序及版本、目标设备运行的操作系统以及目标设备的类型等信息;设备指纹信息2中包括目标设备的IP地址、设备类型、设备服务范围和MAC地址信息等,以及目标设备的profile能力和streaming能力。则检测设备可以将设备指纹信息2中的IP地址、设备类型、以及MAC地址去除后,将剩余的信息合并后,再对新的设备指纹信息进行匹配,判断该目标设备是否为IPC设备。
通过不同的探测协议分别获取目标设备的设备指纹信息,将分别获取的目标设备的设备指纹信息进行合并和去冗以获得新的设备指纹信息,可以进一步保证信息的正确性,提高IPC设备检测的精准度。
示例2:
检测设备可以将基于GB/T 28181协议的会话初始化过程,与RTSP协议的重定向服务器过程相结合,获取设备指纹信息;然后对设备指纹信息进行匹配,判断是否存在IPC设备。
示例性地,检测设备可以基于GB/T 28181协议的会话初始化过程和RTSP协议的重定向服务器过程相结合,获取目标设备的设备指纹信息。具体地,检测设备可以先执行图9中的步骤S1110-S1115获取目标设备的设备指纹信息1,再执行图7中的步骤S910-S919,以使得目标设备断开与原服务器的连接,重新与新服务器连接后,获取目标设备的设备指纹信息2,然后对获得的设备指纹信息进行合并以及匹配,判断该目标设备是否为IPC设备。
通过基于GB/T 28181协议的会话初始化过程与RTSP协议的重定向服务器过程相结合获取目标设备的设备指纹信息,也能够进一步保证获取的指纹信息的正确性,提高IPC设备检测的精准度。
此外,本申请实施例并不限定步骤S710-S740的执行顺序,例如,可以先执行步骤S710完成主机发现获取本网络下其他在线/存活的目标设备,再进行端口扫描获取每个目标设备的开放端口列表,然后可以依次执行步骤S720和S740,或者,依次执行步骤S740和S720,或者,直接跳过步骤S720或S740后执行后续步骤S750或S760。
本申请实施例中,考虑到有些场景下IPC设备可能并未布置在检测设备的用户所在房间内,例如,IPC被布置在隔壁房间或者走廊等,那么此类场景可能不会对用户隐私带来困扰或风险,所以,可以对所检测出IPC设备的风险做进一步过滤,实现更精细的评估。示例地,可以针对每个检出的IPC设备获取信道状态(channel state information,CSI)数据、接收信号强度指示(received signal strength indicator,RSSI)数据,然后根据获取的CSI、RSSI数据判断是否过滤掉该IPC设备(如,若CSI数据量小于一定阈值或者RSSI强度值低于一定阈值,则丢弃该IPC设备),上述CSI、RSSI数据在一定程度上可用于表征检测手机与该IPC设备之间距离的远近或者两者之间是否存在墙体等障碍物或者两者 分别接入的AP是否属于不同信道等等。
本申请提供的方案,综合主机发现、端口扫描、基于TCP端口的探测协议以及基于UDP端口的探测协议及相应的设备指纹提取与匹配方式相互配合进行IPC设备的识别。相比现有技术中利用光学、热学、电磁波原理等检测设备对IPC设备进行检测的方案,本实施例的方案可以在降低成本的同时,有效帮助用户检测酒店等场所中被恶意安装的偷拍类IPC,提高IPC设备检测的精准度,从而可以减少用户隐私被侵犯事件的发生。
实施例二:
在本申请实施例二中,基于UDP端口的探测协议,检测设备能够作为协议定义的客户端或服务器,使用多播或广播方式,以固定的多播或广播地址、端口向同一无线网络下的目标设备发布消息。故,检测设备无需利用主机发现、端口扫描或基于TCP端口的探测协议等检测手段,能够直接基于UDP端口的探测协议获取目标设备的设备指纹信息,并判断该目标设备是否为视频监控设备。
可以理解的是,基于UDP端口的探测协议获取目标设备的指纹信息进行目标设备判断之前,也可以先获取目标设备的MAC地址信息,具体参见S710-S720的描述,在利用MAC地址信息无法确定目标设备为视频监控设备的情况下再进一步利用基于UDP端口的探测协议所获取的指纹信息进行目标设备判断,该方案能够进一步提高检测的精度。
基于UDP端口的探测协议包括但不限于ONVIF探测协议、PSIA/MDNS协议、GB/T28181协议、DNS协议、私有协议中的一种或多种。
下面以ONVIF协议为例,结合图8所示的检测设备与目标设备之间的交互过程,对基于ONVIF协议获取设备指纹信息进行详细说明。
ONVIF(Open Network Video Interface Forum,开放型网络视频接口论坛)是一个国际开放型网络视频产品标准网络接口开发论坛。该论坛以公开、开放的原则制定了行业性的ONVIF标准,为网络视频设备之间的信息交换定义了通用协议,包括装置搜寻、实时视频、音频、元数据和控制信息等。
本申请实施例主要是利用ONVIF协议定义的设备发现过程(WS-Discovery)、获取服务能力过程(GetServiceCapabilities,可选步骤)、获取媒体流URI过程(GetStreamUri,可选步骤),检测设备向该AP下的其他设备(可以是基于前面步骤确定的目标设备)发送对应的探测消息,在收到对应的应答消息后提取设备指纹信息,然后基于构建的设备指纹信息判断目标设备中是否存在IPC设备。此外,还可以判断该网络下是否还有其他AP未探测,若是,则从当前AP切换到下一个AP后继续进行上述探测。
上述设备发现过程(WS-discovery)是客户端使用多播方式发布Probe消息,其中包括Types、服务Scopes和Xaddrs(设备管理服务地址)等,目标设备(IPC)确认匹配后,使用单播方式响应Probe Match消息,其中包括Types、Scopes和Xaddrs。上述获取服务能力(GetServiceCapabilities)是获取目标设备支持的功能及服务,可包括:Profile能力,如支持的静态和动态媒体profile的总数、是否支持截图/旋转/视频源模式切换/OSD配置/mask配置等;媒体流(Streaming)能力,如是否支持RTSP媒体流协议、是否支持UDP多播、是否支持RTP/RTSP/TCP传输等等。上述获取媒体流URL过程(GetStreamUri)是利用目标设备IP地址获取其媒体流URL(该URL可用于上述图7所示的RTSP协议探测方式,也可被作为设备指纹的一种等等)。
图8中包括步骤S1010-S1060。
S1010、检测设备构建探测消息,并在当前AP下以多播的方式发送出去。
检测设备可以构建探测消息,该探测消息中可以包括目标设备类型、服务范围、和目标设备的管理服务地址等。该探测消息可以是ONVIF协议的设备发现过程定义的Probe请求消息。
其中,多播也可以称为组播,可以是“一对多”的方式,即检测设备采用多播方式向特定的多播地址和端口发送上述探测消息,可以实现一次向本网络内所有目标设备发送探测消息。该多播地址端口可以为239.255.255.250:3702。
S1011、目标设备接收探测消息。
在步骤S1010中,检测设备通过多播的方式发送探测消息,可能会有多个设备接收到该探测消息,如果其中部分设备支持ONVIF协议的设备发现机制(即能解析上述Probe消息),就会对该探测消息进行响应,那么这些设备即为本申请中的目标设备。
S1012、目标设备向检测设备发送响应消息。
该响应消息中可以包括该目标设备的IP地址、设备类型、设备服务范围以及MAC地址信息等。该响应消息可以是ONVIF协议的设备发现过程定义的Probe Match消息。
需要说明的是,本申请实施例中,目标设备可以通过单播的方式向检测设备发送响应消息,也可以通过多播的方式向检测设备发送响应消息,不予限制。
其中,单播方式可以是“一对一”的方式,即一个设备每次可以向另一个目标设备发送消息。
基于此,检测设备可以获得目标设备的指纹设备信息,从而可以根据该指纹设备信息与指纹库进行匹配,以判断该探测的目标设备是否为IPC设备。
可选的,为了进一步提高判断的精准度,检测设备可以通过上述获取服务能力过程、获取媒体流URL过程,获取目标设备的服务能力信息和媒体流信息,可以通过步骤S1013-S1016实现。
S1013、检测设备向目标设备发送获取服务能力请求消息。
该获取服务能力请求消息中可以包括目标设备的IP地址等信息,该请求消息可以是ONVIF协议的获取服务能力过程定义的GetServiceCapability Request。
S1014、目标设备向检测设备发送服务能力相关信息。
例如,该服务能力相关信息可以包括profile能力,即该目标设备是否支持截图、旋转、视频模式切换、对象顺序图(on-screen display,OSD)配置、mask配置等,这些信息可以通过ONVIF协议的获取服务能力过程定义的GetServiceCapability Response获取。
S1015、检测设备向目标设备发送获取媒体流URL请求消息。
该获取媒体流URL请求消息中可以包括目标设备的IP地址等信息。该请求消息可以是ONVIF协议的获取媒体流URL过程定义的GetStreamUri Request。
S1016、目标设备向检测设备发送媒体流相关信息。
例如,该媒体流相关信息可以包括streaming能力,即该目标设备是否支持RTSP媒体流协议、是否支持UDP多播、是否支持RTP或RTSP或TCP传输等,这些信息可以通过ONVIF协议的获取媒体流URL过程定义的GetStreamUri Response获取。
S1017、检测设备获取其它辅助信息。
该辅助信息可以为探测的目标设备的GPS位置信息、WIFI SSID或名称(如xxx酒店/hotel)。
S1018、检测设备根据获取的信息提取设备指纹信息,对该指纹信息进行匹配,判断目标设备是否为视频监控设备。
S1019、检测设备向用户展示判断结果,如果当前网络还用其它AP,则切换BSSID连接到其他AP。
关于步骤S1017-S1019的说明可以参考图7中的步骤S920-S922的描述,为了简洁,这里不再赘述。
下面以传输通道协商协议GB/T 28181为例,结合图9所示的检测设备与媒体服务器、目标设备之间的交互过程,对基于GB/T 28181协议获取设备指纹信息进行详细说明。
GB/T 28181协议可以包括SIP信令控制协议和RTP/RTCP协议。SIP协议定义的SIP信令有多种,如Invite、ACK、BAY、OPTIONS、Message等,其中,SIP信令的格式描述协议包括会话描述协议(session description protocol,SDP)、监控报警联网系统控制描述协议(monitoring and alarming network system control description protocol,MANSCDP)以及监控报警联网系统实时流协议(monitoring and alarming network system real-time streaming protocol,MANSRTSP)等。
SIP可以用于设备之间建立会话、传输系统控制命令,其中,设备之间会话建立中的会话协商、媒体协商可以使用SDP作为SIP信令的格式协议;IPC设备控制、设备信息查询以及状态信息报送等可以使用MANSCDP作为SIP信令的格式协议;回放中的播放、暂停或断开等可以使用MANSRTSP作为SIP信令的格式协议。
会话初始化(Invite)过程是实时点播、回放、下载等业务流程的第一步,主要是SIP服务器在媒体服务器与媒体发送端(IPC)之间建立会话、协商媒体传输方式等,以使IPC向媒体服务器传输媒体流数据;然后在媒体服务器与媒体接收端(用户设备,如手机等电子设备)之间建立会话、协商媒体传输方式等,以使媒体服务器向接收端传输媒体流数据。
本申请实施例主要是利用GB/T 28181协议中SIP信令协议定义的会话初始化过程,检测设备向该AP下的其他设备发送对应的探测消息,在收到对应的应答消息后提取设备指纹信息,然后基于构建的设备指纹信息判断目标设备中是否存在IPC设备。此外,还可以判断该网络下是否还有其他AP未探测,若是,则从当前AP切换到下一个AP后继续进行上述探测。
具体地,下面结合图9进行详细说明,该图9中可以包括步骤S1110-S1116。
S1110、检测设备获取媒体服务器的IP、端口、媒体格式等。
检测设备可以向媒体服务器发起一个会话初始化请求(如Invite请求),媒体服务器在接收到该会话初始请求后,可以向检测设备发送200成功响应消息,该消息中可以包括媒体服务器的SDP消息体,如媒体服务器IP、端口以及媒体格式等;或者,检测设备也可以根据维护的媒体服务器列表,构建要发送给目标设备的invite消息,其中可包括媒体服务器IP、端口以及媒体格式等。
S1111、检测设备向目标设备发起一个会话初始过程。
检测设备可以向目标设备发起一个会话初始请求,旨在获取目标设备的SDP消息体,该消息体中可包括目标设备的IP、端口、媒体格式、同步信源(synchronization source, SSRC)以及媒体参数等。
S1112、目标设备向检测设备发送响应消息。
在检测设备发起会话初始化过程后,目标设备可以对其进行响应,目标设备可以向检测设备发送响应消息,该消息中可以包括目标设备的IP、端口、媒体格式、SSRC以及媒体参数等信息。
S1113、检测设备向目标设备发送ACK。
该ACK可以表明检测设备已经接收到了目标设备对会话初始化请求的最终响应。
S1114、检测设备获取其它辅助信息。
S1115、检测设备根据获取的信息提取设备指纹信息,对该指纹信息进行匹配,判断目标设备是否为视频监控设备。
S1116、检测设备向用户展示判断结果,如果当前网络还有其它AP,则切换BSSID连接到其他AP。
关于步骤S1114-S1116的说明可以参考图7中的步骤S920-S922的描述,为了简洁,这里不再赘述。
本申请实施例二提供的技术方案,通过基于UDP端口的探测协议获取目标设备的设备指纹信息,并将获取到的设备指纹信息与预设的指纹信息库进行匹配,以判断探测的目标设备是否为IPC设备。该技术方案可以在降低成本的同时,有效提高IPC设备的检出效率。
下面介绍本申请提供的一种用于检测视频监控设备的方法的流程。
请参见图10,图10示出了一种用于检测视频监控设备的方法1200的示意性流程图。该方法流程图中涉及的设备包括有电子设备100和视频监控设备。其中,视频监控设备可以为上述图5中所示的摄像头。
如图10所示,该方法1200可以包括:
S1210,获取至少一个目标设备的媒体接入控制MAC地址信息,其中,所述电子设备与所述目标设备接入同一无线网络。
本申请实施例中,可以利用主机发现过程获取至少一个目标设备的MAC地址信息。具体的可以参考上述步骤S710的内容。
S1212,获取所述目标设备的端口信息。
本申请实施例中,可以利用端口扫描获取目标设备的端口信息,详细内容可以参考上述步骤S730的内容。
S1214,根据所述MAC地址信息确定所述目标设备是否为视频监控设备。
该步骤中根据MAC地址信息确定目标设备是否为视频监控设备,可以通过将获取的目标设备的MAC地址信息与MAC信息库中的信息进行匹配,以识别视频监控设备。具体内容可以参考上述步骤S720的描述,不再赘述。
S1216,若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,根据第一信息确定所述目标设备是否为所述视频监控设备,其中,所述第一信息包括所述MAC地址信息和所述端口信息,或者,所述第一信息包括所述端口信息。
本申请实施例中,若根据MAC地址信息无法确定目标设备是否为视频监控设备,则可以根据第一信息(MAC地址信息和端口信息,或,端口信息)进一步确定。具体请参 考上述步骤S740的内容,不再赘述。
需要说明的是,本申请实施例中,上述步骤的序号并不代表执行顺序的先后,在一些实施例中,可以依据S1210、S1214、S1212、S1216这一顺序执行,不予限制。
S1218,若根据所述第一信息无法确定所述目标设备为所述视频监控设备,则基于TCP端口的探测协议或基于UDP端口的探测协议获取所述目标设备的指纹信息。
本申请实施例中的指纹信息可以为步骤S750和/或步骤S760中的设备指纹信息,该设备指纹信息可以包括目标设备的以下信息中的一种或多种:目标设备的设备类型、设备厂商信息、端口状态、端口号、端口上运行的应用程序、端口服务类型、运行的操作系统、是否支持视频模式切换或OSD配置、支持的传输协议类型、媒体格式、发送方式、服务范围、IP地址、MAC地址。
所述基于TCP端口的探测协议可以为步骤S750中涉及的协议:如Web协议/Http、DNS协议、Telnet协议、FTP、RTSP中的一种或多种。
所述基于UDP端口的探测协议可以为步骤S760中涉及的协议:ONVIF探测协议、MDNS协议、SIP、DNS协议、私有协议中的一种或多种。
S1220,根据所述设备指纹信息确定所述目标设备是否为所述视频监控设备。
该步骤中根据指纹信息判断所述目标设备是否为视频监控设备,可以根据所述指纹信息按照匹配规则确定所述目标设备是否为所述视频监控设备。
该匹配规则可以包括关键字匹配方式、相似度计算方式、距离计算方式、预设模型、特征向量匹配方式。具体匹配过程可以参考上述步骤S921的内容,为了简洁,这里不再赘述。
S1222,获取所述目标设备的辅助信息,其中所述辅助信息包括以下信息中的一种或多种:位置信息、Wi-Fi SSID或Wi-Fi名称。
S1224,根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
本申请实施例中,根据指纹信息和辅助信息确定目标设备是否为视频监控设备可以参考上述图7中步骤S920-S921,或者,可以参考上述图8中步骤S1017-S1018,或者,参考上述图9中步骤S1114-S1115的内容。
S1226,若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP。
S1228,确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
本申请提供的方案,通过对接入同一无线网络下的目标设备进行MAC地址信息/端口信息获取,以及根据不同情况基于TCP端口或UDP端口的探测协议获取目标设备的指纹信息,从而确定目标设备是否为视频监控设备。本申请技术方案针对市面上形态多样的视频监控设备,使用了包括MAC地址信息、端口信息、基于TCP端口或UDP端口的探测协议在内的多种检测手段,提供了一种更为全面的检测方案,有效提高了检测精准度,降低了漏检率。本申请技术方案所适用的场景可以是酒店大堂、房间等场所,使用本申请的电子设备能够有效检测此类场所中被恶意安装的偷拍类IPC,从而可以减少用户隐私被侵犯事件的发生。
此外,在一些实施例中,也可以执行上述步骤中的部分步骤,示例性地,可以执行步骤S1218中的基于UDP端口的探测协议获取至少一个目标设备的指纹信息,再执行步骤 S1220根据所述指纹信息确定所述目标设备是否为视频监控设备。
或者,可以先执行步骤S1210获取至少一个目标设备的媒体接入控制MAC地址信息,再执行步骤S1214根据所述MAC地址信息确定所述目标设备是否为视频监控设备,若根据所述MAC地址信息无法确定所述目标设备为视频监控设备,则可执行步骤S1218中基于UDP端口的探测协议获取至少一个目标设备的指纹信息,以及执行步骤S1220根据所述指纹信息确定所述目标设备是否为视频监控设备。
或者,可以在执行步骤S1210、S1212、S1214之后直接执行S1218,在根据所述MAC地址信息无法确定所述目标设备为视频监控设备时,基于TCP端口的探测协议获取所述目标设备的指纹信息,即省略根据端口信息判断的逻辑。甚至可以在执行步骤S1212之后直接执行S1218中的基于TCP端口的探测协议获取所述目标设备的指纹信息。
或者,可以省略步骤S1222-S1224或S1226-S1228。
此外,在一些实施例中,也可以对上述某些步骤进行调换,示例性地,可以执行步骤S1212至少一个目标设备的获取端口信息,然后类似S1214根据端口信息确定所述目标设备是否为视频监控设备,然后执行步骤S1210获取所述目标设备的MAC地址信息,并类似S1216在根据端口信息无法确定所述目标设备是否为视频监控设备时,再结合MAC信息信息确定所述目标设备是否为视频监控设备,最后再执行步骤S1218及后续步骤。
本申请提供的方案,通过基于UDP端口的探测协议获取目标设备的设备指纹信息,并将获取到的设备指纹信息与预设的指纹信息库进行匹配,以判断探测的目标设备是否为IPC设备。该技术方案可以在降低成本的同时,有效提高了IPC设备检出效率。
可以理解的是,电子设备(如上文中的第一电子设备)为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图11示出了上述实施例中涉及的电子设备1120的一种可能的组成示意图,如图11所示,该电子设备1120可以包括:获取单元1121、确定单元1122和切换单元1123。
其中,获取单元1121可以用于支持电子设备1120执行上述步骤S1210、S1212、S1218、S1222等,和/或用于本文所描述的技术的其他过程。
确定单元1122可以用于支持电子设备1120执行上述步骤S1214、S1216、S1220、S1224、S1228等,和/或用于本文所描述的技术的其他过程。
切换单元1123可以用于支持电子设备1120执行上述步骤S1226等,和/或用于本文所描述的技术的其他过程。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能 模块的功能描述,在此不再赘述。
本实施例提供的电子设备,用于执行上述定位方法,因此可以达到与上述实现方法相同的效果。
在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理,例如,可以用于支持电子设备执行上述各个单元执行的步骤。存储模块可以用于支持电子设备执行存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图1所示结构的设备。
图12示出了上述实施例涉及的电子设备1230的另一种可能的组成示意图,如图12所示,该电子设备1230可以包括通信单元1231、输入单元1232、处理单元1233、输出单元1234、外设接口1235、存储单元1236以及电源1237。
通信单元1231用于建立通信信道,使电子设备1230通过所述通信信道以连接至远程服务器,并从所述远程服务器下媒体数据。所述通信单元1231可以包括WLAN模块、蓝牙模块、NFC模块、基带模块等通信模块,以及所述通信模块对应的射频(radio frequency,简称RF)电路,用于进行无线局域网络通信、蓝牙通信、NFC通信、红外线通信及/或蜂窝式通信系统通信,例如宽带码分多重接入(wideband code division multiple access,W-CDMA)及/或高速下行封包存取(high speed downlink packet access,HSDPA)。所述通信单元1231用于控制电子设备中的各组件的通信,并且可以支持直接内存存取。
输入单元1232可以用于实现用户与电子设备的交互和/或信息输入到电子设备中。在本发明具体实施方式中,输入单元可以是触控面板,也可以是其他人机交互界面,例如实体输入键、麦克风等,还可是其他外部信息撷取装置,例如摄像头等。
处理单元1233为电子设备的控制中心,可以利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储单元内的软件程序和/或模块,以及调用存储在存储单元内的数据,以执行电子设备的各种功能和/或处理数据。
输出单元1234包括但不限于影像输出单元和声音输出单元。影像输出单元用于输出文字、图片和/或视频。在本发明的具体实施方式中,上述输入单元1232所采用的触控面板亦可同时作为输出单元1234的显示面板。例如,当触控面板检测到在其上的触摸或接近的手势操作后,传送给处理单元以确定触摸事件的类型,随后处理单元根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图12中,输入单元1232与输出单元1234是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板与显示面板集成一体而实现电子设备的输入和输出功能。例如,所述影像输出单元可以显示各种图形化用户接口以作为虚拟控制组件,包括但不限于窗口、卷动轴、图标及剪贴簿,以供用户通过触控方式进行操作。
上述实施例中显示当前环境是否存在视频监控设备的信息可以通过输出单元1234实现。
存储单元1236可用于存储软件程序以及模块,处理单元通过运行存储在存储单元的软件程序以及模块,从而执行电子设备的各种功能应用以及实现数据处理。
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的用于检测视频监控设备的方法。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的用于检测视频监控设备的方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的用于检测视频监控设备的方法。
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (34)

  1. 一种用于检测视频监控设备的方法,所述方法应用于电子设备,其特征在于,包括:
    获取至少一个目标设备的媒体接入控制MAC地址信息,其中,所述电子设备与所述目标设备接入同一无线网络;
    获取所述目标设备的端口信息;
    根据所述MAC地址信息确定所述目标设备是否为视频监控设备;
    若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,根据第一信息确定所述目标设备是否为所述视频监控设备,其中,所述第一信息包括所述MAC地址信息和所述端口信息,或者,所述第一信息包括所述端口信息;
    若根据所述第一信息无法确定所述目标设备为所述视频监控设备,则基于传输控制协议TCP端口的探测协议或基于用户数据报协议UDP端口的探测协议获取所述目标设备的指纹信息;
    根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
  2. 根据权利要求1所述的方法,其特征在于,所述根据MAC地址信息确定所述目标设备是否为视频监控设备,包括:
    若所述MAC地址信息为第一级MAC地址信息,确定所述目标设备为所述视频监控设备;
    若所述MAC地址信息不是第一级MAC地址信息,则无法确定所述目标设备为所述视频监控设备。
  3. 根据权利要求2所述的方法,其特征在于,根据第一信息确定所述目标设备是否为所述视频监控设备,包括:
    若所述端口信息为第一级端口信息,确定所述目标设备为所述视频监控设备;
    若所述端口信息为第二级端口信息,且所述MAC地址信息是第二级MAC地址信息,则确定所述目标设备为所述视频监控设备。
  4. 根据权利要求1所述的方法,其特征在于,所述基于TCP端口的探测协议获取所述目标设备的指纹信息,包括:
    根据所述端口信息确定所述基于TCP端口的探测协议;
    基于所述确定的探测协议,向所述目标设备发送探测消息;
    接收来自所述目标设备的应答消息;
    根据所述应答消息提取所述目标设备的指纹信息。
  5. 根据权利要求4所述的方法,其特征在于,所述基于TCP端口的探测协议包括web协议/超文本传输协议Http、域名系统DNS协议、Telnet协议、文本传输协议FTP、实时流传输协议RTSP中的一种或多种协议。
  6. 根据权利要求1所述的方法,其特征在于,所述基于UDP端口的探测协议获取所述目标设备的指纹信息,包括:
    根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP 探测消息;
    在对应的监听端口上接收所述目标设备返回的应答消息;
    根据所述应答消息提取所述目标设备的指纹信息。
  7. 根据权利要求6所述的方法,其特征在于,所述基于UDP端口的探测协议包括开放式网络视频接口论坛ONVIF协议、多播域名系统MDNS协议、会话初始协议SIP、域名系统DNS协议、私有协议中的一种或多种协议。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述目标设备的指纹信息包括以下信息中的一种或多种:
    所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
  9. 根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:
    获取所述目标设备的辅助信息,其中,所述辅助信息包括以下信息中的一种或多种:位置信息、无线保真服务集标识Wi-Fi SSID或Wi-Fi名称;
    根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
  10. 根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:
    若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
    确定连接在所述第二AP下的至少一个目标设备是否为视频监控设备。
  11. 一种用于检测视频监控设备的方法,所述方法应用于电子设备,其特征在于,包括:
    获取至少一个目标设备的媒体接入控制MAC地址信息,其中,所述电子设备与所述目标设备接入同一无线网络;
    根据所述MAC地址信息确定所述目标设备是否为视频监控设备。
  12. 根据权利要求11所述的方法,其特征在于,所述根据所述MAC地址信息确定所述目标设备是否为视频监控设备,包括:
    若所述MAC地址信息为第一级MAC地址信息,则确定所述目标设备为所述视频监控设备;
    若所述MAC地址信息不是第一级MAC地址信息,则无法确定所述目标设备为所述视频监控设备。
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,根据第一信息确定所述目标设备是否为所述视频监控设备,其中,所述第一信息包括所述MAC地址信息和端口信息,或,所述第一信息包括所述端口信息,所述端口信息是根据所述端口的状态获取到的。
  14. 根据权利要求13所述的方法,其特征在于,根据第一信息确定所述目标设备是否为所述视频监控设备,包括:
    若所述端口信息为第一级端口信息,确定所述目标设备为所述视频监控设备;
    若所述端口信息为第二级端口信息,且所述MAC地址信息是第二级MAC地址信息,则确定所述目标设备为所述视频监控设备。
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:
    若根据所述第一信息无法确定所述目标设备为所述视频监控设备,则基于传输控制协议TCP端口的探测协议或基于用户数据报协议UDP端口的探测协议获取所述目标设备的指纹信息;
    根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
  16. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    若根据所述MAC地址信息无法确定所述目标设备为所述视频监控设备,则基于TCP端口的探测协议或基于UDP端口的探测协议获取所述目标设备的指纹信息;
    根据所述指纹信息确定所述目标设备是否为所述视频监控设备。
  17. 根据权利要求15或16所述的方法,其特征在于,所述基于TCP端口的探测协议获取所述目标设备的指纹信息,包括:
    根据所述端口信息确定所述基于TCP端口的探测协议;
    基于所述确定的探测协议,向所述目标设备发送探测消息;
    接收来自所述目标设备的应答消息;
    根据所述应答消息提取所述目标设备的指纹信息。
  18. 根据权利要求17所述的方法,其特征在于,所述基于TCP端口的探测协议包括web协议/超文本传输协议Http、域名系统DNS协议、Telnet协议、文本传输协议FTP协议、实时流传输协议RTSP协议中的一种或多种协议。
  19. 根据权利要求15或16所述的方法,其特征在于,所述基于UDP端口的探测协议获取所述目标设备的指纹信息,包括:
    根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP探测消息;
    在对应的监听端口上接收所述目标设备返回的应答消息;
    根据所述应答消息提取所述目标设备的所述指纹信息。
  20. 根据权利要求19所述的方法,其特征在于,所述基于UDP端口的探测协议包括开放式网络视频接口论坛ONVIF协议、多播域名系统MDNS协议、会话初始协议SIP协议、域名系统DNS协议、私有协议中的一种或多种协议。
  21. 根据权利要求11至20中任一项所述的方法,其特征在于,所述目标设备的指纹信息包括以下信息中的一种或多种:
    所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
  22. 根据权利要求11至20中任一项所述的方法,其特征在于,所述方法还包括:
    获取所述目标设备的辅助信息,其中所述辅助信息包括以下信息中的一种或多种:位置信息、无线保真服务集标识Wi-Fi SSID或Wi-Fi名称;
    根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
  23. 根据权利要求11至20中任一项所述的方法,其特征在于,所述方法还包括:
    若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
    确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
  24. 一种用于检测视频监控设备的方法,所述方法应用于电子设备,其特征在于,包括:
    基于用户数据报协议UDP端口的探测协议获取至少一个目标设备的指纹信息,其中,所述电子设备与所述目标设备接入同一无线网络;
    根据所述指纹信息确定所述目标设备是否为视频监控设备。
  25. 根据权利要求24所述的方法,其特征在于,在基于UDP端口的探测协议获取至少一个目标设备的设备指纹信息之前,所述方法还包括:
    获取所述目标设备的媒体接入控制MAC地址信息;
    若所述MAC地址信息为第一级MAC地址信息,则确定所述目标设备为视频监控设备;
    若所述MAC地址信息不为第一级MAC地址信息,则无法确定所述目标设备为视频监控设备;
    若根据所述MAC地址信息无法确定所述目标设备为视频监控设备,则基于所述UDP端口的探测协议获取所述目标设备的设备指纹信息。
  26. 根据权利要求24或25所述的方法,其特征在于,所述基于UDP端口的探测协议获取至少一个目标设备的指纹信息,包括:
    根据预设的探测协议列表,向每个所述探测协议对应的地址和端口发送对应的UDP探测消息;
    在对应的监听端口上接收所述目标设备返回的应答消息;
    根据所述应答消息提取所述目标设备的指纹信息。
  27. 根据权利要求26所述的方法,其特征在于,所述基于UDP端口的探测协议包括以下协议中的一种或多种:
    开放式网络视频接口论坛ONVIF协议、多播域名系统MDNS协议、会话初始协议SIP、域名系统DNS协议、私有协议。
  28. 根据权利要求24至27中任一项所述的方法,其特征在于,所述目标设备的指纹信息包括以下信息中的一种或多种:
    所述目标设备的设备类型、设备厂商信息、IP地址、MAC地址、端口状态、端口号、端口服务类型、端口上运行的应用程序、设备操作系统、设备支持的服务能力。
  29. 根据权利要求24至27中任一项所述的方法,其特征在于,所述方法还包括:
    获取所述目标设备的辅助信息,其中,所述辅助信息包括以下信息中的一种或多种:位置信息、无线保真服务集标识Wi-Fi SSID或Wi-Fi名称;
    根据所述指纹信息和所述辅助信息确定所述目标设备是否为视频监控设备。
  30. 根据权利要求24至27中任一项所述的方法,其特征在于,所述方法还包括:
    若在当前接入的第一无线接入点AP下未检测到视频监控设备,则切换至所述无线网络下的第二无线接入点AP;
    确定连接在所述第二AP下的至少一个目标设备是否为所述视频监控设备。
  31. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    一个或多个存储器;
    所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行如权利要求1至30中任一项所述的方法。
  32. 一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得如权利要求1至30中任一所述的方法在所述电子设备上的功能得以实现。
  33. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至30中任一项所述的方法。
  34. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至30中任一项所述的方法。
PCT/CN2021/117425 2020-10-22 2021-09-09 用于检测视频监控设备的方法和电子设备 WO2022083343A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/250,185 US20230396580A1 (en) 2020-10-22 2021-09-09 Method for detecting video surveillance device, and electronic device
EP21881762.5A EP4221133A4 (en) 2020-10-22 2021-09-09 METHOD FOR DETECTING A VIDEO MONITORING DEVICE, AND ELECTRONIC DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011137743.5A CN114466084A (zh) 2020-10-22 2020-10-22 用于检测视频监控设备的方法和电子设备
CN202011137743.5 2020-10-22

Publications (1)

Publication Number Publication Date
WO2022083343A1 true WO2022083343A1 (zh) 2022-04-28

Family

ID=81291551

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117425 WO2022083343A1 (zh) 2020-10-22 2021-09-09 用于检测视频监控设备的方法和电子设备

Country Status (4)

Country Link
US (1) US20230396580A1 (zh)
EP (1) EP4221133A4 (zh)
CN (1) CN114466084A (zh)
WO (1) WO2022083343A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914411A (zh) * 2022-08-24 2023-04-04 宜通世纪科技股份有限公司 从onvif设备到gb28181设备的转换方法、装置及存储介质
CN116070218A (zh) * 2023-03-28 2023-05-05 北京六方云信息技术有限公司 工业资产的探测方法、终端设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190106A (zh) * 2022-06-17 2022-10-14 苏州迈科网络安全技术股份有限公司 一种基于mdns协议的设备感知方法
CN114783040B (zh) * 2022-06-23 2022-09-20 东莞先知大数据有限公司 一种楼宇内偷拍行为检测方法及检测装置
CN116600090B (zh) * 2023-07-17 2023-09-19 微网优联科技(成都)有限公司 一种用于ipc网络摄像头的运维管控方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130305320A1 (en) * 2012-05-08 2013-11-14 Guest Tek Interactive Entertainment Ltd. Automatic service activation for user device upon detecting its device identifier on network of hospitality establishment
CN104378761A (zh) * 2014-12-05 2015-02-25 迈普通信技术股份有限公司 一种非法接入设备检测方法、设备及系统
CN108521398A (zh) * 2018-02-24 2018-09-11 浙江远望通信技术有限公司 一种基于设备特征识别、白名单和约束集流控的视频监控安全接入方法
CN110730442A (zh) * 2019-10-24 2020-01-24 无锡京和信息技术有限公司 一种基于wifi侦控设备的摄像头设备发现与反制系统及方法
CN111132120A (zh) * 2020-04-01 2020-05-08 北京三快在线科技有限公司 识别房间局域网中的摄像装置的方法、系统及设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160036843A1 (en) * 2014-08-01 2016-02-04 Honeywell International Inc. Connected home system with cyber security monitoring

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130305320A1 (en) * 2012-05-08 2013-11-14 Guest Tek Interactive Entertainment Ltd. Automatic service activation for user device upon detecting its device identifier on network of hospitality establishment
CN104378761A (zh) * 2014-12-05 2015-02-25 迈普通信技术股份有限公司 一种非法接入设备检测方法、设备及系统
CN108521398A (zh) * 2018-02-24 2018-09-11 浙江远望通信技术有限公司 一种基于设备特征识别、白名单和约束集流控的视频监控安全接入方法
CN110730442A (zh) * 2019-10-24 2020-01-24 无锡京和信息技术有限公司 一种基于wifi侦控设备的摄像头设备发现与反制系统及方法
CN111132120A (zh) * 2020-04-01 2020-05-08 北京三快在线科技有限公司 识别房间局域网中的摄像装置的方法、系统及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4221133A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914411A (zh) * 2022-08-24 2023-04-04 宜通世纪科技股份有限公司 从onvif设备到gb28181设备的转换方法、装置及存储介质
CN116070218A (zh) * 2023-03-28 2023-05-05 北京六方云信息技术有限公司 工业资产的探测方法、终端设备及存储介质

Also Published As

Publication number Publication date
EP4221133A4 (en) 2024-03-27
US20230396580A1 (en) 2023-12-07
EP4221133A1 (en) 2023-08-02
CN114466084A (zh) 2022-05-10

Similar Documents

Publication Publication Date Title
WO2022083343A1 (zh) 用于检测视频监控设备的方法和电子设备
EP4024917B1 (en) Bluetooth connection method and electronic device
WO2022257977A1 (zh) 电子设备的投屏方法和电子设备
CN112449332B (zh) 一种蓝牙连接的方法和电子设备
WO2021175214A1 (zh) 一种投屏连接控制方法及电子设备
EP4102379A1 (en) Data sharing method, electronic device and system
CN111164983B (zh) 互联终端出借本地处理能力
WO2022100304A1 (zh) 应用内容跨设备流转方法与装置、电子设备
WO2022068513A1 (zh) 无线通信方法和终端设备
CN112130788A (zh) 一种内容分享方法及其装置
CN114845035B (zh) 一种分布式拍摄方法,电子设备及介质
CN113676879A (zh) 一种分享信息的方法、电子设备和系统
WO2023151377A1 (zh) 一种文件分享方法及终端设备
WO2021227942A1 (zh) 一种分享信息的方法、电子设备和系统
WO2022083345A1 (zh) 一种用于检测视频监控设备的方法和电子设备
CN111885582A (zh) 无线网络连接方法、装置、电子设备及可读存储介质
WO2022152174A9 (zh) 一种投屏的方法和电子设备
WO2021218544A1 (zh) 一种提供无线上网的系统、方法及电子设备
CN114697960B (zh) 一种连接外部摄像头的方法及系统
WO2023142993A1 (zh) 一种探测方法、相关电子设备及系统
WO2022206762A1 (zh) 一种显示方法、电子设备和系统
WO2023051204A1 (zh) 跨设备连接方法、电子设备及存储介质
CN112351411B (zh) 信息传输的方法和电子设备
WO2023045966A1 (zh) 能力共享方法、电子设备以及计算机可读存储介质
CN114895991B (zh) 内容分享方法和电子设备

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021881762

Country of ref document: EP

Effective date: 20230425

NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21881762

Country of ref document: EP

Kind code of ref document: A1