Data processing method and electronic device for hidden partition

By storing and updating the first partition information in the hard disk partition table, the problem of hard disk access errors caused by the operation of hidden partition switch in the NVMe SSD hard disk is solved, ensuring that electronic devices can access the hard disk with hidden partitions enabled normally.

CN114816244BActive Publication Date: 2024-11-01联想开天科技有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210362786.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2024-11-01
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

In an NVMe SSD hard disk, the switch operation of the hidden partition causes the GPT partition information to be inconsistent with the actual partition status, resulting in a hard disk access error.

Method used

By storing and updating the first partition information in the preset storage area of ​​the hard disk partition table, generating export files for checksum writing, ensuring data consistency in the logical unit group and the backup unit group, and avoiding hard disk access errors.

Benefits of technology

The first partition information in the hard disk partition table is adapted to the current hard disk status, ensuring that the electronic device can access the hard disk with hidden partitions enabled normally, and avoid hard disk access errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816244B_ABST
    Figure CN114816244B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method for a hidden partition and an electronic device, the method comprising: when both a fixed partition and a hidden partition in a hard disk are enabled, the first partition information of the hard disk is stored in a first logical unit group and a first backup unit group of a hard disk partition table, respectively, wherein the hard disk partition table is set in a preset storage area in the hard disk; the data stored in the first logical unit group is exported to generate a corresponding first export file; when the hidden partition is disabled and then enabled again, the first export file is used to perform a first check on the data stored in the first backup unit group; when the first check is passed, the data stored in the first backup unit group is written to the corresponding position in the first logical unit group to update the first logical unit group; the hard disk is accessed using the data stored in the updated first logical unit group. The method enables the hidden partition to be used normally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of hard disk control of electronic devices such as computers, and in particular to a data processing method and electronic device for hidden partitions. Background Art

[0002] The hard disk of electronic devices such as computers, such as NVMe SSD hard disks, has normal fixed partitions, and can also achieve the function of hiding some LBAs, thus forming a hidden partition on the NVMe SSD disk. After the hidden partition is divided, it is invisible to upper-layer software such as BIOS and OS, which can achieve the purpose of using hidden partitions to protect data. Hidden partitions can also prevent viruses and prevent data in the hard disk from being illegally accessed or lost.

[0003] The partition information of the hard disk will be stored in both the starting address segment (first logical unit group) and the ending address segment (first backup unit group and / or second backup unit group) of the hard disk partition table. However, in the process of turning on / off the hidden partition, the recorded multiple partition information will be inconsistent, resulting in a file system error. For example, in the actual operation process, there is an operation to initialize the hidden partition. In the BIOS stage of system startup, it is necessary to call the GPT partition information in the starting address segment of the hard disk partition table; after the hidden partition in the NVMe SSD is switched on and off, the content recorded in the GPT partition information will be inconsistent with the actual partition status of the hard disk. Multiple storage addresses recorded in the GPT partition information may also conflict, resulting in errors in accessing the hard disk. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a data processing method and electronic device for a hidden partition. The method can appropriately process the first partition information stored in a hard disk partition table (such as a GPT partition table) for a hidden partition in the hard disk, so that the electronic device can use the first partition information to normally use the hidden partition.

[0005] In order to achieve the above object, an embodiment of the present application provides a data processing method for a hidden partition, including:

[0006] When both the fixed partition and the hidden partition in the hard disk are enabled, the first partition information of the hard disk is stored in a first logical unit group and a first backup unit group of a hard disk partition table, respectively, wherein the hard disk partition table is set in a preset storage area in the hard disk;

[0007] Exporting the data stored in the first logical unit group to generate a corresponding first export file;

[0008] When the hidden partition is enabled again after being disabled, performing a first check on the data stored in the first backup unit group using the first export file;

[0009] If the first verification is passed, writing the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively to update the first logical unit group;

[0010] The hard disk is accessed using the updated data stored in the first logical unit group.

[0011] Optionally, the first logical unit group includes a plurality of first logical units, and the first backup unit group includes a plurality of first backup units; and when both the fixed partition and the hidden partition in the hard disk are enabled, storing the first partition information of the hard disk in the first logical unit group and the first backup unit group of the hard disk partition table respectively comprises:

[0012] Writing a plurality of data blocks in the first partition information into a plurality of the first logical units corresponding thereto respectively;

[0013] A plurality of data blocks in the first partition information are respectively written into a plurality of the first backup units corresponding thereto, wherein the first backup unit has the first logical unit corresponding thereto.

[0014] Optionally, exporting the data stored in the first logical unit group to generate a corresponding first export file includes:

[0015] Acquire the first partition information from the first logical unit group;

[0016] generating the first export file based on the first partition information;

[0017] The first export file is stored in a preset storage medium.

[0018] Optionally, when the hidden partition is enabled again after being disabled, performing a first check on the data stored in the first backup unit group using the first export file includes:

[0019] In the case where the hidden partition is closed after data is written, reopening the hidden partition according to a received opening instruction indicating access to the hidden partition;

[0020] Comparing the first export file with a plurality of first backup units in the first backup unit group in sequence;

[0021] When the data recorded in the first export file is identical to the data stored in the corresponding first backup unit, it is determined that the first backup unit group passes the first verification.

[0022] Optionally, the first logical unit group includes a plurality of first logical units, and when the first verification is passed, writing the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively includes:

[0023] The data in the plurality of first backup units are respectively written into the first logical units corresponding thereto.

[0024] Optionally, the method further comprises:

[0025] Without enabling the hidden partition, storing the second partition information of the hard disk in the first logical unit group and the second backup unit group of the hard disk partition table respectively;

[0026] The data stored in the first logical unit group is exported to generate a corresponding second export file.

[0027] Optionally, exporting the data stored in the first logical unit group to generate a corresponding second export file includes:

[0028] Acquire the second partition information from the first logical unit group;

[0029] generating the second export file based on the second partition information;

[0030] The second export file is stored in a preset storage medium.

[0031] Optionally, the method further comprises:

[0032] When accessing the hard disk without enabling the hidden partition, performing a second check on the data stored in the second backup unit group using the second exported file;

[0033] If the second verification is passed, writing the data stored in the second backup unit group into corresponding positions in the first logical unit group respectively to update the first logical unit group;

[0034] The hard disk is accessed using the updated data stored in the first logical unit group.

[0035] Optionally, the first logical unit group includes a plurality of first logical units, and the second backup unit group includes a plurality of second backup units; and when the second verification is passed, writing the data stored in the second backup unit group into corresponding positions in the first logical unit group respectively includes:

[0036] The data in the plurality of second backup units are respectively written into the first logical units corresponding thereto.

[0037] The present application also provides an electronic device, including:

[0038] a storage module configured to store first partition information of the hard disk in a first logical unit group and a first backup unit group of a hard disk partition table respectively when both the fixed partition and the hidden partition in the hard disk are enabled, wherein the hard disk partition table is set in a preset storage area in the hard disk;

[0039] an export module, configured to export the data stored in the first logical unit group and generate a corresponding first export file;

[0040] a verification module configured to perform a first verification on the data stored in the first backup unit group using the first export file when the hidden partition is enabled again after being disabled;

[0041] a writing module configured to, if the first verification is passed, write the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively, so as to update the first logical unit group;

[0042] An access module is configured to access the hard disk using the updated data stored in the first logical unit group.

[0043] The data processing method can appropriately process the first partition information stored in the hard disk partition table (such as the GPT partition table) for the hidden partition in the hard disk, so that the processed first partition information is compatible with the hard disk currently in use, thereby enabling the electronic device to use the first partition information to normally access the hard disk with the hidden partition enabled, thereby avoiding hard disk access errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a flow chart of a data processing method for a hidden partition according to an embodiment of the present application;

[0045] Figure 2 A schematic diagram of the structural relationship of data in a hard disk partition table according to an embodiment of the present application;

[0046] Figure 3 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S100;

[0047] Figure 4 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S200;

[0048] Figure 5 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S300;

[0049] Figure 6 A flowchart of an embodiment of a data processing method of an embodiment of the present application;

[0050] Figure 7 A flowchart of another embodiment of the data processing method of the embodiment of the present application;

[0051] Figure 8 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0053] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0054] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0055] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0056] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0057] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0058] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0059] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0060] A data processing method for a hidden partition in an embodiment of the present application can be applied to electronic devices such as computers. A hidden partition can be set in the hard disk of the electronic device. The hidden partition is invisible to the BIOS and the operating system, so that important data can be stored in the hidden partition to protect it.

[0061] The hard disk has a corresponding globally unique identifier GPT (globally unique identifier partition table), which means "globally unique identifier disk partition table", which is part of the Extensible Firmware Interface (EFI) standard, that is, in the embodiment of the present application Figure 2 The hard disk partition table is shown.

[0062] In the BIOS stage of system startup of the electronic device, the first partition information in the hard disk partition table can be called from the beginning of the hard disk to operate the hard disk. The first partition information can be configured through the UEFI firmware or shell layer of the electronic device.

[0063] In one embodiment, the first partition information includes a first logical unit group, a first backup unit group, and a second backup unit group. The first logical unit group includes a plurality of first logical units, for example, Figure 2 As shown, the multiple first logic units are: LBA0, LBA1, LBA2...LBA33, LBA34.

[0064] Among them, LBA0 can be at the beginning of the hard disk partition table, which can store Protective MBR to make the hard disk partition table compatible; the data in LBA1 (also the partition table header) is the Primary GPT Header, which defines the available space of the hard disk and the size and number of items that make up the hard disk partition table. It also records the hard disk GUID, the location and size of the partition table header itself, and the location and size of the backup unit group. It also stores the CRC32 check of itself and the hard disk partition table.

[0065] Continue to combine Figure 2 , LBA2 to LBA33 store partition table entries. For example, LBA2 stores Entry1, Entry2, Entry3, Entry4; LBA3 stores Entry5, Entry6, Entry7, Entry8, etc. LBA34 can store data such as Partition1 and Partition2 of the hard disk.

[0066] In one embodiment, the first backup unit group is associated with a hidden partition, and the data in the first logical unit group can be backed up when the hidden partition is enabled. The first backup unit group includes multiple first backup units, and the first backup units are: HLBA-1, HLBA-2...HLBA-33, HLBA-34. Among them, HLBA-1 can correspond to LBA1 and can store data that is the same as or corresponding to LBA1, HLBA-2 can correspond to LBA2 and can store data that is the same as or corresponding to LBA2,..., HLBA-34 can correspond to LBA34 and can store data that is the same as or corresponding to LBA34.

[0067] In one embodiment, continue to combine Figure 2 The second backup unit group is associated with a fixed partition in the hard disk. The fixed partition is a normal visible partition in the hard disk, which can be operated by the BIOS and the operating system. When the hidden partition is not enabled, the data in the first logical unit group can be backed up. The second backup unit group includes multiple second backup units, and the second backup units are: LBA-1, LBA-2...LBA-33, LBA-34. Among them, LBA-1 can correspond to LBA1 and can store data that is the same as or corresponding to LBA1, LBA-2 can correspond to LBA2 and can store data that is the same as or corresponding to LBA2,..., LBA-34 can correspond to LBA34 and can store data that is the same as or corresponding to LBA34.

[0068] The data processing method is further described in detail below with reference to the accompanying drawings. Figure 1Flow chart of the data processing method for hidden partitions according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0069] S100, when both the fixed partition and the hidden partition in the hard disk are enabled, the first partition information of the hard disk is stored in the first logical unit group and the first backup unit group of the hard disk partition table respectively, wherein the hard disk partition table is set in a preset storage area in the hard disk.

[0070] Exemplarily, a fixed partition is a normal partition in a hard disk, which is visible to an operating system, and the operating system can operate on the fixed partition. A hidden partition is invisible to the operating system in a hidden state. When both fixed partitions and hidden partitions are enabled, the first partition information stored in the hard disk partition table needs to be configured for the entire hard disk including the fixed partitions and the hidden partitions.

[0071] The hard disk partition table includes a first logical unit and a first backup unit, and the first partition information configured for the fixed partition and the hidden partition is respectively stored in the first logical unit group and the first backup unit group of the hard disk partition table.

[0072] When operating the hard disk, the data in the first logical unit needs to be called, so that the fixed partition and / or hidden partition can be operated by using the relevant data storing the first partition information in the first logical unit.

[0073] In one embodiment, the hard disk partition table may be set in a preset storage area in the hard disk, for example, may be set at the beginning position of the hard disk, or may be set at the end position of the hard disk.

[0074] S200, exporting the data stored in the first logical unit group to generate a corresponding first export file.

[0075] Exemplarily, the first logical unit group includes multiple first logical units, and different first logical units can store corresponding data in the first partition information. The data stored in all the first logical units in the first logical unit group can be exported to generate corresponding first export files. After export, the first export file can be stored in a preset storage medium, such as a storage device other than a hard disk. In this way, when the data in the hard disk cannot be read, the first export file can be called from the preset storage medium.

[0076] S300, when the hidden partition is enabled again after being disabled, performing a first check on the data stored in the first backup unit group using the first exported file.

[0077] Exemplarily, after the first export file is generated, an input operation may be performed on the enabled hidden partition, such as storing important data therein to ensure the safety of the important data. After the input operation is completed, the hidden partition is closed.

[0078] When the hidden partition is opened again, for example, the user issues an opening command through a shortcut key to open the hidden partition, thereby requesting to operate the entire hard disk, which requires the use of the data stored in the first backup unit group. Before calling the first backup unit group, the first export file can be called from the preset storage medium, and the first export file can be used to perform a first check on the data stored in the first backup unit group. The specific verification process can use a verification code or compare the data of both. Thus, the first verification process is completed.

[0079] S400: When the first verification is passed, write the data stored in the first backup unit group into corresponding positions in the first logical unit group to update the first logical unit group.

[0080] Exemplarily, when the first check is passed, it indicates that the data stored in the first backup unit group is compatible with the current usage status of the hard disk, and the data stored in the first backup unit group can be written into corresponding positions in the first logical unit group.

[0081] The specific writing process may be to write each first backup unit in the first backup unit group into the corresponding first logical unit in the first logical unit group, such as Figure 2 As shown, for example, the first backup units are respectively as follows: HLBA-1, HLBA-2...HLBA-33, HLBA-34. The first logical units are respectively as follows: LBA0, LBA1, LBA2...LBA33, LBA34. The data in HLBA-1 can be written into LBA1, the data in HLBA-2 can be written into LBA2, the data in HLBA-3 can be written into LBA3, and so on, and the original data in the first logical unit can be overwritten. Thus, the data update of the first logical unit group is completed.

[0082] S500: Access the hard disk using the updated data stored in the first logical unit group.

[0083] Exemplarily, before accessing the hard disk, the data related to the first partition information stored in the first logical unit group needs to be called. In this embodiment, when accessing the hard disk with the hidden partition enabled, the data stored in the updated first logical unit group also needs to be called, and the data related to the first partition information is compatible with the hard disk with the hidden partition enabled. Therefore, the hard disk access error will not be caused when the data is used.

[0084] The data processing method can appropriately process the first partition information stored in the hard disk partition table (such as the GPT partition table) for the hidden partition in the hard disk, so that the processed first partition information is compatible with the hard disk currently in use, thereby enabling the electronic device to use the first partition information to normally access the hard disk with the hidden partition enabled, thereby avoiding hard disk access errors.

[0085] In one embodiment of the present application, the first logical unit group includes a plurality of first logical units, and the first backup unit group includes a plurality of first backup units; when both the fixed partition and the hidden partition in the hard disk are enabled, the first partition information of the hard disk is stored in the first logical unit group and the first backup unit group of the hard disk partition table, respectively, such as Figure 3 As shown, the following steps are included:

[0086] S110, writing a plurality of data blocks in the first partition information into a plurality of the first logical units corresponding thereto respectively.

[0087] Exemplarily, the first partition information has multiple different data blocks, and the content of each data block is different. For example, the first data block is Protective MBR data, the second data block is partition header data, and the third data block is data sets of Entry1, Entry2, Entry3 and Entry4.

[0088] Each data block corresponds to its own first logical unit. When using the hard disk partition table to store the first partition information, the data blocks can be written into the corresponding first logical units, such as writing the first data block into LBA1, writing the second data block into LBA2, and so on.

[0089] S120, writing a plurality of data blocks in the first partition information into a plurality of first backup units corresponding thereto respectively, wherein the first backup unit has the first logical unit corresponding thereto.

[0090] Exemplarily, each data block corresponds to its own first backup unit, and the first backup unit also has a corresponding first logical unit. For example, as described above, the first backup units are HLBA-1, HLBA-2...HLBA-33, HLBA-34. The first logical units are: LBA0, LBA1, LBA2...LBA33, LBA34. Among them, HLBA-1 corresponds to LBA1, HLBA-2 corresponds to LBA2,..., HLBA-33 corresponds to LBA33, and HLBA-34 corresponds to LBA34.

[0091] The first data block corresponds to HLBA-1, the second data block corresponds to HLBA-2, etc. The first data block can be written into the corresponding HLBA-1, the second data block can be written into the corresponding HLBA-2, ..., and the thirty-third data block can be written into the corresponding HLBA-33, thereby realizing the backup of the first partition information.

[0092] In one embodiment of the present application, the data stored in the first logical unit group is exported to generate a corresponding first export file, such as Figure 4 As shown, including:

[0093] S210, acquiring the first partition information from the first logical unit group;

[0094] S220, generating the first export file based on the first partition information;

[0095] S230: Store the first exported file in a preset storage medium.

[0096] Exemplarily, the first partition information is stored in the first logical unit group, and the first partition information can be stored in multiple first logical units in the first logical unit group. When retrieving the first partition information, different types of data blocks can be retrieved from each first logical unit to form the first partition information, and the retrieved first partition information is processed to generate a first export file, such as generating a file gpt-hide.info, and storing the file gpt-hide.info in a preset storage medium different from a hard disk, such as a mobile hard disk, a network disk, etc., for easy retrieval.

[0097] In one embodiment of the present application, when the hidden partition is enabled again after being disabled, the first export file is used to perform a first check on the data stored in the first backup unit group, such as Figure 5 As shown, including:

[0098] S310, when the hidden partition is closed after data is written, reopen the hidden partition according to a received opening instruction indicating access to the hidden partition.

[0099] For example, the hidden partition can be written with data when it is enabled, and the hidden partition can be closed after the writing is completed, thereby achieving the purpose of data hiding.

[0100] Of course, when the hidden partition is used again, it needs to be reopened. After the electronic device receives the opening instruction, the hidden partition can be reopened, so that the hidden partition can be reused.

[0101] S320: Compare the first exported file with the multiple first backup units in the first backup unit group in sequence.

[0102] Exemplarily, the first export file is a file generated by exporting the data stored in the first logical unit group when the hidden partition is enabled, so the first export file can be adapted to the current hard disk state of the re-enabled hidden partition. Similarly, the data in the first backup unit group is also data generated by backing up the first partition information when the hidden partition is enabled.

[0103] In this embodiment, the first export file can be compared with the first backup unit group. Specifically, each content of the first export file can be compared with the corresponding first backup unit in the first backup unit group in sequence.

[0104] In one embodiment, before the first export file is compared with multiple first backup units in the first backup unit group in sequence, the first backup unit group can be firstly subjected to CRC32 verification. After the CRC32 verification passes, the first export file is then compared with multiple first backup units in the first backup unit group in sequence.

[0105] S330: When the data recorded in the first export file is identical to the data stored in the corresponding first backup unit, determine that the first backup unit group passes the first verification.

[0106] For example, the first export file includes multiple sub-files, each sub-file has a corresponding first backup unit, and after comparing all sub-files with the corresponding first backup units, if the data of both are the same, it can be determined that the first backup unit group passes the first verification.

[0107] In one embodiment of the present application, the first logical unit group includes a plurality of first logical units, and when the first verification is passed, writing the data stored in the first backup unit group to corresponding positions in the first logical unit group respectively includes:

[0108] The data in the plurality of first backup units are respectively written into the first logical units corresponding thereto.

[0109] Exemplarily, the data in the first backup unit group is data generated by backing up the first partition information when the hidden partition is enabled. The state in which the hidden partition is re-enabled is adapted to the data in the first backup unit group. Therefore, the data in each first backup unit in the first backup unit group can be written into the first logical unit corresponding thereto.

[0110] In combination with the above embodiment, an example is given, for example, data in HLBA-1 is written into LBA1, data in HLBA-2 is written into LBA2, ..., data in HLBA-33 is written into LBA33. Thus, the first logical unit group is updated, ensuring that the hard disk can be correctly operated when the first partition information in the first logical unit group is used.

[0111] In one embodiment of the present application, Figure 6 As shown, the method further comprises the following steps:

[0112] S600, without enabling the hidden partition, storing the second partition information of the hard disk in the first logical unit group and the second backup unit group of the hard disk partition table respectively;

[0113] Exemplarily, without enabling the hidden partition, the NVMe SSD hard disk is set to GPT mode, normal partitioning and system installation are performed, and corresponding second partition information is generated.

[0114] The second partition information is stored in the first logical unit group and the second backup unit group of the hard disk partition table respectively. Similar to the above embodiment, the first logical unit group includes a plurality of first logical units, and the second backup unit group includes a plurality of second backup units. The data blocks in the second partition information can be stored in the first logical unit and the second backup unit corresponding thereto respectively.

[0115] For example, combining Figure 2 , the first logical units are: LBA0, LBA1, LBA2...LBA33, LBA34. The second backup units are: LBA-1, LBA-2...LBA-33, LBA-34. The first data block is stored in LBA1 and LBA-1, the second data block is stored in LBA2 and LBA-2, and so on.

[0116] S700, export the data stored in the first logical unit group to generate a corresponding second export file.

[0117] Exemplarily, similar to the above embodiment, the first logical unit group includes multiple first logical units, and different first logical units can store corresponding data in the first partition information. The data stored in all the first logical units in the first logical unit group can be exported to generate corresponding second export files. After export, the second export file can be stored in a preset storage medium, such as in a storage device other than a hard disk. In this way, when the data in the hard disk cannot be read, the second export file can be called from the preset storage medium.

[0118] In one embodiment of the present application, exporting the data stored in the first logical unit group to generate a corresponding second export file includes the following steps:

[0119] Acquire the second partition information from the first logical unit group;

[0120] generating the second export file based on the second partition information;

[0121] The second export file is stored in a preset storage medium.

[0122] Exemplarily, the second partition information is generated without enabling the hidden partition, and the second partition information can be stored in the first logical unit group, and specifically the second partition information can be stored in multiple first logical units in the first logical unit group. When retrieving the second partition information, different types of data blocks can be retrieved from each first logical unit to form the second partition information, and the retrieved second partition information is processed to generate a second export file, such as generating a file gpt.info, and storing the file gpt.info in a preset storage medium different from the hard disk, such as a mobile hard disk, a network disk, etc., for easy retrieval.

[0123] In one embodiment of the present application, Figure 7 As shown, the method further comprises the following steps:

[0124] S800: When accessing the hard disk without enabling the hidden partition, perform a second check on the data stored in the second backup unit group using the second exported file.

[0125] Exemplarily, the data stored in the second export file and the second backup unit group are generated without enabling the hidden partition. When the hidden partition is still not enabled, the second export file can be used to perform a second check on the data stored in the second backup unit group. The specific check process can use a verification code or compare the data of the two. Thus, the second check process is completed.

[0126] S900: When the second verification is passed, write the data stored in the second backup unit group into corresponding positions in the first logical unit group to update the first logical unit group.

[0127] Exemplarily, when the second check is passed, it indicates that the data stored in the second backup unit group is compatible with the current usage status of the hard disk, and the data stored in the second backup unit group can be written into corresponding positions in the first logical unit group.

[0128] The specific writing process can be to write each second backup unit in the second backup unit group into the corresponding first logical unit in the first logical unit group, such as the second backup units are respectively as mentioned above: LBA-1, LBA-2...LBA-33, LBA-34. The first logical units are respectively as mentioned above: LBA0, LBA1, LBA2...LBA33, LBA34, and the data in LBA-1 can be written into LBA1, the data in LBA-2 can be written into LBA2, the data in LBA-3 can be written into LBA3, and so on, and the original data in the first logical unit can be overwritten. Thus, the data update of the first logical unit group is completed.

[0129] S1000: Access the hard disk using the updated data stored in the first logical unit group.

[0130] Exemplarily, before accessing the hard disk, the relevant data of the second partition information stored in the first logical unit group needs to be called. In this embodiment, when accessing the hard disk without enabling the hidden partition, the data stored in the updated first logical unit group also needs to be called, and the relevant data of the first partition information is compatible with the hard disk without enabling the hidden partition. Therefore, when using the data, no hard disk access error will be caused.

[0131] In one embodiment of the present application, the first logical unit group includes a plurality of first logical units, and the second backup unit group includes a plurality of second backup units; and when the second verification is passed, writing the data stored in the second backup unit group to corresponding positions in the first logical unit group respectively comprises:

[0132] The data in the plurality of second backup units are respectively written into the first logical units corresponding thereto.

[0133] Exemplarily, the data in the second backup unit group is data generated by backing up the first partition information when the hidden partition is not enabled. The hard disk state in which the hidden partition is still not enabled is adapted to the data in the second backup unit group. Therefore, the data in each second backup unit in the second backup unit group can be written into the corresponding first logical unit.

[0134] In combination with the above embodiment, an example is given, for example, data in LBA-1 is written into LBA1, data in LBA-2 is written into LBA2, ..., data in LBA-33 is written into LBA33. Thus, the first logical unit group is updated, ensuring that the hard disk can be correctly operated when the second partition information in the first logical unit group is used.

[0135] Based on the same inventive concept, the present application embodiment also provides an electronic device, such as Figure 8 As shown, including:

[0136] A storage module is configured to store the first partition information of the hard disk in the first logical unit group and the first backup unit group of the hard disk partition table respectively when both the fixed partition and the hidden partition in the hard disk are enabled, wherein the hard disk partition table is set in a preset storage area in the hard disk.

[0137] Exemplarily, a fixed partition is a normal partition in a hard disk, which is visible to an operating system, and the operating system can operate on the fixed partition. A hidden partition is invisible to the operating system in a hidden state. When both fixed partitions and hidden partitions are enabled, the first partition information stored in the hard disk partition table needs to be configured for the entire hard disk including the fixed partitions and the hidden partitions.

[0138] The hard disk partition table includes a first logical unit and a first backup unit. The first partition information configured by the storage module for the fixed partition and the hidden partition is respectively stored in the first logical unit group and the first backup unit group of the hard disk partition table.

[0139] When operating the hard disk, the data in the first logical unit needs to be called, so that the fixed partition and / or hidden partition can be operated by using the relevant data storing the first partition information in the first logical unit.

[0140] In one embodiment, the storage module may set the hard disk partition table in a preset storage area in the hard disk, for example, at the beginning of the hard disk or at the end of the hard disk.

[0141] An export module is configured to export the data stored in the first logical unit group and generate a corresponding first export file.

[0142] Exemplarily, the first logical unit group includes multiple first logical units, and different first logical units can store corresponding data in the first partition information. The export module can perform an export operation on the data stored in all the first logical units in the first logical unit group to generate a corresponding first export file. After exporting, the first export file can be stored in a preset storage medium, such as a storage device other than a hard disk. In this way, when the data in the hard disk cannot be read, the first export file can be called from the preset storage medium.

[0143] A verification module is configured to perform a first verification on the data stored in the first backup unit group using the first export file when the hidden partition is enabled again after being disabled.

[0144] Exemplarily, after the first export file is generated, an input operation may be performed on the enabled hidden partition, such as storing important data therein to ensure the safety of the important data. After the input operation is completed, the hidden partition is closed.

[0145] When the hidden partition is opened again, for example, the user issues an opening command through a shortcut key to open the hidden partition, thereby requesting to operate the entire hard disk, which requires the use of the data stored in the first backup unit group. Before calling the first backup unit group, the verification module can call the first export file from the preset storage medium, and use the first export file to perform a first verification on the data stored in the first backup unit group. The specific verification process can use a verification code or compare the data of both. Thus, the first verification process is completed.

[0146] A writing module is configured to write the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively, so as to update the first logical unit group, if the first verification is passed.

[0147] Exemplarily, when the first check is passed, indicating that the data stored in the first backup unit group is compatible with the current usage status of the hard disk, the writing module can write the data stored in the first backup unit group into corresponding positions in the first logical unit group.

[0148] The specific writing process may be to write each first backup unit in the first backup unit group into the corresponding first logical unit in the first logical unit group, such as the first backup units are respectively as mentioned above: HLBA-1, HLBA-2...HLBA-33, HLBA-34. The first logical units are respectively as mentioned above: LBA0, LBA1, LBA2...LBA33, LBA34. The writing module may write the data in HLBA-1 into LBA1, the data in HLBA-2 into LBA2, the data in HLBA-3 into LBA3, etc., and overwrite the original data in the first logical unit. Thus, the data update of the first logical unit group is completed.

[0149] An access module is configured to access the hard disk using the updated data stored in the first logical unit group.

[0150] Exemplarily, before accessing the hard disk, the data related to the first partition information stored in the first logical unit group needs to be called. In this embodiment, when the access module accesses the hard disk with the hidden partition enabled, it also needs to call the data stored in the updated first logical unit group, and the data related to the first partition information is compatible with the hard disk with the hidden partition enabled. Therefore, the hard disk access error will not be caused when the data is used.

[0151] In one embodiment of the present application, the first logical unit group includes a plurality of first logical units, the first backup unit group includes a plurality of first backup units; and the storage module is further configured as follows:

[0152] Writing a plurality of data blocks in the first partition information into a plurality of the first logical units corresponding thereto respectively;

[0153] A plurality of data blocks in the first partition information are respectively written into a plurality of the first backup units corresponding thereto, wherein the first backup unit has the first logical unit corresponding thereto.

[0154] In one embodiment of the present application, the export module is further configured as follows:

[0155] Acquire the first partition information from the first logical unit group;

[0156] generating the first export file based on the first partition information;

[0157] The first export file is stored in a preset storage medium.

[0158] In one embodiment of the present application, the verification module is further configured as follows:

[0159] In the case where the hidden partition is closed after data is written, reopening the hidden partition according to a received opening instruction indicating access to the hidden partition;

[0160] Comparing the first export file with a plurality of first backup units in the first backup unit group in sequence;

[0161] When the data recorded in the first export file is identical to the data stored in the corresponding first backup unit, it is determined that the first backup unit group passes the first verification.

[0162] In one embodiment of the present application, the first logic unit group includes a plurality of first logic units, and the writing module is further configured as follows:

[0163] The data in the plurality of first backup units are respectively written into the first logical units corresponding thereto.

[0164] In one embodiment of the present application, the storage module is further configured as:

[0165] Without enabling the hidden partition, storing the second partition information of the hard disk in the first logical unit group and the second backup unit group of the hard disk partition table respectively;

[0166] Correspondingly, the export module is further configured as follows:

[0167] The data stored in the first logical unit group is exported to generate a corresponding second export file.

[0168] In one embodiment of the present application, the export module is further configured as follows:

[0169] Acquire the second partition information from the first logical unit group;

[0170] generating the second export file based on the second partition information;

[0171] The second export file is stored in a preset storage medium.

[0172] In one embodiment of the present application, the verification module is further configured as follows:

[0173] When accessing the hard disk without enabling the hidden partition, performing a second check on the data stored in the second backup unit group using the second exported file;

[0174] Accordingly, the write module is further configured as follows:

[0175] If the second verification is passed, writing the data stored in the second backup unit group into corresponding positions in the first logical unit group respectively to update the first logical unit group;

[0176] Accordingly, the access module is further configured as follows:

[0177] The hard disk is accessed using the updated data stored in the first logical unit group.

[0178] In one embodiment of the present application, the first logical unit group includes a plurality of first logical units, and the second backup unit group includes a plurality of second backup units; the writing module is further configured as follows:

[0179] The data in the plurality of second backup units are respectively written into the first logical units corresponding thereto.

[0180] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A data processing method for hidden partitions, It is characterized in that include: When both the fixed partition and the hidden partition in the hard disk are enabled, the first partition information of the hard disk is stored in a first logical unit group and a first backup unit group of a hard disk partition table, respectively, wherein the hard disk partition table is set in a preset storage area in the hard disk; Exporting the data stored in the first logical unit group to generate a corresponding first export file; When the hidden partition is enabled again after being disabled, performing a first check on the data stored in the first backup unit group using the first export file; If the first verification is passed, writing the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively to update the first logical unit group; The hard disk is accessed using the updated data stored in the first logical unit group.

2. The method according to claim 1, It is characterized in that The first logical unit group includes a plurality of first logical units, and the first backup unit group includes a plurality of first backup units; when both the fixed partition and the hidden partition in the hard disk are enabled, the first partition information of the hard disk is stored in the first logical unit group and the first backup unit group of the hard disk partition table respectively, comprising: Writing a plurality of data blocks in the first partition information into a plurality of the first logical units corresponding thereto respectively; A plurality of data blocks in the first partition information are respectively written into a plurality of the first backup units corresponding thereto, wherein the first backup unit has the first logical unit corresponding thereto.

3. The method according to claim 1, It is characterized in that The exporting of the data stored in the first logical unit group to generate a corresponding first export file includes: Acquire the first partition information from the first logical unit group; generating the first export file based on the first partition information; The first export file is stored in a preset storage medium.

4. The method according to claim 1, It is characterized in that When the hidden partition is enabled again after being disabled, performing a first check on the data stored in the first backup unit group using the first export file includes: In the case where the hidden partition is closed after data is written, reopening the hidden partition according to a received opening instruction indicating access to the hidden partition; Comparing the first export file with a plurality of first backup units in the first backup unit group in sequence; When the data recorded in the first export file is identical to the data stored in the corresponding first backup unit, it is determined that the first backup unit group passes the first verification.

5. The method according to claim 4, It is characterized in that The first logical unit group includes a plurality of first logical units, and when the first verification is passed, writing the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively includes: The data in the plurality of first backup units are respectively written into the first logical units corresponding thereto.

6. The method according to claim 1, It is characterized in that The method further comprises: Without enabling the hidden partition, storing the second partition information of the hard disk in the first logical unit group and the second backup unit group of the hard disk partition table respectively; The data stored in the first logical unit group is exported to generate a corresponding second export file.

7. The method according to claim 6, It is characterized in that The exporting of the data stored in the first logical unit group to generate a corresponding second export file includes: Acquire the second partition information from the first logical unit group; generating the second export file based on the second partition information; The second export file is stored in a preset storage medium.

8. The method according to claim 6, It is characterized in that The method further comprises: When accessing the hard disk without enabling the hidden partition, performing a second check on the data stored in the second backup unit group using the second exported file; If the second verification is passed, writing the data stored in the second backup unit group into corresponding positions in the first logical unit group respectively to update the first logical unit group; The hard disk is accessed using the updated data stored in the first logical unit group.

9. The method according to claim 8, It is characterized in that The first logical unit group includes a plurality of first logical units, and the second backup unit group includes a plurality of second backup units; and when the second check is passed, writing the data stored in the second backup unit group to corresponding positions in the first logical unit group respectively comprises: The data in the plurality of second backup units are respectively written into the first logical units corresponding thereto.

10. An electronic device, It is characterized in that include: a storage module configured to store first partition information of the hard disk in a first logical unit group and a first backup unit group of a hard disk partition table respectively when both the fixed partition and the hidden partition in the hard disk are enabled, wherein the hard disk partition table is set in a preset storage area in the hard disk; an export module, configured to export the data stored in the first logical unit group and generate a corresponding first export file; a verification module configured to perform a first verification on the data stored in the first backup unit group using the first export file when the hidden partition is enabled again after being disabled; a writing module configured to, if the first verification is passed, write the data stored in the first backup unit group into corresponding positions in the first logical unit group respectively, so as to update the first logical unit group; An access module is configured to access the hard disk using the updated data stored in the first logical unit group.

Citation Information

Patent Citations

  • Backup method for data of mobile hard disk drive

    CN105893179A

  • Realization method of computer hard disk data restoring and back-up

    CN1534490A

  • Data backup / recovery system under cold start mode and implementing method therefor

    CN1877539A

  • Flash storage device with data recovery functionality

    TW200805066A

  • Protected, hidden emergency boot directory

    US20040133790A1