Encrypted storage method and storage module

By determining the storage unit number according to the preset rules and writing order, and writing the data block into the corresponding unit, it solves the problem that the existing encrypted storage method relies on encryption algorithms and key security, and achieves higher data security and Computing resource savings.

CN118502678BActive Publication Date: 2024-10-29AXD (ANXINDA) MEMORY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410955623.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-29
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

Existing encryption storage methods mainly rely on the security of encryption algorithms and keys. If there are loopholes in the encryption algorithm or the keys are leaked, the security of the data will be seriously threatened.

Method used

By determining the storage unit number corresponding to each data block according to the preset rules and the writing order of each data block, and writing the data blocks to the corresponding numbered storage units in sequence, the data stored in a single storage unit is discrete and the data is improved. security and does not require the use of encryption algorithms.

Benefits of technology

It improves the security of stored data, saves computing resources, and makes it difficult for the decipherer to correctly read the data even if he obtains the number of the storage unit, which increases the difficulty of data protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118502678B_ABST
    Figure CN118502678B_ABST
Patent Text Reader

Abstract

The present invention discloses an encryption storage method and a storage module, the method comprising: numbering a plurality of storage units in a storage module; dividing the storage data to be written into a plurality of data blocks; determining the writing order of each data block according to the logical structure of the storage data; determining the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block; and writing each data block into the corresponding numbered storage unit in sequence according to the writing order. The present application determines the number of the storage unit corresponding to each data block according to the preset rule and the writing order of each data block, and writes each data block into the corresponding numbered storage unit in sequence according to the writing order, so that the data stored in a single storage unit is discrete, and the data stored in a single storage unit alone cannot be deciphered, thereby improving the security of the stored data, and does not need to use an encryption algorithm to encrypt the data, saving computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security, and in particular to an encryption storage method and a storage module. Background Art

[0002] With the rapid development of information technology, data security issues have become increasingly important. Especially in the fields of cloud computing, big data, and the Internet of Things, a large amount of sensitive and important data needs to be stored and transmitted. In order to protect this data from unauthorized access and leakage, encrypted storage methods are widely used.

[0003] Existing encryption storage methods usually use symmetric encryption algorithms or asymmetric encryption algorithms to encrypt data, and then store the encrypted data in a specified storage medium. When decrypting, the corresponding key is needed to decrypt the data to restore the original data. This encryption storage method guarantees the security of data to a certain extent.

[0004] However, existing encrypted storage methods mainly rely on the security of encryption algorithms and keys at the algorithm level. If there are loopholes in the encryption algorithm or the key is leaked, the security of the data will be seriously threatened. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present application provides an encrypted storage method and a storage module, by determining the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block, and writing each data block in sequence into the storage unit with the corresponding number according to the writing order, so that the data stored in a single storage unit is discrete, and the data cannot be deciphered by relying solely on the data stored in a single storage unit, thereby improving the security of the stored data, and eliminating the need to use an encryption algorithm to encrypt the data, saving computing resources.

[0006] To solve the above problems, the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides an encrypted storage method, the encrypted storage method comprising:

[0008] Numbering multiple storage units in the storage module;

[0009] Dividing the storage data to be written into a plurality of data blocks;

[0010] Determining a writing order of each of the data blocks according to the logical structure of the stored data;

[0011] Determine the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block;

[0012] Each of the data blocks is sequentially written into the storage unit with the corresponding number according to the writing order.

[0013] In some implementations, the preset rule includes a preset numbering sequence, and determining the number of the storage unit corresponding to each data block according to the preset rule and the writing sequence of each data block includes:

[0014] Using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with a write order of N, wherein M and N are both positive integers, and the initial values ​​of M and N are both 1;

[0015] Set N=N+1, and determine whether M is equal to Mmax, where Mmax is the maximum value of the numbers in the preset numbering sequence;

[0016] If M is not equal to Mmax, then M=M+1, and the process returns to the step of using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with the write sequence N;

[0017] If M is equal to Mmax, then M=1, and the process returns to the execution step of using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with a write sequence of N.

[0018] In some implementations, the preset rule includes a preset grouping order and a preset numbering order within a group, and determining the number of the storage unit corresponding to each data block according to the preset rule and the writing order of each data block includes:

[0019] Grouping the plurality of numbered storage units in the storage module according to the preset grouping order to obtain at least two groups of storage units;

[0020] Sorting the storage units in each group of storage units according to the preset group number sequence corresponding to each group, to obtain the order of each storage unit in the group;

[0021] Using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with writing sequence N, wherein X and N are both positive integers, and the initial values ​​of X and N are both 1;

[0022] When the first unfilled storage unit in the Xth group of storage units is detected according to the preset group number sequence corresponding to the Xth group of storage units, the number of the first unfilled storage unit in the Xth group of storage units is used as the number of the storage unit corresponding to the data block with the write sequence N;

[0023] Set N=N+1, and determine whether X is equal to Xmax, where Xmax is the maximum value of the group number in the preset grouping sequence;

[0024] If X is not equal to Xmax, then X=X+1, and the process returns to the step of using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with the writing sequence N;

[0025] If X is equal to Xmax, X=1, and the process returns to the execution step of using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with the writing sequence N.

[0026] In some embodiments, the method further comprises:

[0027] When reading the stored data, reading each data block from the storage unit corresponding to the number of each data block according to the preset rule;

[0028] The plurality of data blocks are spliced ​​together according to a reading order to obtain the stored data.

[0029] In some implementations, dividing the to-be-written storage data into the plurality of data blocks includes:

[0030] Encrypting the stored data to be written to obtain encrypted stored data;

[0031] The encrypted storage data is divided into a plurality of encrypted data blocks.

[0032] In some implementations, the step of splicing the multiple data blocks according to the reading order to obtain the stored data includes:

[0033] splicing the multiple data blocks according to the reading order to obtain the encrypted storage data;

[0034] The encrypted stored data is decrypted to obtain the stored data.

[0035] In some implementations, dividing the to-be-written storage data into the plurality of data blocks includes:

[0036] Dividing the stored data to be written into the plurality of data blocks;

[0037] Encrypting each of the data blocks individually to obtain a plurality of individually encrypted data blocks;

[0038] The step of splicing the plurality of data blocks according to the reading order to obtain the stored data includes:

[0039] After reading each of the data blocks, decrypting each of the data blocks individually to obtain a decrypted data block, thereby obtaining a plurality of decrypted data blocks;

[0040] The multiple decrypted data blocks are spliced ​​according to the reading order to obtain the stored data.

[0041] In some implementations, determining the number of the storage unit corresponding to each of the data blocks according to the preset rule and the writing order of each of the data blocks includes:

[0042] Generate a dynamic numbering sequence according to the preset rules;

[0043] The Mth number in the dynamic numbering sequence is used as the number of the storage unit corresponding to the data block with a write order of N, wherein M and N are both positive integers, and the initial values ​​of M and N are both 1;

[0044] Set N=N+1, and determine whether M is equal to Mmax, where Mmax is the maximum value of the number in the dynamic numbering sequence;

[0045] If M is not equal to Mmax, then M=M+1, and the execution step is returned to use the Mth number in the dynamic numbering sequence as the number of the storage unit corresponding to the data block with the writing sequence N;

[0046] If M is equal to Mmax, then M=1, and the execution step is returned to use the Mth number in the dynamic numbering sequence as the number of the storage unit corresponding to the data block with the writing sequence N;

[0047] When all of the plurality of data blocks are written into the plurality of storage units, the encrypted dynamic numbering sequence used at the time and the identifier of the storage data corresponding to the dynamic numbering sequence used at the time are stored.

[0048] In some embodiments, the method further comprises:

[0049] The preset rule uniquely corresponding to each storage module is set.

[0050] In a second aspect, an embodiment of the present application provides a storage module, including:

[0051] A plurality of storage units, wherein the plurality of storage units are used to store storage data to be written;

[0052] A control unit is used to execute the encryption storage method as described in the first aspect.

[0053] The present application provides an encrypted storage method and a storage module. The present application determines the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block, and writes each data block into the storage unit with the corresponding number in sequence according to the writing order, so that the data stored in a single storage unit is discrete, and the data cannot be deciphered by the data stored in a single storage unit alone, thereby improving the security of the stored data, and there is no need to encrypt the data using an encryption algorithm, thus saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a flowchart of the first implementation method of the encryption storage method provided in the embodiment of the present application.

[0055] Figure 2 yes Figure 1 A first detailed flow chart of step S200 in FIG.

[0056] Figure 3 yes Figure 1 A second detailed flow chart of step S200 in FIG.

[0057] Figure 4 yes Figure 1 A first detailed flow chart of step S400 in FIG.

[0058] Figure 5 yes Figure 4 Schematic diagram of the principles of steps S410 to S413.

[0059] Figure 6 yes Figure 1 A second detailed flow chart of step S400 in FIG.

[0060] Figure 7 yes Figure 6 Schematic diagram of the principles of steps S420 to S426.

[0061] Figure 8 yes Figure 1 FIG. 3 is a schematic diagram of a third detailed process of step S400 in FIG.

[0062] Fig. 9 It is a flowchart of the second implementation mode of the encryption storage method provided in the embodiment of the present application.

[0063] Fig.10 yes Fig. 9 A first detailed flow chart of step S700 in FIG.

[0064] Fig.11 yes Fig. 9 A second detailed flow chart of step S700 in FIG.

[0065] Fig.12 It is a structural schematic diagram of a storage module provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0068] The present application provides an encrypted storage method and a storage module. By determining the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block, the storage unit to which each data block is written can be customized, and the stored data can be encrypted at the hardware level. During decryption, if the stored data is not read according to the preset rule, the stored data that conforms to the logical structure cannot be obtained, thereby making the stored data difficult to decipher and improving the security of the stored data.

[0069] In some embodiments, the encryption storage method of the present application belongs to the hardware underlying algorithm of the storage module. The hardware underlying algorithm is usually solidified in the control unit of the storage module, and the modification of the algorithm usually requires changing the circuit design of the storage module. In this way, the stored data can be encrypted at the hardware level, making the stored data difficult to decipher, which can improve the security of the stored data.

[0070] In this way, the encryption storage method provided by the present application will be described in detail below in conjunction with the accompanying drawings.

[0071] See also Figure 1 , Figure 1 1 is a flow chart of the first implementation method of the encryption storage method provided in the embodiment of the present application. Figure 1 As shown, the encryption storage method includes: step S100 to step S500.

[0072] Step S100: numbering a plurality of storage units in a storage module.

[0073] In some implementations, the serial numbers and physical locations of multiple storage units are stored in the hardware underlying algorithm of the storage module. In this way, the physical location of the storage unit can be found according to the serial number of the storage unit, so as to write the data block to the storage unit with the corresponding serial number according to the physical location of the storage unit.

[0074] Optionally, each storage unit has a unique corresponding number.

[0075] In some implementations, the serial numbers corresponding to two storage units that are physically adjacent may be continuous.

[0076] In some embodiments, the numbers corresponding to two storage units that are physically adjacent may be discontinuous. In this way, even if the decoder deciphers the preset number sequence in the preset rule, he does not know the physical location of the storage unit corresponding to the number, and it is difficult to read the stored data from the storage unit at the correct location, thereby making the stored data difficult to decipher and improving the security of the stored data.

[0077] Step S200: Divide the storage data to be written into a plurality of data blocks.

[0078] In some implementations, when data is continuously written, each time a preset amount of data is received, the preset amount of data is packaged into a data block.

[0079] Optionally, the preset data amount may be 4 KB (Kilobyte) to 2048 KB, for example, the preset data amount may be 4 KB, 8 KB, 16 KB, 64 KB, 128 KB, 512 KB, 1024 KB or 2048 KB.

[0080] Optionally, the preset data volume may be greater than 2048 KB.

[0081] In some implementations, the storage data to be written is a file, and the entire storage data is divided into a plurality of data blocks, and the size of each data block is the size of a preset data amount.

[0082] In some implementations, each data block has a start identifier and an end identifier.

[0083] Optionally, the first data block written has a start write identifier and the last data block written has an end write identifier.

[0084] Through the above method, each data block can be easily distinguished, so that each data block can be read separately later.

[0085] In some implementations, the stored data may be encrypted first in step S200, and then the encrypted stored data may be encrypted and stored later. In this way, the stored data may be encrypted at both the algorithm level and the hardware level, which may further improve the security of the stored data.

[0086] In some implementations, the entire stored data is encrypted to obtain encrypted stored data. Figure 2 , Figure 2 yes Figure 1 The first detailed flow chart of step S200 in FIG. Figure 2 As shown, step S200 includes: step S210 to step S220.

[0087] Step S210: encrypting the storage data to be written to obtain encrypted storage data.

[0088] In some implementations, the algorithms for data encryption include symmetric encryption algorithms, asymmetric encryption algorithms, hybrid encryption algorithms, and the like.

[0089] Step S220: Divide the encrypted storage data into a plurality of encrypted data blocks.

[0090] In some embodiments, data encryption is performed on each data block individually. Figure 3 , Figure 3 yes Figure 1 A second detailed flow chart of step S200 in FIG. Figure 3 As shown, step S200 includes: step S230 to step S240.

[0091] Step S230: Divide the stored data to be written into a plurality of data blocks.

[0092] Step S240: encrypt each data block individually to obtain multiple individually encrypted data blocks.

[0093] Optionally, at least two keys are used to encrypt each data block in turn.

[0094] By encrypting each data block individually, it is possible to prevent the stored data from being deciphered as a whole, thereby further improving the security of the stored data.

[0095] Please return to Figure 1 , Step S300: Determine the writing order of each data block according to the logical structure of the stored data.

[0096] In some implementations, the storage data to be written is a file, and the writing order of each data block is determined according to the logical structure of the file.

[0097] Optionally, data blocks that are closer to the start identifier of the file in which the data is stored are stored first.

[0098] Optionally, data blocks that are closer to the end identifier of the file in which the data is stored are stored first.

[0099] In some embodiments, when writing data continuously, the writing order of each data block is determined according to the receiving time, that is, the data block received first is stored first. For example, when writing data continuously, each time a preset amount of data is received, the preset amount of data is packaged into a data block and the data block is immediately stored.

[0100] Step S400: Determine the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block.

[0101] In some implementations, preset rules are included in the hardware underlying algorithm when the storage module leaves the factory.

[0102] In some implementations, the preset rule includes a preset numbering sequence.

[0103] In some embodiments, the storage module includes a plurality of storage units, and the preset numbering sequence may not include the numbers of all storage units. For example, the storage module includes 20 storage units, and the preset numbering sequence may include the numbers of 8 of the storage units.

[0104] In some embodiments, the storage module includes a plurality of storage units, and the preset numbering sequence may include numbers of all storage units.

[0105] See also Figure 4 , Figure 4 yes Figure 1 The first detailed flow chart of step S400 in FIG. Figure 2 As shown, when the preset rule includes a preset numbering sequence, step S400 includes: steps S410 to S413.

[0106] Step S410: Using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with writing sequence N.

[0107] Wherein, M and N are both positive integers, and the initial values ​​of M and N are both 1.

[0108] See also Figure 5 , Figure 5 yes Figure 4 Schematic diagram of the principle of step S410 to step S413. Figure 5 As shown, Figure 52 shows a storage unit 110, which includes a storage unit 111 and a storage unit 112. The storage unit 111 is numbered 1, and the storage unit 112 is numbered 2. The storage data 200 includes 6 data blocks, which include data block 1, data block 2, data block 3, data block 4, data block 5, and data block 6. Each data block has a unique corresponding write order, for example, the write order of data block 1 is 1. Figure 5 The arrows in denoted by the arrows correspond the data blocks to the storage units 110 indicated by the arrows.

[0109] Optionally, the preset numbering sequence may be 2, 1, that is, the first number in the preset numbering sequence is 2, and the second number is 1.

[0110] like Figure 5 As shown, optionally, when the preset numbering sequence is 2, 1, initially, the first number in the preset numbering sequence in the preset rule is used as the number of the storage unit corresponding to the data block with a writing order of 1, that is, data block 1 corresponds to storage unit 112.

[0111] Step S411: Set N=N+1 and determine whether M is equal to Mmax.

[0112] Wherein, Mmax is the maximum value of the numbers in the preset numbering sequence. For example, when the preset numbering sequence is 2, 1, Mmax is 2.

[0113] In some implementations, if there is no data block with a write order of N+1, that is, all data blocks have been traversed, the process ends.

[0114] In step S411, if M is not equal to Mmax, then step S412 is executed, and if M is equal to Mmax, then step S413 is executed. For example, when the preset numbering sequence is 2, 1, if M=1, then step S412 is executed, and if M=2, then step S413 is executed.

[0115] Step S412: If M is not equal to Mmax, set M=M+1 and return to execute step S410.

[0116] like Figure 5 As shown, optionally, when the preset numbering sequence is 2, 1, in step S412, if M=1, then M=1+1=2, at this time N=2, and the second number in the preset numbering sequence in the preset rule is used as the number of the storage unit corresponding to the data block with a writing order of 2, that is, data block 2 corresponds to storage unit 111.

[0117] Step S413: If M is equal to Mmax, set M=1 and return to execute step S410.

[0118] like Figure 5As shown, when the preset numbering sequence is 2, 1, if M is equal to 2, then M=1, at this time N=3, and the first number in the preset numbering sequence in the preset rule is used as the number of the storage unit corresponding to the data block with a writing order of 3, that is, data block 3 corresponds to storage unit 112.

[0119] like Figure 5 As shown, in some implementations, by analogy, data block 4 corresponds to storage unit 111 , data block 5 corresponds to storage unit 112 , and data block 6 corresponds to storage unit 111 .

[0120] However, the present application is not limited thereto, and optionally, the number of storage units may be greater than 2, such as 3, 4, 5, or 10, etc. Optionally, the number of data blocks may be greater than 2, such as 2, 3, 4, 5, 10, 100, or 1000, etc. It is understandable that the above encryption storage method is applicable to any number of storage units and data blocks as described above.

[0121] In some implementations, the preset rules include a preset grouping order and a preset intra-group numbering order.

[0122] See also Figure 6 , Figure 6 yes Figure 1 A second detailed flow chart of step S400 in FIG. Figure 6 As shown, when the preset rule includes a preset grouping order and a preset numbering order within a group, step S400 includes: steps S420 to S426.

[0123] Step S420: grouping the plurality of numbered storage units in the storage module according to a preset grouping order to obtain at least two groups of storage units.

[0124] In some implementations, the storage module includes a plurality of storage units, and all storage units may be grouped.

[0125] In some embodiments, the storage module includes multiple storage units, and all storage units may not be grouped. For example, the storage module includes 20 storage units, and 4 of the storage units may be grouped.

[0126] See also Figure 7 , Figure 7 yes Figure 6 Schematic diagram of the principle of step S420 to step S426. Figure 7 As shown, Figure 74 storage units 110 are shown, including storage unit 111, storage unit 112, storage unit 113 and storage unit 114. Storage unit 111 is numbered 1, storage unit 112 is numbered 2, storage unit 113 is numbered 3, and storage unit 114 is numbered 4. Figure 7 The four storage units 110 are divided into two storage unit groups 120, and the two storage unit groups 120 include a storage unit group 121 and a storage unit group 122. The group number of the storage unit group 121 is 1, and the group number of the storage unit group 122 is 2.

[0127] like Figure 7 As shown, storage cell group 121 includes storage cell 111 and storage cell 114 , and storage cell group 122 includes storage cell 112 and storage cell 113 .

[0128] like Figure 7 As shown, the stored data 200 includes 6 data blocks, including data block 1, data block 2, data block 3, data block 4, data block 5 and data block 6. Each data block has a unique corresponding writing order, for example, the writing order of data block 1 is 1. Figure 7 The arrows in 1 indicate the storage unit group 120 to which the data block corresponds.

[0129] Optionally, the preset grouping sequence may be 2, 1, that is, the first group number in the preset grouping sequence is 2, and the second group number is 1.

[0130] Optionally, when the preset grouping sequence is 2, 1, the preset group numbering sequence may be group number 1: 1, 4, group number 2: 2, 3, that is, in the storage unit group with group number 1, the first storage unit is numbered 1 and the second storage unit is numbered 4, and in the storage unit group with group number 2, the first storage unit is numbered 2 and the second storage unit is numbered 3. Figure 7 As shown, for example, storage cell group 121 includes storage cell 111 and storage cell 114 , and storage cell group 122 includes storage cell 112 and storage cell 113 .

[0131] Step S421: sorting the storage units in each group of storage units according to the preset group number sequence corresponding to each group, so as to obtain the sequence of each storage unit in the group.

[0132] like Figure 7 As shown, optionally, when the preset grouping order is 2, 1, the preset group numbering order can be group number 1: 1, 4, group number 2: 2, 3, that is, in the storage unit group with group number 1, the first storage unit is numbered 1 and the second storage unit is numbered 4, and in the storage unit group with group number 2, the first storage unit is numbered 2 and the second storage unit is numbered 3. Figure 7 As shown, for example, storage cell group 121 includes storage cell 111 and storage cell 114 , and storage cell group 122 includes storage cell 112 and storage cell 113 .

[0133] Step S422: using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with writing sequence N.

[0134] Wherein, X and N are both positive integers, and the initial values ​​of X and N are both 1.

[0135] like Figure 7 As shown, optionally, when the preset grouping order is 2, 1, initially, the first group number in the preset grouping order in the preset rule is used as the group number of the corresponding group storage unit with a write order of 1, that is, data block 1 corresponds to storage unit group 122.

[0136] Step S423: When the first unfull storage unit in the Xth group of storage units is detected according to the preset group number sequence corresponding to the Xth group of storage units, the number of the first unfull storage unit in the Xth group of storage units is used as the number of the storage unit corresponding to the data block with a write order of N.

[0137] like Figure 7 As shown, optionally, when X=1 and N=1, when the first unfilled storage unit in the storage unit group 122 is detected according to the preset intra-group numbering sequence (i.e., group number 2: 2, 3) corresponding to the first group of storage units (i.e., storage unit group 122), the number of the first unfilled storage unit in the storage unit group 122 is used as the number of the storage unit corresponding to data block 1. For example, when the number of the first unfilled storage unit in the storage unit group 122 is 2 according to the preset intra-group numbering sequence of group number 2: 2, 3, data block 1 corresponds to storage unit 112.

[0138] Step S424: Set N=N+1 and determine whether X is equal to Xmax.

[0139] Among them, Xmax is the maximum value of the group number in the preset grouping sequence.

[0140] Optionally, when the preset grouping order is 2, 1, Xmax is 2.

[0141] In some implementations, if there is no data block with a write order of N+1, that is, all data blocks have been traversed, the process ends.

[0142] In step S424, if X is not equal to Xmax, then step S425 is executed. If X is equal to Xmax, then step S426 is executed. For example, when the preset grouping order is 2, 1, if X=1, then step S425 is executed, and if X=2, then step S426 is executed.

[0143] Step S425: If X is not equal to Xmax, set X=X+1 and return to execute step S422.

[0144] like Figure 7 As shown, optionally, if X=1, then X=1+1=2, at this time N=2, when the preset grouping order is 2, 1, and the preset group numbering order is group number 1: 1, 4, group number 2: 2, 3, the second group number in the preset grouping order in the preset rule is used as the group number of the corresponding group storage unit with a write order of 2, that is, data block 2 corresponds to storage unit group 121. When it is detected that the first unfilled storage unit in the second group of storage units (that is, storage unit group 121) is numbered 1 according to the preset group numbering order of group numbers 1: 1, 4, data block 2 corresponds to storage unit 111.

[0145] Step S426: If X is equal to Xmax, set X=1 and return to execute step S422.

[0146] like Figure 7 As shown, optionally, if X=2, then X=1, at this time N=3, when the preset grouping order is 2, 1, and the preset group numbering order is group number 1: 1, 4, group number 2: 2, 3, the first group number in the preset grouping order in the preset rule is used as the group number of the corresponding group storage unit with a write order of 3, that is, data block 3 corresponds to storage unit group 122. When it is detected that the first unfilled storage unit in storage unit group 122 is numbered 3 according to the preset group numbering order of group number 2: 2, 3, data block 3 corresponds to storage unit 113.

[0147] like Figure 7 As shown, in some embodiments, by analogy, data block 4 corresponds to storage unit group 121, data block 5 corresponds to storage unit group 122, and data block 6 corresponds to storage unit group 121. In the corresponding group storage unit, when the first unfilled storage unit in the corresponding group storage unit is detected according to the preset group number sequence corresponding to the corresponding group storage unit, the number of the first unfilled storage unit in the corresponding group storage unit is used as the number of the storage unit corresponding to the data block with the write sequence N.

[0148] However, the present application is not limited thereto, and it is understandable that the above encryption storage method is applicable to any number of storage units and data blocks as described above.

[0149] In the above method, the group number of the corresponding group storage unit of the data block is determined according to the preset grouping order in the preset rule, and the numbering of the corresponding storage unit of the data block is determined according to the preset group numbering order and the actual storage situation in the storage unit group. If the decoder only deciphers the preset grouping order or the preset group numbering order, the stored data cannot be read correctly; if the decoder deciphers the preset grouping order and the preset group numbering order, if the preset data amount of the data block is unknown, it is still impossible to determine the storage unit corresponding to the data block to correctly read the stored data. Therefore, through the above method, the security of the stored data can be further improved.

[0150] In some implementations, the numbering sequence may not be preset, and a dynamic numbering sequence may be generated.

[0151] See also Figure 8 , Figure 8 yes Figure 1 The third detailed flow chart of step S400 in FIG. Figure 8 As shown, step S400 may include: step S430 to step S435.

[0152] Step S430: Generate a dynamic numbering sequence according to a preset rule.

[0153] In some embodiments, the storage module includes multiple storage units, and the dynamic numbering sequence may not include the numbers of all storage units. For example, the storage module includes 20 storage units, and the dynamic numbering sequence may include the numbers of 8 storage units therein.

[0154] In some embodiments, the storage module includes a plurality of storage units, and the dynamic numbering sequence may include numbers of all storage units.

[0155] Optionally, the preset rule may include an algorithm for generating a plurality of random numbers.

[0156] Optionally, the algorithm for generating random numbers may include a linear congruential method and a Mersenne twister algorithm, etc.

[0157] Optionally, the noise in the storage module may be used to obtain true random numbers. For example, a noise signal may be obtained, and a random number extractor may be used to convert the preprocessed noise signal into a sequence including multiple random numbers.

[0158] Optionally, a maximum number of the plurality of storage units in the storage module is used as a maximum number in the dynamic numbering sequence (ie, Mmax), and the number in the dynamic numbering sequence is a positive integer.

[0159] Optionally, [1,Mmax] is used as a generation interval for multiple random numbers.

[0160] Optionally, a sequence of multiple random numbers is used as a dynamic numbering order.

[0161] In some embodiments, the preset rules may include at least one artificial intelligence model.

[0162] Optionally, at least one artificial intelligence model is used to generate a dynamic numbering sequence.

[0163] Optionally, the number of artificial intelligence models is more than one, for example, the number of artificial intelligence models is 1, 2, 3, 4 or 5, etc.

[0164] Optionally, the artificial intelligence model includes a decision tree model or a neural network model, etc.

[0165] In some embodiments, multiple corresponding artificial intelligence models are preset according to different types of stored data and encryption requirements.

[0166] Optionally, according to the different types of stored data and encryption requirements, one artificial intelligence model is selected each time to generate a dynamic numbering sequence.

[0167] In some embodiments, an artificial intelligence model is used to select a group of multiple storage units from a plurality of storage units and generate a dynamic numbering sequence. For example, the storage module may include 20 storage units, and an artificial intelligence model is used to select a group of 8 storage units from the 20 storage units and generate a dynamic numbering sequence.

[0168] In some embodiments, the set of multiple storage units selected using the artificial intelligence model is different each time.

[0169] Optionally, the artificial intelligence model selects a group of multiple storage units according to the remaining capacity of the current multiple storage units and generates a dynamic numbering sequence. In this way, the load of multiple storage units can be balanced, which is conducive to extending the service life of the storage module.

[0170] Step S431: Use the Mth number in the dynamic numbering sequence as the number of the storage unit corresponding to the data block with a writing sequence of N.

[0171] Wherein, M and N are both positive integers, and the initial values ​​of M and N are both 1.

[0172] Step S432: Set N=N+1 and determine whether M is equal to Mmax.

[0173] Among them, Mmax is the maximum value of the number in the dynamic numbering sequence.

[0174] In some implementations, if there is no data block with a write order of N+1, that is, all data blocks have been written, step S435 is executed.

[0175] In step S432, if M is not equal to Mmax, then step S433 is executed, and if M is equal to Mmax, then step S434 is executed. For example, when the dynamic numbering sequence is 1, 3, 2, if M=1, then step S433 is executed, and if M=3, then step S434 is executed.

[0176] Step S433: If M is not equal to Mmax, set M=M+1 and return to execute step S431.

[0177] Step S434: If M is equal to Mmax, set M=1 and return to execute step S431.

[0178] Step S435: When all the data blocks are written into the multiple storage units, the encrypted dynamic numbering sequence used at the time and the identifier of the stored data corresponding to the dynamic numbering sequence used at the time are stored.

[0179] Optionally, the identifier of the stored data may be used to uniquely represent the stored data, and the identifier of the stored data may be a hash value of the stored data.

[0180] Because the dynamic numbering sequence used for each data storage is different, it is necessary to store the encrypted dynamic numbering sequence used that time and the identifier of the stored data corresponding to the dynamic numbering sequence used that time, so as to decrypt the corresponding stored data according to the dynamic numbering sequence. In order to prevent the decoder from obtaining the corresponding relationship between the dynamic numbering sequence and the stored data, the dynamic numbering sequence and the identifier of the stored data corresponding to the dynamic numbering sequence are encrypted.

[0181] In the above manner, the numbering sequence used each time is dynamically generated, which can increase the difficulty for a decoder to obtain the entire numbering sequence and prevent the decoder from deciphering the stored data by deciphering the entire numbering sequence, thereby further improving the security of the stored data.

[0182] In some implementations, the method further includes: setting a preset rule uniquely corresponding to each storage module.

[0183] Optionally, for each storage module, a uniquely corresponding preset rule is set at the factory.

[0184] Optionally, for each storage module, a preset numbering sequence uniquely corresponding to it is set.

[0185] Optionally, for each storage module, a preset grouping sequence and a preset intra-group numbering sequence uniquely corresponding thereto are set.

[0186] In the above manner, the preset rules of each storage module are different. Even if a cracker cracks the preset rules of a storage module, the cracked preset rules cannot be used to crack the storage data of other storage modules, thereby further improving the security of the storage data in the storage module.

[0187] See also Fig. 9 , Fig. 9 2 is a flow chart of the second implementation method of the encryption storage method provided in the embodiment of the present application. Fig. 9 As shown, the encryption storage method also includes: step S100 to step S700.

[0188] Step S100: numbering a plurality of storage units in a storage module.

[0189] Step S200: Divide the storage data to be written into a plurality of data blocks.

[0190] Step S300: determining the writing order of each data block according to the logical structure of the stored data.

[0191] Step S400: Determine the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block.

[0192] Step S500: write each data block into the storage unit with the corresponding number in sequence according to the writing order.

[0193] Here, steps S100 to S500 refer to the above description.

[0194] Step S600: when reading stored data, each data block is read from the storage unit corresponding to the number of each data block according to a preset rule.

[0195] In some embodiments, when data blocks are stored in a dynamic numbering sequence, the encrypted dynamic numbering sequence used at that time and the identifier of the stored data corresponding to the dynamic numbering sequence used at that time are decrypted, and the corresponding stored data is decrypted according to the dynamic numbering sequence.

[0196] In some implementations, the reading order is a preset numbering order or a dynamic numbering order in a preset rule, and each data block is read from a storage unit corresponding to a number of each data block according to the reading order.

[0197] In some implementations, the reading order is a preset numbering order in a preset rule or a reverse order of a dynamic numbering order, and each data block is read from a storage unit corresponding to the number of each data block according to the reading order.

[0198] In some embodiments, the first data block written has a start write identifier, and the last data block written has an end write identifier. When a data block with a start write identifier is detected, each data block is read from the storage unit with the corresponding number of each data block in a reading order starting from the data block.

[0199] In some implementations, the reading order includes a preset grouping order and a preset numbering order within a group in a preset rule, and step S600 includes the following steps.

[0200] (1) Determine the group number of the group storage unit corresponding to the data block with a reading order of Y according to the Xth group number in the reverse order of the preset grouping order.

[0201] Wherein, X and Y are both positive integers, and the initial values ​​of X and Y are both 1.

[0202] Optionally, when the preset grouping order is 2, 1, the reverse order of the preset grouping order is 1, 2, and the group number of the group storage unit corresponding to the data block with the reading order of 1 is 1.

[0203] (2) When the first unfilled storage unit in the Xth group of storage units is detected in the reverse order of the preset group numbering sequence corresponding to the Xth group of storage units, the number of the first unfilled storage unit in the Xth group of storage units is used as the number of the storage unit corresponding to the data block with a reading order of Y.

[0204] (3) Let Y = Y + 1 and determine whether X is equal to Xmax.

[0205] Among them, Xmax is the maximum value of the group number in the preset grouping sequence.

[0206] In some implementations, if the data block with a read order of Y has an end-write identifier, indicating that all data blocks storing data have been traversed, the process ends.

[0207] In step (3), if X is not equal to Xmax, then execute step (4); if X is equal to Xmax, then execute step (5). For example, when the reverse order of the preset grouping sequence is 1, 2, if X=1, then execute step (4). If X=2, then execute step (5).

[0208] (4) If X is not equal to Xmax, set X = X + 1 and return to step (1).

[0209] (5) If X is equal to Xmax, set X = 1 and return to step (1).

[0210] The above method reads the data blocks in the reverse order of the preset grouping order and the reverse order of the preset numbering order within the group, and each data block has the same size. Since the data blocks are read in the reverse order of the storage data blocks, when the first unfilled storage unit in the Xth group of storage units is detected, the accurate number of the storage unit corresponding to the data block can be obtained, so the data blocks can be read in the correct order.

[0211] Step S700: splicing multiple data blocks according to the reading order to obtain storage data.

[0212] In some implementations, when the reading order is a preset numbering order or a dynamic numbering order in a preset rule, multiple data blocks are spliced ​​in the reading order to obtain stored data.

[0213] In some implementations, when the reading order is the reverse order of a preset numbering order or a dynamic numbering order in a preset rule, multiple data blocks are spliced ​​in the reverse order of the reading order to obtain stored data.

[0214] In some implementations, when the reading order includes a preset grouping order and a preset intra-group numbering order in a preset rule, multiple data blocks are concatenated in reverse order of the reading order to obtain stored data.

[0215] Optionally, when the entire storage data is encrypted, the entire encrypted storage data is stored, and when decrypting, the entire encrypted storage data is decrypted to obtain the storage data.

[0216] See also Fig.10 , Fig.10 yes Fig. 9 The first detailed flow chart of step S700 in FIG. Fig.10 As shown, when step S200 includes step S210 to step S220, step S700 includes: step S710 to step S720.

[0217] Step S710: splicing multiple data blocks according to the reading order to obtain encrypted storage data.

[0218] Step S720: decrypt the encrypted stored data to obtain stored data.

[0219] In some implementations, when data encryption is performed on each data block individually, what is stored is the individually encrypted data block, and during decryption, data decryption is performed on each data block individually to obtain the stored data.

[0220] See also Fig.11 , Fig.11 yes Fig. 9 A second detailed flow chart of step S700 in FIG. Fig.11As shown, when step S200 includes steps S230 to S240, step S700 includes: steps S730 to S740.

[0221] Step S730: after reading each data block, decrypt each data block separately to obtain a decrypted data block, thereby obtaining a plurality of decrypted data blocks.

[0222] Step S740: splicing multiple decrypted data blocks according to the reading order to obtain storage data.

[0223] Please return to Figure 1 , step S500: write each data block into the storage unit with the corresponding number in sequence according to the writing order.

[0224] Optionally, starting from the data block with a writing order of 1, each data block is sequentially written into a storage unit with a corresponding number according to the writing order.

[0225] In summary, the encryption storage method provided by the embodiment of the present application has the following advantages:

[0226] 1. By determining the number of the storage unit corresponding to each data block according to the preset rules and the writing order of each data block, each data block is sequentially written into the storage unit with the corresponding number according to the writing order, so that the data stored in a single storage unit is discrete, and the data stored in a single storage unit alone cannot be deciphered, thereby improving the security of the stored data, and there is no need to use an encryption algorithm to encrypt the data, saving computing resources.

[0227] 2. By making the numbers corresponding to two storage units adjacent in physical position discontinuous, even if the decoder deciphers the preset number sequence in the preset rule, he does not know the physical position of the storage unit corresponding to the number, and it is difficult to read the stored data from the storage unit at the correct position, thereby making the stored data difficult to decipher and improving the security of the stored data.

[0228] 3. By first encrypting the stored data and then encrypting the encrypted stored data, the stored data can be encrypted at both the algorithm level and the hardware level, which can further improve the security of the stored data.

[0229] 4. By means of preset rules including a preset grouping sequence and a preset group numbering sequence, the group number of the corresponding group storage unit of the data block is determined according to the preset grouping sequence in the preset rules, and the number of the corresponding storage unit of the data block is determined according to the preset group numbering sequence and the actual storage situation in the storage unit group. If the decoder only deciphers the preset grouping sequence or the preset group numbering sequence, the stored data cannot be correctly read; in case the decoder deciphers the preset grouping sequence and the preset group numbering sequence, if the preset data volume of the data block is unknown, the storage unit corresponding to the data block cannot be determined to correctly read the stored data, thereby further improving the security of the stored data.

[0230] 5. By generating a dynamic numbering sequence, the numbering sequence used each time is dynamically generated, which can increase the difficulty for the decoder to obtain the entire numbering sequence and prevent the decoder from deciphering the stored data by deciphering the entire numbering sequence, thereby further improving the security of the stored data.

[0231] 6. By setting a unique preset rule for each storage module, the preset rules of each storage module are different. Even if a cracker cracks the preset rule of a storage module, the cracked preset rule cannot be used to crack the storage data of other storage modules, thereby further improving the security of the storage data in the storage module.

[0232] See also Fig.12 , Fig.12 Schematic diagram of a storage module provided in an embodiment of the present application. Fig.12 As shown, the storage module 100 includes: a plurality of storage units 110, the plurality of storage units 110 are used to store storage data to be written; and a control unit 130, which is used to execute the encryption storage method as described above.

[0233] In some embodiments, the storage module 100 may be a solid state drive.

[0234] In some embodiments, the control unit 130 and the storage unit 110 may be connected via a bus or other means. Fig.12 The example of connecting through bus is taken in the following.

[0235] In some embodiments, the control unit 130 is used to number multiple storage units in the storage module; divide the storage data to be written into multiple data blocks; determine the writing order of each data block according to the logical structure of the storage data; determine the number of the storage unit corresponding to each data block according to preset rules and the writing order of each data block; and write each data block into the corresponding numbered storage unit in sequence according to the writing order.

[0236] In some embodiments, the storage unit 110 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules of the encryption storage method in the embodiment of the present application. The control unit 130 executes various functional applications and data processing of the storage module 100 by running the non-volatile software programs, instructions and modules stored in the storage unit 110, that is, the encryption storage method of the above method embodiment is implemented.

[0237] In some embodiments, the storage unit 110 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the storage module, etc. In addition, the storage unit 110 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the storage unit 110 may optionally include a memory remotely arranged relative to the control unit 130, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0238] In some embodiments, one or more modules are stored in the storage unit 110, and when executed by one or more control units 130, the encryption storage method in any of the above method embodiments is executed, for example, the encryption storage method described above is executed. Figure 1 The method comprises steps S100 to S500.

[0239] In summary, the present application provides an encrypted storage method and a storage module, the method comprising: numbering multiple storage units in the storage module; dividing the storage data to be written into multiple data blocks; determining the writing order of each data block according to the logical structure of the stored data; determining the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block; and writing each data block in sequence into the corresponding numbered storage unit according to the writing order. The present application determines the number of the storage unit corresponding to each data block according to the preset rule and the writing order of each data block, and writes each data block in sequence into the corresponding numbered storage unit according to the writing order, so that the data stored in a single storage unit is discrete, and the data stored in a single storage unit alone cannot be deciphered, thereby improving the security of the stored data, and does not need to use an encryption algorithm to encrypt the data, saving computing resources.

[0240] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An encrypted storage method, characterized in that: The encrypted storage method comprises: Numbering multiple storage units in the storage module; Dividing the storage data to be written into a plurality of data blocks; Determining a writing order of each of the data blocks according to the logical structure of the stored data; Determining the number of the storage unit corresponding to each data block according to a preset rule and the writing order of each data block, wherein when the preset rule includes an algorithm for generating multiple random numbers or at least one artificial intelligence model, determining the number of the storage unit corresponding to each data block according to the preset rule and the writing order of each data block includes: Generate a dynamic numbering sequence according to the preset rules; The Mth number in the dynamic numbering sequence is used as the number of the storage unit corresponding to the data block with a write order of N, wherein M and N are both positive integers, and the initial values ​​of M and N are both 1; Set N=N+1, and determine whether M is equal to Mmax, where Mmax is the maximum value of the numbers in the dynamic numbering sequence; If M is not equal to Mmax, then M=M+1, and the execution step is returned to use the Mth number in the dynamic numbering sequence as the number of the storage unit corresponding to the data block with the writing sequence N; If M is equal to Mmax, then M=1, and the execution step is returned to use the Mth number in the dynamic numbering sequence as the number of the storage unit corresponding to the data block with the writing sequence N; When all of the plurality of data blocks are written into the plurality of storage units, storing the encrypted dynamic numbering sequence used at the time and the identifier of the stored data corresponding to the dynamic numbering sequence used at the time; Each of the data blocks is sequentially written into the storage unit with the corresponding number according to the writing order.

2. The encrypted storage method according to claim 1, characterized in that: The preset rule includes a preset numbering sequence, and determining the number of the storage unit corresponding to each data block according to the preset rule and the writing sequence of each data block includes: Using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with a write order of N, wherein M and N are both positive integers, and the initial values ​​of M and N are both 1; Set N=N+1, and determine whether M is equal to Mmax, where Mmax is the maximum value of the numbers in the preset numbering sequence; If M is not equal to Mmax, then M=M+1, and the process returns to the step of using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with the write sequence N; If M is equal to Mmax, then M=1, and the process returns to the execution step of using the Mth number in the preset number sequence in the preset rule as the number of the storage unit corresponding to the data block with a write sequence of N.

3. The encrypted storage method according to claim 1, characterized in that: The preset rule includes a preset grouping order and a preset numbering order within a group, and determining the number of the storage unit corresponding to each data block according to the preset rule and the writing order of each data block includes: Grouping the plurality of numbered storage units in the storage module according to the preset grouping order to obtain at least two groups of storage units; Sorting the storage units in each group of storage units according to the preset group number sequence corresponding to each group, to obtain the order of each storage unit in the group; Using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with writing sequence N, wherein X and N are both positive integers, and the initial values ​​of X and N are both 1; When the first unfilled storage unit in the Xth group of storage units is detected according to the preset group number sequence corresponding to the Xth group of storage units, the number of the first unfilled storage unit in the Xth group of storage units is used as the number of the storage unit corresponding to the data block with the write sequence N; Set N=N+1, and determine whether X is equal to Xmax, where Xmax is the maximum value of the group number in the preset grouping sequence; If X is not equal to Xmax, then X=X+1, and the process returns to the step of using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with the writing sequence N; If X is equal to Xmax, X=1, and the process returns to the execution step of using the Xth group number in the preset grouping sequence in the preset rule as the group number of the corresponding group storage unit of the data block with the writing sequence N.

4. The encrypted storage method according to claim 1, characterized in that: The method further comprises: When reading the stored data, reading each data block from the storage unit corresponding to the number of each data block according to the preset rule; The plurality of data blocks are spliced ​​together according to a reading order to obtain the stored data.

5. The encrypted storage method according to claim 4, characterized in that: The step of dividing the stored data to be written into a plurality of data blocks comprises: Encrypting the stored data to be written to obtain encrypted stored data; The encrypted storage data is divided into a plurality of encrypted data blocks.

6. The encrypted storage method according to claim 5, characterized in that: The step of splicing the plurality of data blocks according to the reading order to obtain the stored data includes: splicing the multiple data blocks according to the reading order to obtain the encrypted storage data; The encrypted stored data is decrypted to obtain the stored data.

7. The encrypted storage method according to claim 4, characterized in that: The step of dividing the stored data to be written into a plurality of data blocks comprises: Dividing the stored data to be written into the plurality of data blocks; Encrypting each of the data blocks individually to obtain a plurality of individually encrypted data blocks; The step of splicing the plurality of data blocks according to the reading order to obtain the stored data includes: After reading each of the data blocks, decrypting each of the data blocks individually to obtain a decrypted data block, thereby obtaining a plurality of decrypted data blocks; The multiple decrypted data blocks are spliced ​​according to the reading order to obtain the stored data.

8. The encrypted storage method according to claim 1, characterized in that: The method further comprises: The preset rule uniquely corresponding to each storage module is set.

9. A storage module, characterized in that: include: A plurality of storage units, wherein the plurality of storage units are used to store storage data to be written; A control unit, configured to execute the encryption storage method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Access method of Nand Flash memorizer

    CN103544124A