Data randomization storage method, system, storage medium and device

By generating an RS lookup table and extending the RS code, the problem of poor memory randomization effect is solved, efficient random storage of data is achieved, and the reliability and security of the memory are improved.

CN120256327BActive Publication Date: 2025-09-16HANGZHOU CORE POWER SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510726099.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-16
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

Existing memory randomization methods have poor randomization effects, low compatibility, and cannot effectively improve the reliability and security of the memory.

Method used

By generating an RS lookup table, selecting the target RS code for bit width and number expansion, generating a pseudo-random sequence, and performing logical operations with the data to be written, randomized data storage is achieved.

Benefits of technology

The randomization effect of data storage is improved, the security and confidentiality of data are enhanced, resource overhead is reduced, and a general and efficient solution is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256327B_ABST
    Figure CN120256327B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data storage technology, and discloses a data randomization storage method, system, storage medium and device, wherein the data randomization storage method comprises: generating an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes; selecting a plurality of target RS codes in the RS lookup table according to the index information of the data to be written; performing bit width expansion and number expansion on each target RS code to obtain an extended RS code; generating a pseudo-random sequence according to the extended RS code, performing a logical operation on the pseudo-random sequence and the data to be written, and then performing randomized storage. The data randomization storage method has a good randomization effect. During the data storage process, the data can be randomly processed efficiently and accurately, making the storage distribution of the data more reasonable and disordered, greatly enhancing the security and storage reliability of the data, and providing a universal and efficient solution for data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage technology, and in particular to a data randomization storage method, system, storage medium and device. Background Art

[0002] Memory randomization is used to improve memory reliability, reduce error rates, and prevent electrical interference (such as coupling noise from adjacent cells) from affecting data. When writing data, the memory performs some form of pseudo-randomization on the data being written. This makes the actual stored data appear more random, breaking the continuity of the data pattern. A common randomization method uses a pseudo-random number generator (PRNG) to generate a random sequence and then performs mathematical operations on the actual data. The PRNG can be based on a linear feedback shift register (LFSR) or other efficient generator algorithms. However, these common randomization methods do not provide good randomization results and are not compatible with all memories. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a data randomization storage method, system, storage medium, and device, which can effectively solve the problems of poor performance and low compatibility of memory randomization methods.

[0004] In a first aspect, an embodiment of the present application provides a data random storage method, comprising:

[0005] Generate an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes;

[0006] Selecting a plurality of target RS codes in the RS lookup table according to index information of the data to be written;

[0007] Expanding the bit width and number of each target RS code to obtain an extended RS code;

[0008] A pseudo-random sequence is generated according to the extended RS code, and a logic operation is performed on the pseudo-random sequence and the data to be written, and then the data is randomly stored.

[0009] In a first possible embodiment of the first aspect, the data randomization storage method further includes:

[0010] The pseudo-random sequence is bit-inverted so that when data is written in, the pseudo-random sequence before the bit-inversion and the pseudo-random sequence after the bit-inversion are respectively logically operated with the data to be written.

[0011] In a second possible embodiment of the first aspect, the data randomization storage method further includes:

[0012] Determining the depth of the to-be-generated RS lookup table of each storage module according to the number of operation units included in each storage module and the expandable number of the initial RS code;

[0013] The index information is determined according to the writing position information of the data to be written.

[0014] In a third possible embodiment of the first aspect, generating the RS lookup table according to the depth of the to-be-generated RS lookup table and the multiple initial RS codes includes:

[0015] Randomly generating a plurality of different multi-bit numbers as candidate sets of the initial RS code;

[0016] Randomly determining a multi-bit number in the candidate set as an initial RS code of the RS lookup table;

[0017] According to the comparison result of the remaining multi-bit numbers in the candidate set and the Hamming distance of the initial RS code in the RS lookup table, the multi-bit numbers with the largest Hamming distance to the initial RS code are selected multiple times as the initial RS code of the RS lookup table.

[0018] In a fourth possible embodiment of the first aspect, the step of performing bit width expansion and number expansion on each target RS code to obtain an extended RS code includes:

[0019] Performing multiple byte substitutions on the original bytes of each target RS code based on a byte substitution table to obtain multiple substitution bytes;

[0020] The original bytes and each of the substituted bytes are sorted to obtain the RS code after the bit width is expanded.

[0021] In a fifth possible embodiment of the first aspect, the bit width expansion and number expansion of each target RS code to obtain an extended RS code further includes:

[0022] Using the RS code after the bit width expansion as the initial state value of the shift register, generating a new state value through shifting and feedback operations, and using the new state value as a new RS code;

[0023] The current state value is shifted and fed back multiple times by the shift register to generate multiple state values, and the generated multiple state values ​​are used as the new RS codes to expand the number of the RS codes after the bit width is expanded.

[0024] In a sixth possible embodiment of the first aspect, before writing the data, generating a pseudo-random sequence according to the extended RS code includes:

[0025] Setting the number of bits of a fixed plaintext to all zeros, and using an encryptor to expand each of the expanded RS codes as an initial key to obtain multiple round keys;

[0026] Multiple rounds of encryption operations are performed according to the round keys to obtain the pseudo-random sequence.

[0027] In a seventh possible embodiment of the first aspect, a calculation formula for the depth of the RS lookup table is:

[0028] (1)

[0029] In formula (1), is the depth of the RS lookup table, is the number of the operation units, is the expandable number of the initial RS code.

[0030] In an eighth possible embodiment of the first aspect, the index information includes an index start value and an index offset, and a calculation formula for the index start value is:

[0031] (2)

[0032] In formula (2), is the index starting value, is the number of erasures of the storage module, is the storage plane sequence number, is the ordinal number of the storage module, is the depth of the RS lookup table;

[0033] The calculation formula of the index displacement is:

[0034] (3)

[0035] In formula (3), is the index displacement, is the number of code words containing error correction code in a single logical page, is the sequence number of the codeword of the error correction code, It is the logical page number.

[0036] In a second aspect, an embodiment of the present application provides a data randomization storage system, comprising:

[0037] A lookup table generating module, configured to generate an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes;

[0038] A search module, configured to select a plurality of target RS codes in the RS lookup table according to index information of the data to be written;

[0039] An expansion module, configured to expand the bit width and number of each target RS code to obtain an extended RS code;

[0040] The storage module is used to generate a pseudo-random sequence according to the extended RS code, perform a logical operation on the pseudo-random sequence and the data to be written, and then perform random storage.

[0041] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed on a processor, the above-mentioned data randomization storage method is implemented.

[0042] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the above-mentioned data randomization storage method.

[0043] The embodiments of the present application have the following beneficial effects:

[0044] A data randomization storage method of the present embodiment includes: generating an RS lookup table according to the depth of the RS lookup table to be generated and multiple initial RS codes; selecting several target RS codes in the RS lookup table according to the index information of the data to be written; expanding the bit width and number of each target RS code to obtain an extended RS code; generating a pseudo-random sequence according to the extended RS code, and performing a logical operation on the pseudo-random sequence and the data to be written and then randomly storing it. This data randomization storage method has a good randomization effect. During the data storage process, it can efficiently and accurately perform randomization on the data, making the storage distribution of the data more reasonable and disordered, greatly enhancing the security and confidentiality of the data. Under the important premise of ensuring that performance is not affected, this data randomization storage method successfully achieves resource overhead savings, providing a universal and efficient solution for data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0046] Figure 1A first flow chart of the randomized data storage method according to an embodiment of the present application is shown;

[0047] Figure 2 A schematic diagram of the structure of the RS lookup table in an embodiment of the present application is shown;

[0048] Figure 3 A schematic diagram showing a target RS code selected in an RS lookup table according to an embodiment of the present application is shown;

[0049] Figure 4 A second flow chart of the randomized data storage method according to an embodiment of the present application is shown;

[0050] Figure 5 A schematic diagram showing bit width expansion of RS code according to an embodiment of the present application is shown;

[0051] Figure 6 A schematic diagram showing the number expansion of RS codes according to an embodiment of the present application is shown;

[0052] Figure 7 A first schematic diagram of an encryptor according to an embodiment of the present application is shown;

[0053] Figure 8 A second schematic diagram of the encryptor according to an embodiment of the present application is shown;

[0054] Figure 9 A structural diagram of a data randomization storage system according to an embodiment of the present application is shown.

[0055] Description of main component symbols:

[0056] 200 - data randomization storage system; 210 - lookup table generation module; 220 - lookup module; 230 - expansion module; 240 - storage module. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0058] The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but rather merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0059] Hereinafter, the terms "including", "having" and their cognates used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the aforementioned items, and should not be understood as excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the aforementioned items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the aforementioned items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and should not be understood as indicating or implying relative importance.

[0060] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.

[0061] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0062] Memory is a crucial component of computer systems, used to store programs and data. For sensitive data stored in memory, such as user passwords and financial information, randomization can effectively prevent data leakage. Even if the memory is illegally accessed, it is difficult for an attacker to directly obtain valuable information from the randomized data. Because randomization changes the original structure and presentation of the data, without the correct decryption or restoration methods, the data becomes as difficult to interpret as garbled code. In some cases, data randomization can also improve the memory's data storage reliability. For example, in flash memory, the voltage characteristics of NAND Flash memory are affected by the data pattern. Randomized data can balance the 0-1 values ​​in the target area. If adjacent word lines and bit lines have identical data, there will be significant coupling interference between them. Consecutive all-0 or all-1 values ​​will also result in high write noise. Through data randomization, the 0-1 data is more evenly distributed throughout the memory space, reducing coupling interference between NAND Flash memories, thereby improving the memory's storage reliability. The present application provides a data randomization storage method with the advantages of good randomization and compatibility with all memories.

[0063] The data random storage method is described below with reference to some specific embodiments.

[0064] Figure 1A flow chart of a data randomization storage method according to an embodiment of the present application is shown. Exemplarily, the data randomization storage method includes the following steps:

[0065] S110 , generating an RS (Root Seed) lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes.

[0066] Exemplary, such as Figure 2 As shown, the RS lookup table includes multiple initial RS codes, and the RS code is a string of random numbers generated by a random number generator. The depth of the RS lookup table is the number of initial RS codes included in the RS lookup table. The data randomization storage method determines the depth of the RS lookup table to be generated for each storage module based on the number of operating units included in each storage module and the expandable number of initial RS codes.

[0067] In one embodiment, the data randomization storage method determines the depth of the generated RS lookup table based on the number of basic operation units (chunks) within the supported storage module block and the number of expandable initial RS codes, i.e., the number of seed values ​​used in the initial RS code initialization encoding process. A basic operation unit corresponds to a code word (CW) of the error correction code. Assuming the number of CWs within a single block is Ncw and the number of initial RS codes expanded is K, the number of initial RS codes, i.e., the depth of the RS lookup table, is calculated as follows: ,in, is the depth of the RS lookup table, is the number of the operation units, is the expandable number of the initial RS code.

[0068] For example, in one embodiment, the number of logical pages in a single block of the media is first determined by consulting the media's data sheet. Different media blocks contain different numbers of logical pages. The maximum capacity of the media to be supported can be chosen, such as designing for 6144 logical pages. A logical page can be divided into several sub-chunks or CWs, depending on the design of the master controller, and can be divided into 4 or 8 sub-chunks. The number of chunks in a single block is the number of pages multiplied by the number of chunks in a single page.

[0069] Optionally, to minimize storage overhead, the bit width of the initial RS code is set to 16 bits, that is, the bit width of the RS lookup table is 16 bits. An initial random RS code is set and gradually added to the RS lookup table until the total number reaches the depth of the RS lookup table. The principle of adding initial RS codes is that the newly added initial RS codes make the average Hamming distance of the initial RS codes in the existing RS lookup table as large as possible.

[0070] In one embodiment, if Figure 4 As shown, the data random storage method generates an RS lookup table according to the depth of the RS lookup table to be generated and multiple initial RS codes, including the following steps:

[0071] S111 , randomly generate multiple different multi-bit numbers as candidate sets of initial RS codes.

[0072] S112, randomly determine a multi-bit number in the candidate set as the initial RS code of the RS lookup table.

[0073] S113, based on the comparison result of the remaining multi-bit numbers in the candidate set and the Hamming distance of the initial RS code in the RS lookup table, multiple multi-bit numbers with the largest Hamming distance to the initial RS code are selected as the initial RS code in the RS lookup table.

[0074] In one embodiment, multiple different multi-bit numbers are used as elements of a candidate set, and initial RS codes are used as elements of an RS lookup table. After adding the first initial RS code to the RS lookup table, the multi-bit number is deleted from the candidate set. When adding the second initial RS code to the RS lookup table, the remaining elements of the candidate set are traversed, and the Hamming distance (i.e., the number of different bits) between each element in the candidate set and all elements in the RS lookup table are compared. At this point, there is only one element in the RS lookup table. The element in the candidate set with the largest Hamming distance is selected as the second element in the RS lookup table and deleted from the candidate set. When adding the third element to the RS lookup table, the remaining elements of the candidate set are traversed, and the Hamming distance between each element in the candidate set and all elements in the RS lookup table is compared. At this point, a comparison with two elements in the RS lookup table is required, and the cumulative Hamming distance is recorded. The element in the candidate set with the largest cumulative Hamming distance is selected as the third element in the RS lookup table and deleted from the candidate set. This process is repeated repeatedly until the set depth of the RS lookup table is reached.

[0075] S120 , selecting several target RS codes in the RS lookup table according to the index information of the data to be written.

[0076] In one embodiment, the randomized data storage method determines index information based on the write location information of the data to be written. The index information includes the index start value (start) and the index offset (offset). The block size of different media corresponds to different search depths, that is, the maximum value of the index offset. Figure 3 As shown, this randomized data storage method selects the first target RS code from the RS lookup table based on the index starting value. Starting from the first initial RS code, the method continuously reads a number of target RS codes equal to the index offset to complete the scrambling of the block. The write location information for the data to be written includes the storage plane number (planeIdx), the block erase count (EC) ecValue, the block number blockIdx, the logical page (LP) number pageIdx, and the clock width (CW) number cwIdx. The plane number refers to the physical plane number to which the data is written. A memory device typically consists of multiple physical planes, each containing multiple blocks, and each block containing multiple pages. The erase count (EC) is the number of times a storage module in a storage device (such as a solid-state drive or flash memory) has been erased.

[0077] In another embodiment, the erase count of the block, the storage plane number, and the block number are used to determine the index start value. The calculation formula of the index start value is: start=(ecValue*8+planeIdx*8+blockIdx)%Nrs, where is the starting index value, is the number of erase times of the storage module, is the storage plane sequence number, is the ordinal number of the storage module; the logical page number, the ordinal number of the error correction code codeword and the number of error correction code codewords in a single logical page are used to determine the index offset. The calculation formula of the index offset is: offset=[(pageIdx*m+cwIdx) / 32], where, is the index displacement, is the number of code words containing error correction code in a single logical page, The sequence number of the codeword of the error correction code.

[0078] S130 , performing bit width expansion and number expansion on each target RS code to obtain an extended RS code.

[0079] In one embodiment, if Figure 5As shown, this randomized data storage method expands the bit width and number of each target RS code to obtain an extended RS code. The method includes: performing multiple byte substitutions on the original bytes of each target RS code based on a byte substitution table to obtain multiple substituted bytes; and sorting the original bytes and the substituted bytes to obtain the RS code with the expanded bit width. It is understood that an encryptor requires an initialization key of a specific length to perform encryption operations. This randomized data storage method expands the bit width of the target RS code to adapt to the initialization key length required by the encryptor.

[0080] In one embodiment, if Figure 6 As shown, the randomized data storage method expands the bit width and number of each target RS code to obtain an extended RS code, and further includes: using the RS code after the bit width expansion as the initial state value of the shift register, generating a new state value through shifting and feedback operations, and using the new state value as a new RS code; repeatedly shifting and feeding back the current state value through the shift register to generate multiple state values, and using the generated multiple state values ​​as new RS codes to expand the number of the RS code after the bit width expansion. It can be understood that the RS code after the bit width expansion is expanded to multiple different RS codes after the bit width expansion to meet the RS code number requirements of large-capacity media.

[0081] In another embodiment, each extended RS code is unique and has a different extended sequence number. The extended sequence number of the extended RS code corresponding to the current CW can be determined based on the sequence number of the LP and the sequence number of the CW. For example, the extended sequence number of the extended RS code corresponding to the current CW is the LP sequence number multiplied by 8, the sum of the LP sequence number and the CW sequence number, and then the remainder is obtained by dividing the result by 32.

[0082] S140 , generating a pseudo-random sequence according to the extended RS code, performing a logical operation on the pseudo-random sequence and the data to be written, and then randomly storing the resultant data.

[0083] In one embodiment, if Figure 7 As shown, before data is written, this data randomization storage method generates a pseudo-random sequence based on an extended RS code, including: setting the fixed plaintext to all zeros per bit, using an encryptor to expand each extended RS code as an initial key to obtain multiple round keys; and performing multiple rounds of encryption operations based on each round key to obtain a pseudo-random sequence. Within a CW, the pseudo-random sequence output by the encryptor is different each time and is sufficiently random. Specifically, the fixed plaintext is all zeros per bit, and within a CW, except for the initialization key, which is the extended RS code, each key input is the last round key of the previous input word.

[0084] In another embodiment, the encryptor performs the following steps in each encryption round: Byte Substitution (SubBytes): Substitutes each byte in the data block using a nonlinear substitution table (S-box); Row Shift (ShiftRows): Circularly shifts each row in the data block to the left, with different rows shifted by different distances; Column Mixing (MixColumns): Linearly transforms each column in the data block using matrix multiplication; Round Key Addition (AddRoundKey): XORs the round key of the current round with the data block; In the final encryption round, the Column Mixing operation is typically omitted to simplify the decryption process. The encryptor supports different key lengths, including 128 bits, 192 bits, and 256 bits, where different key lengths result in different numbers of encryption rounds.

[0085] As you can understand, the key expansion process in an encryptor expands the original key into multiple round keys to meet the requirements of multi-round encryption. The purpose of key expansion is to ensure that each round of encryption uses a different key, thereby increasing encryption security. Multi-round encryption in an encryptor can enhance encryption security. Each round scrambles and diffuses the data, making the ciphertext more difficult to crack. At the same time, using different round keys also increases the key space, making data decryption more difficult.

[0086] In one embodiment, if Figure 8 As shown, this data randomization storage method performs bitwise inversion of a pseudo-random sequence so that, when data is written, both the pseudo-random sequence before and after the bitwise inversion are logically operated on the data to be written. This data randomization storage method utilizes the encryptor's continuous output of logical operation user data, ensuring that the data after the logical operation meets the randomization requirements of the medium. For example, if the encryptor outputs 128 bits each time and the user input word size is set to w bits, then each logical operation can continuously output 128 / w input words. If the pseudo-random sequence output by the encryptor is further inverted, the logical operation can continue for 128 / w input words.

[0087] As you can understand, the bitwise inversion operation flips each byte in the pseudo-random sequence's state matrix during the final encryption phase, changing each bit of each byte from 0 to 1 or from 1 to 0. This operation reduces the number of calculations performed by the encryptor, halving the dynamic power consumption of the encryption engine while maintaining the randomization effect.

[0088] Optionally, during encryption, the encryptor performs an XOR operation on the data to be written using a pseudo-random sequence, and then stores the result in a randomized form. This method effectively protects data confidentiality and improves data storage reliability. Because the XOR operation is reversible, the same operation can be used for decryption: the ciphertext data is XORed with the key data again to recover the original plaintext data.

[0089] like Figure 9 As shown, another embodiment of the present application further provides a data randomization storage system 200, comprising:

[0090] The lookup table generating module 210 is configured to generate an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes.

[0091] The search module 220 is configured to select a plurality of target RS codes in the RS lookup table according to index information of the data to be written.

[0092] The expansion module 230 is configured to expand the bit width and number of each target RS code to obtain an extended RS code.

[0093] The storage module 240 is configured to generate a pseudo-random sequence according to the extended RS code, perform a logical operation on the pseudo-random sequence and the data to be written, and then perform random storage.

[0094] The present application also provides an electronic device. Exemplarily, the electronic device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program, thereby enabling the electronic device to execute the above-mentioned randomized data storage method.

[0095] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0096] The memory may be, but is not limited to, non-volatile memory (NVM), random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM). The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving an execution instruction.

[0097] This application also provides a computer-readable storage medium for storing the computer program used in the electronic device. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0098] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0099] In addition, the functional modules or units in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0100] If a function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a smart phone, personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of this application.

[0101] The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the protection scope of the present application.

Claims

1. A data random storage method, characterized in that: include: Generate an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes; Selecting a plurality of target RS codes in the RS lookup table according to index information of the data to be written; Expanding the bit width and number of each target RS code to obtain an extended RS code; A pseudo-random sequence is generated according to the extended RS code, and a logic operation is performed on the pseudo-random sequence and the data to be written, and then the data is randomly stored.

2. The data random storage method according to claim 1, characterized in that: Also includes: The pseudo-random sequence is bit-inverted so that when data is written in, the pseudo-random sequence before the bit-inversion and the pseudo-random sequence after the bit-inversion are respectively logically operated with the data to be written.

3. The data random storage method according to claim 1, characterized in that: Also includes: Determining the depth of the to-be-generated RS lookup table of each storage module according to the number of operation units included in each storage module and the expandable number of the initial RS code; The index information is determined according to the writing position information of the data to be written.

4. The data random storage method according to claim 1, wherein: The step of generating an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes includes: Randomly generating a plurality of different multi-bit numbers as candidate sets of the initial RS code; Randomly determining a multi-bit number in the candidate set as an initial RS code of the RS lookup table; According to the comparison result of the remaining multi-bit numbers in the candidate set and the Hamming distance of the initial RS code in the RS lookup table, the multi-bit numbers with the largest Hamming distance to the initial RS code are selected multiple times as the initial RS code of the RS lookup table.

5. The data random storage method according to claim 1, wherein: The step of performing bit width expansion and number expansion on each of the target RS codes to obtain an extended RS code comprises: Performing multiple byte substitutions on the original bytes of each target RS code based on a byte substitution table to obtain multiple substitution bytes; The original bytes and each of the substituted bytes are sorted to obtain the RS code after the bit width is expanded.

6. The data random storage method according to claim 1, wherein: The step of performing bit width expansion and number expansion on each of the target RS codes to obtain an extended RS code further includes: Using the RS code after the bit width expansion as the initial state value of the shift register, generating a new state value through shifting and feedback operations, and using the new state value as a new RS code; The current state value is shifted and fed back multiple times by the shift register to generate multiple state values, and the generated multiple state values ​​are used as the new RS codes to expand the number of the RS codes after the bit width is expanded.

7. The data random storage method according to claim 1, characterized in that: The generating of a pseudo-random sequence according to the extended RS code comprises: Setting the number of bits of a fixed plaintext to all zeros, and using an encryptor to expand each of the expanded RS codes as an initial key to obtain multiple round keys; Multiple rounds of encryption operations are performed according to the round keys to obtain the pseudo-random sequence.

8. The data random storage method according to claim 3, wherein: The calculation formula of the depth of the RS lookup table is: (1) In formula (1), is the depth of the RS lookup table, the depth of the RS lookup table is the number of initial RS codes included in the RS lookup table, is the number of the operation units, is the expandable number of the initial RS code.

9. The data random storage method according to claim 3, wherein: The index information includes an index starting value and an index offset. The calculation formula of the index starting value is: (2) In formula (2), is the index starting value, is the number of erasures of the storage module, is the storage plane sequence number, is the ordinal number of the storage module, is the depth of the RS lookup table; The calculation formula of the index displacement is: (3) In formula (3), is the index displacement, is the number of code words containing error correction code in a single logical page, is the sequence number of the codeword of the error correction code, It is the logical page number.

10. A data randomization storage system, characterized in that: include: A lookup table generating module, configured to generate an RS lookup table according to the depth of the RS lookup table to be generated and a plurality of initial RS codes; A search module, configured to select a plurality of target RS codes in the RS lookup table according to index information of the data to be written; An expansion module, configured to expand the bit width and number of each target RS code to obtain an extended RS code; The storage module is used to generate a pseudo-random sequence according to the extended RS code, perform a logical operation on the pseudo-random sequence and the data to be written, and then perform random storage.

11. A computer-readable storage medium, characterized in that The device stores a computer program, which, when executed on a processor, implements the data randomization storage method according to any one of claims 1 to 9.

12. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the data randomization storage method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Randomization circuit, memory control unit, memory, communicating system and method

    CN102543182A

  • Pseudo-random method and system, mobile terminal and storage medium

    CN111596889A