[go: up one dir, main page]

CN114003437B - MAC address recovery method, device, equipment and storage medium - Google Patents

MAC address recovery method, device, equipment and storage medium Download PDF

Info

Publication number
CN114003437B
CN114003437B CN202111286930.4A CN202111286930A CN114003437B CN 114003437 B CN114003437 B CN 114003437B CN 202111286930 A CN202111286930 A CN 202111286930A CN 114003437 B CN114003437 B CN 114003437B
Authority
CN
China
Prior art keywords
address
mac address
burning file
file
mac
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.)
Active
Application number
CN202111286930.4A
Other languages
Chinese (zh)
Other versions
CN114003437A (en
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.)
Shenzhen Konka Electronic Technology Co Ltd
Original Assignee
Shenzhen Konka Electronic 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 Shenzhen Konka Electronic Technology Co Ltd filed Critical Shenzhen Konka Electronic Technology Co Ltd
Priority to CN202111286930.4A priority Critical patent/CN114003437B/en
Publication of CN114003437A publication Critical patent/CN114003437A/en
Application granted granted Critical
Publication of CN114003437B publication Critical patent/CN114003437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Library & Information Science (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for recovering an MAC address, wherein the method comprises the steps of reading the MAC address of a user and an address burning file stored in a currently connected U disk after receiving an operation of recovering the MAC address; judging whether the self MAC address is matched with the address burning file according to the MAC address stored in the address burning file, when the self MAC address is judged to be matched, modifying the initial MAC address marked by the address burning file according to the self MAC address to obtain a modified address burning file, wherein the initial MAC address is the MAC address used by the address burning file in the next burning, verifying the initial MAC address of the modified address burning file, and generating a prompt of MAC address recovery after verification is successful. The invention can avoid the problem that the MAC address is skipped or reused after the burning failure, and is convenient for the management of the MAC address.

Description

MAC address recovery method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for recovering a MAC address.
Background
When a television is produced, the MAC address needs to be burned to uniquely mark the television. However, the burning failure of the MAC address caused by unexpected situations can be encountered during production. For example, the recording process is suddenly powered off, or the error of the normal recording MAC address is caused by the abnormality of the individual core board, or the production line adopts the USB flash disk to upgrade the MAC address, but the USB flash disk is suddenly damaged, and the recording data can not be read.
Taking the burning MAC address of the U disk as an example, before burning, copying a segmented mac.bin file to the U disk, wherein the mac.bin file comprises a plurality of MAC addresses. The USB flash disk is inserted into the USB port of the television A, enters a factory menu, clicks a recording option, and successfully records MAC. The USB flash disk is pulled out and inserted into the USB port of the television B, so that the damaged files of the USB flash disk are lost possibly because the USB flash disk is inserted into the television B at the moment of the problem of a television main board line, or the loss of the USB flash disk is overlarge after the USB flash disk is read and written for many times, and the internal storage medium is damaged to cause the file loss, so that the television B prompts that the mac. Bin file cannot be found and can not be burnt.
When the next MAC address to be burned is determined, if one MAC address is arbitrarily taken for updating, the MAC address may be skipped or reused, which is not only unfavorable for management of the MAC address, but also increases production cost.
Disclosure of Invention
In view of the above, it is an object of the present invention to provide a method, apparatus, device and storage medium for recovering a MAC address, so as to improve the above-mentioned problems.
The embodiment of the invention provides a MAC address recovery method, which comprises the following steps:
after receiving an operation of recovering the MAC address, reading the MAC address of the user and an address burning file stored in a currently connected U disk, wherein the address burning file records a plurality of continuous MAC addresses within a certain address range;
Judging whether the self MAC address is matched with the address burning file according to the MAC address stored in the address burning file;
When the address is judged to be matched, the initial MAC address marked by the address burning file is modified according to the self MAC address to obtain a modified address burning file, wherein the initial MAC address is the MAC address used by the address burning file in the next burning;
And verifying the initial MAC address of the modified address burning file, and generating a prompt for recovering the MAC address after the verification is successful.
Preferably, each MAC address comprises header information and address information, and judging whether the self MAC address is matched with the address burning file according to the MAC address stored in the address burning file, specifically comprising the following steps:
judging whether the header information of the MAC address in the address burning file is consistent with the header information of the self MAC address or not, and
And judging whether the address information of the self MAC address is positioned in the address range of the address burning file record.
Preferably, when the address record file is determined to be matched, modifying the initial MAC address of the address record file mark according to the self MAC address to obtain a modified address record file, which specifically includes:
when the matching is judged, the self MAC address is converted into long integer data, and a preset hysteresis value is added to the long integer data value to generate a recovered MAC address;
and modifying the address burning file in a file byte IO stream mode, so that the initial MAC address of the address burning file is the recovery MAC address.
Preferably, the hysteresis value is 1.
Preferably, after receiving the operation of recovering the MAC address, before reading the own MAC address and the address burning file stored in the currently accessed usb disk, the method further includes:
when the access of the USB flash disk is detected, an operation interface is generated, wherein the operation interface comprises an MAC address burning option and an MAC address recovery option;
a selection of the option is detected to perform an operation of MAC address burning or MAC address restoration.
Preferably, the address burning file is an original address burning file which is not burnt.
The embodiment of the invention also provides a MAC address recovery device, which comprises:
The device comprises a reading unit, a storage unit and a storage unit, wherein the reading unit is used for reading the self MAC address and an address burning file stored in a currently connected U disk after receiving the operation of recovering the MAC address, wherein the address burning file records a plurality of continuous MAC addresses within a certain address range;
The matching unit is used for judging whether the self MAC address is matched with the address burning file according to the MAC address stored in the address burning file;
The modifying unit is used for modifying the initial MAC address of the address burning file mark according to the self MAC address when the address is judged to be matched, so as to obtain a modified address burning file, wherein the initial MAC address is the MAC address used by the address burning file in the next burning;
And the verification unit is used for verifying the initial MAC address of the modified address burning file and generating a prompt for recovering the MAC address after the verification is successful.
Preferably, the modification unit is specifically configured to:
when the matching is judged, the self MAC address is converted into long integer data, and a preset hysteresis value is added to the long integer data value to generate a recovered MAC address;
and modifying the address burning file in a file byte IO stream mode, so that the initial MAC address of the address burning file is the recovery MAC address.
The embodiment of the invention also provides MAC address recovery equipment, which comprises a memory and a processor, wherein the memory stores a computer program which can be executed by the processor to realize the MAC address recovery method.
The embodiment of the invention also provides a computer readable storage medium, which is characterized in that a computer program is stored, and the computer program can be executed by a processor of a device where the computer readable storage medium is located, so as to implement the method for recovering the MAC address.
In summary, after the recording of the MAC address fails, the embodiment restores the address recording file by inserting the usb disk including the source address recording file into the restoration device that has completed recording before, so that the initial MAC address of the restored address recording file is consistent with the initial MAC address of the address recording file when the recording fails, thereby avoiding the problem that the MAC address is skipped or reused, and facilitating management of the MAC address.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a MAC address recovery method according to a first embodiment of the present invention.
Fig. 2 is another flow chart of a MAC address recovery method according to an embodiment of the present invention.
Fig. 3 is a schematic flow chart of performing MAC address burning on a device to be burned.
Fig. 4 is a schematic structural diagram of a MAC address recovery apparatus according to a second embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For a better understanding of the technical solution of the present invention, the following detailed description of the embodiments of the present invention refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The invention is described in further detail below with reference to the attached drawings and detailed description:
Referring to fig. 1 and 2, a first embodiment of the present invention provides a MAC address recovery method, which may be executed by a MAC address recovery device (hereinafter referred to as a recovery device), and in particular, by one or more processors in the recovery device, so as to implement the following steps:
S101, after receiving operation of recovering the MAC address, reading the MAC address of the user and an address burning file stored in a currently connected U disk, wherein the address burning file records a plurality of continuous MAC addresses in a certain address range.
In this embodiment, the recovery device may be a burned device, such as a television. In addition, the recovery device may also be an intermediate device, which is connected to the usb disk and the device to be burned, and obtains information of the usb disk and the device to be burned, so as to implement the MAC address recovery method of this embodiment. In this embodiment, in particular, the device to be burned refers to a tv set that has completed burning normally, i.e. has recorded therein an own MAC address that has been burned.
In this embodiment, before the usb disk is inserted into the recovery device, an address burning file needs to be stored in the usb disk first, where the address burning file is a source mac. Bin file, which refers to a group of files including mac addresses that have been segmented before by mass production devices. One possible mac. Bin file format is as follows:
00 1A 34 BD 93 FF 00 1A 34 BD 94 62
The MAC. Bin file here includes a start MAC address (00 1A 34 BD 93 FF) and a maximum MAC address (00 1A 34 BD 94 62), where each MAC address includes two pieces of information, header information (00 a 34) and address information (BD 93 FF and BD 94 62) representing the manufacturer's code, so that the address range of the MAC. Bin file is from BD 93 FF to BD 94 62.
In this embodiment, after the usb disk is inserted into the recovery device, the recovery device may sense the access of the usb disk and simultaneously display a corresponding interface for a user to operate, for example, the displayed interface may include a recovery burn MAC address option and a recovery MAC address option, and the user may enter a corresponding function by triggering the corresponding option. For example, the user may generate an instruction to recover the MAC address by triggering a recover MAC address option.
S102, judging whether the self MAC address is matched with the address burning file according to the MAC address stored in the address burning file.
In this embodiment, when judging, firstly, header information of the own MAC address is extracted, and whether the header information is consistent with the header information of the MAC address in the address burning file is judged, if so, the header information of the two is judged to be matched. If the information is inconsistent, prompting the unmatched information so that a user can replace the U disk or replace the address burning file.
And then, extracting the address information of the self MAC address, and judging whether the address information is positioned in the address range recorded by the address burning file.
For example, assuming that the own MAC address of the recovery device is 01 1A 34 BD 94 60, since the header information thereof is different from the header information of the MAC address stored in the address burning file, the two do not match.
For another example, assume that the recovery device has its own MAC address 00 1A 34 BD 94 65, and its header information is the same as that of the MAC address stored in the address burning file, but its address information is not within the address range of the MAC address stored in the address burning file, so that the two are not matched.
For another example, assume that the own MAC address of the recovery device is 00 1A 34 BD 94 50, and the header information of the recovery device is the same as the header information of the MAC address stored in the address burning file, and the address information is also in the address range of the MAC address stored in the address burning file, so that the two match.
And S103, when the address is judged to be matched, modifying the initial MAC address of the address burning file mark according to the self MAC address to obtain a modified address burning file, wherein the initial MAC address is the MAC address used by the address burning file in the next burning.
In this embodiment, specifically, after the matching is successful, the recovery device converts the self MAC address into long-integer data, adds a preset hysteresis value to the long-integer data value, generates a recovered MAC address, and modifies the address burning file in a file byte IO stream manner, so that the starting MAC address of the address burning file is the recovered MAC address.
In this embodiment, the hysteresis value is determined according to the recording relationship between the recovery device and the device that fails to record. For example, if the recovery device is the first N devices of the failed device, the hysteresis value is N. In particular, in order to avoid errors, the hysteresis value of the embodiment is preferably 1, that is, the device preceding the device with failed burning is taken as the recovery device.
In this embodiment, taking the hysteresis value equal to 1 as an example, at this time, if the own MAC address of the recovery device is 00 1A 34 BD 94 50, the recovery MAC address is 00 1A 34 BD 94 51. Then the modified address burn file becomes internally 00 1A 34 BD 94 5100 1A 34 BD 94 62.
S104, verifying the initial MAC address of the modified address burning file, and generating a prompt for MAC address recovery after verification is successful.
In this embodiment, after the modification is completed, the recovery device reads the starting MAC address of the modified address burning file again, determines whether the starting MAC address is equal to the recovered MAC address, if so, verifies to pass, generates a prompt for MAC address recovery, and if not, generates a prompt for unsuccessful MAC address recovery.
Referring to fig. 3, in this embodiment, after the MAC address is successfully recovered, the user may pull out the U disc from the recovery device, then insert the U disc into the next device (such as a television) to be burned to burn the MAC address of the television, and the MAC address of the burned television is 00 1A 34 BD 94 51, so that the continuous use of the MAC address is realized, and the problem that the MAC address is skipped or reused is avoided.
In summary, after the recording of the MAC address fails, the embodiment restores the address recording file by inserting the usb disk including the source address recording file into the restoration device that has completed recording before, so that the initial MAC address of the restored address recording file is consistent with the initial MAC address of the address recording file when the recording fails, thereby avoiding the problem that the MAC address is skipped or reused, and facilitating management of the MAC address.
Referring to fig. 4, the second embodiment of the present invention further provides a MAC address recovery apparatus, which includes:
the reading unit 210 is configured to read the self MAC address and an address burning file stored in the currently connected usb disk after receiving an operation of recovering the MAC address, where the address burning file records a plurality of continuous MAC addresses within a certain address range;
A matching unit 220, configured to determine, according to the MAC address stored in the address burning file, whether the own MAC address matches the address burning file;
A modifying unit 230, configured to modify, when it is determined that the address is matched, a starting MAC address of the address recording file according to the self MAC address, to obtain a modified address recording file, where the starting MAC address is a MAC address used when the address recording file is recorded next time;
the verification unit 240 is configured to verify the initial MAC address of the modified address burning file, and generate a prompt for MAC address recovery after the verification is successful.
Preferably, each MAC address includes header information and address information, and the matching unit 220 is specifically configured to:
judging whether the header information of the MAC address in the address burning file is consistent with the header information of the self MAC address or not, and
And judging whether the address information of the self MAC address is positioned in the address range of the address burning file record.
Preferably, the modification unit 230 is specifically configured to:
when the matching is judged, the self MAC address is converted into long integer data, and a preset hysteresis value is added to the long integer data value to generate a recovered MAC address;
and modifying the address burning file in a file byte IO stream mode, so that the initial MAC address of the address burning file is the recovery MAC address.
Preferably, the hysteresis value is 1.
Preferably, the operation unit is further included for:
when the access of the USB flash disk is detected, an operation interface is generated, wherein the operation interface comprises an MAC address burning option and an MAC address recovery option;
a selection of the option is detected to perform an operation of MAC address burning or MAC address restoration.
Preferably, the address burning file is an original address burning file which is not burnt.
The third embodiment of the present invention also provides a MAC address recovery apparatus, which includes a memory and a processor, where the memory stores a computer program, and the computer program is capable of being executed by the processor to implement a MAC address recovery method as described above.
The fourth embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program can be executed by a processor of a device where the computer readable storage medium is located, so as to implement a MAC address recovery method as described above.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus and method embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1.一种MAC地址恢复方法,其特征在于,包括:1. A MAC address recovery method, comprising: 在接收到恢复MAC地址的操作后,读取自身MAC地址以及当前连接的U盘内存储的地址烧录文件;所述地址烧录文件为未经过烧录的原始地址烧录文件;所述地址烧录文件记录有处于一定地址范围内的多个连续MAC地址;After receiving the operation of restoring the MAC address, read the MAC address of the user and the address burning file stored in the currently connected U disk; the address burning file is an original address burning file that has not been burned; the address burning file records multiple continuous MAC addresses within a certain address range; 根据所述地址烧录文件内存储的MAC地址,判断所述自身MAC地址是否与所述地址烧录文件匹配;其中,具体地,判断所述地址烧录文件内的MAC地址的头部信息与所述自身MAC地址的头部信息是否一致;以及判断所述自身MAC地址的地址信息是否位于所述地址烧录文件记录的地址范围内;According to the MAC address stored in the address burning file, determine whether the own MAC address matches the address burning file; specifically, determine whether the header information of the MAC address in the address burning file is consistent with the header information of the own MAC address; and determine whether the address information of the own MAC address is within the address range recorded in the address burning file; 当判断为匹配时,根据所述自身MAC地址对所述地址烧录文件标记的起始MAC地址进行修改,获得修改后的地址烧录文件;其中,所述起始MAC地址为地址烧录文件在下次烧录时使用的MAC地址;When it is determined to be a match, the starting MAC address marked in the address burning file is modified according to the own MAC address to obtain a modified address burning file; wherein the starting MAC address is the MAC address used by the address burning file when it is burned next time; 对修改后的地址烧录文件的起始MAC地址进行验证,并在验证成功后,生成MAC地址恢复的提示。The starting MAC address of the modified address burning file is verified, and after successful verification, a prompt for MAC address recovery is generated. 2.根据权利要求1所述的MAC地址恢复方法,其特征在于,当判断为匹配时,根据所述自身MAC地址对所述地址烧录文件标记的起始MAC地址进行修改,获得修改后的地址烧录文件,具体包括:2. The MAC address recovery method according to claim 1 is characterized in that, when it is determined to be a match, the starting MAC address marked in the address burning file is modified according to the own MAC address to obtain the modified address burning file, specifically comprising: 当判断为匹配时,将自身MAC地址转换为长整型数据,并对所述长整型数据数值加预设的滞后值,生成恢复MAC地址;When it is determined to be a match, the MAC address is converted into a long integer data, and a preset hysteresis value is added to the long integer data value to generate a recovery MAC address; 通过文件字节IO流方式对所述地址烧录文件进行修改,使得所述地址烧录文件的起始MAC地址为所述恢复MAC地址。The address burning file is modified by means of a file byte IO stream so that the starting MAC address of the address burning file is the recovery MAC address. 3.根据权利要求2所述的MAC地址恢复方法,其特征在于,所述滞后值为1。3. The MAC address recovery method according to claim 2, characterized in that the hysteresis value is 1. 4.根据权利要求1所述的MAC地址恢复方法,其特征在于,在在接收到恢复MAC地址的操作后,读取自身MAC地址以及当前接入的U盘内存储的地址烧录文件之前,还包括:4. The MAC address recovery method according to claim 1, characterized in that after receiving the operation of restoring the MAC address, before reading the own MAC address and the address burning file stored in the currently connected U disk, it also includes: 当检测到U盘接入后,生成操作界面,所述操作界面包括MAC地址烧录选项以及MAC地址恢复选项;When the USB flash drive is detected, an operation interface is generated, wherein the operation interface includes a MAC address burning option and a MAC address recovery option; 检测用于对所述选项的选择,以执行MAC地址烧录或者MAC地址恢复的操作。The user is detected to select the option to perform a MAC address burning or MAC address recovery operation. 5.一种MAC地址恢复装置,其特征在于,包括:5. A MAC address recovery device, comprising: 读取单元,用于在接收到恢复MAC地址的操作后,读取自身MAC地址以及当前连接的U盘内存储的地址烧录文件;所述地址烧录文件为未经过烧录的原始地址烧录文件;所述地址烧录文件记录有处于一定地址范围内的多个连续MAC地址;A reading unit, used for reading its own MAC address and an address burning file stored in a currently connected U disk after receiving an operation of restoring the MAC address; the address burning file is an original address burning file that has not been burned; the address burning file records a plurality of continuous MAC addresses within a certain address range; 匹配单元,用于根据所述地址烧录文件内存储的MAC地址,判断所述自身MAC地址是否与所述地址烧录文件匹配;其中,具体地,判断所述地址烧录文件内的MAC地址的头部信息与所述自身MAC地址的头部信息是否一致;以及判断所述自身MAC地址的地址信息是否位于所述地址烧录文件记录的地址范围内;A matching unit, configured to determine whether the own MAC address matches the address burning file according to the MAC address stored in the address burning file; specifically, to determine whether the header information of the MAC address in the address burning file is consistent with the header information of the own MAC address; and to determine whether the address information of the own MAC address is within the address range recorded in the address burning file; 修改单元,用于当判断为匹配时,根据所述自身MAC地址对所述地址烧录文件标记的起始MAC地址进行修改,获得修改后的地址烧录文件;其中,所述起始MAC地址为地址烧录文件在下次烧录时使用的MAC地址;A modification unit, used for modifying the starting MAC address marked in the address burning file according to the own MAC address when it is determined to be a match, to obtain a modified address burning file; wherein the starting MAC address is the MAC address used by the address burning file when it is burned next time; 验证单元,用于对修改后的地址烧录文件的起始MAC地址进行验证,并在验证成功后,生成MAC地址恢复的提示。The verification unit is used to verify the starting MAC address of the modified address burning file, and after successful verification, generate a prompt for MAC address recovery. 6.根据权利要求5所述的MAC地址恢复装置,其特征在于,所述修改单元具体用于:6. The MAC address recovery device according to claim 5, wherein the modification unit is specifically used for: 当判断为匹配时,将自身MAC地址转换为长整型数据,并对所述长整型数据数值加预设的滞后值,生成恢复MAC地址;When it is determined to be a match, the MAC address is converted into a long integer data, and a preset hysteresis value is added to the long integer data value to generate a recovery MAC address; 通过文件字节IO流方式对所述地址烧录文件进行修改,使得所述地址烧录文件的起始MAC地址为所述恢复MAC地址。The address burning file is modified by means of a file byte IO stream so that the starting MAC address of the address burning file is the recovery MAC address. 7.一种MAC地址恢复设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如权利要求1至4任意一项所述的MAC地址恢复方法。7. A MAC address recovery device, characterized in that it comprises a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the MAC address recovery method according to any one of claims 1 to 4. 8.一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如权利要求1至4任意一项所述的MAC地址恢复方法。8. A computer-readable storage medium, characterized in that a computer program is stored therein, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement the MAC address recovery method according to any one of claims 1 to 4.
CN202111286930.4A 2021-11-02 2021-11-02 MAC address recovery method, device, equipment and storage medium Active CN114003437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111286930.4A CN114003437B (en) 2021-11-02 2021-11-02 MAC address recovery method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111286930.4A CN114003437B (en) 2021-11-02 2021-11-02 MAC address recovery method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114003437A CN114003437A (en) 2022-02-01
CN114003437B true CN114003437B (en) 2025-03-14

Family

ID=79926338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111286930.4A Active CN114003437B (en) 2021-11-02 2021-11-02 MAC address recovery method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114003437B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764918A (en) * 2009-12-16 2010-06-30 康佳集团股份有限公司 Method for programming MAC address into set top box

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7433356B2 (en) * 2004-05-13 2008-10-07 International Business Machines Corporation Methods and apparatus for creating addresses
CN103716693B (en) * 2013-12-06 2018-08-14 乐视致新电子科技(天津)有限公司 A kind of setting method and smart television of MAC Address

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764918A (en) * 2009-12-16 2010-06-30 康佳集团股份有限公司 Method for programming MAC address into set top box

Also Published As

Publication number Publication date
CN114003437A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
JP2009187134A (en) Information processing device, information processing device activation control method, program, and recording medium
CN101458645A (en) Computer operating system and file data repair system and method of software thereof
CN102982274A (en) Management method of intelligent terminal system and intelligent terminal
CN103064752B (en) A kind of Ile repair method and device
KR20120063455A (en) Apparatus and method for updating firmware
CN104899114A (en) Continuous time data protection method on solid state drive
US11928217B2 (en) Information processing apparatus, control method of information processing apparatus, and storage medium
JP4696052B2 (en) Storage device, storage medium, control device, memory, server device, server client system
CN103339615B (en) storage system and information processing method
CN116578307A (en) Data presetting method, electronic device and computer readable storage medium
CN117850824A (en) Firmware updating method, electronic device and server
CN114003437B (en) MAC address recovery method, device, equipment and storage medium
CN110968446B (en) A metadata restoration method, apparatus, system and computer-readable storage medium
CN102346696B (en) A kind of file access pattern method and device
CN112433738A (en) Firmware update test method, system, equipment and medium
CN112596800A (en) U-Boot image upgrading and checking method and device and electronic equipment
KR101542329B1 (en) Automatic Data Backup System and Operating Method thereof
CN110704085A (en) RAID executable file updating method, device, equipment and storage medium
JP5246255B2 (en) Information processing apparatus, BIOS setup setting value recovery method, program
JP2010198479A (en) System for automatically executing application test
CN114594967A (en) Basic input output system updating method, device, equipment and medium
JP5790415B2 (en) Information processing apparatus and program
JP2002041292A (en) Computer recovery device
JP6278078B2 (en) Information processing apparatus and program
JP5994901B2 (en) Information processing apparatus and program

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
GR01 Patent grant
GR01 Patent grant