Hard disk control method, hard disk, storage system and related computer apparatus
By creating virtual units on the hard drive and associating them with storage units, parsing configuration information and executing control requests, the problem of cumbersome hard drive operations is solved, achieving convenient and efficient data storage management.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2026-03-05
AI Technical Summary
When using portable solid-state drives (SSDs) and other technologies, reading, deleting, or writing data requires specifying the storage address, which makes the operation cumbersome and affects the ease of use of the hard drive.
By creating virtual units on the hard drive and associating them with storage units, the configuration information of the virtual units is parsed to locate the target address, and control requests are executed based on the access mode and encryption status, including authentication and data encryption processing.
It optimizes the ease of use and response efficiency of hard drive operation, while taking into account data security and flexibility, thus improving the ease of use and response efficiency of hard drive.
Smart Images

Figure CN2025087113_05032026_PF_FP_ABST
Abstract
Description
Hard disk control methods, hard disks, storage systems and related computer devices
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202411204360.3, filed on August 30, 2024, entitled "Hard Disk Control Method, Hard Disk, Storage System and Related Computer Device", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of storage technology, and in particular to a hard disk control method, hard disk, storage system, computer program product, computer device, and computer-readable storage medium. Background Technology
[0004] When using portable solid-state drives (SSDs) with technologies such as SSDs (Solid State Disks), reading, deleting, and writing data to the SSD usually requires knowing the data storage address or write address in order to locate the corresponding address and fulfill the corresponding hard drive operation requirements. This operation is relatively cumbersome and requires knowing the storage address, which affects the convenience of using the hard drive. Summary of the Invention
[0005] This application provides a hard disk control method, a hard disk, a storage system, a computer program product, a computer device, and a computer-readable storage medium.
[0006] On one hand, a hard disk control method is provided, wherein the hard disk includes a control driver module and multiple storage units; wherein the hard disk drive of the control driver module can create at least one virtual unit, and each virtual unit is connected to the hard disk drive and associated with multiple storage units; the hard disk control method includes: responding to a virtual unit obtaining a control request, taking the virtual unit that obtains the control request as the current virtual unit; parsing the storage units associated with the current virtual unit, taking the storage units associated with the current virtual unit as the target address; and driving the target address to execute the control request.
[0007] In some embodiments of this application, parsing the storage unit associated with the current virtual unit includes: obtaining the configuration information of the current virtual unit; and identifying the unit information associated with the current virtual unit within the configuration information of the current virtual unit; wherein the unit information associated with the current virtual unit belongs to the storage unit associated with the current virtual unit.
[0008] In some embodiments of this application, creating at least one virtual unit includes: obtaining unit information of multiple storage units in the hard disk; creating a virtual unit for each storage unit, and configuring the created virtual unit using the unit information of the multiple storage units.
[0009] In some embodiments of this application, the unit information of multiple storage units further includes a unit identifier and an access mode, where the access mode includes a pass-through mode and a media mode. Configuring the created virtual unit using the unit information of multiple storage units includes: writing the unit identifier of the corresponding storage unit into the configuration information of the created virtual unit; and writing the access mode of the corresponding storage unit into the configuration information of the created virtual unit, so as to determine whether to authenticate the requester based on the space state of the storage unit created based on the access mode identifier of the corresponding storage unit, in response to determining the virtual unit to obtain a control request, based on the access mode of the corresponding storage unit.
[0010] In some embodiments of this application, before driving the target address to execute a control request in response to the target address's spatial state being encrypted, the process includes: identifying the request type of the control request; determining to authenticate the requester in response to the control request's request type being a hard disk access request; and determining to allow the execution of the hard disk write request in response to the control request's request type being a hard disk write request.
[0011] In some embodiments of this application, before driving the target address to execute a control request in response to the target address's spatial state being encrypted, the process includes: obtaining encrypted data of the target address in the encryption configuration table; obtaining verification parameters from the requester; parsing whether the verification parameters match the encrypted data; and determining that the requester has been authenticated and allowing the execution of the control request in response to the verification parameters matching the encrypted data.
[0012] In some embodiments of this application, the encrypted data includes an encrypted medium encrypted with a root key; parsing whether the verification parameters match the encrypted data includes: obtaining the root key of the hard disk; decrypting the encrypted data using the root key to obtain the encrypted medium; and comparing the encrypted medium with the verification parameters.
[0013] In some embodiments of this application, in response to the encryption medium including an encryption key and the encrypted data including a random key encrypted with a root key, executing a control request includes: in response to the control request being a hard disk access request, decrypting the encrypted data using the root key to obtain a random key; fusing the random key and the encryption key to obtain a fused key; and decrypting the data stored at the target address using the fused key.
[0014] In some embodiments of this application, the hard disk control method includes: presetting the storage space of the hard disk as multiple storage units; in response to obtaining a management command, configuring a target storage unit based on the management command; wherein the management command is used to configure at least one of the access mode of the storage unit and an encryption medium; and configuring a virtual unit associated with the target storage unit.
[0015] In some embodiments of this application, configuring a target storage unit based on a management instruction includes: identifying and recording an encrypted medium carried by the management instruction; wherein the encrypted medium includes at least one of an access password and an encryption key; in response to the encrypted medium carried by the management instruction including an access password, determining that the access mode of the target storage unit is a first medium mode; in response to the encrypted medium carried by the management instruction including an access password and an encryption key, determining that the access mode of the target storage unit is a second medium mode; and in response to the encrypted medium carried by the management instruction including an encryption key, determining that the access mode of the target storage unit is a third medium mode.
[0016] In some embodiments of this application, after determining that the access mode of the target storage unit is the second media mode, or after determining that the access mode of the target storage unit is the third media mode, the method further includes: obtaining a root key and encrypting the encryption medium using the root key; controlling the generation of a random key and encrypting the random key using the root key; and recording the encrypted encryption medium and the random key; wherein the random key is used to encrypt data after being fused with the encryption key.
[0017] In some embodiments of this application, the encrypted medium carried by the recording management instruction includes: calling an encrypted configuration table stored on the hard disk; wherein the header of the encrypted configuration table includes the cell number category, storage address range category, access mode category, access password category, encryption key category, and random key category of the storage unit; and writing the encrypted medium into the body of the corresponding header in the encrypted configuration table based on the category of the encrypted medium and the target storage unit.
[0018] In some embodiments of this application, driving the target address to execute the control request includes: in response to the control request being a hard disk write request, obtaining the write data carried by the hard disk write request; and writing the write data to the target address.
[0019] In some embodiments of this application, writing data to a target address includes: querying the access mode of the target address; in response to the target address's access mode being a media mode and the encryption medium including an encryption key, obtaining the encryption key of the target address stored on the hard disk; and encrypting the data to be written using the obtained encryption key, and writing the encrypted data to the target address.
[0020] In some embodiments of this application, encrypting the written data using the acquired encryption key includes: acquiring a random key stored at the target address on the hard disk; fusing the random key and the encryption key to obtain a fused key; and encrypting the written data using the fused key.
[0021] On the other hand, a hard disk is provided, comprising: multiple storage units and a control driver module; the control driver module is connected to the multiple storage units; the control driver module includes a hard disk drive, which can create at least one or more virtual units, each virtual unit being connected to the hard disk drive and associated with multiple storage units; the control driver module is used to implement the following steps: in response to a virtual unit obtaining a control request, the virtual unit obtaining the control request is taken as the current virtual unit; the storage unit associated with the current virtual unit is parsed and taken as the target address; the target address is driven to execute the control request.
[0022] On the other hand, a storage system is provided, which includes an interactive device and a hard disk as described above; the interactive device includes an interactive module and an interactive channel, the interactive module includes multiple sub-interactive units, each of which is connected to an interactive channel; the virtual units of the hard disk are each connected to an interactive channel.
[0023] In another aspect, a computer program product is provided, including computer-readable instructions that, when executed by one or more processors, perform the following steps: in response to a virtual unit acquiring a control request, designating the virtual unit acquiring the control request as the current virtual unit; resolving the memory unit associated with the current virtual unit as the target address; and driving the target address to execute the control request.
[0024] In another aspect, a computer device is provided, including one or more processors; and a memory associated with the one or more processors, the memory for storing computer-readable instructions, which, when read and executed by the one or more processors, perform the following steps: in response to a virtual unit acquiring a control request, designating the virtual unit acquiring the control request as the current virtual unit; resolving the memory unit associated with the current virtual unit as the target address; and driving the target address to execute the control request.
[0025] In another aspect, a computer-readable storage medium is provided that stores computer-readable instructions thereon, which, when executed by one or more processors, perform the following steps: in response to a virtual unit acquiring a control request, designating the virtual unit acquiring the control request as the current virtual unit; resolving the storage unit associated with the current virtual unit and using it as the target address; and driving the target address to execute the control request. Attached Figure Description
[0026] Figure 1 is a schematic diagram of the hard disk structure according to an embodiment of this application;
[0027] Figure 2 is another structural schematic diagram of the hard disk according to an embodiment of this application;
[0028] Figure 3 is another structural schematic diagram of the hard disk according to an embodiment of this application;
[0029] Figure 4 is a schematic diagram of the structure of the storage system according to an embodiment of this application;
[0030] Figure 5 is another structural schematic diagram of the storage system according to an embodiment of this application;
[0031] Figure 6 is a flowchart illustrating the hard disk control method according to an embodiment of this application;
[0032] Figure 7 is another schematic flowchart of the hard disk control method according to an embodiment of this application;
[0033] Figure 8 is a flowchart illustrating the execution of a new instruction according to an embodiment of this application;
[0034] Figure 9 is a flowchart illustrating the execution of update instructions according to an embodiment of this application;
[0035] Figure 10 is a flowchart illustrating the execution of obsolete instructions according to an embodiment of this application;
[0036] Figure 11 is a flowchart illustrating the execution of a hard disk access request according to an embodiment of this application;
[0037] Figure 12 is a schematic flowchart of the execution of a hard disk write request according to an embodiment of this application;
[0038] Figure 13 is a schematic diagram of the structure of a computer device according to an embodiment of this application;
[0039] Figure 14 is a schematic diagram of the structure of a computer program product according to an embodiment of this application;
[0040] Figure 15 is a schematic diagram of the structure of a non-volatile computer-readable storage medium according to an embodiment of this application. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0042] To address the technical problem of cumbersome hard disk operations affecting efficiency in related technologies, this application provides a hard disk control method, a hard disk, a storage system, a computer program product, a computer device, and a computer-readable storage medium. The hard disk includes a control drive module and multiple storage units; wherein, the hard disk drive of the control drive module can create multiple virtual units, each virtual unit being connected to the hard disk drive and associated with a storage unit; the hard disk control method includes: responding to a virtual unit acquiring a control request, designating the virtual unit acquiring the control request as the current virtual unit; resolving the storage unit associated with the current virtual unit and using it as the target address; and driving the target address to execute the control request. The architecture and detailed working principle of this application are illustrated below with examples.
[0043] Please refer to Figure 1, which is a schematic diagram of the hard disk structure according to an embodiment of this application. In some embodiments, the hard disk may include multiple storage units 111 and a control drive module 20. The control drive module 20 is connected to the storage units 111. The control drive module 20 includes a hard disk drive 21, which can create multiple virtual units 31, each of which is connected to the hard disk drive 21 and associated with the storage units 111.
[0044] In some embodiments, the mapping relationship between virtual unit 31 and storage unit 111 can be one-to-one, one-to-many, many-to-one, etc., and is not limited here. It is not recommended to configure the mapping relationship between virtual unit 31 and storage unit 111 as many-to-many, but it can be set in this way to meet your own needs, that is, the mapping relationship between virtual unit 31 and storage unit 111 is set as many-to-many, and is not strictly limited here.
[0045] The control drive module 20 can respond to the virtual unit 31 acquiring a control request, and take the virtual unit 31 that acquires the control request as the current virtual unit 31; parse the storage unit 111 associated with the current virtual unit 31 and take it as the target address; drive the target address to execute the control request.
[0046] Therefore, in this embodiment, the hard disk control drive module 20 can create multiple virtual units 31, which are connected to the hard disk drive 21 and associated with the storage unit 111. Based on the above configuration, this application can receive control requests for the hard disk through the virtual unit 31, and locate the associated storage unit 111 based on the current virtual unit 31 receiving the control request, and execute the corresponding control request. In other words, when controlling the hard disk, it is possible to obtain the storage address or intended storage address of the data, and address location can be performed relatively simply and clearly through the virtual unit 31, thereby optimizing the hard disk's working principle and improving its ease of use and response efficiency.
[0047] Please refer to Figure 2, which is a schematic diagram of the hard disk structure according to an embodiment of this application. In some embodiments, the hard disk includes a first storage module 11, an encryption module 40, and a control drive module 20. The first storage module 11 includes a plurality of storage units 111. In layman's terms, the storage unit 111 can be considered equivalent to a sub-hard disk, etc. The first storage module 11 is compatible with both storage units 111 in an encrypted state and storage units 111 in an unencrypted state.
[0048] In some embodiments, at least one storage unit 111 may be pre-specified as encrypted and at least one storage unit 111 may be pre-specified as unencrypted during the hard disk generation process. Based on the above settings, the configuration of encrypted and unencrypted storage units 111 is pre-implemented. And / or, at least one storage unit 111 may be reserved without pre-configured space, allowing users to configure the space of this reserved storage unit 111 according to their own data storage security needs. Other storage units 111 within the hard disk may be pre-configured as encrypted or unencrypted.
[0049] For example, all storage units 111 within the first storage module 11 are pre-configured. The spatial state of some storage units 111 can be set to an encrypted state, meaning the access mode requires decryption using an encryption medium. The spatial state of other storage units 111 can be set to an unencrypted state, meaning the access mode is a pass-through mode that does not require decryption using an encryption medium, allowing unauthenticated direct access to the data stored in the storage unit 111.
[0050] In some embodiments, some storage units 111 within the first storage module 11 are pre-configured, and some storage units 111 are reserved for self-configuration. That is, the space state of some storage units 111 can be pre-configured to an encrypted state, or the space state of some storage units 111 can be pre-configured to an unencrypted state, or the space state of some storage units 111 can be pre-configured to an encrypted state and the space state of some storage units 111 can be pre-configured to an unencrypted state; the other reserved storage units 111 do not have their space state pre-configured and can be freely selected to be configured to an encrypted state or an unencrypted state.
[0051] In some embodiments, the storage units 111 within the first storage module 11 may not have their space states preset. The working principle of configuring storage units 111 without preset space states will be illustrated with examples later, and will not be repeated here.
[0052] The encryption module 40 is used to encrypt at least one storage unit 111. The control driver module 20 is connected to the first storage module 11 and the encryption module 40. The control driver module 20 is capable of acquiring hard disk access requests; identifying the spatial state of the target address of the hard disk access request; wherein the spatial state includes an encrypted state and an unencrypted state; the hard disk includes multiple storage units 111, wherein the spatial states of two storage units 111 may be different; in response to the storage unit 111 to which the target address belongs being in an encrypted state, the requester of the hard disk access request is authenticated, so that the hard disk access request is allowed to be responded to when the requester is authenticated.
[0053] Therefore, this embodiment can divide the hard disk into multiple storage units 111. Furthermore, the space state of at least one storage unit 111 is pre-set to an encrypted state, and the space state of at least one storage unit 111 is pre-set to an unencrypted state; and / or, the space state of at least one storage unit 111 is configurable. According to the above settings, the hard disk can simultaneously store encrypted storage units 111 and unencrypted storage units 111, making it compatible with both encrypted and unencrypted storage units 111 to adapt to data storage with different encryption requirements. Upon receiving a hard disk access request, the system can verify whether data access is allowed based on the space state of the target address and the identity of the requester, thus ensuring data security while maintaining data storage flexibility.
[0054] Please refer to Figure 3, which is a schematic diagram of the hard disk structure according to an embodiment of this application. In some embodiments, the encryption module 40 may include a random key unit 41, a key protection unit 42, and an encryption unit 43. The random key unit 41 is used to generate a random key. The key protection unit 42 is used to store a root key. The key protection unit 42 hides the access channel from the outside of the hard disk. The encryption unit 43 is used to encrypt at least one of the random key, the encryption key, and the access password based on the root key.
[0055] In some embodiments, the storage module may further include a second storage module 12. The second storage module 12 is not visible from the outside of the hard disk and is used to store the encrypted configuration table. This prevents external access to the encrypted configuration table, which improves the storage security of the encrypted configuration table, reduces the risk of the encrypted configuration table being obtained and affecting the security of the storage unit 111 in the encrypted state of the hard disk, and further enhances the security of the hard disk.
[0056] Furthermore, the control drive module 20 may also include a control unit 22. The hard disk drive 21 can be used to create virtual units 31 (as shown in Figure 1) and store the mapping relationship between virtual units 31 and storage units 111. According to the above configuration, the control unit 22 can operate without needing to be aware of the virtual units 31 or store the relationship between them. With this configuration, adding a new module (i.e., virtual unit 31) to the hard disk will not significantly increase the workload of the control unit 22, thus ensuring its performance. As the name suggests, the control unit 22 can be considered equivalent to the hard disk's main control chip; the hard disk drive is used to drive the storage units 111 to execute control requests, etc.
[0057] Please refer to Figure 4, which is a schematic diagram of the structure of the storage system according to an embodiment of this application. In some embodiments, the storage system includes an interactive device and a hard disk as described above; the interactive device includes an interactive module 51 and an interactive channel 52, the interactive module 51 includes a plurality of sub-interactive units, each of which is connected to an interactive channel 52; the virtual units 31 of the hard disk are connected to an interactive channel 52.
[0058] In some embodiments, the mapping relationship between the interaction module 51 and the virtual unit 31 can be one-to-one, one-to-many, many-to-one, etc., and is not limited here. It is not recommended to configure the mapping relationship between the interaction module 51 and the virtual unit 31 as many-to-many, but it can be set in this way to meet your own needs, that is, the mapping relationship between the interaction module 51 and the virtual unit 31 is set as many-to-many, and is not strictly limited here.
[0059] Please refer to Figure 5, which is another structural schematic diagram of the storage system according to an embodiment of this application. In some embodiments, the virtual unit 31 of the hard disk, the storage unit 111, and the interaction module 51 of the interaction device can have a one-to-one mapping relationship. This simplifies the efficiency of identifying the target storage unit 111 when obtaining management commands / control requests, which is beneficial to further improving the response efficiency of the hard disk and thus improving hard disk performance. It simplifies the process of users identifying the storage unit 111, and the interaction module 51 can adapt to the naming of the storage unit 111 or be defined by the user when naming it.
[0060] For limitations on the control driver module, please refer to the limitations on hard disk control methods below, which will not be repeated here. Each module in the above control driver module can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0061] Please refer to Figure 6, which is a flowchart illustrating the hard disk control method according to an embodiment of this application.
[0062] S101: Obtain hard disk access request.
[0063] In this embodiment, as the name suggests, the hard disk access request requests access to the data stored on the hard disk, which can be considered as a request to read the data stored on the hard disk.
[0064] S102: Identify the spatial state of the target address of the hard disk access request; wherein the spatial state includes an encrypted state and an unencrypted state, and the hard disk includes multiple storage units; the spatial state of at least one storage unit is pre-set to an encrypted state, and the spatial state of at least one storage unit is pre-set to an unencrypted state; and / or, the spatial state of at least one storage unit is configurable.
[0065] In this embodiment, as described above, the hard disk is compatible with both storage units in an encrypted state and storage units in an unencrypted state. When a hard disk access request is received, it can be identified whether the storage unit targeted by the hard disk access request is in an encrypted state.
[0066] Incidentally, in this embodiment, there are two naming methods for the target storage unit. In response to the determination of obtaining control requests such as hard disk access requests and hard disk write requests, the target storage unit is called the target address. In response to the determination of obtaining management instructions such as new instructions and update instructions for configuring access mode / space status, the target storage unit is called the target storage unit, so as to distinguish the naming under different functions.
[0067] In this embodiment, the space state of the storage unit can be formed in the following ways: At least one storage unit can be pre-specified as encrypted and at least one storage unit can be pre-specified as unencrypted during the hard disk generation process, thus pre-configuring the encrypted and unencrypted storage units. Alternatively, at least one storage unit can be reserved without pre-configured space state, allowing users to configure the space state of this reserved storage unit according to their own data storage security needs. Other storage units within the hard disk can be pre-configured as encrypted or unencrypted.
[0068] For example, the storage units within the first storage module are pre-configured. Some storage units can be set to an encrypted state, meaning the access mode requires decryption using an encrypted medium. Other storage units can be set to an unencrypted state, meaning the access mode is a pass-through mode that does not require decryption using an encrypted medium, allowing unauthenticated direct access to the data stored within the storage unit.
[0069] In some embodiments, some storage units within the first storage module are pre-configured, and some storage units are reserved for user configuration. That is, the space state of some storage units can be pre-configured to an encrypted state, or the space state of some storage units can be pre-configured to an unencrypted state, or the space state of some storage units can be pre-configured to an encrypted state and the space state of some storage units can be pre-configured to an unencrypted state. Other reserved storage units do not have their space state pre-configured and can be freely selected to be either encrypted or unencrypted. In some embodiments, all storage units within the first storage module may not have their space state pre-configured.
[0070] S103: In response to the fact that the storage unit to which the target address belongs is in an encrypted state, authenticate the requester of the hard disk access request so that the hard disk access request can be responded to when the requester is successfully authenticated.
[0071] In this embodiment, in response to the storage unit to which the target address belongs being in an encrypted state, the data at the target address is considered to have a certain degree of confidentiality. It is necessary to verify the identity of the requester who requests access to the target address, and when the requester passes the authentication, the hard disk access request is responded to to ensure the security of the confidential data.
[0072] Therefore, this embodiment can divide the hard disk into multiple storage units. Furthermore, at least one storage unit's space state is pre-set to an encrypted state, and at least one storage unit's space state is pre-set to an unencrypted state; and / or, the space state of at least one storage unit is configurable. The hard disk can simultaneously store encrypted and unencrypted storage units, making it compatible with both types of storage to accommodate different encryption requirements. Upon receiving a hard disk access request, the system can verify whether data access is allowed based on the space state of the target address and the requester's identity, thus ensuring data security while maintaining data storage flexibility.
[0073] Please refer to Figure 7, which is another schematic flowchart of the hard disk control method according to an embodiment of this application. In some embodiments, the hard disk includes a control drive module and multiple storage units; wherein, the hard disk drive of the control drive module can create multiple virtual units, each virtual unit being connected to the hard disk drive and associated with a storage unit. Based on this, the hard disk control method can be as follows:
[0074] S201: In response to a virtual unit acquiring a control request, the virtual unit that acquires the control request is designated as the current virtual unit.
[0075] In this embodiment, the virtual unit that obtains the control request is designated as the current virtual unit.
[0076] As illustrated in the examples above, a control request may include at least one of a hard disk access request and a hard disk write request. A request for hard disk modification, for example, can be considered to include two steps: a hard disk access process and a hard disk write process. In this embodiment, the hard disk write process may include two steps: deleting data and writing data.
[0077] S202: Resolve the memory unit associated with the current virtual unit and use it as the target address.
[0078] In this embodiment, as described above, the virtual unit has been pre-associated with a storage unit. Therefore, when the current virtual unit receives a control request, the storage unit associated with the current virtual unit can be considered as the target storage unit, i.e., the target address.
[0079] S203: Driver target address execution control request.
[0080] In this embodiment, in response to resolving the target address, the target address can be driven to execute a control request.
[0081] Therefore, the hard drive control driver module in this embodiment can create multiple virtual units, which are connected to and associated with the hard drive storage units. In this application, control requests to the hard drive can be received through virtual units, and the associated storage unit can be located based on the current virtual unit receiving the control request, thus executing the corresponding control request. In other words, when controlling the hard drive, it is possible to know the storage address or intended storage address of the data. Address location can be performed relatively simply and clearly through virtual units, thereby optimizing the hard drive's working principle and improving its ease of use and response efficiency.
[0082] In some embodiments, when resolving the storage unit associated with the current virtual unit, the configuration information of the current virtual unit can be obtained. The unit information associated with the current virtual unit within the configuration information is identified. The unit information belongs to the storage unit associated with the current virtual unit.
[0083] In other words, the process involves obtaining the storage unit's unit information, which includes the access mode and unit identifier. Based on this unit information, a virtual unit is created that is associated with the storage unit; this virtual unit is used to receive control requests for the storage unit.
[0084] In some embodiments, the cell identifier may be the cell number and / or storage address range of the storage cell, which is not limited here. Accordingly, the principle of creating multiple virtual cells may be that the cell information of the storage cells in the hard disk can be obtained separately. The cell information includes the cell identifier. A virtual cell is created for each storage cell, and the created virtual cell is configured using the cell information of the storage cell.
[0085] Furthermore, virtual units can be configured based on storage unit access modes. For example, access modes can include pass-through mode and media mode.
[0086] In some embodiments, the unit identifier of the storage unit can be written into the configuration information of the virtual unit. The access mode of the storage unit is written into the configuration information of the virtual unit to identify the space state of the storage unit based on the access mode. In response to determining that the virtual unit obtains a control request, it is determined whether to authenticate the requester based on the access mode.
[0087] In this application, an encrypted configuration table can be built within the hard disk to manage access modes and other aspects of storage units based on the encrypted configuration table. That is, the encrypted configuration table includes the access modes of storage units within the hard disk; when the storage unit is in an encrypted state, the encrypted configuration table also includes encrypted data used to encrypt the storage unit.
[0088] Furthermore, as described above, the hard drive includes a first storage module and a second storage module. The first storage module includes multiple accessible storage units, while the second storage module hides the access channel from the outside of the hard drive. The encrypted configuration table can be stored in the second storage module. In other words, the encrypted configuration table is not visible or accessible outside the hard drive, which reduces the risk of tampering with the encrypted configuration table and thus improves its security. The second storage module can be accessed to perform read operations on the encrypted configuration table stored therein.
[0089] In some embodiments, the hard disk can acquire or generate management instructions for managing storage units. Based on these management instructions, the information associated with the target storage unit in the encrypted configuration table is adjusted to modify the control method for the storage unit.
[0090] For example, management commands can include at least one of the following: create command, update command, and discard command. A create command can be used to create a new storage unit or set a free storage unit; an update command can be used to modify the encrypted data of a target storage unit; and a discard command can be used to instruct the discard of a target storage unit. The following examples illustrate the execution principles of each management command.
[0091] Please refer to Figure 8, which is a flowchart illustrating the execution of a new instruction according to an embodiment of this application.
[0092] S301: Get the new command.
[0093] S302: Identify newly created commands that carry encrypted media.
[0094] In this embodiment, the target storage unit of the new instruction can be encrypted using the encryption medium carried by the new instruction.
[0095] S303: Determine whether the encryption medium contains an access password.
[0096] In this embodiment, in response to determining that the encryption medium includes an access password, step S304 is executed; in response to determining that the encryption medium includes an access password, step S306 is executed.
[0097] S304: Obtain the root key and use the root key to encrypt the access password.
[0098] In this embodiment, the root key generated by the hard drive can be obtained, and the access password can be encrypted using the root key. During actual use of the hard drive, the access password can be used to lock the target storage unit. In some embodiments, the key protection unit located in the second storage module can be invoked to obtain the root key stored in the key protection unit.
[0099] S305: Write the encrypted access password into the encryption configuration table.
[0100] In this embodiment, the access password encrypted with the root key can be written into the encryption configuration table. For example, the header of the encryption configuration table includes the cell label category, storage address range category, access mode category, access password category, encryption key category, and random key category of the storage unit. The encryption medium can be written into the body of the corresponding header within the encryption configuration table based on the type of encryption medium and the target storage unit.
[0101] S306: Determine whether the encryption medium contains an encryption key.
[0102] In this embodiment, in response to determining that the encryption medium includes an encryption key, step S307 is executed; in response to determining that the encryption medium does not include an encryption key, step S311 is executed (as illustrated in Figure 8) or the process ends.
[0103] S307: Obtain the root key and use the root key to encrypt the encryption key.
[0104] In this embodiment, the root key generated by the hard drive is obtained, and the encryption key is encrypted using the root key.
[0105] S308: Obtain a randomly generated key from the hard drive.
[0106] In this embodiment, as described above, the hard disk may include a random key unit, which can generate a random key. The random key and the encryption key can be used together to encrypt the target storage unit to further improve the security of data encryption.
[0107] S309: Obtain the root key and use the root key to encrypt the random key.
[0108] In this embodiment, the root key generated by the hard drive is obtained, and the encryption key is encrypted using the root key.
[0109] S310: Write the encrypted encryption key and random key into the encryption configuration table.
[0110] In this embodiment, the encrypted root key and random key can be written into the encryption configuration table as encrypted data. The random key for encrypting the target storage unit can be saved so that when decrypting data within the target storage unit later, the random key saved in the encryption configuration table can be parsed, and the random key and encryption key can be used together to decrypt the data within the target storage unit.
[0111] In other words, in response to the encryption medium including the encryption key, when encrypting the target storage unit, the encryption key and the random key can be merged to obtain the merged key; the data in the target storage unit is encrypted using the merged key. The working principle will be explained in detail later, and will not be repeated here.
[0112] S311: Write other attributes to the encrypted configuration table.
[0113] In this embodiment, the encrypted medium can be written into the encryption configuration table and associated with the target storage unit to authenticate the requester accessing the target storage unit based on the encryption configuration table.
[0114] Furthermore, in this embodiment, after encrypting the encryption medium using the root key, the root key stored in the first storage module can be deleted to reduce the risk of the root key being obtained, thereby further improving the security and reliability of the hard drive.
[0115] For example, the access mode of the target storage unit can be automatically identified and filled into the corresponding access mode category. In some embodiments, the corresponding fields in the new instruction can be extracted and written into the table body corresponding to each table header in the encryption configuration table, which will not be elaborated here.
[0116] In some embodiments, the header of the encryption configuration table may be hidden or not set, and the header corresponding to each column / row may be specified by code or other means; in some embodiments, the header of the encryption configuration table is explicitly specified, which is not limited here.
[0117] An example of an encryption configuration table can be shown in the table below:
[0118] Table 1 Encryption Configuration Table
[0119] In other words, this application can receive user control requests through virtual units, thereby reducing the cumbersome steps of confirming the detailed storage address of the control request target; the hard drive can also be compatible with both encrypted and unencrypted storage units to improve the flexibility of data storage security levels. Furthermore, this application can further set encryption levels for storage units whose space status is encrypted, adaptively ensuring data security while reducing the encryption burden on data with relatively low security requirements.
[0120] In other words, based on different combinations of encryption media, the access modes of the storage unit in this embodiment can include at least a pass-through mode, a first media mode, a second media mode, and a third media mode. The pass-through mode allows access without authentication.
[0121] The encrypted medium in the first medium mode includes an access password. In conjunction with the configuration of the storage unit via management instructions (new instructions) as described in the foregoing embodiments, the encrypted medium carried by the management instructions can be identified and recorded. In response to the management instructions carrying an encrypted medium including an access password, the access mode of the target storage unit is determined to be the first medium mode.
[0122] The encryption medium in the second media mode may include an access password and an encryption key. In conjunction with the configuration of the storage unit via management instructions (new instructions) as described in the foregoing embodiments, the encryption medium carried by the management instructions can be identified and recorded. In response to the management instructions carrying encryption medium including an access password and an encryption key, the access mode of the target storage unit is determined to be the second media mode.
[0123] The encryption medium in the third media mode may include an encryption key. In conjunction with the configuration of the storage unit via management instructions (new instructions) as described in the foregoing embodiments, the encryption medium carried by the management instructions can be identified and recorded. In response to the encryption medium carrying the management instructions including an encryption key, the access mode of the target storage unit is determined to be the third media mode.
[0124] In response to determining that the access mode of the target storage unit is either the second media mode or the third media mode, the root key is obtained, and the encryption medium is encrypted using the root key. The random key unit is controlled to generate a random key. The random key is then encrypted using the root key. The encrypted medium and the random key are recorded. The random key can be used to encrypt data after being combined with the encryption key.
[0125] In other words, in this embodiment, the hard disk storage space is preset as multiple storage units. At least one of these storage units can have its access mode configured via management commands. That is, in response to receiving management commands, the target storage unit can be configured based on the management commands; wherein, the management commands are used to configure at least one of the storage unit's access mode and the encryption medium. A virtual unit associated with the target storage unit is configured. The configuration principle is illustrated in the examples above and will not be repeated here.
[0126] Please refer to Figure 9, which is a flowchart illustrating the execution of update instructions according to an embodiment of this application.
[0127] S401: Get update command.
[0128] S402: Query the access mode of the target storage unit in the encryption configuration table.
[0129] In this embodiment, step S406 can be executed in response to determining that the access mode is a pass-through mode; step S403 can be executed in response to determining that the access mode is a media mode.
[0130] S403: Authenticate the party issuing the update command.
[0131] In this embodiment, in response to the target storage unit's space state being encrypted, the sender of the update instruction is authenticated.
[0132] S404: Determine whether the original encrypted data in the encrypted configuration table includes the encryption key.
[0133] In this embodiment, S405: Decrypt the data stored in the target storage unit using the original encryption key.
[0134] S406: Process the target storage unit according to the update instruction.
[0135] In this embodiment, taking the example that the encryption medium indicated by the update instruction includes an encryption key, the decrypted data can be encrypted using the target encryption key.
[0136] S407: Update the encrypted data of the target storage unit in the encryption configuration table to the target encrypted data.
[0137] In this embodiment, the target encrypted data is the encrypted data that the update instruction indicates to be updated.
[0138] The encrypted data refers to the encrypted medium stored in the encryption configuration table, which is encrypted using the root key. Specifically, the encrypted data may include an access password encrypted using the root key, and / or an encryption key encrypted using the root key. Furthermore, when the encryption medium includes an encryption key, it may also include a random key encrypted using the root key.
[0139] Please refer to Figure 10, which is a flowchart illustrating the execution of obsolete instructions according to an embodiment of this application.
[0140] S501: Obtain obsolete instructions.
[0141] In this embodiment, the obsolescence command can originate from outside the hard drive, i.e., the user inputs the obsolescence command to instruct the target storage unit to be obsolescence.
[0142] And / or, the storage units can be monitored inside the hard drive to determine whether a storage unit should be discarded.
[0143] In some embodiments, the storage units within the hard disk can be monitored. Based on the monitoring results, a determination is made as to whether the storage units meet preset disposal conditions.
[0144] In response to a storage unit meeting a preset disposal condition, the storage unit is selected as the target storage unit and a disposal instruction is generated.
[0145] If no storage unit meets the preset discard conditions, no action is taken or the system checks again after a preset interval to see if any storage unit meets the preset discard conditions. This is to manage the stability of the hard drive and discard storage units that may affect its stability, thereby improving the stability of the hard drive.
[0146] S502: Obtain a randomly generated temporary key from the hard drive.
[0147] S503: Encrypt the target storage unit using a temporary key.
[0148] In this embodiment, when a discard instruction indicates that the target storage unit is no longer needed, the randomly generated temporary key for encrypting the target storage unit is not saved. The temporary key can be the same as the random key. Because the temporary key for encrypting the target storage unit is not saved, and the temporary key is randomly generated, it is almost impossible to decrypt the target storage unit, thus achieving the discarding of the target storage unit.
[0149] S504: Clear the encrypted data in the target storage unit within the encrypted configuration table.
[0150] Please refer to Figure 11, which is a schematic flowchart of executing a hard disk access request according to an embodiment of this application.
[0151] S601: Obtain hard disk access request.
[0152] S602: Resolve the target address of the hard disk access request.
[0153] S603: Query the encryption configuration table to obtain the access mode of the storage unit to which the target address belongs.
[0154] In this embodiment, the encrypted configuration table includes the access modes of the storage units within the hard disk. Further, as described above, the hard disk includes a first storage module and a second storage module. The first storage module includes multiple accessible storage units, and the second storage module hides the access channel from the outside of the hard disk.
[0155] The encrypted configuration table can be stored in the second storage module. This means the encrypted configuration table is not visible or accessible outside the hard drive, reducing the risk of tampering and thus improving its security. The second storage module can be accessed to perform read operations on the encrypted configuration table stored there.
[0156] S604: Determine the spatial status of the target address based on the access mode.
[0157] In this embodiment, in response to determining that the spatial state of the target address is encrypted, step S605 is executed; in response to determining that the spatial state of the target address is unencrypted, step S616 is executed.
[0158] The access modes of the storage unit may include at least pass-through mode, first medium mode, and second medium mode; wherein, the encryption and decryption complexity of the first medium mode is higher than that of the second medium mode.
[0159] It can determine that the spatial state of the target address is unencrypted in response to the access mode being pass-through mode; and determine that the spatial state of the target address is encrypted in response to the access mode being the first medium mode or the second medium mode.
[0160] S605: Retrieve verification parameters from the requester.
[0161] S606: Retrieve encrypted data from the target address in the encryption configuration table.
[0162] In this embodiment, the encrypted data includes an encrypted medium encrypted with a root key.
[0163] S607: Determine whether the encrypted data in the encrypted configuration table includes the access password.
[0164] In this embodiment, in response to determining that the encrypted data in the encrypted configuration table includes an access password, step S608 is executed; in response to determining that the encrypted data in the encrypted configuration table does not include an access password, step S610 is executed.
[0165] S608: Obtain the root key and decrypt the access password within the encrypted data.
[0166] S609: Compare and verify the access passwords of the verification parameters and the encrypted data.
[0167] In this embodiment, in response to the determination that the access passwords for the verification parameters and the encrypted data match, step S610 is executed; in response to the determination that the access passwords for the verification parameters and the encrypted data do not match, it can be considered that the access password sent by the requester is incorrect, and it can be considered that the requester does not have the permission to access the target address, so the process can end.
[0168] S610: Determine whether the encrypted data in the encrypted configuration table includes the encryption key.
[0169] In this embodiment, in response to determining that the encrypted data in the encrypted configuration table includes an encryption key, step S611 is executed; in response to determining that the encrypted data in the encrypted configuration table does not include an encryption key, step S616 is executed.
[0170] S611: Obtain the root key of the hard drive and decrypt the encryption key within the encrypted data.
[0171] S612: Compare and verify the encryption keys of the parameters and the encrypted data.
[0172] In this embodiment, in response to the determination that the encryption keys of the verification parameters and the encrypted data match, step S613 is executed; in response to the determination that the encryption keys of the verification parameters and the encrypted data do not match, it can be considered that the encryption key sent by the requester is incorrect, and it can be considered that the requester does not have the permission to access the target address, so the process can end.
[0173] S613: Obtain the root key of the hard drive and decrypt the random key within the encrypted data.
[0174] In this embodiment, the root key is used to decrypt the encrypted data to obtain a random key.
[0175] S614: Combine the encryption key and the random key to obtain the combined key.
[0176] S615: Decrypt the data stored at the target address.
[0177] In this embodiment, the data stored at the target address can be decrypted using the fusion key.
[0178] S616: Read the data requested by the hard disk access request.
[0179] In other words, in this embodiment, the encrypted data is an encrypted medium encrypted with the root key. The root key can be used to decrypt the encrypted data to obtain the encrypted medium. By comparing whether the encrypted medium matches the verification parameters, the requester of the hard drive access request is authenticated. That is, the verification parameters can be analyzed to see if they match the encrypted data. If the verification parameters match the encrypted data, the requester is considered to have the right to access the target address, the requester is deemed to have been authenticated, and the control request is allowed to be executed.
[0180] Please refer to Figure 12, which is a schematic flowchart of executing a hard disk write request according to an embodiment of this application.
[0181] S701: Obtain a hard disk write request.
[0182] S702: Obtain the write data carried by the hard disk write request.
[0183] S703: Access mode for querying the target address of a hard disk write request.
[0184] S704: Determine whether the encryption medium of the target address includes the encryption key.
[0185] In this embodiment, in response to determining that the encryption medium of the target address includes an encryption key, step S705 is executed; in response to determining that the encryption medium of the target address does not include an encryption key, step S707 is executed.
[0186] S705: Obtain the encryption key stored at the target address on the hard disk.
[0187] In this embodiment, in response to the target address's access mode being media mode and the encryption medium including an encryption key, the encryption key of the target address stored on the hard disk can be obtained.
[0188] S706: Encrypt the written data using an encryption key.
[0189] In this embodiment, the written data can be encrypted using an encryption key.
[0190] In some embodiments, as described in the preceding embodiments, the written data can be further encrypted using a random key. In some embodiments, a random key stored at the target address on the hard disk can be obtained; the random key and the encryption key can be merged to obtain a merged key; and the written data can be encrypted using the merged key.
[0191] S707: Writes the data to the target address.
[0192] In this embodiment, if the hard disk access mode is the pass-through mode or the first media mode as described above, that is, when the decryption medium does not include an encryption key and therefore the write data does not need to be encrypted using the encryption key, the write data can be written to the target address. In response to determining that the hard disk access mode is the second media mode or the third media mode as described above, that is, when the decryption medium includes an encryption key, the write data is encrypted using the obtained encryption key, and the encrypted write data is written to the target address.
[0193] In other words, in this embodiment, in response to determining that the spatial state of the target address is encrypted, the request type of the control request can be identified. That is, in response to the spatial state of the target address being encrypted, the type of control request can be distinguished before driving the target address to execute the control request. In response to the control request type being a hard disk access request, it can be determined that the requester needs to be authenticated to ensure the security of confidential data on the hard disk. In response to the control request type being a hard disk write request, it can be determined that the hard disk write request can be allowed to be executed, without needing to authenticate the requester, improving data writing efficiency and reducing authentication operations during data writing. Furthermore, when it is not necessary to authenticate the requester, the storage unit can be monitored in conjunction with the preset abandonment conditions described above. In response to determining that the requester writes a large amount of data in a short period of time, even causing the storage space of the storage unit to be exhausted or almost exhausted, an abandonment instruction can be generated to abandon the storage unit.
[0194] In some embodiments, the requester of the hard disk write request can also be authenticated to screen the requester to a certain extent and reduce the risk of situations affecting hard disk stability.
[0195] In layman's terms, the original components in hard drives such as NVMe (Non-Volatile Memory Host Controller Interface Specification) SSDs can remain unchanged, with the controller chip executing the hard drive firmware code. Temporary data processed by the controller chip is stored in volatile memory, while persistent data is stored in the media space of NAND (Non-linear Macrocell Mode Memory) particles. In this application, the NVMe SSD can be equipped with an encryption unit, a random key unit, and a key protection unit. The encryption unit provides symmetric encryption and decryption capabilities; the random key unit provides the ability to generate truly random numbers; and the key protection unit can generate a root key before shipment using a random key unit such as a true random number generator, providing access to the root key while restricting external access to the root key.
[0196] The hard drive firmware maintains an encrypted configuration table, which includes data such as the cell number, address range, access mode, access password, encryption key, and random key for each storage unit. This encrypted configuration table can be stored in NAND space inaccessible to the user. When a user creates a sub-hard drive (i.e., a storage unit) through management software, the attribute parameters pass sequentially through the virtual device of the operating system's custom driver, the physical device, and the hard drive firmware logic, ultimately being saved into the firmware's encrypted configuration table. When a user reads encrypted data stored on a sub-hard drive through management software, they need to enter an access password and / or encryption key. The firmware retrieves the access password, encryption key, and random key written during creation or configuration from the encrypted configuration table.
[0197] Taking a secure medium that includes both an access password and an encryption key as an example, the process begins with authentication using the access password, followed by secondary authentication using the encryption key. Finally, a fused key is generated using the encryption key and a random key to decrypt the data on the hard drive and return it to the user, maximizing the security of confidential data. When a user writes data to a sub-hard drive through the management software, the hard drive firmware retrieves the encryption key and random key written during creation or configuration from the encryption configuration table, generates a fused key, and uses this fused key to encrypt the written user data before storing it on the hard drive. When a user no longer needs data on a sub-hard drive, they can trigger a discard command. The hard drive firmware generates a temporary and random key, encrypts the data on the corresponding sub-hard drive, and restores the security attributes in the encryption configuration table to the no-access level.
[0198] In summary, this application establishes a storage unit mechanism through a hard disk and configures security attributes for the storage units. It maintains and manages the security access attributes of the storage units and performs targeted processing of data read and write operations based on the security access attributes. This ensures both categorized data storage (different types of data are stored in different storage units) and hierarchical data protection (different storage units are set with different security protection levels), thus guaranteeing both convenience and security on a single hard disk.
[0199] It should be understood that although the steps in the flowcharts of Figures 6-12 are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in Figures 6-12 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0200] In some embodiments, as shown in FIG4, a computer program product is provided, including computer-readable instructions. When executed by one or more processors, the computer-readable instructions implement the steps of the hard disk control method described above, which will not be repeated here.
[0201] Please refer to Figure 13, which is a schematic diagram of the structure of a computer device according to an embodiment of this application.
[0202] In some embodiments, the computer device may be a terminal, the internal structure of which may be illustrated in Figure 13.
[0203] The computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When the computer-readable instructions are executed by the processor, they implement a hard disk control method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad located on the computer device casing, or an external keyboard, touchpad, or mouse.
[0204] Those skilled in the art will understand that the structure illustrated in Figure 13 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0205] In some embodiments, a computer device is provided, including one or more processors; and a memory associated with the one or more processors, the memory storing computer-readable instructions that, when read and executed by the one or more processors, perform the following steps:
[0206] S201: In response to a virtual unit acquiring a control request, the virtual unit that acquires the control request is designated as the current virtual unit.
[0207] S202: Resolve the memory unit associated with the current virtual unit and use it as the target address.
[0208] S203: Driver target address execution control request.
[0209] In some embodiments, as shown in FIG15, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0210] S201: In response to a virtual unit acquiring a control request, the virtual unit that acquires the control request is designated as the current virtual unit.
[0211] S202: Resolve the memory unit associated with the current virtual unit and use it as the target address.
[0212] S203: Driver target address execution control request.
[0213] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When executed, these computer-readable instructions can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0214] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0215] The embodiments described above are merely examples of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application.
Claims
1. A hard disk control method, characterized in that, The hard disk includes a control drive module and multiple storage units; wherein, the hard disk drive of the control drive module can create at least one virtual unit, and each virtual unit is connected to the hard disk drive and associated with the multiple storage units; the hard disk control method includes: In response to a virtual unit acquiring a control request, the virtual unit that acquires the control request is designated as the current virtual unit; Resolve the storage unit associated with the current virtual unit, and use the storage unit associated with the current virtual unit as the target address; and The target address is driven to execute the control request.
2. The hard disk control method according to claim 1, characterized in that, The parsing of the storage units associated with the current virtual unit includes: Obtain the configuration information of the current virtual unit; and Identify the unit information associated with the current virtual unit within the configuration information of the current virtual unit; wherein the unit information associated with the current virtual unit belongs to the storage unit associated with the current virtual unit.
3. The hard disk control method according to claim 2, characterized in that, Creating at least one virtual unit includes: Obtain the unit information of each of the plurality of storage units within the hard disk; and A virtual unit is created for each storage unit, and the created virtual unit is configured using the unit information of the plurality of storage units.
4. The hard disk control method according to claim 3, characterized in that, The unit information of the plurality of storage units includes a unit identifier and an access mode, wherein the access mode includes a pass-through mode and a media mode; the virtual unit configured and created using the unit information of the plurality of storage units includes: Write the cell identifier of the corresponding storage unit into the configuration information of the created virtual unit; and The access mode of the corresponding storage unit is written into the configuration information of the created virtual unit to identify the space status of the created storage unit based on the access mode of the corresponding storage unit. In response to determining that the created virtual unit obtains the control request, it is determined whether to authenticate the requester based on the access mode of the corresponding storage unit.
5. The hard disk control method according to claim 1, characterized in that, In response to the target address's spatial state being encrypted, the process of driving the target address to execute the control request includes: Identify the request type of the control request; In response to the control request being classified as a hard disk access request, the system determines whether to authenticate the requester; and In response to the control request being classified as a hard disk write request, it is determined that the hard disk write request is permitted to be executed.
6. The hard disk control method according to claim 1 or 5, characterized in that, In response to the target address's spatial state being encrypted, the process of driving the target address to execute the control request includes: Obtain the encrypted data of the target address specified in the encryption configuration table; Retrieve verification parameters from the requester; Analyze whether the verification parameters match the encrypted data; and In response to the verification parameters matching the encrypted data, it is determined that the requester has been authenticated and is allowed to execute the control request.
7. The hard disk control method according to claim 6, characterized in that, The encrypted data includes an encrypted medium encrypted with a root key; the step of parsing whether the verification parameter matches the encrypted data includes: Obtain the root key of the hard drive; The encrypted data is decrypted using the root key to obtain the encrypted medium; and Compare the encryption medium with the verification parameters.
8. The hard disk control method according to claim 7, characterized in that, In response to the encryption medium including an encryption key, the encrypted data further includes a random key encrypted with the root key; The execution of the control request includes: In response to the control request being a hard disk access request, the encrypted data is decrypted using the root key to obtain the random key; By fusing the random key and the encryption key, a fused key is obtained; and The data stored at the target address is decrypted using the fusion key.
9. The hard disk control method according to claim 1, characterized in that, The hard disk control method includes: The storage space of the hard disk is preset to the plurality of storage units; In response to receiving a management instruction, a target storage unit is configured based on the management instruction; wherein the management instruction is used to configure the access mode of the plurality of storage units and at least one of the encryption media; and Configure the virtual unit associated with the target storage unit.
10. The hard disk control method according to claim 9, characterized in that, The configuration of the target storage unit based on the management instructions includes: Identify and record the encrypted medium carried by the management instruction; wherein the encrypted medium includes at least one of an access password and an encryption key; In response to the access password being included in the encrypted medium carried by the management instruction, the access mode of the target storage unit is determined to be the first medium mode; In response to the management instruction carrying the encrypted medium including the access password and the encryption key, the access mode of the target storage unit is determined to be the second medium mode; and In response to the encryption medium carrying the management instruction including the encryption key, the access mode of the target storage unit is determined to be a third medium mode.
11. The hard disk control method according to claim 10, characterized in that, After determining that the access mode of the target storage unit is a second media mode, or after determining that the access mode of the target storage unit is a third media mode, the method further includes: Obtain the root key and use the root key to encrypt the encryption medium; Control the generation of a random key, and encrypt the random key using the root key; and Record the encrypted medium and the random key; wherein the random key is used to encrypt data after being fused with the encryption key.
12. The hard disk control method according to claim 11, characterized in that, The encrypted medium carrying the management instructions recorded includes: The encryption configuration table stored on the hard disk is invoked; wherein the header of the encryption configuration table includes the cell number category, storage address range category, access mode category, access password category, encryption key category, and random key category of the storage unit; and Based on the type of the encryption medium and the target storage unit, the encryption medium is written into the body of the corresponding header in the encryption configuration table.
13. The hard disk control method according to claim 1, characterized in that, The process of driving the target address to execute the control request includes: In response to the control request being a hard disk write request, the write data carried by the hard disk write request is obtained; and The data to be written is written to the target address.
14. The hard disk control method according to claim 13, characterized in that, The step of writing the data to the target address includes: Query the access pattern of the target address; In response to the target address's access mode being media mode and the encryption medium including an encryption key, the encryption key for the target address stored on the hard disk is obtained; and The data to be written is encrypted using the obtained encryption key, and the encrypted data is then written to the target address.
15. The hard disk control method according to claim 14, characterized in that, The step of encrypting the written data using the acquired encryption key includes: Obtain the random key stored at the target address on the hard disk; By combining the random key and the encryption key, a fused key is obtained; and The written data is encrypted using the fusion key.
16. A hard disk, characterized in that, The hard disk includes: Multiple storage units; and A control driver module is connected to the plurality of storage units; the control driver module includes a hard disk drive, the hard disk drive being capable of creating at least one virtual unit, each virtual unit being connected to the hard disk drive and associated with the plurality of storage units; the control driver module is used to implement the hard disk control method as described in any one of claims 1-15.
17. A storage system, characterized in that, The storage system includes: An interactive device includes an interactive module and an interactive channel. The interactive module includes multiple sub-interactive units, each of which is connected to one of the interactive channels. The hard disk of claim 16, wherein the virtual units of the hard disk are respectively connected to one of the interaction channels.
18. A computer program product comprising computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, they implement the steps of any of the hard disk control methods described in claims 1-15.
19. A computer device, comprising: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store computer-readable instructions that, when read and executed by the one or more processors, implement the steps of any of the hard disk control methods of claims 1-15.
20. A non-volatile computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by one or more processors, implement the steps of any of the hard disk control methods described in claims 1-15.
Citation Information
Patent Citations
Storage method, device and system
CN108345515A
Data processing method and device and storage equipment
CN113867642A
Hard disk control method, hard disk, storage system and related computer device
CN118733483A
Hard disk control method, hard disk, computer program product, equipment and medium
CN118916301A
Encrypted mobile hard disk
CN217982363U