CN114791888B - State mapping processing method and device, medium and SSD device - Google Patents

State mapping processing method and device, medium and SSD device Download PDF

Info

Publication number
CN114791888B
CN114791888B CN202210709306.9A CN202210709306A CN114791888B CN 114791888 B CN114791888 B CN 114791888B CN 202210709306 A CN202210709306 A CN 202210709306A CN 114791888 B CN114791888 B CN 114791888B
Authority
CN
China
Prior art keywords
data
state
storage
mapping table
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210709306.9A
Other languages
Chinese (zh)
Other versions
CN114791888A (en
Inventor
秦东润
刘晓健
王嵩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dera Technology Co Ltd
Original Assignee
Beijing Dera Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dera Technology Co Ltd filed Critical Beijing Dera Technology Co Ltd
Priority to CN202210709306.9A priority Critical patent/CN114791888B/en
Publication of CN114791888A publication Critical patent/CN114791888A/en
Application granted granted Critical
Publication of CN114791888B publication Critical patent/CN114791888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention relates to a state mapping processing method and device, a medium and SSD equipment, wherein the method comprises the following steps: grouping data to be processed according to the type of the data unit to obtain a plurality of data groups; counting the number of each data state in the plurality of data groups, and sequencing the data states according to a first sequence direction of the number to obtain a data state sequence; sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table; acquiring a Gray code mapping table adopted by the storage particles; and generating a second state mapping table according to the first state mapping table and the Gray code mapping table. The invention can reduce the bit error rate of the whole data.

Description

State mapping processing method and device, medium and SSD device
Technical Field
The present invention relates to the field of data mapping technologies, and in particular, to a state mapping processing method and apparatus, a medium, and an SSD device.
Background
With the increasing global level of internet, the global demand for data storage is also increasing. The mainstream storage devices of current computer servers are mainly divided into two types: mechanical Hard disks (Hard Disk, abbreviated as HD) and Solid State Disks (SSD). Solid state disks and mechanical hard disks are hardware for data storage, and differ essentially in their storage media. The conventional mechanical hard disk uses a mechanical magnetic disk as a storage medium, and data storage and reading are performed through a mechanical structure between a magnetic arm and a magnetic head and between the magnetic disk and the magnetic head. In the solid state disk, a NAND flash memory (i.e., a nonvolatile memory) is used as a storage medium, and data is read and written by the number of charges in the memory, that is, the number of on/off states in memory particles, thereby realizing data storage. Due to the performance bottleneck of the mechanical structure, the reading performance of most mechanical hard disks is poorer than that of solid state hard disks. With the miniaturization and the continuous improvement of cost performance of the solid state disk, more and more enterprise consumers and personal consumers adopt the solid state disk to store data.
NAND particles are often used for storage in current SSD memories, and the NAND particles can be classified into four types, namely SLC (i.e. 1bit can be stored in one storage particle), MLC (i.e. 2bits can be stored in one storage particle), TLC (i.e. 3bits can be stored in one storage particle), and QLC (i.e. 4 bits can be stored in one storage particle), according to the number of bits that each storage particle can store in the NAND particles.
The NAND particles represent the memory state by a voltage, and are affected by residence (i.e., retention) and read disturb (read disturb), and the memory voltage has a voltage drift during the process of storing data, thereby causing an increase in bit error rate. Further, the respective memory states of the NAND particles slightly differ in the degree of voltage drift in the above process. For TLC, for example, the memory state P7 is more susceptible to retention and the memory states P0/P1 are more susceptible to read disturb. Therefore, the misjudgment probabilities of the memory states in the memory grain are different, for example, the misjudgment probability of the memory state P7 is much larger than that of other states due to retention, and the misjudgment probability of the memory state P0/P1 is obviously improved due to the read disturb effect. Meanwhile, the misjudgment probabilities of the storage states of the storage particles of different storage particle manufacturers are different.
At present, when a data writing request of a host is acquired, original data is encoded and then directly stored in storage particles, and the storage particles are mapped by gray codes in the storage process. When a read data request of the host is acquired, the data in the memory granules are read out, decoded and then sent to the host. Referring to FIG. 1, there are 8 memory states P0-P7, for example, it can be seen from FIG. 1 that Gray code 011 corresponds to memory state P1, i.e., when the memory voltage is V 1 ~V 2 Within the range, the corresponding storage state is considered to be P1, and the storage particle will output Gray code 011.
In the prior art, a fixed mapping mode is often adopted when data is stored, so that the bit error rate is higher in certain scenes, and further, the calculation load of a decoder is large, and the read data delay is large. For example, in an extreme case, if the majority of the data is 110, a large amount of data would be stored to storage state P7 according to the prior art. Under the effect of the dwell time, the probability of misjudgment of the storage state P7 is gradually increased, thereby resulting in a high bit error rate.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the invention provides a state mapping processing method and device, a medium and an SSD device.
In a first aspect, an embodiment of the present invention provides a state mapping processing method, including:
grouping data to be processed according to the type of the data unit to obtain a plurality of data groups; wherein the number of bits contained in each data group matches the data unit type;
counting the number of each data state in the plurality of data groups, and sequencing the data states according to a first sequence direction of the number to obtain a data state sequence;
sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; wherein the number of storage states is equal to the number of data states, and the first sequential direction is opposite to the second sequential direction;
mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
acquiring a Gray code mapping table adopted by the storage particles; the gray code mapping table comprises mapping relations between each storage state and each gray code;
generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table includes mapping relationships between the data states and the gray codes.
In a second aspect, an embodiment of the present invention provides a state mapping processing apparatus, including:
the first grouping module is used for grouping the data to be processed according to the data unit type to obtain a plurality of data groups; wherein the number of bits contained in each data group matches the data unit type;
the first arrangement module is used for counting the number of each data state in the plurality of data groups and arranging the data states according to a first sequence direction of the number to obtain a data state sequence;
the second arrangement module is used for sequencing all storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; wherein the number of storage states is equal to the number of data states, and the first sequential direction is opposite to the second sequential direction;
the first mapping module is used for mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
a first obtaining module, configured to obtain a gray code mapping table used by the storage granule; the gray code mapping table comprises mapping relations between each storage state and each gray code;
the second mapping module is used for generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table includes mapping relationships between the data states and the gray codes.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method as provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides an SSD device, comprising a storage controller, the storage controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect when executing the computer program.
The state mapping processing method, the state mapping processing device, the medium and the SSD provided by the embodiment of the invention firstly group data to be processed according to data unit types to obtain a plurality of data groups, count the number of each data state in the plurality of data groups, and sort the data states according to a first sequence direction of the number to obtain a data state sequence; sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; and mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table. And then obtaining a Gray code mapping table adopted by the storage particles, and generating a second state mapping table according to the first state mapping table and the Gray code mapping table. It can be seen that, since the first sequence direction is opposite to the second sequence direction, the storage state with the lowest misjudgment probability corresponds to the data state with the highest number in the first state mapping table, and the storage state with the highest misjudgment probability corresponds to the data state with the lowest number, so that the gray codes corresponding to the data states with a larger number can be stored in the storage state with a lower misjudgment probability, and the gray codes corresponding to the data states with a smaller number are stored in the storage state with a higher misjudgment probability, which can reduce the bit error rate of the whole data compared with the fixed mapping method in the prior art, thereby reducing the error correction load of the decoder, and shortening the data reading delay.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram illustrating a mapping among a storage state, a Gray code, and a storage voltage according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a state mapping processing method according to an embodiment of the invention;
FIG. 3 is a flow chart illustrating a data writing process based on state mapping according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of data writing and data reading based on state mapping in one embodiment of the present invention;
FIG. 5 is a flow diagram of a data patrol process based on state mapping in one embodiment of the present invention;
FIG. 6 is a comparison of the probability of false positives for various memory states in one embodiment of the invention;
FIG. 7 is a graph illustrating bit error rates produced by embodiments of the present invention compared to prior art techniques for different types of data;
fig. 8 is a block diagram of a state mapping processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In a first aspect, an embodiment of the present invention provides a state mapping processing method.
Referring to fig. 2, the method provided by the embodiment of the invention may include steps S110 to S160:
s110, grouping data to be processed according to the types of the data units to obtain a plurality of data groups; wherein the number of bits contained in each data group matches the data unit type;
it can be understood that the mapping processing method provided by the embodiment of the present invention may be executed by a storage controller, and the method may be applied to multiple scenarios, for example, a data read/write scenario and a data polling scenario.
In a data read-write scenario, for example, when the storage controller receives a write request sent by the host, the method is executed to obtain a second state mapping table, and then data storage is performed according to the second state mapping table, where data to be processed is data to be written.
In a data inspection scene, data to be processed is data to be inspected, after data reading operation is carried out by a storage controller, the read data is input into an ECC decoder to obtain the data to be inspected after error correction processing and the misjudgment probability of each storage state, then a second state mapping table corresponding to the inspection period can be obtained according to the method, and the data to be inspected after error correction is stored into storage particles according to the second state mapping table.
In any application scenario, the determination process of the second state mapping table is the most critical, so the method focuses on the determination process of the second state mapping table.
In step S110, the number of bits included in each data group obtained after grouping matches the data unit type. The data unit types include SLC, MLC, TLC and QLC. One bit in one data cell of SLC type, 2bits in one data cell of MLC type, 3bits in one data cell of TLC type, and 4 bits in one data cell of QLC type. It can be seen that the matching means that the number of bits included in one data unit is equal to the number of bits included in one data unit. For example, in the embodiment of the present invention, if the type of the storage unit corresponding to the storage particle is TLC, every 3bits of the data to be processed are divided into one data group, that is, one data group includes 3 bits.
In specific implementation, after S110 and before S120, the method provided by the embodiment of the present invention may further include the following steps a 1-a 4:
a1, counting the number of bits 1 and 0 in the data to be processed;
that is, the number of bits 0 and the number of bits 1 are counted for the data to be processed.
a2, judging whether the number of the bits 1 and the number of the bits 0 meet preset conditions; wherein the preset condition is used for representing that the quantity difference between bit 1 and bit 0 exceeds a preset difference;
it can be understood that if the number of two bit values satisfies the preset condition, it indicates that there is a large difference between the number of bit 1 and the number of bit 0, for example, the number of bit 1 is much larger than the number of bit 0, or the number of bit 0 is much larger than the number of bit 1.
In a specific implementation, the preset conditions may include:
Figure 633496DEST_PATH_IMAGE001
wherein f (1) is the number of bit 1 in the data to be processed, f (0) is the number of bit 0 in the data to be processed, and T is a threshold corresponding to the preset gap.
a3, if the preset condition is met, sequencing the data states according to the sequence of the number of preset bit values contained in the data states from large to small to obtain a data state sequence, and jumping to the step of sequencing the storage states of the storage particles according to a second sequence direction of misjudgment probability; the preset bit value is a bit value with a larger number of bits 1 and 0;
a4, if the preset condition is not satisfied, executing the step of counting the number of each data state in the plurality of data groups.
It will be appreciated that if the preset condition is met, there are two cases, one is that the number of bits 1 is much greater than the number of bits 0, when the preset bit value is 1. One is that the number of bits 0 is much larger than the number of bits 1, and the preset bit value is 0.
For example, if the preset condition is satisfied and f (1) > f (0), the data states are sorted according to the number of bit values 1, and the data state sequence is obtained as follows: {111, 110, 011, 101, 001, 100, 010, 000}.
For another example, if the preset condition is satisfied and f (1) < f (0), the data states are sorted from the number of bit values 0, and the obtained data state sequence is {000, 001, 010, 100, 011, 101, 110, 111 }.
That is, if the preset condition is satisfied, the data state sequence is determined according to the number of preset bit values included in the data state, and then the process directly jumps to S130 to continue execution. If the above preset condition is not satisfied, the data state sequence needs to be determined as S120 hereinafter.
It can be understood that if the number of the preset bit values contained in the two data states is equal, the sequence of the two data states may be random.
It is understood that when the preset condition is satisfied, the manner of determining the data state sequence according to the number of preset bit values contained in the data state may be referred to as a direct mapping method. This way, the statistical step in step S120 can be omitted, and thus the amount of calculation can be reduced.
Meanwhile, in practice, the storage state with the highest bit error rate is often the worst storage state with the highest misjudgment probability. Therefore, the number of data sets stored in the worst storage state is reduced as much as possible, so that the optimal storage state stores as many data sets as possible, and the bit error rate can be greatly reduced. Therefore, in the above direct mapping method, if the number of bits 1 in the data to be processed is much larger than 0, the data states containing 1 most are arranged at the forefront, and the data states containing 0 most are arranged at the rearmost, so that when the data state sequence and the storage state sequence are mapped one by one, the data states containing 1 most correspond to the optimal storage state, and the data states containing 0 most correspond to the worst storage state, so that when data is stored, because the number of bits 1 is larger and the number of bits 0 is smaller, a smaller number of data sets can be stored in a worse storage state, a larger number of data sets can be stored in a better storage state, and further, the bit error rate is reduced.
S120, counting the number of each data state in the plurality of data groups, and sequencing the data states according to a first sequence direction of the number to obtain a data state sequence;
for example, if the data unit type is TLC, there are 8 data states. The data cell type is QLC, there are 16 data states. It can be seen that different data unit types have different numbers of data states.
The first sequence direction may be from large to small, or from small to large. The second sequential direction mentioned hereinafter is opposite to the first sequential direction, so that when the first sequential direction is from large to small, the second sequential direction is from small to large. When the first sequential direction is from small to large, the second sequential direction is from large to small.
For example, the data unit type is TLC, and the 8 data states are: 110. 111, 011, 101, 001, 100, 101, 000. For each data group, the number of the 8 data states is counted, and then the data states are sorted according to the number from most to least to obtain the data state sequence. For example, after 8 data states are sorted from the top to the bottom, the data state sequence can be obtained as follows: {110, 111, 011, 101, 001, 100, 010, 000}.
In a specific implementation, the counting the number of each data state in the plurality of data sets in S120 may include:
s121, sampling and selecting a preset number of data groups from the plurality of data groups;
s122, counting the number of each data state in the data group with the preset number;
and S123, taking the number of each data state in the preset number of data groups as the number of the data states in the plurality of data groups.
For example, there are 10000 data sets in total, and only 1000 of the data sets are selected. For the 1000 data sets, the respective number of each data state is counted, so as to represent the respective number of each data state in 10000 data sets.
It is understood that the number of each data state in the full data may be counted in step S120, or the number of each data state in a portion of the data may be counted in a sampling manner, and then the number of each data state in the portion of the data is used to represent the number of each data state in the full data.
S130, sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; wherein the number of storage states is equal to the number of data states, and the first sequential direction is opposite to the second sequential direction;
wherein, for the memory particles with the data unit type of TLC, the memory states also include 8 kinds, for example, see P0-P7 shown in FIG. 1.
The misjudgment probability can be obtained by off-line testing and calibrating and then stored in the memory.
In this step, the storage states are sorted according to the level of the misjudgment probability, and the lower the misjudgment probability is, the earlier the storage state is. For example, the memory state sequence obtained after sorting is: { P2, P3, P4, P5, P6, P0, P1, P7 }.
S140, mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
for example, the data state sequence is: {110, 111, 011, 101, 001, 100, 010, 000}, the memory state sequence is: { P2, P3, P4, P5, P6, P0, P1, P7}, where the first state mapping table obtained after mapping the two sequences is: {110: p2, 111: P3, 011: P4, 101: P5, 001: P6, 100: P0, 010: P1, 000: P7 }.
S150, acquiring a Gray code mapping table adopted by the storage particles; the gray code mapping table comprises mapping relations between each storage state and each gray code;
for example, referring to the gray code mapping table in fig. 1, the gray code mapping table is: { P7: 110, P0: 111, P1: 011, P3: 101, P2: 001, P4: 100, P6: 010, P5: 000}.
S160, generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table includes mapping relationships between the data states and the gray codes.
For example, the first state mapping table is: {110: p2, 111: P3, 011: P4, 101: P5, 001: P6, 100: P0, 010: P1, 000: P7, and the Gray code mapping table is: { P7: 110, P0: 111, P1: 011, P3: 101, P2: 001, P4: 100, P6: 010, P5: 000, the second state mapping table may be found in table 1 below:
watch (A)
Figure DEST_PATH_IMAGE002
Data state 110 111 011 101 001 100 010 000
Storage bit 001 101 100 000 010 111 011 110
Through the above description, a corresponding second state mapping table may be generated for the data to be processed, and then the second state mapping table is applied in a data reading and writing scene or a data inspection scene.
(one) for data read-write scenarios
For example, when the storage controller receives a write request sent by the host, the data to be processed in the foregoing is the data to be written, and at this time, the storage controller executes steps S110 to S160 to obtain the second state mapping table. At this time, the storage controller may perform data storage on each data group corresponding to the data to be written according to the second state mapping table.
In specific implementation, the method may specifically include:
when a write request is received, executing the steps S110-S160 to obtain a second state mapping table corresponding to data to be written;
and transcoding the plurality of data groups corresponding to the data to be written according to the second state mapping table, encoding the transcoded data, and storing the encoded data to the storage particles.
Transcoding means converting each data group of data to be written into a gray code, then encoding the obtained gray code, for example, ECC encoding, to obtain encoded data, and further storing the encoded data in storage particles to implement data writing operation.
Referring to fig. 3, the following is an example of an approximate writing process for data to be written:
(1.1) grouping data to be written according to the type of the data unit to obtain a plurality of data groups when a writing request is received; wherein the number of bits contained in each data group matches the data unit type;
(1.2) counting the number of each data state in the plurality of data groups, and sequencing the data states in the order of the number from large to small to obtain a data state sequence;
(1.3) obtaining a storage state sequence according to the sequence of the storage states of the storage particles from small to large in misjudgment probability; wherein the number of storage states and the number of data states are equal;
(1.4) mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
(1.5) acquiring a Gray code mapping table adopted by the storage particles; the gray code mapping table comprises mapping relations between each storage state and each gray code;
(1.6) generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table comprises mapping relations between each data state and each gray code;
and (1.7) transcoding the plurality of data groups corresponding to the data to be written according to the second state mapping table, encoding the transcoded data, and storing the encoded data to the storage particles.
The steps (1.1) - (1.7) are particularly suitable for the initial writing process of the data to be written. After the initial writing is completed, the data state sequence, the storage state sequence, the first state mapping table, the second state mapping table and the like are stored. If the data to be written is not written for the first time, the initial data state sequence, the initial storage state sequence and the like of the data to be written can be directly acquired, and whether the storage state sequence of the current storage particle changes relative to the initial storage state sequence or not is judged. And if the change occurs, generating a first state mapping table, a second state mapping table and the like by using the current storage state sequence and the initial data state sequence. If no change has occurred, the initial second state mapping table is directly employed.
After the data is written, reading can be performed, and reverse transcoding is also required based on the second state mapping table. Specifically, the method may further include:
when a reading request is received, performing reading operation of data, wherein the reading operation comprises the following steps: reading data from the memory particles; decoding the read data to obtain a decoded data group; and performing reverse transcoding on the decoded data group according to the second state mapping table to obtain a reverse transcoded data group.
That is, when a read request is received, the specific read operation includes: first, data is read from the storage granule, the read data is decoded, for example, ECC decoded, to obtain decoded data, and then the decoded data is reversely transcoded. The reverse transcoding means that the gray code is converted into a data state, so that the data after reverse transcoding can be obtained, namely the data before transcoding during the writing operation, and the data reading operation is completed.
In practice, referring to fig. 4, in the write operation, before performing S110, scrambling processing, asymmetric coding, etc. may be performed on the data to be written, where scrambling is a processing method of digital signals, and the scrambling code and the data to be written are multiplied to obtain new data to be written, so as to achieve dispersion in time and frequency. Asymmetric coding is also a coding mode, and the difference of data distribution can be further increased.
Similarly, referring to fig. 4, if scrambling and asymmetric encoding are performed during writing, asymmetric decoding and descrambling are also performed after reverse transcoding during data reading, and desired data can be obtained.
That is, the plurality of data groups are subjected to scrambling processing and/or asymmetric encoding processing prior to step (1.1). And for a read operation, after reverse transcoding the decoded data set, the method further comprises: and carrying out asymmetric decoding processing and/or descrambling processing on the data group before transcoding. It can be seen that the write operation and the read operation correspond.
(II) data inspection scene
In practice, as the data storage time is prolonged, a power failure may occur, for example, the storage state P7 may drop to the storage state P6, which may cause data errors, and subsequently, a decoding error may occur. In order to avoid or reduce the occurrence of the situation, a data polling method is adopted. The data inspection means that after the residence time of data in the storage particles reaches a certain time, the storage controller reads the data out, performs error correction to obtain correct data, and then stores the correct data in the storage particles. This reduces the probability of data errors.
If the first write operation of the data is performed based on the second state mapping table, the data polling is performed based on the second state mapping table in each polling period. The specific data inspection process can comprise b 1-b 3:
b1, in each data polling period, performing data reading operation from the storage particles to obtain data to be polled; carrying out error correction processing on the data to be inspected and determining the misjudgment probability of each storage state;
in this step, a data reading operation is performed from the storage granule, and the reading operation is consistent with the reading operation in the above, so that after reading, the data after reverse transcoding, that is, the data before transcoding, which is referred to as the data to be patrolled, can be obtained.
After the data to be inspected is obtained, the data to be inspected can be input into the ECC decoder, and the ECC decoder can output the data to be inspected after error correction and the misjudgment probability of each storage state. The misjudgment probability can also be expressed by adopting the error bit rate of the storage state, so that the ECC decoder knows the error bit quantity of each storage state when correcting the error, and then calculates the misjudgment probability of each storage state.
b2, aiming at the data to be inspected after error correction processing, executing steps S110-S160 to obtain a second state mapping table corresponding to the current inspection cycle;
that is to say, for the data to be inspected after error correction, the corresponding data state sequence and storage state sequence are determined, the data state sequence and storage state sequence are mapped to obtain a first state mapping table, a gray code mapping table is obtained, and a second state mapping table is generated according to the first state mapping table and the gray code mapping table.
It can be appreciated that if a corresponding data state sequence is pre-stored for the data to be inspected, the data state sequence can be directly obtained. If the data state sequence is not pre-stored, the data state sequence can be determined according to S110-S120.
That is, when the processes of S110-160 are executed, particularly before S110, whether a pre-stored data state sequence exists for the data to be patrolled or not is judged;
if the data state sequence exists, acquiring a data state sequence pre-stored aiming at the data to be inspected, and jumping to the step of sequencing the storage states according to a second sequence direction of the misjudgment probability;
if not, executing the step of grouping the data to be processed according to the data unit type.
That is, if there is a pre-stored data state sequence, the data state sequence is directly acquired, and then it jumps to the step of S130 without performing S110 and S120. And if not, S110 is started.
b3, transcoding the data to be inspected after error correction processing according to a second state mapping table corresponding to the inspection period, encoding the transcoded data, and storing the encoded data to the storage particles.
And after a second state mapping table of the current routing inspection period is obtained, converting the data to be inspected after error correction into Gray codes according to the second state mapping table, and then coding the Gray codes, and storing the coded Gray codes.
And finishing the data inspection process of one data inspection period.
In practice, in the above process, it is found that the storage state sequence in the polling period is the same as the initial storage state sequence, and at this time, the data to be polled after error correction can be stored according to the original second state mapping table, and the steps of generating the first state mapping table, obtaining the gray code mapping table, and generating the second state mapping table do not need to be executed.
It can be understood that the storage state sequence of the storage granule may change for some reason, and if the storage state sequence changes, a new second state mapping table needs to be generated, and if the storage state sequence does not change, the original second state mapping table can be used as a basis.
In addition, in the embodiment of the present invention, an ECC decoder may be used to count the misjudgment probability of each storage state, and since the ECC statistics of the misjudgment probability is time-consuming, the following alternative method may be used to determine the misjudgment probability of each storage state:
determining a corresponding misjudgment probability table according to at least one of the duration of a polling period, the reading times in the previous polling period and the PE times of a unit to be stored, and acquiring the misjudgment probability of each storage state in the corresponding misjudgment probability table; each misjudgment probability table contains the misjudgment probability corresponding to each storage state.
For example, in an actual scene, the inspection cycle duration is divided into 3 steps, the reading times are divided into 5 steps, and the PE times are divided into 5 steps, and the inspection cycle duration, the reading times, and the PE times of each step correspond to one misjudgment probability table, and there are 75 misjudgment probability tables in total. When the misjudgment probability needs to be counted, a corresponding misjudgment probability table can be determined according to the gear where the duration of the inspection cycle is located, the gear where the number of reading times in the previous inspection cycle is located, and the gear where the number of PE times of the unit to be stored is located. The method has small calculation amount and can shorten the time.
It can be understood that, the method for determining the false positive probability in the embodiment of the present invention is not limited to the data inspection scenario, and may also be applied to other scenarios. That is, the method for determining the false positive probability may be applied to any scenario to which the state mapping processing method is applied.
Referring to fig. 5, the following illustrates the polling process in each polling cycle:
(2.1) performing data reading operation from the storage particles to obtain data to be patrolled;
(2.2) inputting the data to be inspected into an ECC decoder to obtain error-corrected data to be inspected and the misjudgment probability of each storage state;
(2.3) sequencing the storage states according to the sequence of the misjudgment probability of each storage state from small to large to obtain a storage state sequence, and judging that the storage state sequence is different from the initial storage state sequence;
(2.4) acquiring a data state sequence prestored aiming at the data to be patrolled;
(2.5) mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
(2.6) acquiring a Gray code mapping table adopted by the storage particles;
(2.7) generating a second state mapping table according to the first state mapping table and the Gray code mapping table;
and (2.8) transcoding the data to be inspected after error correction processing according to the second state mapping table, encoding the transcoded data, and storing the encoded data to the storage particles.
For example, referring to fig. 6, for the misjudgment probability of each storage state, a storage state sequence is generated based on fig. 6, and then a second state mapping table is formed. The bit error rate generated when data is read and written and data inspection is carried out based on the second state mapping table is reduced in different degrees compared with the bit error rate generated when data is read and data inspection is carried out only through the Gray code mapping table in the prior art. For example, when 12 different types of data (xml data, x-ray data, etc.) in fig. 7 are read, written or inspected, it is found that the bit error rate is reduced.
The memory grain in the embodiment of the present invention refers to a place where data is actually stored, and is generally sequentially indexed in a manner of a grain chip, Die (i.e., a logic unit), Block (i.e., a Block), WordLine (i.e., a word line), and page (i.e., a page). The storage particles are classified into SLC (1 bit), MLC (2bits), TLC (3bits) and the like according to the number of bits which can be stored in each storage unit. The PE times are the erase times of the memory cell.
The method provided by the embodiment of the invention comprises the steps of firstly grouping data to be processed according to the type of a data unit to obtain a plurality of data groups, counting the number of each data state in the plurality of data groups, and sequencing each data state according to the first sequence direction of the number to obtain a data state sequence; sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; and mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table. And then obtaining a Gray code mapping table adopted by the storage particles, and generating a second state mapping table according to the first state mapping table and the Gray code mapping table. It can be known that in the first state mapping table, the storage state with the lowest misjudgment probability corresponds to the data state with the highest number, and the storage state with the highest misjudgment probability corresponds to the data state with the lowest number, so that the gray codes corresponding to the data states with a larger number are stored in the storage state with a lower misjudgment probability, and the gray codes corresponding to the data states with a smaller number are stored in the storage state with a higher misjudgment probability.
In a second aspect, an embodiment of the present invention provides a state mapping processing apparatus.
Referring to fig. 8, the apparatus includes:
the first grouping module is used for grouping the data to be processed according to the data unit type to obtain a plurality of data groups; wherein the number of bits contained in each data group matches the data unit type;
the first arrangement module is used for counting the number of each data state in the plurality of data groups and arranging the data states according to a first sequence direction of the number to obtain a data state sequence;
the second arrangement module is used for sequencing all storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; wherein the number of storage states is equal to the number of data states, and the first sequential direction is opposite to the second sequential direction;
the first mapping module is used for mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
a first obtaining module, configured to obtain a gray code mapping table used by the storage granule; the gray code mapping table comprises mapping relations between each storage state and each gray code;
the second mapping module is used for generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table includes mapping relationships between the data states and the gray codes.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method provided in the first aspect.
Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion module to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It is to be understood that for the explanation, the detailed description, the beneficial effects, the examples and the like of the contents in the computer-readable medium provided in the embodiment of the present invention, reference may be made to the corresponding parts in the method provided in the first aspect, and details are not described here.
In a fourth aspect, an embodiment of the present invention provides an SSD device, which includes a storage controller, where the storage controller includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the computer program.
It is to be understood that, for the explanation, the specific implementation, the beneficial effects, the examples and the like of the contents in the SSD device provided in the embodiment of the present invention, reference may be made to the corresponding parts in the method provided in the first aspect, and details are not described herein again.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this disclosure may be implemented in hardware, software, hardware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (12)

1. A state mapping processing method is characterized by comprising the following steps:
grouping the data to be processed according to the type of the data unit to obtain a plurality of data groups; wherein the number of bits contained in each data group matches the data unit type;
counting the number of each data state in the plurality of data groups, and sequencing the data states according to a first sequence direction of the number to obtain a data state sequence;
sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; wherein the number of storage states is equal to the number of data states, and the first sequential direction is opposite to the second sequential direction;
mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
acquiring a Gray code mapping table adopted by the storage particles; the gray code mapping table comprises mapping relations between each storage state and each gray code;
generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table includes mapping relationships between the data states and the gray codes.
2. The method of claim 1, wherein the counting the number of data states in each of the plurality of data sets comprises:
sampling and selecting a preset number of data groups from the plurality of data groups;
counting the number of each data state in the preset number of data groups;
and taking the number of each data state in the preset number of data groups as the number of the data states in the plurality of data groups.
3. The method of claim 1, wherein prior to said counting the number of data states in each of said plurality of data sets, said method further comprises:
counting the number of bits 1 and 0 in the data to be processed;
judging whether the number of the bits 1 and the number of the bits 0 meet a preset condition or not; wherein the preset condition is used for representing that the quantity difference between bit 1 and bit 0 exceeds a preset difference;
if the preset condition is met, sequencing the data states according to the sequence from large to small of the number of the preset bit values contained in the data states to obtain a data state sequence, and jumping to the step of sequencing the storage states of the storage particles according to a second sequence direction of the misjudgment probability; the preset bit value is a bit value with a larger number of bits 1 and 0;
and if the preset condition is not met, executing the step of counting the number of each data state in the plurality of data groups.
4. The method according to claim 3, wherein the preset condition comprises:
Figure 502891DEST_PATH_IMAGE001
wherein f (1) is the number of bit 1 in the data to be processed, f (0) is the number of bit 0 in the data to be processed, and T is a threshold corresponding to the preset difference.
5. The method of claim 1, applied to a data read-write scenario, comprising: executing the method of any one of claims 1 to 4 when a write request is received, wherein the data to be processed is data to be written;
the method further comprises the following steps: and transcoding the plurality of data groups corresponding to the data to be written according to the second state mapping table, encoding the transcoded data, and storing the encoded data to the storage particles.
6. The method of claim 5, further comprising:
when a read request is received, performing a read operation of data, wherein the read operation comprises: reading data from the memory particles; decoding the read data to obtain a decoded data group; and performing reverse transcoding on the decoded data group according to the second state mapping table to obtain a reverse transcoded data group.
7. The method according to claim 6, wherein the method is further used in a data inspection scene, the data to be processed is data to be inspected, and the method comprises the following steps:
in each data polling period, data reading operation is carried out from the storage particles to obtain data to be polled; carrying out error correction processing on the data to be inspected and determining the misjudgment probability of each storage state;
aiming at the data to be inspected after error correction processing, executing the method of any one of claims 1-4 to obtain a second state mapping table corresponding to the inspection period;
and transcoding the data to be inspected after error correction processing according to a second state mapping table corresponding to the inspection period, encoding the transcoded data, and storing the encoded data to the storage particles.
8. The method according to claim 7, wherein before the grouping the data to be processed according to the data unit type when performing the method according to any one of claims 1 to 4, the method further comprises:
judging whether a pre-stored data state sequence exists for the data to be inspected;
if the data state sequence exists, acquiring a data state sequence pre-stored aiming at the data to be inspected, and jumping to the step of sequencing the storage states according to a second sequence direction of the misjudgment probability; if not, executing the step of grouping the data to be processed according to the data unit type.
9. The method of claim 1 or 7, wherein determining the probability of false positive for each storage state comprises:
determining a corresponding misjudgment probability table according to at least one of the duration of a polling period, the reading times in the previous polling period and the PE times of a unit to be stored, and acquiring the misjudgment probability of each storage state in the corresponding misjudgment probability table; each misjudgment probability table contains the misjudgment probability corresponding to each storage state.
10. A state mapping processing apparatus, comprising:
the first grouping module is used for grouping the data to be processed according to the data unit type to obtain a plurality of data groups; wherein the number of bits contained in each data group matches the data unit type;
the first arrangement module is used for counting the number of each data state in the plurality of data groups and arranging the data states according to a first sequence direction of the number to obtain a data state sequence;
the second arrangement module is used for sequencing all storage states of the storage particles according to a second sequence direction of the misjudgment probability to obtain a storage state sequence; wherein the number of storage states and the number of data states are equal, and the first sequential direction and the second sequential direction are opposite;
the first mapping module is used for mapping each data state in the data state sequence and the storage state at the corresponding position in the storage state sequence one by one to obtain a first state mapping table;
a first obtaining module, configured to obtain a gray code mapping table used by the storage granule; the gray code mapping table comprises mapping relations between each storage state and each gray code;
the second mapping module is used for generating a second state mapping table according to the first state mapping table and the Gray code mapping table; the second state mapping table includes mapping relationships between the data states and the gray codes.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 9.
12. An SSD device, comprising a storage controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing the steps of the method of any of claims 1 to 9.
CN202210709306.9A 2022-06-22 2022-06-22 State mapping processing method and device, medium and SSD device Active CN114791888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210709306.9A CN114791888B (en) 2022-06-22 2022-06-22 State mapping processing method and device, medium and SSD device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210709306.9A CN114791888B (en) 2022-06-22 2022-06-22 State mapping processing method and device, medium and SSD device

Publications (2)

Publication Number Publication Date
CN114791888A CN114791888A (en) 2022-07-26
CN114791888B true CN114791888B (en) 2022-09-02

Family

ID=82463189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210709306.9A Active CN114791888B (en) 2022-06-22 2022-06-22 State mapping processing method and device, medium and SSD device

Country Status (1)

Country Link
CN (1) CN114791888B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116244108A (en) * 2023-01-09 2023-06-09 海光信息技术股份有限公司 Memory controller, data writing and reading method of memory and memory system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10635690B1 (en) * 2016-12-31 2020-04-28 Allscripts Software, Llc Bitwise data comparison utilizing dynamic temporal segmentation
CN111667868A (en) * 2019-03-08 2020-09-15 西部数据技术公司 Multi-phase programming by balanced gray coding

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10635690B1 (en) * 2016-12-31 2020-04-28 Allscripts Software, Llc Bitwise data comparison utilizing dynamic temporal segmentation
CN111667868A (en) * 2019-03-08 2020-09-15 西部数据技术公司 Multi-phase programming by balanced gray coding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"数字全息数据存储系统中的格雷映射等重调制码的设计";裴先登 等;《电子学报》;20030731;第1015-1017页 *

Also Published As

Publication number Publication date
CN114791888A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
US20090234792A1 (en) Memory devices and data decision methods
KR101483190B1 (en) Memory system and data processing method thereof
US8255643B2 (en) Memory system and data processing method thereof
US8499217B2 (en) Memory device and error control codes decoding method
JP5649663B2 (en) System and method for correcting data errors using a stored count of bit values
US8281192B2 (en) Storage medium reproducing apparatus, storage medium reproducing method, and computer program product for reading information from storage medium
KR101990971B1 (en) Memory, memory system, and error checking/correction method for memory
US8381077B2 (en) Systems and methods for implementing error correction in relation to a flash memory
US8635508B2 (en) Systems and methods for performing concatenated error correction
US8230157B2 (en) Memory device and method of multi-bit programming
KR20100033195A (en) Non-volatile memory system and data processing method thereof
US9348694B1 (en) Detecting and managing bad columns
US10691530B2 (en) Apparatuses and methods for correcting errors and memory controllers including the apparatuses for correcting errors
US20110216590A1 (en) Nonvolatile memory device using interleaving technology and programmming method thereof
CN111863097B (en) Reading control method and device of flash memory
CN114791888B (en) State mapping processing method and device, medium and SSD device
CN112599176B (en) Optimal detection voltage acquisition method, reading control method and device for memory
CN109471808B (en) Storage system with data reliability mechanism and method of operation thereof
US20150149856A1 (en) Decoding with log likelihood ratios stored in a controller
US11374595B2 (en) Method for selectively inverting words to be written to a memory and device for implementing same
CN112599169B (en) Read operation control method and device of memory and memory controller
US20190095280A1 (en) Method to select flash memory blocks for refresh after read operations
US9786388B1 (en) Detecting and managing bad columns
CN112306382B (en) Flash memory controller, storage device and reading method thereof
CN114968650B (en) Data inspection method and device, medium and SSD device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant