Data randomization storage method and system, storage medium and equipment

By generating RS lookup tables and expanding RS codes to generate pseudo-random sequences, the problem of poor memory randomization effect is solved, efficient data randomization storage is achieved, and the security and reliability of memory is improved.

CN120256327AActive Publication Date: 2025-07-04HANGZHOU CORE POWER SEMICON CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing memory randomization method has poor randomization effect and low compatibility, which cannot effectively improve the reliability of the memory and prevent the impact of electrical interference on data.

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 to realize randomized data storage.

Benefits of technology

It realizes efficient data randomization processing, improves the security and reliability of data storage, is compatible with all memory, and saves resource overhead without affecting performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256327A_ABST
    Figure CN120256327A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data storage, and discloses a data randomization storage method and system, a storage medium and equipment, and the data randomization storage method comprises the steps: generating an RS lookup table according to the depth of the to-be-generated RS lookup table 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 to-be-written data; performing bit width expansion and number expansion on each target RS code to obtain an expanded RS code; and generating a pseudo-random sequence according to the extended RS code, performing logic operation on the pseudo-random sequence and the data to be written, and performing randomization storage. According to the data randomization storage method, the randomization effect is good, in the data storage process, data can be subjected to randomization processing efficiently and accurately, data storage distribution is more reasonable and disordered, data safety and storage reliability are greatly enhanced, and a universal and efficient solution is provided for data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data storage, and in particular, to a method, system, storage medium, and device for randomizing data storage. Background Art

[0002] Memory randomization is used to improve the reliability of the memory, reduce the error rate, and prevent the influence of electrical interference (such as the coupling noise of adjacent cells) on data. When writing data, the memory will perform a certain form of pseudo-randomization on the data to be written, which makes the actually stored data look more random and breaks the continuity of the data pattern. A common randomization method is to use a Pseudo-Random Number Generator (PRNG) to generate a random sequence and perform a mathematical operation on it with the actual data. The PRNG can be based on a Linear Feedback Shift Register (LFSR) or other efficient generator algorithms. However, the above common randomization methods have poor randomization effects and are not compatible with all memories. Summary of the Invention

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

[0004] In a first aspect, the embodiments of this application provide a method for randomizing data storage, including: 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 number 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 of the target RS codes 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 storing it randomly.

[0005] In a first possible embodiment of the first aspect, the method for randomizing data storage further includes: Taking the bitwise inversion of the pseudo-random sequence, so that when writing data input, the pseudo-random sequence before bitwise inversion and the pseudo-random sequence after bitwise inversion are respectively subjected to a logical operation with the data to be written.

[0006] In a second possible embodiment of the first aspect, the method for randomizing data storage further includes: Determine the depth of the to-be-generated RS lookup table for each of the storage modules according to the number of operation units included in each storage module and the scalable number of the initial RS codes. Determine the index information according to the write position information of the to-be-written data.

[0007] In the third possible embodiment of the first aspect, the generating the RS lookup table according to the depth of the to-be-generated RS lookup table and a plurality of initial RS codes includes: Randomly generate a plurality of different multi-bit numbers as an alternative set of the initial RS codes; Randomly determine one multi-bit number in the alternative set as the initial RS code of the RS lookup table; According to the comparison results of the Hamming distances between the remaining multi-bit numbers in the alternative set and the initial RS code in the RS lookup table, repeatedly select the multi-bit number with the largest Hamming distance from the initial RS code as the initial RS code of the RS lookup table.

[0008] In the fourth possible embodiment of the first aspect, the expanding the bit width and the number of each of the target RS codes to obtain the expanded RS code includes: Based on the byte substitution table, perform byte substitution on the original bytes of each of the target RS codes multiple times to obtain a plurality of substituted bytes; Sort the original bytes and each of the substituted bytes to obtain the RS code after bit width expansion.

[0009] In the fifth possible embodiment of the first aspect, the expanding the bit width and the number of each of the target RS codes to obtain the expanded RS code further includes: Use the RS code after bit width expansion as the initial state value of the shift register, generate new state values through shift and feedback operations, and use the new state values as new RS codes; Through the shift register, shift and feedback the current state value multiple times to generate a plurality of state values, and use the generated plurality of state values as the new RS codes to perform number expansion on the RS code after bit width expansion.

[0010] In the sixth possible embodiment of the first aspect, the generating a pseudo-random sequence according to the expanded RS code before data writing includes: Set the fixed plaintext to all zeros for each bit number, and expand each of the expanded RS codes as the initial key through an encryptor to obtain a plurality of round keys; Perform multi-round encryption operations according to each of the round keys to obtain the pseudo-random sequence.

[0011] In the seventh possible embodiment of the first aspect, the calculation formula for the depth of the RS lookup table is: (1) 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 codes.

[0012] In the eighth possible embodiment of the first aspect, the index information includes an index start value and an index displacement, and the calculation formula for the index start value is: (2) In formula (2), is the index start value, is the number of erasure times of the storage module, storage plane serial number, is the ordinal number of the storage module, is the depth of the RS lookup table; The calculation formula for the index displacement is: (3) In formula (3), is the index displacement, is the number of codewords with error correction codes in a single logical page, is the serial number of the codeword of the error correction code, is the logical page serial number.

[0013] In a second aspect, an embodiment of the present application provides a data randomization storage system, including: a lookup table generation 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 lookup module, configured to select a plurality of target RS codes in the RS lookup table according to the index information of the data to be written; an expansion module, configured to perform bit width expansion and number expansion on each of the target RS codes to obtain expanded RS codes; a storage module, configured to generate a pseudo-random sequence according to the expanded RS codes, and perform logical operation on the pseudo-random sequence and the data to be written and then perform randomized storage.

[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed on a processor, the above data randomization storage method is implemented.

[0015] Fourthly, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor is configured to execute the computer program to implement the above data randomization storage method.

[0016] The embodiments of the present application have the following beneficial effects: A data randomization storage method according to this embodiment includes: 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 several 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, and performing logical operation on the pseudo-random sequence and the data to be written for randomized storage. This data randomization storage method has good randomization effect. During the data storage process, it can efficiently and accurately randomize the data, making the storage distribution of the data more reasonable and disordered, and greatly enhancing the security and confidentiality of the data. This data randomization storage method successfully realizes the saving of resource overhead on the premise of ensuring that the performance is not affected, providing a general and efficient solution for data storage. Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so they should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 Shows a first flowchart of the data randomization storage method according to the embodiment of the present application; Figure 2 Shows a structural diagram of an RS lookup table according to an embodiment of the present application; Figure 3 Shows a schematic diagram of selecting target RS codes in the RS lookup table according to an embodiment of the present application; Figure 4 Shows a second flowchart of the data randomization storage method according to the embodiment of the present application; Figure 5 Shows a schematic diagram of bit-width expansion of an RS code according to an embodiment of the present application; Figure 6 Shows a schematic diagram of number expansion of an RS code according to an embodiment of the present application; Figure 7 Shows a first schematic diagram of an encryptor according to an embodiment of the present application; Figure 8Shows the second schematic diagram of the encryptor according to the embodiment of the present application; Figure 9 Shows the structural schematic diagram of the data randomization storage system according to the embodiment of the present application.

[0019] Main element symbol description: 200 - Data randomization storage system; 210 - Lookup table generation module; 220 - Lookup module; 230 - Expansion module; 240 - Storage module. Detailed implementation manners

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

[0021] Generally, the components of the embodiments of the present application described and shown in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0022] In the following text, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are only intended to represent specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items. In addition, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0023] Unless otherwise limited, all terms (including technical terms and scientific terms) used here have the same meaning as those commonly understood by those of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in a commonly used dictionary) will be interpreted as having the same meaning as the contextual meaning in 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.

[0024] Next, some implementation manners of the present application will be described in detail in conjunction with the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0025] Memory is an important component in a computer system and is used to store programs and data. For sensitive data stored in memory, such as users' passwords, financial information, etc., randomization can effectively prevent data leakage. Even if the memory is illegally accessed, it is very difficult for attackers 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 method, the data is as difficult to interpret as garbled characters. In some cases, data randomization can also improve the data storage reliability of the memory. For example, in flash memory, the voltage characteristics in NAND Flash are affected by the data pattern. Randomized data can make the 0~1 in the target area balanced. If the data of adjacent word lines and bit lines are exactly the same, there will be a relatively large coupling interference between them; continuous all-0 or all-1 also has a high write noise. Through data randomization, the 0~1 data is more evenly distributed in the entire memory space, reducing the coupling interference between NAND Flash, thereby improving the storage reliability of the memory. This application provides a data randomization storage method, which has the advantages of good randomization effect and compatibility with all memories.

[0026] The following will illustrate the data randomization storage method in combination with some specific embodiments.

[0027] Figure 1 A flowchart of the data randomization storage method according to an embodiment of this application is shown. Exemplarily, the data randomization storage method includes the following steps: S110, generate an RS lookup table according to the depth of the RS (Root Seed) lookup table to be generated and multiple initial RS codes.

[0028] Exemplarily, as Figure 2 shown, the RS lookup table includes multiple initial RS codes. An 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 according to the number of operation units included in each storage module and the expandable number of initial RS codes.

[0029] In one embodiment, the data randomized storage method initializes the encoding process according to the number of basic operation units (chunks) within the storage module Block to be supported and the expandable number of initial RS codes, that is, the number of different seed values that can be used for the initial RS codes, to determine the depth of the RS lookup table to be generated. Wherein, a basic operation unit corresponds to a code word (CW) of an error correction code. Assume that the number of CWs within a single Block is Ncw, and the expanded data of the number of initial RS codes is K. Then, the number of initial RS codes, that is, the calculation formula for the depth of the RS lookup table is: , where is the depth of the RS lookup table, is the number of the operation units, is the expandable number of the initial RS codes.

[0030] For example, in one embodiment, first determine the number of logical pages (Pages) of a single Block in the medium by referring to the data manual of the medium. Different media single Blocks include different numbers of logical Pages. The maximum capacity of the medium to be supported can be taken. For example, the number of designed logical Pages is 6144. A logical Page can be divided into several sub-chunks or CWs, which depends on the design of the host controller and can be divided into 4 or 8. The number of chunks in a single block is the number of Pages multiplied by the number of chunks in a single Page.

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

[0032] In one embodiment, as Figure 4 shown, the data randomized 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: S111, randomly generate multiple different multi-bit numbers as the alternative set of the initial RS codes.

[0033] S112, randomly determine one multi-bit number in the alternative set as the initial RS code of the RS lookup table.

[0034] S113, according to the comparison results of the Hamming distances between the remaining multi-bit numbers in the alternative set and the initial RS code in the RS lookup table, select the multi-bit number with the largest Hamming distance from the initial RS code as the initial RS code of the RS lookup table multiple times.

[0035] In one embodiment, multiple different multi-bit numbers serve as elements of an alternative set, and an initial RS code serves as an element of an RS lookup table. After adding the first initial RS code in the RS lookup table, the multi-bit number is deleted from the alternative set. When adding the second initial RS code in the RS lookup table, traverse the remaining elements in the alternative set, and compare the Hamming distance between each element in the alternative set and all elements in the RS lookup table, that is, the number of different bits. At this time, there is only one element in the RS lookup table. Select the element in the alternative set with the maximum Hamming distance as the second element in the RS lookup table, and delete this element from the alternative set. When adding the third element in the RS lookup table, traverse the remaining elements in the alternative set, and compare the Hamming distance between each element in the alternative set and all elements in the RS lookup table. At this time, it is necessary to compare with two elements in the RS lookup table, and record the sum of the Hamming distances. Select the element in the alternative set with the maximum cumulative Hamming distance as the third element in the RS lookup table, and delete this element from the alternative set. And so on until the set depth of the RS lookup table is reached.

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

[0037] In one embodiment, the randomized data storage method determines index information according to the write position information of the data to be written. The index information includes an index start value (start) and an index offset. The Block sizes of different media correspond to different lookup depths, that is, the maximum value of the index offset. As Figure 3 shown, the randomized data storage method starts from the index start value to select the first target RS code in the RS lookup table, and continuously reads the same number of target RS codes as the index offset starting from the first initial RS code to complete the scrambling of the Block. The write position information of the data to be written includes the storage plane (Plane) serial number (planeIdx), the erase count (Erase Count, EC) ecValue of the Block, the serial number blockIdx of the Block, the serial number pageIdx of the logical page (Logical Page, LP), and the serial number cwIdx of the CW. The Plane serial number refers to the number of the physical plane where the data is to be written. A memory usually consists of multiple physical planes (Planes), each plane contains multiple blocks (Blocks), and each block contains multiple pages (Pages). The erase count (Erase Count, EC) is the number of times a certain storage module in a storage device (such as a solid-state drive, flash memory, etc.) has been erased.

[0038] In another embodiment, the erase count of the Block, the storage plane serial number, and the Block ordinal number are used to determine the index start value. The calculation formula for the index start value is: , where is the starting value of the index, is the number of erasures of the storage module, is the storage plane number, is the ordinal number of the storage module.

[0039] The logical page number, the number of the codeword of the error correction code, and the number of codewords of the error correction code contained in a single logical page are used to determine the index shift. The calculation formula of the index shift is: , where is the index shift, is the number of codewords of the error correction code contained in a single logical page, is the number of the codeword of the error correction code, and pageIdx is the logical page number.

[0040] S130. Perform bit-width expansion and number expansion on each target RS code to obtain an extended RS code.

[0041] In one embodiment, as Figure 5 shown, the randomized data storage method performs bit-width expansion and number expansion on each target RS code to obtain an extended RS code, including: performing multiple byte substitutions on the original bytes of each target RS code based on a byte substitution table to obtain multiple substituted bytes; sorting the original bytes and each substituted byte to obtain the RS code after bit-width expansion. It can be understood that the encryptor requires an initialization key of a specific length for the encryption operation, and the randomized data storage method adapts to the length of the initialization key required by the encryptor by performing bit-width expansion on the target RS code.

[0042] In one embodiment, as Figure 6 shown, the randomized data storage method performs bit-width expansion and number expansion on each target RS code to obtain an extended RS code, and further includes: using the RS code after bit-width expansion as the initial state value of a shift register, generating new state values through shift and feedback operations, and using the new state values as new RS codes; generating multiple state values by performing shift and feedback operations on the current state value through the shift register multiple times, and using the generated multiple state values as new RS codes to perform number expansion on the RS code after bit-width expansion. It can be understood that the RS code after bit-width expansion is expanded to multiple RS codes after bit-width expansion with different bit widths to cover the requirement of the large-capacity medium for the number of RS codes.

[0043] In another embodiment, each extended RS code is different and has a different extension serial number. The extension serial number of the extended RS code corresponding to the current CW can be determined according to the serial number of the LP and the serial number of the CW. For example, the extension serial number of the extended RS code corresponding to the current CW is the remainder obtained by adding the product of the serial number of the LP and 8 to the serial number of the CW and then dividing the result by 32.

[0044] S140. 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 randomized storage.

[0045] In one embodiment, as Figure 7 shown, before data writing, the data randomized storage method generates a pseudo-random sequence according to the extended RS code, including: setting the fixed plaintext to all zeros for each bit number, and expanding each extended RS code as the initial key through an encryptor to obtain multiple round keys; performing multiple rounds of encryption operations according to each round key to obtain a pseudo-random sequence. Among them, within one CW, the pseudo-random sequences output by the encryptor each time are different and random enough. The specific method is that each bit number of the fixed plaintext is all zero. Within one CW, except that the initialization key is the extended RS code, the key input for each time is the last round key of the previous input word.

[0046] In another embodiment, the encryptor performs the following steps in each round of encryption operation: Byte Substitution (SubBytes): Replace each byte in the data block through a non-linear substitution table (S-box); Row Shift (ShiftRows): Circularly shift each row in the data block, and the shifting distances of different rows are different; Column Mixing (MixColumns): Perform a linear transformation on each column of the data block, which is realized through matrix multiplication; Add Round Key: Perform an exclusive OR operation on the current round key and the data block; In the last round of encryption, the column mixing operation is usually omitted to simplify the decryption process. The encryptor supports keys of different lengths, including 128 bits, 192 bits, and 256 bits. Among them, when the key lengths are different, the number of encryption rounds is also different.

[0047] It can be understood that the key expansion process of the encryptor is to expand the original key into multiple round keys to meet the requirements of multi-round encryption. The purpose of key expansion is to ensure that different keys are used in each round of encryption, thereby increasing the security of encryption. The multi-round encryption operation of the encryptor can increase the security of encryption. Each round of operation will confuse and diffuse the data, making the ciphertext more difficult to crack. At the same time, using different round keys also increases the key space and improves the difficulty of data being cracked.

[0048] In one embodiment, as Figure 8As shown, this data randomized storage method performs bitwise inversion on a pseudo-random sequence. When writing data input, logical operations are respectively performed on the pseudo-random sequence before bitwise inversion and the pseudo-random sequence after bitwise inversion with the data to be written. This data randomized storage method uses the continuous output of an encryptor to perform logical operations on user data, enabling the data after logical operations to meet the randomization requirements of the medium. For example, the output of the encryptor each time is 128 bits. If the size of the user input word is set to w bits, then each logical operation can continuously output 128 / w input words for logical operations; if the pseudo-random sequence output by the encryptor each time is further inverted, 128 / w more input words can be logically operated on.

[0049] It can be understood that the bitwise inversion operation flips each byte in the state matrix of the pseudo-random sequence at the last stage of encryption, that is, changes each bit of each byte from 0 to 1 or from 1 to 0. The bitwise inversion operation reduces the number of calculations of the encryptor and, while ensuring the randomization effect, reduces half of the dynamic power consumption of the encryption engine.

[0050] Optionally, during the encryption process, the encryptor performs an exclusive OR operation on the pseudo-random sequence and the data to be written, and then randomly stores the result. This method can effectively protect the confidentiality of data and improve the reliability of data storage. Due to the reversibility of the exclusive OR operation, the same operation can be used for decryption, that is, by performing an exclusive OR operation on the ciphertext data and the key data again, the original plaintext data can be restored.

[0051] As Figure 9 shown, another embodiment of the present application further proposes a data randomized storage system 200, including: A lookup table generation module 210, 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.

[0052] A lookup module 220, configured to select several target RS codes in the RS lookup table according to the index information of the data to be written.

[0053] An expansion module 230, configured to perform bit-width expansion and number expansion on each of the target RS codes to obtain expanded RS codes.

[0054] A storage module 240, configured to generate a pseudo-random sequence according to the expanded RS codes, perform a logical operation on the pseudo-random sequence and the data to be written, and then perform randomized storage.

[0055] The present application also provides an electronic device. Exemplarily, the electronic device includes a processor and a memory. Among them, 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.

[0056] Among them, 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, and 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 the present application.

[0057] The memory can 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), electrically erasable programmable read-only memory (EEPROM), etc. Among them, the memory is used to store a computer program, and after receiving an execution instruction, the processor can execute the computer program accordingly.

[0058] The present application also provides a computer-readable storage medium for storing the computer program used in the above-mentioned electronic device. For example, the computer-readable storage medium can include, but is not limited to: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0059] In several embodiments provided in the present 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 illustrative. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the structure diagram and / or flowchart, as well as the combination of blocks in the structure diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

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

[0061] If the function is implemented in the form of a software functional 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 the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application.

[0062] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application.

Claims

1. A method for randomly storing data, characterized in that, Including: Generate an RS lookup table according to the depth of the RS lookup table to be generated and multiple initial RS codes; Select several target RS codes in the RS lookup table according to the index information of the data to be written; Perform bit-width expansion and number expansion on each of the target RS codes to obtain expanded RS codes; Generate a pseudo-random sequence according to the expanded RS codes, perform a logical operation on the pseudo-random sequence and the data to be written, and then perform randomized storage.

2. The data randomization storage method according to claim 1, wherein Also including: Perform bitwise inversion on the pseudo-random sequence, so that when writing data, perform logical operations on the pseudo-random sequence before bitwise inversion and the pseudo-random sequence after bitwise inversion respectively with the data to be written.

3. The data randomization storage method according to claim 1, wherein Also including: Determine the depth of the RS lookup table to be generated for each storage module according to the number of operation units included in each storage module and the expandable number of the initial RS codes; Determine the index information according to the write position information of the data to be written.

4. The data randomization storage method according to claim 1, wherein The generating an RS lookup table according to the depth of the RS lookup table to be generated and multiple initial RS codes includes: Randomly generate multiple different multi-bit numbers as the alternative set of the initial RS codes; Randomly determine one multi-bit number in the alternative set as the initial RS code of the RS lookup table; According to the comparison results of the Hamming distances between the remaining multi-bit numbers in the alternative set and the initial RS code in the RS lookup table, repeatedly select the multi-bit number with the largest Hamming distance from the initial RS code as the initial RS code of the RS lookup table.

5. The data randomization storage method according to claim 1, wherein The performing bit-width expansion and number expansion on each of the target RS codes to obtain expanded RS codes includes: Based on the byte substitution table, perform multiple byte substitutions on the original bytes of each of the target RS codes to obtain multiple substituted bytes; Sort the original bytes and each of the substituted bytes to obtain the RS code after bit-width expansion.

6. The data randomization storage method according to claim 1, wherein The performing bit-width expansion and number expansion on each of the target RS codes to obtain expanded RS codes further includes: Take the RS code after bit-width expansion as the initial state value of the shift register, generate new state values through shift and feedback operations, and take the new state values as new RS codes; Through the shift register, repeatedly perform shift and feedback operations on the current state value to generate multiple state values, and take the generated multiple state values as the new RS codes to perform number expansion on the RS code after bit-width expansion.

7. The data randomization storage method according to claim 1, wherein The generating a pseudo-random sequence according to the expanded RS codes includes: Set the fixed plaintext to all zeros for each bit number, and expand each of the expanded RS codes as the initial key through an encryptor to obtain multiple round keys; Perform multiple rounds of encryption operations according to each of the round keys to obtain the pseudo-random sequence.

8. The data randomization storage method according to claim 3, wherein The calculation formula for the depth of the RS lookup table is: (1) 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.

9. The data randomization storage method according to claim 3, characterized in that The index information includes the starting value of the index and the index displacement, and the calculation formula for the starting value of the index is: (2) In formula (2), is the starting value of the index,[ is the number of erasures of the storage module,[ is the storage plane serial number,[ is the ordinal number of the storage module,[ is the depth of the RS lookup table; The calculation formula for the index displacement is: (3) In formula (3), is the index displacement,[ is the number of codewords with error correction codes in a single logical page,[ is the serial number of the codeword of the error correction code,[ is the logical page number.[ 10. A data randomization storage system, characterized in that, Including: A lookup table generation module, configured to generate an RS lookup table according to the depth of the RS lookup table to be generated and multiple initial RS codes; A lookup module, configured to select a plurality of target RS codes from the RS lookup table according to the index information of the data to be written; An expansion module, configured to perform bit-width expansion and number expansion on each of the target RS codes to obtain expanded RS codes; A storage module, configured to generate a pseudo-random sequence according to the expanded RS codes, perform a logical operation on the pseudo-random sequence and the data to be written, and then perform randomized storage.

11. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed on a processor, it implements the data randomized storage method according to any one of claims 1-9.

12. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory stores a computer program, and the processor is configured to execute the computer program to implement the data randomized storage method according to any one of claims 1-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

  • Randomization method and data read-write method

    CN115357523A

  • Random number generation device, random number generation method, random number generation system, and chip

    CN116710890A

  • Encryption coding method and device in DNA storage, electronic equipment and storage medium

    CN117955629A