A data management method for a solid state hard disk
By extracting the list of idle bit constraint intervals of storage units in the solid-state drive and generating and optimizing the data storage solution, the problem of low read and write efficiency caused by excessive threshold voltages in the solid-state drive is solved, and more efficient data management and storage is achieved.
Patent Information
- Application Number
- CN202510045043.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The data storage method of existing solid-state drives does not consider the impact of the number of threshold voltages on read and write efficiency, resulting in too many threshold voltages of storage units and low read and write efficiency.
A data management method for solid-state hard disk is provided. By responding to the data storage request of the user, the list of idle bits constraint intervals of the storage unit is extracted, multiple data storage solutions are generated, and the threshold voltage equalization optimization analysis is performed to select the target data storage solution with the most balanced threshold voltage distribution.
By optimizing the data storage solution, reasonably allocating data, balancing the number of threshold voltages, reducing the number of threshold voltages of storage units, and improving the read and write efficiency of solid-state hard disks.
Smart Images

Figure CN119440425B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage management, and in particular to a data management method for a solid state hard disk. Background Art
[0002] Solid-state drives have been widely used in personal computers, servers, data centers and other fields due to their advantages such as high speed, low power consumption, shock resistance and drop resistance. However, with the continuous development of NAND flash memory technology, the storage density of solid-state drives is getting higher and higher, and the number of threshold voltages in storage cells is also increasing. In the prior art, data storage of solid-state drives usually adopts a direct storage method, that is, the data is directly stored in the corresponding storage cell when it is written. Although this method is simple and direct, it does not take into account the impact of the number of threshold voltages on the read and write efficiency of the solid-state drive. Specifically, when the number of threshold voltages in a storage cell is too large, in order to accurately distinguish different data, each threshold voltage range needs to be set very narrow. This causes the read and write operations to take longer to identify and operate the threshold voltages within these narrow ranges, thereby reducing the read and write efficiency of the solid-state drive. In addition, the direct storage method will cause the number of threshold voltages of some storage cells to be too high, while the number of threshold voltages of other storage cells is low, and the threshold voltage distribution is uneven. This imbalance further exacerbates the problem of reduced read and write efficiency caused by excessive threshold voltages. Summary of the invention
[0003] The present invention provides a data management method for a solid state drive to solve the technical problem that the existing solid state drive storage technology does not consider the influence of the number of threshold voltages on the read and write efficiency, resulting in an excessive number of storage unit threshold voltages and low read and write efficiency.
[0004] The technical solution of the present invention to solve the above technical problems is as follows:
[0005] In a first aspect, the present invention provides a data management method for a solid-state hard disk, comprising: responding to a data storage request from a user terminal, obtaining a requested storage solid-state hard disk number and data to be stored; extracting a storage unit state according to the requested storage solid-state hard disk number, and obtaining a list of storage unit idle bit constraint intervals; obtaining the number of storage bits of the data to be stored, distributing the number of storage bits to be stored in the storage unit idle bit constraint interval list, and obtaining a first data storage scheme up to an Nth data storage scheme; performing threshold voltage balancing optimization analysis based on the first data storage scheme up to the Nth data storage scheme, and obtaining a target data storage scheme; and performing data management of the data to be stored according to the target data storage scheme.
[0006] In a second aspect, the present application provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is used to execute a data management method for a solid-state hard disk provided in the present application.
[0007] In a third aspect, the present application provides a computer-readable storage medium storing a computer program, and the computer program is used to execute a data management method for a solid-state hard disk provided by the present application.
[0008] The beneficial effects of the present invention are:
[0009] In response to a data storage request from a user end, a requested storage solid state drive number and data to be stored are obtained; storage unit state extraction is performed according to the requested storage solid state drive number, a storage unit idle bit constraint interval list is obtained, and the idle bit range of each storage unit is obtained by analyzing the storage unit state of the target solid state drive, so as to provide a basis for subsequent data allocation; the number of data to be stored in the data to be stored is obtained, and the number of data to be stored is distributed in the storage unit idle bit constraint interval list, and a first data storage scheme to an Nth data storage scheme is obtained, and according to the size of the data to be stored, it is reasonably allocated to the idle space of different storage units, and multiple possible data storage schemes are generated, which fully consider the actual state of the storage unit and avoid blind data storage; threshold voltage balance optimization analysis is performed based on the first data storage scheme to the Nth data storage scheme to obtain a target data storage scheme, and the generated multiple data storage schemes are further optimized and analyzed, and a scheme with the most balanced threshold voltage distribution and the least number is selected as the final target data storage scheme, so as to ensure the reasonable distribution of the threshold voltage of the storage unit and minimize the number of threshold voltages; data management of the data to be stored is performed according to the target data storage scheme, and the data to be stored is written into the corresponding storage unit according to the optimized target data storage scheme to complete the data storage management.
[0010] In summary, the present invention fully considers the actual state and threshold voltage distribution of the solid-state hard disk storage unit, optimizes the data storage scheme, reasonably allocates data, and balances the number of threshold voltages, thereby achieving the purpose of reducing the number of storage unit threshold voltages and improving the read and write efficiency of the solid-state hard disk. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A schematic diagram of a flow chart of a data management method for a solid state hard disk provided by the present invention;
[0012] Figure 2 A schematic diagram of the structure of an electronic device provided by the present invention;
[0013] Figure 3 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention.
[0014] In the accompanying drawings, the components represented by the reference numerals are as follows:
[0015] Electronic device 100 , memory 110 , processor 120 , first computer program 111 , computer-readable storage medium 200 , second computer program 211 . DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0017] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0018] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.
[0019] Embodiment 1:
[0020] like Figure 1 As shown, an embodiment of the present invention provides a data management method for a solid state drive, comprising:
[0021] S100: In response to a data storage request from a user, obtaining a solid state drive number and data to be stored.
[0022] Specifically, when a user needs to store data in a solid-state drive, a data storage request is initiated through a user-end device (such as a personal computer, server, etc.). The data storage request contains two parts of information: the solid-state drive number of the target storage device, i.e., the solid-state drive number requested for storage, and the specific data content to be stored, i.e., the data to be stored.
[0023] Monitor and capture the data storage request from the user in real time. After identifying the data storage request, respond immediately and extract the specified requested storage solid state drive number and the data to be stored from the parameters carried by the data storage request. Among them, the requested storage solid state drive number is used to accurately locate the target device where the user wants to store data. Generally speaking, there are multiple solid state drives in the system, and each hard drive has its own unique number. By obtaining the requested storage solid state drive number, the corresponding physical storage device can be quickly found to prepare for subsequent data writing. The data to be stored is the actual data content that the user wants to persist, which may be different types of files or data blocks such as documents, pictures, audio and video. Read these raw data from the request and temporarily store them in memory to facilitate subsequent analysis and calculation of the optimal storage distribution.
[0024] By responding to user requests and accurately obtaining key storage parameters, it provides the necessary input for the entire SSD data management process, which is the starting point for realizing intelligent storage management. At the same time, it ensures that the user's storage needs can be correctly understood and processed in a timely manner, improving the user experience.
[0025] S200: extracting the storage unit status according to the requested storage solid state drive number, and obtaining a storage unit idle bit number constraint interval list.
[0026] Specifically, after the target SSD to be stored is determined, the storage unit status record table of the SSD is accessed according to the SSD number of the requested storage. The storage unit status record table maintains information on the used storage space and remaining available storage space of each storage unit in the current SSD.
[0027] By analyzing the storage unit status record table, the number of idle bits in each storage unit is known. The idle bit number refers to the number of bits in the storage unit that have not been written to data and can be used for new data storage. The idle bit number information of all storage units is extracted from the storage unit status record table. In order to better describe the actual available space range of the storage unit, the concept of storage unit idle bit number constraint interval is introduced. According to the extracted idle bit number information, an idle bit number constraint interval is generated for each storage unit. Each constraint interval consists of the minimum idle bit number and the maximum idle bit number of the storage unit, which represents the upper and lower limits of the available storage space of the storage unit. The idle bit number constraint intervals of all storage units are summarized to generate a storage unit idle bit number constraint interval list. This list comprehensively reflects the current available space status of each storage unit in the target solid-state drive, and provides important parameters and constraints for the subsequent data storage solution analysis.
[0028] By extracting and analyzing the idle bit status of the storage unit, a list of storage unit idle bit constraint intervals is generated, laying the foundation for the execution of the subsequent steps of the data management method. This step fully considers the actual status of the internal storage unit of the solid-state drive and helps to achieve more refined and intelligent data storage management.
[0029] S300: Obtain the number of bits to be stored of the data to be stored, distribute the number of bits to be stored in a list of constraint intervals of idle number of bits of the storage unit, and obtain a first data storage scheme to an Nth data storage scheme.
[0030] Specifically, according to the number of bits of data to be stored and the list of constraint intervals of idle bits of storage cells, multiple feasible data storage schemes are generated to provide alternative schemes for subsequent threshold voltage equalization optimization.
[0031] First, the total number of bits of data to be stored, that is, the number of bits to be stored, is obtained. The number of bits to be stored is determined by analyzing the size and type of the data to be stored. For example, for a 100MB file, the number of bits to be stored is approximately 8×1024×1024×100 binary bits. Next, according to the generated list of idle bit constraint intervals of the storage unit, the number of bits to be stored is allocated to each storage unit. This process needs to follow the following principles: the number of bits of data allocated to each storage unit cannot exceed the upper limit of its idle bit constraint interval, and the sum of the number of bits of data allocated to all storage units must be equal to the number of bits to be stored. In order to explore different data allocation methods, an exhaustive method is used to generate multiple different data storage schemes while meeting the above principles. Each scheme represents a feasible data allocation strategy, that is, how to write various parts of the data to be stored into different storage units.
[0032] For example, assuming that the number of bits to be stored is 1000, and there are three storage units whose idle bit constraint intervals are [100, 500], [200, 600], and [300, 800] respectively. Then there are many possible data storage schemes, for example, Scheme 1: 300 bits are allocated to storage unit 1, 400 bits are allocated to storage unit 2, and 300 bits are allocated to storage unit 3; Scheme 2: 200 bits are allocated to storage unit 1, 500 bits are allocated to storage unit 2, and 300 bits are allocated to storage unit 3; Scheme 3: 100 bits are allocated to storage unit 1, 600 bits are allocated to storage unit 2, and 300 bits are allocated to storage unit 3, etc. These different data storage schemes are generated in sequence until all possible allocation strategies are exhausted or the preset upper limit of the number of schemes is reached. At the same time, the first data storage scheme generated is named the first data storage scheme, the last scheme is named the Nth data storage scheme, and the intermediate schemes are numbered in sequence to obtain the first data storage scheme to the Nth data storage scheme, providing a rich selection space for the threshold voltage equalization optimization in the subsequent steps.
[0033] By generating multiple possible data storage schemes based on the number of bits of data to be stored and the list of idle bits of storage cells, these schemes cover different data allocation strategies and lay the foundation for achieving threshold voltage balancing and storage performance optimization.
[0034] S400: Perform threshold voltage equalization optimization analysis based on the first data storage scheme to the Nth data storage scheme to obtain a target data storage scheme.
[0035] Specifically, after obtaining the first data storage scheme to the Nth data storage scheme, threshold voltage equalization optimization analysis is performed on these data storage schemes to select the optimal target data storage scheme.
[0036] Threshold voltage is an important indicator for measuring the storage performance of a storage unit. Generally speaking, the more threshold voltages there are, the lower the read and write efficiency of the storage unit. In order to improve the overall storage performance of the solid-state drive, it is necessary to balance the threshold voltages of each storage unit as much as possible to make them as close as possible. First, the corresponding threshold voltage is calculated based on the number of data bits allocated to each storage unit in the data storage scheme. In different storage technologies, the relationship between the threshold voltage and the number of data bits of the storage unit is different. For example, in SLC storage, the threshold voltage is usually equal to the power of 2; in high-density storage such as MLC, TLC, and QLC, the relationship between the threshold voltage and the number of data bits presents a more complex nonlinear characteristic, which needs to be calculated according to specific threshold voltage mapping rules.
[0037] Next, for each scheme from the first data storage scheme to the Nth data storage scheme, the balance of the number of threshold voltages is evaluated. Among them, the threshold voltage balance is introduced as a measurement index. The higher the threshold voltage balance, the closer the number of threshold voltages of each storage unit in the scheme is, and the better the storage performance is. For example, the threshold voltage balance is quantified by the mean square error calculation method. Specifically, the average value of the number of threshold voltages of all storage units in each scheme is first calculated, and then the difference between the number of threshold voltages of each storage unit and the average value is calculated, and then the squares of all differences are summed, and finally divided by the number of storage units. The result is the threshold voltage balance of the scheme. Through the above calculation, the threshold voltage balance of the first data storage scheme to the Nth data storage scheme is obtained. The smaller the threshold voltage balance, the more uniform the threshold voltage distribution of the scheme, and the better the storage performance. After that, the threshold voltage balance of all data storage schemes is compared, and the scheme with the smallest threshold voltage balance is selected as the optimal target data storage scheme. This target data storage scheme achieves the best balance of the number of threshold voltages of each storage unit under the premise of ensuring complete data storage, and can maximize the read and write efficiency and service life of the solid state drive.
[0038] By introducing the threshold voltage balance index, multiple data storage schemes are optimized, analyzed and compared to obtain the target data storage scheme with the most balanced threshold voltage distribution and the best storage performance, laying the foundation for subsequent data writing.
[0039] S500: Perform data management of the data to be stored according to the target data storage solution.
[0040] Specifically, first, the data allocation information of each storage unit is extracted from the target data storage scheme to determine which specific storage units each part of the data to be stored will be written into. This process needs to strictly follow the allocation result of the target data storage scheme to ensure that the data is written accurately to the specified storage unit. Next, the data to be stored is divided into multiple data segments according to the requirements of the target data storage scheme. The size of each data segment matches the number of allocated data bits of its corresponding target storage unit. After the data division is completed, each data segment is written to the corresponding target storage unit in the order and position specified by the target data storage scheme. This writing process is completed by calling the underlying read-write interface or controller of the solid-state drive. During the writing process, the actual amount of written data for each storage unit is strictly controlled to ensure that it is completely consistent with the allocation result of the target data storage scheme, and there will be no data overflow or insufficient situation. After all data segments are written, the writing results are verified and confirmed. This is achieved by reading the written data and comparing it with the original data to be stored. If the verification result shows that the data writing is completely correct, it can be considered that this data management operation is successfully completed; otherwise, subsequent operations such as error handling and retry are required.
[0041] By optimizing and managing the entire process of SSD data storage, the physical characteristics and threshold voltage distribution of SSD storage units are fully considered, the data storage scheme is optimized, the threshold voltage quantity is balanced, and the read and write efficiency of SSD is improved.
[0042] Furthermore, the embodiment of the present application also includes:
[0043] S210: storing the solid state hard disk serial number according to the request, extracting the number of bits stored in the first storage unit and the rated value of the number of bits stored in the first storage unit;
[0044] S220: constructing a constraint interval of the number of idle bits of the first storage unit by taking the number of bits stored in the first storage unit as the lower limit of the interval and the rated number of bits stored in the first storage unit as the upper limit of the interval;
[0045] S230: Add the first storage unit idle bit number constraint interval into the storage unit idle bit number constraint interval list.
[0046] In a feasible implementation, when extracting the storage unit status according to the requested storage solid state drive number and obtaining the storage unit idle bit constraint interval list, first, according to the requested storage solid state drive number, extract the number of bits stored in the first storage unit and the rated value of the first storage unit storage bit. Wherein, the first storage unit refers to any storage unit in the requested storage solid state drive; the number of bits stored in the first storage unit indicates the number of data bits currently written to the first storage unit, which is obtained by reading the status information of the storage unit; the rated value of the first storage unit storage bit indicates the maximum number of data bits that can be stored in the first storage unit during design and production, which is a predetermined fixed value. Then, with the number of bits stored in the first storage unit as the lower limit of the interval and the rated value of the first storage unit storage bit as the upper limit of the interval, the idle bit constraint interval of the first storage unit is constructed to accurately reflect the constraint interval of the current free storage space of the first storage unit. The idle bit constraint interval of the first storage unit indicates the range of data bits that can still be written to the first storage unit. Its lower limit is equal to the number of bits stored, because the newly written data can only be appended after the stored data; its upper limit is equal to the rated value of the storage bit, because the total storage capacity of the storage unit cannot exceed the maximum value specified by the design. Subsequently, the constructed idle bit constraint interval of the first storage unit is added to the storage unit idle bit constraint interval list. The storage unit idle bit constraint interval list is a data structure for summarizing the idle bit constraint intervals of all storage units. By continuously adding the constraint intervals of each storage unit, a complete list of idle bit constraint information covering all storage units is formed, providing important basis and constraint conditions for subsequent data storage solution analysis.
[0047] By extracting and constructing the list of storage unit idle bit constraints according to the requested storage SSD number, the state information and design parameters of the SSD storage unit are fully utilized. By calculating the idle bit range of each storage unit, a solid foundation is laid for subsequent data storage optimization. At the same time, by introducing the data structure of the storage unit idle bit constraint interval list, the storage resource allocation inside the SSD can be fully grasped, which provides the possibility of realizing the global optimal data storage strategy.
[0048] Furthermore, the embodiment of the present application also includes:
[0049] S310: traverse the storage unit idle bit number constraint interval list to extract the storage unit idle bit number list;
[0050] S320: Construct storage distribution convergence equation:
[0051] ,
[0052] in, Represents the number of bits to be stored, Characterizes the number of bits distributed in the i-th storage unit, Characterizes the total number of storage cells that distribute the number of bits to be stored, Represents the number of idle bits in the i-th storage unit;
[0053] S330: distributing the number of bits to be stored in the list of constraint intervals of idle number of bits in the storage unit, converging when the storage distribution convergence equation is satisfied, and outputting the first data storage solution;
[0054] S340: until the data storage solutions generated for a preset number of consecutive times are all generated storage solutions, output the Nth data storage solution.
[0055] In a feasible implementation, when obtaining the first data storage scheme to the Nth data storage scheme, first, traverse the storage unit idle bit constraint interval list to extract the storage unit idle bit list. The storage unit idle bit list is a data structure containing the current available storage bits of each storage unit. By traversing the storage unit idle bit constraint interval list, the lower limit and upper limit of the idle bit of each storage unit are obtained, and then its current available storage bits can be determined. The extracted storage unit idle bit list provides important constraints for subsequent data distribution optimization. Then, the storage distribution convergence equation is constructed as: This equation expresses the relationship between the number of bits of data to be stored and the number of bits of data allocated to each storage unit. Indicates the total number of bits of data to be stored, that is, the number of bits to be stored, Indicates the number of data bits allocated to the i-th storage unit, Indicates the total number of storage units involved in allocating storage data. represents the upper limit of the number of idle bits of the i-th storage unit. The physical meaning of the storage distribution convergence equation is that the sum of the number of data bits allocated to all storage units must be equal to the total number of data bits to be stored, and at the same time, the number of data bits allocated to each storage unit cannot exceed the upper limit of its idle bits. This equation provides the necessary constraints for optimizing data distribution.
[0056] Subsequently, the number of bits to be stored is distributed in the list of constraint intervals of idle bits of the storage unit, and converges when the storage distribution convergence equation is satisfied, and the first data storage solution is output. Specifically, according to the list of constraint intervals of idle bits of the storage unit and the storage distribution convergence equation, a feasible data distribution solution is calculated through a certain optimization strategy (such as a greedy algorithm, dynamic programming, etc.), that is, how to write various parts of the data to be stored into different storage units. When the obtained data distribution solution satisfies the storage distribution convergence equation, it is considered that the solution is feasible and is output as the first data storage solution. Repeat the execution until the data storage solutions generated for the preset number of consecutive times are all generated solutions, and the last new solution is output as the Nth data storage solution. Among them, the preset number of times is an empirical value used to control the balance between convergence speed and result quality. In the process of repeatedly executing the data storage solution generation, if the solutions generated for multiple consecutive times (preset number of times) are repeated with the previously generated solutions, it is considered that convergence has occurred and no new optimization solution can be found. At this time, the last new solution is output as the Nth data storage solution.
[0057] By generating multiple feasible data storage solutions based on the list of constraint intervals of idle bits in storage units and the storage distribution convergence equation, the actual available storage space of each storage unit and the total size of the data to be stored are fully considered, and the data storage problem is transformed into an optimization problem. At the same time, by introducing the preset number of times as the convergence judgment condition, the most optimized data storage solution can be found within a limited time, taking into account both computational efficiency and result quality. The multiple data storage solutions generated provide a rich candidate set for the subsequent threshold voltage equalization optimization, laying the foundation for realizing high-performance storage of solid-state drives.
[0058] Furthermore, the embodiment of the present application also includes:
[0059] S411: Construct threshold voltage balance equation:
[0060] ,
[0061] in, Characterizes the inverse of the number of threshold voltages of any memory cell in the kth data storage scheme, Characterizes the number of storage bits of any storage unit in the kth data storage scheme, The reciprocal of the threshold voltage quantity of any memory cell in any other data storage scheme except the kth data storage scheme, Characterizes the number of storage bits of any storage unit in any other data storage scheme except the kth data storage scheme, Characterize the maximum value of the reciprocal of the number of threshold voltages of any memory cell in data storage schemes other than the kth data storage scheme;
[0062] S412: When each storage unit satisfies the threshold voltage equalization equation in the kth data storage scheme, the kth data storage scheme is set as the target data storage scheme, wherein the kth data storage scheme belongs to any one of the first data storage scheme to the Nth data storage scheme.
[0063] In a preferred embodiment, in order to obtain a target data storage solution, first, a threshold voltage equalization equation is constructed as follows: This equation describes the relationship between the threshold voltages of any memory cell in different data storage schemes. represents the inverse of the number of threshold voltages of any memory cell in the kth data storage scheme, Indicates the number of bits stored in the storage unit in the kth data storage scheme; It represents the reciprocal of the number of threshold voltages of the same memory cell in any other data storage scheme (jth scheme) except the kth scheme. Indicates the number of bits stored in the storage unit in the jth solution; Indicates the maximum value of the reciprocal of the number of threshold voltages of the storage unit in all schemes except the kth scheme. The physical meaning of the threshold voltage balance equation is that for any storage unit, the reciprocal of its number of threshold voltages in the kth data storage scheme should be greater than or equal to the maximum value of the reciprocal of its number of threshold voltages in all other schemes. Since the number of threshold voltages is inversely proportional to the storage performance, the larger the reciprocal of the number of threshold voltages, the smaller the number of threshold voltages and the better the storage performance. Therefore, when the reciprocal of the number of threshold voltages of a storage unit in the kth scheme is greater than or equal to its maximum value in all other schemes, it means that the number of threshold voltages of the storage unit in the kth scheme is the smallest and the storage performance is optimal. When all storage units meet this condition in the kth scheme, it is considered that the kth scheme is the optimal (most balanced) scheme for the number of threshold voltages of the entire solid-state drive.
[0064] Then, it is determined whether each storage unit satisfies the threshold voltage balance equation in the kth data storage scheme. If all storage units satisfy the threshold voltage balance equation, the kth data storage scheme is set as the target data storage scheme as the scheme used for subsequent actual data writing. The kth data storage scheme can be any one of the first data storage scheme to the Nth data storage scheme, as long as the threshold voltage balance equation of all storage units is satisfied.
[0065] By selecting the target data storage scheme with the most balanced number of threshold voltages from multiple candidate data storage schemes, the number of threshold voltages of all storage cells is made as balanced as possible, thereby minimizing the read and write delays and energy consumption of the solid-state drive and improving its overall storage performance and reliability.
[0066] Furthermore, the embodiment of the present application also includes:
[0067] S421: Construct sorting evaluation function:
[0068] ,
[0069] in, Characterizes the lth data storage scheme, 1≤l≤N, l is an integer, Characterizes the sorting reference number of the lth data storage scheme, represents the storage number of the zth storage unit of the lth data storage scheme, H represents the total number of storage units of the lth data storage scheme, A number of zth memory cell threshold voltages characterizing a lth data storage scheme;
[0070] S422: According to the sorting evaluation function, traverse the first data storage scheme until the Nth data storage scheme is processed, and obtain the sorting reference number of the first storage scheme until the Nth storage scheme sorting reference number;
[0071] S423: Sort the first data storage schemes to the Nth data storage schemes from small to large according to the first storage scheme sorting reference number to the Nth storage scheme sorting reference number, to obtain a data storage scheme sorting result;
[0072] S424: According to the data storage scheme sorting result, threshold voltage balancing optimization analysis is performed on the first data storage scheme to the Nth data storage scheme to obtain the target data storage scheme.
[0073] In a preferred embodiment, before performing threshold voltage equalization optimization analysis on the first data storage scheme to the Nth data storage scheme, candidate data storage schemes are ranked in advance to further improve the efficiency and accuracy of threshold voltage equalization optimization.
[0074] First, construct the sorting evaluation function: This function is used to evaluate the quality of the lth data storage scheme, where l is an integer between 1 and N. The ranking evaluation function is defined as the sum of the number of threshold voltages of all storage cells in the lth data storage scheme. represents the lth data storage scheme, represents the number of bits stored in the zth storage unit in the lth data storage scheme, H represents the total number of storage units in the lth data storage scheme, Represents the number of threshold voltages of the zth storage unit in the lth data storage scheme. Since the number of threshold voltages is inversely proportional to the storage performance, the smaller the value of the ranking evaluation function, the smaller the overall number of threshold voltages of the data storage scheme, and the better the storage performance. Then, according to the ranking evaluation function, the first data storage scheme is traversed until the Nth data storage scheme is processed, and the ranking reference number of each scheme is calculated. Specifically, for the lth data storage scheme, it is substituted into the ranking evaluation function, and its ranking reference number is calculated, that is, the first storage scheme ranking reference number. By traversing all N data storage schemes, the first storage scheme ranking reference number is obtained until the Nth storage scheme ranking reference number.
[0075] Subsequently, the first data storage scheme to the Nth data storage scheme are sorted according to the sizes of the sorting reference numbers of the first storage scheme to the sorting reference numbers of the Nth storage scheme. Specifically, all data storage schemes are arranged in ascending order according to their sorting reference numbers to obtain the data storage scheme sorting results. The scheme with the smallest sorting reference number is considered to be the scheme with the smallest number of threshold voltages and the best storage performance, and is ranked at the front; the scheme with the largest sorting reference number is considered to be the scheme with the largest number of threshold voltages and the worst storage performance, and is ranked at the back. Afterwards, according to the data storage scheme sorting results, the threshold voltage balance optimization analysis is performed on the first data storage scheme to the Nth data storage scheme to obtain the target data storage scheme. Specifically, starting from the front of the data storage scheme sorting results, each data storage scheme is checked one by one to see if it satisfies the threshold voltage balance equation. Find the first scheme that satisfies the equation, set it as the target data storage scheme, and use it as the scheme to be used for subsequent actual data writing.
[0076] By pre-ranking the candidate data storage solutions, in the subsequent threshold voltage equalization optimization analysis, the solutions with smaller ranking reference numbers are checked first, thereby improving the pertinence and efficiency of the optimization analysis.
[0077] Furthermore, the embodiment of the present application also includes:
[0078] S430: When the first data storage scheme to the Nth data storage scheme do not satisfy the threshold voltage balance equation, the first data storage scheme to the Nth data storage scheme are updated according to the constraint interval list of the number of bits to be stored and the number of idle bits of the storage unit, and then a loop analysis is performed.
[0079] Specifically, in the process of performing threshold voltage balancing optimization analysis on the first data storage scheme to the Nth data storage scheme, if it is found that all data storage schemes do not satisfy the threshold voltage balancing equation, these data storage schemes are dynamically updated, and then the threshold voltage balancing optimization analysis is performed again until a target data storage scheme that meets the requirements is found.
[0080] First, determine whether the first data storage scheme to the Nth data storage scheme does not satisfy the threshold voltage balance equation. If so, it means that the current data storage scheme cannot provide an optimal solution to achieve threshold voltage balance, and these schemes need to be updated. The basis for the update is the number of bits of data to be stored and the list of constraint intervals of the number of idle bits of storage units. Among them, the number of bits to be stored represents the total amount of data to be written to the solid-state hard disk, and the list of constraint intervals of the number of idle bits of storage units describes the current range of free storage space of each storage unit. By comprehensively considering these two factors, the existing data storage scheme is adjusted to balance the number of threshold voltages of each storage unit as much as possible under the premise of meeting the total amount of data storage requirements. Among them, there can be multiple specific strategies for adjustment, for example, within the range allowed by the idle bit constraint, appropriately increase the number of storage bits of storage units with a high threshold voltage number, and reduce the number of storage bits of storage units with a low threshold voltage number; or exchange and reorganize storage units between different data storage schemes so that the difference in the number of threshold voltages in each scheme is as small as possible. Through these adjustments, a new data storage scheme can be obtained, which is recorded as the updated first data storage scheme to the Nth data storage scheme. After obtaining the updated data storage solution, the threshold voltage balance optimization analysis is performed on the updated data storage solution again to find the target data storage solution that meets the threshold voltage balance equation. If found, the optimization analysis is successful and the target solution is directly output; if still not found, the data storage solution is updated again and then the optimization analysis is performed again. This process will continue until a target solution that meets the conditions is found or the preset upper limit of the number of cycles is reached.
[0081] By dynamically updating all data storage solutions when none of the first data storage solutions until the Nth data storage solution satisfies the threshold voltage equalization equation, the threshold voltage equalization optimization analysis can be performed in a larger solution search space, thereby improving the success rate of finding the optimal target solution. At the same time, through the strategy of cyclic analysis, all possible data storage solutions are explored as much as possible under the premise of ensuring the convergence of the optimization analysis, thereby improving the adaptability and robustness of the entire solid state drive data management method.
[0082] Furthermore, the embodiment of the present application also includes:
[0083] When the first data storage scheme to the Nth data storage scheme do not satisfy the threshold voltage equalization equation:
[0084] S431: from the first data storage scheme to the Nth data storage scheme, extract the first sequence number storage scheme, the second sequence number storage scheme and the third sequence number storage scheme from the beginning to the end according to the data storage scheme sorting result, and set them as static group storage schemes;
[0085] S432: extracting at least five storage solutions from the first data storage solution to the Nth data storage solution from the end to the beginning according to the data storage solution sorting result, and setting them as dynamic group storage solutions;
[0086] S433: Constructing a storage scheme distance evaluation function;
[0087] S434: Based on the list of constraint intervals of the number of bits to be stored and the number of idle bits in the storage unit, with the static group storage scheme as the target, the dynamic group storage scheme is adjusted to reduce the distance through the storage scheme distance evaluation function to obtain a data storage scheme update result, wherein the data storage scheme update result has a first storage scheme distance with the static group storage scheme, the dynamic group storage scheme has a second storage scheme distance with the static group storage scheme, and the first storage scheme distance is smaller than the second storage scheme distance.
[0088] In a preferred embodiment, when the first data storage scheme to the Nth data storage scheme do not satisfy the threshold voltage balance equation, the data storage scheme is updated more finely and efficiently by introducing a storage scheme distance evaluation function and a static / dynamic grouping strategy, so as to obtain a better data storage scheme that satisfies the threshold voltage balance equation as soon as possible.
[0089] First, from the first data storage scheme to the Nth data storage scheme, according to the sorting results of the data storage schemes, the three data storage schemes ranked first, second, and third are extracted in order from good to bad, and set as static group storage schemes. These three schemes are the schemes with the smallest number of threshold voltages and the best storage performance among the current multiple data storage schemes, and the distribution of the threshold voltage of the storage unit can be used as a reference target for updating and optimizing other schemes. At the same time, from the first data storage scheme to the Nth data storage scheme, according to the sorting results of the data storage schemes, at least five data storage schemes are extracted in order from bad to good, and set as dynamic group storage schemes. These schemes are the schemes with a relatively large number of threshold voltages and relatively poor storage performance among the current multiple data storage schemes, and there is still a large room for optimization and adjustment of the distribution of the threshold voltage of the storage unit.
[0090] Subsequently, a storage scheme distance evaluation function is constructed to measure the degree of difference in the storage cell threshold voltage distribution between two data storage schemes. Among them, the storage scheme distance evaluation function can be defined by a variety of mathematical models, such as Euclidean distance, Manhattan distance, cosine similarity, etc. The smaller the value of the storage scheme distance evaluation function, the closer the storage cell threshold voltage distribution of the two data storage schemes is, and the closer the storage performance is. Afterwards, taking the static group storage scheme as the optimization target and the dynamic group storage scheme as the optimization object, under the constraints of the list of constraint intervals of the number of bits to be stored and the number of idle bits of the storage cell, the storage scheme distance evaluation function is used to adjust the storage cell threshold voltage distribution of the dynamic group storage scheme to make it as close to the static group storage scheme as possible, thereby obtaining a set of updated and optimized new data storage schemes as the data storage scheme update result. Among them, the distance evaluation function value between the updated data storage scheme and the static group storage scheme (first storage scheme distance) is smaller than the distance evaluation function value between the dynamic group storage scheme and the static group storage scheme before the update (second storage scheme distance), which means that the updated data storage scheme is closer to the high-quality static group storage scheme in threshold voltage distribution, so its storage performance is improved and enhanced.
[0091] By introducing static / dynamic grouping and storage scheme distance evaluation mechanism in the data storage scheme update link, full use is made of the prior information of existing high-quality data storage schemes, and targeted optimization and adjustment are made to the schemes with a large number of threshold voltages. On the premise of ensuring the feasibility and effectiveness of the updated scheme, the gap between the high-quality scheme and the scheme to be optimized is narrowed as quickly as possible, thereby significantly improving the efficiency and accuracy of the data storage scheme update and accelerating the convergence speed of the entire threshold voltage balance optimization analysis.
[0092] Furthermore, the storage scheme distance evaluation function is:
[0093] ,
[0094] ,
[0095] ,
[0096] in, Characterizing a sequence of threshold voltage quantities of the first storage scheme, Characterizing the second storage scheme threshold voltage quantity sequence, The result of arranging the threshold voltage quantities of S storage cells from small to large, representing the threshold voltage quantity sequence of the first storage scheme, The result of arranging the threshold voltage numbers of P storage cells from small to large, representing the threshold voltage number sequence of the first storage scheme, P ≥ S, A distance evaluation value characterizing the first storage solution and the second storage solution.
[0097] In a preferred embodiment, when constructing the storage scheme distance evaluation function, the threshold voltage quantity sequence of the first data storage scheme is assumed to be , which contains the number of threshold voltages of S memory cells, arranged in ascending order, and is expressed as: . Let the threshold voltage sequence of the second data storage scheme be , which contains the number of threshold voltages of P memory cells, is also arranged in ascending order, expressed as:
[0098] Then, the storage scheme distance evaluation function for evaluating the two storage schemes is constructed as
[0099] Its physical meaning is that and For the first S corresponding memory cells in , calculate the square of the difference in the number of threshold voltages between these memory cells, and then sum them up; For the remaining PS memory cells in the storage system, the sum of the squares of the threshold voltages of these memory cells is directly calculated. Finally, the results of the above two parts are squared to obtain the distance evaluation value between the first storage scheme and the second storage scheme.
[0100] The constructed storage scheme distance evaluation function comprehensively considers the overall difference in the threshold voltage quantity distribution of the two data storage schemes, as well as the mismatch in the number of storage units. It accumulates local differences by summing squares, and obtains the global distance by square root operation, which can comprehensively and accurately measure the similarity between the two data storage schemes. The smaller the distance evaluation value, the closer the threshold voltage quantity distribution of the two data storage schemes is, and the closer the storage performance is; conversely, the larger the distance evaluation value, the greater the difference in the threshold voltage quantity distribution of the two data storage schemes is, and the more obvious the gap in storage performance is.
[0101] By taking the threshold voltage quantity distribution as the core and designing a mathematical model that takes into account both local differences and global distances, a powerful tool is provided for accurately evaluating the similarity of data storage solutions, providing support for further improving the intelligent level of solid-state drive data management.
[0102] A data management method for a solid state drive provided by an embodiment of the present invention has at least the following technical effects:
[0103] In response to the data storage request of the user end, the requested storage solid state hard disk number and the data to be stored are obtained, and necessary information is provided for the subsequent. According to the requested storage solid state hard disk number, the storage unit state is extracted, and the list of constraint intervals of the idle bits of the storage unit is obtained, and the information required for optimizing the data storage scheme is obtained, which provides a basis for subsequent data allocation. By considering the actual state of the storage unit, the storage space can be used more reasonably and efficiently. The number of bits to be stored for the data to be stored is obtained, and the number of bits to be stored is distributed in the list of constraint intervals of the idle bits of the storage unit, and the first data storage scheme until the Nth data storage scheme is obtained. On the basis of fully considering the actual state of the storage unit, multiple data storage schemes are obtained, and candidates are provided for subsequent optimization selection. Based on the first data storage scheme until the Nth data storage scheme, threshold voltage balance optimization analysis is performed to obtain the target data storage scheme, and the threshold voltage distribution is optimized to minimize the number of threshold voltages, thereby improving the read and write efficiency of the solid state hard disk. Data management of the data to be stored is performed according to the target data storage scheme, and the optimized data storage scheme is executed to achieve efficient and balanced data storage, thereby reducing the number of storage unit threshold voltages and improving the read and write efficiency of the solid state hard disk.
[0104] Embodiment 2:
[0105] See also Figure 2 , Figure 2 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 2 As shown, an electronic device 100 provided by an embodiment of the present invention includes a memory 110, a processor 120, and a first computer program 111 stored in the memory 110 and executable on the processor 120. When the processor 120 executes the first computer program 111, a data management method for a solid state hard disk is implemented.
[0106] Embodiment three:
[0107] See also Figure 3 , Figure 3 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. Figure 3 As shown, this embodiment provides a computer-readable storage medium 200 on which a second computer program 211 is stored. When the second computer program 211 is executed by a processor, a data management method for a solid state drive is implemented.
[0108] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0109] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0113] Although preferred embodiments of the present invention have been described, additional changes and modifications may occur to these embodiments once those skilled in the art understand the basic inventive concepts.
[0114] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the present invention and its equivalent technologies, the present invention is also intended to include these changes and variations.
Claims
1. A data management method for a solid state drive, characterized in that: include: In response to a data storage request from a user, obtaining a solid state drive number and data to be stored; Extract the storage unit status according to the requested storage solid state hard disk number, and obtain a storage unit idle bit constraint interval list; Obtain the number of bits to be stored of the data to be stored, distribute the number of bits to be stored in the list of constraint intervals of idle bits of the storage unit, and obtain a first data storage scheme to an Nth data storage scheme; Perform threshold voltage balancing optimization analysis based on the first data storage scheme to the Nth data storage scheme to obtain a target data storage scheme; Performing data management of the data to be stored according to the target data storage solution; The method of obtaining the number of bits to be stored of the data to be stored, distributing the number of bits to be stored in the list of idle bit constraints of the storage unit, and obtaining the first data storage scheme to the Nth data storage scheme includes: Traversing the storage unit idle bit number constraint interval list, extracting the storage unit idle bit number list; Construct the storage distribution convergence equation: , in, Represents the number of bits to be stored, Characterizes the number of bits distributed in the i-th storage unit, Characterizes the total number of storage cells that distribute the number of bits to be stored, Represents the number of idle bits in the i-th storage unit; Distribute the number of bits to be stored in the list of constraint intervals of idle number of bits in the storage unit, converge when the storage distribution convergence equation is satisfied, and output the first data storage solution; until the data storage solutions generated for a preset number of consecutive times are all generated storage solutions, outputting the Nth data storage solution; The step of performing threshold voltage equalization optimization analysis based on the first data storage scheme to the Nth data storage scheme to obtain a target data storage scheme includes: Construct the threshold voltage balance equation: , in, Characterizes the inverse of the number of threshold voltages of any memory cell in the kth data storage scheme, Characterizes the number of storage bits of any storage unit in the kth data storage scheme, The reciprocal of the threshold voltage quantity of any memory cell in any other data storage scheme except the kth data storage scheme, Characterizes the number of storage bits of any storage unit in any other data storage scheme except the kth data storage scheme, A maximum value representing the reciprocal of the number of threshold voltages of any memory cell in other data storage schemes except the kth data storage scheme; When each storage unit satisfies the threshold voltage equalization equation in the kth data storage scheme, the kth data storage scheme is set as the target data storage scheme, wherein the kth data storage scheme belongs to any one of the first data storage scheme to the Nth data storage scheme.
2. The method according to claim 1, characterized in that The storage unit state is extracted according to the requested storage solid state hard disk number to obtain a storage unit idle bit constraint interval list, including: According to the request to store the solid state drive number, extract the number of bits stored in the first storage unit and the rated value of the number of bits stored in the first storage unit; Taking the number of bits stored in the first storage unit as the lower limit of the interval and the rated number of bits stored in the first storage unit as the upper limit of the interval, constructing a constraint interval of the number of idle bits in the first storage unit; Add the first storage unit idle bit number constraint interval into the storage unit idle bit number constraint interval list.
3. The method according to claim 1, characterized in that The method further includes performing threshold voltage equalization optimization analysis based on the first data storage scheme to the Nth data storage scheme to obtain a target data storage scheme. Construct a sorting evaluation function: , in, Characterizes the lth data storage scheme, 1≤l≤N, l is an integer, Characterizes the sorting reference number of the lth data storage scheme, represents the storage number of the zth storage unit of the lth data storage scheme, H represents the total number of storage units of the lth data storage scheme, A number of zth memory cell threshold voltages characterizing a lth data storage scheme; According to the sorting evaluation function, traverse the first data storage scheme until the Nth data storage scheme is processed, and obtain the sorting reference number of the first storage scheme until the Nth storage scheme sorting reference number; According to the first storage scheme sorting reference number until the Nth storage scheme sorting reference number, the first data storage scheme until the Nth data storage scheme is sorted from small to large to obtain a data storage scheme sorting result; According to the data storage scheme sorting result, threshold voltage balancing optimization analysis is performed on the first data storage scheme to the Nth data storage scheme to obtain the target data storage scheme.
4. The method according to claim 3, characterized in that Also includes: When the first data storage scheme to the Nth data storage scheme do not satisfy the threshold voltage balance equation, the first data storage scheme to the Nth data storage scheme are updated according to the constraint interval list of the number of bits to be stored and the number of idle bits of the storage unit, and then a loop analysis is performed.
5. The method according to claim 4, characterized in that When the first data storage scheme to the Nth data storage scheme do not satisfy the threshold voltage balance equation, updating the first data storage scheme to the Nth data storage scheme according to the number of bits to be stored and the list of constraint intervals of the number of idle bits of the storage unit includes: When the first data storage scheme to the Nth data storage scheme do not satisfy the threshold voltage equalization equation: From the first data storage scheme to the Nth data storage scheme, extract the first sequence number storage scheme, the second sequence number storage scheme and the third sequence number storage scheme from the beginning to the end according to the data storage scheme sorting result, and set them as static group storage schemes; From the first data storage scheme to the Nth data storage scheme, at least five storage schemes are extracted from the last to the first according to the sorting result of the data storage schemes, and are set as dynamic group storage schemes; Construct a storage scheme distance evaluation function; Based on the list of constraint intervals of the number of bits to be stored and the number of idle bits in the storage unit, taking the static group storage scheme as the target, the dynamic group storage scheme is adjusted to reduce the distance through the storage scheme distance evaluation function to obtain a data storage scheme update result, wherein the data storage scheme update result has a first storage scheme distance with the static group storage scheme, the dynamic group storage scheme has a second storage scheme distance with the static group storage scheme, and the first storage scheme distance is smaller than the second storage scheme distance.
6. The method according to claim 5, characterized in that The storage scheme distance evaluation function is: , , , in, Characterizing a sequence of threshold voltage quantities of the first storage scheme, Characterizing the second storage scheme threshold voltage quantity sequence, The result of arranging the threshold voltage quantities of S storage cells from small to large, representing the threshold voltage quantity sequence of the first storage scheme, The result of arranging the threshold voltage numbers of P storage cells from small to large, representing the threshold voltage number sequence of the first storage scheme, P ≥ S, A distance evaluation value characterizing the first storage solution and the second storage solution.
7. An electronic device, characterized in that: include: Memory for storing computer software programs; A processor is used to read and execute the computer software program, thereby implementing the data management method for a solid state hard disk as described in any one of claims 1-6.
8. A non-transitory computer-readable storage medium, characterized in that: The storage medium stores a computer software program, and when the computer software program is executed by the processor, the data management method for a solid state hard disk as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data storage method and device of solid state disk
CN111813336A
Load collaborative scheduling method and system for solid state disk
CN119292541A