A processing method and apparatus

By automatically detecting and clearing target data in the storage area after the electronic device is powered on, the installation failure caused by RAID metadata on the hard drive is resolved, ensuring normal device startup and installation.

CN115033182BActive Publication Date: 2025-12-19LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210758946.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2025-12-19
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

When installing certain Linux operating systems, the presence of RAID metadata on the hard drive may cause it to be misidentified as a Software RAID, leading to installation failure.

Method used

After the electronic device is powered on, it automatically detects whether the target data exists in the storage area and performs a clearing operation if the target data exists to ensure that the device can function normally.

Benefits of technology

It enables fast and efficient processing without human intervention, ensuring that electronic devices can boot up and install the operating system normally in the storage area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033182B_ABST
    Figure CN115033182B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a processing method and device, the method comprising: after the electronic device is powered on, detecting whether target data exists in a first storage area of the electronic device, the target data being capable of affecting the electronic device to implement a first function in the first storage area; in the case that the target data exists in the first storage area, performing an operation of clearing the target data, so as to at least enable the electronic device to implement the first function in the first storage area.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a processing method and device. BACKGROUND

[0002] Many data storage disks applied to electronic devices, such as storage disks connected to on-board AHCI devices or storage disks connected to HBA cards, will have Raid metadata left on the hard disks if they have been used in other Raid cards before. When installing some Linux OS, the OS may mistakenly identify the hard disk as a Software Raid, and errors will occur when reading and writing the hard disk during the installation process, resulting in installation failure. Some versions of Redhat installation disks will report errors during the startup process of the electronic device. SUMMARY

[0003] Embodiments of the present application provide a processing method, comprising:

[0004] After the electronic device is powered on, it is detected whether target data exists in a first storage area of the electronic device, and the target data can affect the electronic device to implement a first function in the first storage area.

[0005] In the case that the target data exists in the first storage area, an operation of clearing the target data is performed, so that the electronic device can at least implement the first function in the first storage area.

[0006] As an optional embodiment, it further comprises:

[0007] The first storage area is determined based on a storage type and / or a running mode of a storage area in the electronic device.

[0008] As an optional embodiment, the first storage area is a hard disk in a non-disk array area of the electronic device, and the hard disk in the non-disk array area comprises at least one of the following: an on-board hard disk, an external hard disk, a memory, and a cloud disk.

[0009] As an optional embodiment, the detection of whether the target data exists in the first storage area of the electronic device comprises:

[0010] First block area data in the first storage area is read, and it is determined whether first target data in the first block area data conforms to a target specification, the target specification being a specification affecting the electronic device to implement a first function in the first storage area.

[0011] If the first target data does not conform to the target specification, it is determined that the target data does not exist in the first storage area.

[0012] if the first target data conforms to the target specification, reading second block region data in the first storage region to determine whether the first storage region has target data based on the second block region data;

[0013] wherein the first block region data is different from the second block region data.

[0014] As an optional embodiment, the determining whether the first storage region has target data based on the second block region data comprises:

[0015] reading second target data in the second block region data to determine whether the second target data conforms to a target specification;

[0016] if the second target data conforms to the target specification, determining that the first storage region has the target data;

[0017] if at least one of the second target data does not conform to the target specification, determining that the first storage region does not have the target data.

[0018] As an optional embodiment, the first storage region is a hard disk, and the target specification is a software disk array specification.

[0019] As an optional embodiment, the executing an operation of clearing the target data in the case that the first storage region has target data comprises:

[0020] directly executing an operation of clearing the target data in the case that the first storage region has target data; or

[0021] outputting first prompt information representing clearing the target data in the case that the first storage region has target data, and directly executing an operation of clearing the target data; or

[0022] outputting second prompt information of clearing the target data in the case that the first storage region has target data, and executing an operation of clearing the target data in response to obtaining input information representing a clearing instruction.

[0023] As an optional embodiment, the executing an operation of clearing the target data comprises:

[0024] writing data in the first storage region to overwrite the target data.

[0025] wherein the writing data in the first storage region comprises writing all-zero data in a head and a tail of the first storage region.

[0026] As an optional embodiment, the executing an operation of clearing the target data comprises:

[0027] migrate the target data to a second storage area, the second storage area not affecting the electronic device to implement the first function in the first storage area when the target data is stored in the second storage area.

[0028] Another embodiment of the present application also provides an electronic device, comprising:

[0029] a detection module, configured to detect whether there is target data in a first storage area of the electronic device after the electronic device is powered on, the target data being capable of affecting the electronic device to implement a first function in the first storage area;

[0030] an execution module, configured to execute an operation of clearing the target data when the target data exists in the first storage area, so that the electronic device is capable of implementing the first function in the first storage area.

[0031] The present application also provides an electronic device, comprising:

[0032] one or more processors;

[0033] a memory, configured to store one or more programs;

[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the above processing method.

[0035] The present application also provides a storage medium, comprising a stored program, wherein when the program is run, the device comprising the storage medium executes the above processing method.

[0036] The present application also provides a computer program product, which is tangibly stored on a computer readable medium and comprises computer executable instructions, which when executed cause at least one processor to perform the above processing method.

[0037] Based on the disclosure of the above embodiments, it can be known that the embodiments of the present application have the beneficial effects that the electronic device can automatically detect the first storage area in the power-on stage, and determine whether there is target data. When it is determined that there is target data, the device processes the target data, so that the electronic device can implement the first function in the first storage area. The above process does not need human operation, and the processing process is fast and efficient, which provides convenience for users to use the electronic device. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 The flowchart of the processing method in the embodiments of the present application.

[0039] Figure 2Flowchart of a processing method in another embodiment of the present application.

[0040] Figure 3 Flowchart of a processing method in another embodiment of the present application.

[0041] Figure 4 Flowchart of a processing method in another embodiment of the present application.

[0042] Figure 5 Block diagram of a processing device in an embodiment of the present application. DETAILED DESCRIPTION

[0043] Hereinafter, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. However, the present application should not be construed as being limited to the following embodiments but should be construed as including all changes, equivalents and / or substitutes falling within the scope and spirit of the present application.

[0044] It is to be understood that various alterations can be made to the embodiments disclosed herein. Thus, the following description should not be viewed as limiting, but merely as an example embodiment. Other modifications within the scope and spirit of the disclosure will occur to those skilled in the art to which the present disclosure pertains.

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

[0046] These and other characteristics of the present application will become apparent from the following description of the preferred forms given, by way of non-limiting example, with reference to the attached drawings.

[0047] It is also to be understood that even though a number of embodiments of the present application have been described herein, the application should not be construed as limited thereto, but only by the appended claims. Any changes and modifications that come within the meaning and range of equivalency of the claims are to be embraced within their scope.

[0048] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings, in which:

[0049] Specific embodiments of the present disclosure are described hereinafter; however, it is to be understood that the disclosed embodiments are merely examples of the present disclosure, which can be practiced in various ways. Well-known and / or redundant functions and structures are not described in detail to avoid obscuring the present disclosure unnecessarily. Therefore, specific structural and functional details disclosed herein are not intended to limit the present disclosure but are merely as examples to teach a person of ordinary skill in the art to use the present disclosure in substantially any appropriate detailed structure.

[0050] The specification can use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which can refer to one or more embodiments according to the present disclosure.

[0051] In the following, the embodiments of the present application will be described in detail with reference to the accompanying drawings.

[0052] As shown in the figure, the embodiments of the present application provide a processing method, comprising: Figure 1

[0053] Step S101: After the electronic device is powered on, detecting whether the target data exists in the first storage area of the electronic device, the target data can affect the electronic device to realize the first function in the first storage area;

[0054] Step S201: In the case that the target data exists in the first storage area, performing the operation of clearing the target data, so that the electronic device can at least realize the first function in the first storage area.

[0055] For example, taking the electronic device as a notebook computer, desktop computer, server, workstation and other devices as an example, when the electronic device is powered on, the device will automatically detect whether the target data exists in the first storage area. The target data is the data that can affect the electronic device to realize the first function in the first storage area. For example, the target data can affect the electronic device to initialize the first storage area, complete the startup of the device or the installation of the system, etc., or cannot make the electronic device realize the storage of other data in the first storage area, or cannot add the first storage area to the disk array to perform the storage function, etc. The specific one is not unique. When it is determined that the target data exists in the first storage area, the device will perform the clearing operation on the target data, so that the electronic device can at least realize the first function in the first storage area. The clearing operation refers to removing the target data in the first storage area, as long as the first storage area does not have the target data.

[0056] Based on the disclosure of the above embodiments, it can be known that the embodiments have the beneficial effects that the electronic device can automatically detect the first storage area in the power-on stage, determine whether there is target data, and when it is determined that there is target data, process the target data, so that the electronic device can realize the first function in the first storage area. The above process does not need human operation, and the processing process is fast and efficient, which provides convenience for users to use the electronic device.

[0057] Further, the method in the embodiments further comprises:

[0058] Step S301: Determining the first storage area based on the storage type and / or running mode of the storage area in the electronic device.

[0059] ​For example, electronic devices may have multiple storage areas, and these areas may differ in storage type, operating mode, etc., or only some storage areas may share the same storage type and / or operating mode. Storage type can include, for example, closed-system storage or open-system storage. Open-system storage includes internal storage and external storage. External storage further includes direct-attached storage, network-attached storage, network-accessed storage, and storage area network storage, or it may include whether it is a disk array storage system. The operating mode, or storage mode, can be related to the above storage types; that is, the storage mode / operating mode is determined based on the storage type. For example, if a storage area belongs to a disk array storage architecture, then its storage mode / operating mode is a disk array storage mode. Alternatively, the operating mode can be a pre-defined mode, such as an encrypted storage mode. Furthermore, the device can also determine the first storage area based on specific information about the first function. For example, the storage area involved in executing the first function can be defined as the first storage area. For instance, when the device system boots up or is installed, it involves hard disk devices such as onboard hard drives, and these hard drives can be identified as the first storage area. The device can analyze and determine the first storage area based on one or all of the storage types and operating modes of the aforementioned storage areas, combined with preset reference data. This first storage area may include multiple areas or only one; the specific number is not unique. Furthermore, the preset reference data can be user-inputted or determined by the device itself based on big data, historical data, etc. For example, the device can determine the storage type / operating mode of the storage area containing target data that has historically affected the normal execution of the first function of the electronic device, based on historical data, big data, etc., and then determine the reference data based on this storage type / operating mode. Alternatively, the device can determine the reference data based on a specific first function. For example, when implementing the first function, the device can set the reference data based on the storage type and operating mode to determine the first storage area in the electronic device.

[0060] Optionally, the first storage area in this embodiment is a hard disk in the non-disk array area of ​​the electronic device. The hard disk in the non-disk array area includes at least one of the following: onboard hard disk, external hard disk, memory, cloud disk. That is, the first storage area can be one or more of the above types of hard disks, and may also include other types of hard disks, which are not specific.

[0061] Furthermore, such as Figure 2 As shown, when detecting whether target data exists in the first storage area of ​​an electronic device, the process includes:

[0062] Step S102: reading first block area data in the first storage area, determining whether first target data in the first block area data conforms to a target specification, the target specification being a specification affecting the electronic device to implement a first function in the first storage area;

[0063] Step S103: if the first target data does not conform to the target specification, determining that the first storage area does not exist target data;

[0064] Step S104: if the first target data conforms to the target specification, reading second block area data in the first storage area, to determine whether the first storage area exists target data based on the second block area data;

[0065] Wherein, the first block area data is different from the second block area data.

[0066] For example, taking the first storage area in the embodiment as a hard disk, which can be a hard disk without a non-disk array area. The first block area in the first storage area can be a Superblock area, a block area where 16 bytes (offset 0x00-0x0f) of data are located. The device can first read the data in the first block area, i.e. the first block area data, to determine the first target data. The first target data in the embodiment includes a "Magic Number" (a magic number that can be used to mark the format of a file or a protocol, and many files have a magic number mark to indicate the format of the file) and a "Major Version" (the main version of the above-mentioned protocol), and the device determines whether the first target data conforms to the target specification by analyzing the first target data. The target specification in the embodiment is a software raid specification, i.e. a software disk array specification, which affects the electronic device to implement a first function in the first storage area, such as affecting the electronic device to initialize the first storage area, thereby completing the startup of the electronic device or the updating, installation, etc. of the system. When the device determines that the first target data does not conform to the target specification based on the analysis and judgment result, it can be determined that the first storage area does not exist target data, and if the device determines that the first target data conforms to the target specification based on the analysis and judgment result, it will read the second block area data in the first storage area, analyze and judge the data in the second block area, and then determine whether the first storage area exists target data.

[0067] Further, as shown in Figure 3 determining whether the first storage area exists target data based on the second block area data includes:

[0068] Step S105: reading second target data in the second block area data, determining whether the second target data conforms to the target specification;

[0069] Step S106: if the second target data conforms to the target specification, determining that the first storage area exists target data;

[0070] Step S107: If at least one of the second target data does not conform to the target specification, it is determined that the first storage area does not have the target data.

[0071] Continuing with the above embodiment, when the device reads the data of the second block area, it can read the data of the Per-Array Identification & Configuration area (offset 0x10-0x63) in the hard disk, and determine the second target data through the data of the block area. The second target data in this embodiment includes "UUID for the Array", "Name for the Array", "Creation Time", "RAID Level of the Array", "layout of array", and the like. The device determines whether the second target data conforms to the target specification, i.e., the software disk array specification, by analyzing the second target data. If all the second target data conforms to the target specification, it can be directly determined that the first storage area has the target data. If at least one of the second target data does not conform to the target specification, the device can directly determine that the first storage area does not have the target data. For example, if the data information of "UUID for the Array" does not conform to the target specification, even if the rest of the second target data conforms to the target specification, the device will determine that the first storage area does not have the target data. Only when all the first target data and the second target data conform to the target specification, it can be determined that the first storage area has the target data.

[0072] Further, in the case where the first storage area has the target data, the operation of clearing the target data is performed, including:

[0073] Step S202: In the case where the first storage area has the target data, directly performing the operation of clearing the target data; or

[0074] In the case where the first storage area has the target data, outputting the first prompt information representing clearing the target data, and directly performing the operation of clearing the target data; or

[0075] In the case where the first storage area has the target data, outputting the second prompt information of clearing the target data, and performing the operation of clearing the target data in response to obtaining the input information representing the clearing instruction.

[0076] For example, in an embodiment, when the target data exists in the first storage area, the device can directly perform the operation of clearing the target data, or can perform the operation of clearing the target data only when it is determined that the execution condition is met. The execution condition can be related to implementing the first function, including receiving an instruction for implementing the first function, for example, can be that the electronic device is powered on and obtains an instruction to install an operating system in the first storage area, etc.

[0077] Alternatively, in another embodiment, when the target data exists in the first storage area, the first prompt information representing clearing the target data can be output, and the operation of clearing the target data is directly performed. The operation of clearing the target data can also be performed only when it is determined that the execution condition is met. The specific content of the execution condition is the same as above. The first prompt information can specifically represent what kind of data the device clears, that is, the data that affects the electronic device to implement the first function in the first storage area, such as the data that affects the installation of an operating system in the first storage area. The device informs the user that it will delete the target data through the output of the first prompt information, so as to ensure that the electronic device can successfully perform the first function, that is, the user is informed that the device has found data that will affect the performance of the first function, and will be processed without user intervention.

[0078] Alternatively, in another embodiment, when the target data exists in the first storage area, the device can output the second prompt information to ask the user whether to clear the target data, that is, in this embodiment, the device does not directly clear the target data, but asks the user whether to clear, and then the device responds based on the input information input by the user, and then clears the target data. Alternatively, the second prompt information can be output to ask the user, but if no user feedback is received within a preset time period, the device can directly clear the target data.

[0079] Further, the operation of clearing the target data includes:

[0080] Step S203: writing data in the first storage area to cover the target data;

[0081] Among them, writing data in the first storage area includes writing all-zero data in the head and tail of the first storage area.

[0082] Specifically, when the device performs the operation of clearing the target data, it can choose to write data in the first storage area to cover the target data, thereby achieving the effect of clearing the target data in the first storage area. The data written in the first storage area includes all-zero data written in the head and tail of the first storage area, or other data can be written to cover the target data. That is, as long as data is written in the first storage area to cover the target data, the specific data written is indefinite.

[0083] Optionally, when performing the operation of clearing the target data, the target data in the first storage area can also be directly erased or eliminated.

[0084] Optionally, when performing the operation of clearing the target data, the operation can further include:

[0085] Step S204: Migrating the target data to a second storage area, the second storage area does not affect the electronic device to implement the first function in the first storage area when the target data is stored in the second storage area.

[0086] For example, the target data in the first storage area is migrated as a whole, so that there is no target data in the first storage area, thereby realizing the clearing operation. The specific migration area can be selected as a second storage area, which needs to be a storage area that does not affect the electronic device to implement the first function in the first storage area even if the target data is stored in the second storage area. The second storage area can be an external storage disk, or a storage disk fixedly arranged in the electronic device, or a board-mounted storage disk, and the specific one is not unique.

[0087] In addition, optionally, when performing the clearing operation, the device can first migrate the target data, and then perform the clearing operation. For example, the device first migrates the target data to the second storage area, and then performs the operation of erasing or eliminating the target data, or writes data to cover the target data in the second storage area, etc.

[0088] Further, in actual application, as shown in Figure 4 , a hard disk checking module can be added in the UEFI of the electronic device, and the checking module performs the checking and clearing of the target data. Specifically, in the UEFI post process, the checking module automatically checks the non-Raid storage device hard disk in the system. If it is detected that there is target data on these hard disks, the target data can be directly cleared, or a prompt can be popped up for clearing, or a prompt can be popped up and the user is asked whether to clear the target data, and the user agrees to clear the target data. When clearing, the checking module can write all-zero data at the head and tail of the hard disk to cover the target data, realize clearing, directly erase the target data, or migrate the target data to other storage areas, or perform the clearing operation such as erasing or writing data to cover after migration. When the clearing of the target data is completed, the assembly operation of the operating system (os) can be started, and of course the specific first function is not unique, and other function operations can also be implemented.

[0089] As shown in Figure 5 , another embodiment of the present application simultaneously provides a processing device, which includes:

[0090] A detection module 1 is configured to detect whether target data exists in a first storage area of an electronic device after the electronic device is powered on, the target data being capable of affecting the electronic device to implement a first function in the first storage area.

[0091] An execution module 2 is configured to execute an operation of clearing the target data to at least enable the electronic device to implement the first function in the first storage area in a case where the target data exists in the first storage area.

[0092] As an optional embodiment, the processing apparatus further comprises:

[0093] A determination module is configured to determine the first storage area according to a storage type and / or a running mode of a storage area in the electronic device.

[0094] As an optional embodiment, the first storage area is a non-disk array area hard disk in the electronic device, and the non-disk array area hard disk comprises at least one of the following: an on-board hard disk, an external hard disk, a memory, and a cloud disk.

[0095] As an optional embodiment, the detection of whether the target data exists in the first storage area of the electronic device comprises:

[0096] reading first block area data in the first storage area, determining whether first target data in the first block area data conforms to a target specification, the target specification being a specification affecting the electronic device to implement a first function in the first storage area;

[0097] if the first target data does not conform to the target specification, determining that the target data does not exist in the first storage area;

[0098] if the first target data conforms to the target specification, reading second block area data in the first storage area to determine whether the target data exists in the first storage area based on the second block area data;

[0099] wherein the first block area data is different from the second block area data.

[0100] As an optional embodiment, the determination of whether the target data exists in the first storage area based on the second block area data comprises:

[0101] reading second target data in the second block area data, and determining whether the second target data conforms to a target specification;

[0102] if the second target data conforms to the target specification, determining that the target data exists in the first storage area;

[0103] If at least one of the second target data does not conform to the target specification, it is determined that the first storage area does not have the target data.

[0104] As an optional embodiment, the first storage area is a hard disk of a non-disk array area, and the target specification is a software disk array specification.

[0105] As an optional embodiment, when the first storage area has the target data, the operation of clearing the target data includes:

[0106] When the first storage area has the target data, directly performing the operation of clearing the target data; or

[0107] When the first storage area has the target data, outputting first prompt information representing clearing the target data, and directly performing the operation of clearing the target data; or

[0108] When the first storage area has the target data, outputting second prompt information of clearing the target data, and performing the operation of clearing the target data in response to obtaining input information representing a clearing instruction.

[0109] As an optional embodiment, the operation of clearing the target data includes:

[0110] Writing data in the first storage area to overwrite the target data.

[0111] Wherein, writing data in the first storage area includes writing all-zero data at the head and tail of the first storage area.

[0112] As an optional embodiment, the operation of clearing the target data includes:

[0113] Migrating the target data to a second storage area, the second storage area does not affect the electronic device to implement a first function in the first storage area when the second storage area has the target data.

[0114] Another embodiment of the present application also provides an electronic device, comprising:

[0115] One or more processors;

[0116] Memory configured to store one or more programs;

[0117] When the one or more programs are executed by the one or more processors, the one or more processors implement the above processing method.

[0118] The embodiment of the present application further provides a storage medium, which stores a computer program, and the computer program is executed by a processor to realize the processing method described above. It should be understood that each scheme in the embodiment has the corresponding technical effects in the method embodiment described above, and details are not described herein.

[0119] The embodiment of the present application further provides a computer program product, which is tangibly stored on a computer readable medium and includes computer readable instructions that, when executed, cause at least one processor to perform a processing method such as in the embodiments described above. It should be understood that each scheme in the embodiment has the corresponding technical effects in the method embodiment described above, and details are not described herein.

[0120] It should be noted that the computer storage medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable medium may, for example, but not limited to, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of computer readable storage media can include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fibers, portable compact disk read only memory (CD-ROM), optical storage media, magnetic storage media, or any suitable combination of the above. In the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, device or apparatus. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, cable, RF, etc., or any suitable combination thereof.

[0121] It should be understood that although the present application is described in terms of various embodiments, not every embodiment contains only one independent technical solution, and the description manner of the specification is only for the sake of clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that those skilled in the art can understand.

[0122] The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application. The scope of protection of the present application is defined by the claims. Those skilled in the art can make various modifications or equivalent replacements to the present application within the spirit and protection scope of the present application, and such modifications or equivalent replacements should also be considered to fall within the protection scope of the present application.

Claims

1. A processing method comprising: automatically detecting, after power-on of an electronic device, whether a first storage area of the electronic device has target data, the target data capable of affecting the electronic device to implement a first function in the first storage area; wherein the automatically detecting whether the first storage area of the electronic device has target data comprises: reading first block area data in the first storage area, determining whether first target data in the first block area data conforms to a target specification, the target specification being a specification affecting the electronic device to implement a first function in the first storage area; if the first target data does not conform to the target specification, determining that the first storage area does not have the target data; if the first target data conforms to the target specification, reading second block area data in the first storage area different from the first block area data to determine whether the first storage area has target data based on the second block area data, comprising: reading second target data in the second block area data, determining whether the second target data conforms to a target specification; if the second target data conforms to the target specification, determining that the first storage area has the target data; if at least one of the second target data does not conform to the target specification, determining that the first storage area does not have the target data; in a case where the first storage area has target data, performing an operation of clearing the target data to at least enable the electronic device to implement the first function in the first storage area.

2. The method of claim 1, wherein, Further comprising: determining the first storage area based on a storage type and / or a running mode of a storage area in the electronic device.

3. The method of claim 2, wherein, The first storage area is a hard disk of a non-disk array area in the electronic device, the hard disk of the non-disk array area comprising at least one of: an on-board hard disk, an external hard disk, a memory, a cloud disk.

4. The method of claim 1, wherein, The first storage area is a hard disk of a non-disk array area, and the target specification is a software disk array specification.

5. The method of claim 1, wherein, The performing, in a case where the first storage area has target data, an operation of clearing the target data comprises: in a case where the first storage area has target data, directly performing an operation of clearing the target data; or in a case where the first storage area has target data, outputting first prompt information representing clearing the target data, and directly performing an operation of clearing the target data; or in a case where the first storage area has target data, outputting second prompt information of clearing the target data, and performing an operation of clearing the target data in response to obtaining input information representing a clearing instruction.

6. The method of claim 1, wherein, The performing an operation of clearing the target data comprises: writing data in the first storage area to overwrite the target data; wherein the writing data in the first storage area comprises writing all-zero data in a head and a tail of the first storage area.

7. The method of claim 1, wherein, The performing an operation of clearing the target data comprises: Migrate the target data to a second storage area, the second storage area not affecting the electronic device to implement a first function in the first storage area when the target data is stored in the second storage area.

8. A processing apparatus comprising: a detecting module configured to automatically detect whether a first storage area of an electronic device has target data after the electronic device is powered on, the target data being capable of affecting the electronic device to implement a first function in the first storage area; wherein the automatic detection of whether the first storage area of the electronic device has the target data comprises: reading first block area data in the first storage area, and determining whether first target data in the first block area data conforms to a target specification, the target specification being a specification affecting the electronic device to implement the first function in the first storage area; if the first target data does not conform to the target specification, determining that the first storage area does not have the target data; if the first target data conforms to the target specification, reading second block area data in the first storage area different from the first block area data, to determine whether the first storage area has target data based on the second block area data, including: reading second target data in the second block area data, and determining whether the second target data conforms to the target specification; if the second target data conforms to the target specification, determining that the first storage area has the target data; and if at least one of the second target data does not conform to the target specification, determining that the first storage area does not have the target data; a performing module configured to, when the first storage area has the target data, perform an operation of clearing the target data, to at least enable the electronic device to implement the first function in the first storage area.

Citation Information

Patent Citations

  • System and method for adjusting redundant array of independent disk card connected with serial attached small computer system interface (SAS) expander

    CN103164168A

  • Hard disk clearing method, system and device

    CN110737408A