Summary of the invention
The invention provides a kind of method for processing business and equipment of distributed network, to realize the load balancing of management server.
In order to achieve the above object, the invention provides a kind of method for processing business of distributed network, be applied to comprise in the supervisory control system of video management VM server of terminal equipment, database server and a plurality of distributed deployments, on each VM server, dispose services addresses and management address, services addresses between described a plurality of VM server is identical, and the management address between described a plurality of VM server is different, configuration information and the state information of described database server for storing described terminal equipment; The method comprises the following steps:
VM server is determined and need to be processed the business of described terminal equipment;
The management address of described VM server by utilizing self obtains the configuration information that described terminal equipment is corresponding from described database server, and utilizes described configuration information to process the business of described terminal equipment; Or described VM server is processed the business of described terminal equipment, and utilize the management address of self to store the state information in business procession into described database server.
When terminal equipment utilizes described services addresses to initiate registration, VM server is determined and need to be processed the registration business of described terminal equipment;
Described VM server is processed the business of described terminal equipment, and utilize the management address of self to store the state information in business procession into described database server, comprise: with the described VM server that described terminal equipment route is nearest, described terminal equipment is registered, and store the log-on message of described terminal equipment into described database server, by described database server, record the corresponding relation between the information of described terminal equipment and the management address of registration VM server.
Described method further comprises: on the router adjacent with VM server, be configured to the static routing of described services addresses, and when described terminal equipment utilizes described services addresses to initiate registration, the router adjacent with VM server sends to the log-on message of described terminal equipment on the described VM server nearest with described terminal equipment route described terminal equipment registered.
After VM server determines that terminal equipment succeeds in registration, VM server is determined and need to be processed the configuration distributing business of described terminal equipment;
The management address of described VM server by utilizing self obtains the configuration information that described terminal equipment is corresponding from described database server, and utilize described configuration information to process the business of described terminal equipment, comprise: described VM server obtains the service configuration information that described terminal equipment is corresponding from described database server, and service configuration information corresponding to described terminal equipment is issued to described terminal equipment.
Service configuration information to terminal equipment on VM server is modified, and described VM server is updated to amended service configuration information after described database server, described VM server determine need to the configuration modification of described terminal equipment more new business process;
The management address of described VM server by utilizing self obtains the configuration information that described terminal equipment is corresponding from described database server, and utilize described configuration information to process the business of described terminal equipment, comprise: described VM server reads amended service configuration information from described database server, and amended service configuration information is issued to described terminal equipment, indicate described terminal equipment to upgrade the service configuration information of self.
At VM server, receive after the live service request that terminal equipment is corresponding, described VM server is determined and need to be processed the live business of described terminal equipment;
Described VM server is processed the business of described terminal equipment, and utilize the management address of self to store the state information in business procession into described database server, comprise: described in described VM server triggers, terminal equipment carries out live business, and stores the information of the live business in business procession into described database server.
VM server in user's request stores round cut plan information into described database server, and notify after the VM startup of server round cut business that need to process the round cut business of terminal equipment, receive definite need to the processing the round cut business of described terminal equipment of VM server that starts round cut service announcements;
The management address of described VM server by utilizing self obtains the configuration information that described terminal equipment is corresponding from described database server, and utilize described configuration information to process the business of described terminal equipment, comprise: the VM server that receives startup round cut service announcements obtains the round cut plan information of described round cut business from described database server, and by described round cut plan information, triggers described terminal equipment and carry out round cut business.
Registration VM server at terminal equipment to self sends a warning message, and the registration VM server of described terminal equipment stores described warning information after described database server into, need the registration VM server of the terminal equipment of receiving alarm information to determine and need to process the alarm business of described terminal equipment;
The management address of described VM server by utilizing self obtains the configuration information that described terminal equipment is corresponding from described database server, and utilize described configuration information to process the business of described terminal equipment, comprise: need the registration VM server of the terminal equipment of receiving alarm information from described database server, to obtain described warning information, and described warning information is issued to the described terminal equipment that needs receiving alarm information.
A kind of video management VM server, be applied to comprise in the supervisory control system of VM server of terminal equipment, database server and a plurality of distributed deployments, on each VM server, dispose services addresses and management address, services addresses between described a plurality of VM server is identical, and the management address between described a plurality of VM server is different, configuration information and the state information of described database server for storing described terminal equipment; This VM server comprises:
Determination module, need to process the business of described terminal equipment for determining;
Processing module, for utilizing the management address of self to obtain from described database server the configuration information that described terminal equipment is corresponding, and utilizes described configuration information to process the business of described terminal equipment; Or, the business of described terminal equipment is processed, and is utilized the management address of self to store the state information in business procession into described database server.
Described determination module, when utilizing described services addresses to initiate registration at terminal equipment, determines and need to process the registration business of described terminal equipment;
Described processing module, specifically for described terminal equipment is registered, and store the log-on message of described terminal equipment into described database server, by described database server, record the corresponding relation between the information of described terminal equipment and the management address of registration VM server.
Described determination module, after succeeding in registration at definite terminal equipment, determines and need to process the configuration distributing business of described terminal equipment;
Described processing module, specifically for obtain the service configuration information that described terminal equipment is corresponding from described database server, is issued to described terminal equipment by service configuration information corresponding to described terminal equipment.
Described determination module, specifically for modifying at the service configuration information to terminal equipment, and is updated to amended service configuration information after described database server, determine need to the configuration modification of described terminal equipment more new business process;
Described processing module, specifically for read amended service configuration information from described database server, and is issued to described terminal equipment by amended service configuration information, indicates described terminal equipment to upgrade the service configuration information of self.
Described determination module, specifically for after receiving the live service request that terminal equipment is corresponding, determines and need to process the live business of described terminal equipment;
Described processing module, carries out live business specifically for triggering described terminal equipment, and stores the information of the live business in business procession into described database server.
Described determination module, specifically for the VM server in user's request, store round cut plan information into described database server, and notify after the VM startup of server round cut business that need to process the round cut business of terminal equipment, determine and need to process the round cut business of described terminal equipment;
Described processing module, specifically for obtain the round cut plan information of described round cut business from described database server, and triggers described terminal equipment by described round cut plan information and carries out round cut business.
Described determination module, specifically at terminal equipment, the registration VM server to self sends a warning message, and the registration VM server of described terminal equipment stores described warning information after described database server into, determine and need to process the alarm business of described terminal equipment;
Described processing module, specifically for obtain described warning information from described database server, and is issued to the described terminal equipment that needs receiving alarm information by described warning information.
Compared with prior art, the present invention at least has the following advantages: separated by the service management service of management server and database service are carried out, and make the management scale expansion of the management server of the whole network, and realize the load balancing of management server.
Embodiment
The present invention proposes a kind of method for processing business of distributed network, to realize the multiple spot access of VM server and the load balancing of flexible management.The application scenarios schematic diagram of video monitoring system as shown in Figure 2, the method is applied to comprise in the supervisory control system of VM server of terminal equipment, database server and a plurality of distributed deployments; This terminal equipment is other equipment outside VM server in supervisory control system, as terminal equipments such as EC, DC, DM server, MS server and VC.
On current management server (being current VM server), need to realize service management service (for business is managed) and database service (for storing relevant information), in the present invention, service management service on management server is carried out separated with database service, by VM server, only process business management service, and served by a database server process database.
In the present invention, the deployment way of VM server is distributed deployment, and in network, dispose a plurality of VM servers (VM server distribution formula is deployed in regional), and use the services addresses thought separated with management address that the VM server of a plurality of different geographicals is invented to a VMG (VM Group, VM group); On each VM server, dispose services addresses (service IP address) and management address (management ip address), the services addresses between a plurality of VM servers is identical, and the management address between a plurality of VM server is different; For convenience of description, the common services addresses of a plurality of VM servers is called to VMG IP address, and a plurality of VM servers management address is separately called to VM IP address.
In the present invention, also be deployed with a database server (as disposed database server in central area), this database server is for storing configuration information and the state information of all terminal equipments of regional, and each VM server can directly be communicated with database server by network.
In the present invention, the static routing of disposing services addresses on the router adjacent with VM server, and the router adjacent with VM server needs this route to release, each terminal equipment can receive this route, and when initiating registration, utilize this services addresses to initiate registration (by the mode of route automatic addressing, only need to connect the services addresses of VM server during terminal equipment registration login); Afterwards, the router adjacent with VM server can directly send to the log-on message of terminal equipment on the VM server nearest with terminal equipment route terminal equipment is registered, thereby realizes the load balancing of management service.
Concrete, on the router being connected with each VM server, configure the static host route of VMG IP address, and be published in whole network, on router, start static routing automatic monitoring function, to guarantee the accessibility of this static host route simultaneously.Afterwards, owing to all having issued the routing iinformation of identical VMG IP address on a plurality of routers direct-connected with VM server, therefore go-between can be determined by routing algorithm the optimum route of this VMG IP address, the log-on message of terminal equipment can be sent on the VM server nearest with terminal equipment route.
For example, for the terminal equipment in region 3, on the router that EC is connected with VC, for the VMG IP address of VM server, its routing iinformation is to point to VM-3's.Therefore for the EC in region 3 and VC, the message that EC and VC are sent to VMG IP address can be routed device and be transmitted to VM-3.
Based on above-mentioned networking situation, as shown in Figure 3, this method for processing business comprises the following steps:
Step 301, VM server is determined and need to be processed the business of terminal equipment.This VM server is the follow-up VM server that need to initiate business, according to different business, has different situations.
Step 302, the management address of VM server by utilizing self obtains the configuration information that terminal equipment is corresponding from database server, and utilizes configuration information to process the business of terminal equipment; Or VM server is processed the business of terminal equipment, and utilize the management address of self to store the state information in business procession into database server.
It should be noted that configuration information and state information are different information according to different business; Utilize the management address that self management address is by self to send relevant information to database server.
Below in conjunction with concrete business, step 301 and step 302 are elaborated.
(1) registration business.
In step 301, when terminal equipment utilizes services addresses to initiate registration, VM server is definite need to be processed the registration business of terminal equipment, and the registration VM server that this VM server is terminal equipment, is the VM server nearest with terminal equipment route.
In step 302, for VM server is processed the business of terminal equipment, and utilize the management address of self to store the state information in business procession into database server, specifically comprise: with the VM server that terminal equipment route is nearest, terminal equipment is registered, and store the log-on message of terminal equipment (being state information) into database server, by database server, record the corresponding relation between the information (sign of terminal equipment and the address information of terminal equipment) of terminal equipment and the management address of registration VM server.
It should be noted that, on database server, need terminal equipment to be registered in the enterprising line item of which VM server, as shown in table 1, be a kind of record case.
Table 1
Terminal iidentification |
Terminal address |
Registration VM server address |
EC1101 |
192.168.2.2 |
VM-1IP |
DC1001 |
192.168.10.5 |
VM-2IP |
XP Client |
192.168.100.20 |
VM-3IP |
Take the application scenarios shown in Fig. 2 as example, when EC1 utilizes services addresses to initiate registration, determine and need to process to the registration business of EC1 (being that EC1 is registered on VM-1) with the nearest VM server VM-1 of EC1 route, and utilize the management address VM-1IP of self to store EC1 log-on message (registration status information) into database server.
(2) configuration distributing business.
In step 301, after VM server determines that terminal equipment succeeds in registration, VM server is definite need to be processed the configuration distributing business of terminal equipment, and the registration VM server that this VM server is terminal equipment, is the VM server nearest with terminal equipment route.
In step 302, for the management address of VM server by utilizing self obtains the configuration information that terminal equipment is corresponding from database server, and utilize configuration information to process the business of terminal equipment, specifically comprise: VM server obtains the service configuration information that terminal equipment is corresponding (being configuration information) from database server, and service configuration information corresponding to terminal equipment is issued to terminal equipment.
Take the application scenarios shown in Fig. 2 as example, after EC1 succeeds in registration, the service configuration information of EC1 in registration VM server VM-1 reading database server corresponding to EC1, and this service configuration information is issued on EC1.
(3) configuration modification new business more.
In step 301, service configuration information to terminal equipment on VM server is modified, and VM server is updated to amended service configuration information after database server, VM server determine need to the configuration modification of terminal equipment more new business process, the VM server of this VM server for the service configuration information of terminal equipment is modified.
In step 302, for the management address of VM server by utilizing self obtains the configuration information that terminal equipment is corresponding from database server, and utilize configuration information to process the business of terminal equipment, specifically comprise: VM server reads amended service configuration information (being configuration information) from database server, and amended service configuration information is issued to terminal equipment, the service configuration information of indicating terminal renewal of the equipment self.
Take the application scenarios shown in Fig. 2 as example, when user logins VM-3, service configuration information to EC1 on operation interface is modified, and amended service configuration information sends to after VM-3, and VM-3 is updated to database server by amended service configuration information; Afterwards, VM-3 reads amended service configuration information from database server, and amended service configuration information is issued to EC1.
(4) live business.
In step 301, at VM server, receive after the live service request that terminal equipment is corresponding, VM server is determined and need to be processed the live business of terminal equipment, the VM server that this VM server is live service request.
In step 302, for VM server is processed the business of terminal equipment, and utilize the management address of self to store the state information in business procession into database server, specifically comprise: VM server triggers terminal equipment carries out live business, and store the information of the live business in business procession (being state information) into database server.
Take the application scenarios shown in Fig. 2 as example, and it is upper that EC1 is registered to VM-1, and it is upper that DC2 is registered to VM-2, and user logins VM-3, and request realizes the live business of EC 1 to DC2; Based on this, user initiates EC1 to the live service request of DC2 by XP (decoding player) to VM-3, and VM-3 receives after live service request, and notice EC1 sends live stream to DC2, and notify DC2 to receive the live stream from EC1, by EC1, send live stream to DC2; Afterwards, VM-3 upgrades database server, by database server, records EC1 to the live relation of DC2.
(5) round cut business.
In step 301, VM server in user's request stores round cut plan information into database server, and notify after the VM startup of server round cut business that need to process the round cut business of terminal equipment, receive definite need to the processing the round cut business of terminal equipment of VM server that starts round cut service announcements, VM server is to receive the VM server that starts round cut service announcements.
In step 302, for the management address of VM server by utilizing self obtains the configuration information that terminal equipment is corresponding from database server, and utilize configuration information to process the business of terminal equipment, specifically comprise: the VM server that receives startup round cut service announcements obtains the round cut plan information (being configuration information) of round cut business from database server, and carries out round cut business by round cut plan information triggering terminal equipment.
Take the application scenarios shown in Fig. 2 as example, and user logins VM-3, configures a plurality of EC to the round cut plan of DC2 in region 2, by VM-3, stores round cut plan information into database server, and notifies the VM-2 of DC2 affiliated area to start round cut business; Afterwards, VM-2 obtains round cut plan information from database server, starts round cut business, to relevant EC, sends live data order, and notifies DC2 to receive live data, and carries out successively round cut business operation according to round cut order.
(6) alarm business.
In step 301, registration VM server at terminal equipment to self sends a warning message, and the registration VM server of terminal equipment stores warning information after database server into, need the registration VM server of the terminal equipment of receiving alarm information to determine and need to process the alarm business of terminal equipment, VM server is the registration VM server that needs the terminal equipment of receiving alarm information.
In step 302, for the management address of VM server by utilizing self obtains the configuration information that terminal equipment is corresponding from database server, and utilize configuration information to process the business of terminal equipment, specifically comprise: need the registration VM server of the terminal equipment of receiving alarm information from database server, to obtain warning information (being configuration information), and this warning information is issued to the terminal equipment that needs receiving alarm information.
Take the application scenarios shown in Fig. 2 as example, and it is upper that EC1 is registered to VM-1, and it is upper that DC2 is registered to VM-2, and EC1 sends to VM-1 by the warning information of self, by VM-1, the warning information of EC1 is stored on database server; When DC2 needs receiving alarm information, VM-2 obtains the warning information of EC1 from database server, and the warning information of EC1 is forwarded on DC2.
In actual applications, be not limited to above-mentioned service conditions, for example can also there be monitoring relation and round cut to recover business, when there is the recovery of terminal equipment abnormal off-line or VM Server switching, monitoring state relation after VM server need to re-register according to terminal equipment is recovered or round cut relation is recovered, and it is as follows that it recovers rule: monitoring relation is recovered, terminal equipment registration, the information of the VM server reading database server of its registration login, and recover monitoring relation; Round cut recovers, and the information of the VM server reading database server of terminal equipment registration or client login, recovers round cut relation.
In the present invention, the processing procedure based on above-mentioned business, VM server can be used the VM IP address of self to be automatically connected to database server, and the data message of the whole-network monitoring system on Real-time Obtaining database server; And after the state renewal and service request of receiving one's respective area terminal equipment, related data and state are updated on database server, thereby guarantee that on all VM servers of the whole network, data are consistent, and by the mode of shared data bank server, realize the backup of state.
In the present invention, when VM server breaks down (as the machine of delaying or network interruption), router is unreachable by this static routing of static routing Auto-Sensing scientific discovery, to can outwards not issue again this static routing, originally the terminal equipment that was registered to this VM server is initiated registration again, and register login according to the nearest VM server of Route Selection, upgrade the state information of database server simultaneously.
Between each VM server, also need to set up TCP (Transmission, Control Protocol transmission control protocol) and connect, to connect the keep-alive information of noticing between VM server by this TCP.
In the process that VM server and terminal equipment communicate, need terminal equipment to the SIP of VM server (Session Initiation Protocol, session initiation protocol) signaling judges, and in general header field From field, show that its address is VMG IP, form is From:Sip:xx $ xxxxxxx@VMG IP:port, only has the signaling by judgement to be performed.
Inventive concept based on same with said method, the invention allows for a kind of video management VM server, be applied to comprise in the supervisory control system of VM server of terminal equipment, database server and a plurality of distributed deployments, on each VM server, dispose services addresses and management address, services addresses between described a plurality of VM server is identical, and the management address between described a plurality of VM server is different, configuration information and the state information of described database server for storing described terminal equipment; As shown in Figure 4, this VM server comprises:
Determination module 11, need to process the business of described terminal equipment for determining;
Processing module 12, for utilizing the management address of self to obtain from described database server the configuration information that described terminal equipment is corresponding, and utilizes described configuration information to process the business of described terminal equipment; Or, the business of described terminal equipment is processed, and is utilized the management address of self to store the state information in business procession into described database server.
Described determination module 11, when utilizing described services addresses to initiate registration at terminal equipment, determines and need to process the registration business of described terminal equipment;
Described processing module 12, specifically for described terminal equipment is registered, and store the log-on message of described terminal equipment into described database server, by described database server, record the corresponding relation between the information of described terminal equipment and the management address of registration VM server.
Described determination module 11, after succeeding in registration at definite terminal equipment, determines and need to process the configuration distributing business of described terminal equipment;
Described processing module 12, specifically for obtain the service configuration information that described terminal equipment is corresponding from described database server, and is issued to described terminal equipment by service configuration information corresponding to described terminal equipment.
Described determination module 11, specifically for modifying at the service configuration information to terminal equipment, and is updated to amended service configuration information after described database server, determine need to the configuration modification of described terminal equipment more new business process;
Described processing module 12, specifically for read amended service configuration information from described database server, and is issued to described terminal equipment by amended service configuration information, indicates described terminal equipment to upgrade the service configuration information of self.
Described determination module 11, specifically for after receiving the live service request that terminal equipment is corresponding, determines and need to process the live business of described terminal equipment;
Described processing module 12, carries out live business specifically for triggering described terminal equipment, and stores the information of the live business in business procession into described database server.
Described determination module 11, specifically for the VM server in user's request, store round cut plan information into described database server, and notify after the VM startup of server round cut business that need to process the round cut business of terminal equipment, determine and need to process the round cut business of described terminal equipment;
Described processing module 12, specifically for obtain the round cut plan information of described round cut business from described database server, and triggers described terminal equipment by described round cut plan information and carries out round cut business.
Described determination module 11, specifically at terminal equipment, the registration VM server to self sends a warning message, and the registration VM server of described terminal equipment stores described warning information after described database server into, determine and need to process the alarm business of described terminal equipment;
Described processing module 12, specifically for obtain described warning information from described database server, and is issued to the described terminal equipment that needs receiving alarm information by described warning information.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can separatedly dispose.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, and the mode that also can add necessary general hardware platform by software realizes.Understanding based on such, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, or the network equipment etc.) carry out the method described in each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device in embodiment can be distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
The invention described above sequence number, just to describing, does not represent the quality of embodiment.
Disclosed is above only several specific embodiment of the present invention, and still, the present invention is not limited thereto, and the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.