MAC address recovery method, device, equipment and storage medium

By reading and matching the TV's own MAC address and address burning files stored in the USB flash drive, the loss problem caused by failure of MAC address burning is solved, and the continuous use and management of MAC addresses is realized, which is convenient for reducing production costs.

CN114003437BActive Publication Date: 2025-03-14SHENZHEN KONKA ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111286930.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-03-14
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

During the production process of the TV, failure to burn MAC address may lead to loss of MAC address, which will lead to poor management of MAC address and increase production costs.

Method used

By reading the MAC address and the address burn file stored in the USB flash drive, we can determine whether the two match, and modify the address burn file when the match is made to make its starting MAC address consistent with the recovery MAC address.

Benefits of technology

It effectively avoids the problem of skipped use or reused use of MAC addresses, facilitates the management of MAC addresses and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114003437B_ABST
    Figure CN114003437B_ABST
Patent Text Reader

Abstract

The present invention provides a MAC address recovery method, device, equipment and storage medium, the method comprising: after receiving an operation to recover a MAC address, reading its own MAC address and an address burning file stored in a currently connected U disk; judging whether the own MAC address matches the address burning file according to the MAC address stored in the address burning file; when it is judged to be a match, modifying the starting MAC address marked in the address burning file 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 the next burning is performed; verifying the starting MAC address of the modified address burning file, and generating a prompt for MAC address recovery after successful verification. The present invention can avoid the problem of MAC addresses being skipped or reused after burning fails, and facilitates the management of MAC addresses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a MAC address recovery method, device, equipment and storage medium. Background Art

[0002] When a TV is produced, the MAC address needs to be burned in to uniquely mark the TV. However, during production, the MAC address burning may fail due to unexpected circumstances. For example: a sudden power outage during the burning process, or an abnormality of an individual movement board causes an error in the normal burning of the MAC address, or the production line uses a USB flash drive to upgrade the MAC address, but the USB flash drive is suddenly damaged and the burned data can no longer be read.

[0003] Take burning MAC address with USB as an example. Before burning, copy a segmented mac.bin file to USB. This mac.bin file contains multiple MAC addresses. Insert USB into the USB port of TV A, enter the factory menu, click the burn option, and burn MAC successfully. Unplug USB and insert into the USB port of TV B. The USB may be damaged and the file may be lost due to the TV motherboard circuit problem at the moment of inserting the USB into TV B. It may also be that the USB itself is too worn out after multiple reading and writing, and the internal storage medium is damaged, resulting in file loss. At this time, TV B prompts that the mac.bin file cannot be found and cannot be burned.

[0004] When the program fails to be burned, the first thing to consider is how to determine the next MAC address to be burned. If a MAC address is randomly selected for upgrade, the MAC address may be skipped or reused, which is not only not conducive to the management of MAC addresses, but also increases production costs. Summary of the invention

[0005] In view of this, an object of the present invention is to provide a MAC address recovery method, apparatus, device and storage medium to improve the above-mentioned problem.

[0006] An embodiment of the present invention provides a MAC address recovery method, which includes:

[0007] After receiving the operation of restoring the MAC address, read the own MAC address and the address burning file stored in the currently connected U disk; the address burning file records multiple continuous MAC addresses within a certain address range;

[0008] According to the MAC address stored in the address burning file, determining whether the own MAC address matches the address burning file;

[0009] 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;

[0010] The starting MAC address of the modified address burning file is verified, and after successful verification, a prompt for MAC address recovery is generated.

[0011] Preferably, each MAC address includes header information and address information; then judging whether the own MAC address matches the address burning file according to the MAC address stored in the address burning file specifically includes:

[0012] 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

[0013] Determine whether the address information of the own MAC address is within the address range recorded in the address burning file.

[0014] Preferably, 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, which specifically includes:

[0015] 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;

[0016] 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.

[0017] Preferably, the hysteresis value is 1.

[0018] Preferably, 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:

[0019] 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;

[0020] The user is detected to select the option to perform a MAC address burning or MAC address recovery operation.

[0021] Preferably, the address burning file is an original address burning file that has not been burned.

[0022] The embodiment of the present invention further provides a MAC address recovery device, which includes:

[0023] A reading unit, configured to read its own MAC address and an address burning file stored in a currently connected U disk after receiving an operation to restore the MAC address; the address burning file records a plurality of continuous MAC addresses within a certain address range;

[0024] A matching unit, used to determine whether the MAC address of the device matches the address burning file according to the MAC address stored in the address burning file;

[0025] 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;

[0026] 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.

[0027] Preferably, the modification unit is specifically used for:

[0028] 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;

[0029] 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.

[0030] An embodiment of the present invention further provides a MAC address recovery device, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the MAC address recovery method as described above.

[0031] An embodiment of the present invention further provides 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 as described above.

[0032] To sum up, after the MAC address burning fails, this embodiment restores the address burning file by inserting the USB flash drive including the source address burning file into the recovery device that has completed the burning before, so that the starting MAC address of the restored address burning file is consistent with the starting MAC address of the address burning file when the burning fails, thereby avoiding the problem of MAC address being skipped or reused, and facilitating the management of MAC addresses. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 It is a flowchart of a MAC address recovery method provided by the first embodiment of the present invention.

[0035] Figure 2 This is another flowchart of the MAC address recovery method provided by an embodiment of the present invention.

[0036] Figure 3 It is a flowchart of burning the MAC address of the device to be burned.

[0037] Figure 4 It is a structural diagram of a MAC address recovery device provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0040] It should be clear that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0042] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:

[0043] See also Figure 1 and Figure 2 The first embodiment of the present invention provides a MAC address recovery method, which can be executed by a MAC address recovery device (hereinafter referred to as the recovery device), and in particular, is executed by one or more processors in the recovery device to implement the following steps:

[0044] S101, after receiving an operation to restore the MAC address, read the own MAC address and the address burning file stored in the currently connected U disk; the address burning file records multiple continuous MAC addresses within a certain address range.

[0045] In this embodiment, the recovery device may be a burned device, such as a television set. In addition, the recovery device may also be an intermediate device, which is connected to a USB flash drive and a burned device at the same time, and obtains information of the USB flash drive and the burned device to implement the MAC address recovery method of this embodiment. In this embodiment, in particular, the burned device refers to a television set that has been burned normally, that is, a burned MAC address of the device itself has been recorded inside the television set.

[0046] In this embodiment, before inserting the USB flash drive into the recovery device, the address burning file needs to be stored in the USB flash drive. The address burning file here is the source mac.bin file, which refers to a group of files including mac addresses that have been segmented before the batch production device. Among them, a possible format of the mac.bin file is as follows:

[0047] 00 1A 34 BD 93 FF 00 1A 34 BD 94 62

[0048] The mac.bin file here includes a starting MAC address (00 1A 34 BD 93 FF) and a maximum MAC address (00 1A 34 BD 94 62). Each MAC address includes two parts of information: the header information (00 1A 34) representing the manufacturer's code and the address information (BD 93 FF and BD 94 62). Therefore, the address range of this mac.bin file is from BD 93 FF to BD 94 62.

[0049] In this embodiment, when the USB flash drive is inserted into the recovery device, the recovery device can sense the access of the USB flash drive and display a corresponding interface for the user to operate. For example, the displayed interface may include a restore burned MAC address option and a restore MAC address option. The user can enter the corresponding function by triggering the corresponding option. For example, the user can generate an instruction to restore the MAC address by triggering the restore MAC address option.

[0050] S102: judging whether the own MAC address matches the address burning file according to the MAC address stored in the address burning file.

[0051] In this embodiment, when judging, first extract the header information of its own MAC address, and judge whether the header information is consistent with the header information of the MAC address in the address burning file, if consistent, then judge that the header information of the two matches. If inconsistent, then prompt the information of mismatch, so that the user can change the USB flash drive or change the address burning file.

[0052] Then, the address information of the own MAC address is extracted, and it is determined whether the address information is within the address range recorded in the address burning file.

[0053] For example, assuming that the MAC address of the recovery device itself is 01 1A 34 BD 94 60, since its header information is different from the header information of the MAC address stored in the address burning file, the two do not match.

[0054] For another example, assuming that the MAC address of the recovery device is 00 1A 34 BD 94 65, although its header information is the same as the header information of the MAC address stored in the address burning file, its address information is not within the address range of the MAC address stored in the address burning file, so the two do not match.

[0055] For another example, assuming that the MAC address of the recovery device is 00 1A 34 BD 94 50, its header information is the same as the header information of the MAC address stored in the address burning file, and the address information is also within the address range of the MAC address stored in the address burning file, so the two match.

[0056] S103, when it is determined to be a match, modify the starting MAC address marked in the address burning file 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.

[0057] In this embodiment, specifically, after a successful match, the recovery device converts its own MAC address into long integer data, and adds a preset hysteresis value to the long integer data value to generate a recovery MAC address, and then modifies the address burning file through a file byte IO stream so that the starting MAC address of the address burning file is the recovery MAC address.

[0058] In this embodiment, the hysteresis value is determined according to the burning relationship between the recovery device and the device that failed to burn. For example, if the recovery device is the first N devices of the device that failed to burn, the hysteresis value is N. In particular, in order to avoid errors, the hysteresis value is preferably 1 in this embodiment, that is, the device before the device that failed to burn is taken as the recovery device.

[0059] In this embodiment, taking the hysteresis value equal to 1 as an example, at this time, if the MAC address of the recovery device itself is 001A 34 BD 94 50, the recovery MAC address is 00 1A 34 BD 94 51. Then the modified address burning file becomes: 00 1A 34 BD 94 51 00 1A 34 BD 94 62.

[0060] S104, verifying the starting MAC address of the modified address burning file, and generating a prompt for MAC address recovery after successful verification.

[0061] In this embodiment, after the modification is completed, the recovery device reads the starting MAC address of the modified address burning file again, and determines whether the starting MAC address is equal to the recovery MAC address. If they are equal, the verification is successful and a prompt for MAC address recovery is generated. If the verification fails, a prompt for unsuccessful MAC address recovery is generated.

[0062] See also Figure 3 In this embodiment, when the MAC address is successfully restored, the user can unplug the USB flash drive from the recovery device, and then insert the USB flash drive into the next device that needs to be burned (such as a TV) to burn the MAC address of the TV. The MAC address of the burned TV is 00 1A 34 BD 94 51, thereby realizing the continuous use of the MAC address without the problem of the MAC address being skipped or reused.

[0063] To sum up, after the MAC address burning fails, this embodiment restores the address burning file by inserting the USB flash drive including the source address burning file into the recovery device that has completed the burning before, so that the starting MAC address of the restored address burning file is consistent with the starting MAC address of the address burning file when the burning fails, thereby avoiding the problem of MAC address being skipped or reused, and facilitating the management of MAC addresses.

[0064] See also Figure 4 The second embodiment of the present invention further provides a MAC address recovery device, which includes:

[0065] The reading unit 210 is used to read its own MAC address and the address burning file stored in the currently connected U disk after receiving the operation of restoring the MAC address; the address burning file records multiple continuous MAC addresses within a certain address range;

[0066] A matching unit 220, configured to determine whether the MAC address of the device matches the address burning file according to the MAC address stored in the address burning file;

[0067] The modification unit 230 is used to modify the starting MAC address marked in the address burning file according to the own MAC address when it is determined to be a match, so as 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;

[0068] The verification unit 240 is used to verify the starting MAC address of the modified address burning file, and generate a prompt for MAC address recovery after the verification is successful.

[0069] Preferably, each MAC address includes header information and address information; then the matching unit 220 is specifically used for:

[0070] 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

[0071] Determine whether the address information of the own MAC address is within the address range recorded in the address burning file.

[0072] Preferably, the modifying unit 230 is specifically used for:

[0073] 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;

[0074] 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.

[0075] Preferably, the hysteresis value is 1.

[0076] Preferably, it also includes an operating unit for:

[0077] When the USB flash drive is detected to be connected, an operation interface is generated, wherein the operation interface includes a MAC address burning option and a MAC address recovery option;

[0078] The user is detected to select the option to perform a MAC address burning or MAC address recovery operation.

[0079] Preferably, the address burning file is an original address burning file that has not been burned.

[0080] The third embodiment of the present invention further provides a MAC address recovery device, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the MAC address recovery method as described above.

[0081] The fourth embodiment of the present invention further provides 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 the device where the computer-readable storage medium is located to implement the MAC address recovery method as described above.

[0082] In several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0083] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0084] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A MAC address recovery method, characterized in that: include: After receiving the operation of restoring the MAC address, read its own MAC address 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 a plurality of continuous MAC addresses within a certain address range; 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; 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; 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. The MAC address recovery method according to claim 1, 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 a modified address burning file, specifically including: 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; 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. The MAC address recovery method according to claim 2, characterized in that: The hysteresis value is 1.

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 stored in the currently connected U disk and burning the file, it also includes: When the USB flash drive is detected to be connected, an operation interface is generated, wherein the operation interface includes a MAC address burning option and a MAC address recovery option; The user is detected to select the option to perform a MAC address burning or MAC address recovery operation.

5. A MAC address recovery device, characterized in that: include: A reading unit, used to read its own MAC address and the address burning file stored in the currently connected U disk after receiving the 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; 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; 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; 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. The MAC address recovery device according to claim 5, characterized in that: The modification unit is specifically used for: 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; 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. A MAC address recovery device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, 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. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement the MAC address recovery method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for programming MAC address into set top box

    CN101764918A

  • Methods and apparatus for creating addresses

    US20080144620A1