Summary of the invention
Main purpose of the present invention provides a kind of method and device of batch upgrade built-in network equipment, produces line built-in network apparatus upgrading maintenance efficiency in batches to improve.
In order to achieve the above object, the present invention proposes a kind of batch upgrade network equipment method, comprising:
A. obtain the identification information of all devices in the current local area network (LAN), said identification information comprises device id that equipment produces at random number at least;
B. when detecting the equipment of identification information unanimity, the self adaptation bag that comprises the corresponding device identification information is sent in broadcasting;
C. receive device id that the consistent equipment of said identification information regenerates number;
D. after there be not the consistent equipment of identification information in repeating step b, c in net, all devices distributed the temporary address in net.
Preferably, said in net the step of all devices distribution temporary address specifically comprise:
Distribute the temporary address through broadcast address allocation packet all devices in net, comprise the consistent equipment mark information of identification information in the said address assignment bag;
When identification information is consistent with the said identification information in the said address assignment bag, be temporary address corresponding in the said address assignment bag with the address setting of equipment.
Preferably, said identification information also comprises the device address, and said device address comprises MAC Address and/or IP address.
Preferably, said temporary address comprises interim MAC Address and/or IP address.
Preferably, said in net all devices also comprise after distributing the step of temporary address: all devices is broadcasted the transmission AKU in net.
The present invention also proposes a kind of device that is used for the batch upgrade network equipment, and said device comprises:
The identification information acquisition module is used to obtain the identification information of all devices in the current local area network (LAN), and said identification information comprises device id that equipment produces at random number at least;
The ID update module is used for when detecting the consistent equipment of identification information, and the self adaptation bag that comprises the corresponding device identification information is sent in broadcasting, receives device id that the consistent equipment of said identification information regenerates number;
Address assignment module is used for when not having the equipment of said identification information unanimity in the net, and all devices distributes the temporary address in net.
Preferably, said address assignment module specifically is used for:
Distribute the temporary address through broadcast address allocation packet all devices in net, comprise the consistent equipment mark information of identification information in the said address assignment bag;
When identification information is consistent with the said identification information in the said address assignment bag, be temporary address corresponding in the said address assignment bag with the address setting of equipment.
Preferably, said identification information also comprises the device address, and said device address comprises MAC Address and/or IP address.
Preferably, said temporary address comprises interim MAC Address and/or IP address.
Preferably, said device also comprises the upgrading module, is used for all devices broadcasting transmission AKU in net.
The method and the device of batch upgrade built-in network equipment provided by the invention; Through obtaining device id that equipment generates at random number; And utilize number differentiation of this device id to net the equipment of interior concrete identical information; Make that all devices all possesses unique identification information in the net, solve because of produce equipment after the line standard production possess same address information cause can't batch upgrade problem, improved the efficient of producing the line batch upgrade network equipment.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Embodiment of the invention solution mainly is: when equipment possesses same identification information; Corresponding embedded device regenerates the equipment that in local area network (LAN), does not have same identification information at random for ID number; After the differentiation of accomplishing all devices; Be each devices allocation temporary address, send AKU according to this temporary address to equipment and accomplish upgrade job.
The embodiment of the invention relates to the built-in network device updating method, improves the device program burning efficient and the maintenance efficiency that produce line, after accomplishing production, safeguards fast and the batch device of upgrading.
With reference to Fig. 1, Fig. 1 is the schematic flow sheet of batch upgrade built-in network device, method, and is as shown in Figure 1, and this method specifically comprises step:
S10: obtain the identification information of all devices in the current local area network (LAN), this identification information comprises device id number at least, and this device id number produces for equipment at random;
Update device sends the search broadcast packet through fixed port, comprises the instruction of obtaining the equipment identification information in the current local area network (LAN) in this search broadcast packet.After equipment received this search broadcast packet, feedback identification information bag wherein comprised device id that equipment produces at random number at least.In other embodiment, identification information can also comprise the device address, like MAC Address and/or IP address, through the device id number various combination with MAC Address or IP address, can distinguish the embedded device in the network more apace.
S20: when detecting the equipment of identification information unanimity, the self adaptation bag that comprises the corresponding device identification information is sent in broadcasting;
Resolve the identification information bag of embedded device feedback, when detecting the embedded device of identification information unanimity, update device sends the adaptive broadcasting bag that comprises identical information equipment mark information.
S30: receive device id that the consistent equipment of identification information regenerates number;
After embedded device in the net receives the adaptive broadcasting bag, resolve this adaptive broadcasting bag, when a certain embedded device matches when wherein including this equipment mark information, this equipment generates device id number again at random and feeds back to update device.After update device receives this new device id number, upgrade the information of corresponding device.
S40: judge in the net whether have the equipment that possesses identical information, if, then repeating step S20, S30, otherwise execution in step S50;
S50: all devices distributes the temporary address in net;
When not having the network equipment that possesses same identification information in the net, update device is according to unique identification information devices allocation temporary address in net of each network equipment.In the present embodiment, all there is unique device id number at least in the embedded device in the net, and update device is according to device id devices allocation temporary address number in net, and this temporary address is used for update device embedded device is upgraded.More concrete, this temporary address can be temporary ip address or interim MAC Address, can also comprise temporary ip address and interim MAC Address simultaneously.
More concrete, please with reference to Fig. 2, Fig. 2 is the schematic flow sheet of S50 step among the inventive method embodiment, and is as shown in Figure 5, and S50 specifically comprises:
S51: distribute the temporary address through broadcast address allocation packet all devices in net, comprise the consistent equipment mark information of identification information in the address assignment bag;
Update device sends to net in all devices through the forms of broadcasting with address allocation information for all embedded devices in the net distribute the temporary address.Wherein, the temporary address of distribution is corresponding one by one with equipment identification information, to guarantee that the temporary address that each embedded device is assigned to is unique.
S52: when identification information is consistent with the said identification information in the said address assignment bag, be temporary address corresponding in the said address assignment bag with the address setting of equipment;
When embedded device receives the address assignment bag that broadcasting sends, retrieve this address assignment bag, the identification information in the match index information when coupling is consistent, is to temporary address that should identification information in the address assignment bag with the address setting of equipment.For example, in the present embodiment, this identification information is a device id number, and during device id in matching index information, embedded device IP address or MAC Address are set to corresponding temporary ip address or MAC Address ground.In other embodiment, this identification information can further include IP address and/or MAC Address, and at this moment, embedded device also needs IP address, MAC Address or while Match IP Address and the MAC Address in the match index information.
Please with reference to Fig. 3, Fig. 3 is for the schematic flow sheet of the method embodiment of the present invention's proposition, and is as shown in Figure 3, after the step of S50, also comprises:
S60: all devices sends AKU in net;
The AKU that is used for upgrade maintenance is sent in update device broadcasting, includes upgrading necessary informations such as corresponding firmware information and configuration information in this AKU.After equipment received this AKU, coupling current device firmware information and configuration information were to confirm whether to carry out upgrade service.After affirmation need be carried out upgrade service, initiatively connect upgrade server, obtain upgrade data, accomplish apparatus upgrading and safeguard.
Batch upgrade built-in network device, method provided by the invention; Through obtaining device id that equipment generates at random number; And utilize number differentiation of this device id to net the equipment of interior concrete identical information; Make that all devices all possesses unique identification information in the net, solve because of produce equipment after the line standard production possess same address information cause can't batch upgrade problem, improved the efficient of producing the line batch upgrade network equipment.
Please with reference to Fig. 4, the embodiment of the invention also proposes a kind of device that is used for the batch upgrade network equipment, and is as shown in Figure 4, and this device comprises:
Identification information acquisition module 100 is used to obtain the identification information of all devices in the current local area network (LAN), and identification information comprises and comprises that at least equipment produces device id number at random;
ID update module 200 is used for when detecting the consistent equipment of identification information, and the self adaptation bag that comprises the corresponding device identification information is sent in broadcasting, receives the consistent equipment of identification information and generates new device id number again at random;
Address assignment module 300 is used for when not having the equipment of identification information unanimity in the net, and all devices distributes the temporary address in net.
Identification information acquisition module 100 sends the search broadcast packet through fixed port, comprises the instruction of obtaining the equipment identification information in the current local area network (LAN) in this search broadcast packet.After equipment received this search broadcast packet, feedback identification information bag wherein comprised device id that equipment produces at random number at least.In other embodiment, identification information can also comprise the device address, like MAC Address and/or IP address, through the device id number various combination with MAC Address or IP address, can distinguish the embedded device in the network more apace.
ID update module 200 is resolved the identification information bag of embedded device feedback, and when detecting the embedded device of identification information unanimity, ID update module 200 is sent the adaptive broadcasting bag that comprises identical information equipment mark information.
After embedded device in the net receives the adaptive broadcasting bag, resolve this adaptive broadcasting bag, when a certain embedded device matches when wherein including this equipment mark information, this equipment generates device id number again at random and feeds back to update device.After ID update module 200 receives the new device id of a certain equipment number, the information of updating the equipment.
Address assignment module 300 judges in the net whether have the equipment that possesses identical information, if then send to instruct and update the equipment ID number to ID update module 200 in net, not have the equipment that possesses identical information.
When not having the network equipment that possesses same identification information in the net, address assignment module 300 is according to unique identification information devices allocation temporary address in net of each network equipment.In the present embodiment, all there is unique device id number at least in the embedded device in the net, and address assignment module 300 is according to device id devices allocation temporary address number in net, and this temporary address is used for update device embedded device is upgraded.More concrete, this temporary address can be temporary ip address or interim MAC Address, can also comprise temporary ip address and interim MAC Address simultaneously.
More concrete, address assignment module 300 specifically is used for:
Distribute the temporary address through broadcast address allocation packet all devices in net, comprise the consistent equipment mark information of identification information in the said address assignment bag;
When identification information is consistent with the said identification information in the said address assignment bag, be temporary address corresponding in the said address assignment bag with the address setting of equipment.
Address assignment module 300 sends to net in all devices through the forms of broadcasting with address allocation information for all embedded devices in the net distribute the temporary address.Wherein, the temporary address of distribution is corresponding one by one with equipment identification information, to guarantee that the temporary address that each embedded device is assigned to is unique.
When embedded device receives the address assignment bag that broadcasting sends, retrieve this address assignment bag, the identification information in the match index information when coupling is consistent, is to temporary address that should identification information in the address assignment bag with the address setting of equipment.For example, in the present embodiment, this identification information is a device id number, and during device id in matching index information, embedded device IP address or MAC Address are set to corresponding temporary ip address or MAC Address ground.In other embodiment, this identification information can further include IP address and/or MAC Address, and at this moment, embedded device also needs IP address, MAC Address or while Match IP Address and the MAC Address in the match index information.
Please with reference to Fig. 5, Fig. 5 is the device that is used for batch upgrade built-in network equipment of another embodiment of the present invention proposition, and this device also comprises the upgrading module, is used for all devices broadcasting transmission AKU in net.
The AKU that is used for upgrade maintenance is sent in 400 broadcasting of upgrading module, includes upgrading necessary informations such as corresponding firmware information and configuration information in this AKU.After equipment received this AKU, coupling current device firmware information and configuration information were to confirm whether to carry out upgrade service.After affirmation need be carried out upgrade service, initiatively connect upgrade server, obtain upgrade data, accomplish apparatus upgrading and safeguard.
The device that is used for batch upgrade built-in network equipment provided by the invention; Through obtaining device id that equipment generates at random number; And utilize number differentiation of this device id to net the equipment of interior concrete identical information; Make that all devices all possesses unique identification information in the net, solve because of produce equipment after the line standard production possess same address information cause can't batch upgrade problem, improved the efficient of producing the line batch upgrade network equipment.
More than be merely preferred embodiment of the present invention,, all any modifications of within spirit of the present invention and principle, being done, be equal to and replace and improvement etc., all should be included within protection scope of the present invention not in order to restriction the present invention.