Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method of sending configuration message, another object of the present invention is to provide a kind of system of sending configuration message, so that reduce the configuration effort amount.
In order to achieve the above object, technical scheme of the present invention is achieved in that
A kind of method of sending configuration message is applied to each terminal equipment is carried out in the system of identical data configuration, and this method comprises:
A, each terminal equipment are set to a multicast group;
B, server will be sent to switch at the configuration message of this multicast group;
C, switch are sent to each terminal equipment in this multicast group with configuration message.
Described steps A comprises:
A1, server will be sent to each terminal equipment for the multicast address of the multicast group of each terminal equipment setting;
A2, each terminal equipment add multicast group according to the multicast address that receives.
Receive the register requirement message that each terminal equipment is sent at server, and, carry out described steps A 1 after the success of register requirement authentication of message.
Described steps A 2 comprises: each terminal equipment is constructed Internet Group Management Protocol IGMP respectively and is added message, received multicast address is carried in the IGMP adding message is sent to switch; The IGMP that carries multicast address that switch is sent according to each terminal equipment adds message, and each terminal equipment is set to the member of multicast group, and each port that receives IGMP adding message in self is recorded as the multicast group corresponding port.
Described step B comprises: server is sent to switch with configuration message then with the destination address of multicast address as configuration message;
Described step C comprises: after switch receives configuration message, be multicast address according to the destination address in the configuration message, and the replicated setup message, and the configuration message that is duplicated is sent to each terminal equipment respectively by the multicast group corresponding port.
After step C, further comprise: first terminal equipment in described each terminal equipment receive configuration message but the data configuration carried out according to configuration message unsuccessful after, this first terminal equipment is sent to server by switch with failure response message; Server is sent to first terminal equipment by switch with configuration message after receiving the failure response message that first terminal equipment sends, and first terminal equipment is carried out corresponding data configuration process according to configuration message.
After step C, further comprise: server periodically sends the message of patrolling and examining of carrying configuration data to each terminal equipment by switch; After each terminal equipment receives and patrols and examines message, judge that respectively this patrols and examines the configuration data and the configuration of self of carrying in the message and whether be complementary, wherein, second terminal equipment is sent to server by switch with the miscue message determining to patrol and examine after the configuration data that carries in the message and the configuration of self do not match; Server is sent to second terminal equipment by switch with configuration message, and second terminal equipment is carried out corresponding data configuration process according to configuration message.
Carry out the step of described transmission with mode of unicast.
A kind of system of sending configuration message, this system comprises: at least one terminal equipment, server and switch, wherein,
Described terminal equipment, the configuration message of receiving group group;
Described server is used for described terminal equipment and is set to a multicast group, will be sent to switch at the configuration message of this multicast group;
Described switch is used for configuration message is sent to the terminal equipment of this multicast group.
Described server is used for the multicast address of multicast group is sent to switch;
Switch, the multicast address that is used for receiving is sent to each terminal equipment, and each port that receives IGMP adding message is recorded as the multicast group corresponding port, by the multicast group corresponding port configuration message is sent to each terminal equipment;
Each terminal equipment is used for sending IGMP according to the multicast address that receives to switch and adds message.
This shows, in the present invention, when to the data configuration of each terminal equipment when identical, this each terminal equipment of the present invention is set to a multicast group, like this, server only needs to issue a configuration message in the multicast mode at each terminal equipment in this multicast group and gets final product, and need not to issue respectively in the prior art the loaded down with trivial details processing of a plurality of configuration messages, that is to say, the present invention has adopted the point-to-multipoint send mode, therefore, has reduced the configuration effort amount, reduced the difficulty that the network equipment is managed and safeguards, and significantly reduced the time cycle of finishing configuration effort.
Embodiment
The present invention proposes a kind of method of sending configuration message, its core concept is: when to the data configuration of each terminal equipment when identical, each terminal equipment is set to a multicast group; Server will be sent to switch at the configuration message of this multicast group; Switch is sent to each terminal equipment in this multicast group with configuration message.
Accordingly, the invention allows for a kind of system of sending configuration message.Fig. 1 is the basic structure schematic diagram of the system of sending configuration message in the present invention.Referring to Fig. 1, the basic structure of system of the present invention comprises: at least one terminal equipment, server and switch, wherein,
Described terminal equipment, the configuration message of receiving group group;
Described server is used for described terminal equipment and is set to a multicast group, will be sent to switch at the configuration message of this multicast group;
Described switch is used for configuration message is sent to the terminal equipment of this multicast group.
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with drawings and the specific embodiments.
Fig. 2 is a flow chart of realizing sending configuration message in the present invention.Referring to Fig. 1 and Fig. 2, in the present invention, in the time need carrying out identical data configuration, realize may further comprise the steps at the process of this each terminal equipment sending configuration message to each terminal equipment:
Step 201: the multicast address that multicast group is set on server in advance.
Step 202: when each terminal equipment powered on, each terminal equipment was sent to server with the register requirement message respectively.
Step 203: after server receives the register requirement message of each terminal equipment, respectively each register requirement message is verified.
Step 204: after server was to each register requirement authentication of message success, server was sent to each terminal equipment respectively with set multicast address.
Here, server can be carried at set multicast address in the message that succeeds in registration, and is sent to each terminal equipment respectively by switch.
In above-mentioned steps 203, when server is verified the register requirement message,, can determine that then checking is unsuccessful if this register requirement message is that invalid packet or message content are imperfect, if this register requirement message is not that invalid packet and message content are complete, then can determine to be proved to be successful.And in step 203, if unsuccessful to the checking of a register requirement message, so, server can be sent to the miscue message terminal equipment of sending this register requirement message.
Step 205: after each terminal equipment receives multicast address, construct Internet Group Management Protocol (IGMP) respectively and add message, received multicast address is carried at IGMP adds in the message, then this IGMP is added message and be sent to switch.
Step 206: the IGMP that carries multicast address that switch is sent according to each terminal equipment adds message, and each terminal equipment is set to the member of multicast group, and each port that receives IGMP adding message in self is recorded as the multicast group corresponding port.
By the process of step 205 and step 206, then finished the process of each terminal equipment adding multicast group.
Step 207: server receives the triggering configuration order.
Here, if server is not supported the interactive function with administrative staff, so, administrative staff can issue the triggering configuration order on a client that links to each other with server, this client will trigger configuration order and be sent to server, that is, in this step, what server received is the triggering configuration order that client is sent.
If server support and administrative staff's interactive function, so, administrative staff can directly issue the triggering configuration order on server, that is, in this step, what server received is the directly triggering configuration orders of input of administrative staff.
Step 208: server will be carried in the configuration message the configuration data of each terminal equipment, and with the destination address of set multicast address as this configuration message, then this configuration message is sent to switch.
Step 209: after switch receives configuration message, be multicast address according to the destination address in the configuration message, the replicated setup message, and the configuration message that is duplicated is sent to each terminal equipment respectively by the multicast group corresponding port.
Step 210: each terminal equipment receives configuration message respectively, carries out corresponding data configuration process according to configuration message respectively.
Step 211: when carrying out data configuration, if a terminal equipment such as terminal equipment A, data configuration is unsuccessful, this terminal equipment A is sent to server by the failure response message that switch will carry this terminal equipment A address.
Here, terminal equipment A can be sent to server with failure response message by mode of unicast, that is to say, terminal equipment A is the address of the server destination address as failure response message, thereby by switch failure response message is sent to server.
Step 212: server is sent to terminal equipment A with the configuration message that carries configuration data after receiving the failure response message that terminal equipment A sends.
Here, server can be sent to terminal equipment A with configuration message by mode of unicast, that is to say, server is sent to switch with configuration message then with the address of the terminal equipment A destination address as current configuration message; After switch receives this configuration message, be the address of terminal equipment A, then configuration message be sent to terminal equipment A according to the destination address of this configuration message.
In above-mentioned steps 211 and step 212, if server and terminal equipment A all adopt mode of unicast to send configuration message and failure response message, and do not adopt the multicast mode, can avoid then that other terminal equipments that successfully carry out data configuration receive this configuration message and failure response message in the multicast group, thereby avoid meaningless ground message processing procedure.
Step 213: terminal equipment A carries out corresponding data configuration process according to configuration message.
In above-mentioned steps 210 to step 213, description be after each terminal equipment receives configuration message, if one of them terminal equipment can't be finished data configuration, how the present invention guarantees the process of this terminal equipment successful execution data configuration.If because the influence of Network Transmission environment, make a terminal equipment such as terminal equipment B, can't receive configuration message, thereby can't carry out data configuration, the present invention guarantees that this terminal equipment B can successfully carry out the process of data configuration and can be as follows 214 realize to step 217.
Step 214: server periodically sends the message of patrolling and examining of carrying configuration data to each terminal equipment by switch.
Here, server can adopt the multicast mode to send and patrol and examine message.
Step 215: after each terminal equipment receives and patrols and examines message, judge that respectively this patrols and examines the configuration data and the configuration of self of carrying in the message and whether be complementary, if, then finish current flow process, otherwise, execution in step 216.
Step 216: determine to patrol and examine the terminal equipment that the configuration data that carries in the message and the configuration of self are not complementary,, the miscue message is sent to server by switch such as terminal equipment B.
Step 217: server is sent to terminal equipment B by the configuration message that switch will carry configuration data.
Here, server can be sent to terminal equipment B with configuration message by mode of unicast, and terminal equipment B then can carry out corresponding data configuration process according to the current configuration message that receives.
Preferably, technical scheme of the present invention can be applied to monitor network, in video surveillance network.In the time of in being applied to video surveillance network, described server is a video server, and described terminal equipment is encoding and decoding.
In a word, the above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.