Hard disk security management method and device, electronic equipment and storage medium
By setting the first area in the electronic device to store the first password and storing the second password in the hard disk, and using the self-unlocking function to automatically match and unlock the hard disk, the existing hard disk security verification method is solved, and the problem of cumbersome operation and poor security is poor. , realizes the effects of automated security verification and high security.
Patent Information
- Application Number
- CN202311007391.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-02-18
AI Technical Summary
The existing hard disk security verification method requires users to manually enter custom passwords, which are cumbersome and have poor security, which can easily lead to password loss.
By setting the first area in the electronic device to store the first password and storing the second password in the hard disk, the self-unlocking function automatically matches and unlocks the hard disk when the device is started, and the user avoids manually entering the password.
It realizes automation of the hard disk security verification process, improves user experience, reduces the probability of password loss, and improves security.
Smart Images

Figure CN119475307A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data storage technology, and in particular to a hard disk security management method, device, electronic device and storage medium. Background Art
[0002] A hard disk is a common computer storage device used to save and read data. In some high-security application scenarios, for data security reasons, when the computer starts, a security verification of the hard disk is required. After the security verification passes, the hard disk is unlocked and data can be read and written normally. If the security verification fails, the hard disk will be locked and cannot be accessed.
[0003] In a current security verification method, the user can set a custom password. After the computer starts, the custom password input interface is displayed. The user needs to manually enter the custom password before normal access to the hard disk. However, with this security verification method, the user needs to manually enter the custom password every time the computer starts, which is cumbersome. In addition, the custom password set by the user is easy to lose, so the security is poor. Summary of the invention
[0004] The embodiments of the present application provide a hard disk security management method, device, electronic device and storage medium, which have high security, and the hard disk security verification process does not require user participation, so the user experience is good.
[0005] In a first aspect, an embodiment of the present application provides a hard disk security management method for an electronic device, the electronic device including a hard disk, the method comprising:
[0006] In response to the mainboard being powered on, obtaining a first password stored in a first area of the electronic device;
[0007] When the self-unlocking function is activated, the second password stored in the hard disk is read; the self-unlocking function is used to unlock the password of the hard disk inside the electronic device;
[0008] When the first password and the second password match, unlocking the hard disk to facilitate access to the hard disk;
[0009] The first password uniquely corresponds to the time when the password is generated, the second password has a corresponding relationship with the first password, and the first area is a storage area in the electronic device other than the hard disk.
[0010] In some embodiments, obtaining a first password stored in a first area of an electronic device includes:
[0011] Read the first password in the first area;
[0012] or,
[0013] If the first password in the first area cannot be read, a first password uniquely corresponding to the current time is generated based on a preset rule.
[0014] In some embodiments, after generating a first password uniquely corresponding to the current time, the method further includes:
[0015] The first password is stored in the first area.
[0016] In some embodiments, before reading the second password stored in the hard disk, the method further includes:
[0017] determining whether a second password is stored in the hard disk;
[0018] If the second password is not stored in the hard disk, a second password corresponding to the first password is determined, and the determined second password is stored in the hard disk.
[0019] In some embodiments, the method further comprises:
[0020] When the self-unlocking function is not activated and the hard disk does not store the second password, an input interface is displayed, and the input interface is used to enter a custom password;
[0021] In response to a user's custom password input operation, an unlocking operation on the hard disk is determined.
[0022] In some other embodiments, the method further comprises:
[0023] When the self-unlocking function is not activated and the second password is stored in the hard disk, if the first password in the first area matches the second password, the second password in the hard disk is deleted;
[0024] Display the input interface, which is used to enter a custom password;
[0025] In response to a user's custom password input operation, an unlocking operation on the hard disk is determined.
[0026] In some embodiments, the first area is a permission-restricted area.
[0027] In a second aspect, an embodiment of the present application provides a hard disk security management device for an electronic device, the electronic device including a hard disk, the device including:
[0028] A first password acquisition module, configured to acquire a first password stored in a first area of the electronic device in response to the mainboard being powered on;
[0029] The second password acquisition module is used to read the second password stored in the hard disk when the self-unlocking function is activated; the self-unlocking function is used to unlock the password of the hard disk inside the electronic device;
[0030] An unlocking module, used to unlock the hard disk when the first password and the second password match, so as to facilitate access to the hard disk;
[0031] The first password uniquely corresponds to the time when the password is generated, the second password has a corresponding relationship with the first password, and the first area is a storage area in the electronic device other than the hard disk.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0033] A processor and a memory communicatively connected to the processor;
[0034] The memory stores computer program instructions, which, when called by the processor, enable the processor to execute the method described in the second aspect.
[0035] In a fourth aspect, the present application further provides a storage medium storing computer executable instructions for causing a processor to execute the method as described above.
[0036] Compared with the prior art, in the hard disk security management method provided by the embodiment of the present application, the password and the current time when the password is generated have a unique corresponding relationship. Due to the uniqueness of the time, the password is unique. When performing security verification on the hard disk, the password stored in the first area and the password stored in the hard disk can be matched. If the match is successful, the hard disk is successfully unlocked and the device can access the hard disk. If the password in the first area is inconsistent with the password in the hard disk, the hard disk cannot be unlocked and the electronic device cannot access the hard disk.
[0037] After the mainboard is powered on, the hard disk security management method unlocks the hard disk inside the electronic device through the self-unlocking function, and the device automatically matches the passwords in the first area and the hard disk to complete the security verification, without the need for the user to manually enter the password. The entire security verification process is unaware to the user, and the user experience is good. Moreover, since the password is stored in the first area and the hard disk, it is invisible to the user, and compared with the user-defined password, the probability of loss is low, and the security is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0039] Figure 1a-1b A schematic diagram of the structure of an electronic device according to an embodiment of the present application;
[0040] Figure 2-Figure 5 A flowchart of a hard disk security management method according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be described clearly and in detail in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] The technical features involved in the various embodiments of the present application described below do not conflict with each other and can be combined with each other.
[0043] Furthermore, although the device schematic diagram is divided into functional modules and the flowchart shows a logical order, in some cases, the steps may be divided into modules different from those in the device or may be executed in an order different from that shown in the flowchart.
[0044] The words "first", "second", "third", etc. used in this document do not limit the data, devices and execution order, but are only used to distinguish the same or similar items with basically the same functions and effects.
[0045] Unless otherwise defined, the technical and scientific terms used herein have the same meanings as those generally understood by those skilled in the art. The terms used in the specification are only for describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0046] To facilitate understanding of the method provided in the embodiments of the present application, the nouns involved in the embodiments of the present application are first introduced:
[0047] (1) The motherboard (main circuit board) is the hub of the computer system and plays an important role in connecting and coordinating other hardware components. It provides functions such as data transmission, control, power management, firmware support, and expansion capabilities to ensure that the various components of the computer system can work together to achieve correct and efficient operation. The motherboard can integrate basic firmware programs (such as the Basic Input / Output System (BIOS) or the Unified Extensible Firmware Interface (UEFI)) to boot the computer system, initialize hardware devices, and provide an interface for system settings and configuration.
[0048] (2) BIOS is a software layer located between computer hardware and operating system. It is a set of basic software programs embedded in the computer motherboard, used to initialize and configure hardware devices and provide an interface for communication with the operating system.
[0049] (3)UEFI is a firmware interface standard that can replace BIOS and is used to start and manage computer systems.
[0050] (4) UEFI variables are a mechanism for storing and retrieving data in UEFI firmware. UEFI variables use a unified identifier and naming convention and can be accessed and modified through a unique variable name.
[0051] (5) UUID (Universally Unique Identifier) is an identifier used to uniquely identify an object or entity. It can be generated by a computer, using specific algorithms and information (such as timestamps, MAC addresses, etc.) to ensure the uniqueness of the generated identifier.
[0052] The current hard disk security management method requires that the correct user name and custom password be manually entered when the device is turned on in order to access the hard disk normally. The operation is cumbersome, and the custom password set by the user is easy to lose, so the security is poor.
[0053] In the hard disk security management method provided by the embodiment of the present application, the password and the current time when the password is generated have a unique corresponding relationship. Due to the uniqueness of the time, the password is unique. When performing security verification on the hard disk, the password stored in the first area and the password stored in the hard disk can be matched. If the match is successful, the hard disk is successfully unlocked and the device can access the hard disk. If the password in the first area is inconsistent with the password in the hard disk, the hard disk cannot be unlocked and the electronic device cannot access the hard disk.
[0054] After the motherboard is powered on, the hard disk security management method automatically matches the passwords in the first area and the hard disk to complete the security verification without user participation. The user is unaware of the entire security verification process, and the user experience is good. Moreover, since the password is stored in the first area and the hard disk, it is invisible to the user. Compared with user-defined passwords, the probability of loss is low and the security is higher.
[0055] The hard disk security management method of the embodiment of the present application can be applied to electronic devices, and the electronic device can be any electronic device. In one embodiment, it can be an electronic device with a display, such as an interactive smart device, including an interactive smart tablet, a large-screen smart display device, a tablet computer, a personal computer, a laptop, a smart phone, etc.
[0056] Figure 1aA hardware structure of the electronic device 100 is shown. Figure 1a The electronic device 100 includes a mainboard 110 and a hard disk 120. The mainboard 110 is the command center of the electronic device and may include one or more controllers for managing and controlling various components and devices of the electronic device so that the various parts of the electronic device can work normally and operate in coordination.
[0057] The motherboard 110 may be loaded with a basic firmware program, which may be stored in a memory of the motherboard, such as embedded in a non-volatile memory (usually a flash memory) of the motherboard, for starting the electronic device and providing underlying hardware control and management. The above-mentioned firmware program may be, for example, BIOS firmware, UEFI firmware, etc.
[0058] The hard disk 120 includes a hard disk controller 121 and a storage module 122. The hard disk controller 121 is the main control unit of the hard disk 120 and is responsible for managing the read and write operations and data transmission of the hard disk 120. In practical applications, it can be composed of a dedicated chip that can control the operation of the hard disk 120 and the communication with the electronic device 100. The storage module 122 is the physical part of the hard disk 120 and is used to store data.
[0059] The hard disk security management method of the embodiment of the present application can be executed by the above-mentioned mainboard 110, or can be executed in collaboration by the above-mentioned mainboard 110 and the hard disk controller 121. For example, the mainboard 110 generates the first password, stores the first password in the mainboard 110, reads the first password from the mainboard 110, sends the first password to the hard disk 120, etc. The hard disk controller 120 matches the first password in the mainboard 110 with the second password in the hard disk, sets and cancels the second password for the hard disk, and unlocks the hard disk, etc.
[0060] The hard disk security management method of the embodiment of the present application can be executed by the above-mentioned basic firmware program, or can be executed collaboratively by the basic firmware program, the hard disk driver program and the program loaded in the hard disk controller.
[0061] In some other embodiments, the electronic device may further include a display (not shown), and the display may be connected to the mainboard 110 , for example, connected to the mainboard 110 via a bus.
[0062] Figure 1b Another hardware structure of the electronic device 100 is shown. Figure 1b The electronic device includes a processor 10, a memory 20 and a display 30, wherein the processor 10, the memory 20 and the display 30 are connected via a line. Figure 1b In the illustrated embodiment, the processor 10, the memory 20 and the display 30 are connected via a bus.
[0063] The memory 20 is used to store software programs, computer executable program instructions, etc. The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the electronic device, etc.
[0064] The memory 20 may be a read-only memory (ROM), or other types of static storage devices that can store static information and instructions, or a random access memory (RAM), or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), and the specifics are not limited here.
[0065] Exemplarily, the aforementioned memory 20 may be a double data rate synchronous dynamic random access memory DDRSDRAM (DDR for short). The memory 20 may exist independently but be connected to the processor 10. Optionally, the memory 20 may also be integrated with the processor 10. For example, integrated into one or more chips.
[0066] In some embodiments, the memory 20 may include a memory remotely located relative to the processor 10, and the remote memory may be connected to the electronic device via a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0067] The processor 10 uses various interfaces and lines to connect various parts of the entire electronic device 100, and performs various functions of the electronic device and processes data by running or executing software programs stored in the memory 20 and calling data stored in the memory 20, such as implementing the method described in any embodiment of the present application.
[0068] The processor 10 may be a field programmable gate array (FPGA), a digital signal processor (DSP), a central processing unit (CPU), or the like.
[0069] The processor 10 may be a single-core processor or a multi-core processor. For example, the processor 10 may be composed of multiple FPGAs or multiple DSPs. In addition, the processor 10 may refer to one or more devices, circuits and / or processing cores for processing data (e.g., computer program instructions). The processor 10 may be a separate semiconductor chip or may be integrated into a semiconductor chip together with other circuits. For example, the processor 10 may form a system-on-a-chip (SoC) with other circuits (e.g., codec circuits, hardware acceleration circuits, or various buses and interface circuits), or may be integrated into an application specific integrated circuit (ASIC) as a built-in processor of the ASIC. The ASIC with the integrated processor may be packaged separately or packaged together with other circuits.
[0070] The processor 10 may be Figure 1a The processor or processors in the motherboard 110 shown in FIG. 1 may also refer to Figure 1a The processor set in the motherboard 110 and the hard disk 120 shown in FIG. 1 , or one or more processors in the set. The memory 20 may be Figure 1a The memory or multiple memories in the mainboard 110 shown in the figure may also be a memory set of the mainboard 110 and the hard disk 120, or one or more memories in the set.
[0071] Those skilled in the art will appreciate that the above is merely an example of the hardware structure of an electronic device. In actual applications, more components may be provided according to actual functional requirements. Of course, one or more components may be omitted according to functional requirements.
[0072] The following describes a hard disk security management method according to an embodiment of the present application. The method can be executed by the electronic device 100. Figure 2 , the method comprising:
[0073] 101: In response to the mainboard being powered on, obtaining a first password stored in a first area of the electronic device.
[0074] 102: When the self-unlocking function is activated, read the second password stored in the hard disk.
[0075] 103: When the first password and the second password match, unlock the hard disk.
[0076] The first area may be a storage area other than a hard disk in the electronic device. For example, the first area may be located in a storage area of a motherboard. Exemplarily, the first area is a variable of a firmware program (BIOS firmware, UEFI firmware, etc., and the following embodiments take UEFI firmware as an example) in the motherboard.
[0077] The self-unlocking function refers to the function of automatically unlocking the hard disk password inside the electronic device. Among them, the automatic unlocking of the hard disk password inside the electronic device means that the electronic device automatically reads the first password in the first area and the second password in the hard disk, and matches the first password and the second password to unlock the hard disk without the user manually entering a custom password.
[0078] The user can choose whether to use the self-unlocking function. The user can choose to unlock the hard disk through the self-unlocking function or choose a custom password method to unlock the hard disk.
[0079] Specifically, in some embodiments, whether to select the self-unlocking function can be selected in a menu of the basic firmware program, such as through a UEFI menu selection.
[0080] After the mainboard is powered on, the electronic device obtains the first password in the first area, and if the self-unlocking function is turned on, reads the second password stored in the hard disk.
[0081] The first password and the second password may be in the same or different forms. The first password uniquely corresponds to the time when the password is generated. The second password has a corresponding relationship with the first password and can match each other.
[0082] On the one hand, the first password is placed in other storage areas of the electronic device except the hard disk, and on the other hand, the second password is placed in the hard disk. When unlocking the hard disk, the first password in the first area is matched with the second password in the hard disk. If the first password in the first area matches the second password stored in the hard disk, the hard disk is unlocked successfully. If the first password in the first area does not match the second password stored in the hard disk, the hard disk unlocking fails and the hard disk remains locked.
[0083] Since the first password uniquely corresponds to the time when the password was generated, and due to the unidirectional fluidity of time, the time when the password was generated is highly likely to be unique, the first password is unique. If the hard disk is used for other devices, other electronic devices will not be able to access the hard disk because the second password stored in the hard disk does not match the first password stored in other electronic devices. In this way, the binding of the hard disk and the electronic device is achieved. When the password is stored on the motherboard, the binding of the motherboard and the hard disk is also achieved. After the hard disk is stolen, it cannot be used in other electronic devices, which improves the security of data storage.
[0084] Moreover, the hard disk security management method automatically matches the password in the first area and the hard disk by the device to complete the security verification without user participation. The user is unaware of the entire security verification process, and the user experience is good. Moreover, since the password is stored in the first area and the hard disk of the electronic device, it is invisible to the user. Compared with the user-defined password, the probability of loss is low and the security is higher.
[0085] In some of the embodiments, the first area may be a permission-restricted area.
[0086] The permission restricted area means that the first area has an identity identifier. When a user needs to access the first area, the identity identifier must be used for identity authentication. Only after the identity authentication is passed can the first area be accessed. If the identity authentication fails, the first area cannot be accessed, and the first password cannot be obtained. Compared with the method of using MAC physical address, CPU serial number, motherboard serial number, etc. as the self-unlocking password, since MAC physical address, CPU serial number, motherboard serial number, etc. are easier to obtain, the method of this application has better security.
[0087] In some embodiments, the first area can be a variable area in the basic firmware program, such as a UEFI variable in a UEFI firmware. Since the UEFI variable has an identity identifier, accessing the UEFI variable to modify or view the first password requires identity authentication based on the identity identifier, and the first password has a higher security.
[0088] The first password uniquely corresponds to the time when the password is generated. Specifically, the first password can be generated based on the current time. In some embodiments, the first password can include a UUID. The UUID is generated based on a timestamp using a specific algorithm, which can ensure the uniqueness of the first password.
[0089] As a specific implementation method, steps 101 to 103 can be executed by the mainboard, the mainboard reads the first password in the first area and the second password in the hard disk, and the mainboard unlocks the hard disk, including the mainboard sending the first password read from the first area to the hard disk, and the hard disk matches the received first password with the second password stored in the hard disk. If the match is successful, the hard disk is set to be accessible and the hard disk is unlocked. If the match is unsuccessful, the hard disk is still locked and access to the hard disk is not allowed.
[0090] In some embodiments, after the mainboard reads the first password in the first area, it first performs a hash operation to obtain a first hash value, and then sends an unlock instruction to the hard disk, and the unlock instruction carries the first hash value. After the hard disk receives the unlock instruction, it parses the unlock instruction to obtain the first hash value. The hard disk obtains the second password stored in the hard disk, and performs a hash operation to obtain a second hash value. The hard disk matches the first hash value and the second hash value. If the match is successful, it is unlocked, and if the match fails, it is not unlocked.
[0091] Security can be further improved by hashing the password, and the unlocking operation performed by the hard disk is less likely to be tampered with and more secure than the unlocking operation performed by the motherboard through a software program.
[0092] As those skilled in the art can understand, if the basic firmware program (BIOS, UEFI, etc.) cannot directly access the hard disk, the corresponding hard disk driver program can be loaded and the hard disk can be accessed by calling the hard disk driver program, for example, unlocking the hard disk, setting a password for the hard disk, deleting the hard disk password, etc.
[0093] In some embodiments, the first password and the second password can be stored in the first area and the hard disk respectively by an administrator with management authority. In other embodiments, in order to improve security, the electronic device can store the passwords in the first area and the hard disk by itself.
[0094] In some embodiments, the specific implementation process of the above step 101 is:
[0095] Read the first password in the first area;
[0096] Alternatively, if the first password in the first area cannot be read, a first password uniquely corresponding to the current time is generated based on a preset rule.
[0097] The preset rule may be any rule that can make the generated first password uniquely correspond to the current time. When the first password includes a UUID, the preset rule is consistent with the rule for generating the UUID.
[0098] As a specific implementation, if the mainboard detects that the first password does not exist in the first area, the first password is generated based on the current time and the first password is stored in the first area. In some embodiments, after the mainboard is powered on, it is determined whether the first password exists in the first area. If the first password does not exist, the first password is generated and stored in the first area. If the first password exists, the first password is read from the first area and subsequent procedures are executed.
[0099] Figure 3 A more specific embodiment of a hard disk security management method is shown, and the hard disk security management method includes:
[0100] 101a: In response to the mainboard being powered on, if the first password in the first area cannot be read, a first password uniquely corresponding to the current time is generated based on a preset rule.
[0101] 101b: Store the first password in the first area.
[0102] 102: When the self-unlocking function is activated, read the second password stored in the hard disk.
[0103] 103: When the first password and the second password match, unlock the hard disk.
[0104] Figure 4 Another specific embodiment of the hard disk security management method is shown in FIG. Figure 4 , hard disk security management methods include:
[0105] 101a: In response to the mainboard being powered on, if the first password in the first area cannot be read, a first password uniquely corresponding to the current time is generated based on a preset rule.
[0106] 101b: Store the first password in the first area.
[0107] 102a: Determine whether the hard disk stores the second password. If the hard disk does not store the second password, determine the second password corresponding to the first password, and store the determined second password in the hard disk.
[0108] 102: When the self-unlocking function is activated, read the second password stored in the hard disk.
[0109] 103: When the first password and the second password match, unlock the hard disk.
[0110] As a specific implementation, when the mainboard determines that the hard disk does not store the second password, it determines the second password based on the first password, and sets a password for the hard disk based on the determined second password.
[0111] A specific method may be that the mainboard sends a self-unlocking password setting instruction to the hard disk, and carries the second password in the instruction. After the hard disk receives the self-unlocking password setting instruction, it parses the instruction to obtain the second password, and stores the second password in an area of the hard disk.
[0112] In some embodiments, whether to store the second password, that is, whether the self-unlocking password function is enabled, can be indicated by an identifier, with one identifier indicating that the self-unlocking password function is enabled, and another identifier indicating that the self-unlocking password function is disabled. For example, "1" indicates that the self-unlocking password function is enabled, and "0" indicates that the self-unlocking password function is disabled.
[0113] In some embodiments, after the user chooses not to use the self-unlocking function to unlock the hard disk, the second password in the hard disk is deleted to release the binding between the hard disk and the electronic device. This allows the hard disk to be used normally when it is legally transferred to other electronic devices. This ensures the security of the hard disk and improves its versatility.
[0114] After the hard disk stores the second password in the hard disk, it is modified to the self-unlocking password function enabling identifier, and after the second password in the hard disk is deleted, it is modified to the self-unlocking password function disabling identifier. Through this identifier, it can be determined whether the hard disk stores the second password.
[0115] In other embodiments, the hard disk can be configured to first match the first password in the first area with the second password in the hard disk. When the two match, the second password in the hard disk can be deleted, thereby enhancing the security of the hard disk.
[0116] In this embodiment, the hard disk security management method further includes:
[0117] When the self-unlocking function is not activated and the second password is stored in the hard disk, if the first password in the first area matches the second password, the second password in the hard disk is deleted.
[0118] Specifically, the attribute value of the menu can be obtained to determine whether the hard disk self-unlocking function is turned on. As a specific implementation method, the mainboard can confirm whether the hard disk self-unlocking function is turned on. When it is confirmed that the hard disk self-unlocking function is not turned on, a self-unlocking password cancellation instruction is sent to the hard disk, and the cancellation instruction carries the first password. After the hard disk receives the cancellation instruction, it parses the cancellation instruction and obtains the first password. The hard disk obtains the second password stored in the hard disk and matches the two passwords. If the match is successful, the second password in the hard disk is deleted. If the match fails, the second password in the hard disk is not deleted.
[0119] In other embodiments, the hard disk may also modify the self-unlocking password function enable state of the hard disk, changing it to the self-unlocking password function being disabled.
[0120] When the user does not select the self-unlocking password function, the electronic device can perform security verification on the hard disk by using a custom password. In this embodiment, the method further includes:
[0121] When the self-unlocking function is not activated and the hard disk does not store the second password, an input interface is displayed, and the input interface is used to enter a custom password;
[0122] In response to a user's custom password input operation, an unlocking operation on the hard disk is determined.
[0123] or,
[0124] When the self-unlocking function is not activated and the second password is stored in the hard disk, if the first password in the first area matches the second password, the second password in the hard disk is deleted.
[0125] Display the input interface, which is used to enter a custom password;
[0126] In response to a user's custom password input operation, an unlocking operation on the hard disk is determined.
[0127] The electronic device will display an input interface for entering a custom password. After the user enters the custom password in the input interface, the electronic device can obtain the custom password and unlock based on the custom password. If the custom password entered by the user matches the custom password stored in the hard disk, the hard disk will be unlocked. If the custom password entered by the user does not match the custom password stored in the hard disk, the hard disk will not be unlocked.
[0128] As a specific implementation, the motherboard sends the custom password input by the user to the hard disk, and the hard disk matches the custom password with the custom password stored in the hard disk. If the match is successful, the hard disk is unlocked, and if the match is unsuccessful, the hard disk is not unlocked.
[0129] The following is a more specific example to illustrate the hard disk security management method. Figure 5 , the method comprising:
[0130] 201: The main board is powered on.
[0131] 202: Determine whether a first password is stored in the first area of the electronic device, if not, execute step 203, if yes, execute step 204.
[0132] 203: Generate a first password based on the current time, and store the first password in the first area.
[0133] 204: Bind the driver to the hard disk.
[0134] 205 : Determine whether the electronic device has enabled the hard disk self-unlocking function. If the hard disk self-unlocking function is enabled, execute step 206 ; if the hard disk self-unlocking function is not enabled, execute step 211 .
[0135] 206: Determine whether the second password exists in the hard disk. If the second password does not exist in the hard disk, execute step 207; if the second password exists in the hard disk, execute step 208.
[0136] 207: Store the second password in the hard disk, that is, set the second password for the hard disk, and then execute step 208.
[0137] 208: Determine whether the first password in the first area matches the second password in the hard disk. If they match, execute step 209; if they do not match, execute step 210.
[0138] 209: Hard disk unlocked.
[0139] 210: Failed to unlock the hard disk.
[0140] 211: If the second password exists in the hard disk, the second password in the hard disk is deleted.
[0141] 212: Unlock the hard disk by entering a custom password.
[0142] Those skilled in the art can understand that there may be one or more hard disks in an electronic device. For each hard disk, steps 204-211 may be executed cyclically. If each hard disk is unlocked, the electronic device may enter the operating system normally. If a hard disk fails to be unlocked, the electronic device may not be able to enter the operating system normally.
[0143] Several application scenarios of the above embodiment are exemplarily described below. In the first scenario, when the electronic device is started for the first time, or when the self-unlocking password function of the electronic device is changed from off to on, the electronic device will execute steps 201, 203, 204, 205, 206, 207, 208, and 209. The hard disk can be unlocked, and the electronic device can enter the operating system normally.
[0144] In the second scenario, after the first scenario occurs, when the electronic device is started (assuming that the self-unlocking password function has not been modified), the electronic device will execute steps 201, 202, 204, 205, 206, 208, and 209. The hard disk can be unlocked and the electronic device can enter the operating system normally.
[0145] The third scenario is that after the first scenario occurs, if the hard disk is used in other electronic devices, assuming that the other electronic devices also select the self-unlocking password function, the electronic device will perform steps 201, 202, 204, 205, 206, 208, and 210. Since the second password in the hard disk does not match the first password in the first area of the other device, the hard disk will not be unlocked, and the electronic device cannot enter the operating system normally.
[0146] The third scenario is that after the first scenario occurs, if the electronic device changes from the self-unlocking password function to the custom password function, after the electronic device is restarted, the electronic device will execute steps 201, 202, 204, 205, 211, and 212.
[0147] It should be noted that the above serial numbers 202-212 do not represent the execution order of the above method, but are only used to identify each step. For example, the order of step 211 and step 212 can be swapped.
[0148] Those skilled in the art will appreciate that the above are merely examples of concentrated application scenarios of electronic devices and should not be construed as all application scenarios of electronic devices.
[0149] An embodiment of the present application further provides a storage medium storing computer executable instructions, which are executed by one or more processors, so that the one or more processors can execute a method in any of the above method embodiments.
[0150] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a machine, the machine executes the method of any of the above embodiments.
[0151] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A hard disk security management method, characterized in that: For an electronic device, the electronic device includes a hard disk, the method includes: In response to the mainboard being powered on, obtaining a first password stored in the first area of the electronic device; When the self-unlocking function is activated, the second password stored in the hard disk is read; the self-unlocking function is used to unlock the password of the hard disk inside the electronic device; If the first password and the second password match, unlocking the hard disk to facilitate access to the hard disk; The first password uniquely corresponds to the time when the password is generated, the second password has a corresponding relationship with the first password, and the first area is a storage area in the electronic device other than the hard disk.
2. The method according to claim 1, characterized in that The obtaining of a first password stored in a first area of the electronic device includes: Reading the first password in the first area; or, If the first password in the first area cannot be read, the first password uniquely corresponding to the current time is generated based on a preset rule.
3. The method according to claim 2, characterized in that After generating the first password uniquely corresponding to the current time, the method further includes: The first password is stored in the first area.
4. The method according to any one of claims 1 to 3, characterized in that Before reading the second password stored in the hard disk, the method further includes: determining whether the second password is stored in the hard disk; If the second password is not stored in the hard disk, the second password corresponding to the first password is determined, and the determined second password is stored in the hard disk.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the self-unlocking function is not started and the second password is not stored in the hard disk, an input interface is displayed, wherein the input interface is used to input a custom password; In response to a user's custom password input operation, an unlocking operation on the hard disk is determined.
6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the self-unlocking function is not activated and the second password is stored in the hard disk, if the first password in the first area matches the second password, deleting the second password in the hard disk; Display an input interface, wherein the input interface is used to input a custom password; In response to a user's custom password input operation, an unlocking operation on the hard disk is determined.
7. The method according to any one of claims 1 to 3, characterized in that: The first area is a permission restricted area.
8. A hard disk security management device, characterized in that: Used in an electronic device, the electronic device includes a hard disk, and the device includes: A first password acquisition module, configured to acquire a first password stored in the first area of the electronic device in response to the completion of powering on the mainboard; A second password acquisition module, used to read the second password stored in the hard disk when the self-unlocking function is activated; the self-unlocking function is used to unlock the password of the hard disk inside the electronic device; an unlocking module, configured to unlock the hard disk when the first password and the second password match, so as to facilitate access to the hard disk; The first password uniquely corresponds to the time when the password is generated, the second password has a corresponding relationship with the first password, and the first area is a storage area in the electronic device other than the hard disk.
9. An electronic device, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer program instructions, which, when called by the processor, enable the processor to execute the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a processor to execute the method according to any one of claims 1 to 7.