Error correction code generation method, device, equipment and storage medium

By coding user data multiple error correction codes in the storage components of the server device, error correction code words with code length greater than the length of user data are generated, which solves the problem of high error correction capabilities and small-particle data addressing in phase change storage media, and realizes efficient access to small-particle data and powerful error correction capabilities.

CN115118286BActive Publication Date: 2025-04-29ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210645965.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-04-29
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

Due to the high error rate of phase change storage media PCM, existing ECC designs cannot be reused directly, making it difficult to achieve high error correction capabilities and small-particle data addressing in storage media.

Method used

In the storage component of the server device, multiple error correction code encoding operations are performed on the user data in a single code length unit of the error correction code to generate an error correction code code word whose code length is greater than the data length of the user data.

Benefits of technology

Through error correction codewords whose code length is greater than the length of the user data, the dual requirements of access to small-particle data and high error correction capabilities are realized, and the constraints between traditional ECC designs are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115118286B_ABST
    Figure CN115118286B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide an error correction code generation method, apparatus, device and storage medium, which are applied to a server device and involve a storage component, wherein the storage component has an error correction capability, and the method comprises: receiving a write command for data processing and obtaining user data carried by the write command; in the process of performing error correction code encoding on the user data, performing multiple error correction code encoding operations on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data; the code length of the error correction code word is greater than the data length of the user data. The code length of the error correction code word obtained after multiple error correction code operations will be greater than the data length of the user data. Based on the fact that the code length of the error correction code is greater than the data length of the user data, the dual requirements of small-particle access and high error correction capability are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an error correction code generation method, an error correction code generation device, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Art

[0002] Error Correcting Code (ECC) is a coding method that can detect and correct errors that occur during transmission at a certain length. Usually, in traditional storage components, including non-volatile storage and volatile memory, ECC design can be used to ensure the reliability of stored data.

[0003] Among traditional storage products, the storage medium commonly used by mainstream storage products is Flash (Flash EEPROM Memory, i.e., flash memory, a type of storage chip, which uses a specific program to modify the data inside). Products used for storage can also include memory products, among which the storage medium commonly used by mainstream memory products is DRAM (Dynamic Random Access Memory), and SCM (Storage Class Memory) is a storage component between storage and memory, and its storage medium is PCM (Phase-Change Memory).

[0004] Phase change memory PCM is different from the storage media used in traditional mainstream storage products and memory products. It has the characteristics of low read and write latency. Based on this characteristic, the storage components designed with phase change storage media can be used as an extension of DDR for server cache, and can also be used as Storage (memory) in high-speed NVMe devices. Compared with DRAM storage media, it has a higher error rate. In storage media, the requirements for ECC in PCM will be higher than DRAM media, and the ECC design of DRAM media cannot be directly reused. Summary of the invention

[0005] In view of the above problems, embodiments of the present application are proposed to provide an error correction code generation method, an error correction code generation device, a corresponding electronic device, and a corresponding computer-readable storage medium that overcome the above problems or at least partially solve the above problems.

[0006] The embodiment of the present application discloses a method for generating an error correction code, which is applied to a server device and involves a storage component, wherein the storage component has an error correction capability, and the method includes:

[0007] receiving a write command for data processing, and acquiring user data carried by the write command;

[0008] In the process of performing error correction code encoding on the user data, multiple error correction code encoding operations are performed on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data; the code length of the error correction code word is greater than the data length of the user data.

[0009] Optionally, the user data includes a plurality of different user data; and performing a plurality of error correction code encoding operations on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data includes:

[0010] Using the single code length unit to perform multiple error correction code encoding operations on the multiple different user data to obtain multiple encoding results;

[0011] The multiple encoding results are combined to obtain error correction code words for the multiple different user data.

[0012] Optionally, the using the single code length unit to perform multiple error correction code encoding operations on the multiple different user data to obtain multiple encoding results includes:

[0013] Splitting a single code length unit for an error correction code into a plurality of sub-code length units according to a preset addressing length requirement;

[0014] The multiple different user data are divided, and the divided multiple sub-code length units are used to perform error correction code encoding operations on the divided user data respectively to obtain multiple encoding results.

[0015] Optionally, the multiple encoding results include user encoded data after multiple encodings and multiple redundant data for the user encoded data, and combining the multiple encoding results to obtain error correction codewords for the multiple different user data includes:

[0016] The user coded data after the multiple encodings are combined with a plurality of redundant data for the user coded data to obtain error correction code words for the plurality of different user data.

[0017] Optionally, combining the user coded data after the multiple encodings with a plurality of redundant data for the user coded data to obtain error correction code words for the plurality of different user data includes:

[0018] Performing an XOR operation on the plurality of redundant data for the user coded data to obtain redundant data for the error correction code word;

[0019] The user coded data after the multiple encodings are concatenated with redundant data for error correction code words to obtain error correction code words for the multiple different user data.

[0020] Optionally, it also includes:

[0021] When the received command is a read command, obtaining an error correction code word for the data required to be read by the read command;

[0022] An error correction code decoding operation is performed on the error correction code word for the required read data to obtain the required read user data.

[0023] Optionally, it also includes:

[0024] Before the error correction code encoding operation is completed for the user data within a single code length unit of the error correction code, an error correction code decoding operation is performed on the error correction code word of the required read data.

[0025] The embodiment of the present application also discloses an error correction code generation device, which is applied to a server device and involves a storage component, wherein the storage component has an error correction capability, and the device includes:

[0026] A user data acquisition module, used to receive a write command for data processing and acquire user data carried by the write command;

[0027] an error correction code encoding module, configured to, in a process of performing error correction code encoding on the user data, perform multiple error correction code encoding operations on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data; the code length of the error correction code word being greater than the data length of the user data.

[0028] Optionally, the user data includes a plurality of different user data, and the error correction code encoding module includes:

[0029] a processing result acquisition submodule, configured to perform multiple error correction code encoding operations on the multiple different user data using the single code length unit to obtain multiple encoding results;

[0030] The error correction codeword generation submodule is used to combine the multiple encoding results to obtain error correction codewords for the multiple different user data.

[0031] Optionally, the processing result acquisition submodule includes:

[0032] A code length splitting unit, used for splitting a single code length unit for an error correction code into a plurality of sub-code length units according to a preset addressing length requirement;

[0033] The error correction code encoding unit is used to divide the multiple different user data, and use the split multiple sub-code length units to perform error correction code encoding operations on the divided user data respectively to obtain multiple encoding results.

[0034] Optionally, the multiple encoding results include user encoded data after multiple encodings and multiple redundant data for the user encoded data, and the error correction codeword generation submodule includes:

[0035] The error correction codeword generating unit is used to combine the user coded data after the multiple encodings and the multiple redundant data for the user coded data to obtain the error correction codewords for the multiple different user data.

[0036] Optionally, the error correction codeword generating unit includes:

[0037] An XOR processing subunit, configured to perform an XOR operation on the plurality of redundant data for the user coded data to obtain redundant data for the error correction codeword;

[0038] The data splicing subunit is used to splice the user coded data after the multiple encodings with the redundant data for the error correction codeword to obtain the error correction codeword for the multiple different user data.

[0039] In one embodiment of the present application, the device may further include the following modules:

[0040] An error correction code word acquisition module is used to acquire the error correction code word of the read data required for the read command when the received command is a read command;

[0041] The user data acquisition module is used to perform an error correction code decoding operation on the error correction code word for the required read data to obtain the required read user data.

[0042] Optionally, the device further comprises:

[0043] The error correction code decoding module is used to perform an error correction code decoding operation on the error correction code word of the required read data before completing the error correction code encoding operation on the user data within a single code length unit of the error correction code.

[0044] An embodiment of the present application also discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements any step of the error correction code generation method when executed by the processor.

[0045] An embodiment of the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the error correction code generation methods are implemented.

[0046] The embodiments of the present application include the following advantages:

[0047] In an embodiment of the present application, when a storage medium with error correction capability receives a write command for data processing, it can perform an error correction code encoding operation on the user data carried in the write command. During the error correction code encoding process, multiple error correction code operations can be performed on the user data within a single code length unit for the error correction code. The code length of the error correction code codeword obtained after multiple error correction code operations will be greater than the data length of the user data. Based on the fact that the code length of the error correction code is greater than the data length of the user data, the dual requirements of small-particle access and high error correction capability are achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a schematic diagram of the location of ECC in the storage device;

[0049] Figure 2 It is a flowchart of the steps of an embodiment of an error correction code generation method of the present application;

[0050] Figure 3 It is a schematic diagram of the encoding process for error correction code words provided in an embodiment of the present application;

[0051] Figure 4 is a flowchart of another embodiment of an error correction code generation method of the present application;

[0052] Figure 5 It is a schematic diagram of a decoding process for an error correction code word provided in an embodiment of the present application;

[0053] Figure 6 It is an application scenario diagram of data processing involving error correction code encoding and decoding provided by an embodiment of the present application;

[0054] Figure 7 It is a structural block diagram of an embodiment of an error correction code generation device of the present application. DETAILED DESCRIPTION

[0055] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0056] To facilitate those skilled in the art to understand the present application, the following explains the terms or nouns involved in the following embodiments of the present application:

[0057] Storage medium: storage particles, including DRAM, Flash, PCM, etc.

[0058] ECC: Error Correcting Code, is a coding method, referring to error correction codec, including but not limited to LDPC BCH and other general error correction codecs.

[0059] Data block read / write granularity: The addressing size of the data block that the host reads and writes to the storage component.

[0060] ECC code length: the number of letters or numbers used for error correction encoding and decoding. The number of code elements contained in the code group.

[0061] ECC code rate: refers to the ratio of user data to code length.

[0062] ParityData: Parity data. Parity is a data verification mechanism used to determine whether bit errors occur during data storage.

[0063] UserData: User data.

[0064] Page Size: refers to the storage capacity of the media access unit.

[0065] ECC Codeword: ECC Codeword, error correction code can detect or correct errors, which is mainly achieved by having a large difference between codewords. It can be mainly measured by the Hamming distance between codewords. The codeword used for measurement can be an error correction code codeword obtained based on channel coding.

[0066] Traditional storage components, including non-volatile storage and volatile memory, can be designed based on ECC to ensure the reliability of stored data. Figure 1 As shown, it is a schematic diagram of the position of ECC in the storage device. ECC is represented in the storage device as an error correction code encoding engine ECC Encoder and an error correction code decoding engine ECC Decoder. The role of the error correction code encoding engine ECC Encoder is mainly reflected in the write process of data processing. When the Host initiates a write instruction for the SCM device, the Host can send the data that conforms to the addressed data particle to the ECC Encoder through the data path logic. The ECC Encoder can encode the written data with an error correction code, and then send the encoded data to the storage medium to complete the writing of the data; the role of the error correction code decoding engine ECC Decoder is mainly reflected in the read process of data processing. When the storage medium receives the read command for the addressed data particle sent by the Host, it can send the corresponding ECC code length data unit to the ECC Decoder. After completing the decoding, the ECC Decoder can send the read data of the addressed data particle to the Host through the data path logic to complete the reading of the data.

[0067] In the design process of traditional ECC codec, the ECC codec algorithm and scheme suitable for the current medium are usually designed based on constraints such as medium error characteristics and host user addressing particles. In current traditional storage devices, for the constraints of host user addressing particles, the ECC code length is generally designed to be less than or equal to the host addressing particle. This design method can reduce the complexity of data path and processing, but its shorter ECC code length sacrifices the error correction capability of ECC to some extent.

[0068] The phase-change storage medium PCM has a higher error rate than DRAM. Therefore, the ECC requirements for PCM need to be higher than those for DRAM media. That is, the device of PCM storage media needs to have the ability to support smaller addressing data particles on the Host side (for NVMe devices) and needs to have stronger error correction algorithm capabilities on the medium side (for DRAM media).

[0069] In view of the characteristics that SCM component products must support both Host large-particle addressing (such as 4KB NVMe components) and small-particle addressing (such as 64B PMEM components), and combined with the constraint that the ECC code length of traditional storage components is always less than or equal to the Host addressing particles, one of the core ideas of this application is to reasonably combine the requirements of SCM storage components for small-particle data addressing, and propose ECC encoding and decoding solutions and data processing methods that are different from traditional mainstream storage components from the level of error correction code solutions. A design scheme in which the ECC code length can be greater than the Host addressing particles is mainly proposed. Under the premise of ensuring the reliability of stored data, the ECC code based on the code length greater than the Host addressing particles can ensure support for direct addressing of small-particle data blocks initiated by the Host to the storage component.

[0070] Reference Figure 2 , shows a flowchart of an embodiment of an error correction code generation method of the present application, which is applied to a server device and involves a storage component, wherein the storage component has an error correction capability and focuses on the encoding process of the error correction code word, and specifically may include the following steps:

[0071] Step 201, receiving a write command for data processing, and obtaining user data carried by the write command;

[0072] ECC is manifested in storage devices as an error correction code encoding engine ECC Encoder and an error correction code decoding engine ECCDecoder. The role of the error correction code encoding engine ECC Encoder is mainly reflected in the write process of data processing. When the Host initiates a write instruction for the SCM device, the Host can send the data that conforms to the addressing data granularity to the ECC Encoder through the data path logic. The ECC Encoder can encode the written data with an error correction code, and then send the encoded data to the storage medium to complete the data writing.

[0073] When the server device receives a write command for data processing, in order to write the data in the storage medium after error correction coding is performed by the ECC Encoder, it is necessary to obtain the user data carried in the write command so as to perform subsequent error correction coding operations and data writing operations. The user data to be written may be user data carried in multiple different write commands, that is, the user data that needs to be encoded with an error correction code may include multiple different user data.

[0074] Step 202: In the process of performing error correction code encoding on user data, multiple error correction code encoding operations are performed on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data.

[0075] In theory, assuming that the code length of the error correction code word is larger than the addressing data particle, from the perspective of the error correction algorithm of information theory, the longer the code length of the error correction code word, the stronger its decoding ability is at the same coding cost. Among them, the coding cost can be reflected by the proportion of redundant information, that is, when the proportion of redundant information is the same, the longer the code length of the error correction code word, the stronger the decoding ability is.

[0076] In the embodiment of the present application, under the premise of comprehensively considering that the longer the ECC code length, the better the error correction performance, the requirements of the SCM storage component for small-granular data addressing are reasonably combined, and a design scheme is proposed in which the ECC code length can be larger than the Host addressing granule. Under the premise of ensuring the reliability of the stored data, based on the ECC code with a code length larger than the Host addressing granule, it can be guaranteed to support the direct addressing of small-granular data blocks initiated by the Host to the storage component.

[0077] In the ECC design of SCM component products, it is necessary to support both large-granular addressing of the Host and small-granular addressing at the same time. It can be based on the traditional ECC encoding and decoding algorithm to ensure that the code length of the error correction code word is greater than the addressing granule without changing the single code length unit. The addressing granule can refer to the data length of the user data.

[0078] In order to ensure that a single code length unit remains unchanged, the error correction code encoding process for user data can be performed within a single code length unit for the error correction code. The single code length unit for the error correction code can refer to a single encoding process for the error correction code. Since the code length unit can be used to determine the length of the error correction code after encoding, its single encoding process can be represented by a single code length unit. In order to achieve that the code length of the error correction code word is greater than the addressing particle, that is, the data length of the user data, the encoding of a code length unit is split into several encoding processes, which can essentially be expressed as performing multiple error correction code encoding operations on the user data in a single encoding process, and achieving the effect of increasing the code length based on the encoding results of multiple encoding operations.

[0079] Based on this, multiple error correction code encoding operations can be performed on multiple different user data within a single code length unit of the error correction code to obtain an error correction code word with a code length longer than the data length of the user data. Specifically, encoding operations can be performed on multiple different user data during the encoding process for a single code length, so that the encoding results of these different user data can be used to obtain an error correction code word, i.e., ECC Codeword, through a certain mathematical operation. Multiple different user data can be data blocks under different write commands, that is, the data blocks under different write commands of the Host can be encoded in the same ECC code length, so that the ECC code length of the addressing data particles is greater than that of the Host in the same storage device, so as to meet the dual requirements of small particle access of the Host and high error correction capability of the ECC.

[0080] In practical applications, in the process of performing multiple error correction code encodings on multiple different user data within a single code length unit, the single code length unit for the error correction code can be split into multiple sub-code length units according to preset addressing length requirements, such as addressing particles or addressing lengths, and then the split multiple sub-code length units are used to perform error correction code encoding operations on the divided user data respectively to obtain multiple encoding results.

[0081] Specifically, the splitting of a single code length unit can be expressed as splitting an ECC code length into any finite equal parts according to user needs, so as to perform addressing and encoding with finer data granularity.

[0082] Reference Figure 3, shows a schematic diagram of the encoding process for the error correction code word provided by the embodiment of the present application. Assuming that the length of the error correction code word ECC Codeword shown is 160Bytes, then its actual encoding length, that is, a single code length unit can also be 160Bytes, including 128Bytes of encoded data and 32Bytes of redundant data. The 128Bytes of encoded data can be spliced ​​by 32Bytes of user data and 96Bytes of all-0 data. The encoding of user data is carried out in the order from U0 to U3, and an ECC code length can be split into encoding steps, that is, the encoding of a code length unit is split into several encoding processes, wherein user encoded data U0, U1, U2, U3 can be obtained in each encoding step. In actual applications, multiple different user data can be encoded in the encoding process, and then the encoding results of these different user data are obtained by mathematical operations to obtain an error correction code word.

[0083] Exemplarily, in the error correction code encoding operation for U0 (i.e., user coded data 0), in the first encoding of any codeword, the encoded data is actually 32Bytes of user data (U0 32Bytes) and 96Bytes of all-0 data, and after encoding the U0 32Bytes of user data, redundant data P0 can be generated, and the length of P0 is 32Bytes; in the error correction code encoding operation for U1 (i.e., user coded data 1), in the second encoding of any codeword, it is actually the encoding of U0+U1, and the encoded data is actually 64Bytes of user data (including U0 32Bytes and U1 32Bytes) and 64Bytes of all-0 data, and in the encoding of U0 32Bytes and U1 After encoding the 32Bytes of user data, redundant data P1 can be generated, and the length of P1 is 32Bytes; the error correction code encoding operation on U2 (i.e., user coded data 2) is actually the encoding of U0+U1+U2 in the third encoding of any codeword, and the encoded data is actually 96Bytes of user data (including U0 32Bytes, U1 32Bytes and U2 32Bytes) and 32Bytes of all-0 data, and after encoding the user data of U0 32Bytes, U1 32Bytes and U2 32Bytes, redundant data P2 can be generated, and the length of P2 is 32Bytes; the error correction code encoding operation on U3 (i.e., user coded data 3) is actually the encoding of U0+U1+U2+U3 in the fourth encoding of any codeword, and the encoded data is actually 128Bytes of user data (including U0 32Bytes, U1 32Bytes, U2 32Bytes and U3 32Bytes), and after encoding the user data of U0 32Bytes, U1 32Bytes, U2 32Bytes and U3 32Bytes, redundant data P3 can be generated, and the length of P3 is 32Bytes.

[0084] It should be noted that the encoding method of the error correction code used can be the same as the mainstream encoding and decoding algorithm, such as BCH, LDPC, etc., and this embodiment of the present application is not limited to this.

[0085] like Figure 3 As shown, after performing multiple error correction code encoding operations on user data, the multiple encoding results obtained may include not only the user encoded data after multiple encodings, such as user data U0~U3, but also multiple redundant data for the user encoded data, such as P0~P3. In the process of combining the multiple encoding results to obtain the error correction code word for the user data, the user encoded data after multiple encodings and the multiple redundant data for the user encoded data may be combined to obtain.

[0086] In order to generate redundant data of the ECC codeword, a plurality of redundant data of the same length formed after encoding a plurality of different user data may be subjected to an XOR operation, that is, a plurality of redundant data in the same ECC codeword, such as P0 to P3, may be subjected to an XOR operation to obtain redundant data P for the error correction codeword. The length of the redundant data obtained after the XOR operation is 32 bytes.

[0087] In practical applications, the user coded data after multiple encodings can be concatenated with the redundant data for the error correction codeword to obtain the error correction codeword for the user data. The user coded data after multiple encodings, such as user data U0 to U3, is the user data under the ECC Codeword length. The user data length here can be 128Bytes, which can be obtained by combining the user data in multiple encoding processes in any ECC codeword, that is, 4 32Bytes in length; and the redundant data P for the error correction codeword is 32Bytes in length, which can be obtained by XOR operation of multiple different redundant data in the same ECC codeword. At this time, after combining P with U0+U1+U2+U3, an error correction codeword of 128Bytes+32Bytes can be obtained. The code length of this error correction codeword is greater than the addressing particle 32Bytes.

[0088] It should be noted that the process of encoding multiple times within the same ECC code word and obtaining the ECC code word after XOR operation on the multiple redundant data generated is completely equivalent to the ECC code word obtained by encoding an ECC code length once in traditional encoding in terms of error correction code algorithm. Splitting this encoding process can solve the problem that the user's addressing granularity is smaller than the ECC code length.

[0089] By splitting the encoding process, the data blocks under different write commands of the Host can also be encoded in the same ECC code length, so that the ECC code length can be greater than the addressing data particles of the Host in the same storage device, so as to meet the dual requirements of small particle access of the Host and high error correction capability of ECC. In practical applications, encoding the data blocks under different write commands of the Host in the same ECC code length can be manifested as the controller can encode and write the data in the PCM medium when receiving part of the ECC code length during the encoding process, instead of having to meet an ECC code length in the controller to write the PCM, which can be achieved by writing the PCM for multiple times for one ECC code length.

[0090] In an optional solution, for different write commands from the Host, every time N consecutive data comes in (they may be discontinuous or continuous on the Host address), the design solution can place these N consecutive commands in one ECC code length (these N command data are stored in consecutive PCM physical addresses), and then the controller maintains a management table for the correspondence between the Host address -> physical address of these data, so as to ensure that different write command data are stored in the same ECC code length through the address mapping table.

[0091] In one embodiment of the present application, the received command for data processing may be a write command or a read command. When the received command is a read command, the error correction code word for the data to be read by the read command may be obtained, and an error correction code decoding operation may be performed on the error correction code word for the data to be read, so as to obtain the user data to be read. Specifically, the error correction code decoding operation may be performed on the error correction code word for the data to be read before the error correction code encoding operation is completed for the user data within a single code length unit of the error correction code.

[0092] In an embodiment of the present application, when a storage medium with error correction capability receives a write command for data processing, it can perform an error correction code encoding operation on the user data carried in the write command. During the error correction code encoding process, multiple error correction code operations can be performed on the user data within a single code length unit for the error correction code. The code length of the error correction code codeword obtained after multiple error correction code operations will be greater than the data length of the user data. Based on the fact that the code length of the error correction code is greater than the data length of the user data, the dual requirements of small-particle access and high error correction capability are achieved.

[0093] Reference Figure 4 , shows a flowchart of another embodiment of an error correction code generation method of the present application, which is used in a server device and involves a storage component, wherein the storage component has an error correction capability and focuses on the decoding process of the error correction code word, and specifically may include the following steps:

[0094] Step 401, receiving a read command for data processing, and obtaining an error correction code word for the data to be read according to the read command;

[0095] ECC is manifested in storage devices as an error correction code encoding engine ECC Encoder and an error correction code decoding engine ECC Decoder. The role of ECC Encoder is mainly reflected in the write process of data processing. When encoding user data with error correction code, the encoding of a single code length unit is split into several encoding processes, and finally several encoding results are formed into a complete ECC code length through mathematical operations, that is, the error correction code codeword ECC Codeword, so that the ECC code length is larger than the addressing data particle of the Host, so as to meet the dual requirements of small particle access of the Host and high error correction capability of ECC.

[0096] The role of the error correction code decoding engine ECC Decoder is mainly reflected in the read process of data processing. When the storage medium receives the read command sent by the Host for the addressed data particles, it can send the corresponding ECC code length data unit to the ECC Decoder. After completing the decoding, the ECC Decoder can send the read data of the addressed data particles to the Host through the data path logic to complete the data reading.

[0097] When the server device receives a read command for data processing, the user data read at this time is stored in the storage medium, and the user data stored in the storage medium has been encoded with an error correction code. If the user data needs to be obtained, it is necessary to perform an error correction code decoding operation on the user data that has been encoded with an error correction code.

[0098] Step 402: Perform an error correction code decoding operation on the error correction code word for the data to be read, to obtain the user data to be read.

[0099] In order to perform error correction code decoding operations on the data required to be read by the read command, the encoded error correction code codewords can be obtained at this time. Since in the process of encoding the error correction code codewords, the code length is greater than the data length of the user data based on the encoding process within a single code length unit, when performing error correction code decoding, multiple error correction code decoding operations can be performed on the error correction code codewords for the required read data to obtain the required read user data.

[0100] Among them, before the error correction code encoding operation is completed for the user data in a single code length unit of the error correction code, the error correction code decoding operation of the error correction code word of the required read data can be performed, which can support the start of the decoding operation after the encoding of any addressing particle is completed. At this time, the ECC code length is also 160Bytes, and the addressing particle data can be corrected by decoding. For example, after U0 completes the encoding, when the ECC encoding engine has not received the data of U1-U3, the decoding operation of U0 can also be started. It only needs to send U0 and P0 to the decoding engine. Similarly, after U0 and U1 complete the encoding, before the encoding operation of U2-U3 is received, the decoding operation of U0 and U1 can also be started. It only needs to send U0, U1 and P0+P1 to the ECC decoding engine. And so on. This embodiment of the present application will not be elaborated on.

[0101] In practical applications, for the encoding operation started after the encoding of any addressing particle is completed, it can be manifested that during the encoding process, the controller maintains a state for each ECC Page based on the write status and address mapping relationship of the Host. Then, when a read instruction is received, if the corresponding ECC Page is read, it means that the encoding of the addressing particle corresponding to this ECC Page has been completed, and the decoding behavior of this ECC Page is initiated.

[0102] For example, refer to Figure 5 , shows a schematic diagram of the decoding process for the error correction codeword provided by the embodiment of the present application, the length of the ECC Codeword shown is 160Bytes, in the decoding process, after decoding the ECC Codeword length, it is also necessary to extract the addressing granular data, that is, to read the user data, so as to transfer the read user data to the data path and return it to the Host. Corresponding to Figure 3 The encoding is completed as shown, and the decoding of the user data can be performed in the order from U3 to U0.

[0103] In practical applications, the error correction code word obtained can be a combination of user encoded data U0+U1+U2+U3 after multiple encodings in a single code length unit and redundant data P for the error correction code code word, wherein the redundant data P for the error correction code code word can be based on multiple redundant data in the same ECC code word, such as P0~P3, obtained by performing an XOR operation, and the length of the redundant data here is 32Bytes, wherein P0 is redundant data 0 generated for U0 when any code word is encoded for the first time, P1 is redundant data 1 generated for U1 when any code word is encoded for the second time, P2 is redundant data 2 generated for U2 when any code word is encoded for the third time, and P3 is redundant data 3 generated for U3 when any code word is encoded for the fourth time.

[0104] The error correction code decoding operation is performed on U3 (i.e., user coded data 3). As long as the encoding of the user coded data U3 is completed, the ECC code length can be decoded. The decoded data is U0+U1+U2+U3+P0+P1+P2+P3, with a length of 160Bytes. The error correction code decoding operation is performed on U2 (i.e., user coded data 2). As long as the encoding of the user coded data U2 is completed, the ECC code length can be decoded. The decoded data is U0+U1+U2+P0+P1+P2. The length is also 160Bytes; the error correction code decoding operation is performed on U1 (i.e. user data 1). As long as the encoding of the user encoded data U1 is completed, the ECC code length can be decoded. The decoded data is U0+U1+P0+P1, and the length is also 160Bytes; the error correction code decoding operation is performed on U0 (i.e. user encoded data 0). As long as the encoding of the user encoded data U0 is completed, the ECC code length can be decoded. The decoded data is U0+P0, and the length is also 160Bytes.

[0105] It should be noted that when the error correction code decoding operation is performed on U3 (i.e., encoded user data 3), the data encoding of U0~U3 has been completed. In this decoding process, there is no need to know the respective contents of P0~P3. It is only necessary to know the redundant data P after the XOR operation of P0+P1+P2+P3. This can be used as information whether the U0~U3 data obtained after decoding U0~U3 is correct.

[0106] In an embodiment of the present application, when a storage medium with error correction capability receives a write command for data processing, it can perform an error correction code encoding operation on the user data carried in the write command. During the error correction code encoding process, multiple error correction code operations can be performed on the user data within a single code length unit for the error correction code. The code length of the error correction code codeword obtained after multiple error correction code operations will be greater than the data length of the user data. Based on the fact that the code length of the error correction code is greater than the data length of the user data, the dual requirements of small-particle access and high error correction capability are achieved.

[0107] Reference Figure 6 , showing an application scenario diagram of data processing involving error correction code encoding and decoding provided by an embodiment of the present application, which can be applied in SCM products, is aimed at error correction of phase change storage media such as PCM, and focuses on meeting the requirements of small-granularity data addressing of SCM storage components. What needs to be achieved is the read and write granularity of data blocks, that is, the design scheme in which the data length of user data is smaller than the length of the error correction code.

[0108] Among them, ECC is manifested in the storage device as an error correction code encoding engine ECC Encoder and an error correction code decoding engine ECC Decoder.

[0109] In this application scenario, when the server device 611 receives a read / write command for data processing sent by the client device 610, the Host can initiate a read / write command for the SCM device. When the initiated command is a write command, the write process for data processing can be performed. At this time, the Host can send the data that meets the addressing data granules to the ECC Encoder through the data path logic. The error correction code encoding engine ECC The encoder can perform error correction code encoding on the written data, specifically, performing error correction code encoding operation on multiple different user data in a single code length unit for the error correction code to obtain an error correction code codeword for different user data, the error correction code codeword having a code length greater than the data length of the user data, the error correction code codeword can be based on the user encoded data after multiple encodings, such as U0+U1+U2+U3 and multiple redundant data, such as P0+P1+P2+P3, combined with redundant data P after XOR operation, at this time, the encoded error correction code codeword U0+U1+U2+U3+P can be sent to the PCM storage medium to complete the writing of the user data after error correction code encoding.

[0110] When the initiated command is a read command, a read process for data processing can be performed. At this time, the Host can send the read command to the storage medium. When the storage medium receives the read command for the addressed data particle sent by the Host, it can obtain the error correction code word for the data required to be read by the read command, and send the corresponding ECC code length data unit to the ECC Decoder. The ECC Decoder performs multiple error correction code decoding operations on the error correction code word for the required read data to obtain the required read user data, and can send the read data of the addressed data particle to the Host through the data path logic to complete the data reading.

[0111] In the embodiment of the present application, based on the traditional ECC encoding and decoding algorithm, without changing the code length, a new step-by-step encoding process and redundant data calculation method are proposed, so that the user's addressing granularity is not limited by the ECC code length, that is, by proposing a new encoding and decoding process in which the ECC code length can be larger than the data granularity addressed by the Host, while solving the Host's demand for small-granular addressing, a strong ECC error correction capability is guaranteed, thereby overcoming the constraints of traditional storage components between the Host addressing granularity and the ECC code length.

[0112] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0113] Reference Figure 7 , shows a structural block diagram of an embodiment of an error correction code generation device of the present application, which is applied to a server device and involves a storage component. The storage component has an error correction capability and may specifically include the following modules:

[0114] A user data acquisition module 701, configured to receive a write command for data processing and acquire user data carried in the write command;

[0115] The error correction code encoding module 702 is used to perform multiple error correction code encoding operations on the user data within a single code length unit for the error correction code during the process of performing error correction code encoding on the user data, so as to obtain an error correction code codeword for the user data; the code length of the error correction code codeword is greater than the data length of the user data.

[0116] In an embodiment of the present application, the user data includes a plurality of different user data; the error correction code encoding module 702 may include the following submodules:

[0117] a processing result acquisition submodule, configured to perform multiple error correction code encoding operations on the multiple different user data using the single code length unit to obtain multiple encoding results;

[0118] The error correction codeword generation submodule is used to combine the multiple encoding results to obtain error correction codewords for the multiple different user data.

[0119] In one embodiment of the present application, the processing result acquisition submodule may include the following units:

[0120] A code length splitting unit, used for splitting a single code length unit for an error correction code into a plurality of sub-code length units according to a preset addressing length requirement;

[0121] The error correction code encoding unit is used to divide the multiple different user data, and use the split multiple sub-code length units to perform error correction code encoding operations on the divided user data respectively to obtain multiple encoding results.

[0122] In one embodiment of the present application, the multiple encoding results include user encoded data after multiple encodings and multiple redundant data for the user encoded data, and the error correction code word generation submodule may include the following units:

[0123] The error correction codeword generating unit is used to combine the user coded data after the multiple encodings and the multiple redundant data for the user coded data to obtain an error correction codeword for the error correction codeword.

[0124] In one embodiment of the present application, the error correction codeword generation unit may include the following subunits:

[0125] An XOR processing subunit, configured to perform an XOR operation on the plurality of redundant data for the user coded data to obtain redundant data for the error correction codeword;

[0126] The data splicing subunit is used to splice the user coded data after the multiple encodings with the redundant data for the error correction codeword to obtain the error correction codeword for the multiple different user data.

[0127] In one embodiment of the present application, the device may further include the following modules:

[0128] An error correction code word acquisition module is used to acquire the error correction code word of the read data required for the read command when the received command is a read command;

[0129] The user data acquisition module is used to perform an error correction code decoding operation on the error correction code word for the required read data to obtain the required read user data.

[0130] In one embodiment of the present application, the device further includes the following modules:

[0131] The error correction code decoding module is used to perform an error correction code decoding operation on the error correction code word of the required read data before completing the error correction code encoding operation on the user data within a single code length unit of the error correction code.

[0132] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0133] The present application also provides an electronic device, including:

[0134] The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, each process of the above-mentioned error correction code generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0135] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned error correction code generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0136] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0137] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt 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.

[0138] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.

[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including 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.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0141] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0142] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0143] The above is a detailed introduction to an error correction code generation method, an error correction code generation device, a corresponding electronic device and a corresponding computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for a general technician in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for generating an error correction code, characterized in that: Applied to a server device, involving a storage component, the storage component having an error correction capability, the method comprising: receiving a write command for data processing, and acquiring user data carried by the write command; In the process of performing error correction code encoding on the user data, multiple error correction code encoding operations are performed on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data; the code length of the error correction code word is greater than the data length of the user data; The user data includes a plurality of different user data; and performing a plurality of error correction code encoding operations on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data includes: Using the single code length unit to perform multiple error correction code encoding operations on the multiple different user data to obtain multiple encoding results; The multiple encoding results are combined to obtain error correction code words for the multiple different user data.

2. The method according to claim 1, characterized in that The single code length unit is used to perform multiple error correction code encoding operations on the multiple different user data to obtain multiple encoding results, including: Splitting a single code length unit for an error correction code into a plurality of sub-code length units according to a preset addressing length requirement; The multiple different user data are divided, and the divided multiple sub-code length units are used to perform error correction code encoding operations on the divided user data respectively to obtain multiple encoding results.

3. The method according to claim 1 or 2, characterized in that: The multiple encoding results include user encoded data after multiple encodings and multiple redundant data for the user encoded data, and the multiple encoding results are combined to obtain error correction codewords for the multiple different user data, including: The user coded data after the multiple encodings are combined with a plurality of redundant data for the user coded data to obtain error correction code words for the plurality of different user data.

4. The method according to claim 3, characterized in that The combining the user coded data after the multiple encodings and the multiple redundant data for the user coded data to obtain the error correction codewords for the multiple different user data includes: Performing an XOR operation on the plurality of redundant data for the user coded data to obtain redundant data for the error correction code word; The user coded data after the multiple encodings are concatenated with redundant data for error correction code words to obtain error correction code words for the multiple different user data.

5. The method according to claim 1, characterized in that Also includes: When the received command is a read command, obtaining an error correction code word for the data required to be read by the read command; An error correction code decoding operation is performed on the error correction code word for the required read data to obtain the required read user data.

6. The method according to claim 5, characterized in that Also includes: Before the error correction code encoding operation is completed for the user data within a single code length unit of the error correction code, an error correction code decoding operation is performed on the error correction code word of the required read data.

7. An error correction code generating device, characterized in that: Applied to a server device, involving a storage component, the storage component having an error correction capability, the device comprising: A user data acquisition module, used to receive a write command for data processing and acquire user data carried by the write command; an error correction code encoding module, configured to, in a process of performing error correction code encoding on the user data, perform multiple error correction code encoding operations on the user data within a single code length unit for the error correction code to obtain an error correction code word for the user data; the code length of the error correction code word being greater than the data length of the user data; The user data includes a plurality of different user data; the error correction code encoding module includes: a processing result acquisition submodule, configured to perform multiple error correction code encoding operations on the multiple different user data using the single code length unit to obtain multiple encoding results; The error correction codeword generation submodule is used to combine the multiple encoding results to obtain error correction codewords for the multiple different user data.

8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the error correction code generation method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the error correction code generation method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Scheduled or gradual redundancy encoding schemes for data storage

    US8806296B1