CN114116289A - Mirror image file repairing method and device, AP (access point) equipment and network system - Google Patents

Mirror image file repairing method and device, AP (access point) equipment and network system Download PDF

Info

Publication number
CN114116289A
CN114116289A CN202111446541.3A CN202111446541A CN114116289A CN 114116289 A CN114116289 A CN 114116289A CN 202111446541 A CN202111446541 A CN 202111446541A CN 114116289 A CN114116289 A CN 114116289A
Authority
CN
China
Prior art keywords
equipment
repair
mirror image
file
damaged
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111446541.3A
Other languages
Chinese (zh)
Inventor
张晓波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202111446541.3A priority Critical patent/CN114116289A/en
Publication of CN114116289A publication Critical patent/CN114116289A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/08Access point devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a method and a device for repairing a mirror image file, AP equipment and a network system. The method comprises the following steps: after determining a damaged paging file in a self-stored image file, constructing an image repairing request message; the mirror image repairing request message comprises an equipment model, an equipment version number and the number of the damaged paging file; broadcasting the mirror image repair request message so that other AP equipment in the network system receives the mirror image repair request message; receiving a repair data response message sent by other AP equipment; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; the repair data response message comprises paging file data corresponding to the number of the damaged paging file; and repairing the mirror image file based on the paging file data. By the method, a worker can be prevented from replacing the equipment on site, the reliability of the AP equipment is enhanced, the capacity of the memory does not need to be increased, and the hardware cost of the AP equipment is saved.

Description

Mirror image file repairing method and device, AP (access point) equipment and network system
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for repairing an image file, an AP device, and a network system.
Background
An image file of an AP (Access Point) device is generally stored in a non-volatile flash memory (NOR flash), and the capacity of the NOR flash memory is generally 1 to 32 megabits, and the larger the capacity is, the higher the price is. The mirror file belongs to a running system file and is from several to tens of megabits in size. During the operation of the system, the image file can be modified or damaged accidentally. Once the image file of the AP device is damaged, the system of the AP device cannot be normally started, and a worker often needs to go to a field to replace the device and then take back to repair the device, which results in high maintenance cost.
Aiming at the problem that the image file is modified or accidentally damaged, a double-image mode is provided at present, and when the running image file is damaged, the AP equipment is started by using the backup image file. That is, two mirror images are simultaneously stored in the AP device. But this approach requires a larger capacity of non-volatile flash memory, increasing the hardware cost of the AP device.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for repairing an image file, an AP device, and a network system, so as to implement quick repair of an image file without increasing hardware cost of the AP device.
The invention is realized by the following steps:
in a first aspect, an embodiment of the present application provides a method for repairing an image file, where the method is applied to an AP device in a network system, and the method includes: after determining a damaged paging file in a self-stored image file, constructing an image repairing request message; the mirror image repairing request message comprises an equipment model, an equipment version number and the number of the damaged paging file; broadcasting the mirror image repair request message so that other AP equipment in the network system receives the mirror image repair request message; receiving a repair data response message sent by the other AP equipment; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; the repair data response message comprises paging file data corresponding to the number of the damaged paging file; and repairing the mirror image file based on the paging file data.
In the embodiment of the application, after the AP device determines the damaged paging file in the stored image file, the AP device sends the image repair request message to other AP devices in the same network system, and then the repair of the image file is completed by using the paging file data transmitted by the AP devices with the same device model and the same device version number in the same network system.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, before the receiving the repair data response packet sent by the other AP device, the method further includes: receiving mirror image repair confirmation messages sent by the other AP equipment; the mirror image repair confirmation message comprises the number of the damaged paging file; and sending a repair data request message to the other AP equipment, wherein the repair data request message comprises the number of the damaged paging file.
In this embodiment of the present application, before receiving a repair data response message sent by another AP device, the AP device needs to perform a handshake with another AP device, that is, receive an image repair confirmation message sent by another AP device, so as to determine that the other AP device can send paging file data corresponding to a number of a damaged paging file. By the method, the accuracy and the reliability of obtaining the paging file data corresponding to the number of the damaged paging file can be improved, and the condition that the AP equipment analyzes the received repair data response message for multiple times to determine whether the message contains the paging file data corresponding to the number of the damaged paging file is avoided.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, before the receiving the repair data response packet sent by the other AP device, the method further includes: receiving mirror image repair confirmation messages sent by a plurality of other AP devices; acquiring the MAC address of each other AP device from mirror image repair confirmation messages sent by the other AP devices; determining the AP equipment with the minimum MAC address as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment; or acquiring the receiving time for receiving the mirror image repair confirmation message sent by each other AP device; and determining the AP equipment with the earliest receiving time as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment.
In this embodiment of the present application, when receiving the mirror image repair confirmation messages sent by multiple other AP devices, the AP device determines one AP device of the multiple other AP devices as a target AP device that sends a repair data request message to the AP device, and then sends the repair data request message only to the target AP device. And, in one case, the AP device having the smallest MAC address is determined as the destination AP device, so as to reasonably determine the destination AP device. In another case, the AP device corresponding to the received first mirror repair acknowledgement packet is determined as the destination AP device, and by this means, the destination AP device can be determined as the fastest.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, if the repair of the image file based on the paging file data fails, the method further includes: determining one of the remaining plurality of other AP devices as a new destination AP device; sending the repair data request message to the new destination AP device, wherein the repair data request message includes the number of the damaged paging file; receiving a repair data response message sent by the new target AP equipment; the repair data response message sent by the new target AP equipment comprises paging file data corresponding to the number of the damaged paging file; and repairing the mirror image file based on paging file data in a repair data response message sent by the new target AP equipment.
In this embodiment of the application, after the AP device fails to repair the image file based on the currently acquired paging file data, the AP device may further continue to acquire the paging file data from the remaining multiple other AP devices, so as to ensure that the AP device can smoothly complete repair the image file.
In a second aspect, an embodiment of the present application provides an image file repair apparatus, which is applied to an AP device in a network system, and the apparatus includes: the building module is used for building a mirror image repair request message after determining a damaged paging file in a mirror image file stored by the building module; the mirror image repairing request message comprises an equipment model, an equipment version number and the number of the damaged paging file; a sending module, configured to broadcast the mirror image repair request packet, so that other AP devices in the network system receive the mirror image repair request packet; a receiving module, configured to receive a repair data response packet sent by the other AP device; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; the repair data response message comprises paging file data corresponding to the number of the damaged paging file; and the repair module is used for repairing the mirror image file based on the paging file data.
With reference to the technical solution provided by the second aspect, in some possible implementation manners, the receiving module is further configured to receive a mirror repair confirmation message sent by the other AP device before receiving a repair data response message sent by the other AP device; the mirror image repair confirmation message comprises the number of the damaged paging file; the sending module is further configured to send a repair data request packet to the other AP devices, where the repair data request packet includes the number of the damaged paging file.
With reference to the technical solution provided by the second aspect, in some possible implementation manners, the receiving module is further configured to receive mirror repair confirmation messages sent by a plurality of other AP devices before receiving the repair data response messages sent by the other AP devices; acquiring the MAC address of each other AP device from mirror image repair confirmation messages sent by the other AP devices; determining the AP equipment with the minimum MAC address as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment; or acquiring the receiving time for receiving the mirror image repair confirmation message sent by each other AP device; and determining the AP equipment with the earliest receiving time as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment.
In a third aspect, an embodiment of the present application provides an AP device, including: a processor and a memory, the processor and the memory connected; the memory is used for storing programs; the processor is configured to execute the program stored in the memory to perform the method as provided in the above-described first aspect embodiment and/or in combination with some possible implementations of the above-described first aspect embodiment.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, performs the method as set forth in the above first aspect embodiment and/or in combination with some possible implementations of the above first aspect embodiment.
In a fifth aspect, an embodiment of the present application provides a network system, including at least two AP devices; the AP device is configured to, when running, perform a method as provided in the foregoing first aspect embodiment and/or in combination with some possible implementations of the foregoing first aspect embodiment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a block diagram of a network system according to an embodiment of the present disclosure.
Fig. 2 is a block diagram of an AP device according to an embodiment of the present disclosure.
Fig. 3 is a flowchart of a method for repairing an image file according to an embodiment of the present application.
Fig. 4 is a flowchart of another image file repair method according to an embodiment of the present application.
Fig. 5 is a block diagram of an image file repair apparatus according to an embodiment of the present disclosure.
Icon: 10-a network system; 100-AP devices; 110-a processor; 120-a memory; 200-mirror image file repair device; 210-a building block; 220-a sending module; 230-a receiving module; 240-repair module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, an embodiment of the present application provides a network system 10, where the network system 10 includes at least two AP devices 100.
At least two AP devices 100 include at least two AP devices 100 with the same device model and device version number. And AP devices 100 having the same device model and device version number can communicate with each other, for example, via a network.
Illustratively, the network system 10 includes an AP device B1 and an AP device B2, where the AP device B1 and the AP device B2 have the same device model and device version number, and the AP device B1 and the AP device B2 can communicate with each other through the network.
Illustratively, the network system 10 includes an AP device B1, an AP device B2, an AP device C1, and an AP device C2, wherein the AP device B1 and the AP device B2 have the same device model and device version number, and the AP device B1 and the AP device B2 are capable of communicating with each other through the network. The AP device C1 and the AP device C2 have the same device model and device version number, and the AP device C1 and the AP device C2 can communicate with each other through the network.
The AP device may be, but is not limited to, a wireless router, a gateway device. Of course, the AP device may be a fat AP or a thin AP, and the application is not limited in this respect. Referring to fig. 2, structurally, the AP device 100 may include a processor 110 and a memory 120.
The processor 110 and the memory 120 are electrically connected directly or indirectly to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The image file repair device includes at least one software module that may be stored in the memory 120 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the AP device 100. The processor 110 is configured to execute executable modules stored in the memory 120, such as software functional modules and computer programs included in the image file repair apparatus, so as to implement the image file repair method. The processor 110 may execute the computer program upon receiving the execution instruction.
The processor 110 may be an integrated circuit chip having signal processing capabilities. The Processor 110 may also be a general-purpose Processor, for example, a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 120 may be, but is not limited to, a non-volatile flash Memory (NOR flash), a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), and an electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 120 is used for storing a program, and the processor 110 executes the program after receiving the execution instruction.
It should be noted that the structure shown in fig. 2 is merely an illustration, and the AP device 100 provided in the embodiment of the present application may also have fewer or more components than those in fig. 2, or have a different configuration from that shown in fig. 2. Further, the components shown in fig. 2 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 3, fig. 3 is a flowchart illustrating steps of a method for repairing an image file according to an embodiment of the present application, where the method is applied to an AP device in a network system, where the AP device may be any device in the network system. It should be noted that, the method for repairing an image file provided in the embodiment of the present application is not limited by the sequence shown in fig. 3 and the following, and the method includes: step S101 to step S104.
Step S101: after determining a damaged paging file in a self-stored image file, constructing an image repairing request message; the mirror image repair request message includes the device model, the device version number, and the number of the damaged paging file.
The AP device may store the image file in a NOR flash nonvolatile flash memory. Non-volatile flash memory typically stores two types of files, uboot files and image files. The uboot file is a system starting boot file, and the image file is a mirror image file. uboot files are generally not corrupted, while image files may be modified or accidentally corrupted. Once the image file of the device is damaged, the system cannot be started normally.
The information included in the image file may be referred to the following table:
Figure BDA0003384980220000081
the Image file includes an Image header (Image head) and an Image body (Image body).
The mirror image head includes: device Model (Model), mirror Version number (Version), mirror Body Page number (Page number), mirror Body check value (Body CRC or MD5), mirror Body Page check value (Page1 CRC or MD 5).
The device model is used for determining whether the mirror image main body is matched with the hardware device, and if not, the mirror image main body cannot be normally started.
The image version number is the version number corresponding to the image body.
The mirror image body refers to a file required by the running of the AP equipment, the file can be divided into a plurality of pages according to the size, each page is numbered in sequence, and the size of each page is fixed.
The mirror body Check value is obtained by performing CRC (Cyclic Redundancy Check) or MD5(Message Digest Algorithm 5) Check on the mirror body.
The mirror body page check value is obtained by performing a CRC or MD5 check on each page file. Illustratively, if the image file is divided into 48 pages, the image file includes 48 page files, and the image header includes 48 image body page check values.
Since CRC checks and MD5 checks are well known in the art, this application is not overly elaborated. It should be noted that, in general, the mirror body check value and the mirror body page check value are checked in the same way, such as both CRC checks or both MD5 checks.
The specific detection process of the AP equipment on the mirror image file is as follows: the AP equipment starts the mirror image file by using a uboot bootstrap program, and before starting, the mirror image main body check value is checked. The mirror body is checked for CRC or MD5 to obtain a check value (the check method used here is the same as the check method corresponding to the stored check value), and then compared with the mirror body check value in the mirror header. If the version is consistent with the version, the verification is successful, and the version is started normally; and if the two numbers are not consistent, the check fails, and the boot mode of the uboot bootstrap program is entered. The network communication function, such as message receiving and sending, is still provided in the Boot mode.
When the image file is determined to be damaged, the damaged paging file in the image file needs to be determined. The specific process is as follows: and sequentially performing CRC or MD5 check on each paging file to obtain a corresponding check value (the check mode adopted here is consistent with the check mode corresponding to the stored check value), and then comparing the obtained check value of each paging file with the corresponding paging check value of the mirror body in the mirror header. If the paging file is consistent with the paging file, the current paging file is not damaged, if the paging file is inconsistent with the paging file, the current paging file is damaged, and then the number of the damaged paging file is recorded.
It should be noted that determining the damaged paging file in the image file may be performed in Boot mode. In the mode, the mirror image main body check value can be checked again so as to perform secondary check on the mirror image file and reduce misjudgment on the verification result of the mirror image file.
And after determining the number of the damaged paging file, constructing a mirror image repair request message. The mirror image repair request message includes the device model, the device version number, and the number of the damaged paging file. The AP devices with the same device model and device version number have the same image file, and the image main bodies in the image file are also the same. Therefore, the mirror image repair request message carries the device model and the device version number so as to find out the AP device having the same device model and the same device version number in the network system.
Step S102: and broadcasting the mirror image repair request message so that other AP equipment in the network system receives the mirror image repair request message.
After the mirror image repair request message is constructed, the AP equipment sends the message in a network system in a broadcasting mode, so that other AP equipment in the network system can receive the mirror image repair request message.
Step S103: receiving a repair data response message sent by other AP equipment; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; the repair data response message includes paging file data corresponding to the number of the damaged paging file.
After receiving the mirror image repair request message, other AP equipment in the network system analyzes the message, judges whether the equipment model and the equipment version number carried by the message are consistent with the equipment model and the equipment version number of the AP equipment, judges whether the AP equipment comprises paging file data corresponding to the number of the damaged paging file if the equipment model and the equipment version number are consistent, and sends a repair data response message to the AP equipment which sends out the broadcast if the AP equipment comprises the paging file data corresponding to the number of the damaged paging file. The repair data response message includes paging file data corresponding to the number of the damaged paging file.
It should be noted that, after analyzing the device model and the device version number carried in the packet, other AP devices in the network system further determine whether each AP device includes paging file data corresponding to the number of the damaged paging file only when determining that the device model of each AP device is identical to the device model carried in the packet and the device version number of each AP device is also identical to the device version number carried in the packet. And if any one of the information is inconsistent, directly discarding the mirror image repair request message. Since AP devices having the same device model and device version number have the same image file in general, the AP devices having the same device model and device version number may have paging file data corresponding to the number of the damaged paging file. However, an abnormal condition may also occur in the device, and therefore, if the AP device with the same device model and device version number does not include paging file data corresponding to the number of the damaged paging file, the device also discards the mirror image repair request message.
Step S104: and repairing the mirror image file based on the paging file data.
And finally, the AP equipment analyzes the received repair data response message, and repairs the mirror image file based on the paging file data after analyzing the received repair data response message to obtain the paging file data.
After the AP device obtains the paging file data through parsing, the AP device may check the paging file data first, for example, perform CRC or MD5 check on the paging file data to obtain a corresponding check value, and then compare the obtained check value with a corresponding mirror image main body paging check value in the mirror image header. And if the check values are consistent, replacing the damaged paging file with the paging file data, at the moment, successfully repairing the mirror image file of the AP equipment, and automatically restarting the AP equipment after successful repair. And if the check values are inconsistent, the repair of the mirror image file of the AP equipment fails.
In summary, in the embodiment of the present application, after the AP device determines a damaged paging file in the image file stored in the AP device, the AP device sends an image repair request message to other AP devices in the same network system, and then completes the repair of the image file by using paging file data transmitted by the AP devices having the same device model and the same device version number in the same network system.
Referring to fig. 4, based on the same inventive concept, an embodiment of the present application further provides a method for repairing an image file, where the method is also applied to any AP device in a network system. It should be noted that, the method for repairing an image file provided in the embodiment of the present application is not limited by the sequence shown in fig. 4 and the following, and the method includes: step S201 to step S206.
Step S201: after determining a damaged paging file in a self-stored image file, constructing an image repairing request message; the mirror image repair request message includes the device model, the device version number, and the number of the damaged paging file.
Step S202: and broadcasting the mirror image repair request message so that other AP equipment in the network system receives the mirror image repair request message.
It should be noted that, since the steps S201 to S202 are the same as the steps S101 to S102, the description is omitted here for the sake of avoiding redundancy, and the same parts may be referred to each other.
Step S203: receiving mirror image repair confirmation messages sent by other AP equipment; wherein, the mirror image repair confirmation message includes the number of the damaged paging file.
The other AP devices and the AP device have the same device model and the same device version number. After receiving the mirror image repair request message, other AP equipment in the network system analyzes the message, judges whether the message is consistent with the equipment model and the equipment version number of the AP equipment after analyzing the equipment model and the equipment version number carried by the message, judges whether the AP equipment comprises paging file data corresponding to the number of the damaged paging file if the message is consistent with the equipment model and the equipment version number of the AP equipment, and sends a mirror image repair confirmation message to the AP equipment which sends out the broadcast if the message is consistent with the paging file data. The image repair confirmation message represents that other AP equipment can send paging file data corresponding to the damaged paging file to the AP equipment which sends the broadcast.
After analyzing the device model and the device version number carried by the message, other AP devices in the network system further determine whether or not they include paging file data corresponding to the number of the damaged paging file only when it is determined that the device model of each AP device is identical to the device model carried by the message and the device version number of each AP device is identical to the device version number carried by the message. And if any one of the information is inconsistent, directly discarding the mirror image repair request message. Since AP devices having the same device model and device version number have the same image file in general, the AP devices having the same device model and device version number may have paging file data corresponding to the number of the damaged paging file. However, an abnormal condition may also occur in the device, and therefore, if the AP device with the same device model and device version number does not include paging file data corresponding to the number of the damaged paging file, the device also discards the mirror image repair request message.
Step S204: and sending a repair data request message to other AP equipment, wherein the repair data request message comprises the number of the damaged paging file.
After receiving the mirror image repair confirmation message sent by other AP equipment, the AP equipment analyzes the message, and after obtaining the number carried in the message and determining that the number is the number of the damaged paging file required by the AP equipment, sends a repair data request message to other AP equipment so that the other AP equipment sends paging file data corresponding to the number of the damaged paging file to the AP equipment.
In an embodiment, the network system has a plurality of other AP devices having the same device model and the same device version number as the AP device, and each of the plurality of other AP devices includes paging file data corresponding to a number of a damaged paging file of the AP device. Before sending a repair data request message to other AP devices in step S204, the method further includes: receiving mirror image repair confirmation messages sent by a plurality of other AP devices; the mirror image repairing confirmation message comprises the number of the damaged paging file; determining one AP device in a plurality of other AP devices as a target AP device; the target AP equipment is the AP equipment which sends a repair data request message, wherein the repair data request message comprises the number of the damaged paging file.
That is, after receiving the mirror repair confirmation messages sent by the multiple other AP devices, the AP device determines one of the other AP devices as the destination AP device, and then sends the repair data request message only to the destination AP device. By the method, the condition that other AP equipment also sends the repair data response message to the AP equipment can be avoided, and further, excessive communication link resources are avoided being occupied.
As a way of optionally determining the destination AP device, determining, in the above step, one AP device in the multiple other AP devices as the destination AP device may include: acquiring the MAC address of each other AP device from mirror image repair confirmation messages sent by the other AP devices; and determining the AP device with the minimum MAC address as the destination AP device.
In this way, the AP device with the minimum MAC address is used as the destination AP device, and the destination AP device can be determined reasonably.
As another alternative way of determining the destination AP device, determining, in the above step, one AP device in the multiple other AP devices as the destination AP device may include: acquiring the receiving time of receiving the mirror image repair confirmation message sent by each other AP device; the AP device with the earliest reception time is determined as the destination AP device.
In this way, the AP device corresponding to the received first mirror repair acknowledgement packet may be determined as the destination AP device, and by this way, the destination AP device may be determined as fast as possible.
Of course, in other embodiments, the AP device with the largest MAC address may also be determined as the destination AP device, and specifically, what manner of determining the destination AP device is adopted may be determined according to actual requirements, which is not limited in this application.
Step S205: receiving a repair data response message sent by other AP equipment; the repair data response message includes paging file data corresponding to the number of the damaged paging file.
After receiving the repair data request message sent by the AP device, the other AP devices construct a repair data response message, and then send the paging file data corresponding to the number of the damaged paging file to the AP device. And when the network system has a plurality of other AP devices with the same device model and the same device version number as the AP device, receiving the repair data response message sent by the determined target AP device.
Step S206: and repairing the mirror image file based on the paging file data.
And finally, the AP equipment analyzes the received repair data response message, and repairs the mirror image file based on the paging file data after analyzing the received repair data response message to obtain the paging file data.
After the AP device obtains the paging file data through parsing, the AP device may check the paging file data first, for example, perform CRC or MD5 check on the paging file data to obtain a corresponding check value, and then compare the obtained check value with a corresponding mirror image main body paging check value in the mirror image header. And if the check values are consistent, replacing the damaged paging file with the paging file data, and at the moment, successfully repairing the mirror image file of the AP equipment. And if the check values are inconsistent, the repair of the mirror image file of the AP equipment fails.
In addition, when the image file is failed to be repaired based on the paging file data, and at this time, the network system has a plurality of other AP devices having the same device model and the same device version number as the AP device, and the other AP devices all include the paging file data corresponding to the number of the damaged paging file of the AP device, the method further includes: determining one of the remaining plurality of other AP devices as a new destination AP device; sending the repair data request message to new target AP equipment, wherein the repair data request message comprises the number of the damaged paging file; receiving a repair data response message sent by new target AP equipment; the repair data response message sent by the new target AP equipment comprises paging file data corresponding to the number of the damaged paging file; and repairing the mirror image file based on paging file data in a repair data response message sent by the new target AP equipment.
That is, after the AP device fails to repair the image file by using the paging file data sent by one of the other AP devices, the AP device determines, from the remaining other AP devices, the next AP device to which the repair data request message needs to be sent, and then repairs the image file based on the paging file data returned by the next AP device, and so on until the AP device succeeds in repairing the image file, or fails to repair the image file based on all the paging file data sent by the other AP devices.
In addition, when the AP device determines that the number of the damaged paging file is multiple, it may sequentially send a repair data request message corresponding to one of the numbers to other AP devices, or may simultaneously include the numbers of all the damaged paging files in the repair data request message sent to other AP devices.
Illustratively, the AP device determines the numbers of the damaged paging file to be four, five, and six. When other AP devices have paging file data corresponding to numbers four, five, and six, the AP device may first send a repair data request message corresponding to number four, that is, the message only includes number four, but does not include numbers five and six. The message is only used to request paging file data corresponding to the damaged paging file number four from other AP devices. The AP equipment obtains paging file data corresponding to the damaged paging file with the number of four, and then sends a repair data request message corresponding to the number of five to other AP equipment. The AP equipment obtains paging file data corresponding to the number five of the damaged paging file, and then sends a repair data request message corresponding to the number six to other AP equipment.
Illustratively, the AP device determines the numbers of the damaged paging file to be four, five, and six. When other AP devices have paging file data with numbers of four, five, and six, the repair data request packet sent by the AP device may include numbers of four, five, and six at the same time, so that the other AP devices transmit paging file data with numbers of four, five, and six to the AP device at the same time.
In summary, in the embodiment of the present application, before receiving the repair data response message sent by the other AP device, the AP device needs to perform a handshake with the other AP device first, that is, receive the mirror repair confirmation message sent by the other AP device first, so as to determine that the other AP device can send the paging file data corresponding to the number of the damaged paging file. By the method, the accuracy and the reliability of obtaining the paging file data corresponding to the number of the damaged paging file can be improved, and the condition that the AP equipment analyzes the received repair data response message for multiple times to determine whether the message contains the paging file data corresponding to the number of the damaged paging file is avoided.
Referring to fig. 5, based on the same inventive concept, an embodiment of the present application further provides an image file repairing apparatus 200, applied to an AP device in a network system, where the apparatus includes:
the constructing module 210 is configured to construct a mirror image repair request message after determining a damaged paging file in a mirror image file stored in the constructing module; the mirror image repair request message comprises a device model, a device version number and the number of the damaged paging file.
A sending module 220, configured to broadcast the mirror image repair request packet, so that other AP devices in the network system receive the mirror image repair request packet.
A receiving module 230, configured to receive a repair data response packet sent by the other AP device; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; and the repair data response message comprises paging file data corresponding to the number of the damaged paging file.
And a repair module 240, configured to repair the image file based on the paging file data.
Optionally, the receiving module 230 is further configured to receive a mirror repair confirmation message sent by the other AP device before the receiving of the repair data response message sent by the other AP device; the mirror image repair confirmation message comprises the number of the damaged paging file; the sending module is further configured to send a repair data request packet to the other AP devices, where the repair data request packet includes the number of the damaged paging file.
Optionally, the receiving module 230 is further configured to receive mirror repair confirmation messages sent by a plurality of other AP devices before the receiving of the repair data response messages sent by the other AP devices; acquiring the MAC address of each other AP device from mirror image repair confirmation messages sent by the other AP devices; determining the AP equipment with the minimum MAC address as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment; or acquiring the receiving time for receiving the mirror image repair confirmation message sent by each other AP device; and determining the AP equipment with the earliest receiving time as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment.
Optionally, the receiving module 230 is further configured to determine one AP device of the remaining multiple other AP devices as a new destination AP device if the repair of the image file based on the paging file data fails. Correspondingly, the sending module 220 is further configured to send the repair data request packet to the new destination AP device, where the repair data request packet includes the number of the damaged paging file. Correspondingly, the receiving module 230 is further configured to receive a repair data response message sent by the new destination AP device; and the repair data response message sent by the new target AP equipment comprises paging file data corresponding to the number of the damaged paging file. The repair module 240 is further configured to repair the image file based on paging file data in a repair data response message sent by the new destination AP device.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the computer program performs the methods provided in the above embodiments.
The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An image file repair method is applied to an AP device in a network system, and comprises the following steps:
after determining a damaged paging file in a self-stored image file, constructing an image repairing request message; the mirror image repairing request message comprises an equipment model, an equipment version number and the number of the damaged paging file;
broadcasting the mirror image repair request message so that other AP equipment in the network system receives the mirror image repair request message;
receiving a repair data response message sent by the other AP equipment; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; the repair data response message comprises paging file data corresponding to the number of the damaged paging file;
and repairing the mirror image file based on the paging file data.
2. The method according to claim 1, wherein before said receiving the repair data response message sent by the other AP device, the method further comprises:
receiving mirror image repair confirmation messages sent by the other AP equipment; the mirror image repair confirmation message comprises the number of the damaged paging file;
and sending a repair data request message to the other AP equipment, wherein the repair data request message comprises the number of the damaged paging file.
3. The method according to claim 1 or 2, wherein before the receiving the repair data response message sent by the other AP device, the method further comprises:
receiving mirror image repair confirmation messages sent by a plurality of other AP devices;
acquiring the MAC address of each other AP device from mirror image repair confirmation messages sent by the other AP devices; determining the AP equipment with the minimum MAC address as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment; or
Acquiring the receiving time of receiving the mirror image repair confirmation message sent by each other AP device; and determining the AP equipment with the earliest receiving time as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment.
4. The method of claim 3, wherein if the repair of the image file based on the paging file data fails, the method further comprises:
determining one of the remaining plurality of other AP devices as a new destination AP device;
sending the repair data request message to the new destination AP device, wherein the repair data request message includes the number of the damaged paging file;
receiving a repair data response message sent by the new target AP equipment; the repair data response message sent by the new target AP equipment comprises paging file data corresponding to the number of the damaged paging file;
and repairing the mirror image file based on paging file data in a repair data response message sent by the new target AP equipment.
5. An image file repair apparatus, applied to an AP device in a network system, the apparatus comprising:
the building module is used for building a mirror image repair request message after determining a damaged paging file in a mirror image file stored by the building module; the mirror image repairing request message comprises an equipment model, an equipment version number and the number of the damaged paging file;
a sending module, configured to broadcast the mirror image repair request packet, so that other AP devices in the network system receive the mirror image repair request packet;
a receiving module, configured to receive a repair data response packet sent by the other AP device; the other AP equipment and the AP equipment have the same equipment model and the same equipment version number; the repair data response message comprises paging file data corresponding to the number of the damaged paging file;
and the repair module is used for repairing the mirror image file based on the paging file data.
6. The apparatus according to claim 5, wherein the receiving module is further configured to receive a mirror repair acknowledgement message sent by the other AP device before the receiving of the repair data response message sent by the other AP device; the mirror image repair confirmation message comprises the number of the damaged paging file;
the sending module is further configured to send a repair data request packet to the other AP devices, where the repair data request packet includes the number of the damaged paging file.
7. The apparatus according to claim 5 or 6, wherein the receiving module is further configured to receive mirror repair acknowledgement messages sent by a plurality of other AP devices before the receiving of the repair data response messages sent by the other AP devices; acquiring the MAC address of each other AP device from mirror image repair confirmation messages sent by the other AP devices; determining the AP equipment with the minimum MAC address as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment; or acquiring the receiving time for receiving the mirror image repair confirmation message sent by each other AP device; and determining the AP equipment with the earliest receiving time as the target AP equipment of the equipment for sending the repair data request message, so that the target AP equipment sends the repair data response message to the equipment.
8. An AP device, comprising: a processor and a memory, the processor and the memory connected;
the memory is used for storing programs;
the processor is configured to execute a program stored in the memory to perform the method of any of claims 1-4.
9. A computer-readable storage medium, on which a computer program is stored which, when executed by a computer, performs the method of any one of claims 1-4.
10. A network system comprising at least two AP devices;
the AP device is operable to perform the method of any one of claims 1-4.
CN202111446541.3A 2021-11-30 2021-11-30 Mirror image file repairing method and device, AP (access point) equipment and network system Pending CN114116289A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111446541.3A CN114116289A (en) 2021-11-30 2021-11-30 Mirror image file repairing method and device, AP (access point) equipment and network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111446541.3A CN114116289A (en) 2021-11-30 2021-11-30 Mirror image file repairing method and device, AP (access point) equipment and network system

Publications (1)

Publication Number Publication Date
CN114116289A true CN114116289A (en) 2022-03-01

Family

ID=80368735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111446541.3A Pending CN114116289A (en) 2021-11-30 2021-11-30 Mirror image file repairing method and device, AP (access point) equipment and network system

Country Status (1)

Country Link
CN (1) CN114116289A (en)

Similar Documents

Publication Publication Date Title
CN108932249B (en) Method and device for managing file system
CN113672270A (en) Upgrading method, computer system and remote upgrading device
CN114911500A (en) Terminal upgrading method, terminal and system
CN114385418A (en) Protection method, device, equipment and storage medium for communication equipment
CN111522571B (en) Equipment upgrading method and device, terminal equipment and storage medium
CN114116289A (en) Mirror image file repairing method and device, AP (access point) equipment and network system
CN116204214A (en) BMC upgrading method, device and system, electronic equipment and storage medium
CN112559349B (en) Program running method and running device
US11586504B2 (en) Electronic apparatus and boot method thereof
CN112328287B (en) Method, device, equipment and storage medium for updating embedded equipment system
CN117608618B (en) Server firmware upgrading method and device, storage medium and electronic equipment
CN114362893A (en) Data transmitting method, data receiving method, terminal and computer storage medium
CN107608809B (en) Exception handling method and device
CN111324488B (en) Program backup processing method and device
CN114268624B (en) Version file transmission method and device and server
CN114968314B (en) Firmware upgrading method and device for display equipment, electronic equipment and storage medium
CN112905218B (en) Firmware upgrading method, device and equipment
CN113448760B (en) Method, system, equipment and medium for recovering abnormal state of hard disk
CN107451035B (en) Error state data providing method for computer device
CN114253769A (en) Data processing method and device for unidirectional network gate
CN116962542A (en) Data communication method, memory pooling switching device, cloud computing system and storage medium
CN114301779A (en) Mirror image file configuration method and device, AP (access point) equipment and network system
CN114138541A (en) Data configuration method of electric energy meter, electric energy meter and readable storage medium
CN115827027A (en) Data processing method, data processing device, storage medium and electronic equipment
CN117931296A (en) System program starting method and device, computing equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination