WO2018014695A1 - 一种修复包发送、接收方法及装置和故障修复系统 - Google Patents

一种修复包发送、接收方法及装置和故障修复系统 Download PDF

Info

Publication number
WO2018014695A1
WO2018014695A1 PCT/CN2017/089366 CN2017089366W WO2018014695A1 WO 2018014695 A1 WO2018014695 A1 WO 2018014695A1 CN 2017089366 W CN2017089366 W CN 2017089366W WO 2018014695 A1 WO2018014695 A1 WO 2018014695A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
embedded device
faulty embedded
new
faulty
Prior art date
Application number
PCT/CN2017/089366
Other languages
English (en)
French (fr)
Inventor
朱振磊
赵修伟
李奎
张小媛
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2018014695A1 publication Critical patent/WO2018014695A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • the present application relates to the field of device fault processing technologies, and in particular, to a repair packet sending and receiving method and apparatus, and a fault repairing system.
  • the faulty embedded device applies for downloading the repair package to the server through U-Boot (Universal Boot Loader) to complete the repair, wherein the U-Boot is the boot program of the embedded device, and the server can be TFTP (Trivial) File Transfer Protocol, Simple File Transfer Protocol) server.
  • U-Boot Universal Boot Loader
  • TFTP Trivial
  • the failed embedded device must be able to connect directly to the server, that is, the failed embedded device is in the same network segment as the server.
  • the administrator manually changes the IP address of each faulty embedded device to the IP address of the same network segment as the server through the serial port of each faulty embedded device, so that the faulty embedded device is directly connected to the server. Then complete the fault repair of the faulty embedded device.
  • the IP address of the faulty embedded device is manually modified one by one. Therefore, when a large number of embedded devices fail, it may take a long time to modify the IP address of all the failed embedded devices, resulting in failure to realize the direct connection between the faulty embedded device and the server in time, thereby causing fault embedded. The failure of the equipment cannot be repaired in time.
  • the embodiment of the present application discloses a repair packet sending and receiving method and device, and a fault repairing system, so as to realize a fast direct connection between a faulty embedded device and a server, and further realize a quick repair of a fault of the faulty embedded device.
  • the specific plan is as follows:
  • the embodiment of the present application provides a repair packet sending method, where the method includes:
  • the repair package corresponding to the repair request is sent to all faulty embedded devices, so that all faulty embedded devices complete the fault repair.
  • the device information includes an original IP address of the faulty embedded device.
  • the method further includes:
  • the obtaining a new IP address assigned to each failed embedded device includes:
  • the method before the sending the modification instruction to each faulty embedded device, the method further includes:
  • the sending the modified instruction to each faulty embedded device is: a modification instruction of the faulty embedded device corresponding to the multicast;
  • the sending the modified instruction to each faulty embedded device is: a modification instruction of the embedded faulty embedded device.
  • the device information further includes a MAC address of the faulty embedded device
  • the sending the modification instruction to each faulty embedded device includes:
  • the new IP address for itself is: a new IP address for its own MAC address.
  • the device information further includes a MAC address of the faulty embedded device
  • the method further includes:
  • the embodiment of the present application provides a repair packet receiving method, where the method includes:
  • the modification instruction further carries a MAC address of the faulty embedded device
  • the modifying the original IP address of the faulty embedded device as the corresponding new IP address includes:
  • the original IP address of the faulty embedded device is modified to be a new IP address corresponding to its own MAC address.
  • the modification instruction further carries a MAC address of the faulty embedded device
  • the method further includes:
  • ARP information carrying a correspondence between a MAC address of the faulty embedded device and the new IP address, so that after the server receives the ARP information, the MAC address of the faulty embedded device is stored. Correspondence of the new IP address.
  • the embodiment of the present application provides a repair packet sending apparatus, where the apparatus includes: a first receiving module, an obtaining module, a first sending module, a second receiving module, and a second sending module;
  • the first receiving module is configured to receive device information sent by at least one faulty embedded device
  • the obtaining module is configured to obtain a new IP address allocated for each faulty embedded device
  • the first sending module is configured to send a modification instruction to each faulty embedded device, so that each faulty embedded device obtains a new IP address for itself from the modified instruction, and uses a new IP address and a server directly Connected, wherein the modification instruction carries the assigned new IP address;
  • the second receiving module is configured to receive a repair request sent by all the faulty embedded devices
  • the second sending module is configured to send a repair package corresponding to the repair request to all faulty embedded devices, so that all faulty embedded devices complete fault repair.
  • the device information includes an original IP address of the faulty embedded device.
  • the device further includes a determining module
  • the determining module is configured to determine, after the receiving the device information sent by the at least one faulty embedded device, all the first faulty embedded devices from the at least one faulty embedded device according to the device information, where The first faulty embedded device is a faulty embedded device whose original IP address is not in the same network segment as the server;
  • the obtaining module is specifically configured to obtain a new IP address allocated for each first faulty embedded device.
  • the device further includes a determining module
  • the determining module is configured to determine, according to the device information, whether the corresponding faulty embedded device supports multicasting before sending the modification command to each faulty embedded device;
  • the first sending module is specifically configured to: when the corresponding faulty embedded device supports multicasting, multicasting the modified instruction of the faulty embedded device; when the corresponding faulty embedded device does not support multicasting, the corresponding fault embedded in the broadcast Modification instructions for the device.
  • the device information further includes a MAC address of the faulty embedded device
  • the first sending module is specifically configured to separately send a modification command that carries a MAC address of each faulty embedded device and a corresponding assigned new IP address to each faulty embedded device;
  • the new IP address for itself is: a new IP address for its own MAC address.
  • the device information further includes a MAC address of the faulty embedded device
  • the device also includes a third receiving module and a storage module;
  • the third receiving module is configured to receive address resolution protocol ARP information broadcast by the at least one faulty embedded device;
  • the storage module is configured to store a correspondence between a MAC address of the corresponding faulty embedded device and the new IP address carried in the ARP information.
  • the embodiment of the present application provides a repair packet receiving apparatus, where the apparatus includes: a third sending module, a fourth receiving module, a modifying module, a fourth sending module, and a fifth receiving module;
  • the third sending module is configured to send device information to the server, where the device information includes an original IP address of the faulty embedded device;
  • the fourth receiving module is configured to receive a modification instruction sent by the server, where the modification instruction carries an allocated new IP address, where the new IP address is an address allocated by the server;
  • the modifying module is configured to modify a new IP address of the faulty embedded device to be a new IP address, and directly connect to the server by using the new IP address;
  • the fourth sending module is configured to send a repair request to the server
  • the fifth receiving module is configured to receive a repair package sent by the server and corresponding to the repair request, and complete fault repair.
  • the modification instruction further carries a MAC address of the faulty embedded device
  • the modification module is specifically configured to modify a new IP address corresponding to the original IP address of the faulty embedded device as its own MAC address.
  • the modification instruction further carries a MAC address of the faulty embedded device
  • the device also includes a broadcast module
  • the broadcast module is configured to: before the sending the repair request to the server, broadcast an address resolution protocol that carries a correspondence between a MAC address of the faulty embedded device and the new IP address After the ARP information is received, the server stores the corresponding relationship between the MAC address of the faulty embedded device and the new IP address.
  • an embodiment of the present application provides a fault repair system, where the system includes:
  • a faulty embedded device configured to send device information to a server, where the device information includes an original IP address of the faulty embedded device
  • a server configured to receive device information sent by the faulty embedded device, and obtain a new IP address assigned to each faulty embedded device; send a modification instruction to each faulty embedded device, wherein the modified instruction carries the allocated New IP address;
  • the faulty embedded device is further configured to receive a modification instruction sent by the server, and modify a original IP address of the faulty embedded device to be a corresponding new IP address, to use the new IP address and the server directly Connect; and send a repair request to the server;
  • the server is further configured to receive a repair request sent by all the faulty embedded devices; and send the repair package corresponding to the repair request to all faulty embedded devices;
  • the faulty embedded device is further configured to receive a repair package sent by the server and corresponding to the repair request, and complete fault repair.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store a computer program;
  • the processor when used to execute a computer program stored in the memory, implements the method for transmitting the repair package provided by the embodiment of the present application, or implements the repair packet receiving method provided by the embodiment of the present application.
  • the embodiment of the present application provides a computer program, which is used to execute the repair packet sending method provided by the embodiment of the present application, or execute the provided by the embodiment of the present application.
  • the repair packet receiving method is used to execute the repair packet sending method provided by the embodiment of the present application, or execute the provided by the embodiment of the present application.
  • the embodiment of the present application provides a storage medium, where the storage medium is used to execute a computer program, and the computer program is executed to execute the repair package sending method provided by the embodiment of the present application, or The repair packet receiving method provided by the embodiment of the present application.
  • the server receives at least one faulty embedded device, including Device information of the original IP address of the barrier embedded device; obtain a new IP address assigned to each failed embedded device; send a modification instruction to each failed embedded device, so that each failed embedded device obtains from the modified instruction After the new IP address for itself, directly connect to the server with the new IP address; receive the repair request sent by all the faulty embedded devices; send the repair package corresponding to the repair request to all the faulty embedded devices, so that all the faulty embedded devices Complete the fault repair.
  • the server can assign a new IP address to the faulty embedded device in the same network segment and different network segments, so that each faulty embedded device obtains a new IP address for itself from the modification instruction, and uses the new IP address with
  • the server is directly connected, and it is not necessary to manually modify the IP address of the faulty embedded device one by one, thereby realizing the rapid direct connection between the faulty embedded device and the server, and further realizing the rapid repair of the fault of the faulty embedded device.
  • any of the products or methods of the present application necessarily does not necessarily require all of the advantages described above to be achieved at the same time.
  • FIG. 1 is a schematic flowchart of a method for sending a repair packet according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for receiving a repair packet according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an interaction process for applying a repair packet sending and receiving method to perform fault repair according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a repair packet sending apparatus according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a repair packet receiving apparatus according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a fault repair system according to an embodiment of the present application.
  • the embodiment of the present application provides a repair packet sending and receiving method and device, and a fault repairing system, so as to implement a fast direct connection between a faulty embedded device and a server, and further realize a quick repair of a faulty embedded device fault.
  • a repair packet sending method provided by the embodiment of the present application is first introduced.
  • the repair packet sending method may be based on a fault repair system.
  • the repair package corresponding to the repair request is sent to all faulty embedded devices, so that all faulty embedded devices complete the fault repair.
  • the embedded device can detect whether it is faulty through U-boot (Universal Boot Loader).
  • U-boot Universal Boot Loader
  • the U-boot detects its own fault, it can detect the embedded fault.
  • a device is called a faulty embedded device.
  • the above fault may be the main program damage of the embedded device itself. Further, the faulty embedded device can broadcast its own device information through the U-boot periodically or irregularly.
  • the server may receive device information broadcast by at least one faulty embedded device; subsequently, the server may automatically obtain a new IP address assigned to each faulty embedded device according to the device information broadcast by the at least one faulty embedded device received above. And executing the subsequent process; or, the server may display the received device information in the display interface for the staff to view and process, and the staff may use the device information displayed in the display interface for each faulty embedded device.
  • a new IP address is assigned, and a new IP address assigned to each failed embedded device is input into the above server; the server obtains a new IP address assigned by the worker for each failed embedded device, and then performs a subsequent process.
  • the server receives three faulty embedded device sending device information, which are device information 1, device information 2, and device information 3; in one case, the server automatically uses the device information 1, the device information 2, and the device information. 3.
  • Obtain a new IP address assigned to each failed embedded device namely a new IP address 1, a new IP address 2, and a new IP address 3; the new IP address 1, the new IP address 2, and the new IP address 3 can be added.
  • Each of the faulty embedded devices corresponds to a new IP address, that is, each device information corresponds to a new IP address.
  • the server displays the received device information 1, device information 2, and device information 3 in a display interface for the worker to view the processing, and the user according to the device information 1, the device information 2, and the device information 3 a new IP address assigned to each failed embedded device, and corresponding to each device information (including device information 1, device information 2, and device information 3), the new IP address is entered into the server, and the server is embedded for each fault.
  • the new IP address assigned by the device the user can directly assign a new IP address to each faulty embedded device through the server, and implement the modification of the IP address of each faulty embedded device through the subsequent process, without going to the site, embedded through each fault.
  • the serial port of the device changes the IP address of each faulty embedded device one by one.
  • the server may send a modification instruction carrying the new IP address to each faulty embedded device; each faulty embedded device receives the above modified instruction, and from the above modified instruction Get a new IP address for yourself.
  • the above modified instruction may be an instruction for instructing the faulty embedded device to modify the IP address.
  • the server may send a modification instruction carrying the new IP address to each faulty embedded device according to the original IP address of each faulty embedded device.
  • each faulty embedded device can receive the modified finger through the U-boot, and obtain a new IP address for itself through the U-boot from the modification command. Further, the U-boot can modify its original IP address to obtain a new IP address for itself, and then directly connect to the server through the new IP address.
  • the above modification instruction may be one or multiple.
  • a modification instruction carries a new IP address allocated for all the faulty embedded devices, and the modification instruction may be one. Can also be embedded as a fault for a modified instruction
  • the new IP address assigned by the device, in this case, the modification command may be multiple, wherein a modification instruction corresponds to a new IP address. It is also possible to carry a new IP address assigned to a predetermined number of faulty embedded devices for a modification command. In this case, the number of modification instructions may be multiple, etc., which is all possible.
  • the repair request may be sent to the server, and the repair request may be a request for repairing the fault of the faulty embedded device, for example, the repaired faulty embedded device may be damaged.
  • the request of the main program may be sent to the server, and the repair request may be a request for repairing the fault of the faulty embedded device, for example, the repaired faulty embedded device may be damaged.
  • the server may receive the repair request sent by the connected faulty embedded device, and send the repair package corresponding to the repair request to all the faulty embedded devices according to the received repair request.
  • Each faulty embedded device obtains a fix pack for itself and completes the fault repair with its own fix pack.
  • each faulty embedded device can obtain a repair package for itself through U-boot, and use U-boot to complete the fault repair by using the repair kit for itself.
  • the method may include the steps of:
  • S101 Receive device information sent by at least one faulty embedded device, where the device information includes an original IP address of the faulty embedded device.
  • U-boot Universal Boot Loader
  • the server can receive device information broadcast by at least one faulty embedded device. Further, the server may display the received device information in a display interface.
  • U-boot is a single-threaded loop program, which can be used as a bootloader for embedded devices.
  • the server can be a TFTP server and can provide fix packs for faulty embedded devices.
  • the server obtains a new IP address assigned to each faulty embedded device, wherein the new IP address may be reassigned by the user for each faulty embedded device. It can also be that the server is reassigned for each failed embedded device.
  • the above-mentioned user may be used by the administrator of the server to manage the IP address corresponding to the server, and allocate a new IP address to the faulty embedded device corresponding to the device information received by the server.
  • S103 Send a modification instruction to each faulty embedded device, so that each faulty embedded device obtains a new IP address for itself from the modification instruction, and directly connects to the server with a new IP address, where the modification instruction carries The assigned new IP address;
  • the server may send a modification instruction to each faulty embedded device through a related technology, so that each faulty embedded device obtains a new IP address for itself from one or more modification instructions through U-boot, and can be modified by U-boot.
  • the original IP address of the user is the new IP address obtained for itself, and then directly connected to the server through the new IP address.
  • S104 Receive a repair request sent by all faulty embedded devices.
  • S105 Send the repair package corresponding to the repair request to all faulty embedded devices, so that all faulty embedded devices complete the fault repair.
  • the repair request may carry information such as the device model of the corresponding faulty embedded device, so that the server may send the corresponding repair package to the faulty embedded device for the device model of the faulty embedded device.
  • the server receives the device information of the original IP address that is sent by the faulty embedded device, and obtains the new IP address allocated for each faulty embedded device; sends a modification command to each fault.
  • the embedded device so that each faulty embedded device obtains a new IP address for itself from the modification instruction, directly connects to the server with the new IP address; receives the repair request sent by all the faulty embedded devices; and sends and repairs the request corresponding to the repair request Repair kits to all failed embedded devices to enable all failed embedded devices to complete the repair.
  • the server can assign a new IP address to the faulty embedded device in the same network segment and different network segments, so that each faulty embedded device obtains a new IP address for itself from the modification instruction, and uses the new IP address with
  • the server is directly connected, and it is not necessary to manually modify the IP address of the faulty embedded device one by one, thereby realizing the rapid direct connection between the faulty embedded device and the server, and further realizing the rapid repair of the fault of the faulty embedded device.
  • the embodiment of the present application may be directed to a faulty embedded device that exists in the same network segment, and may also be directed to a faulty embedded device that exists in different network segments.
  • the embodiment of the present application can be used to provide only one server in different network segments, so as to provide a repair package for the faulty embedded device, and no server needs to be deployed in each network segment.
  • the repairing packet sending method may further include:
  • the device information Determining, according to the device information, all the first faulty embedded devices from the at least one faulty embedded device, wherein the first faulty embedded device is a faulty embedded device whose original IP address is not in the same network segment as the server;
  • the obtaining a new IP address assigned to each failed embedded device includes:
  • the server may determine, according to the original IP address of the faulty embedded device carried in the device information, and the IP address of the device, from the at least one faulty embedded device, all the original IP addresses are not in the same network segment as the user.
  • the user can view the device information sent by at least one faulty embedded device on the display interface of the server. It can be understood that the step of determining all the first faulty embedded devices that are not in the same network segment as the server may also be input to the server after being filtered by the user on the interface.
  • the server can directly connect directly to the faulty embedded device. Subsequently, the server can send the corresponding repair package to the faulty embedded device through the TFTP protocol, so that the faulty embedded device completes the fault repair through the U-boot.
  • the device information may include information such as the device model of the faulty embedded device, so that the server can send the repair package matching the device model to the faulty embedded device.
  • the server may not know the path information sent to each faulty embedded device, and the server may send the modification instruction in the form of a broadcast. Since there are other hosts in the network (including but not limited to embedded devices that are not faulty), in order to reduce the processing load of such hosts, the server can send modification instructions in the form of multicast. To effectively reduce the burden on other hosts outside the "multicast" group on the network. Because the data sent to the "multicast" group is not passed to their drivers for processing, it avoids unnecessary waste of resources.
  • the device information may further include information about whether the corresponding faulty embedded device supports multicasting. Before the sending the modify command to each faulty embedded device, the method for sending the repair packet provided by the embodiment of the present application may further include :
  • the sending the modified instruction to each faulty embedded device is: a modification instruction of the faulty embedded device corresponding to the multicast;
  • the sending the modified instruction to each faulty embedded device is: a modification instruction of the embedded faulty embedded device.
  • the repair request can be sent to the corresponding faulty embedded device in the form of a broadcast.
  • other hosts including but not limited to embedded devices that are not faulty
  • the server sends an unknown message.
  • the repair request can also be sent to the corresponding faulty embedded device in the form of multicast.
  • the repair request when the repair request is sent to the corresponding faulty embedded device in the form of broadcast, the repair request is sent to the corresponding faulty embedded device in the form of multicast, which can effectively alleviate the “multicast” on the network. "The burden on other hosts outside the group, because the information sent to the "multicast” group will not be sent to the drivers of other hosts outside the “multicast” group on the network, and the network can be avoided. The unnecessary waste of resources on other hosts outside the "multicast” group.
  • the server before the repair request is sent to the corresponding faulty embedded device in the form of multicast, it is necessary to determine whether the faulty embedded device supports multicast, and when the faulty embedded device supports multicast, the server can be multicasted. The form sends a repair request to the corresponding failed embedded device.
  • the faulty embedded device includes five devices A, B, C, D, and E, according to the device information, it can be known that A, B, and C support multicast, and D and E do not support multicast. Then, the modification instruction for A, the modification instruction for B, and the modification instruction for C are respectively multicast; the modification instruction for D and the modification instruction for E are respectively broadcast.
  • A, B, and C it can receive the modification instruction for A, the modification instruction for B, the modification instruction for C, the modification instruction for D, and the modification instruction for E, respectively, from which the carrier is selected for itself.
  • the new IP address can be modified.
  • D and E it only receives the modification instruction for D and the modification instruction for E, and selects the modification instruction carrying the new IP address for itself.
  • the device information may further include a MAC address of the faulty embedded device
  • the sending the modification instruction to each faulty embedded device includes:
  • the new IP address for itself is: a new IP address for its own MAC address.
  • the device information may also include The MAC address of the failed embedded device.
  • the modified instruction sent carries the MAC address of each faulty embedded device and the corresponding assigned new IP address, so that each faulty embedded device can filter out a new IP address for its own MAC address through U-boot.
  • the device information may also carry other information that can uniquely identify the faulty embedded device.
  • the device information may further include a MAC address of the faulty embedded device
  • the method for sending the repair package provided by the embodiment of the present application may further include:
  • the correspondence between the new IP address and the MAC address of the faulty embedded device is not stored in other hosts (including but not limited to the server and each switch device) in the network.
  • the ARP Address Resolution Protocol
  • the faulty embedded device can actively broadcast ARP information through the U-boot after modifying its own IP address, so that other hosts can increase the storage failure of the embedded device.
  • the correspondence between the new IP address and the MAC address is not limited to the server and each switch device.
  • the embodiment of the present application provides a repair packet receiving method, wherein the repair packet receiving method is based on a fault repairing system, as shown in FIG. 2, and may include the following steps:
  • S201 Send device information to the server, where the device information includes an original IP address of the faulty embedded device.
  • U-boot After the embedded device is powered on, after U-boot detects its own fault, if the main program is damaged, it broadcasts its own device information through U-boot timing or irregular.
  • S202 Receive a modification instruction sent by the server, where the modification instruction carries an allocated new IP address, where the new IP address is an address allocated by the server;
  • the modification command is sent by the server for each failed embedded device.
  • the faulty embedded device receives the modification instruction through the U-boot, and then filters out the modification instruction for itself through the U-boot, and the modified instruction for the self carries the server to allocate The new IP address for the failed embedded device itself.
  • S203 Modify the original IP address of the faulty embedded device to be a corresponding new IP address, so as to directly connect to the server by using the new IP address;
  • the faulty embedded device modifies the original IP address to the corresponding new IP address through U-boot, and directly connects to the server through the new IP address.
  • S205 Receive a repair package sent by the server and corresponding to the repair request, and complete fault repair.
  • the faulty embedded device sends a repair request to the server through the U-boot, and receives the repair package corresponding to the repair request sent by the server through the U-boot to complete the fault repair.
  • the IP address is modified, and after the new IP address is directly connected to the server, the repair request is sent to the server, and the repair package corresponding to the repair request sent by the server is received. , complete the fault repair. Realize the fast direct connection between the faulty embedded device and the server, and further realize the rapid repair of the fault of the faulty embedded device.
  • each faulty embedded device is determined to determine a new IP address for itself, and avoid occupying IP of other embedded devices. address.
  • the modification instruction further carries a MAC address of the faulty embedded device
  • the modifying the original IP address of the faulty embedded device to be the corresponding new IP address includes:
  • the modifying instruction further carries a MAC address of the faulty embedded device
  • the method for receiving the repair package provided by the embodiment of the present application may further include:
  • the server Broadcasting the address resolution protocol ARP information carrying the correspondence between the MAC address of the faulty embedded device and the new IP address, so that after receiving the ARP information, the server stores the MAC address of the faulty embedded device and the new IP address. Correspondence relationship.
  • the faulty embedded device determines the new IP address for its own MAC address from the modification command through U-boot, the original IP address is modified by the U-boot to the new IP address, and the ARP information is actively broadcasted.
  • the other host including the server stores the correspondence between the MAC address of the faulty embedded device and the new IP address, so that the faulty embedded device can perform subsequent information interaction with other hosts.
  • the server may send the repair package corresponding to the faulty embedded device to the faulty embedded device according to the corresponding relationship, so that the faulty embedded device completes the fault repair.
  • the device information broadcasted by the faulty embedded device may also carry information such as the device model, so that the server can send the corresponding repair package to the faulty embedded device according to the device model.
  • FIG. 3 a schematic diagram of interaction between the server and the faulty embedded device:
  • the faulty embedded device fails, such as the main program is damaged, and broadcasts its own device information;
  • the TFTP server receives the device information broadcast by the faulty embedded device
  • the TFTP server can display each device information received and obtain a new IP address assigned to each failed embedded device;
  • the TFTP server broadcasts or multicasts a modification instruction carrying the obtained new IP address
  • Each faulty embedded device receives the modification instruction, and filters out the new IP address for itself through the modified instruction through U-boot, and modifies the IP address;
  • Each faulty embedded device broadcasts ARP information, and the ARP information carries the correspondence between its own MAC address and the new IP address.
  • the TFTP server receives the ARP information broadcasted by each faulty embedded device, stores the correspondence between the MAC address of each faulty embedded device carried in the ARP information and the new IP address, and directly connects to each faulty embedded device. ;
  • the TFTP server receives the repair request sent by all the faulty embedded devices; the repair request may carry information such as the device model of the corresponding faulty embedded device;
  • the TFTP server sends a corresponding repair package for each faulty embedded device, so that each faulty embedded device completes the fault repair.
  • the fault information can be fed back to the TFTP server.
  • the embodiment of the present application provides a repair packet sending apparatus.
  • the apparatus may include: a first receiving module 401, an obtaining module 402, a first sending module 403, and a second. a receiving module 404 and a second sending module 405;
  • the first receiving module 401 is configured to receive device information sent by at least one faulty embedded device.
  • the obtaining module 402 is configured to obtain a new IP address assigned to each faulty embedded device
  • the first sending module 403 is configured to send a modification instruction to each faulty embedded device, so that each faulty embedded device obtains a new IP address for itself from the modified instruction, and uses the new IP address and the server. Directly connected, wherein the modification instruction carries the assigned new IP address;
  • the second receiving module 404 is configured to receive a repair request sent by all the faulty embedded devices
  • the second sending module 405 is configured to send the repair package corresponding to the repair request to all faulty embedded devices, so that all faulty embedded devices complete fault repair.
  • the server receives the device information of the original IP address that is sent by the faulty embedded device, and obtains the new IP address allocated for each faulty embedded device; sends a modification command to each fault.
  • the embedded device so that each faulty embedded device obtains a new IP address for itself from the modification instruction, directly connects to the server with the new IP address; receives the repair request sent by all the faulty embedded devices; and sends and repairs the request corresponding to the repair request Repair kits to all failed embedded devices to enable all failed embedded devices to complete the repair.
  • the server can assign a new IP address to the faulty embedded device in the same network segment and different network segments, so that each faulty embedded device obtains a new IP address for itself from the modification instruction, and uses the new IP address with
  • the server is directly connected, and it is not necessary to manually modify the IP address of the faulty embedded device one by one, thereby realizing the rapid direct connection between the faulty embedded device and the server, and further realizing the rapid repair of the fault of the faulty embedded device.
  • the device information includes an original IP address of the faulty embedded device.
  • the apparatus further includes a determining module
  • the determining module is configured to determine, after the receiving the device information sent by the at least one faulty embedded device, all the first faulty embedded devices from the at least one faulty embedded device according to the device information, where The first faulty embedded device is a faulty embedded device whose original IP address is not in the same network segment as the server;
  • the obtaining module 402 is specifically configured to obtain a new IP address allocated for each first faulty embedded device.
  • the apparatus further includes a determining module
  • the determining module is configured to determine, according to the device information, whether the corresponding faulty embedded device supports multicasting before sending the modification command to each faulty embedded device;
  • the first sending module 403 is specifically configured to: when the corresponding faulty embedded device supports multicasting, multicasting the modified instruction of the faulty embedded device; when the corresponding faulty embedded device does not support multicasting, the corresponding fault of the broadcast Modification instructions for embedded devices.
  • the device information further includes a MAC address of the faulty embedded device. site;
  • the first sending module 403 is specifically configured to separately send a modification command that carries a MAC address of each faulty embedded device and a corresponding assigned new IP address to each faulty embedded device;
  • the new IP address for itself is: a new IP address for its own MAC address.
  • the device information further includes a MAC address of the faulty embedded device
  • the device also includes a third receiving module and a storage module;
  • the third receiving module is configured to receive ARP information broadcast by the at least one faulty embedded device
  • the storage module is configured to store a correspondence between a MAC address of the corresponding faulty embedded device and the new IP address carried in the ARP information.
  • the embodiment of the present application provides a repair packet receiving apparatus.
  • the apparatus may include: a third sending module 501, a fourth receiving module 502, and a modifying module 503. a fourth sending module 504 and a fifth receiving module 505;
  • the third sending module 501 is configured to send device information to the server, where the device information includes an original IP address of the faulty embedded device.
  • the fourth receiving module 502 is configured to receive a modification instruction sent by the server, where the modification instruction carries an allocated new IP address, where the new IP address is an address allocated by the server;
  • the modifying module 503 is configured to modify the original IP address of the faulty embedded device to be a new IP address, so as to be directly connected to the server by using the new IP address;
  • the fourth sending module 504 is configured to send a repair request to the server
  • the fifth receiving module 505 is configured to receive a repair package that is sent by the server and that is corresponding to the repair request, and complete fault repair.
  • the IP address is modified, and after the new IP address is directly connected to the server, the repair request is sent to the server, and the repair package corresponding to the repair request sent by the server is received. , complete the fault repair.
  • Faster faulty embedded devices and servers Fast and straightforward, further realizing the rapid repair of faulty embedded device faults.
  • the modifying instruction further carries a MAC address of the faulty embedded device
  • the modification module 503 is specifically configured to modify a new IP address corresponding to the original IP address of the faulty embedded device as its own MAC address.
  • the modifying instruction further carries a MAC address of the faulty embedded device
  • the device also includes a broadcast module
  • the broadcast module is configured to: before the sending the repair request to the server, broadcast an address resolution protocol ARP information that carries a correspondence between a MAC address of the faulty embedded device and the new IP address, so that the After receiving the ARP information, the server stores a correspondence between a MAC address of the faulty embedded device and the new IP address.
  • the embodiment of the present application provides a fault repair system. As shown in FIG. 6, the system includes:
  • the faulty embedded device 601 is configured to send device information to the server, where the device information includes an original IP address of the faulty embedded device;
  • the server 602 is configured to receive device information sent by the faulty embedded device, obtain a new IP address assigned to each faulty embedded device, and send a modification instruction to each faulty embedded device, where the modified command carries the allocated New IP address;
  • the faulty embedded device 601 is further configured to receive a modification instruction sent by the server, and modify a original IP address of the faulty embedded device to be a corresponding new IP address, so that the new IP address is directly connected to the server. Connect; and send a repair request to the server;
  • the server 602 is further configured to receive a repair request sent by all the faulty embedded devices; and send the repair package corresponding to the repair request to all faulty embedded devices;
  • the faulty embedded device 601 is further configured to receive a repair package sent by the server and corresponding to the repair request, and complete fault repair.
  • An embodiment of the present application further provides an electronic device, including a processor and a storage. And a memory for storing the computer program;
  • the processor when used to execute a computer program stored in the memory, implements the repair packet sending method provided by the embodiment of the present application, or implements the repair packet receiving method provided by the embodiment of the present application, where the repair packet sending method Can include steps:
  • the repair packet receiving method may include the steps of:
  • the processor of the electronic device runs the computer program stored in the memory to perform the repair packet sending method provided by the embodiment of the present application, or to perform the repair packet receiving method provided by the embodiment of the present application. Therefore, it can realize: a fast direct connection between the faulty embedded device and the server, and further realizing the rapid repair of the fault of the faulty embedded device.
  • the electronic device may be the foregoing service when the processor of the electronic device runs a computer program stored in the memory to perform the repair packet sending method provided by the embodiment of the present application.
  • the electronic device may be the aforementioned faulty embedded device.
  • the embodiment of the present application further provides a computer program, where the computer program is used to perform the repair packet sending method provided by the embodiment of the present application, or the repair packet receiving method provided by the embodiment of the present application, where
  • the repair package sending method may include the following steps:
  • the repair packet receiving method may include the steps of:
  • the computer program can execute the repair packet sending method provided by the embodiment of the present application at the time of running, or execute the repair packet receiving method provided by the embodiment of the present application, thereby implementing the faulty embedded device and the server.
  • the embodiment of the present application provides a storage medium for storing a computer program, and the computer program is executed to execute the repair package sending method provided by the embodiment of the present application or the repair package provided by the embodiment of the present application.
  • the receiving method, wherein the repairing packet sending method may include the steps of:
  • the repair packet receiving method may include the steps of:
  • the storage medium stores a computer program that executes the repair packet sending method provided by the embodiment of the present application at runtime, or stores a computer that executes the repair packet receiving method provided by the embodiment of the present application at runtime.
  • the program can therefore realize: a fast direct connection between the faulty embedded device and the server, and further realizing the rapid repair of the fault of the faulty embedded device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请实施例公开了一种修复包发送、接收方法及装置和故障修复系统,发送方法包括:服务器接收至少一个故障嵌入式设备发送的包括故障嵌入式设备的原IP地址的设备信息;获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连;接收所有故障嵌入式设备发送的修复请求;发送与修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。应用本申请实施例以实现故障嵌入式设备与服务器的快速直连,进一步实现故障嵌入式设备的故障的快速修复。

Description

一种修复包发送、接收方法及装置和故障修复系统
本申请要求于2016年7月21日提交中国专利局、申请号为201610588640.8发明名称为“一种修复包发送、接收方法及装置和故障修复系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及设备故障处理技术领域,特别涉及一种修复包发送、接收方法及装置和故障修复系统。
背景技术
嵌入式设备在发生故障后,如故障为主程序损坏,需要对故障的嵌入式设备进行修复。相关的修复方式是:故障嵌入式设备通过U-Boot(Universal Boot Loader)向服务器申请下载修复包以完成修复,其中,该U-Boot为嵌入式设备的引导程序,该服务器可以为TFTP(Trivial File Transfer Protocol,简单文件传输协议)服务器。
在这种情况下,要求故障嵌入式设备必须能够直连服务器,也就是要求故障嵌入式设备与服务器处于同一网段中。目前,是由管理人员通过每台故障嵌入式设备的串口,逐一将每台故障嵌入式设备的IP地址修改为与服务器处于同一网段的IP地址,以实现故障嵌入式设备与服务器直连,进而完成故障嵌入式设备的故障修复。
由于相关技术中,是通过人工方式逐一来修改故障嵌入式设备的IP地址。因此,当出现大量的嵌入式设备出现故障时,对所有故障的嵌入式设备修改IP地址就会占用很长的时间,导致不能及时实现故障嵌入式设备与服务器的直连,进而导致故障嵌入式设备的故障不能及时修复。
发明内容
本申请实施例公开了一种修复包发送、接收方法及装置和故障修复系统,以实现故障嵌入式设备与服务器的快速直连,进一步实现故障嵌入式设备的故障的快速修复。具体方案如下:
一方面,本申请实施例提供了一种修复包发送方法,所述方法包括:
接收至少一个故障嵌入式设备发送的设备信息;
获得为每个故障嵌入式设备分配的新IP地址;
发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
接收所有故障嵌入式设备发送的修复请求;
发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
可选地,所述设备信息中包括故障嵌入式设备的原IP地址。
可选地,在所述接收至少一个故障嵌入式设备发送的设备信息之后,所述方法还包括:
依据所述设备信息,从所述至少一个故障嵌入式设备中,确定所有第一故障嵌入式设备,其中,所述第一故障嵌入式设备为原IP地址与所述服务器不在同一网段的故障嵌入式设备;
所述获得为每个故障嵌入式设备分配的新IP地址,包括:
获得为每个第一故障嵌入式设备分配的新IP地址。
可选地,在所述发送修改指令至每个故障嵌入式设备之前,所述方法还包括:
根据所述设备信息,判断所对应故障嵌入式设备是否支持多播;
当所对应故障嵌入式设备支持多播时,所述发送修改指令至每个故障嵌入式设备为:多播所对应故障嵌入式设备的修改指令;
当所对应故障嵌入式设备不支持多播时,所述发送修改指令至每个故障嵌入式设备为:广播所对应故障嵌入式设备的修改指令。
可选地,所述设备信息还包括故障嵌入式设备的MAC地址;
所述发送修改指令至每个故障嵌入式设备,包括:
分别发送携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址的修改指令,至每个故障嵌入式设备;
所述针对自身的新IP地址为:针对自身的MAC地址的新IP地址。
可选地,所述设备信息还包括故障嵌入式设备的MAC地址;
在所述接收所有故障嵌入式设备发送的修复请求之前,所述方法还包括:
接收所述至少一个故障嵌入式设备广播的地址解析协议ARP信息;
存储所述ARP信息中所携带的所对应故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
一方面,本申请实施例提供了一种修复包接收方法,所述方法包括:
发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
发送修复请求至所述服务器;
接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
可选地,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
所述修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,包括:
修改所述故障嵌入式设备的原IP地址为自身的MAC地址所对应的新IP地址。
可选地,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
在所述发送修复请求至所述服务器之前,所述方法还包括:
广播携带所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系的地址解析协议ARP信息,以使所述服务器接收所述ARP信息后,存储所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
一方面,本申请实施例提供了一种修复包发送装置,所述装置包括:第一接收模块、获得模块、第一发送模块、第二接收模块和第二发送模块;
所述第一接收模块,用于接收至少一个故障嵌入式设备发送的设备信息;
所述获得模块,用于获得为每个故障嵌入式设备分配的新IP地址;
所述第一发送模块,用于发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
所述第二接收模块,用于接收所有故障嵌入式设备发送的修复请求;
所述第二发送模块,用于发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
可选地,所述设备信息中包括故障嵌入式设备的原IP地址。
可选地,所述装置还包括确定模块;
所述确定模块,用于在所述接收至少一个故障嵌入式设备发送的设备信息之后,依据所述设备信息,从所述至少一个故障嵌入式设备中,确定所有第一故障嵌入式设备,其中,所述第一故障嵌入式设备为原IP地址与所述服务器不在同一网段的故障嵌入式设备;
所述获得模块,具体用于获得为每个第一故障嵌入式设备分配的新IP地址。
可选地,所述装置还包括判断模块;
所述判断模块,用于在所述发送修改指令至每个故障嵌入式设备之前,根据所述设备信息,判断所对应故障嵌入式设备是否支持多播;
所述第一发送模块,具体用于当所对应故障嵌入式设备支持多播时,多播所对应故障嵌入式设备的修改指令;当所对应故障嵌入式设备不支持多播时,广播所对应故障嵌入式设备的修改指令。
可选地,所述设备信息还包括故障嵌入式设备的MAC地址;
所述第一发送模块,具体用于分别发送携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址的修改指令,至每个故障嵌入式设备;
所述针对自身的新IP地址为:针对自身的MAC地址的新IP地址。
可选地,所述设备信息还包括故障嵌入式设备的MAC地址;
所述装置还包括第三接收模块和存储模块;
所述第三接收模块,用于接收所述至少一个故障嵌入式设备广播的地址解析协议ARP信息;
所述存储模块,用于存储所述ARP信息中所携带的所对应故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
一方面,本申请实施例提供了一种修复包接收装置,所述装置包括:第三发送模块、第四接收模块、修改模块、第四发送模块和第五接收模块;
所述第三发送模块,用于发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
所述第四接收模块,用于接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
所述修改模块,用于修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
所述第四发送模块,用于发送修复请求至所述服务器;
所述第五接收模块,用于接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
可选地,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
所述修改模块,具体用于修改所述故障嵌入式设备的原IP地址为自身的MAC地址所对应的新IP地址。
可选地,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
所述装置还包括广播模块;
所述广播模块,用于在所述发送修复请求至所述服务器之前,广播携带所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系的地址解析协 议ARP信息,以使所述服务器接收所述ARP信息后,存储所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
另一方面,本申请实施例提供了一种故障修复系统,所述系统包括:
故障嵌入式设备,用于发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
服务器,用于接收故障嵌入式设备发送的设备信息,并获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,其中,所述修改指令携带所分配的新IP地址;
所述故障嵌入式设备,还用于接收所述服务器发送的修改指令;修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;并发送修复请求至所述服务器;
所述服务器,还用于接收所有故障嵌入式设备发送的修复请求;并发送与所述修复请求对应的修复包至所有故障嵌入式设备;
所述故障嵌入式设备,还用于接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
另一方面,本申请实施例提供了一种电子设备,包括处理器和存储器,其中,存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的所述修复包发送方法,或,实现本申请实施例所提供的所述修复包接收方法。
另一方面,本申请实施例提供了一种计算机程序,所述计算机程序用于被运行以执行本申请实施例所提供的所述修复包发送方法,或,执行本申请实施例所提供的所述修复包接收方法。
另一方面,本申请实施例提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行本申请实施例所提供的所述修复包发送方法,或,执行本申请实施例所提供的所述修复包接收方法。
在本申请实施例中,服务器接收至少一个故障嵌入式设备发送的包括故 障嵌入式设备的原IP地址的设备信息;获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连;接收所有故障嵌入式设备发送的修复请求;发送与修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。可见,服务器可以为处于同网段和不同网段的故障嵌入式设备分配新的IP地址,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,无需通过人工方式逐一来修改故障嵌入式设备的IP地址,实现了故障嵌入式设备与服务器的快速直连,并进一步的实现了故障嵌入式设备的故障的快速修复。当然,实施本申请的任一产品或方法必不一定需要同时达到以上所述的所有优点。
附图说明
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种修复包发送方法的流程示意图;
图2为本申请实施例提供的修复包接收方法的流程示意图;
图3为应用本申请实施例提供的修复包发送、接收方法进行故障修复的交互流程示意图;
图4为本申请实施例提供的一种修复包发送装置的结构示意图;
图5为本申请实施例提供的一种修复包接收装置的结构示意图;
图6为本申请实施例提供的一种故障修复系统的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供了一种修复包发送、接收方法及装置和故障修复系统,以实现故障嵌入式设备与服务器的快速直连,进一步实现故障嵌入式设备的故障的快速修复。
下面首先对本申请实施例所提供的一种修复包发送方法进行介绍,其中,该修复包发送方法可以基于故障修复系统。
本申请实施例所提供的一种修复包发送方法,可以包括如下步骤:
接收至少一个故障嵌入式设备发送的设备信息;
获得为每个故障嵌入式设备分配的新IP地址;
发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
接收所有故障嵌入式设备发送的修复请求;
发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
可以理解的是,嵌入式设备通电后,可以通过U-boot(Universal Boot Loader)检测自身是否出现故障,当通过U-boot检测到自身出现故障时,可以将上述检测到自身出现故障的嵌入式设备称为故障嵌入式设备。其中,上述故障可以是嵌入式设备自身的主程序损坏。进一步的,故障嵌入式设备可以通过U-boot定时或不定时的广播自身的设备信息。
服务器可以接收到至少一个故障嵌入式设备广播的设备信息;后续的,服务器可以自动依据上述所接收的至少一个故障嵌入式设备广播的设备信息,获得为每个故障嵌入式设备分配的新IP地址,进而执行后续流程;或者,服务器可以将所接收的设备信息展示在显示界面中,以供工作人员查看处理,工作人员可以根据显示界面中所展示的上述设备信息,为每一故障嵌入式设备分配新IP地址,并将为每一故障嵌入式设备分配的新IP地址输入上述服务器中;上述服务器获得工作人员为每个故障嵌入式设备分配的新IP地址,进而执行后续流程。
举例而言,服务器接收到3个故障嵌入式设备发送设备信息,分别为设备信息1、设备信息2和设备信息3;一种情况中,服务器自动依据上述设备信息1、设备信息2和设备信息3,获得为每个故障嵌入式设备分配的新IP地址,分别为新IP地址1、新IP地址2和新IP地址3;可以将上述新IP地址1、新IP地址2和新IP地址3分别随机分配给任一故障嵌入式设备,其中,每一故障嵌入式设备对应一新IP地址,即每一设备信息对应一新IP地址。
另一种情况中,服务器将所接收到的设备信息1、设备信息2和设备信息3展示在显示界面中,以供工作人员查看处理,用户根据上述设备信息1、设备信息2和设备信息3,为每一故障嵌入式设备分配的新IP地址,并对应每一设备信息(包括设备信息1、设备信息2和设备信息3)将新IP地址输入服务器中,服务器获得为每个故障嵌入式设备分配的新IP地址。此时,用户可以直接通过服务器为每一故障嵌入式设备分配新IP地址,并通过后续流程,实现对每一故障嵌入式设备的IP地址的修改,无需去到现场,通过每个故障嵌入式设备的串口,逐一修改每个故障嵌入式设备的IP地址。
服务器获得为每个故障嵌入式设备分配的新IP地址后,可以发送携带新IP地址的修改指令至每个故障嵌入式设备;每个故障嵌入式设备接收上述修改指令,并从上述修改指令中获得针对自身的新IP地址。可以理解的,上述修改指令可以为指示故障嵌入式设备修改IP地址的指令。每一故障嵌入式设备获得针对自身的新IP地址后,可以将自身的原IP地址修改为上述新IP地址,继而,利用上述新IP地址与服务器直连。
在一种实现方式中,服务器可以依据每个故障嵌入式设备的原IP地址,将携带新IP地址的修改指令发送至每个故障嵌入式设备。
其中,每个故障嵌入式设备可以通过U-boot接收修改指后,并通过U-boot从修改指令中获得针对自身的新IP地址。进一步的,可以通过U-boot修改自身的原IP地址为所获得针对自身的新IP地址,继而通过新IP地址与服务器进行直连。
可以理解的是,上述修改指令可以为一个,也可以为多个。具体的,可以是一个修改指令中携带有为上述所有故障嵌入式设备所分配的新IP地址,此时,修改指令可以为一个。也可以为一个修改指令中携带一个为故障嵌入 式设备所分配的新IP地址,此时,修改指令可以为多个,其中,一修改指令对应一新IP地址。也可以为一个修改指令携带为预定数量个故障嵌入式设备所分配的新IP地址,此时,修改指令也可以为多个,等等,这都是可以的。
每个故障嵌入式设备通过新IP地址与服务器直连后,可以向服务器发送修复请求,上述修复请求可以为修复故障嵌入式设备的故障的请求,例如:可以是修复故障嵌入式设备的已损坏的主程序的请求。
服务器可以接收所连接的故障嵌入式设备发送的修复请求,并依据所接收的修复请求,发送与修复请求对应的修复包至所有故障嵌入式设备。每个故障嵌入式设备获得针对自身的修复包,并利用针对自身的修复包完成故障修复。其中,每个故障嵌入式设备可以通过U-boot获得针对自身的修复包,并通过U-boot利用针对自身的修复包完成故障修复。
在一种实现方式中,如图1所示,该方法可以包括步骤:
S101:接收至少一个故障嵌入式设备发送的设备信息,该设备信息中包括故障嵌入式设备的原IP地址;
可以理解的是,嵌入式设备通电后,通过U-boot(Universal Boot Loader)检测到自身出现故障后,如主程序损坏,会通过U-boot定时或不定时的广播自身的设备信息。服务器可以接收到至少一个故障嵌入式设备广播的设备信息。进一步的,服务器可以将所接收的设备信息展示在显示界面中。其中,U-boot为一个单线程的循环程序,其可以作为嵌入式设备的引导程序。该服务器可以为TFTP服务器,可以为故障嵌入式设备提供修复包。
S102:获得为每个故障嵌入式设备分配的新IP地址;
需要说明的是,服务器获得为每个故障嵌入式设备分配的新IP地址,其中,该新IP地址可以是用户针对每个故障嵌入式设备,为其重新分配的。也可以是服务器针对每个故障嵌入式设备,为其重新分配的。
也就是说,上述用户可以为上述服务器的管理人员,用于管理服务器对应的IP地址,并为服务器所接收的设备信息对应的故障嵌入式设备分配新IP地址。
S103:发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从该修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,该修改指令携带所分配的新IP地址;
服务器可以通过相关技术发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备通过U-boot从一个或多个修改指令获得针对自身的新IP地址,并可以通过U-boot修改自身的原IP地址为所获得针对自身的新IP地址,继而通过新IP地址与服务器进行直连。
S104:接收所有故障嵌入式设备发送的修复请求;
S105:发送与该修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
其中,该修复请求中可以携带所对应故障嵌入式设备的设备型号等信息,以使服务器可以针对故障嵌入式设备的设备型号,发送对应的修复包至故障嵌入式设备。
应用本申请实施例,服务器接收至少一个故障嵌入式设备发送的包括故障嵌入式设备的原IP地址的设备信息;获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连;接收所有故障嵌入式设备发送的修复请求;发送与修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。可见,服务器可以为处于同网段和不同网段的故障嵌入式设备分配新的IP地址,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,无需通过人工方式逐一来修改故障嵌入式设备的IP地址,实现了故障嵌入式设备与服务器的快速直连,并进一步的实现了故障嵌入式设备的故障的快速修复。
并且,本申请实施例可以针对存在于同一个网段中的故障嵌入式设备,也可以针对存在于不同网段中的故障嵌入式设备。应用本申请实施例可以使在不同网段中,仅存在一台服务器即可,以用于为故障嵌入式设备提供修复包,无需每个网段中均部署服务器。
在一种具体实现方式中,某些故障嵌入式设备与服务器处于同网段,可 以直接与服务器实现直连,则可以无需进行IP地址的修改。为了节省服务器的资源,可以仅为与服务器处于不同网段的故障嵌入式设备分配IP地址。在所述接收至少一个故障嵌入式设备发送的设备信息之后,本申请实施例所提供的修复包发送方法还可以包括:
依据设备信息,从该至少一个故障嵌入式设备中,确定所有第一故障嵌入式设备,其中,该第一故障嵌入式设备为原IP地址与服务器不在同一网段的故障嵌入式设备;
所述获得为每个故障嵌入式设备分配的新IP地址,包括:
获得为每个第一故障嵌入式设备分配的新IP地址。
其中,服务器可以根据设备信息中所携带的故障嵌入式设备的原IP地址,以及自身的IP地址,从该至少一个故障嵌入式设备中,确定出原IP地址与自身不在同一网段的所有第一故障嵌入式设备,并进行后续的流程。另外的,用户在服务器的显示界面上可以查看到至少一个故障嵌入式设备发送的设备信息。可以理解的,确定与服务器不在同一网段的所有第一故障嵌入式设备的步骤,也可以通过用户在界面上筛选后输入到服务器。
另外,当故障嵌入式设备与服务器在同一网段时,服务器可以与该故障嵌入式设备直接进行直连。后续的,服务器可以通过TFTP协议,将相应的修复包发送给该故障嵌入式设备,以使该故障嵌入式设备通过U-boot完成故障修复。其中,该设备信息可以包含故障嵌入式设备的设备型号等信息,以使服务器可以为故障嵌入式设备发送与设备型号匹配的修复包。
在一种具体实现方式中,服务器可能未知发送至每个故障嵌入式设备的路径信息,此时服务器可以会以广播的形式发送修改指令。由于网络中不乏存在其他主机(包括但不限于未故障的嵌入式设备),为了减少该类主机的处理负担,服务器可以通过多播的形式发送修改指令。,以有效减轻网络上“多播”组之外的其他主机的负担,。因为发送给“多播”组的数据不会被传送到它们的驱动程序中去处理,避免了资源的无谓浪费。设备信息中还可以携带所对应故障嵌入式设备是否支持多播的信息,在所述发送修改指令至每个故障嵌入式设备之前,本申请实施例所提供的一种修复包发送方法还可以包括:
根据设备信息,判断所对应故障嵌入式设备是否支持多播;
当所对应故障嵌入式设备支持多播时,所述发送修改指令至每个故障嵌入式设备为:多播所对应故障嵌入式设备的修改指令;
当所对应故障嵌入式设备不支持多播时,所述发送修改指令至每个故障嵌入式设备为:广播所对应故障嵌入式设备的修改指令。
也就是说,当服务器未知发送至故障嵌入式设备的路径信息时,可以通过广播的形式将修复请求发送至对应的故障嵌入式设备中。另外的,由于网络中不仅仅只存在上述故障嵌入式设备,网络中还可能存在其他主机(包括但不限于未故障的嵌入式设备),为了减少上述其他主机的信息处理负担,当服务器未知发送至故障嵌入式设备的路径信息时,还可以通过多播的形式将修复请求发送至对应的故障嵌入式设备中。可以理解的是,相对于以广播的形式将修复请求发送至对应的故障嵌入式设备中,以多播的形式将修复请求发送至对应的故障嵌入式设备中,可以有效减轻网络上“多播”组之外的其他主机的负担,这是因为发送给“多播”组的信息,不会被发送至网络上“多播”组之外的其他主机的驱动程序中去处理,可以避免网络上“多播”组之外的其他主机的资源的无谓浪费。另外,在以多播的形式将修复请求发送至对应的故障嵌入式设备中之前,需要确定故障嵌入式设备是否支持多播,当故障嵌入式设备支持多播时,服务器从能以多播的形式将修复请求发送至对应的故障嵌入式设备中。
举例而言,当故障嵌入式设备包括A、B、C、D和E五个设备时,其中,根据设备信息,可以知晓A、B和C支持多播,D和E不支持多播。则分别多播针对A的修改指令、针对B的修改指令和针对C的修改指令;分别广播针对D的修改指令和针对E的修改指令。针对A、B和C来说,其可以接收到针对A的修改指令、针对B的修改指令、针对C的修改指令、针对D的修改指令和针对E的修改指令,从中分别选出携带针对自身的新IP地址的修改指令即可。针对D和E来说,其只会接收到针对D的修改指令和针对E的修改指令,从中分别选出携带针对自身的新IP地址的修改指令即可。
在一种具体实现方式中,所述设备信息还可以包括故障嵌入式设备的MAC地址;
所述发送修改指令至每个故障嵌入式设备,包括:
分别发送携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址的修改指令,至每个故障嵌入式设备;
该针对自身的新IP地址为:针对自身的MAC地址的新IP地址。
为了更好的保证服务器针对每个故障嵌入式设备分配新的IP地址,保证每个故障嵌入式设备确定针对自身的新IP地址,避免占用其他嵌入式设备的IP地址,该设备信息还可以包括故障嵌入式设备的MAC地址。并且所发送的修改指令中携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址,以使每个故障嵌入式设备可以通过U-boot筛选出针对自身的MAC地址的新IP地址。
当然,可以理解的是,该设备信息中还可以携带其他的可以唯一标识故障嵌入式设备的信息,本申请实施例并不对该类信息进行限定。
在一种具体实现方式中,所述设备信息还可以包括故障嵌入式设备的MAC地址;
在所述接收所有故障嵌入式设备发送的修复请求之前,本申请实施例所提供的一种修复包发送方法还可以包括:
接收该至少一个故障嵌入式设备广播的地址解析协议ARP信息;
存储该ARP信息中所携带的所对应故障嵌入式设备的MAC地址与该新IP地址的对应关系。
可以理解的是,在故障嵌入式设备修改IP地址后,网络中的其他主机(包括但不限于服务器和各交换机设备)中未存储有故障嵌入式设备的新IP地址与MAC地址的对应关系,例如ARP(Address Resolution Protocol,地址解析协议)表中未存储有故障嵌入式设备的新IP地址与MAC地址的对应关系,并且U-boot不能对其他主机的ARP请求进行应答。为了避免后续的故障嵌入式设备无法与其他主机进行信息交互,故障嵌入式设备在修改自身的IP地址后,可以通过U-boot主动广播ARP信息,以使其他主机可以增加存储故障嵌入式设备的新IP地址与MAC地址的对应关系。其中,服务器存储该对应关 系后,可以向故障嵌入式设备发送所对应的修复包,以使故障嵌入式设备能够完成故障修复。
另一方面,本申请实施例提供了一种修复包接收方法,其中,该修复包接收方法基于故障修复系统,如图2所示,可以包括步骤:
S201:发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
嵌入式设备通电后,通过U-boot检测到自身出现故障后,如主程序损坏,通过U-boot定时或不定时广播自身的设备信息。
S202:接收该服务器发送的修改指令,其中,该修改指令中携带所分配的新IP地址,该新IP地址为该服务器分配的地址;
该修改指令为服务器针对每个故障嵌入式设备发送的。当故障嵌入式设备为多个时,该故障嵌入式设备通过U-boot接收修改指令后,再通过U-boot从其中筛选出针对自身的修改指令,该针对自身的修改指令中携带服务器所分配的针对故障嵌入式设备自身的新IP地址。
S203:修改故障嵌入式设备的原IP地址为所对应的新IP地址,以用该新IP地址与该服务器直连;
故障嵌入式设备通过U-boot将原IP地址修改为所对应的新IP地址,并通过该新IP地址与服务器直连。
S204:发送修复请求至该服务器;
S205:接收该服务器发送的与该修复请求对应的修复包,完成故障修复。
故障嵌入式设备通过U-boot发送修复请求至服务器,并通过U-boot接收服务器发送的与该修复请求对应的修复包,完成故障修复。
应用上述发明实施例,嵌入式设备故障后,修改IP地址,并在利用所修改成的新IP地址与服务器直连后,向服务器发送修复请求,接收服务器发送的与该修复请求对应的修复包,完成故障修复。实现故障嵌入式设备与服务器的快速直连,进一步实现故障嵌入式设备的故障的快速修复。
在一种具体实现方式中,为了更好的保证服务器针对每个故障嵌入式设备分配新的IP地址,保证每个故障嵌入式设备确定针对自身的新IP地址,避免占用其他嵌入式设备的IP地址。所述修改指令中还携带该故障嵌入式设备的MAC地址;
所述修改该故障嵌入式设备的原IP地址为所对应的新IP地址,包括:
修改该故障嵌入式设备的原IP地址为自身的MAC地址所对应的新IP地址。
在一种具体实现方式中,所述修改指令中还携带该故障嵌入式设备的MAC地址;
在所述发送修复请求至该服务器之前,本申请实施例所提供的一种修复包接收方法还可以包括:
广播携带该故障嵌入式设备的MAC地址与该新IP地址的对应关系的地址解析协议ARP信息,以使该服务器接收该ARP信息后,存储该故障嵌入式设备的MAC地址与该新IP地址的对应关系。
可以理解的是,故障嵌入式设备通过U-boot从修改指令中确定出针对自身的MAC地址的新IP地址后,通过U-boot修改原IP地址为该新IP地址,并主动广播ARP信息,以使包括服务器在内的其他主机,接收到该ARP信息后,存储该故障嵌入式设备的MAC地址与该新IP地址的对应关系,以使故障嵌入式设备能够与其他主机进行后续的信息交互。其中,服务器可以依据该对应关系,将故障嵌入式设备对应的修复包,发送给该故障嵌入式设备,以使该故障嵌入式设备完成故障修复。其中,故障嵌入式设备广播的设备信息中还可以携带设备型号等信息,以使服务器可以根据设备型号,向故障嵌入式设备发送相应的修复包。
具体的,如图3所示,为服务器与故障嵌入式设备的一种交互示意图:
故障嵌入式设备出现故障,如主程序损坏,广播自身的设备信息;
TFTP服务器接收故障嵌入式设备广播的设备信息;
TFTP服务器可以显示所接收的每个设备信息,并获得为每个故障嵌入式设备分配的新IP地址;
TFTP服务器广播或多播携带所获得的新IP地址的修改指令;
每个故障嵌入式设备接收修改指令,通过U-boot从修改指令中筛选出针对自身的新IP地址,并修改IP地址;
每个故障嵌入式设备广播ARP信息,ARP信息中携带自身的MAC地址与新IP地址的对应关系;
TFTP服务器接收每个故障嵌入式设备广播的ARP信息,存储ARP信息信息中所携带的每个故障嵌入式设备的MAC地址与新IP地址的对应关系,并且与每个故障嵌入式设备进行直连;
每个故障嵌入式设备与TFTP服务器直连后,向TFTP服务器发送修复请求;
TFTP服务器接收所有故障嵌入式设备发送的修复请求;该修复请求中可以携带所对应故障嵌入式设备的设备型号等信息;
TFTP服务器针对每个故障嵌入式设备发送对应的修复包,以使每个故障嵌入式设备完成故障修复。
其中,每个故障嵌入式设备故障修复完毕后,均可以向TFTP服务器反馈故障修复成功的信息。
相应于上述方法实施例,本申请实施例提供了一种修复包发送装置,如图4所示,所述装置可以包括:第一接收模块401、获得模块402、第一发送模块403、第二接收模块404和第二发送模块405;
所述第一接收模块401,用于接收至少一个故障嵌入式设备发送的设备信息;
所述获得模块402,用于获得为每个故障嵌入式设备分配的新IP地址;
所述第一发送模块403,用于发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
所述第二接收模块404,用于接收所有故障嵌入式设备发送的修复请求;
所述第二发送模块405,用于发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
应用本申请实施例,服务器接收至少一个故障嵌入式设备发送的包括故障嵌入式设备的原IP地址的设备信息;获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连;接收所有故障嵌入式设备发送的修复请求;发送与修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。可见,服务器可以为处于同网段和不同网段的故障嵌入式设备分配新的IP地址,以使每个故障嵌入式设备从修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,无需通过人工方式逐一来修改故障嵌入式设备的IP地址,实现了故障嵌入式设备与服务器的快速直连,并进一步的实现了故障嵌入式设备的故障的快速修复。
在一种具体实现方式中,所述设备信息中包括故障嵌入式设备的原IP地址。
在一种具体实现方式中,所述装置还包括确定模块;
所述确定模块,用于在所述接收至少一个故障嵌入式设备发送的设备信息之后,依据所述设备信息,从所述至少一个故障嵌入式设备中,确定所有第一故障嵌入式设备,其中,所述第一故障嵌入式设备为原IP地址与所述服务器不在同一网段的故障嵌入式设备;
所述获得模块402,具体用于获得为每个第一故障嵌入式设备分配的新IP地址。
在一种具体实现方式中,所述装置还包括判断模块;
所述判断模块,用于在所述发送修改指令至每个故障嵌入式设备之前,根据所述设备信息,判断所对应故障嵌入式设备是否支持多播;
所述第一发送模块403,具体用于当所对应故障嵌入式设备支持多播时,多播所对应故障嵌入式设备的修改指令;当所对应故障嵌入式设备不支持多播时,广播所对应故障嵌入式设备的修改指令。
在一种具体实现方式中,所述设备信息还包括故障嵌入式设备的MAC地 址;
所述第一发送模块403,具体用于分别发送携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址的修改指令,至每个故障嵌入式设备;
所述针对自身的新IP地址为:针对自身的MAC地址的新IP地址。
在一种具体实现方式中,所述设备信息还包括故障嵌入式设备的MAC地址;
所述装置还包括第三接收模块和存储模块;
所述第三接收模块,用于接收所述至少一个故障嵌入式设备广播的ARP信息;
所述存储模块,用于存储所述ARP信息中所携带的所对应故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
另一方面,基于上述方法实施例,本申请实施例提供了一种修复包接收装置,如图5所示,所述装置可以包括:第三发送模块501、第四接收模块502、修改模块503、第四发送模块504和第五接收模块505;
所述第三发送模块501,用于发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
所述第四接收模块502,用于接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
所述修改模块503,用于修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
所述第四发送模块504,用于发送修复请求至所述服务器;
所述第五接收模块505,用于接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
应用本申请实施例,嵌入式设备故障后,修改IP地址,并在利用所修改成的新IP地址与服务器直连后,向服务器发送修复请求,接收服务器发送的与该修复请求对应的修复包,完成故障修复。实现故障嵌入式设备与服务器的快 速直连,进一步实现故障嵌入式设备的故障的快速修复。
在一种具体实现方式中,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
所述修改模块503,具体用于修改所述故障嵌入式设备的原IP地址为自身的MAC地址所对应的新IP地址。
在一种具体实现方式中,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
所述装置还包括广播模块;
所述广播模块,用于在所述发送修复请求至所述服务器之前,广播携带所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系的地址解析协议ARP信息,以使所述服务器接收所述ARP信息后,存储所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
本申请实施例提供一种故障修复系统,如图6所示,所述系统包括:
故障嵌入式设备601,用于发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
服务器602,用于接收故障嵌入式设备发送的设备信息,并获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,其中,所述修改指令携带所分配的新IP地址;
所述故障嵌入式设备601还用于接收所述服务器发送的修改指令;修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;并发送修复请求至所述服务器;
所述服务器602还用于接收所有故障嵌入式设备发送的修复请求;并发送与所述修复请求对应的修复包至所有故障嵌入式设备;
所述故障嵌入式设备601还用于接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
本申请实施例还提供了一种电子设备,其特征在于,包括处理器和存储 器,其中,存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的修复包发送方法,或,实现本申请实施例所提供的修复包接收方法,其中,该修复包发送方法可以包括步骤:
接收至少一个故障嵌入式设备发送的设备信息;
获得为每个故障嵌入式设备分配的新IP地址;
发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
接收所有故障嵌入式设备发送的修复请求;
发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复;
该修复包接收方法可以包括步骤:
发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
发送修复请求至所述服务器;
接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
应用本申请实施例,该电子设备的处理器运行存储器中存储的计算机程序,以执行本申请实施例所提供的修复包发送方法,或,以执行本申请实施例所提供的修复包接收方法,因此能够实现:故障嵌入式设备与服务器的快速直连,并进一步的实现了故障嵌入式设备的故障的快速修复。
其中,上述电子设备的处理器运行存储器中存储的计算机程序,以执行本申请实施例所提供的修复包发送方法时,上述电子设备可以为前述的服务 器;上述电子设备的处理器运行存储器中存储的计算机程序,以执行本申请实施例所提供的修复包接收方法时,上述电子设备可以为前述的故障嵌入式设备。
本申请实施例还提供了一种计算机程序,所述计算机程序用于被运行以执行本申请实施例所提供的修复包发送方法,或,本申请实施例所提供的修复包接收方法,其中,修复包发送方法可以包括步骤:
接收至少一个故障嵌入式设备发送的设备信息;
获得为每个故障嵌入式设备分配的新IP地址;
发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
接收所有故障嵌入式设备发送的修复请求;
发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复;
该修复包接收方法可以包括步骤:
发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
发送修复请求至所述服务器;
接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
应用本申请实施例,可计算机程序在运行时执行本申请实施例所提供的修复包发送方法,或,执行本申请实施例所提供的修复包接收方法,因此能够实现:故障嵌入式设备与服务器的快速直连,并进一步的实现了故障嵌入式设备的故障的快速修复。
本申请实施例提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行本申请实施例所提供的修复包发送方法或本申请实施例所提供的修复包接收方法,其中,修复包发送方法可以包括步骤:
接收至少一个故障嵌入式设备发送的设备信息;
获得为每个故障嵌入式设备分配的新IP地址;
发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
接收所有故障嵌入式设备发送的修复请求;
发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复;
该修复包接收方法可以包括步骤:
发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
发送修复请求至所述服务器;
接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
应用本申请实施例,存储介质存储有在运行时执行本申请实施例所提供的修复包发送方法的计算机程序,或,存储有在运行时执行本申请实施例所提供的修复包接收方法的计算机程序,因此能够实现:故障嵌入式设备与服务器的快速直连,并进一步的实现了故障嵌入式设备的故障的快速修复。
对于系统/装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来 将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (22)

  1. 一种修复包发送方法,其特征在于,所述方法包括:
    接收至少一个故障嵌入式设备发送的设备信息;
    获得为每个故障嵌入式设备分配的新IP地址;
    发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
    接收所有故障嵌入式设备发送的修复请求;
    发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
  2. 根据权利要求1所述的方法,其特征在于,所述设备信息中包括故障嵌入式设备的原IP地址。
  3. 根据权利要求2所述的方法,其特征在于,在所述接收至少一个故障嵌入式设备发送的设备信息之后,所述方法还包括:
    依据所述设备信息,从所述至少一个故障嵌入式设备中,确定所有第一故障嵌入式设备,其中,所述第一故障嵌入式设备为原IP地址与所述服务器不在同一网段的故障嵌入式设备;
    所述获得为每个故障嵌入式设备分配的新IP地址,包括:
    获得为每个第一故障嵌入式设备分配的新IP地址。
  4. 根据权利要求2所述的方法,其特征在于,在所述发送修改指令至每个故障嵌入式设备之前,所述方法还包括:
    根据所述设备信息,判断所对应故障嵌入式设备是否支持多播;
    当所对应故障嵌入式设备支持多播时,所述发送修改指令至每个故障嵌入式设备为:多播所对应故障嵌入式设备的修改指令;
    当所对应故障嵌入式设备不支持多播时,所述发送修改指令至每个故障嵌入式设备为:广播所对应故障嵌入式设备的修改指令。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述设备信息还包括故障嵌入式设备的MAC地址;
    所述发送修改指令至每个故障嵌入式设备,包括:
    分别发送携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址的修改指令,至每个故障嵌入式设备;
    所述针对自身的新IP地址为:针对自身的MAC地址的新IP地址。
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述设备信息还包括故障嵌入式设备的MAC地址;
    在所述接收所有故障嵌入式设备发送的修复请求之前,所述方法还包括:
    接收所述至少一个故障嵌入式设备广播的ARP信息;
    存储所述ARP信息中所携带的所对应故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
  7. 一种修复包接收方法,其特征在于,所述方法包括:
    发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
    接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
    修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
    发送修复请求至所述服务器;
    接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
  8. 根据权利要求7所述的方法,其特征在于,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
    所述修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,包括:
    修改所述故障嵌入式设备的原IP地址为自身的MAC地址所对应的新IP地址。
  9. 根据权利要求7或8所述的方法,其特征在于,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
    在所述发送修复请求至所述服务器之前,所述方法还包括:
    广播携带所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系的地址解析协议ARP信息,以使所述服务器接收所述ARP信息后,存储所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
  10. 一种修复包发送装置,其特征在于,所述装置包括:第一接收模块、获得模块、第一发送模块、第二接收模块和第二发送模块;
    所述第一接收模块,用于接收至少一个故障嵌入式设备发送的设备信息;
    所述获得模块,用于获得为每个故障嵌入式设备分配的新IP地址;
    所述第一发送模块,用于发送修改指令至每个故障嵌入式设备,以使每个故障嵌入式设备从所述修改指令中获得针对自身的新IP地址后,用新IP地址与服务器直连,其中,所述修改指令携带所分配的新IP地址;
    所述第二接收模块,用于接收所有故障嵌入式设备发送的修复请求;
    所述第二发送模块,用于发送与所述修复请求对应的修复包至所有故障嵌入式设备,以使所有故障嵌入式设备完成故障修复。
  11. 根据权利要求10所述的装置,其特征在于,,所述设备信息中包括故障嵌入式设备的原IP地址。
  12. 根据权利要求11所述的装置,其特征在于,所述装置还包括确定模块;
    所述确定模块,用于在所述接收至少一个故障嵌入式设备发送的设备信息之后,依据所述设备信息,从所述至少一个故障嵌入式设备中,确定所有第一故障嵌入式设备,其中,所述第一故障嵌入式设备为原IP地址与所述服务器不在同一网段的故障嵌入式设备;
    所述获得模块,具体用于获得为每个第一故障嵌入式设备分配的新IP地址。
  13. 根据权利要求11所述的装置,其特征在于,所述装置还包括判断模 块;
    所述判断模块,用于在所述发送修改指令至每个故障嵌入式设备之前,根据所述设备信息,判断所对应故障嵌入式设备是否支持多播;
    所述第一发送模块,具体用于当所对应故障嵌入式设备支持多播时,多播所对应故障嵌入式设备的修改指令;当所对应故障嵌入式设备不支持多播时,广播所对应故障嵌入式设备的修改指令。
  14. 根据权利要求10-13任一项所述的装置,其特征在于,所述设备信息还包括故障嵌入式设备的MAC地址;
    所述第一发送模块,具体用于分别发送携带每个故障嵌入式设备的MAC地址及对应分配的新IP地址的修改指令,至每个故障嵌入式设备;
    所述针对自身的新IP地址为:针对自身的MAC地址的新IP地址。
  15. 根据权利要求10-13任一项所述的装置,其特征在于,所述设备信息还包括故障嵌入式设备的MAC地址;
    所述装置还包括第三接收模块和存储模块;
    所述第三接收模块,用于接收所述至少一个故障嵌入式设备广播的ARP信息;
    所述存储模块,用于存储所述ARP信息中所携带的所对应故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
  16. 一种修复包接收装置,其特征在于,所述装置包括:第三发送模块、第四接收模块、修改模块、第四发送模块和第五接收模块;
    所述第三发送模块,用于发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
    所述第四接收模块,用于接收所述服务器发送的修改指令,其中,所述修改指令中携带所分配的新IP地址,所述新IP地址为所述服务器分配的地址;
    所述修改模块,用于修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;
    所述第四发送模块,用于发送修复请求至所述服务器;
    所述第五接收模块,用于接收所述服务器发送的与所述修复请求对应的修复包,完成故障修复。
  17. 根据权利要求16所述的装置,其特征在于,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
    所述修改模块,具体用于修改所述故障嵌入式设备的原IP地址为自身的MAC地址所对应的新IP地址。
  18. 根据权利要求16或17所述的装置,其特征在于,所述修改指令中还携带所述故障嵌入式设备的MAC地址;
    所述装置还包括广播模块;
    所述广播模块,用于在所述发送修复请求至所述服务器之前,广播携带所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系的地址解析协议ARP信息,以使所述服务器接收所述ARP信息后,存储所述故障嵌入式设备的MAC地址与所述新IP地址的对应关系。
  19. 一种故障修复系统,其特征在于,所述系统包括:
    故障嵌入式设备,用于发送设备信息至服务器,所述设备信息中包括故障嵌入式设备的原IP地址;
    服务器,用于接收故障嵌入式设备发送的设备信息,并获得为每个故障嵌入式设备分配的新IP地址;发送修改指令至每个故障嵌入式设备,其中,所述修改指令携带所分配的新IP地址;
    所述故障嵌入式设备还用于接收所述服务器发送的修改指令;修改所述故障嵌入式设备的原IP地址为所对应的新IP地址,以用所述新IP地址与所述服务器直连;并发送修复请求至所述服务器;
    所述服务器还用于接收所有故障嵌入式设备发送的修复请求;并发送与所述修复请求对应的修复包至所有故障嵌入式设备;
    所述故障嵌入式设备还用于接收所述服务器发送的与所述修复请求对应 的修复包,完成故障修复。
  20. 一种电子设备,其特征在于,包括处理器和存储器,其中,存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的计算机程序时,实现权利要求1-6任一项所述的修复包发送方法,或,实现权利要求7-9任一项所述的修复包接收方法。
  21. 一种计算机程序,其特征在于,所述计算机程序用于被运行以执行权利要求1-6任一项所述的修复包发送方法,或,执行权利要求7-9任一项所述的修复包接收方法。
  22. 一种存储介质,其特征在于,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行权利要求1-6任一项所述的修复包发送方法,或,执行权利要求7-9任一项所述的修复包接收方法。
PCT/CN2017/089366 2016-07-21 2017-06-21 一种修复包发送、接收方法及装置和故障修复系统 WO2018014695A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610588640.8A CN107645404B (zh) 2016-07-21 2016-07-21 一种修复包发送、接收方法及装置和故障修复系统
CN201610588640.8 2016-07-21

Publications (1)

Publication Number Publication Date
WO2018014695A1 true WO2018014695A1 (zh) 2018-01-25

Family

ID=60991906

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/089366 WO2018014695A1 (zh) 2016-07-21 2017-06-21 一种修复包发送、接收方法及装置和故障修复系统

Country Status (2)

Country Link
CN (1) CN107645404B (zh)
WO (1) WO2018014695A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833799B (zh) * 2019-04-15 2022-04-05 杭州海康威视数字技术股份有限公司 一种led接收组件及接收卡切换方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070022184A1 (en) * 2005-07-21 2007-01-25 Rakesh Sharma Method and apparatus for a secure network install
CN101820387A (zh) * 2010-02-08 2010-09-01 北京航空航天大学 一种易扩展的快速机群部署方法
CN103200271A (zh) * 2013-04-17 2013-07-10 北京百度网讯科技有限公司 Arm服务器及其自动化安装系统的方法
CN103442041A (zh) * 2013-08-14 2013-12-11 深圳市同洲电子股份有限公司 嵌入式设备固件升级的方法、装置及其系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873726A (zh) * 2010-07-01 2010-10-27 华为终端有限公司 无线中继器的升级方法及无线接入设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070022184A1 (en) * 2005-07-21 2007-01-25 Rakesh Sharma Method and apparatus for a secure network install
CN101820387A (zh) * 2010-02-08 2010-09-01 北京航空航天大学 一种易扩展的快速机群部署方法
CN103200271A (zh) * 2013-04-17 2013-07-10 北京百度网讯科技有限公司 Arm服务器及其自动化安装系统的方法
CN103442041A (zh) * 2013-08-14 2013-12-11 深圳市同洲电子股份有限公司 嵌入式设备固件升级的方法、装置及其系统

Also Published As

Publication number Publication date
CN107645404A (zh) 2018-01-30
CN107645404B (zh) 2020-10-02

Similar Documents

Publication Publication Date Title
US9525648B2 (en) Method for acquiring physical address of virtual machine
US9584392B2 (en) Method and apparatus for managing segments connected via network
US8862865B2 (en) Rebooting infiniband clusters
US20100174810A1 (en) Distributed preboot execution environment (pxe) server booting
CN103546315B (zh) 一种dhcp服务器的备份系统、方法及设备
TW200929928A (en) Method and system for assigning a plurality of MACs to a plurality of processors
US20120124242A1 (en) Server and method for testing pxe function of network interface card
CN105204955B (zh) 一种虚拟机故障修复方法和装置
US8938516B1 (en) Switch provided failover
TW201421232A (zh) 在一冗餘群組中實施故障備援的方法、裝置與電腦程式產品
US20140052843A1 (en) Auto Management of a Virtual Device Context Enabled Network Infrastructure
WO2015149625A1 (zh) 一种多实例并行的网元接入方法和系统
WO2020238891A1 (zh) 物理主机的租赁方法、装置、云平台及可读存储介质
CN104735176A (zh) Pxe启动的方法、装置和服务器单板
CN102123105A (zh) Vrrp标准协议与vrrp负载均衡协议之间的切换方法和设备
US20220006868A1 (en) N+1 Redundancy for Virtualized Services with Low Latency Fail-Over
JP5775473B2 (ja) エッジ装置冗長化システム、切替制御装置およびエッジ装置冗長化方法
WO2018014695A1 (zh) 一种修复包发送、接收方法及装置和故障修复系统
CN105939344B (zh) 一种tcp连接的建立方法及装置
WO2014101145A1 (zh) 传输网络信息的方法及装置
US20050185589A1 (en) System and method for maintaining network connectivity during remote configuration of an information handling system
US20140140343A1 (en) Apparatus and method for efficiently multicasting data to a plurality of destination devices
US10514991B2 (en) Failover device ports
US8909816B2 (en) Implementing a logical unit reset command in a distributed storage system
CN106452890A (zh) 一种基于Ubuntu系统下自动配置PXE服务器方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17830329

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17830329

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 18/07/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17830329

Country of ref document: EP

Kind code of ref document: A1