CN104539902B - The remote access method and system of a kind of IPC - Google Patents

The remote access method and system of a kind of IPC Download PDF

Info

Publication number
CN104539902B
CN104539902B CN201410839822.9A CN201410839822A CN104539902B CN 104539902 B CN104539902 B CN 104539902B CN 201410839822 A CN201410839822 A CN 201410839822A CN 104539902 B CN104539902 B CN 104539902B
Authority
CN
China
Prior art keywords
address
ipc
message
nvr
client host
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201410839822.9A
Other languages
Chinese (zh)
Other versions
CN104539902A (en
Inventor
周迪
王状春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201410839822.9A priority Critical patent/CN104539902B/en
Publication of CN104539902A publication Critical patent/CN104539902A/en
Application granted granted Critical
Publication of CN104539902B publication Critical patent/CN104539902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention proposes a kind of remote access method of IPC, including:NVR and the IPC of binding consult for the first IP address of remote access and first end slogan;Website server establishes connection by the first IP address and first end slogan between NVR and client host;When connect establish after NVR the first IP address and first end slogan are handed down to the IPC of binding, the MAC Address of the IPC of binding is advertised to client host by Website server after the first IP address and first end slogan are coming into force on the IPC of binding;Client host sends remote access message to the outlet routing device of NVR one sides, the remote access message includes MAC forwardings mark and the MAC Address of IPC to be visited, the message is forwarded to the corresponding IPC of the MAC Address by the outlet routing device of NVR one sides after remote access message is received when carrying MAC forwarding marks in judging remote access message.The achievable client host of the present invention directly remotely accesses IPC.

Description

The remote access method and system of a kind of IPC
Technical field
The present invention relates to field of video monitoring more particularly to the remote access methods and system of a kind of IPC.
Background technology
With the development of Network Video Surveillance, the wide area network video monitoring demand using civilian video monitoring as representative increasingly increases Add.In wide area network video monitoring system, for monitoring device generally by soho router access carrier network, user wishes can To pass through client accessing monitoring equipment whenever and wherever possible.
In wide area video monitoring networking diagram general at present, monitoring device manufacturer arranges Website server in public network, uses Family arrange at home 1 NVR (Network Video Recorder, network hard disk video recorder) and more IPC (IP Camera, Web camera), user passes through website client end remote management NVR and IPC when outgoing.Wherein, Website server, website client End, NVR can belong to a monitoring device manufacturer together, and passing through NAT (Network Address are realized to cooperate Translation, network address translation) flow, user can pass through website client end remote management NVR.
However, since current IPC is mostly third party device, it can not realize and wear with Website server and the cooperation of website client end The more flow of NAT, therefore user cannot be by website client end come remote management third party IPC.In order to realize user is allowed to pass through Website client end remotely accesses third party IPC, in the prior art, can be by NVR come dereference third party IPC, then Website client end accesses every IPC and is required for carrying out transfer by NVR in this scenario, can increase the performance pressures of NVR, and Once there is Single Point of Faliure in NVR, it will causes all IPC that can not all be accessed by website client end.
The content of the invention
In view of this, the present invention proposes a kind of remote access method of small IPC, described applied in video monitoring system If video monitoring system include network hard disk video recorder NVR, client host, Website server and with the NVR binding Dry IPC, including:
NVR and the IPC of binding consult to provide the first IP address and first port of remote access for client host Number;
Website server is by first IP address and first end slogan between the NVR and the client host Establish connection;
After the connection is established, first IP address and first end slogan are handed down to the IPC of the binding by NVR, And after first IP address and first end slogan come into force on the IPC of the binding, tied up by Website server by described The MAC Address of fixed IPC is advertised to the client host;
Client host sends remote access message, the remote access report to the outlet routing device of the NVR one sides Text includes MAC forwardings mark and the MAC Address of IPC to be visited so that the outlet routing device of the NVR one sides is receiving After the remote access message, when carrying MAC forwarding marks in judging the remote access message, which is forwarded To the corresponding IPC of the MAC Address to complete the remote access for the IPC.
The present invention also proposes a kind of remote access system of IPC, and the system comprises NVR, client host, website services Device and several IPC with NVR bindings, wherein:
NVR is used to consult to provide the first IP address and first of remote access for client host with the IPC of binding Port numbers;
It is the NVR and the client host that Website server, which is used for through first IP address and first end slogan, Between establish connection;
After the connection is established, NVR is further used for first IP address and first end slogan being handed down to described The IPC of binding, and after first IP address and first end slogan come into force on the IPC of the binding, pass through website service The MAC Address of the IPC of the binding is advertised to the client host by device;
Client host is used to send remote access message, the long-range visit to the outlet routing device of the NVR one sides Ask that message includes MAC forwardings mark and the MAC Address of IPC to be visited so that the outlet routing device of the NVR one sides exists After receiving the remote access message, when carrying MAC forwarding marks in judging the remote access message, by the message The corresponding IPC of the MAC Address is forwarded to complete the remote access for the IPC.
The present invention program negotiates to provide the IP of remote access for client host by the NVR IPC bound with it Address and port numbers, Website server are built by the IP address and port numbers between the NVR and the client host Vertical connection, after the completion of connection foundation, the IP address and port numbers are handed down to the IPC of the binding by NVR, and described After IP address and port numbers come into force on the IPC of the binding, by Website server by the MAC Address of the IPC of the binding The client host is advertised to, after client host receives the MAC Address of Website server notice, to the NVR one sides Outlet routing device send carry MAC forwarding mark and IPC to be visited MAC Address remote access message so that it is described The outlet routing device of NVR one sides carries after the remote access message is received in the remote access message is judged When there are MAC forwarding marks, which is forwarded to the corresponding IPC of the MAC Address to complete the remote access for the IPC. In the present invention program, due to establishing the connection between client host instead of IPC by NVR, and it is created as in connection After work(, IP address when establishing connection and port numbers are handed down to IPC, subsequent clients end main frame can pass through the IP address and end Slogan directly accesses IPC, so as to when Website server and NVR break down, influence client host access immediately IPC。
Description of the drawings
Fig. 1 is a kind of flow chart of the remote access method of the IPC shown in the illustrative embodiment of the present invention;
Fig. 2 is a kind of networking diagram of the video monitoring system scheme shown in the illustrative embodiment of the present invention;
Fig. 3 is the networking diagram of another video monitoring system scheme shown in the illustrative embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of the remote access system of the IPC proposed in the illustrative embodiment of the present invention.
Specific embodiment
It is contemplated that realize that client host can directly remotely access IPC in distal end, so as to when NVR and website service When device breaks down, remote access of the client host to IPC is nor affected on.
The present invention program negotiates to provide the IP of remote access for client host by the NVR IPC bound with it Address and port numbers, Website server are built by the IP address and port numbers between the NVR and the client host Vertical connection, after the completion of connection foundation, the IP address and port numbers are handed down to the IPC of the binding by NVR, and described After IP address and port numbers come into force on the IPC of the binding, by Website server by the MAC Address of the IPC of the binding The client host is advertised to, after client host receives the MAC Address of Website server notice, to the NVR one sides Outlet routing device send carry MAC forwarding mark and IPC to be visited MAC Address remote access message so that it is described The outlet routing device of NVR one sides carries after the remote access message is received in the remote access message is judged When there are MAC forwarding marks, which is forwarded to the corresponding IPC of the MAC Address to complete the remote access for the IPC.
In the present invention program, due to establishing the connection between client host instead of IPC by NVR, and even It connects after being successfully established, IP address when establishing connection and port numbers is handed down to IPC, subsequent clients end main frame can pass through the IP Address and port numbers directly access IPC, so as to when Website server and NVR break down, influence client immediately Host accesses IPC.
In order to which technical scheme is more clearly understood, embodiment is developed simultaneously to present invention progress below in conjunction with attached drawing It is described in detail.
In illustrative a kind of embodiment of the invention, a kind of remote access method of IPC is proposed, applied to video monitoring In system, the video monitoring system include network hard disk video recorder NVR, client host, Website server and with it is described Several IPC of NVR bindings, refer to Fig. 1, the described method includes:
Step S101, NVR with binding IPC consult be used for for client host provide remote access the first IP address and First end slogan;
Step S102, Website server is the NVR and the client by first IP address and first end slogan Connection is established between end main frame;
Step S103, after the connection is established, first IP address and first end slogan are handed down to described tie up by NVR Fixed IPC, and after first IP address and first end slogan come into force on the IPC of the binding, pass through Website server The MAC Address of the IPC of the binding is advertised to the client host;
Step S104, client host sends remote access message to the outlet routing device of the NVR one sides, described remote Journey, which accesses message, includes MAC forwardings mark and the MAC Address of IPC to be visited so that the Exit Road of the NVR one sides is by setting It is standby after the remote access message is received, when carrying MAC forwarding marks in judging the remote access message, by this Message is forwarded to the corresponding IPC of the MAC Address to complete the remote access for the IPC.
Fig. 2 is referred to, Fig. 2 is a kind of networking diagram of video monitoring system scheme shown in the present embodiment, below in conjunction with this The present invention program is described in detail in networking diagram.
It is taken as shown in Fig. 2, the video monitoring system includes one by monitoring device manufacturer in the website that public network is arranged Business device, a NVR, more IPC, a subscriber's main station for being mounted with the website client end being used cooperatively with the Website server (client host), wherein the NVR and the IPC support ONVFI agreements, in NVR one sides and client host one side It has also been respectively arranged one while has supported the Exit Road of two or three layers of forwarding by device A and outlet routing device B.Certainly, in reality Now, the NVR in more than video monitoring system can also use support network function DVR (Digital Video Recorder, Digital video recorder) it substitutes, the IPC, which can also be used, supports the EC encoders of ONVFI agreements and the simulation of front end to image Machine substitutes.
Logon message is sent to Website server after networking stage, the NVR startups, reports log-on message, wherein institute Information, the Website servers such as IP address, port numbers, device type, equipment Serial Number of the log-on message including NVR is stated to receive After the log-on message of NVR, the log-on message that NVR is reported is verified, after being verified, respond the message that succeeds in registration to NVR, and record NVR IP address and the Exit Road of port numbers and NVR one sides by letters such as the IP address of device A and port numbers Breath.After succeeding in registration, NVR periodically sends keep Alive Packet to Website server, to maintain the company between NVR and Website server It connects.
The website client end also sends logon message after starting to Website server, log-on message is reported, wherein described Log-on message includes the IP address at website client end.Port numbers, user name.The information such as password, Website server are receiving website After the log-on message that client reports, the log-on message that NVR is reported is verified, after being verified, responds what is succeeded in registration Message gives website client end, and record website client end IP address and the Exit Road of port numbers and website client end one side by The information such as the IP address and port numbers of equipment B.After succeeding in registration, website client end equally sends keep-alive report to Website server Text, to maintain the connection between website client end and Website server.
After NVR succeeds in registration to Website server, it can start in local binding IP C, by the information of the IPC bound It is reported to Website server.
Wherein, NVR generally includes the MAC Address of IPC into the ipc message that Website server reports.The letters such as device type Breath, the MAC Address of the IPC can be obtained by sending ARP messages to IPC.When NVR is by the information of the IPC of binding success After being reported to Website server, Website server to NVR send a back message, and local record IPC MAC Address, The information such as device type.
For the IPC of binding success, NVR can provide remote access locally enabling one for website client end IP address (the first IP address) and port numbers (first end slogan), the wherein IP address and port numbers can be NVR and binding IPC is obtained after consulting.
NVR can be covered when locally enabling IP address for the IPC of binding success according to the IP address of the machine, subnet first The information such as code obtain the IP address pond of this network segment, then take out an IP address in order from the IP address pond of this network segment, with The IP address sends ARP request message, if do not received within a specified time as the purpose IP address inside ARP messages For the arp response message of the ARP request message, show the IP address free time, then the idle IP can be enabled in the machine Address.Certainly, if having received arp response message, then it represents that the IP address is occupied, then repeatedly above procedure, in order An IP address is taken out again, until getting an idle IP address, and is locally enabling the IP address.
NVR can obtain an idle port numbers from the machine first when enabling port numbers for the IPC of binding success, Then the port numbers are handed down to IPC, IPC checks whether the port numbers are idle in the machine, if idle, IPC responds a finger Show the message of port numbers free time to NVR, NVR enables the port numbers receiving the message the machine;If the port is occupied, IPC responds one and indicates that occupied message to NVR, carries the occupied end of IPC the machine to the port numbers at this time in the message Slogan list and corresponding agreement, NVR has used port numbers after the message is received, according to what IPC was reported, with reference to the free time of the machine Port numbers obtain a port numbers all idle on NVR and IPC, and the port numbers are enabled in the machine.
After the port numbers enable, if NVR is bundled with new IPC again, enabled port numbers quilt in order to prevent The IPC newly bound is occupied and is caused happening for Bind Failed, and enabled port numbers can be handed down to the IPC by NVR, should IPC checks whether the port numbers idle in the machine, if idle, IPC respond a message for indicating the port numbers free time to NVR does not influence the normal binding of the IPC at this time;If the port is occupied, IPC respond one indicate the port numbers by The message of occupancy carries the occupied port numbers list of IPC the machine in the message at this time and corresponding agreement, NVR is being received to NVR To after the message, port numbers are used according to what IPC was reported, the idle port number on an IPC have been obtained, then by enabled end The corresponding agreement of slogan and the idle port number are handed down to IPC, and the enabled port numbers of NVR are locally occupied in IPC at this time, NVR can notify the port numbers that IPC has occupied this to be revised as idle port number, so as to complete normally to bind.
When NVR is locally successfully enabling the IP address and port numbers for being used to provide remote access for website client end Afterwards, Website server can be established with the website client end for the NVR according to the IP address and port numbers and connected.
Specifically, when user is taken by the link provided on website client end when accessing a certain IPC, can trigger to website Business device sends an IPC access request, and Website server can locally open passing through NAT after the IPC access requests are received Flow, established for NVR and IPC across public network and pass through the Exit Road of the NVR one sides by device A and networking client one The connection of the outlet routing device B of side.
Continuing with referring to Fig. 2, it is assumed that NVR was newly enabled is for the IP address that provides remote access for website client end A1, port numbers P1;By the Exit Roads of NVR one sides, by the transformed IP address of device A, (i.e. described Exit Road is by setting for A1 ' The IP address of standby A), by the Exit Road of NVR one sides by the transformed port numbers of device A be P1 ' (i.e. described outlet routing devices The port numbers of A);The IP address at website client end is A2, port numbers P2, by the outlet routing device of website client end one side The transformed IP address of B is A2 ' (IP address of i.e. described outlet routing device B), by the Exit Road of website client end one side It is P2 ' port numbers of device A (i.e. described Exit Road by) by the transformed port numbers of equipment B.
After Website server receives the IPC access requests of website client end transmission, trigger to NVR and send the first notice report Text carries the IP address A2 ' and port numbers P2 ' of outlet routing device B in first notification packet.NVR is to receive this first logical After accusing message, the IP address and port numbers of outlet routing device B are obtained, being created to outlet one connection of routing device B transmissions please Message is sought, the source IP address of the connection request to create message is A1 at this time, and source port number P1, purpose IP address is A2 ', purpose Port numbers are P2 ';After Exit Road receives the connection request to create message by device A, it can learn to carry in the message automatically Source IP address, purpose IP address, source port number and destination slogan, and be locally generated source IP address for A1, source port Number it is P1, the NAT table item (i.e. the first NAT table item) that purpose IP address A2 ', destination slogan are P2 ', subsequently exports routing device A can carry out address conversion according to message of the NAT table item for the outlet routing device B from the client host one side.
When exporting routing device B when receiving the connection request to create message, due to exporting at this time on routing device B simultaneously Corresponding NAT table item is not created, can not complete address conversion, therefore the connection request to create message will be unable to be transparent to net It stands client.
After NVR has sent the connection request to create message, the Website server message can be noticed and sent, To trigger the Website server after the connection request message is received, send carrying outlet routing to the client host and set The second notification packet of the IP address A1 ' and port numbers P1 ' of standby A.The connection at this time creates the source IP address of back message as A1, Source port number is P1, and purpose IP address is A2 ', destination slogan is P2 '.
Website client end obtains IP of the Exit Road by device A after the second notification packet of Website server transmission is received Address and port numbers send a connection by device A to Exit Road and create back message, and the connection at this time creates back message Source IP address is A2, port numbers P2, and purpose IP address is A1 ', destination slogan is P1 ';When outlet, routing device B receives this Connection create back message after, can learn automatically the source IP address carried in the message, purpose IP address, source port number and Destination slogan, and it is locally generated that source IP address is A2, source port number P2, purpose IP address A1 ', destination slogan are The NAT table item (i.e. the second NAT table item) of P1 ', the follow-up routing device B that exports can be from the NVR mono- according to the NAT table item The Exit Road of side carries out address conversion by the message of device A.
Back message is created when Exit Road receives the connection by device A, since Exit Road at this time in device A by having created The first NAT table item, therefore address conversion can be completed, the purpose IP address of the connection back message is converted to The destination interface of the connection back message is converted to P1, so as to be transparent to NVR by A1.
After website client end, which has sent the connection, creates back message, the Website server message can be noticed It has been sent that, since then, the connection between NVR and website client end, which creates, to be completed.The connection cross over public network, and due to Exit Road by Relevant NAT table item is created on device A and outlet routing device B, therefore the message carried in the connection can pass through The Exit Road of the NVR one sides by device A and the outlet routing device B of networking client one side, website client end and NVR it Between realize transparent transmission.
In the present embodiment, after the completion of the connection between NVR and website client end creates, NVR can will have been opened The IP address A1 and port numbers P1 is handed down to all IPC bound, and in locally release IP address A1 and port Number P1, all IPC that NVR is locally bound at this time share IP address A1 and port numbers P1.
Each IPC that NVR is locally bound after the IP address A1 and port numbers P1 that NVR issues is received, it is local with enabling IP Location A1 and port numbers P1 (not deleting original IP address and port numbers), and after the IP address A1 and port numbers P1 come into force, A response message is sent to NVR, NVR has noticed Website server IP address A1 and port numbers P1 after the response message is received It comes into force, the message carried at this time in the connection can pass through the Exit Road of the NVR one sides by device A and networking client one side Outlet routing device B, realize transparent transmission between website client end and IPC.
When Website server is learning IP address A1 and port numbers after coming into force on IPC, can report NVR respectively ties up The MAC Address for determining IPC is advertised to website client end, website client end get with after the MAC Address of each IPC of NVR bindings, after Continue as user IPC any by the links and accesses for clicking on the offer of website client end, one can be constructed and carry MAC forwarding marks Exit Road is sent to by device A with the remote access message of the MAC Address for the IPC to be accessed.
Wherein, what deserves to be explained is, the MAC can be forwarded mark and MAC by website client end when constructing message Address carries in heading to realize.For example, by the remote access message for exemplified by IP packet, website client end is constructing During message, it can include MAC by transforming outer layer IP structure by increasing one in the extended field of outer layer IP and turn The options of two fields of issue of bidding documents knowledge and MAC Address is realized.
It, can should according to the first NAT table item created when Exit Road is being received this and remotely accessed message by device A The purpose IP address of message is converted into A1, the destination slogan of the message is converted into P1, at this time due to IP address A1 and port Number P1 is handed down to IPC by NVR, therefore website client end can directly access IPC according to the IP address and port numbers.However, The IP address A1 and port numbers P1 is shared since the IPC bound with NVR is usually multiple, and with the IPC of NVR bindings, because This Exit Road after address conversion is carried out to the message, can determine whether MAC forwardings whether are carried in the message by device A Mark and MAC Address, if it is then Exit Road directly the message can be forwarded to by device A it is corresponding with the MAC Address IPC.
Certainly, if Exit Road is judged not carrying the MAC forwardings mark or Exit Road in the message by device A As device A for third party device due to the incompatible None- identified of equipment described in MAC forwarding mark when, local ARP can be inquired about Table checks for corresponding ARP entry;If it is, the message is forwarded to and the purpose MAC in the ARP entry Corresponding IPC;If not, ARP request Receive message MAC Address can be sent to the IPC that website client end to be accessed, so The message is forwarded to the IPC corresponding to the MAC Address got afterwards.
In the present embodiment, after IPC receives the remote access message from website client end, the long-range visit can be directed to Ask that message sends a back message to website client end, to complete the remote access for the IPC;For example, when user passes through During the video flowing of website client end remote on-demand IPC, IPC, can be with when receiving the remote access message from website client end Local video stream is given to website client end by back message.
It, can be according to the 2nd NAT of establishment after when outlet, routing device B receives the back message from the IPC List item, A2 is converted by the purpose IP address of the message, and the destination interface of the message is converted into P2, so as to by the message Website client end is transparent to, to complete the remote access for the IPC.
Above scheme is described with a specific application example and with reference to network environment below.
Refer to Fig. 3, it is assumed that the MAC Address of IPC1 is B8-CA-3A-AF-C3-01, and the MAC Address of IPC2 is B8-CA- The IP address that 3A-AF-C3-02, IPC1 and IPC2 are shared be 192.168.1.2, port numbers 80, by IPC dypass by device A Transformed IP address be 1.1.1.1, port numbers 10000;On routing device A there are source IP address be 192.168.1.2, Source port number is 80, purpose IP address 2.2.2.2, and destination slogan is 20000 NAT table item.
The IP address at website client end be 192.168.2.2, port numbers 8080;By website client end routing device The transformed IP address of B be 2.2.2.2, port numbers 20000;There are source IP address on routing device B to be 192.168.2.2, source port number 8080, purpose IP address 1.1.1.1, destination slogan are 10000 NAT table item
When realizing, website client end sends message to IPC1, when which reaches the routing device A of IPC sides, message Source IP address is 2.2.2.2, source port number 20000, purpose IP address 1.1.1.1, destination slogan 10000.Routing Device A inquires about NAT table, and there are the purpose IP address and destination interface of corresponding NAT table item, then routing device A conversions message Number, the purpose IP address of message is 192.168.1.2 after converting, destination slogan 80.
After address conversion, routing device A checks header option, and header option carries MAC forwarding marks, MAC Address is B8-CA-3A-AF-C3-01, and routing device A does not inquire about ARP table at this time, and message directly is sent to MAC Address is The IPC 1 of B8-CA-3A-AF-C3-01.
When IPC1 is to website client end back message, when which reaches the routing device B of website client end, message Source IP address for 1.1.1.1, source port number 10000, purpose IP address 2.2.2.2, destination slogan 20000.Road NAT table is inquired about by equipment B, there are the purpose IP address and destination of corresponding NAT table item, then routing device A conversions message Slogan, the purpose IP address of message is 192.168.2.2 after converting, destination slogan 8080.
After address conversion, the message is sent to IP address as 192.168.2.2 by routing device B at this time, and port numbers are 8080 website client end.The remote access for IPC1 is completed since then.
By the description of above example, it is visitor that the present invention program is negotiated by the NVR IPC bound with it Family end main frame provides the IP address and port numbers of remote access, and Website server is described according to the IP address and port numbers NVR and the client host establish connection, and after the completion of connection foundation, the IP address and port numbers are handed down to by NVR The IPC of the binding, and after the IP address and port numbers come into force on the IPC of the binding, it will by Website server The MAC Address of the IPC of the binding is advertised to the client host, and client host receives Website server notice After MAC Address, send carrying MAC forwardings mark to the outlet routing device of the NVR one sides and access the MAC Address of IPC Remotely access message so that the outlet routing device of the NVR one sides turns the message after the remote access message is received The corresponding IPC of the MAC Address is dealt into complete the remote access for the IPC.In the present invention program, due to passing through NVR Replace the connection that IPC is established between client host, and after connection is successfully established, will establish IP address when connecting and Port numbers are handed down to IPC, and subsequent clients end main frame can directly access IPC by the IP address and port numbers, even if so as to work as When Website server and NVR break down, client host will not be influenced and access IPC.
Meanwhile in the present invention, IPC need not coordinate Website server and website client end to realize the flow of passing through NAT, By NVR Website server and website client end is coordinated to realize that NAT is passed through, so as to can actively access IPC from website client end, Remote management is carried out to IPC;Moreover, because NVR substitutes the network connection between IPC foundation and website client end, then issue It establishes the IP address used during connection and port numbers and shares the IP address and port numbers to all IPC, all IPC, share one Network connection when accessing other IPC with NVR bindings so as to website client end, need not repeat NAT and pass through.
Fig. 4 is referred to, in a kind of illustrative embodiment, the present invention also proposes a kind of remote access system of IPC, The system comprises NVR, client host, Website server and several IPC bound with the NVR, the NVR and institutes It states IPC and supports ONVFI agreements, be also respectively arranged one in the system in NVR one sides and client host one side together When support the Exit Roads of two or three layers of forwarding by device A and outlet routing device B.Wherein:
NVR is used to consult to provide the first IP address and first of remote access for client host with the IPC of binding Port numbers;
It is the NVR and the client host that Website server, which is used for through first IP address and first end slogan, Between establish connection;
After the connection is established, NVR is further used for first IP address and first end slogan being handed down to described The IPC of binding, and after first IP address and first end slogan come into force on the IPC of the binding, pass through website service The MAC Address of the IPC of the binding is advertised to the client host by device;
Client host is used to send remote access message, the long-range visit to the outlet routing device of the NVR one sides Ask that message includes MAC forwardings mark and the MAC Address of IPC to be visited so that the outlet routing device of the NVR one sides exists After receiving the remote access message, when carrying MAC forwarding marks in judging the remote access message, by the message The corresponding IPC of the MAC Address is forwarded to complete the remote access for the IPC.
In the present embodiment, the Website server is further used for:
Receive the IPC access requests that client host is sent;Wherein described IPC access requests take for triggering the website Device be engaged in after the IPC access requests are received, the first notification packet is sent to NVR;First notification packet includes the visitor Outlet the second IP address of routing device and second end slogan of family end main frame one side;
The NVR is further used for:
Receive the first notification packet that the Website server is sent, to the client host one side Exit Road by setting Preparation send connection request to create message, and notices the Website server after the connection request to create message is sent, to touch It sends out Website server described and sends the second notification packet to the client host;Second notification packet includes NVR one sides Outlet the 3rd IP address of routing device and third port number;
The client host is further used for:
The second notification packet that the Website server is sent is received, is sent to the outlet routing device of the NVR one sides Connection creates back message, and is created in the connection after back message is sent and notice the Website server.
In the present embodiment, the source IP address of the connection request to create message is first IP address, source port number For the first end slogan, purpose IP address be second IP address, destination slogan is the second end slogan;The company The source IP address for connecing establishment back message is the IP address of client host, source port number is the port numbers of client host, mesh IP address be the 3rd IP address, destination slogan is the third port number;
In the present embodiment, the outlet routing device of the NVR one sides is further used for:
After the connection request to create message is received, create and be used to be from the outlet of the client host one side The message of routing device carries out the first NAT table item of address conversion;
The outlet routing device of the client host one side is further used for:
It creates and is used for as the outlet routing device from the NVR one sides after receiving the connection and creating back message Message carry out address conversion the second NAT table item.
In the present embodiment, the outlet routing device of the NVR one sides is further used for:
When receiving the remote access message that the client host is sent, according to the first NAT table item created Address conversion is carried out to the message, and judges MAC forwardings mark and MAC Address whether are carried in the message after address conversion; When carrying MAC forwardings mark and MAC Address in the message, which is forwarded to the corresponding IPC of the MAC Address;
The outlet routing device of the client host one side is further used for:
After the back message for the remote access message that the IPC is sent is received, according to having created After second NAT table item carries out address conversion to the message, which is forwarded to the client host, to complete the client End main frame is directed to the remote access of the IPC.
In the present embodiment, the outlet routing device of the NVR one sides is further used for:
When not carrying the MAC forwardings mark in the message after judging address conversion, ARP table is inquired about, is checked whether There are corresponding ARP entry;If so, the IPC corresponding to the message is forwarded to the purpose MAC in the ARP entry;Such as Fruit is no, sends ARP request Receive message MAC Address to the access IPC, which is forwarded to the MAC Address institute got Corresponding IPC.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention God and any modification, equivalent substitution, improvement and etc. within principle, done, should be included within the scope of protection of the invention.

Claims (4)

1. a kind of remote access method of web camera IPC, applied in video monitoring system, the video monitoring system bag Network hard disk video recorder NVR, client host, Website server and several IPC with NVR bindings, feature is included to exist In, including:
NVR and the IPC of binding consult to be used to provide the first IP address of remote access and first end slogan for client host;
Website server is established by first IP address and first end slogan between the NVR and the client host Connection;
After the connection is established, first IP address and first end slogan are handed down to the IPC of the binding by NVR, and After first IP address and first end slogan come into force on the IPC of the binding, by Website server by the binding The MAC Address of IPC is advertised to the client host;
Client host sends remote access message to the outlet routing device of the NVR one sides, described to remotely access in message Forward mark and the MAC Address of IPC to be visited including MAC so that the outlet routing device of the NVR one sides receive it is described After remotely accessing message, when carrying MAC forwarding marks in judging the remote access message, which is forwarded to institute The corresponding IPC of MAC Address is stated to complete the remote access for the IPC;
The Website server is by first IP address and first end slogan between the NVR and the client host Establishing connection includes:
Website server receives the IPC access requests that client host is sent;Wherein described IPC access requests are described for triggering Website server sends the first notification packet after the IPC access requests are received, to NVR;First notification packet includes Outlet the second IP address of routing device and second end slogan of the client host one side;
NVR receives the first notification packet that the Website server is sent, to the client host one side Exit Road by setting Preparation send connection request to create message, and notices the Website server after the connection request to create message is sent, to touch It sends out Website server described and sends the second notification packet to the client host;Second notification packet includes NVR one sides Outlet the 3rd IP address of routing device and third port number;
Client host receives the second notification packet that the Website server is sent, to the NVR one sides Exit Road by setting Preparation send connection to create back message, and is created in the connection after back message is sent and notice the Website server;
It is described connection request to create message source IP address be first IP address, source port number be the first end slogan, Purpose IP address is second IP address, destination slogan is the second end slogan;The connection creates back message Source IP address is the IP address of client host, source port number is the port numbers of client host, purpose IP address is described Three IP address, destination slogan are the third port number;
The method further includes:
The outlet routing device of NVR one sides creates after the connection request to create message is received and is used to be from the visitor The message of the outlet routing device of family end main frame one side carries out the first NAT table item of address conversion;
The outlet routing device of client host one side receive it is described connection create back message after create be used for be from The message of the outlet routing device of the NVR one sides carries out the second NAT table item of address conversion;
The outlet routing device of the NVR one sides is judging the remote access report after the remote access message is received When MAC forwarding marks are carried in text, which is forwarded to the corresponding IPC of the MAC Address to complete for the remote of the IPC Journey access includes:
The outlet routing device of the NVR one sides is when receiving the remote access message that the client host is sent, according to The the first NAT table item created carries out address conversion to the message, and judges whether carry MAC in the message after address conversion Forwarding mark and MAC Address;When carrying MAC forwardings mark and MAC Address in the message, which is forwarded to described The corresponding IPC of MAC Address;
The outlet routing device of the client host one side is receiving that the IPC sends for the remote access message After back message, after carrying out address conversion to the message according to the second NAT table item created, which is forwarded to institute Client host is stated, to complete the remote access that the client host is directed to the IPC.
2. the method as described in claim 1, which is characterized in that the method further includes:
The MAC forwardings mark is not carried in message after the outlet routing device of the NVR one sides judges address conversion When, ARP table is inquired about, checks for corresponding ARP entry;If so, by the message be forwarded to in the ARP entry IPC corresponding to purpose MAC;If not, sending ARP request Receive message MAC Address to the access IPC, which is turned It is dealt into the IPC corresponding to the MAC Address got.
3. a kind of remote access system of IPC, the system comprises NVR, client host, Website server and with it is described Several IPC of NVR bindings, it is characterised in that:
NVR is used to consult to provide the first IP address and first port of remote access for client host with the IPC of binding Number;
Website server is used for through first IP address and first end slogan between the NVR and the client host Establish connection;
After the connection is established, NVR is further used for first IP address and first end slogan being handed down to the binding IPC, and after first IP address and first end slogan come into force on the IPC of the binding, passing through Website server will The MAC Address of the IPC of the binding is advertised to the client host;
Client host is used to send remote access message, the remote access report to the outlet routing device of the NVR one sides Text includes MAC forwardings mark and the MAC Address of IPC to be visited so that the outlet routing device of the NVR one sides is receiving After the remote access message, when carrying MAC forwarding marks in judging the remote access message, which is forwarded To the corresponding IPC of the MAC Address to complete the remote access for the IPC;
The Website server is further used for:
Receive the IPC access requests that client host is sent;Wherein described IPC access requests are used to trigger the Website server After the IPC access requests are received, the first notification packet is sent to NVR;First notification packet includes the client Outlet the second IP address of routing device and second end slogan of host one side;
The NVR is further used for:
The first notification packet that the Website server is sent is received, to the outlet routing device hair of the client host one side Connection request to create message is sent, and the Website server is noticed after the connection request to create message is sent, to trigger It states Website server and sends the second notification packet to the client host;Second notification packet includes going out for NVR one sides Mouth the 3rd IP address of routing device and third port number;
The client host is further used for:
The second notification packet that the Website server is sent is received, connection is sent to the outlet routing device of the NVR one sides Back message is created, and is created in the connection after back message is sent and notices the Website server;
It is described connection request to create message source IP address be first IP address, source port number be the first end slogan, Purpose IP address is second IP address, destination slogan is the second end slogan;The connection creates back message Source IP address is the IP address of client host, source port number is the port numbers of client host, purpose IP address is described Three IP address, destination slogan are the third port number;
The outlet routing device of the NVR one sides is used for:
Receive it is described connection request to create message after, create be used for for the Exit Road from the client host one side by The message of equipment carries out the first NAT table item of address conversion;
The outlet routing device of the client host one side is used for:
The report being used for as the outlet routing device from the NVR one sides is created after receiving the connection and creating back message Text carries out the second NAT table item of address conversion;
The outlet routing device of the NVR one sides is further used for:
When receiving the remote access message that the client host is sent, according to the first NAT table item created to this Message carries out address conversion, and judges MAC forwardings mark and MAC Address whether are carried in the message after address conversion;When this When MAC forwardings mark and MAC Address are carried in message, which is forwarded to the corresponding IPC of the MAC Address;
The outlet routing device of the client host one side is further used for:
After the back message for the remote access message that the IPC is sent is received, according to described second created After NAT table item carries out address conversion to the message, which is forwarded to the client host, to complete the client master Remote access of the eedle to the IPC.
4. system as claimed in claim 3, which is characterized in that the outlet routing device of the NVR one sides is further used for:
When not carrying the MAC forwardings mark in the message after judging address conversion, ARP table is inquired about, is checked for Corresponding ARP entry;If so, the IPC corresponding to the message is forwarded to the purpose MAC in the ARP entry;If It is no, ARP request Receive message MAC Address is sent to the access IPC, it is right which is forwarded to the MAC Address institute got The IPC answered.
CN201410839822.9A 2014-12-29 2014-12-29 The remote access method and system of a kind of IPC Active CN104539902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410839822.9A CN104539902B (en) 2014-12-29 2014-12-29 The remote access method and system of a kind of IPC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410839822.9A CN104539902B (en) 2014-12-29 2014-12-29 The remote access method and system of a kind of IPC

Publications (2)

Publication Number Publication Date
CN104539902A CN104539902A (en) 2015-04-22
CN104539902B true CN104539902B (en) 2018-06-05

Family

ID=52855361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410839822.9A Active CN104539902B (en) 2014-12-29 2014-12-29 The remote access method and system of a kind of IPC

Country Status (1)

Country Link
CN (1) CN104539902B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104883547B (en) * 2015-06-16 2019-04-12 浙江宇视科技有限公司 Method and NVR based on network access equipment physical port access IPC
CN105656680B (en) * 2016-01-29 2019-12-13 浙江宇视科技有限公司 Network camera control method and device
CN105979405A (en) * 2016-06-24 2016-09-28 浙江宇视科技有限公司 Method and device for accessing video device
CN111163040B (en) * 2018-11-08 2022-06-14 浙江宇视科技有限公司 Renegotiated session reestablishment method and device
CN110557563B (en) * 2019-08-05 2021-03-26 深圳市天视通电子科技有限公司 Remote communication method and system for network camera
CN111432151B (en) * 2020-01-20 2022-08-23 杭州海康威视数字技术股份有限公司 Video data storage method, device, equipment and storage medium
CN113612861B (en) * 2021-10-08 2022-01-11 深圳鼎信通达股份有限公司 Remote access method, system and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552804A (en) * 2008-12-22 2009-10-07 北京大学深圳研究生院 Network video distribution system and network video access method thereof
CN102811174A (en) * 2012-07-30 2012-12-05 浙江宇视科技有限公司 Method for processing monitor service and network video recorder (NVR)
CN104010052A (en) * 2014-06-11 2014-08-27 浙江宇视科技有限公司 UPnP-based media connecting method in monitoring system
CN104104926A (en) * 2014-07-30 2014-10-15 浙江宇视科技有限公司 Universal plug and play (UPnP) monitoring terminal access method and access device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4726190B2 (en) * 2004-08-09 2011-07-20 株式会社メガチップス Network camera, DDNS server, and video distribution system
KR100847999B1 (en) * 2006-06-30 2008-07-23 포스데이타 주식회사 DVR Server and Method for controlling accessing monitering device in Network based Digital Video Record System

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552804A (en) * 2008-12-22 2009-10-07 北京大学深圳研究生院 Network video distribution system and network video access method thereof
CN102811174A (en) * 2012-07-30 2012-12-05 浙江宇视科技有限公司 Method for processing monitor service and network video recorder (NVR)
CN104010052A (en) * 2014-06-11 2014-08-27 浙江宇视科技有限公司 UPnP-based media connecting method in monitoring system
CN104104926A (en) * 2014-07-30 2014-10-15 浙江宇视科技有限公司 Universal plug and play (UPnP) monitoring terminal access method and access device

Also Published As

Publication number Publication date
CN104539902A (en) 2015-04-22

Similar Documents

Publication Publication Date Title
CN104539902B (en) The remote access method and system of a kind of IPC
CN106533883B (en) A kind of method for building up, the apparatus and system of network special line
CN101252509B (en) Application of dual-NAT method in packet data processing and routing of dynamic virtual private network (VPN)
JP5333263B2 (en) Access control system and access control method
CN102368764B (en) A kind of method, system and client communicated by multi-point login
US10454880B2 (en) IP packet processing method and apparatus, and network system
US8631087B2 (en) Information processing server, remote control system, and remote control method using a tunnel to determine a service on another network and executing the service without using the tunnel
CN110098947A (en) A kind of dispositions method of application, equipment and system
US20100257226A1 (en) Communication module and application program provided with same
CN106899500B (en) Message processing method and device for cross-virtual extensible local area network
CN102055816A (en) Communication method, business server, intermediate equipment, terminal and communication system
CN103997479B (en) A kind of asymmetric services IP Proxy Methods and equipment
CN107547665A (en) A kind of method, equipment and the system of dhcp address distribution
CN107659930A (en) A kind of AP connection control methods and device
CN104519077A (en) Multimedia sharing method, registration method, server and proxy server
CN104168302B (en) Equipment manipulation implementation method, system and proxy gateway
CN109246016A (en) Message processing method and device across VXLAN
CN103269300A (en) Method and equipment for achieving heterogeneous network interconnection
JP2009105831A (en) Call control system, terminal, call control method, and call control program
CN101068211B (en) Point-to-point flow optimizing method and system
CN104468543A (en) Method and device for accessing devices in local area network
CN101309154B (en) Datagram sending method, sending apparatus and transmission system
CN106101201A (en) Based on the expansible Anycast method and system redirected and rewrite in a kind of NDN
CN104144230A (en) Simple method and device for binding monitoring terminals
CN101453396B (en) Method and system for multiple service provider device management

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant