Background technology
IPC is the abbreviation of IP Camera, i.e. web camera, it is one kind by traditional cameras and network technology knot
Video camera of new generation caused by conjunction, it is the equipment being composed of network code module and analog video camera.Wherein, network
The analog video signal coding that analog video camera collects is compressed into digital signal by coding module, so as to be directly accessed net
Network exchanges and routing device, and passes through network-bus and be transmitted to Web server.Therefore, user can be directly with browsing on network
Camera review on device viewing Web server, authorized user can also control the action of camera pan-tilt camera lens or to systems
Configuration is operated.
Compared with traditional cameras, network shooting function more simply realizes monitoring particularly remote monitoring, more easily
It is constructed and is safeguarded, and possess stronger advantage in terms of audio is supported, support alarm linkage, additionally it is possible to be deposited for greater flexibility
Storage video recording, while more rich product selection, the video effect of more high definition and more perfect monitoring management are provided.
Web camera also has networking output interface in addition to having common composite video signal output interface BNC, can be straight
It connects and video camera is accessed into local area network.In addition, IPC support WiFi wireless access, 3G accesses, POE power supplies (network power supply) and
Intelligent acess.
In recent years, with computer, network and image procossing, the rapid development of transmission technology, the popularization of video monitoring
Change trend is more and more apparent, and the LAN video monitoring demand of family or SME users increasingly increase.Due to network shooting
Equipment becomes the important component of video monitoring system for a variety of advantages, the equipment.
In video monitoring system, it is necessary to be replaced to IPC equipment due to equipment fault, HardwareUpgring etc..Mesh
After preceding replacement IPC, the method that is configured mainly has following two:
1st, manually make a copy of, manual configuration method:The title and value of configuration item are manually made a copy of from former IPC, and after replacement
It is configured on IPC.The disadvantages of this method is, in operating process, operating procedure is more, error-prone, the configuration operating time is long.
2nd, configuration file export, reduction method:Configuration personnel operate " export configuration file " on former IPC, by configuration file
It is saved on the machine PC, then on the IPC after replacement, carries out " reduction configuration file " operation, configuration file is reduced.
The disadvantages of this method is that operating process is complicated, and needs connection at least two, it is necessary to be exported using PC, restoring operation
IPC equipment.
The content of the invention
In view of this, it is an object of the invention to overcome the deficiencies of the prior art and provide a kind of based on the automatic of LAN
The method of recovery configuring file.
In order to achieve the above object, the present invention adopts the following technical scheme that:
The method of automatic recovery configuring file based on LAN, this method are preserved using the miscellaneous equipment in LAN
Configuration information enables the new equipment after replacement to read configuration information automatically;This method comprises the following steps:
S1:First equipment starts the function of sending configuration file, and communication connection is established between the second equipment;
S2:The configuration information that first equipment reads the machine forms configuration file, and configuration file is sent to the second equipment
It is preserved;
S3:3rd equipment starts the function of recovery configuring, and communication connection is established between the second equipment;
S4:Second equipment sends the configuration file of the first equipment to the 3rd equipment;
S5:3rd equipment reduces corresponding configuration information according to configuration file;
Wherein, first equipment, second equipment and the 3rd equipment are to be connected in same LAN
Electronic equipment.
First equipment includes at least configuration sending module, search module and configuration storage module;
Second equipment includes at least configuration receiving module, search responder module and configuration storage module;
3rd equipment includes at least configuration sending module, search module, configuration recovery module and configuration storage module.
Further, the step S1 is specifically included:
S101:By the first equipment of pc access in LAN, and assign the instruction for sending configuration file;
S102:The search module of first equipment starts, and sends search message to LAN;
S103:After the search responder module of second equipment receives search message, the IP address of itself is sent to first and is set
It is standby;
S104:The configuration sending module of first equipment is connected to the configuration receiving module of the second equipment.
In the step S102, the search module of the first equipment sends search message using UDP multicast protocols to LAN;
In the step S103, the search responder module of the second equipment carries out response using UDP multicast modes.
Further, the step S2 is specifically included:
S201:The configuration sending module of first equipment reads the configuration information of the machine from configuration storage module, and generates and match somebody with somebody
Put file;
S202:The configuration sending module configuration file of first equipment is sent to the configuration receiving module of the second equipment;
S203:The configuration storage module of second equipment preserves configuration file, and is the first equipment by its origin marking.
It is further included after the step S203:
The configuration receiving module of second equipment is sent to the configuration sending module of the first equipment by result is preserved.
Further, the step S3 is specifically included:
S301:The configuration recovery module of 3rd equipment calls configuration storage module, attempts to read the configuration information of the machine;
S302:The information of " configuration file is not present " is returned to configuration reduction mould by the configuration storage module of the 3rd equipment
Block;
S303:The configuration recovery module of 3rd equipment calls search module to carry out LanExplorer;
S304:Configuration sending module the second equipment of connection of 3rd equipment matches somebody with somebody receiving module.
The step S304 is specifically included:
The search responder module of second equipment responds the 3rd equipment;
Response message is returned to configuration recovery module by the search module of the 3rd equipment;
The configuration recovery module of 3rd equipment calls configuration sending module, sends and connects to the configuration receiving module of the second equipment
Connect request;
The configuration receiving module of second equipment receives the connection request of the 3rd equipment.
Further, the step S4 is specifically included:
S401:Configuration receiving module request of the configuration sending module of 3rd equipment to the second equipment receives configuration information;
S402:The configuration receiving module of second equipment returns to the configuration file of the first equipment to the 3rd equipment;
S403:The configuration sending module of 3rd equipment receives configuration file, and calls configuration storage module storage configuration
File.
Further, the step S5 is specifically included:
S501:The configuration storage module of 3rd equipment preserves configuration file in the machine, and feeds back to the 3rd by result is preserved
The configuration recovery module of equipment;
S502:The configuration recovery module of 3rd equipment reduces the configuration information in configuration file in the 3rd equipment.
Scene of the system suitable for carrying out equipment replacement IP LANs, realizes one kind by local same type
IPC equipment carries out the technology of configuration exchange.The present invention replaces web camera in a local network using above technical scheme
(IPC) after, the IPC after replacement can be automatically configured, greatly reduces configuration work amount, add configuration process
Convenience;The manual steps quantity in configuration process can be substantially reduced, the probability of configuration process error is reduced, greatlys save
Setup time.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, technical scheme will be carried out below
Detailed description.Obviously, described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art are obtained all on the premise of creative work is not made
Other embodiment belongs to the scope that the present invention is protected.
As shown in Figure 1, the present invention provides the method for the automatic recovery configuring file based on LAN, this method utilizes office
Miscellaneous equipment in the net of domain preserves configuration information, so that the new equipment after replacement is read configuration information automatically;This method bag
Include following steps:
S1:First equipment starts the function of sending configuration file, and communication connection is established between the second equipment;
S2:The configuration information that first equipment reads the machine forms configuration file, and configuration file is sent to the second equipment
It is preserved;
S3:3rd equipment starts the function of recovery configuring, and communication connection is established between the second equipment;
S4:Second equipment sends the configuration file of the first equipment to the 3rd equipment;
S5:3rd equipment reduces corresponding configuration information according to configuration file;
Wherein, first equipment, second equipment and the 3rd equipment are to be connected in same LAN
Electronic equipment.
First equipment includes at least configuration sending module, search module and configuration storage module;
Second equipment includes at least configuration receiving module, search responder module and configuration storage module;
3rd equipment includes at least configuration sending module, search module, configuration recovery module and configuration storage module.
Further, the step S1 is specifically included:
S101:By the first equipment of pc access in LAN, and assign the instruction for sending configuration file;
S102:The search module of first equipment starts, and sends search message to LAN;
S103:After the search responder module of second equipment receives search message, the IP address of itself is sent to first and is set
It is standby;
S104:The configuration sending module of first equipment is connected to the configuration receiving module of the second equipment.
In the step S102, the search module of the first equipment sends search message using UDP multicast protocols to LAN;
In the step S103, the search responder module of the second equipment carries out response using UDP multicast modes.
Further, the step S2 is specifically included:
S201:The configuration sending module of first equipment reads the configuration information of the machine from configuration storage module, and generates and match somebody with somebody
Put file;
S202:The configuration sending module configuration file of first equipment is sent to the configuration receiving module of the second equipment;
S203:The configuration storage module of second equipment preserves configuration file, and is the first equipment by its origin marking.
It is further included after the step S203:
The configuration receiving module of second equipment is sent to the configuration sending module of the first equipment by result is preserved.
Further, the step S3 is specifically included:
S301:The configuration recovery module of 3rd equipment calls configuration storage module, attempts to read the configuration information of the machine;
S302:The information of " configuration file is not present " is returned to configuration reduction mould by the configuration storage module of the 3rd equipment
Block;
S303:The configuration recovery module of 3rd equipment calls search module to carry out LanExplorer;
S304:Configuration sending module the second equipment of connection of 3rd equipment matches somebody with somebody receiving module.
The step S304 is specifically included:
The search responder module of second equipment responds the 3rd equipment;
Response message is returned to configuration recovery module by the search module of the 3rd equipment;
The configuration recovery module of 3rd equipment calls configuration sending module, sends and connects to the configuration receiving module of the second equipment
Connect request;
The configuration receiving module of second equipment receives the connection request of the 3rd equipment.
Further, the step S4 is specifically included:
S401:Configuration receiving module request of the configuration sending module of 3rd equipment to the second equipment receives configuration information;
S402:The configuration receiving module of second equipment returns to the configuration file of the first equipment to the 3rd equipment;
S403:The configuration sending module of 3rd equipment receives configuration file, and calls configuration storage module storage configuration
File.
Further, the step S5 is specifically included:
S501:The configuration storage module of 3rd equipment preserves configuration file in the machine, and feeds back to the 3rd by result is preserved
The configuration recovery module of equipment;
S502:The configuration recovery module of 3rd equipment reduces the configuration information in configuration file in the 3rd equipment.
For this patent is described in further detail, expansion explanation is carried out using IPC equipment as specific embodiment below.
The system that the present invention is applied includes:Access the PC machine in same LAN and multiple IPC equipment.Wherein,
Each IPC equipment includes:Configuration transmission interface, configuration sending module, configuration receiving module, IPC search modules, IPC are searched
Rope responder module, configuration storage module, configuration recovery module.
Preparation stage:
(1) A, B are the IPC equipment of connection in a local network, and in energization working condition;
(2) C is IPC equipment to be replaced, is not connected with LAN unpowered state;
(3) the IPC search responder modules of A, B are in listening state, and the IPC in LAN is monitored using UDP multicast protocols
Search message;
(4) the configuration receiving module of A, B using Transmission Control Protocol, monitors TCP18004 ports;
As shown in Fig. 2, the specific operation process of the present embodiment is as follows:
01st, operator is on LAN PC, and using browser, the configuration for accessing IPC to be replaced (A) sends interface;
02nd, operator is sent in configuration on interface, operates " transmission configuration file " function;
03rd, the configuration of IPC (A) sends interface, calls the transmission configuration file function of configuration sending module;
04th, the configuration sending module of IPC (A) calls the LAN IP C functions of search of IPC search modules;
05th, the IPC search modules of IPC (A) send IPC search messages using UDP multicast protocols to LAN;
06th, after the search responder module of IPC (B) receives IPC search messages, response is carried out using UDP multicast modes, it will be certainly
The IP address of body is sent to IPC (A);
07th, the IPC search modules of IPC (A), the configuration that the information of the IPC received (B) is returned to IPC (A) send mould
Block;
08th, the configuration sending module of IPC (A), 18004 ports of connection IPC (B);
09th, the configuration sending module of IPC (A) by the configuration storage module of IPC (A), reads the configuration information of the machine;
10th, the configuration storage module of IPC (A) by the configuration information of preservation, returns to configuration sending module;
The configuration file of IPC (A) is sent to matching somebody with somebody for IPC (B) by the 11st, the configuration sending module of IPC (A) by TCP connection
Put receiving module;
12nd, after the configuration receiving module of IPC (B) receives the configuration information of IPC (A), the configuration storage module of the machine is called,
It is preserved, and is A by its origin marking;
13rd, preservation result is sent to the configuration sending module of IPC (A) by the configuration receiving module of IPC (B);
14th, after the configuration sending module of IPC (A) receives result, return result to configuration and send interface;
15th, the configuration of IPC (A) sends interface, and user is prompted to send success;
16th, operator disconnects IPC (A) from LAN;
17th, IPC (C) is powered by operator, and is connected to LAN, and IPC (C) obtains one by LAN DHCP protocol
Interim IP address;
18th, IPC (C) configures recovery module when system starts by starting;
19th, the configuration recovery module of IPC (C) calls the configuration storage module of IPC (C), and that attempts reading the machine matches somebody with somebody confidence
Breath;
The information of " configuration file is not present " is returned to configuration recovery module by the 20th, configuration storage module of IPC (C);
21st, the configuration recovery module of IPC (C) is initially configured reduction process;
22nd, the configuration recovery module of IPC (C) calls the LAN IP C functions of search of IPC search modules;
23rd, the search responder module of IPC (B) carries out response;
24th, the information of IPC (B) is returned to the configuration recovery module of IPC (C) by the IPC search modules of IPC (C);
25th, the configuration recovery module of IPC (C) calls the configuration sending module of IPC (C);
26th, the configuration receiving module of the configuration sending module connection IPC (B) of IPC (C);
27th, the configuration receiving module of IPC (B) receives the connection request of IPC (C);
28th, configuration receiving module request of the configuration sending module of IPC (C) to IPC (B) receives configuration;
29th, the configuration receiving module of IPC (B) returns to the configuration information of IPC (A) to IPC (C);
30th, the configuration sending module of IPC (C) receives configuration information, and calls configuration storage module, storage configuration letter
Breath;
31st, the configuration storage module of IPC (C) preserves configuration information in the machine;
32nd, the configuration storage module of IPC (C) returns result to the configuration recovery module of IPC (C);
33rd, the configuration recovery module of IPC (C) is to IPC (C) application configuration information.
34th, complete.
It should be noted that the present invention is applicable not only to carry out the scene of equipment replacement in IP LANs, can also answer
It uses on other lan devices.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.