Summary of the invention
In view of this, the application's is designed to provide a kind of NVR module and its out drawing method and POE-NVR mould group, make
NVR when connecting new IPC, it is not necessary to again manual setting IP address can automatic map delivery, improve out figure efficiency.
Embodiments herein is achieved in that
In a first aspect, the embodiment of the present application provides a kind of NVR module, including memory and the place connecting with the memory
Device is managed, the processor is used for: when receiving the ARP packet that the web camera newly accessed is sent, parsed in the ARP packet
Address information simultaneously forms address file, and the address information includes MAC Address and IP address;It obtains at the IP address with itself
In a virtual ip address of same network segment, and distribute to the web camera;The virtual ip address, the address are believed
Breath is associated, and is formed chained list and is stored in the address file;By searching for the virtual ip address, finds the network and take the photograph
Camera, and connection is established with the virtual ip address of the web camera, the data that the web camera is sent
Stream is shown.For NVR module, due to IPC virtual ip address and itself be in same network segment, NVR module
Data flow transmitted by IPC can be handled and be shown, realization NVR module is docked automatically with web camera and oneself
It is dynamic to go out to scheme, improve out figure efficiency.
Embodiment with reference to first aspect, in a kind of possible embodiment, the NVR module is used for: calculate with it is described
The IP of itself is in the random IP address in same network segment;Ping operation is carried out to the random IP address, and judges whether to surpass
When;When determining the ping operation overtime, the random IP address is determined as the virtual ip address and is distributed to described
Web camera.Avoid the duplicate virtual ip address of selection.
Embodiment with reference to first aspect, in a kind of possible embodiment, the NVR module is also used to determining
Ping operation is stated when having not timed out, abandons the random IP address.
Embodiment with reference to first aspect, in a kind of possible embodiment, the NVR module, for passing through privately owned association
View searches the virtual ip address, finds the web camera, and build with the virtual ip address of the web camera
Vertical connection.It goes to search virtual ip address by proprietary protocol, it is ensured that the safety of data interaction.
Second aspect, the embodiment of the present application provide a kind of drawing method out, are applied to NVR module, which comprises connecing
When receiving the ARP packet that the web camera newly accessed is sent, the address information parsed in the ARP packet forms address file, institute
Stating address information includes MAC Address and IP address;Obtain the void that same network segment is in the IP address of the NVR module
Quasi- IP address, and distribute to the web camera;The virtual ip address, the address information are associated, chain is formed
Table is stored in the address file;By searching for the virtual ip address, find the web camera, and with the network
The virtual ip address of video camera establishes connection, and the data flow that the web camera is sent is shown.
In conjunction with second aspect embodiment, in a kind of possible embodiment, the acquisition is with the IP of the NVR module
Location is in the virtual ip address of same network segment, and distributes to the web camera, comprising: calculates the IP with the NVR module
Random IP address in same network segment;Ping operation is carried out to the random IP address;Determining that the ping operation is super
Constantly, the random IP address is determined as the virtual ip address and distributes to the web camera.
In conjunction with second aspect embodiment, in a kind of possible embodiment, the method also includes: described in determination
When ping operation has not timed out, the random IP address is abandoned.
The third aspect, the embodiment of the present application provides a kind of POE-NVR mould group, including in first aspect any embodiment
NVR module and POE switch module.The NVR module is detachably connected with the POE switch module.
In conjunction with third aspect embodiment, in a kind of possible embodiment, the NVR module is drawn by power extension
Line, difference gridding signal extension lead and serial communication bus are detachably connected with the POE switch module.
In conjunction with third aspect embodiment, in a kind of possible embodiment, the POE switch module includes decompression core
Piece, the decompression chip is used to carry out decompression processing to the voltage for accessing the POE switch module, to the NVR module
Power supply.
Fourth aspect, the embodiment of the present application also provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence, the computer program execute above-mentioned second aspect embodiment and/or combine second aspect embodiment when being run by computer
The method that provides of any possible embodiment.
Other feature and advantage of the application will be illustrated in subsequent specification, also, partly be become from specification
It is clear that being understood and implementing the embodiment of the present application.The purpose of the application and other advantages can be by written
Specifically noted structure is achieved and obtained in specification and attached drawing.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
Term "and/or" in the application, only a kind of incidence relation for describing affiliated partner, indicates may exist three kinds
Relationship, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.
In addition, being that applicant exists for the defect of figure low efficiency is gone out present in the NVR module occurred in the prior art
It is being obtained after practicing and carefully studying as a result, therefore, the discovery procedure of drawbacks described above and hereinafter the application are implemented
The solution that example is proposed in view of the foregoing drawbacks, all should be the tribute that applicant makes the application during the application
It offers.
To solve the above-mentioned problems, the embodiment of the present application provides a kind of NVR module and its out drawing method and POE-NVR mould
Group, so that the figure efficiency that goes out of NVR module gets a promotion.The side of corresponding software, hardware and soft or hard combination can be used in the technology
Formula is realized.It describes in detail below to the embodiment of the present application.
First embodiment
Firstly, describing the NVR module 100 for realizing the embodiment of the present application referring to Fig.1.Wherein, NVR module 100 can
To include: processor 110, memory 120.
NVR module 100 can be attached with IPC, to obtain the video data and/or image data that IPC is transmitted, so
After schemed out.
It should be noted that the component and structure of NVR module 100 shown in FIG. 1 are illustrative, and not restrictive, root
According to needs, NVR module 100 also can have other assemblies and structure.
For example, in some cases, NVR module 100 can also include HDMI (High Definition
Multimedia) and VGA (Video Graphics Array) display interface, for connecting display screen, to show NVR module institute
The picture material got.In some cases, NVR module 100 can also include SATA (Serial Advanced
Technology Attachment, Serial Advanced Technology Attachment) interface, the maximum mechanical hard disk that can support 14TB.Some
In the case of, NVR module 100 can also include USB2.0 interface, for supporting a variety of peripheral hardwares such as external USB flash disk, mouse, WIFI.?
Under some cases, NVR module 100 can also include audio input output interface.In some cases, NVR module 100 can be with
Including panel interface, panel interface is used to be used as customized keypad.In some cases, NVR module 100 can also include
RJ45 network interface and the expansion interface being attached with POE (Power Over Ethernet) switch module.In some cases
Under, NVR module 100 can also include alarm expansion interface and buzzer.
Processor 110, memory 120 and other be likely to occur in NVR module 100 component between each other directly or
Ground connection is electrically connected, to realize the transmission or interaction of data.For example, processor 110, memory 120 and other be likely to occur
Component can pass through one or more communication bus or signal wire between each other and realize and be electrically connected.
Memory 120 for storing program, such as be stored with the NVR module 100 occurred hereinafter to go out drawing method corresponding
Program.
Processor 110 is for executing the executable module stored in memory 120, such as computer program.Work as processor
110 after receiving and executing instruction, and can execute computer program, such as execute: receive the web camera newly accessed
When the ARP packet of transmission, parse address information in the ARP packet and form address file, the address information include MAC Address with
And IP address;It obtains and is in a virtual ip address of same network segment with the IP address of itself, and distribute to the network shooting
Machine;The virtual ip address, the address information are associated, chained list is formed and is stored in the address file;By looking into
The virtual ip address is looked for, finds the web camera, and establish and connect with the virtual ip address of the web camera
It connects, the data flow that the web camera is sent is shown.
Certainly, the revealed method of the embodiment of the present application any embodiment can be applied in processor 110, Huo Zheyou
Processor 110 is realized.
For example, processor 110 is used to calculate the random IP address being in the IP of itself in same network segment;To described random
IP address carries out ping operation, and judges whether time-out;It is when determining the ping operation overtime, the random IP address is true
It is set to the virtual ip address and distributes to the web camera.
For example, processor 110 is also used to abandon the random IP address when determining that the ping operation has not timed out.
For example, processor 110 is used to search the virtual ip address by proprietary protocol, the web camera is found,
And connection is established with the virtual ip address of the web camera.
It will be introduced below for the drawing method that goes out of NVR module provided herein.
Referring to Fig. 2, the embodiment of the present application provides a kind of drawing method out applied to above-mentioned NVR module 100.It below will knot
The step of Fig. 2 includes to it is closed to be illustrated.
Step S110: when receiving the ARP packet that the web camera newly accessed is sent, the ground in the ARP packet is parsed
Location information forms address file.
IPC is in being linked into NVR module 100 for that can send ARP to NVR module 100 after connecting the network interface of IPC
(Address Resolution Protocol, address resolution protocol) packet.Address information in ARP packet includes sending the packet
Equipment MAC Address and IP address, i.e., in the ARP packet transmitted by IPC include the IPC MAC Address and IP address.
In the present embodiment, default NVR module 100 thinks the IPC when receiving the ARP packet that a certain IPC is sent
It completes to connect with NVR module 100.Since the real ip address of IPC and the IP address of NVR module 100 be not in same network segment, because
This, NVR module 100 cannot be completed out to scheme by obtaining data transmitted by IPC at this time.
NVR module 100 is after the ARP packet for getting certain IPC transmission, the ground that can be included to ARP by address protocol
Location information (MAC Address and IP address) is parsed, and is then accessed the MAC Address of the IPC, IP address and the IPC
The serial number of network interface of NVR module 100 be associated, form address file.
Step S120: it obtains and is in a virtual ip address of same network segment with the IP address of the NVR module, and distribute
To the web camera.
Since NVR module 100 is when carrying out automatic map delivery, needs to obtain and the IP address of itself is in same network segment
The data of IPC, therefore, NVR module 100 with IPC after being attached, with needing the IP address of NVR module 100 and the IP of IPC
The consistency of location holding network segment.Again since a NVR module 100 can connect multiple and different IPC, if allowing NVR module 100
IP address deacclimatizes the IP address of IPC, always makes the data of certain some IPC that can not be gone out scheme successfully by NVR.Therefore, Ke Yitong
The IP address for changing IPC is crossed, so that the IP address of the IP address of IPC and NVR module 100 is in same network segment.
Optionally, can be by the way that a virtual ip address be arranged for IPC, to change the IP address of IPC, steps are as follows.
NVR module 100 first passes through random number algorithm with calculating random IP that one and itself IP is in same network segment
Then location carries out ping operation to this random IP address.
Wherein, ping operation is an order under Windows, Unix and linux system.Ping operation belongs to one and leads to
Believe agreement, is a part of ICP/IP protocol.It can check whether network is connected to using ping order.When to some IP address into
When row ping is operated, if ping operation overtime, characterizing the IP address cannot be connected to, and occupy the IP address without other equipment.If
Ping operation has not timed out, and characterizing the IP address can be connected to, i.e., the IP address is occupied by some equipment.
Therefore, NVR module 100 it is random can to characterize this when determining the ping operation overtime for being directed to random IP address
IP address is unoccupied, and then this random IP address is determined as virtual ip address and distributes to IPC by NVR module 100.True
When having not timed out surely for the ping operation of random IP address, characterize that this random IP address is occupied, and NVR module 100 abandons this
Random IP address, and the random IP address that a new IP with itself is in same network segment is recalculated, and carry out ping
Operation, and so on.
Step S130: the virtual ip address, the address information are associated, and are formed chained list and are stored in the address
In file.
Since, including the MAC Address and IP address of IPC, NVR module 100 distributes virtually for IPC in address information
After IP address, the IP address of the virtual ip address of IPC, the MAC of IPC and IPC can be associated, form chained list and be stored in institute
It states in address file, NVR module 100 is allowed to find the MAC Address of IPC by the virtual ip address of IPC, so as to look for
To the IP address of IPC.
Step S140: by searching for the virtual ip address, finding the web camera, and with the web camera
The virtual ip address establish connection, the data flow that the web camera is sent is shown.
After distributing for IPC and itself being in the virtual ip address of same network segment, NVR module 100 can be by searching for this
Virtual ip address to find IPC, and establishes connection with the virtual ip address of IPC.Again due to for NVR module 100,
IPC at this time and itself be in same network segment, therefore, NVR module 100 can receive the data flow of IPC transmission automatically, with progress
Figure is shown out.
Optionally, NVR module 100 can search void by proprietary protocol, such as by proprietary protocols such as Netip, onvif
Quasi- IP address, so that IPC corresponding with virtual ip address is found, to guarantee the safety in data transfer.
Optionally, NVR module 100 can be monitored the state of the network interface of access IPC, such as by reading pipe in real time
The state of the register of network interface is managed to realize the connection status of inquiry network interface.When the determination of NVR module 100 and some network interface connection
IPC is pulled out when connection being caused to disconnect, and NVR module 100 can remove the address file of preservation corresponding with the network interface, is next
The IPC for connecting the network interface generates address file and prepares.
NVR module 100 and NVR module provided by the embodiment of the present application go out drawing method, and the two has identical or corresponding
Technical characteristic, to briefly describe, both embodiments for going out drawing method of 100 embodiment of NVR module and NVR module one of them
Place is not referred to, can refer to the corresponding contents in the embodiment of another one.
In addition, the embodiment of the present application also provides a kind of non-volatile computer readable storage medium storing program for executing (hereinafter referred to as computer
Readable storage medium storing program for executing), computer program is stored on the computer readable storage medium, which is run by computer
When, it executes and goes out the step of drawing method includes such as above-mentioned NVR module.
A kind of NVR module and the drawing method out applied to NVR module, NVR mould provided by the application first embodiment
For block 100 when receiving the ARP packet that the IPC newly accessed is sent, the address information parsed in ARP packet forms address file;Then
Obtain and be in a virtual ip address of same network segment with itself IP address, and distribute to IPC, then by virtual ip address,
Address information is associated, and is formed chained list and is stored in address file, can find so as to subsequent by searching for virtual ip address
IPC.For NVR module 100, due to IPC virtual ip address and itself be in same network segment, NVR module 100
Data flow transmitted by IPC can be handled and be shown, realize that NVR module 100 is docked with IPC automatically and gone out automatically
Figure, improves out figure efficiency.
Second embodiment
As shown in figure 3, the embodiment of the present application also provides a kind of POE-NVR mould group 200, including NVR module 100 and POE are handed over
Module of changing planes 210.NVR module 100 and POE switch module 210 is detachably connected.
Since the renewal speed of chip is very fast, so that the life cycle of POE-NVR mould group 200 is shorter.In traditional scheme
In, POE-NVR mould group 200 uses integral structure, as long as any one in NVR module 100 and POE switch module 210
Divide and be updated, entire mould group requires to redesign, and waste of resources is caused.Secondly, if POE-NVR mould group 200 uses one
Body formula structure, the integrated level of mainboard is higher, and design difficulty increases accordingly.In addition, POE-NVR mould group 200 uses integral structure
When, if breaking down, it is difficult to being positioned at guilty culprit.
Optionally, in the embodiment of the present application, NVR module 100 can be expanded by power extension lead, difference gridding signal
It opens up lead and serial communication bus (MDIO, Management Data Input/Output) and POE switch module 210 can
Dismantling connection.Correspondingly, being reserved with power extension interface, network extension in NVR module 100 and POE switch module 210
Interface and serial communication bus expansion interface.
Wherein, power extension lead can be 12V power extension lead, is extended using the terminal of 3.96mm.Power supply
One end of extension lead is connect with the power extension interface of NVR module 100, and the power supply of the other end and POE switch module 210 expands
Open up interface connection.Difference gridding signal extension lead MDIO can be extended using 1.25mm terminal, have 8Pin.Difference net
One end of lattice signal extension lead is connect with the network expansion interfaces of NVR module 100, the other end and POE switch module 210
Network expansion interfaces connection.MDIO can be extended using 1.25mm terminal, have 6Pin.One end of MDIO and NVR module
100 serial communication bus expansion interface connection, the serial communication bus expansion interface of the other end and POE switch module 210
Connection.
After POE-NVR mould group 200 uses detachable structure, when only some is needed more in POE-NVR mould group 200
When new, another part can be retained, so as to economize on resources.
Secondly, if POE-NVR mould group 200 uses detachable structure, NVR module 100 and POE switch module 210
It can individually be designed, reduce the overall complexity of mould group.
In addition, if POE-NVR mould group 200 uses detachable structure, it, can when POE-NVR mould group 200 breaks down
First a part therein, such as NVR module 100 to be removed, after replacing upper normally functioning NVR module 100, then it is right
The function of entire POE-NVR mould group 200 is tested, if the function of POE-NVR mould group 200 is normal, illustrates former NVR module 100
It breaks down, if the function of POE-NVR mould group 200 is still abnormal, illustrates POE switch module 210 or original NVR module 100
It is likely to break down, needs to continue to replace former POE switch module 210 and carry out further malfunction elimination.
In addition, being directed to POE switch module 210, a uplink major network mouth, multiple POE network interfaces and a downlink are reserved
The expansion interface of mouth.
Major network mouth is used for access to LAN, can be used for the forwarding and acquisition of Online Video.The expansion interface of down going port is used
In docking NVR module 100, i.e. the expansion interface of down going port is that the network extension of POE switch module 210 mentioned above connects
Mouthful.
IPC can be realized by POE network interface and NVR module 100 and be connected.NVR module 100 can pass through MDIO real-time query
The POE network interface connection state of POE switch module 210, such as the deposit by reading switch segment in switch module 210
The state of device inquires POE network interface connection state to realize.When the determining IPC with some POE network interface connection of NVR module 100 is pulled out
When connection being caused to disconnect out, NVR module 100 can remove the address file of preservation corresponding with the POE network interface, be next connection
The IPC of the POE network interface generates address file and prepares.Therefore, POE-NVR mould group 200 has accomplished plug and play, and user only needs
IPC is connected to some net POE network interface of POE-NVR mould group, IPC actively can establish connection with NVR module 100 and complete out
Figure.
Optionally, POE switch module 210 may include decompression chip, and decompression chip is used for access POE interchanger mould
The voltage of block 210 carries out decompression processing, to be powered to NVR module 100.
As shown in figure 4, by taking the POE chip in POE switch module 210 is POE chip provided by IC PLUS as an example,
The working power that the POE chip needs is 45V-57V.Since the operating voltage that NVR module 100 needs is 12V or so,
Generally the operating voltage of 48V can be introduced at this end of POE switch module 210, powered to POE chip, then in POE interchanger mould
48V is gone to 12V and powered to NVR module 100 by block introducing DCDC step down supplies chip.It is depressured the introducing of chip, so that only needing
Want single 48V power supply that entire POE-NVR mould group 200 can be made to work normally.
In conclusion the embodiment of the present invention propose NVR module and its drawing method and POE-NVR mould group, NVR module exist out
When receiving the ARP packet that the IPC newly accessed is sent, the address information parsed in ARP packet forms address file;Then it obtains and oneself
The IP address of body is in a virtual ip address of same network segment, and distributes to IPC, then by virtual ip address, address information
It is associated, forms chained list and be stored in address file, IPC can be found so as to subsequent by searching for virtual ip address.For
For NVR module, due to IPC virtual ip address and itself be in same network segment, NVR module can be to transmitted by IPC
Data flow handled and shown, realize that NVR module is docked with web camera and automatic map delivery automatically, improve out and scheme
Efficiency.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the application, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement
The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes
It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement
It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially right in other words
The part of part or the technical solution that the prior art contributes can be embodied in the form of software products, the calculating
Machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be individual
Computer, laptop, server or network equipment etc.) execute each embodiment the method for the application whole or
Part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), magnetic or disk etc. be various to can store program code
Medium.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.