Network camera and physical link identification method and system thereof, storage medium and terminal
Through the ONVIF protocol and Ethernet technology, the rapid and automatic identification of network cameras and their physical links is realized, solving the problem of inefficient network camera management in large network environments, and improving management efficiency and intelligence level.
Patent Information
- Application Number
- CN202510029774.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-22
AI Technical Summary
In large network environments, it is difficult for the prior art to quickly and accurately identify network camera equipment and its accessed network equipment, resulting in inefficient network camera management and monitoring.
Through the ONVIF protocol and Ethernet, rapid and automatic identification of network cameras and their physical links is realized. The specific steps include setting the ONVIF credentials and network topology IP range, obtaining the network topology device IP, sending ONVIF messages to identify the network camera, and identifying physical link information based on the FDB table and the LLDP table.
It realizes rapid and automatic identification of network cameras and their physical links, improves network equipment management efficiency, reduces manual intervention, and adapts to complex network environment needs.
Smart Images

Figure CN119865456A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network communications, and in particular to a network camera and a physical link identification method, system, storage medium and terminal thereof. Background Art
[0002] With the rapid development of network technology, network cameras, as important equipment for video surveillance, have been widely used in public security, traffic monitoring, industrial production, smart home and other fields. However, in practical applications, with the expansion of network scale and the increase in the number of devices, the management of network cameras has become more and more complicated. Especially in large-scale network environments, how to quickly and accurately identify camera devices in the network and the network devices to which they are connected, so as to manage and monitor network cameras, has gradually become an important requirement for network management. The requirements for network cameras in network management are mainly: 1) Detect and discover network cameras in the network topology; b) Obtain basic information about network cameras; c) Discover the physical link information of network cameras.
[0003] In the prior art, the commonly used methods for managing resources of network cameras are:
[0004] a) By manually recording and checking the usage of network cameras, staff will manually record and modify the information and allocation of network cameras.
[0005] b) View the information and configuration of the network camera through some common tools that support the ONVIF (Open Network Video Interface Forum) protocol, such as ODM (ONVIF Device Manager).
[0006] c) Use some camera usage tools provided by the network camera manufacturer to configure or view the information of the network camera.
[0007] However, although the above solution can solve some needs in daily work, there are still the following problems:
[0008] a) IP cameras of different brands and models are not compatible, and all devices cannot be managed at the same time.
[0009] b) Commonly used methods and tools only view the information of the network camera, but do not have the function of identifying the physical link between the network camera and the network device.
[0010] c) As devices dynamically join or leave, the network topology may change frequently, and existing methods are difficult to update device information and connection relationships in a timely manner.
[0011] The above problems are usually supplemented manually, which is not only time-consuming and laborious, but also prone to errors in camera information or network topology information due to input errors or missing devices. This is especially true in scenarios where network cameras and network devices change frequently. Summary of the invention
[0012] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a network camera and its physical link identification method, system, storage medium, and terminal, which can quickly and automatically identify the network camera in the network topology and the physical link between it and the network device based on the ONVIF protocol and Ethernet.
[0013] In a first aspect, the present invention provides a network camera and a method for identifying its physical link, the method comprising the following steps: setting the ONVIF credentials required for the network camera and the network topology IP range to be identified; obtaining the network topology device IP based on the network topology IP range; sending an ONVIF message to the network topology device IP to identify the network camera; obtaining basic information of the network camera based on the ONVIF credentials; and identifying the physical link information of the network camera based on the network device FDB table and the LLDP table.
[0014] In an implementation of the first aspect, the network topology device IP is acquired based on the network topology IP range in the following manner:
[0015] Obtain the network topology devices within the network topology IP range through Nmap scanning;
[0016] If the Nmap scan fails to scan the network topology device, the network topology device is obtained through ACK scanning;
[0017] For network topology devices that cannot obtain MAC, the unobtained MAC is compensated based on the ARP table of the switch.
[0018] In an implementation of the first aspect, sending an ONVIF message to the network topology device IP to identify the network camera includes the following steps:
[0019] Sending a SOAP message of the WS-Discovery protocol to the IP of the network topology device;
[0020] Receiving a return message of the SOAP message;
[0021] The returned message is parsed to obtain a network topology device supporting the ONVIF protocol, and the network topology device is determined to be a network camera.
[0022] In an implementation of the first aspect, it also includes connecting to a network topology device that has not activated the WS-Discovery protocol based on the ONVIF credential, and determining that the network topology device is a network camera when the connection is successful.
[0023] In an implementation of the first aspect, based on the ONVIF certificate, obtaining basic information of the network camera includes the following steps:
[0024] Based on the ONVIF credentials, the network camera performs traversal connection;
[0025] When the connection with the network camera is successful, obtaining basic information of the network camera;
[0026] Save the basic information of the network camera and the matching ONVIF credentials.
[0027] In an implementation manner of the first aspect, when the network camera cannot be connected, the MAC of the network camera is compared with the OUI data provided by IEEE to obtain basic information of the network camera.
[0028] In an implementation of the first aspect, identifying the physical link information of the network camera based on the network device FDB table and the LLDP table includes the following steps:
[0029] Get the LLDP table data of all network devices in the IP range of the network topology, and get the network devices and connection ports connected to the network cameras with matching IP or MAC;
[0030] The FDB data is grouped according to the port index, and when one port corresponds to one MAC, the switch and the connection port connected to the matching network camera are obtained based on the MAC.
[0031] In a second aspect, the present invention provides a network camera and a physical link identification system thereof, the system comprising a setting module, a first acquisition module, a first identification module, a second acquisition module and a second identification module;
[0032] The setting module is used to set the ONVIF credentials required by the network camera and the network topology IP range to be identified;
[0033] The first acquisition module is used to acquire the network topology device IP based on the network topology IP range;
[0034] The first identification module is used to send an ONVIF message to the network topology device IP to identify the network camera;
[0035] The second acquisition module is used to obtain basic information of the network camera based on the ONVIF certificate;
[0036] The second identification module is used to identify the physical link information of the network camera based on the network device FDB table and the LLDP table.
[0037] In a third aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned network camera and physical link identification method thereof.
[0038] In a fourth aspect, the present invention provides a terminal, comprising: a processor and a memory;
[0039] The memory is used to store computer programs;
[0040] The processor is used to execute the computer program stored in the memory, so that the terminal executes the above-mentioned network camera and physical link identification method.
[0041] As described above, the network camera and its physical link identification method, system, storage medium, and terminal of the present invention have the following beneficial effects:
[0042] (1) Ability to quickly and automatically identify network cameras in the network topology and the physical links between them and network devices based on ONVIF protocol and Ethernet;
[0043] (2) It can not only improve the management efficiency of network equipment, but also provide reliable data support for network operation and maintenance, troubleshooting and security monitoring;
[0044] (3) It helps reduce manual intervention, improve the intelligence level of network equipment management, and adapt to the needs of complex network environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 Shown is a flow chart of a network camera and a physical link identification method thereof in one embodiment of the present invention;
[0046] Figure 2 Shown is a schematic diagram of a framework of a network camera and a physical link identification system thereof in one embodiment of the present invention;
[0047] Figure 3 Shown is a schematic structural diagram of a terminal in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0049] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0050] like Figure 1 As shown, in one embodiment, the network camera and the physical link identification method thereof of the present invention include steps S1 to S5.
[0051] Step S1, setting the ONVIF credentials required by the network camera and the network topology IP range to be identified.
[0052] Specifically, the ONVIF (Open Network Video Interface Forum) protocol is an open standard designed to achieve interoperability of network video devices. It communicates based on Web services (such as SOAP and WSDL) to ensure that surveillance devices (such as cameras, recorders, etc.) from different manufacturers can interconnect. The ONVIF protocol mainly includes the following functions: device discovery, device management, video streaming, PTZ control, and event notification.
[0053] In the present invention, the ONVIF credentials required by the network camera and the network topology IP range to be identified are first set. The ONVIF credentials are used for subsequent basic information acquisition of the network camera. The network topology IP range is used to determine the identification range of the network camera. When the network topology IP range is not set, deep discovery can be selected, and more IP ranges will be discovered one by one according to all subnets where the network management machine is located.
[0054] Step S2: Acquire the network topology device IP based on the network topology IP range.
[0055] Specifically, the network topology devices within the network topology IP range are obtained by Nmap scanning. Since the online status of the devices in the network topology may be changing, the results obtained from each scan may be different, and the current scan results shall prevail.
[0056] In the network topology device discovery, if the discovery is only for network cameras, the parameters of the Nmap scan can be adjusted to only scan devices with port number 554. Port 554 is the default port of RTSP (Real-Time Streaming Protocol). Network cameras all have the RTSP protocol turned on, which can be used as a relatively accurate basis for judging whether a device is a network camera. If the discovery is not only for network cameras, then the result of the Nmap scan is greater than the range of network cameras, and further screening is required. Among them, Nmap (Network Mapper) is an open source network scanning and security auditing tool, widely used in network management, troubleshooting and security testing, with main functions: host discovery, port scanning, service detection, etc.
[0057] If the Nmap scan fails to scan the network topology device, the network topology device is obtained through ACK scanning. If the MAC of the network topology device cannot be obtained, the unobtained MAC is compensated based on the ARP (Address Resolution Protocol) table of the switch.
[0058] Step S3: Send an ONVIF message to the network topology device IP to identify the network camera.
[0059] Specifically, in the ONVIF protocol, standard SOAP (Simple Object Access Protocol) messages can be used to interact with network cameras. Therefore, the present invention implements a probe request (Probe) of the WS-Discovery (Web Services Dynamic Discovery) protocol by sending a SOAP message, which is used to discover network cameras that support the ONVIF protocol in the network.
[0060] The SOAP message of the WS-Discovery protocol is sent to the IP of the network topology device. The broadcast sending of the SOAP message of the WS-Discovery protocol is through traversing all the network cards of the server, and each network card sends a SOAP message to the broadcast address (IPv4 is: 239.255.255.250, IPv6 is: FF02::C), so that it will be sent to all network topology devices in the same subnet. The network topology devices that support the WS-Discovery protocol are not limited to network cameras. Therefore, the return message of the SOAP message is received, and the return message is parsed to obtain the network topology device that supports the ONVIF protocol, and determine that the network topology device is a network camera.
[0061] In addition, for a network topology device that does not have the WS-Discovery protocol enabled, a connection is made with the network topology device based on the ONVIF credential, and when the connection is successful, the network topology device is determined to be a network camera.
[0062] Step S4: Based on the ONVIF certificate, obtain basic information of the network camera.
[0063] Specifically, the ONVIF protocol is used for the communication of network cameras, and the client can obtain the basic information of the network camera through the ONVIF protocol. In the present invention, based on the ONVIF credentials, the obtained network camera is traversed and connected using the ONVIF credentials. When the connection with the network camera is successful, the basic information of the network camera is obtained. Among them, the basic information includes information such as manufacturer, device model, serial number, firmware version, software version, etc. Finally, the basic information of the network camera and the ONVIF credentials that match the network camera (i.e., the connection is successful) are saved.
[0064] When the network camera cannot be connected, the MAC of the network camera is compared with the OUI (Organizationally Unique Identifier) data provided by the IEEE (Institute of Electrical and Electronics Engineers) to obtain the basic information of the network camera. The OUI data is a unique number assigned by the IEEE to each company or organization. It is usually used in the MAC address of network equipment to identify the manufacturer or supplier.
[0065] Step S5: Identify the physical link information of the network camera based on the network device FDB table and the LLDP table.
[0066] Specifically, identifying the physical link information of the network camera based on the network device FDB table and the LLDP table includes the following steps:
[0067] 51) Obtain the LLDP (Link Layer Discovery Protocol) table data of all network devices in the IP range of the network topology, and obtain the network devices and connection ports connected to the network camera with matching IP or MAC. The network device refers to the infrastructure equipment necessary for building a network. The present invention mainly refers to network management routers or switches, and non-network management switches are not within the scope. The LLDP table is a data table in the switch used to store network topology information collected through the LLDP protocol. LLDP is an open standard protocol (IEEE 802.1AB) used to discover each other's physical connections and basic properties between network devices, helping network administrators identify and manage network devices. The LLDP table contains information about the device connected to each port, including the name, type, capability, interface, etc. of the device.
[0068] 52) In the case where the physical link information of the network camera cannot be obtained through LLDP data, the FDB (Forwarding Database) data is grouped according to the port index. If a port has multiple data corresponding to multiple MACs, it means that this port should be connected to a network device such as a switch, and the FDB data is transparently transmitted, so such data is excluded. When a port corresponds to a MAC, the switch and connection port connected to the matching network camera are obtained based on the MAC. Among them, the FDB table is also called the forwarding database or MAC address table, which is an important data structure used by the switch to record the relationship between the MAC address of the device in the network and its corresponding physical port.
[0069] It should be noted that the physical link discovery of the network camera is based on the LLDP table and FDB table of the network device. Therefore, it is necessary to start a scheduled task to collect and save the LLDP table and FDB table data of all network devices. Preferably, the LLDP table and FDB table data are updated in real time through trap or syslog trigger.
[0070] In addition, the network management machine should also be in the network topology, and should be able to connect to the network topology devices to be identified and managed. Therefore, if there is only one network management machine, the network management machine should be deployed on the core network equipment. Among them, the network management machine refers to the server device that checks the network status, generally refers to the host that performs network monitoring inside the network (edge side), and is based on mainstream X86 kernel server devices such as Windows and Linux.
[0071] The identification of the network camera device association link requires obtaining the LLDP and FDB tables of the network device. Network cameras are generally connected to access switches, so as many access switches as possible should be managed in the network topology. Since network camera devices are managed in the network topology, if you want to use the network camera video viewing or video analysis function, you need to pay attention to evaluating the bandwidth requirements between the network management machine and the managed device to ensure that the network management traffic does not affect the business traffic. At the same time, you also need to evaluate the hardware resources of the network management machine to prevent the network management machine from being overloaded and affecting the normal use of business functions.
[0072] In a network environment with a smaller scale or simple structure, usually one network management machine can support all the work of data collection and analysis. However, in actual situations, some devices have a low response speed due to network or geographical reasons; some networks are very large, with a large number of devices to be accessed and a large amount of calculation; some network topologies are relatively complex or have low robustness. In these cases, the network topology needs to be divided into different monitoring perspectives or areas according to the structural characteristics, and a separate network management machine is used to manage resources, collect data and calculate, so as to achieve better management and monitoring of the entire network topology by the network management system.
[0073] The network camera and the physical link identification method thereof of the present invention are verified by specific experiments as follows.
[0074] 1. Feasibility of Identifying Network Cameras
[0075] Experimental purpose: To verify the feasibility of camera recognition
[0076] Test process:
[0077] 192.168.200.115 in the subnet 192.168.200.0 / 24 is a network camera. You can use Nmap to scan port 554 to see that it supports the RTSP protocol. The specific information is as follows:
[0078] √Windows
[0079] This Windows machine is in the same network segment as 192.168.200.115
[0080]
[0081] √Linux
[0082] This Linux machine is in the same network segment as 192.168.200.115
[0083]
[0084] Send a WS-Discovery SOAP message to 192.168.200.115, and you can check the message return, which supports the ONVIF protocol. The specific information is as follows:
[0085]
[0086]
[0087]
[0088] The IP address of the device and whether it supports the ONVIF protocol can be obtained from the XAddrs attribute in the response message. If the ONVIF credential connection is successful, the basic information of the camera device can be obtained through the ONVIF protocol. The specific information is as follows:
[0089]
[0090]
[0091]
[0092] The manufacturer, model, serial number, and software version information of the camera can be parsed and obtained from the response message. As can be seen from the above, the method of the present invention can identify the network camera device in the network topology. The network camera is connected through the provided ONVIF credentials to obtain the basic information of the network camera.
[0093] 2. Discover the feasibility of the camera physical link
[0094] Test purpose: To verify the feasibility of discovering the physical link of the camera
[0095] Test process:
[0096] In the subnet 192.168.200.0 / 24, 192.168.200.115 is a network camera, and its mac is ac:b9:2f:5c:1f:50. Its upstream device is the switch 192.168.200.3. First check the LLDP data of 192.168.200.3, the details are as follows:
[0097]
[0098]
[0099]
[0100] By matching the camera MAC with the data in LLDP, we can get the port with index 5 of camera 192.168.200.115 connected to 192.168.200.3.
[0101] You can also view the FDB data of 192.168.200.3, the details are as follows:
[0102]
[0103]
[0104] By matching the camera MAC with the data in the FDB, we can get the port indexed as 5 of the camera 192.168.200.115 connected to 192.168.200.3. Therefore, the physical link information of the network camera can be parsed and identified through the LLDP table and the FDB table.
[0105] The protection scope of the network camera and the physical link identification method thereof described in the embodiment of the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.
[0106] An embodiment of the present invention further provides a network camera and its physical link identification system, which can implement the network camera and its physical link identification method described in the present invention. However, the implementation device of the network camera and its physical link identification system described in the present invention includes but is not limited to the structure of the network camera and its physical link identification system listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.
[0107] like Figure 2 As shown, in one embodiment, the network camera and its physical link identification system of the present invention include a setting module 21 , a first acquisition module 22 , a first identification module 23 , a second acquisition module 24 and a second identification module 25 .
[0108] The setting module 21 is used to set the ONVIF credentials required by the network camera and the network topology IP range to be identified.
[0109] The first acquisition module 22 is connected to the setting module 21 and is used to acquire the network topology device IP based on the network topology IP range.
[0110] The first identification module 23 is connected to the first acquisition module 22 and is used to send an ONVIF message to the network topology device IP to identify the network camera.
[0111] The second acquisition module 24 is connected to the first identification module 23, and is used to acquire basic information of the network camera based on the ONVIF certificate.
[0112] The second identification module 25 is connected to the second acquisition module 24 and is used to identify the physical link information of the network camera based on the network device FDB table and the LLDP table.
[0113] Among them, the structures and principles of the setting module 21, the first acquisition module 22, the first recognition module 23, the second acquisition module 24 and the second recognition module 25 correspond one by one to the steps in the above-mentioned EEG signal adaptive recognition method, so they are not repeated here.
[0114] In the several embodiments provided by the present invention, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.
[0115] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. For example, the functional modules / units in the various embodiments of the present invention may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0116] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0117] The embodiment of the present invention also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for adaptively identifying EEG signals in the above embodiment can be completed by instructing a processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0118] The embodiment of the present invention further provides a terminal, which includes a processor and a memory.
[0119] The memory is used to store computer programs.
[0120] The memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.
[0121] The processor is connected to the memory and is used to execute the computer program stored in the memory so that the terminal executes the above-mentioned electroencephalogram signal adaptive recognition method.
[0122] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0123] like Figure 3As shown, the terminal of the present invention is in the form of a general computing device. The components of the terminal may include but are not limited to: one or more processors or processing units 31, a memory 32, and a bus 33 connecting different system components (including the memory 32 and the processing unit 31).
[0124] Bus 33 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0125] The terminal typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the terminal, including volatile and non-volatile media, removable and non-removable media.
[0126] The memory 32 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 321 and / or cache memory 322. The terminal may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 323 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, usually called a "hard drive"). Although Figure 3 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 33 via one or more data medium interfaces. The memory 32 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present invention.
[0127] A program / utility 324 having a set (at least one) of program modules 3241 may be stored, for example, in the memory 32, such program modules 3241 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 3241 generally perform the functions and / or methods of the embodiments described herein.
[0128] The terminal may also communicate with one or more external devices (e.g., keyboards, pointing devices, displays, etc.), one or more devices that enable a user to interact with the terminal, and / or any device that enables the terminal to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via input / output (I / O) interface 34. Furthermore, the terminal may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 35. Figure 3 As shown, the network adapter 35 communicates with other modules of the terminal via the bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the terminal, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0129] In summary, the network camera and its physical link identification method, system, storage medium, and terminal of the present invention can quickly and automatically identify the network camera in the network topology and the physical link between it and the network device based on the ONVIF protocol and Ethernet; it can not only improve the management efficiency of network devices, but also provide reliable data support for network operation and maintenance, troubleshooting, and security monitoring; it helps to reduce manual intervention, improve the intelligent level of network device management, and adapt to complex network environment requirements. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.
[0130] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A network camera and a physical link identification method thereof, characterized in that: The method comprises the following steps: Set the ONVIF credentials required for the network camera and the network topology IP range to be identified; Acquire the network topology device IP based on the network topology IP range; Send ONVIF message to the network topology device IP to identify the network camera; Based on the ONVIF certificate, obtain the basic information of the network camera; The physical link information of the network camera is identified based on the network device FDB table and the LLDP table.
2. The network camera and the physical link identification method thereof according to claim 1, characterized in that: The following method is used to obtain the network topology device IP based on the network topology IP range: Obtain the network topology devices within the network topology IP range through Nmap scanning; If the Nmap scan fails to scan the network topology device, the network topology device is obtained through ACK scanning; if the MAC of the network topology device cannot be obtained, the unobtained MAC is compensated based on the ARP table of the switch.
3. The network camera and the physical link identification method thereof according to claim 1, characterized in that: Sending an ONVIF message to the network topology device IP to identify the network camera includes the following steps: Sending a SOAP message of the WS-Discovery protocol to the IP of the network topology device; Receiving a return message of the SOAP message; The returned message is parsed to obtain a network topology device supporting the ONVIF protocol, and the network topology device is determined to be a network camera.
4. The network camera and the physical link identification method thereof according to claim 3, characterized in that: The method also includes connecting to a network topology device that does not have the WS-Discovery protocol enabled based on the ONVIF credentials, and determining that the network topology device is a network camera when the connection is successful.
5. The network camera and the physical link identification method thereof according to claim 1, characterized in that: Based on the ONVIF certificate, obtaining the basic information of the network camera includes the following steps: Based on the ONVIF credentials, the network camera performs traversal connection; When the connection with the network camera is successful, obtaining basic information of the network camera; Save the basic information of the network camera and the matching ONVIF credentials.
6. The network camera and the physical link identification method thereof according to claim 5, characterized in that: When the network camera cannot be connected, the MAC of the network camera is compared with the OUI data provided by IEEE to obtain basic information of the network camera.
7. The network camera and the physical link identification method thereof according to claim 1, characterized in that: Identifying the physical link information of the network camera based on the network device FDB table and the LLDP table includes the following steps: Get the LLDP table data of all network devices in the IP range of the network topology, and get the network devices and connection ports connected to the network cameras with matching IP or MAC; The FDB data is grouped according to the port index, and when one port corresponds to one MAC, the switch and the connection port connected to the matching network camera are obtained based on the MAC.
8. A network camera and a physical link identification system thereof, characterized in that: The system includes a setting module, a first acquisition module, a first identification module, a second acquisition module and a second identification module; The setting module is used to set the ONVIF credentials required by the network camera and the network topology IP range to be identified; The first acquisition module is used to acquire the network topology device IP based on the network topology IP range; The first identification module is used to send an ONVIF message to the network topology device IP to identify the network camera; The second acquisition module is used to obtain basic information of the network camera based on the ONVIF certificate; The second identification module is used to identify the physical link information of the network camera based on the network device FDB table and the LLDP table.
9. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the network camera and the physical link identification method thereof according to any one of claims 1 to 7 are implemented.
10. A terminal, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory, so that the terminal executes the network camera and the physical link identification method thereof according to any one of claims 1 to 7.