Solid state drive error correction stabilization method, device and medium based on LDPC and ECC technology

By encoding and encrypting the data of the solid-state drive and analyzing the LDPC technology, the problem of insufficient error correction stability is solved, more accurate error correction judgment and space saving are achieved, and the data security of the solid-state drive is improved.

CN118467237BActive Publication Date: 2024-10-11SHENZHEN LINGDECHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing SSD error correction stabilization technology has problems such as insufficient accuracy of error correction stability analysis and insufficient rigorous algorithm, resulting in inaccurate error correction stability determination and occupying too much space in the SSD.

Method used

By encoding and encrypting the input data, the binary form of data is converted into an encrypted code that occupies a smaller number of bytes. LDPC technology is used to calculate and analyze the ECC code, and when reading the data, it is combined with the check matrix to decode and judge twice. Check whether the encoding and encryption results are the same to determine whether the error correction is stable.

Benefits of technology

It improves the accuracy of error correction stability analysis, saves hard disk storage space, and promptly detects solid-state drive failures, improving the security of error correction stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467237B_ABST
    Figure CN118467237B_ABST
Patent Text Reader

Abstract

The invention discloses a solid state hard disk error correction stabilization method, device and medium based on LDPC and ECC technologies, and relates to the technical field of solid state hard disk error correction stabilization, comprising the following steps: calculating input data by an LDPC algorithm to obtain an ECC code; encoding and encrypting the input data by an encoding encryption algorithm to obtain an encrypted code; decoding the read code by the LDPC algorithm, and marking the decoded result as output data; analyzing the output code and the encrypted code to determine whether the error correction analysis of the LDPC algorithm is stable; the invention is used to solve the problems that the existing solid state hard disk error correction stabilization technology still has insufficient accuracy of error correction stabilization analysis and the algorithm of error correction stabilization analysis is not rigorous enough, resulting in inaccurate judgment of error correction stability and excessive occupation of solid state hard disk space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of solid state hard disk error correction and stabilization technology, and in particular to a solid state hard disk error correction and stabilization method, device and medium based on LDPC and ECC technologies. Background Art

[0002] Solid-state drive error correction and stabilization technology refers to a series of technical means and measures used to improve the data reliability and stability of solid-state drives (SSDs). Through error correction and stabilization technology, solid-state drives can provide higher data reliability and stability, reduce the risk of data loss and damage, and thus meet users' needs for data storage.

[0003] Existing SSD error correction technologies usually use LDPC and ECC technologies to perform error correction analysis on the storage content of the SSD, but the existing technologies lack the analysis of the stability of the error correction performance of LDPC and ECC technologies, making it difficult to timely discover erroneous error correction results. At the same time, the few existing technologies for stable error correction of SSDs usually use a large amount of data for judgment, resulting in a significant reduction in the storage space of the SSD. Therefore, a rigorous algorithm should be used when performing stable analysis on the error correction behavior to ensure the accuracy of the error correction stability analysis and save hard disk storage space. For example, in the Chinese patent application publication number CN116028253A, a solid-state hard disk error correction optimization method, system, device and medium are disclosed. The solution states that "in response to the failure of error correction of the storage block, the storage block is marked as a bad block", but does not explain how to determine the failure of the SSD error correction, making it difficult to ensure the accuracy of the error correction stability analysis and save hard disk storage space. The existing SSD error correction stability technology also has the problem that the accuracy of the error correction stability analysis is insufficient and the algorithm of the error correction stability analysis is not rigorous enough, resulting in inaccurate judgment of the error correction stability and excessive occupation of the SSD space. Summary of the invention

[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent, by encoding and encrypting the input data, converting the input data in binary form into an encrypted code occupying a smaller number of bytes, and then calculating and analyzing the input data through LDPC technology to obtain an ECC code. When the solid-state hard disk reads data, the read data is decoded in combination with the check matrix in LDPC, and the decoded result is encoded and encrypted again to determine whether the results of the two encoding and encryption are the same, so as to determine whether the error correction of the solid-state hard disk is stable, so as to solve the problems that the existing solid-state hard disk error correction stability technology still has insufficient accuracy of error correction stability analysis and the algorithm of error correction stability analysis is not rigorous enough, resulting in inaccurate judgment of error correction stability and excessive occupation of solid-state hard disk space.

[0005] To achieve the above objectives, in a first aspect, the present application provides a solid state hard disk error correction stabilization method based on LDPC and ECC technologies, comprising the following steps:

[0006] Receive input data, calculate the input data using the LDPC algorithm to obtain the ECC code, read the redundant code in the ECC code, and mark the redundant code as the data number;

[0007] Obtain input data, encode and encrypt the input data using an encoding encryption algorithm to obtain an encrypted code, establish a coding database, and store the encrypted code and data number;

[0008] When the solid state drive reads data, it obtains the read ECC code and marks it as the read code, obtains the redundant code in the read code and marks it as the read number, decodes the read code through the LDPC algorithm, and marks the decoded result as the output data;

[0009] Obtain the output data, substitute the output data into the encoding encryption algorithm, obtain the output code, search the encoding database for the data number that is the same as the read number, obtain the corresponding encryption code, analyze the output code and the encryption code, and determine whether the error correction analysis of the LDPC algorithm is stable.

[0010] Furthermore, the input data is calculated by the LDPC algorithm to obtain the LDPC code, and reading the error correction code in the LDPC code includes the following sub-steps:

[0011] Acquire the data that needs to be recorded in the solid-state hard disk received by the solid-state hard disk, mark it as recorded data, the recorded data is binary coded, and obtain the number of information bits of the recorded data, mark it as recorded information bits;

[0012] Divide the input data into several group codes, and set the group codes to (n, k)1 to (n, k)x, where n is the code length of the group code, k is the input information bit, and x is the number of group codes;

[0013] The n is given by the formula Calculate its k range; where Kp is the k range, u is a constant and a positive integer, and u is calculated starting from 2. If Kp is less than k, u+1 is added and recalculated; if Kp is greater than or equal to k, stop calculating and get the value of u, and finally get n=u+k;

[0014] Based on the LDPC algorithm, the generator matrix of the input data is obtained, and the block code and the generator matrix are calculated to obtain the ECC code;

[0015] The format of the generator matrix is ; Where g is an element in the generator matrix;

[0016] The group code format is: ··· );in, to The original code for entering information;

[0017] The ECC code format is: ··· ··· );in, to is a redundant code;

[0018] The calculation formula of the ECC code is ECC=( ··· )× ;

[0019] Read the redundant codes in the ECC codes generated by all the group codes divided by the current input data, combine them in sequence from (n, k)1 to (n, k)x, and mark the combined data as the data number.

[0020] Further, obtaining the input data, encoding and encrypting the input data by means of an encoding encryption algorithm to obtain an encrypted code, establishing a coding database, and storing the encrypted code and the data number include the following sub-steps:

[0021] Get input data and input information bits;

[0022] The input information bit is judged as prime by the prime number judgment algorithm. If the input information bit is a prime number, the input data is encoded and encrypted by the prime number encryption scheme; if the input information bit is not a prime number, the input data is encoded and encrypted by the composite number encryption scheme;

[0023] A coding database is established. After the input data is coded and encrypted, its encryption code and data number are obtained and entered into the coding database for storage. The encryption code includes prime number encryption code and composite number encryption code.

[0024] Furthermore, the prime number encryption scheme includes the following sub-steps:

[0025] Get the number of 1s in the input data and mark it as the input code weight;

[0026] Convert the input data into decimal data and mark it as decimal data;

[0027] The input code weight and decimal data are calculated through the prime number encryption formula, and the prime number encryption code of the input data is finally output;

[0028] The prime number encryption formula is configured as: ; Where Sp is the prime number encryption code, Ew is the input code weight, and Dt is the decimal data. is modulo 2 addition, It is modular two multiplication method.

[0029] Furthermore, the composite encryption scheme includes the following sub-steps:

[0030] The factors of the input information bits are calculated in order from small to large, and marked as the bit number factors. When the bit number factor is greater than or equal to the first factor threshold, the calculation is stopped. If the bit number factor is less than the first factor threshold, the calculation is continued. The bit number factor finally calculated is marked as the rated factor number.

[0031] The input data is grouped and marked as encryption group codes, and the number of encryption group codes is the number of rated factors;

[0032] The encryption group codes are represented as S1 to Sy, y is the rated factor number, and the input data is divided into each encryption group code in the order of S1 to Sy. The number of data divided in each encryption group code is the input information bit / rated factor number, which is marked as the encryption code number;

[0033] Decompose the encrypted code into prime factors by short division until the result is a prime number, mark the prime factors finally obtained as code number prime factors, count the number of code number prime factors, and mark them as the number of factors;

[0034] Calculate the number of factors using the matrix side length formula to get the matrix side length;

[0035] The matrix side length formula is configured as: ; Where Mel is the matrix side length, Nf is the number of factors, and % is the modulo operator;

[0036] The encryption group code is converted into a matrix, labeled as encryption group matrix P1 to encryption group matrix Py,

[0037] The encryption group matrix is: ; Where T is the element in the encryption group matrix, Q is the encryption code number / Mel;

[0038] The encryption group matrix P1 to the encryption group matrix Py are calculated by the composite encryption formula to obtain the composite encryption code of the input data;

[0039] The composite number encryption formula is configured as: ; Wherein, Ce is a composite encryption code, Pi is any one of the encryption group matrices P1 to Py, the value range of i is 1 to y, i is a positive integer, and Tt is the matrix transposition operator.

[0040] Furthermore, decoding the read code by using the LDPC algorithm includes the following sub-steps:

[0041] When the solid-state drive is detected to perform a data read operation, the read ECC code is obtained and marked as the read code, the redundant code in the read code is obtained and marked as the read number, and the check matrix corresponding to the read code in the LDPC algorithm is obtained. The format of the check matrix is: ; Where H is an element in the check matrix;

[0042] Multiply the check matrix by the read code, and multiply the result modulo 2 to get the calculation result, which is marked as the check result. The format of the check result is: ; Where L is the element of the verification result and h is the number of rows;

[0043] Read the number of rows whose elements are not 0 in the check result, marked as w. If w does not exist, output a signal that no error correction is required; obtain the number of rows in the check matrix. to , marked as Q1 to Qk in sequence, read the elements with the number 1 in Q1 to Qk, and mark them as elements to be corrected;

[0044] Get the number of rows with 0 elements in the check result, marked as r, and replace the rows in the check matrix with to Mark them as A1 to Ak, read the elements with number 1 in A1 to Ak, and mark them as the correct elements;

[0045] Get all correct elements, remove the data with the same subscript as the correct element in the elements to be corrected, and finally mark the remaining data in the elements to be corrected as incorrect data;

[0046] Get the read code, the read code format is: ( ··· ··· ),Will to The data with the same subscript as the error data is flipped. If it is 1, it is flipped to 0, and if it is 0, it is flipped to 1. At this time, the error correction completion signal is output;

[0047] If a signal that no error correction is required or a signal that error correction is completed is received, the output to , and get the output data.

[0048] Further, judging whether the error correction analysis of the LDPC algorithm is stable includes the following sub-steps:

[0049] Get the number of digits of the output data, mark it as the number of output digits, and get the read number;

[0050] The output digits are judged to be prime by a prime number judgment algorithm. If it is a prime number, the output data is encoded and encrypted by a prime number encryption scheme; if it is not a prime number, the output data is encoded and encrypted by a composite number encryption scheme;

[0051] The result obtained by encrypting the code is marked as the output code, and the data number that is the same as the read number is searched in the code database to obtain the corresponding encrypted code, which is marked as the correct code;

[0052] The output code is compared with the correct code. If the output code is the same as the correct code, a normal error correction signal is output; if the output code is different from the correct code, an abnormal error correction signal is output;

[0053] If an error correction abnormality signal is output, the error correction process is performed again on the read code;

[0054] The number of times the error correction abnormal signal is output in the first cycle is counted and marked as the abnormal frequency. The abnormal frequency is monitored in real time. When the abnormal frequency is greater than or equal to the first frequency threshold, a hard disk maintenance signal is sent to the user end.

[0055] In a second aspect, the present application provides a solid-state hard disk error correction and stabilization system based on LDPC and ECC technology, including a data acquisition module, an LDPC processing module, an encoding and encryption module, and a stability analysis module, wherein the data acquisition module, the LDPC processing module, and the encoding and encryption module are respectively connected to the stability analysis module data;

[0056] The data acquisition module is used to acquire the input data and the redundant code in the ECC code;

[0057] The LDPC processing module is used to calculate the input data to obtain the ECC code, and calculate the read code to obtain the output data;

[0058] The encoding and encryption module is used to encode and encrypt input data and output data;

[0059] The stability analysis module is used to analyze the error correction processing of the LDPC module and determine whether the error correction analysis of the LDPC module is stable.

[0060] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in any one of the methods described above are executed.

[0061] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in any one of the methods described above are executed.

[0062] Beneficial effects of the present invention: The present invention generates a generator matrix and a check matrix for input data through LDPC technology, and then performs calculation and analysis on the input data and the generator matrix, and finally obtains an ECC code including an error correction code. At the same time, the ECC code can be decoded according to the check matrix. If there is an error in the original data, the check matrix will automatically correct the erroneous data when decoding the ECC code. The advantage is that LDPC and ECC technologies are relatively advanced and accurate in the field of error correction of solid-state hard disks. The use of LDPC and ECC technologies can improve the accuracy of error correction processing of solid-state hard disks.

[0063] The present invention determines whether the input information bit of the input data is a prime number, and adopts a prime number encryption scheme or a composite number encryption scheme for the input data according to the determination result. The advantage is that the encoding and encryption process uses a matrix form to perform complex operations, and prime numbers are difficult to convert into multiple matrices, so other complex operations are used for them. The different data used in the operation are all extracted from the input data, which greatly improves the uniqueness of the encryption code.

[0064] The present invention converts the input data into a unique encryption code by encoding and encrypting the input data. The advantage is that the number of bytes of the input data is generally large, while the converted encryption code only occupies a small number of bytes, and the error correction stability of the solid state hard disk can be accurately judged and the storage space of the hard disk can be saved, thereby improving the accuracy of error correction stability analysis and saving the storage space of the hard disk.

[0065] The present invention obtains an output code by encoding and encrypting the output data of the check matrix calculation output, and then compares the correct code obtained by the input data to determine whether the error correction processing is abnormal, and then counts the number of abnormalities within a certain period to determine whether the error correction of the solid-state hard disk is stable. The advantage is that the fault of the solid-state hard disk can be discovered and repaired in time, and accurate abnormality judgment can be obtained by comparing the two encrypted codes, thereby improving the accuracy of error correction stability analysis and the security of the solid-state hard disk.

[0066] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 is a flow chart of the steps of the method of the present invention;

[0068] Figure 2 It is a schematic diagram of the process of inputting data processing of the present invention;

[0069] Figure 3An output data flow chart is obtained for the analysis of the present invention;

[0070] Figure 4 is a functional block diagram of the system of the present invention;

[0071] Figure 5 A connection block diagram of the electronic device of the present invention;

[0072] In the figure: 50, electronic device; 501, processor; 502, memory. DETAILED DESCRIPTION

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

[0074] Example 1

[0075] See also Figure 1 As shown, in the first aspect, the present application provides a solid state hard disk error correction stabilization method based on LDPC and ECC technology, comprising the following steps:

[0076] Step S1, receiving input data, calculating the input data by LDPC algorithm, obtaining ECC code, reading redundant code in the ECC code, marking the redundant code as data number; in practical application, LDPC and ECC technology can provide a high level of guarantee for the error correction capability of solid state drives; step S1 includes the following sub-steps:

[0077] Step S101, obtaining data that needs to be recorded in the solid-state hard disk and marked as recorded data, the recorded data is binary coded, obtaining the number of information bits of the recorded data and marking it as recorded information bits;

[0078] In the specific implementation, the input data obtained is 110, and the input information bit is 3. In actual applications, the input data is usually data with more bits. Here, only 3 bits of input data are used to illustrate the analysis and processing process;

[0079] Step S102, dividing the input data into a number of group codes, where the group codes are set to (n, k)1 to (n, k)x, where n is the code length of the group code, k is the input information bit, and x is the number of group codes;

[0080] In a specific implementation, if the input data is too large and the input information bits exceed 100, the input data is evenly divided into x groups, where x is 4, 5, 6 or 7. The input information bits are divided by x in descending order. If they are divisible, x is set to the corresponding number. If they are not divisible, x is reduced by 1 and recalculated. At the same time, the input information bit of k will represent the value obtained by the original input information bit / x; here k is 3, which is less than 100, so there is no need to perform such calculations; if the input information bit is 102, x is set to 7, and 102 / 7 is not divisible, so x is set to 6, and 102 / 6=17. At this time, the input data is divided into 6 groups of group codes, x=6, k=17; if the input information bit is a prime number, the group code is directly set to (n, k); the group code for the input data in this embodiment is (n, 3), k=3;

[0081] Step S103, n is calculated by the formula Calculate its k range; where Kp is the k range, u is a constant and a positive integer, and u is calculated starting from 2. If Kp is less than k, u+1 is added and recalculated; if Kp is greater than or equal to k, stop calculating and get the value of u, and finally get n=u+k;

[0082] In the specific implementation, when u=2, Kp is calculated to be 1. At this time, Kp is less than k. Then u=3 is set, and Kp is calculated to be 3. At this time, Kp is equal to k, so the calculation is stopped. When u is 3, n=6 is calculated, and the block code is (6,3);

[0083] Step S104, based on the LDPC algorithm, obtain a generator matrix of the input data, and calculate the block code and the generator matrix to obtain an ECC code;

[0084] The generated matrix format is ; Where g is an element in the generator matrix;

[0085] The block code format is: ( ··· );in, to The original code for entering information;

[0086] The ECC code format is: ( ··· ··· );in, to is a redundant code;

[0087] The calculation formula of ECC code is ECC=( ··· )× ;

[0088] In the specific implementation, the generated matrix is ​​obtained as ; The block code (6,3) is (1 1 0), multiply the generator matrix by the block code, that is, ECC = (1 1 0) × ; The addition between each element adopts modulo 2 addition, and the calculated ECC code is [1 1 0 0 1 0];

[0089] Step S105, reading the redundant codes in the ECC codes generated by all the group codes divided by the currently input data, combining them in the order of (n, k)1 to (n, k)x, and marking the combined data as data numbers;

[0090] In a specific implementation, if the redundant code read is 010 and there is only one grouping code, there is no need to perform combination, and 010 is marked as the data number.

[0091] Step S2, obtaining input data, encoding and encrypting the input data through an encoding encryption algorithm to obtain an encrypted code, establishing a coding database, and storing the encrypted code and data number; in practical applications, encoding and encrypting the input data can convert the huge input data into a unique encryption code that occupies less memory. When performing error correction and stability analysis on the solid-state hard disk, certain original data is required for data support, and the original data usually occupies a high memory. Large amounts of storage will result in a significant reduction in the memory space of the solid-state hard disk. Therefore, encoding and encrypting the input data can effectively provide reliable data support for the error correction and stability analysis of the solid-state hard disk, and occupy a small memory space; Step S2 includes the following sub-steps:

[0092] Step S201, obtaining input data and input information bits;

[0093] Step S202, the input information bit is judged to be primal by a prime number judgment algorithm. If the input information bit is a prime number, the input data is encoded and encrypted by a prime number encryption scheme; if the input information bit is not a prime number, the input data is encoded and encrypted by a composite number encryption scheme;

[0094] In the specific implementation, the prime number judgment algorithm is shown in the following code:

[0095] public static boolean isPrime(int n) {

[0096] if (n<= 3) {

[0097] return n>1;

[0098] }

[0099] / / Only 6x-1 and 6x+1 can be prime numbers

[0100] if (n % 6 != 1&&n % 6 != 5) {

[0101] return false;

[0102] }

[0103] / / Determine whether these numbers can be divided by odd numbers less than sqrt(n)

[0104] int sqrt = (int) Math.sqrt(n);

[0105] for (int i = 5; i<= sqrt; i += 6) {

[0106] if (n % i == 0 || n % (i + 2) == 0) {

[0107] return false;

[0108] }

[0109] }

[0110] The input data is 110, the input information bit is 3, and the input information bit is substituted into the above code to calculate that it is a prime number, so the prime number encryption scheme is used to encode and encrypt the input data; the n in the code has nothing to do with the n in this embodiment and is only used for code operation;

[0111] The prime number encryption scheme includes the following sub-steps:

[0112] Get the number of 1s in the input data and mark it as the input code weight;

[0113] Convert the input data into decimal data and mark it as decimal data;

[0114] The input code weight and decimal data are calculated through the prime number encryption formula, and the prime number encryption code of the input data is finally output;

[0115] The prime number encryption formula is configured as: ; Where Sp is the prime number encryption code, Ew is the input code weight, and Dt is the decimal data. is modulo 2 addition, is the modular two multiplication method;

[0116] In the specific implementation, the input code weight is obtained as 2, 110 is converted into decimal, the decimal data is 6, and the prime number encryption code is calculated as 12; the data here is too simple, which is intended to illustrate the calculation and analysis methods of each step and facilitate understanding. The data in actual application is mostly complex data, and the calculated encryption code number will be larger and more accurate;

[0117] The composite encryption scheme includes the following sub-steps:

[0118] The factors of the input information bits are calculated in order from small to large, and marked as the bit number factors. When the bit number factor is greater than or equal to the first factor threshold, the calculation is stopped. If the bit number factor is less than the first factor threshold, the calculation is continued. The bit number factor finally calculated is marked as the rated factor number.

[0119] The input data is grouped and marked as encryption group codes, and the number of encryption group codes is the number of rated factors;

[0120] The encryption group codes are represented as S1 to Sy, y is the rated factor number, and the input data is divided into each encryption group code in the order of S1 to Sy. The number of data divided in each encryption group code is the input information bit / rated factor number, which is marked as the encryption code number;

[0121] Decompose the encrypted code into prime factors by short division until the result is a prime number, mark the prime factors finally obtained as code number prime factors, count the number of code number prime factors, and mark them as the number of factors;

[0122] Calculate the number of factors using the matrix side length formula to get the matrix side length;

[0123] The matrix side length formula is configured as: ; Where Mel is the matrix side length, Nf is the number of factors, and % is the modulo operator;

[0124] The encryption group code is converted into a matrix, labeled as encryption group matrix P1 to encryption group matrix Py,

[0125] The encryption group matrix is: ; Where T is an element in the encryption group matrix, when Nf%2=1, Q is Mel-1, and when Nf%2=1, Q is Mel;

[0126] The encryption group matrix P1 to the encryption group matrix Py are calculated by the composite encryption formula to obtain the composite encryption code of the input data;

[0127] The composite number encryption formula is configured as: ; Wherein, Ce is a composite encryption code, Pi is any one of the encryption group matrices P1 to Py, the value range of i is 1 to y, i is a positive integer, and Tt is the matrix transposition operator;

[0128] In the specific implementation, this embodiment does not adopt a composite encryption scheme, so it will not be described. For a specific description of the composite encryption scheme, please refer to Example 2;

[0129] Step S203, establishing a coding database, obtaining the encryption code and data number after the input data is coded and encrypted, and entering the coding database for storage, wherein the encryption code includes a prime number encryption code and a composite number encryption code;

[0130] In a specific implementation, a coding database is established, and the encryption code of the input data is obtained as 12, and the data number is 010. The encryption code and the data number are entered into the coding database for storage.

[0131] Step S3, when the solid state drive reads data, obtains the read ECC code, marks it as the read code, obtains the redundant code in the read code, marks it as the read number, decodes the read code by the LDPC algorithm, and marks the decoded result as the output data; Step S3 includes the following sub-steps:

[0132] Step S301, when it is detected that the solid state drive performs a data reading operation, the read ECC code is obtained, marked as a read code, the redundant code in the read code is obtained, marked as a read number, and the check matrix corresponding to the read code in the LDPC algorithm is obtained. The format of the check matrix is: ; Where H is an element in the check matrix;

[0133] Step S302, multiply the check matrix by the read code, and multiply the result modulo 2 to obtain a calculation result, which is marked as a check result. The format of the check result is: ; Where L is the element of the verification result and h is the number of rows;

[0134] In the specific implementation, the read code is (1 1 0 0 1 0), the read number is 010, and the check matrix is ; Multiply the check matrix by the read code, multiply the result modulo 2, and get the check result as ;

[0135] Step S303, read the number of rows whose elements are not 0 in the check result, mark it as w, if w does not exist, then output a signal that no error correction is required; obtain the number of rows in the check matrix to , marked as Q1 to Qk in sequence, read the elements with the number 1 in Q1 to Qk, and mark them as elements to be corrected;

[0136] In the specific implementation, if the first row of the check result is not 0, then w is 1, and the check matrix is ​​obtained. to , marked as Q1 to Qk, then Q1 to Qk are 1, 1 and 0 respectively, and the elements to be corrected are marked as Q1 and Q2;

[0137] Step S304, obtain the number of rows with 0 elements in the check result, mark it as r, and replace the rows in the check matrix with to Mark them as A1 to Ak, read the elements with number 1 in A1 to Ak, and mark them as the correct elements;

[0138] Step S305, obtaining all correct elements, removing the data in the elements to be corrected that have the same subscript as the correct elements, and finally marking the remaining data in the elements to be corrected as erroneous data;

[0139] In the specific implementation, we get r as 2 and 3, and get the value when r=2. to Marked as A1 to Ak, that is, A1 to Ak are 0, 1, and 1 respectively, and the correct elements obtained are A2 and A3; all the values ​​of r are analyzed, and finally the correct elements are A2 and A3, and the elements to be corrected are Q1 and Q2. The subscript of Q2 is the same as that of A2, so Q2 is eliminated, and finally the wrong data is Q1;

[0140] Step S306, obtain the read code, the read code format is: ( ··· ··· ),Will to The data with the same subscript as the error data is flipped. If it is 1, it is flipped to 0, and if it is 0, it is flipped to 1. At this time, the error correction completion signal is output;

[0141] Step S307: If a signal that no error correction is required or a signal that error correction is completed is received, then output to , get the output data;

[0142] In the specific implementation, the read code is (0 1 0 0 1 0), Same as Q1, then Flip, is 0, Flip to 1, and the read code is (1 1 0 0 1 0), and the error correction completion signal is output, and the output data is (1 1 0 0 1 0).

[0143] Step S4, obtain output data, substitute the output data into the encoding encryption algorithm, obtain the output code, find the data number that is the same as the read number in the encoding database, obtain the corresponding encryption code, analyze the output code and the encryption code, and judge whether the error correction analysis of the LDPC algorithm is stable; in practical applications, in the face of huge storage data, errors are inevitable when the solid-state hard disk is read, and the error correction program cannot guarantee that the read data is 100% corrected successfully. Therefore, examining the abnormal frequency of the solid-state hard disk error correction within a certain period can effectively ensure the accuracy of the stable analysis and avoid contingency. At the same time, a very small number of errors within a certain period will not affect the user experience; Step S4 includes the following sub-steps:

[0144] Step S401, obtain the number of bits of output data, mark it as the number of output bits, and obtain the read number;

[0145] Step S402, the output bit number is judged as a prime number by a prime number judgment algorithm. If it is a prime number, the output data is encoded and encrypted by a prime number encryption scheme; if it is not a prime number, the output data is encoded and encrypted by a composite number encryption scheme;

[0146] Step S403, marking the result obtained by encrypting the code as the output code, searching the code database for the data number that is the same as the read number, obtaining the corresponding encrypted code, and marking it as the correct code;

[0147] In the specific implementation, the output digit is obtained to be 6, the read number is 010, the output digit is determined to be prime by the prime number judgment algorithm, and the output digit is obtained to be prime. Then the output data is encoded and encrypted by the prime number encryption scheme, and the output code is 12. The data number 010 that is the same as the read number in the encoding database is searched, and the correct code is obtained to be 12;

[0148] Step S404, comparing the output code with the correct code, if the output code is the same as the correct code, then outputting a normal error correction signal; if the output code is different from the correct code, then outputting an abnormal error correction signal;

[0149] Step S405, if an error correction abnormality signal is output, then re-correct the read code;

[0150] Step S406, counting the number of times the error correction abnormal signal is output in the first cycle, marking it as an abnormal frequency, monitoring the abnormal frequency in real time, and sending a hard disk maintenance signal to the user end when the abnormal frequency is greater than or equal to the first frequency threshold;

[0151] In the specific implementation, the first cycle is set to 7 days, the first frequency threshold is set to 5, and if the output code is the same as the correct code through comparison, a normal error correction signal is output; if the abnormal frequency is statistically obtained to be 3, and the abnormal frequency is less than the first frequency threshold through comparison, there is no need to send a maintenance signal.

[0152] Example 2

[0153] The difference between this embodiment and embodiment 1 is that, in order to further explain the calculation and analysis process of the composite number encryption scheme and to make the data in other steps in embodiment 1 easy to understand, embodiment 2 is divided to explain the composite number encryption scheme. The input data in this embodiment is (1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1), and the input information bit is 18;

[0154] The composite encryption scheme includes the following sub-steps:

[0155] The factors of the input information bits are calculated in order from small to large, and marked as the bit number factors. When the bit number factor is greater than or equal to the first factor threshold, the calculation is stopped. If the bit number factor is less than the first factor threshold, the calculation is continued. The bit number factor finally calculated is marked as the rated factor number.

[0156] The input data is grouped and marked as encryption group codes, and the number of encryption group codes is the number of rated factors;

[0157] In the specific implementation, the first factor threshold is set to 3. The setting of the first factor threshold here is intended to facilitate the understanding of subsequent calculations. The value in actual applications will be greater than 5. The calculated digit factors of the input information digits are 1, 2, and 3 from small to large. When the digit factor is 3, which is equal to the first factor threshold, the calculation is stopped, and the rated factor number is 3.

[0158] The encryption group codes are represented as S1 to Sy, y is the rated factor number, and the input data is divided into each encryption group code in the order of S1 to Sy. The number of data divided in each encryption group code is the input information bit / rated factor number, which is marked as the encryption code number;

[0159] In the specific implementation, the encryption group code is represented as S1 to S3, and the encryption code number is calculated to be equal to 6, that is, the input data is divided into S1 to S3, S1 is (1 0 0 1 1 0), S2 is (1 0 1 0 1 1), and S3 is (0 1 0 0 1 1);

[0160] Decompose the encrypted code into prime factors by short division until the result is a prime number, mark the prime factors finally obtained as code number prime factors, count the number of code number prime factors, and mark them as the number of factors;

[0161] Calculate the number of factors through the matrix side length formula to obtain the matrix side length;

[0162] The matrix side length formula is configured as: ; where Mel is the matrix side length, Nf is the number of factors, and % is the modulo operator;

[0163] Convert the encrypted group code into a matrix, marked as the encrypted group matrix P1 to the encrypted group matrix Py,

[0164] The encrypted group matrix is: ; where T is the element in the encrypted group matrix, and Q is the encrypted password number / Mel;

[0165] In a specific implementation, decompose the encrypted password number into prime factors by short division. The prime factors of the password number are 3, 2, and 1 respectively. The number of factors Nf is counted as 3. Since 3 % 2 = 1, then select for calculation, and the matrix side length Mel is obtained as 2; Q is the encrypted password number / Mel = 3. Convert the encrypted group codes S1 to S3 into the encrypted group matrices P1 to P3. P1 is , P2 is , P3 is ;

[0166] Calculate the encrypted group matrices P1 to the encrypted group matrix Py through the composite number encryption formula to obtain the composite number encryption code of the input data;

[0167] The composite number encryption formula is configured as: ; where Ce is the composite number encryption code, Pi is any one of the encrypted group matrices P1 to the encrypted group matrix Py, the value range of i is from 1 to y, i is a positive integer, and Tt is the matrix transpose operator;

[0168] In a specific implementation, if Mel < Q, then the composite number encryption code Ce is calculated through the composite number encryption formula as .

[0169] Embodiment 3

[0170] Please refer to Figure 4 shown. In the second aspect, the present application provides a solid-state drive error correction and stability system based on LDPC and ECC technologies, including a data acquisition module, an LDPC processing module, an encoding and encryption module, and a stability analysis module. The data acquisition module, the LDPC processing module, and the encoding and encryption module are respectively connected to the stability analysis module for data connection;

[0171] The data acquisition module is used to acquire the input data and the redundant code in the ECC code;

[0172] The LDPC processing module is used to calculate the input data to obtain the ECC code, and calculate the read code to obtain the output data; the LDPC processing module includes an LDPC encoding unit and an LDPC decoding unit;

[0173] The LDPC coding unit is configured with an LDPC coding strategy, which includes:

[0174] The solid state drive receives data that needs to be recorded in the solid state drive, marks it as recorded data, the recorded data is binary coded, obtains the number of information bits of the recorded data, and marks it as recorded information bits;

[0175] Divide the input data into several group codes, and set the group codes to (n, k)1 to (n, k)x, where n is the code length of the group code, k is the input information bit, and x is the number of group codes;

[0176] nThrough the formula Calculate its k range; where Kp is the k range, u is a constant and a positive integer, and u is calculated starting from 2. If Kp is less than k, u+1 is added and recalculated; if Kp is greater than or equal to k, stop calculating and get the value of u, and finally get n=u+k;

[0177] Based on the LDPC algorithm, the generator matrix of the input data is obtained, and the block code and the generator matrix are calculated to obtain the ECC code;

[0178] The generated matrix format is ; Where g is an element in the generator matrix;

[0179] The block code format is: ( ··· );in, to The original code for entering information;

[0180] The ECC code format is: ( ··· ··· );in, to is a redundant code;

[0181] The calculation formula of ECC code is ECC=( ··· )× ;

[0182] Read the redundant codes in the ECC codes generated by all the group codes divided by the current input data, combine them in the order of (n,k)1 to (n,k)x, and mark the combined data as the data number;

[0183] The LDPC decoding unit is configured with an LDPC decoding strategy, which includes:

[0184] When the solid-state drive is detected to perform a data read operation, the read ECC code is obtained and marked as the read code, the redundant code in the read code is obtained and marked as the read number, and the check matrix corresponding to the read code in the LDPC algorithm is obtained. The format of the check matrix is: ; Where H is an element in the check matrix;

[0185] Multiply the check matrix by the read code, and multiply the result modulo 2 to get the calculation result, which is marked as the check result. The format of the check result is: ; Where L is the element of the verification result and h is the number of rows;

[0186] Read the number of rows whose elements are not 0 in the check result, marked as w. If w does not exist, output a signal that no error correction is required; obtain the number of rows in the check matrix. to , marked as Q1 to Qk in sequence, read the elements with the number 1 in Q1 to Qk, and mark them as elements to be corrected;

[0187] Get the number of rows with 0 elements in the check result, marked as r, and replace the rows in the check matrix with to Mark them as A1 to Ak, read the elements with number 1 in A1 to Ak, and mark them as the correct elements;

[0188] Get all correct elements, remove the data with the same subscript as the correct element in the elements to be corrected, and finally mark the remaining data in the elements to be corrected as incorrect data;

[0189] Get the read code, the read code format is: ( ··· ··· ),Will to The data with the same subscript as the error data is flipped. If it is 1, it is flipped to 0, and if it is 0, it is flipped to 1. At this time, the error correction completion signal is output;

[0190] If a signal that no error correction is required or a signal that error correction is completed is received, the output to , get the output data;

[0191] The encoding and encryption module is used to encode and encrypt input data and output data; the encoding and encryption module includes a prime number encryption unit and a composite number encryption unit;

[0192] Get input data and input information bits;

[0193] The input information bit is judged as prime by the prime number judgment algorithm. If the input information bit is a prime number, the input data is encoded and encrypted by the prime number encryption scheme; if the input information bit is not a prime number, the input data is encoded and encrypted by the composite number encryption scheme;

[0194] Establish a coding database, obtain the encryption code and data number after the input data is coded and encrypted, and enter the coding database for storage. The encryption code includes prime number encryption code and composite number encryption code;

[0195] The prime number encryption unit is configured with a prime number encryption strategy, which includes:

[0196] Get the number of 1s in the input data and mark it as the input code weight;

[0197] Convert the input data into decimal data and mark it as decimal data;

[0198] The input code weight and decimal data are calculated through the prime number encryption formula, and the prime number encryption code of the input data is finally output;

[0199] The prime number encryption formula is configured as: ; Where Sp is the prime number encryption code, Ew is the input code weight, and Dt is the decimal data. is modulo 2 addition, is the modular two multiplication method;

[0200] The composite encryption unit is configured with a composite encryption strategy, which includes:

[0201] The factors of the input information bits are calculated in order from small to large, and marked as the bit number factors. When the bit number factor is greater than or equal to the first factor threshold, the calculation is stopped. If the bit number factor is less than the first factor threshold, the calculation is continued. The bit number factor finally calculated is marked as the rated factor number.

[0202] The input data is grouped and marked as encryption group codes, and the number of encryption group codes is the number of rated factors;

[0203] The encryption group codes are represented as S1 to Sy, y is the rated factor number, and the input data is divided into each encryption group code in the order of S1 to Sy. The number of data divided in each encryption group code is the input information bit / rated factor number, which is marked as the encryption code number;

[0204] Decompose the encrypted code into prime factors by short division until the result is a prime number, mark the prime factors finally obtained as code number prime factors, count the number of code number prime factors, and mark them as the number of factors;

[0205] Calculate the number of factors using the matrix side length formula to get the matrix side length;

[0206] The matrix side length formula is configured as: ; Where Mel is the matrix side length, Nf is the number of factors, and % is the modulo operator;

[0207] The encryption group code is converted into a matrix, labeled as encryption group matrix P1 to encryption group matrix Py,

[0208] The encryption group matrix is: ; Where T is the element in the encryption group matrix, Q is the encryption code number / Mel;

[0209] The encryption group matrix P1 to the encryption group matrix Py are calculated by the composite encryption formula to obtain the composite encryption code of the input data;

[0210] The composite number encryption formula is configured as: ; Wherein, Ce is a composite encryption code, Pi is any one of the encryption group matrices P1 to Py, the value range of i is 1 to y, i is a positive integer, and Tt is the matrix transposition operator;

[0211] The stability analysis module is used to analyze the error correction processing of the LDPC module to determine whether the error correction analysis of the LDPC module is stable; the stability analysis module is configured with a stability analysis strategy, which includes:

[0212] Get the number of digits of the output data, mark it as the number of output digits, and get the read number;

[0213] The output digits are judged to be prime by a prime number judgment algorithm. If it is a prime number, the output data is encoded and encrypted by a prime number encryption scheme; if it is not a prime number, the output data is encoded and encrypted by a composite number encryption scheme;

[0214] The result obtained by encrypting the code is marked as the output code, and the data number that is the same as the read number is searched in the code database to obtain the corresponding encrypted code, which is marked as the correct code;

[0215] The output code is compared with the correct code. If the output code is the same as the correct code, a normal error correction signal is output; if the output code is different from the correct code, an abnormal error correction signal is output;

[0216] If an error correction abnormality signal is output, the error correction process is performed again on the read code;

[0217] The number of times the error correction abnormal signal is output in the first cycle is counted and marked as the abnormal frequency. The abnormal frequency is monitored in real time. When the abnormal frequency is greater than or equal to the first frequency threshold, a hard disk maintenance signal is sent to the user end.

[0218] Example 4

[0219] See also Figure 5 As shown, in the third aspect, the present application provides an electronic device 50, including a processor 501 and a memory 502, the memory 502 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 501, the steps in any of the above methods are executed. Through the above technical solution, the processor 501 and the memory 502 are interconnected and communicate with each other through a communication bus and / or other forms of connection mechanisms (not marked), and the memory 502 stores a computer program executable by the processor 501. When the electronic device 50 is running, the processor 501 executes the computer program to execute the method in any optional implementation of the above embodiment to achieve the following functions: calculate the input data through the LDPC algorithm to obtain an ECC code; encode and encrypt the input data through the encoding encryption algorithm to obtain an encrypted code; decode the read code through the LDPC algorithm, and mark the decoded result as output data; analyze the output code and the encrypted code to determine whether the error correction analysis of the LDPC algorithm is stable.

[0220] Example 5

[0221] In a fourth aspect, the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above methods are executed. Through the above technical solution, when the computer program is executed by the processor, the method in any optional implementation of the above embodiment is executed to achieve the following functions: calculate the input data by the LDPC algorithm to obtain the ECC code; encode and encrypt the input data by the encoding encryption algorithm to obtain the encrypted code; decode the read code by the LDPC algorithm, and mark the decoded result as output data; analyze the output code and the encrypted code to determine whether the error correction analysis of the LDPC algorithm is stable.

[0222] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0223] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. Among them, the storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0224] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

Claims

1. A stable error correction method for solid state drives based on LDPC and ECC technologies. It is characterized in that The steps include: Receive input data, calculate the input data using the LDPC algorithm to obtain the ECC code, read the redundant code in the ECC code, and mark the redundant code as the data number; Obtain input data, encode and encrypt the input data using an encoding encryption algorithm to obtain an encrypted code, establish a coding database, and store the encrypted code and data number; When the solid state drive reads data, it obtains the read ECC code and marks it as the read code, obtains the redundant code in the read code and marks it as the read number, decodes the read code through the LDPC algorithm, and marks the decoded result as the output data; Obtain output data, substitute the output data into the encoding encryption algorithm, obtain the output code, search the data number in the encoding database that is the same as the read number, obtain the corresponding encryption code, analyze the output code and the encryption code, and determine whether the error correction analysis of the LDPC algorithm is stable; The input data is calculated by the LDPC algorithm to obtain the LDPC code. Reading the error correction code in the LDPC code includes the following sub-steps: Acquire the data that needs to be recorded in the solid-state hard disk received by the solid-state hard disk, mark it as recorded data, the recorded data is binary coded, and obtain the number of information bits of the recorded data, mark it as recorded information bits; Divide the input data into several group codes, and set the group codes to (n, k)1 to (n, k)x, where n is the code length of the group code, k is the input information bit, and x is the number of group codes; The n is given by the formula Calculate the value of Kp; where u is a constant and a positive integer, start calculating u from 2. If Kp is less than k, recalculate u+1; if Kp is greater than or equal to k, stop calculating and get the value of u, and finally get n=u+k; Based on the LDPC algorithm, the generator matrix of the input data is obtained, and the block code and the generator matrix are calculated to obtain the ECC code; The format of the generator matrix is ; Where g is an element in the generator matrix; The group code format is: ··· );in, to The original code for entering information; The ECC code format is: ··· ··· );in, to is a redundant code; The calculation formula of the ECC code is ECC=( ··· )× ; Read the redundant codes in the ECC codes generated by all the group codes divided by the current input data, combine them in sequence from (n, k)1 to (n, k)x, and mark the combined data as the data number.

2. The solid state hard disk error correction stabilization method based on LDPC and ECC technology according to claim 1, It is characterized in that Acquiring input data, encoding and encrypting the input data through an encoding encryption algorithm to obtain an encryption code, establishing a coding database, and storing the encryption code and data number includes the following sub-steps: Get input data and input information bits; The input information bit is judged as a prime number by using a prime number judgment algorithm. If the input information bit is a prime number, the input data is encoded and encrypted by using a prime number encryption scheme; If the input information bit is not a prime number, the input data is encoded and encrypted using a composite number encryption scheme; A coding database is established. After the input data is coded and encrypted, its encryption code and data number are obtained and entered into the coding database for storage. The encryption code includes prime number encryption code and composite number encryption code.

3. The solid state hard disk error correction stabilization method based on LDPC and ECC technology according to claim 2, It is characterized in that The prime number encryption scheme includes the following sub-steps: Get the number of 1s in the input data and mark it as the input code weight; Convert the input data into decimal data and mark it as decimal data; The input code weight and decimal data are calculated through the prime number encryption formula, and the prime number encryption code of the input data is finally output; The prime number encryption formula is configured as: ; Where Sp is the prime number encryption code, Ew is the input code weight, and Dt is the decimal data. is modulo 2 addition, It is modular two multiplication method.

4. The solid state hard disk error correction stabilization method based on LDPC and ECC technology according to claim 3, It is characterized in that The composite encryption scheme includes the following sub-steps: The factors of the input information bits are calculated in order from small to large, and marked as the bit number factors. When the bit number factor is greater than or equal to the first factor threshold, the calculation is stopped. If the bit number factor is less than the first factor threshold, the calculation is continued. The bit number factor finally calculated is marked as the rated factor number. The input data is grouped and marked as encryption group codes, and the number of encryption group codes is the number of rated factors; The encryption group codes are represented as S1 to Sy, y is the rated factor number, and the input data is divided into each encryption group code in the order of S1 to Sy. The number of data divided in each encryption group code is the input information bit / rated factor number, which is marked as the encryption code number; Decompose the encrypted code into prime factors by short division until the result is a prime number, mark the prime factors finally obtained as code number prime factors, count the number of code number prime factors, and mark them as the number of factors; Calculate the number of factors using the matrix side length formula to get the matrix side length; The matrix side length formula is configured as: ; Where Mel is the matrix side length, Nf is the number of factors, and % is the modulo operator; The encryption group code is converted into a matrix, labeled as encryption group matrix P1 to encryption group matrix Py, The encryption group matrix is: ; Where T is the element in the encryption group matrix, Q is the encryption code number / Mel; The encryption group matrix P1 to the encryption group matrix Py are calculated by the composite encryption formula to obtain the composite encryption code of the input data; The composite number encryption formula is configured as: ; Wherein, Ce is a composite encryption code, Pi is any one of the encryption group matrices P1 to Py, the value range of i is 1 to y, i is a positive integer, and Tt is the matrix transposition operator.

5. The solid state hard disk error correction stabilization method based on LDPC and ECC technology according to claim 4, It is characterized in that Decoding the read code using the LDPC algorithm includes the following sub-steps: When the solid-state drive is detected to perform a data read operation, the read ECC code is obtained and marked as the read code, the redundant code in the read code is obtained and marked as the read number, and the check matrix corresponding to the read code in the LDPC algorithm is obtained. The format of the check matrix is: ; Where H is an element in the check matrix; Multiply the check matrix by the read code, and multiply the result modulo 2 to get the calculation result, which is marked as the check result. The format of the check result is: ; Where L is the element of the verification result and h is the number of rows; Read the number of rows whose elements are not 0 in the check result, marked as w. If w does not exist, output a signal that no error correction is required; obtain the number of rows in the check matrix. to , marked as Q1 to Qk in sequence, read the elements with the number 1 in Q1 to Qk, and mark them as elements to be corrected; Get the number of rows with 0 elements in the check result, marked as r, and replace the rows in the check matrix with to Mark them as A1 to Ak, read the elements with number 1 in A1 to Ak, and mark them as the correct elements; Get all correct elements, remove the data with the same subscript as the correct element in the elements to be corrected, and finally mark the remaining data in the elements to be corrected as incorrect data; Get the read code, the read code format is: ( ··· ··· ),Will to The data with the same subscript as the error data is flipped. If it is 1, it is flipped to 0, and if it is 0, it is flipped to 1. At this time, the error correction completion signal is output; If a signal that no error correction is required or a signal that error correction is completed is received, the output to , and get the output data.

6. The solid state hard disk error correction stabilization method based on LDPC and ECC technology according to claim 5, It is characterized in that Determining whether the error correction analysis of the LDPC algorithm is stable includes the following sub-steps: Get the number of digits of the output data, mark it as the number of output digits, and get the read number; The output digits are judged to be prime by a prime number judgment algorithm. If it is a prime number, the output data is encoded and encrypted by a prime number encryption scheme. If it is not a prime number, the output data is encoded and encrypted using a composite number encryption scheme; The result obtained by encrypting the code is marked as the output code, and the data number that is the same as the read number is searched in the code database to obtain the corresponding encrypted code, which is marked as the correct code; The output code is compared with the correct code. If the output code is the same as the correct code, a normal error correction signal is output; if the output code is different from the correct code, an abnormal error correction signal is output; If an error correction abnormality signal is output, the error correction process is performed again on the read code; The number of times the error correction abnormal signal is output in the first cycle is counted and marked as the abnormal frequency. The abnormal frequency is monitored in real time. When the abnormal frequency is greater than or equal to the first frequency threshold, a hard disk maintenance signal is sent to the user end.

7. A system for the solid state hard disk error correction stabilization method based on LDPC and ECC technology according to any one of claims 1 to 6, It is characterized in that It includes a data acquisition module, an LDPC processing module, a coding encryption module and a stability analysis module, wherein the data acquisition module, the LDPC processing module and the coding encryption module are respectively connected to the stability analysis module data; The data acquisition module is used to acquire the input data and the redundant code in the ECC code; The LDPC processing module is used to calculate the input data to obtain the ECC code, and calculate the read code to obtain the output data; The encoding and encryption module is used to encode and encrypt input data and output data; The stability analysis module is used to analyze the error correction processing of the LDPC module and determine whether the error correction analysis of the LDPC module is stable.

8. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 6 are executed.

9. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 6 are executed.