Solid state disk memory management mode and system

By reading and updating SSD data on the host side, the problem of insufficient SSD memory is solved, achieving efficient memory space release and data block management, and improving write speed and update efficiency.

CN115421658BActive Publication Date: 2026-06-23YEESTOR MICROELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YEESTOR MICROELECTRONICS CO LTD
Filing Date
2022-08-31
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Insufficient memory resources on solid-state drives (SSDs) lead to a decline in performance metrics, particularly affecting write and recycling performance, making it difficult to maintain spreadsheet data.

Method used

After the solid-state drive is connected to the host, it enters an independent working mode. The host-side auxiliary software reads and updates the data, and updates the table in the host memory. Private instructions are used to control the solid-state drive to switch to a cooperative working mode to realize data migration and recycling.

Benefits of technology

It efficiently frees up solid-state drive memory space on the host side, improves update efficiency, ensures write speed response, and enables bad block data reclamation and data block migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115421658B_ABST
    Figure CN115421658B_ABST
Patent Text Reader

Abstract

The application relates to the field of memories, in particular to a solid state disk memory management mode and system, which comprises the following steps: controlling the solid state disk to be connected to a host computer and the solid state disk to be in an independent working mode; controlling auxiliary software at the host computer end to read initial data on the solid state disk and write the initial data into the host computer memory; outputting a private instruction based on an operation response detection of the fixed disk end; controlling the host computer end to update the initial data based on the operation that the solid state disk receives the private instruction; obtaining corresponding target data; writing the target data updated by the host computer end into the solid state disk and shutting down the host computer. The application has the effect that the memory space in the solid state disk can be released.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of memory, and in particular to a solid-state drive memory management method and system. Background Technology

[0002] Solid-state drives (SSDs) are hard drives made using arrays of solid-state electronic storage chips.

[0003] SSDs have large capacities and a lot of internal table data, but limited memory resources. Therefore, the stored table data needs to be managed in multiple levels, which may affect certain performance indicators. For example, algorithms with a CS table may experience reduced write performance; algorithms without a CS table may experience reduced garbage collection performance; and maintaining the table of read counts for all blocks is difficult. All of these issues are caused by insufficient memory space within the SSD, and further improvements are needed. Summary of the Invention

[0004] In order to free up memory space in solid-state drives (SSDs), this application provides a SSD memory management method and system.

[0005] Firstly, this application provides a solid-state drive memory management method, which adopts the following technical solution:

[0006] A solid-state drive (SSD) memory management method includes the following steps:

[0007] Control the solid-state drive to connect to the host and keep the solid-state drive in independent working mode;

[0008] The auxiliary software on the control host reads the initial data on the solid-state drive and writes it into the host memory;

[0009] Private instructions are output based on the operation of detecting the response at the fixed hard drive end;

[0010] The host computer updates initial data based on private instructions received from the solid-state drive;

[0011] Obtain the corresponding target data;

[0012] Write the updated target data on the host to the solid-state drive and then shut down the host.

[0013] By adopting the above technical solution, during the use of the solid-state drive (SSD), after the SSD is installed and connected to the host, the SSD is in independent working mode. Initial data is updated on the SSD. Then, auxiliary software on the host opens. If the SSD's response slows down, it outputs a private command. After receiving the private command, the SSD can read the initial data on the SSD through the auxiliary software and write the read initial data into the host's memory. At this time, table data is updated on the host, and the updated target data can be obtained. Then, the target data is flushed into the SSD's memory.

[0014] Through the above process, table data can be updated on the SSD without having to update the table data in the SSD's memory. This allows for table updates on the host machine with more memory, freeing up memory space on the SSD and providing more memory for updates, while also increasing update efficiency.

[0015] Optionally, after the solid-state drive receives the proprietary instructions, the following steps are also performed:

[0016] Control the solid-state drive to switch from stand-alone working mode to collaborative working mode.

[0017] By adopting the above technical solution, since the write speed response of the solid-state drive (SSD) is slower, after controlling the SSD to switch from independent working mode to cooperative working mode, the initial data can be updated on the host side, and then the target data can be flushed to the SSD, thereby ensuring the write speed response of the SSD.

[0018] Optionally, when the host-side auxiliary software reads the initial data from the solid-state drive, the following steps may be performed:

[0019] Retrieve the data block corresponding to the initial data;

[0020] Determine whether the data in the data block needs to be moved; if so, record the data block number.

[0021] Retrieve the target block number data corresponding to an empty block in a solid-state drive;

[0022] Write the initial data from the data block corresponding to the data block number to the block corresponding to the target block number. The initial data includes all the data in the data block.

[0023] By adopting the above technical solution, during the data management process of the solid-state drive (SSD), when the auxiliary software on the host side reads the data on the SSD, it will also read the corresponding data blocks. The data block represents the initial data location on the SSD. When the system determines that the initial data of the data block needs to be moved, the system records the data block number of the data block, selects the corresponding target block number from the SSD, and then writes the initial data on the data block corresponding to the data block number to the block corresponding to the target block number, thereby realizing the movement of data on the block. Through the above process, by moving the data on the block, the data on bad blocks can be recovered.

[0024] Optionally, in determining whether data on a data block needs to be moved, the following steps may be performed:

[0025] Retrieve the read data corresponding to the data block number, where the read data is the number of times the data block has been read;

[0026] Retrieve the pre-set read threshold;

[0027] The read data is compared with the read threshold. If the read data is less than the read threshold, no migration is required. Otherwise, the initial data on the data block corresponding to the data block number is migrated.

[0028] By adopting the above technical solution, when determining whether data migration on a block is necessary, the system simultaneously obtains the read data corresponding to the data block number. The read data represents the number of times the data block has been read. The system also retrieves the read threshold corresponding to the block and compares the read data with the read threshold. If the read data is less than the read threshold, it means that the block can still be read, and migration is not necessary. Otherwise, it means that the block has been read too many times, and the initial data on the data block corresponding to the data block number needs to be migrated. This allows for timely migration of data on blocks on the solid-state drive.

[0029] Optionally, when the host-side auxiliary software reads the initial data from the solid-state drive, the following steps may be performed:

[0030] Obtain parameter data of the solid-state drive, including empty block data and effective data density data;

[0031] If the amount of empty block data is less than the empty block threshold and the amount of effective data density is less than the density threshold, the auxiliary software on the host control side will reclaim the initial data on the solid-state drive.

[0032] By adopting the above technical solution, during the writing process of the solid-state drive, the system judges the efficiency of data reclamation by the empty block data and the effective data density data. If the number of empty blocks is very small and the SSD data is very scattered, the expected reclamation efficiency will be relatively low. By using auxiliary software on the host side to reclaim the initial data, the reclamation efficiency can be improved.

[0033] Secondly, the solid-state drive memory management system provided in this application adopts the following technical solution:

[0034] A solid-state drive memory management system, comprising:

[0035] The control module is used to control the connection of the solid-state drive to the host and the solid-state drive to be in independent working mode.

[0036] The read / write module controls the host-side auxiliary software to read initial data from the solid-state drive and write the initial data into the host memory.

[0037] The output module is used to output private instructions based on the operation of detecting the response at the fixed hard drive.

[0038] The update module, based on the operation of private instructions received from the solid-state drive, is used to control the host to update the initial data;

[0039] The acquisition module is used to acquire the corresponding target data;

[0040] The write module is used to write the target data updated on the host to the solid-state drive and then shut down the host.

[0041] By adopting the above technical solution, during the use of the solid-state drive (SSD), after the control module controls the SSD to be installed (i.e., after the SSD is connected to the host), the SSD is in an independent working mode. Initial data is updated on the SSD. Then, the auxiliary software on the host starts. If the SSD's response slows down, it outputs a private command. After receiving the private command, the SSD can read the initial data on the SSD through the read-write module and write the read initial data into the host's memory. At this time, the update module on the host starts updating the table data, the acquisition module can obtain the updated target data on the host, and then the write module refreshes the target data into the SSD's memory.

[0042] Through the above process, table data can be updated on the SSD without having to update the table data in the SSD's memory. This allows for table updates on the host machine with more memory, freeing up memory space on the SSD and providing more memory for updates, while also increasing update efficiency.

[0043] Optional, also includes:

[0044] The switching module is used to control the solid-state drive to switch from independent working mode to collaborative working mode.

[0045] By adopting the above technical solution, since the write speed response of the solid-state drive (SSD) is slower, after the switching module controls the SSD to switch from independent working mode to cooperative working mode, the initial data can be updated on the host side, and then the target data can be flushed to the SSD, thereby ensuring the write speed response of the SSD.

[0046] Thirdly, the computer-readable storage medium provided in this application stores a computer program that can be loaded by a processor and executed, such as a solid-state drive memory management method.

[0047] Fourthly, the smart terminal provided in this application includes a memory and a processor, wherein the memory stores a computer program that can be loaded and executed by the processor, such as a solid-state drive memory management method.

[0048] In summary, this application includes at least one of the following beneficial technical effects:

[0049] 1. It eliminates the need to update table data in the SSD's memory directly on the SSD. Table updates can be performed on the host with more memory, freeing up memory space on the SSD and allowing more memory for updates, while also improving update efficiency.

[0050] 2. By comparing the read data with the read threshold, data blocks on the solid-state drive can be moved in a timely manner. Attached Figure Description

[0051] Figure 1 This is an overall flowchart of a solid-state drive memory management method according to an embodiment of this application;

[0052] Figure 2 This is a flowchart illustrating the process of determining whether data on a block needs to be moved in a solid-state drive memory management method implemented in this application;

[0053] Figure 3 This is a flowchart illustrating the comparison between read data and read threshold in a solid-state drive memory management method according to an embodiment of this application;

[0054] Figure 4 This is a flowchart illustrating the process of obtaining the initial table of a solid-state drive (SSD) memory management method according to an embodiment of this application.

[0055] Figure 5 This is an overall block diagram of a solid-state drive memory management system according to an embodiment of this application.

[0056] Explanation of reference numerals in the attached figures:

[0057] 1. Control module; 2. Read / write module; 3. Output module; 4. Switching module; 5. Update module; 6. Acquisition module; 7. Write module. Detailed Implementation

[0058] The following is a further detailed description of this application.

[0059] Firstly, this application discloses a solid-state drive memory management method, referring to... Figure 1 and Figure 2 It includes the following steps:

[0060] S1 controls the connection of the solid-state drive (SSD) to the host, which is the SSD drive itself.

[0061] After the solid-state drive (SSD) is installed, it operates in an independent mode.

[0062] S2 controls the auxiliary software on the host to read the initial data on the solid-state drive and write the read initial data into the host memory;

[0063] In one embodiment of this application, the host-side auxiliary software can use a solid-state drive maintenance tool such as Solid State Doctor to add the function of assisting the solid-state drive to run FTL efficiently, as mentioned in the text. It should be noted that although the auxiliary software is already running, the table is still being updated in the memory of the solid-state drive. The auxiliary software can detect the write response speed of the solid-state drive.

[0064] Furthermore, solid-state drives (SSDs) can also contain bad blocks. When host-side auxiliary software reads data from these blocks, it also determines whether the data needs to be moved. This ensures that subsequent data reads from these blocks are performed correctly. Figure 2 The specific process is as follows:

[0065] S221, Obtain the data block corresponding to the initial data;

[0066] The initial data is a part of the data on the data block. In this embodiment, the initial data includes the table data and user data on the data block, which refers to the data on the data block before the migration is triggered.

[0067] S222, determine whether the data on the data block needs to be moved. If so, record the data block number of the data block, indicating that the block corresponding to the data block number may have read / write problems in the future, so the data on the block needs to be moved.

[0068] S223, retrieve the target block number data corresponding to the empty block in the solid-state drive;

[0069] In this case, the space on an empty block can be used for writing data, and the number of read and write operations on an empty block is less, while the number of read and write operations available after data is written is more.

[0070] S224, Write the initial data on the data block corresponding to the data block number to the block corresponding to the target block number;

[0071] The initial data includes all the data in the data block.

[0072] Through the process from S221 to S224, during the data management of the solid-state drive (SSD), when the auxiliary software on the host side reads the initial data on the SSD, it also reads the corresponding data blocks. These data blocks represent the location of the initial data on the SSD. When the system determines that the initial data of a data block needs to be moved, it records the data block number and selects the corresponding target block number from the SSD. Then, it writes the initial data from the data block corresponding to the data block number to the block corresponding to the target block number, thus achieving the data movement on the block. Through this process, by moving the data on the block, data on bad blocks can be recovered.

[0073] Additionally, in determining whether data on a data block needs to be moved, refer to Figure 3 Perform the following steps:

[0074] S2221, retrieve the read data corresponding to the data block number;

[0075] The number of times a data block has been read is the number of times it has been read.

[0076] S2222, retrieve the preset reading threshold;

[0077] S2223. Compare the read data with the read threshold. If the read data is less than the read threshold, it means that the block can still be read and there is no need to move it. Otherwise, it means that the block has been read too many times and the initial data on the data block corresponding to the data block number is moved.

[0078] Meanwhile, when the auxiliary software on the host side reads the initial data on the SSD, it judges the efficiency of data reclamation by the number of empty blocks and the density of effective data. If the number of empty blocks is very small and the SSD data is highly dispersed, the expected reclamation efficiency will be relatively low. Figure 4 Therefore, the following steps are also required:

[0079] S231, retrieve parameter data of the solid-state drive;

[0080] The parameter data includes empty block data and effective data density data, and the effective data density data is the same as the effective data density.

[0081] S232, if the empty block data is less than the empty block threshold and the effective data density data is less than the density threshold, it means that the data on the solid-state drive needs to be reclaimed at this time, and the auxiliary software on the host side will reclaim the initial data on the solid-state drive.

[0082] By using the S231 to S232 process, the initial data can be recycled through auxiliary software on the host side, which can improve the recycling efficiency.

[0083] S3 outputs private instructions based on the operation of detecting the response at the fixed hard drive end;

[0084] During the host-side auxiliary software detection process, if the write response speed of the solid-state drive (SSD) is detected to be slowing down, the auxiliary software will issue a private command to the SSD. It should be noted that the private command can be a regular command, but it is just one type of control command for the SSD.

[0085] S4, based on the operation control host that receives private instructions from the solid-state drive, updates the initial data;

[0086] After receiving the proprietary instructions, the solid-state drive (SSD) also performs the following steps:

[0087] S41 controls the switching of the solid-state drive from stand-alone working mode to collaborative working mode.

[0088] In collaborative working mode, the initial data can be updated on the host side, which has abundant memory resources. The updated initial data is then flushed to the SSD, thus ensuring the SSD's write speed response.

[0089] S5, after the initial data update is performed on the host side, the system can obtain the corresponding target data;

[0090] S6 writes the updated target data from the host to the solid-state drive and then shuts down the host.

[0091] The implementation principle of a solid-state drive memory management method in this application embodiment is as follows:

[0092] After the SSD is installed, it operates independently. The host software reads the initial data from the SSD and writes it into the host memory. During this initial data reading process, it also determines whether data blocks need to be moved. If data needs to be moved, an empty block is selected on the SSD and the data is written, thus moving the data and reclaiming data from bad blocks. This process requires retrieving the data corresponding to the block number, retrieving a pre-set read threshold, and comparing the read data with the read threshold. The system compares the read data. If the read data is less than the read threshold, it means the block can still be read and does not need to be moved. Conversely, if the read data is greater than the read threshold, it means the block has been read too many times. The initial data on the data block corresponding to the data block number is then moved, thus enabling timely data migration from the solid-state drive (SSD). Simultaneously, the system also obtains SSD parameter data. If the empty block data is less than the empty block threshold and the effective data density is less than the density threshold, it means the SSD data needs to be reclaimed. The host-side auxiliary software then reclaims the initial data on the SSD to improve reclamation efficiency.

[0093] The system receives private instructions from the solid-state drive (SSD) and controls the host to update the initial data. The SSD then switches from an independent working mode to a cooperative working mode. By updating the initial data, the system obtains the corresponding target data, writes the updated target data from the host to the SSD, and then shuts down the host.

[0094] Through the above process, table data in the memory of the SSD can be updated on the SSD without having to update the SSD itself. The table can be updated on the host with more memory, freeing up memory space on the SSD and allowing more memory space for updates, while also improving update efficiency.

[0095] In a first aspect, embodiments of this application disclose a solid-state drive memory management system, referring to... Figure 5 ,include:

[0096] Control module 1 is used to control the solid-state drive to connect to the host and to operate the solid-state drive in an independent working mode.

[0097] Read / write module 2 controls the host-side auxiliary software to read initial data from the solid-state drive and write the initial data into the host memory;

[0098] Output module 3 is used to output private instructions based on the operation of detecting the response at the fixed hard disk end;

[0099] Switching module 4 is used to control the solid-state drive to switch from independent working mode to collaborative working mode;

[0100] Update module 5, based on the operation of switching the solid-state drive from independent working mode to collaborative working mode, is used to control the host to update the initial data;

[0101] Module 6 is used to acquire the corresponding target data;

[0102] Write module 7 is used to write the target data updated on the host to the solid-state drive and then shut down the host.

[0103] The implementation principle of a solid-state drive memory management system according to an embodiment of this application is as follows: During the use of the solid-state drive, after the control module 1 controls the solid-state drive to be installed, that is, after the solid-state drive is connected to the host, the solid-state drive is in an independent working mode, and the auxiliary software on the host is open. If the response of the solid-state drive is slowed down, a private command is output. After receiving the private command, the solid-state drive can read the initial data on the solid-state drive through the read-write module 2, and write the read initial data into the host's memory through the read-write module 2. At this time, the initial data on the solid-state drive is updated. Then, the switching module 4 controls the solid-state drive to switch from the independent working mode to the cooperative working mode. At this time, the update module 5 on the host starts to update the table data, and the acquisition module 6 can obtain the target data updated on the host. Then, the writing module 7 brushes the target data into the memory of the solid-state drive.

[0104] Through the above process, table updates can be performed on the host with more memory without having to update the table data in the memory of the SSD. This frees up memory space on the SSD, allowing more memory space for updates, and also improves update efficiency.

[0105] Thirdly, the computer-readable storage medium provided in this application stores a computer program that can be loaded by a processor and executed, such as a solid-state drive memory management method.

[0106] Fourthly, the smart terminal provided in this application includes a memory and a processor, wherein the memory stores a computer program that can be loaded and executed by the processor, such as a solid-state drive memory management method.

[0107] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A solid-state drive memory management method, characterized in that, include: S1. Control the solid-state drive to connect to the host and put the solid-state drive in independent working mode; S2. Control the auxiliary software on the host to read the initial data on the solid-state drive and write it into the host memory; S3. Output a private command based on the detection of a slowdown in the write response speed of the solid-state drive (SSD). S4. Based on the private instructions received by the solid-state drive (SSD), the host updates the initial data; after the SSD receives the private instructions, the host controls the SSD to switch from independent working mode to cooperative working mode; wherein, when the SSD is in independent working mode, the host updates the initial data on the SSD side, and when the SSD is in cooperative working mode, the host updates the initial data on the host side. S5. After performing initial data updates on the host side, obtain the corresponding target data; S6. Write the updated target data on the host to the solid-state drive and shut down the host. Step S2 involves controlling the host-side auxiliary software to read initial data from the solid-state drive, including: S221. Obtain the data block corresponding to the initial data; S222. Determine whether the data on the data block needs to be moved. If so, record the data block number of the data block. S223. Obtain the target block number data corresponding to the empty block in the solid-state drive; S224. Write the initial data on the data block corresponding to the data block number to the block corresponding to the target block number, wherein the initial data includes all the data on the data block; The process of determining whether the data on the data block needs to be moved in step S222 includes: S2221. Obtain the read data corresponding to the data block number, wherein the read data is the number of times the data block has been read; S2222, retrieve the preset reading threshold; S2223. Compare the read data with the read threshold. If the read data is less than the read threshold, no relocation is required. Otherwise, relocate the initial data on the data block corresponding to the data block number.

2. The solid-state drive memory management method according to claim 1, characterized in that, In step S2, the host-side auxiliary software reads the initial data from the solid-state drive, including: S231. Obtain parameter data of the solid-state drive, wherein the parameter data includes empty block data and effective data density data; S232. If the amount of empty block data is less than the empty block threshold and the amount of effective data density is less than the density threshold, then the auxiliary software on the host control side will reclaim the initial data on the solid-state drive.

3. A solid-state drive memory management system, characterized in that, For implementing a solid-state drive memory management method as described in any one of claims 1 to 2, the solid-state drive memory management system comprises: The control module (1) is used to control the solid-state drive to connect to the host and the solid-state drive to an independent working mode; The read / write module (2) controls the auxiliary software on the host side to read the initial data on the solid-state drive and to write the initial data into the host memory; The output module (3) outputs private instructions based on the operation of detecting a slowdown in the write response speed of the solid-state drive based on the response of the solid-state drive. The update module (5) controls the host to update the initial data based on the operation of the private instructions received by the solid-state drive. The acquisition module (6) is used to acquire the corresponding target data after the initial data update is performed on the host side; The write module (7) is used to write the target data updated on the host to the solid-state drive and then shut down the host. The switching module (4) is used to control the solid-state drive to switch from independent working mode to cooperative working mode.

4. A computer-readable storage medium storing a computer program capable of being loaded by a processor and executing a solid-state drive memory management method as described in any one of claims 1 to 2.

5. A smart terminal, comprising a memory and a processor, wherein the memory stores a computer program capable of being loaded by the processor and executing a solid-state drive memory management method as described in any one of claims 1 to 2.