Balanced management method for bad blocks of solid state hard disk, computer equipment and storage medium

Through the initial inspection and environmental monitoring of the solid-state drive supporting service software, the bad blocks of the solid-state drive are evaluated and managed, which solves the problem of bad blocks during the use of the solid-state drive and improves the performance and life of the hard drive.

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

Patent Information

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

AI Technical Summary

Technical Problem

During the use of solid-state drives, bad blocks are generated due to wear and external factors. It is difficult to effectively prevent and manage them with existing technology, which affects the performance and life of the hard drive.

Method used

Conduct read and write tests through the initial inspection module of the SSD supporting service software, analyze the initial inspection bad block information, evaluate the physical and logical damage rates, generate mechanical fault signals or logical damage levels, and perform countermeasure management, such as hiding, replacing or Erase bad blocks, adjust voltage and temperature through environmental monitoring, and limit the number of writes.

Benefits of technology

Intelligent prevention and targeted countermeasures for bad blocks in solid-state drives are realized, extending the service life of the hard drive and improving performance stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118363784B_ABST
    Figure CN118363784B_ABST
Patent Text Reader

Abstract

The invention discloses a balanced management method for bad blocks of a solid state drive, a computer device and a storage medium, relates to the field of solid state drives, and solves the problem that it is difficult to accurately predict the generation of bad blocks. The method comprises the following steps: running an initial inspection module to perform a read and write test on a solid state drive to obtain initial inspection bad block information of the solid state drive and sending the information to a bad block analysis module; the bad block analysis module analyzes and calculates the impact of bad blocks in the solid state drive to obtain an initial inspection physical damage rate and an initial inspection logical damage rate of the solid state drive and sends the information to an impact assessment module; the impact assessment module evaluates and generates a mechanical fault signal or analyzes to obtain a logical damage level and sends the signal to a countermeasure execution module and an environmental monitoring module; the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid state drive; the environmental monitoring module monitors the operating environment of the solid state drive and generates a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read and write test signal. The invention realizes intelligent bad block prevention and countermeasure processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of solid state hard disks and relates to bad block management technology, in particular to a balanced management method for bad blocks of solid state hard disks, computer equipment and storage media. Background Art

[0002] The flash memory particles of the solid-state drive are composed of small flash memory blocks. Due to the characteristics of flash memory, there will be bad blocks in the solid-state drive. The wafer will be packaged into flash memory particles after many processes such as testing, cutting, and packaging. In this process, bad blocks may be generated in the flash memory particles. In other words, the new solid-state drive may have more or less bad blocks when it leaves the factory, but these bad blocks have been shielded and sealed by the main control, which does not affect the overall capacity and performance of the solid-state drive;

[0003] Under the current technical background, as the SSD is used for a period of time, some originally good flash blocks in the SSD will become bad blocks due to wear or some unexpected conditions during use. The causes of bad blocks include unpredictable factors such as temperature, voltage, number of writes, and external physical damage. How to prevent and promptly deal with bad blocks in SSDs is the current technical problem.

[0004] To this end, we propose a balanced management method for bad blocks of a solid state drive, a computer device, and a storage medium. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention aims to provide a balanced management method for bad blocks of a solid state drive, a computer device and a storage medium.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] First, the balanced management method of the bad blocks of the solid state drive, the steps of the balanced management method are as follows:

[0008] Step S101, when the supporting service software of the solid state drive is initially run, the initial inspection module is run to perform a read and write test on each storage unit of the solid state drive, and the initial inspection bad block information of the solid state drive is comprehensively sorted out and sent to the bad block analysis module via the processor;

[0009] Step S102, the bad block analysis module analyzes the impact of the bad blocks in the solid state drive, calculates the initial physical damage rate and initial logical damage rate of the solid state drive, and sends them to the impact assessment module via the processor;

[0010] Step S103, the impact assessment module assesses the impact of the bad block on the operation of the solid state drive, generates a mechanical fault signal according to the assessment result, or assesses the logical damage level of the solid state drive and sends it to the processor. If the processor receives the mechanical fault signal, the solid state drive is disabled. If the processor receives the logical damage level, it is sent to the countermeasure execution module and the environment monitoring module.

[0011] Step S104, the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid state drive. At the same time, the environment monitoring module monitors the operating environment of the solid state drive and generates a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read / write test signal according to the detection result and sends it to the countermeasure execution module through the processor;

[0012] Step S105 , the countermeasure execution module adjusts the operating environment of the solid state drive according to the write restriction signal, the voltage abnormality signal, the temperature abnormality signal or the read / write test signal.

[0013] Furthermore, the initially detected bad block information includes the initially detected bad block type, initially detected bad block range and initially detected bad block capacity of the solid state drive during the initial bad block detection;

[0014] The operating environment data includes the block write count, block real-time voltage, and block real-time temperature of each normal block in the solid-state drive.

[0015] Furthermore, the specific operation steps of the read-write test are as follows:

[0016] Step S1011, writing the test files into the storage units in the solid state drive respectively, if the test files are successfully written into the storage units, executing step S1013, if the test files are not successfully written into the storage units, executing step S1012;

[0017] Step S1012, after the user write restriction is lifted, try to write the test file again. If the test file is successfully written into the storage unit, execute step S1013. If the test file is not successfully written into the storage unit, determine that the storage unit is a physical bad block;

[0018] Step S1013, reading the test file stored in each storage unit, if the test file is read successfully, the storage unit is determined to be a normal block.

[0019] Furthermore, the process of analyzing the influence of bad blocks in the solid state drive by the bad block analysis module is specifically as follows:

[0020] Step S1021, obtaining the initial inspection bad block type, initial inspection bad block range and initial inspection bad block capacity of the solid state drive, grouping according to the initial inspection bad block type, and obtaining the initial inspection physical bad blocks and initial inspection logical bad blocks, the initial inspection physical bad block range FWa, the initial inspection physical bad block capacity RLa and the initial inspection logical bad block capacity RLb by grouping, wherein a is the initial inspection physical bad block sequence number, and the upper limit of a is m, b is the initial inspection logical bad block sequence number, and the upper limit of b is n, m and n are both positive integers and the value of m+n is equal to the number of initial inspection bad blocks;

[0021] Step S1022, calculating the initial physical damage rate WS of the solid state drive according to a formula, the specific formula is as follows:

[0022] ;

[0023] At the same time, the initial inspection logic damage rate LS of the solid state drive is calculated according to the formula. The specific formula is as follows;

[0024] ; Among them, KS is the solid state drive particle area, ZL is the solid state drive storage capacity, and the above data are known values ​​and can be extracted from the solid state drive controller.

[0025] Furthermore, the process of the impact assessment module assessing the impact degree of the bad block is specifically as follows:

[0026] Step S1031, obtaining the initial physical damage rate of the solid state drive and comparing it with the physical damage threshold value:

[0027] If the initial physical damage rate of the solid state drive is greater than or equal to the physical damage threshold, a mechanical failure signal is generated;

[0028] If the physical damage rate of the SSD in the initial inspection is less than the physical damage threshold, proceed to the subsequent steps;

[0029] Step S1032, obtaining the initial detection logic damage rate of the solid state drive, and comparing the initial detection logic damage rate with the logic damage threshold:

[0030] If the initial inspection logic damage rate of the solid state drive is less than or equal to the first logic damage threshold, the logic damage level of the solid state drive is determined to be the first logic damage level; if the initial inspection logic damage rate of the solid state drive is greater than the first logic damage threshold and less than or equal to the second logic damage threshold, the logic damage level of the solid state drive is determined to be the second logic damage level; if the initial inspection logic damage rate of the solid state drive is greater than the second logic damage threshold, the logic damage level of the solid state drive is determined to be the third logic damage level;

[0031] Among them, the value of the physical damage threshold is greater than zero, the values ​​of the first logical damage threshold and the second logical damage threshold are both greater than zero, the first logical damage threshold is less than the second logical damage threshold, the bad block impact degree of the first logical damage level is lower than the bad block impact degree of the second logical damage level, and the bad block impact degree of the second logical damage level is lower than the bad block impact degree of the third logical damage level.

[0032] Furthermore, the countermeasure management process of the countermeasure execution module is as follows:

[0033] If the logical damage level of the solid state drive is the first logical damage level, the bad blocks in the solid state drive are marked and a bad block hiding operation is performed; if the logical damage level of the solid state drive is the second logical damage level, a bad block replacement operation is performed on the bad blocks in the solid state drive; if the logical damage level of the solid state drive is the third logical damage level, a bad block erasing operation is performed on the bad blocks in the solid state drive;

[0034] Among them, bad block hiding allows the SSD to hide bad blocks when providing data, making it impossible for users to access the bad blocks. When the number of bad blocks exceeds the limit, the SSD controller will replace the bad blocks with spare blocks, thereby achieving bad block replacement. Bad block erasure erases blocks to their initial state in units of blocks, so that they can be put back into use.

[0035] Furthermore, the process of the environment monitoring module monitoring the operating environment of the solid state drive is specifically as follows:

[0036] Step S1041, obtaining and selecting corresponding monitoring standards according to the logical damage level of the solid state drive, the monitoring standards include the critical number of block writes, the block voltage floating range and the block temperature floating range, and the monitoring standards are specifically as follows:

[0037] When the logic damage level of the solid state drive is the first logic damage level, the monitoring criteria are the first critical number of writes, the first block voltage floating range, and the first block temperature floating range;

[0038] When the logic damage level of the solid state drive is the second logic damage level, the monitoring criteria are the second critical number of writes, the second block voltage floating range, and the second block temperature floating range;

[0039] When the logic damage level of the solid state drive is the third logic damage level, the monitoring criteria are the third critical number of writes, the third block voltage floating range, and the third block temperature floating range;

[0040] wherein the first write critical number is less than the second write critical number, the second write critical number is less than the third write critical number, the median of the block voltage floating interval is the rated block voltage, and the median of the block temperature floating interval is the rated block temperature;

[0041] Step S1042, monitoring and obtaining the block write times of each normal block in the solid state drive and comparing them with the corresponding block write critical times:

[0042] If the number of block writes of each normal block in the solid state drive is greater than or equal to the corresponding critical number of block writes, a write restriction signal is generated;

[0043] If the number of block writes of each normal block in the solid state drive is less than the corresponding critical number of block writes, proceed to the subsequent steps;

[0044] Step S1043, monitoring and obtaining the real-time block voltage and the real-time block temperature of each normal block in the solid state drive, and comparing them with the corresponding block voltage floating interval and block temperature floating interval respectively;

[0045] If the values ​​of the block real-time voltage and the block real-time temperature both belong to the corresponding block voltage floating range and block temperature floating range, no operation is performed;

[0046] If the block real-time voltage does not belong to the corresponding block voltage floating interval or the value of the block real-time temperature does not belong to the corresponding block temperature floating interval, a voltage abnormality signal or a temperature abnormality signal is generated;

[0047] If the values ​​of the block real-time voltage and the block real-time temperature do not belong to the corresponding block voltage floating interval and block temperature floating interval, a read / write test signal is generated.

[0048] Furthermore, the module working process of the countermeasure execution module is as follows:

[0049] If a write restriction signal is received, the user is restricted from writing data to the normal block;

[0050] If a voltage abnormality signal is received, a command is sent to the voltage transformation element to adjust the input voltage of the solid state drive to the rated voltage;

[0051] If an abnormal temperature signal is received, a command is sent to the temperature control element to adjust the operating temperature of the solid state drive to the rated temperature;

[0052] If a read / write test signal is received, a read / write test is performed on the normal block.

[0053] In a second aspect, the present invention provides a computer device, the computer device comprising:

[0054] A memory storing a computer program;

[0055] A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the steps in the above method are implemented.

[0056] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned method when executed by a processor.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] The present invention firstly utilizes the operation initial inspection module to perform a read and write test on the solid state hard disk, obtains the initial inspection bad block information of the solid state hard disk, and sends it to the bad block analysis module; then utilizes the bad block analysis module to analyze and calculate the bad block impact in the solid state hard disk, obtains the initial inspection physical damage rate and the initial inspection logical damage rate of the solid state hard disk, and sends them to the impact assessment module; then the impact assessment module is used to evaluate and generate a mechanical fault signal or analyze to obtain a logical damage level, and sends it to a countermeasure execution module and an environmental monitoring module; then the countermeasure execution module is used to perform countermeasure management on the logical bad blocks in the solid state hard disk; finally, the operating environment of the solid state hard disk is monitored through the environmental monitoring module, and a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read and write test signal is generated, thereby realizing intelligent prevention and targeted countermeasure processing of bad blocks of the solid state hard disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

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

[0061] Figure 2 is the overall system block diagram of the present invention;

[0062] Figure 3 It is a principle schematic diagram of the environmental monitoring module in the present invention;

[0063] Figure 4 It is a schematic diagram of the structure of the computer device in the present invention. DETAILED DESCRIPTION

[0064] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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.

[0065] In one embodiment, see Figure 1-Figure 3As shown, the technical solution provided by the present invention is: a balanced management method for bad blocks of a solid-state hard disk. Since the number of erasures and writes of each flash memory unit is limited, repeated erasures and writes to a specific storage unit will accelerate the generation of bad blocks. Since all solid-state hard disk products have introduced a wear leveling algorithm, with the help of the FTL flash memory conversion layer, each write is performed on a position with less wear, maximally balancing the wear of all flash memory units of the entire solid-state hard disk, thereby reducing the generation of bad blocks and extending the service life of the solid-state hard disk.

[0066] Among them, the bad blocks of SSDs we often talk about mainly include physical bad blocks and logical bad blocks. Physical bad blocks reflect physical damage on SSDs, such as burning, falling off or missing particles inside the hard disk. The data stored in such bad blocks cannot be repaired. Logical bad blocks include storage units that cannot be read or written normally or whose read and write times have reached the upper limit. The data stored in such bad blocks can be transferred through BIOS to achieve data repair. The bad block range is specifically the damage area range of physical bad blocks at the physical level. The bad block capacity is the storage space size corresponding to physical bad blocks or logical bad blocks.

[0067] In this embodiment, the steps of the method for balancing bad blocks of a solid state drive are specifically as follows:

[0068] Step S101, when the supporting service software of the solid state drive is initially run, the initial inspection module is run to perform a read and write test on each storage unit of the solid state drive, and the initial inspection bad block information of the solid state drive is comprehensively sorted out and sent to the bad block analysis module via the processor;

[0069] Step S102, the bad block analysis module analyzes the impact of the bad blocks in the solid state drive, calculates the initial physical damage rate and initial logical damage rate of the solid state drive, and sends them to the impact assessment module via the processor;

[0070] Step S103, the impact assessment module assesses the impact of the bad block on the operation of the solid state drive, generates a mechanical fault signal according to the assessment result, or assesses the logical damage level of the solid state drive and sends it to the processor. If the processor receives the mechanical fault signal, the solid state drive is disabled. If the processor receives the logical damage level, it is sent to the countermeasure execution module and the environment monitoring module.

[0071] Step S104, the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid state drive. At the same time, the environment monitoring module monitors the operating environment of the solid state drive and generates a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read / write test signal according to the detection result and sends it to the countermeasure execution module through the processor;

[0072] Step S105, the countermeasure execution module adjusts the operating environment of the solid state drive according to the write restriction signal, the voltage abnormality signal, the temperature abnormality signal or the read / write test signal;

[0073] In this embodiment, the above method is a supporting service software for the solid-state drive, and the user can obtain the supporting service through the official download channel or the QR code attached to the product manual;

[0074] See also Figure 2 and Figure 3 As shown, the method specifically involves a processor, and the processor is connected to an operation initial inspection module, a bad block analysis module, an impact assessment module, an environment monitoring module and a countermeasure execution module;

[0075] When the supporting service software of the solid state drive is first run, the initial run detection module performs bad block detection on the solid state drive. The bad block detection process is as follows:

[0076] Perform read and write tests on each storage unit of the solid state drive, and comprehensively organize and obtain the initial bad block information of the solid state drive, which includes the initial bad block type, initial bad block range, and initial bad block capacity of the solid state drive during the initial bad block detection;

[0077] The specific steps of the read and write test are as follows:

[0078] Step S1011, writing the test files into the storage units in the solid state drive respectively, if the test files are successfully written into the storage units, executing step S1013, if the test files are not successfully written into the storage units, executing step S1012;

[0079] Step S1012, after the user write restriction is lifted, try to write the test file again. If the test file is successfully written into the storage unit, execute step S1013. If the test file is not successfully written into the storage unit, determine that the storage unit is a physical bad block;

[0080] Step S1013, reading the test file stored in each storage unit, if the test file is successfully read, then the storage unit is determined to be a normal block;

[0081] It should be specifically explained that the SSD has write restrictions set for users. In the actual working process, when the SSD provides data, the bad blocks will be hidden from the outside, and the user cannot write data to the bad blocks. After the user write restrictions are lifted, data can be forcibly written to the logical bad blocks, but the data in the logical bad blocks cannot be read. Physical bad blocks cannot write data under any conditions;

[0082] The running initial inspection module transmits the initial inspection bad block information of the solid state hard disk to the processor, and the processor sends the initial inspection bad block information of the solid state hard disk to the bad block analysis module;

[0083] The bad block analysis module is used to analyze the impact of bad blocks in the solid state drive. The analysis process is as follows:

[0084] Obtain the initial inspection bad block type, initial inspection bad block range and initial inspection bad block capacity of the solid state drive, group them according to the initial inspection bad block type, and obtain the initial inspection physical bad blocks and initial inspection logical bad blocks, the initial inspection physical bad block range FWa, the initial inspection physical bad block capacity RLa and the initial inspection logical bad block capacity RLb, where a is the initial inspection physical bad block sequence number, and the upper limit of a is m, b is the initial inspection logical bad block sequence number, and the upper limit of b is n, m and n are both positive integers and the value of m+n is equal to the number of initial inspection bad blocks;

[0085] The initial physical damage rate WS of the solid state drive is calculated according to the formula. The specific formula is as follows:

[0086] ;

[0087] At the same time, the initial inspection logic damage rate LS of the solid state drive is calculated according to the formula. The specific formula is as follows;

[0088] ; Wherein, KS is the particle area of ​​the solid state drive, and ZL is the storage capacity of the solid state drive. The above data are known values ​​and can be extracted from the controller of the solid state drive;

[0089] The bad block analysis module sends the initial physical damage rate and initial logical damage rate of the solid state drive to the processor, and the processor sends the initial physical damage rate and initial logical damage rate of the solid state drive to the impact assessment module;

[0090] The impact assessment module is used to assess the impact of bad blocks on the operation of the solid state drive. The bad block assessment process is as follows:

[0091] Obtain the initial physical damage rate of the solid state drive and compare it with the physical damage threshold:

[0092] If the initial physical damage rate of the solid state drive is greater than or equal to the physical damage threshold, a mechanical failure signal is generated;

[0093] If the initial physical damage rate of the SSD is less than the physical damage threshold, the initial logical damage rate of the SSD is obtained, and the initial logical damage rate is compared with the logical damage threshold:

[0094] If the initial inspection logic damage rate of the solid state hard disk is less than or equal to the first logic damage threshold, the logic damage level of the solid state hard disk is determined to be the first logic damage level;

[0095] If the initial inspection logic damage rate of the solid state drive is greater than the first logic damage threshold and less than or equal to the second logic damage threshold, the logic damage level of the solid state drive is determined to be the second logic damage level;

[0096] If the initial inspection logic damage rate of the solid state hard disk is greater than the second logic damage threshold, the logic damage level of the solid state hard disk is determined to be the third logic damage level;

[0097] Wherein, the value of the physical damage threshold is greater than zero, the values ​​of the first logical damage threshold and the second logical damage threshold are both greater than zero, the first logical damage threshold is less than the second logical damage threshold, the influence degree of bad blocks of the first logical damage level is lower than the influence degree of bad blocks of the second logical damage level, and the influence degree of bad blocks of the second logical damage level is lower than the influence degree of bad blocks of the third logical damage level;

[0098] The impact assessment module sends the mechanical fault signal or the logical damage level of the solid state drive to the processor. If the processor receives the mechanical fault signal, the solid state drive is disabled. If the processor receives the logical damage level, the signal is sent to the countermeasure execution module and the environmental monitoring module.

[0099] The countermeasure execution module is used to perform countermeasure management on the logical bad blocks in the solid state drive. The management process is as follows:

[0100] If the logical damage level of the solid state drive is the first logical damage level, marking the bad blocks in the solid state drive and performing a bad block hiding operation;

[0101] If the logical damage level of the solid state drive is the second logical damage level, performing a bad block replacement operation on the bad blocks in the solid state drive;

[0102] If the logical damage level of the solid state drive is the third logical damage level, performing a bad block erasing operation on the bad blocks in the solid state drive;

[0103] Among them, bad block hiding enables the SSD to hide bad blocks when providing data, making it impossible for users to access the bad blocks. When the number of bad blocks exceeds the limit, the SSD controller will replace the bad blocks with spare blocks, thereby achieving bad block replacement. Bad block erasure erases the blocks to the initial state in units of blocks, so that the drives can be put back into use.

[0104] The environment monitoring module is used to monitor the operating environment of the solid state drive. The monitoring process is as follows:

[0105] In this embodiment, the operating environment data of the solid-state hard disk is monitored by combining the internal hardware of the solid-state hard disk with the supporting service software. The operating environment data includes the number of block writes, the real-time voltage of the block, and the real-time temperature of the block of each normal block in the solid-state hard disk;

[0106] Obtain and select corresponding monitoring standards according to the logical damage level of the solid-state drive. The monitoring standards include the critical number of block writes, the block voltage floating range, and the block temperature floating range. The specific monitoring standards are as follows:

[0107] When the logic damage level of the solid state drive is the first logic damage level, the monitoring criteria are the first critical number of writes, the first block voltage floating range, and the first block temperature floating range;

[0108] When the logic damage level of the solid state drive is the second logic damage level, the monitoring criteria are the second critical number of writes, the second block voltage floating range, and the second block temperature floating range;

[0109] When the logic damage level of the solid state drive is the third logic damage level, the monitoring criteria are the third critical number of writes, the third block voltage floating range, and the third block temperature floating range;

[0110] The first write critical number is less than the second write critical number, the second write critical number is less than the third write critical number, and the numerical relationship between the block voltage floating range and the block temperature floating range is as follows: Figure 3 As shown, the median of the block voltage floating range is the rated block voltage, and the median of the block temperature floating range is the rated block temperature;

[0111] Compare the block write count of each normal block in the SSD with the corresponding block write critical count:

[0112] If the number of block writes of each normal block in the solid state drive is greater than or equal to the corresponding critical number of block writes, a write restriction signal is generated;

[0113] If the block write times of each normal block in the solid-state hard disk are less than the corresponding block write critical times, the block real-time voltage and block real-time temperature of each normal block in the solid-state hard disk are compared with the corresponding block voltage floating interval and block temperature floating interval respectively;

[0114] If the values ​​of the block real-time voltage and the block real-time temperature both belong to the corresponding block voltage floating range and block temperature floating range, no operation is performed;

[0115] If the block real-time voltage does not belong to the corresponding block voltage floating interval or the value of the block real-time temperature does not belong to the corresponding block temperature floating interval, a voltage abnormality signal or a temperature abnormality signal is generated;

[0116] If the values ​​of the block real-time voltage and the block real-time temperature do not belong to the corresponding block voltage floating interval and block temperature floating interval, a read-write test signal is generated;

[0117] The environment monitoring module sends a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read-write test signal to the processor, and the processor sends the write restriction signal, the voltage abnormality signal, the temperature abnormality signal or the read-write test signal to the countermeasure execution module;

[0118] The countermeasure execution module is also used to adjust the operating environment of the solid state drive according to the signal. The working process of the module is as follows:

[0119] If a write restriction signal is received, the user is restricted from writing data to the normal block;

[0120] If a voltage abnormality signal is received, a command is sent to the voltage transformation element to adjust the input voltage of the solid state drive to the rated voltage;

[0121] If an abnormal temperature signal is received, a command is sent to the temperature control element (water cooling or air cooling equipment) to adjust the working temperature of the solid state drive to the rated temperature;

[0122] If a read / write test signal is received, a read / write test is performed on the normal block. The specific steps of the read / write test are shown in S1011-S1013;

[0123] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.

[0124] Figure 4 The following is a schematic diagram of the physical structure of a computer device, such as Figure 4 As shown, the computer device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute the balanced management method of the bad blocks of the solid state drive, the method comprising: running the initial inspection module to perform a read and write test on the solid state drive to obtain the initial inspection bad block information of the solid state drive and send it to the bad block analysis module, the bad block analysis module analyzes and calculates the impact of the bad blocks in the solid state drive to obtain the initial inspection physical damage rate and the initial inspection logical damage rate of the solid state drive and send them to the impact assessment module, the impact assessment module evaluates and generates a mechanical fault signal or analyzes to obtain a logical damage level and sends it to the countermeasure execution module and the environmental monitoring module, the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid state drive, and the environmental monitoring module monitors the operating environment of the solid state drive and generates a write restriction signal, a voltage abnormality signal, a temperature abnormality signal, or a read and write test signal.

[0125] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0126] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the balanced management method of bad blocks of a solid-state hard disk provided by the above methods, and the method includes: running an initial inspection module to perform a read and write test on the solid-state hard disk to obtain the initial inspection bad block information of the solid-state hard disk and send it to a bad block analysis module, the bad block analysis module analyzes and calculates the impact of bad blocks in the solid-state hard disk to obtain the initial inspection physical damage rate and initial inspection logical damage rate of the solid-state hard disk and send them to an impact assessment module, the impact assessment module evaluates and generates a mechanical fault signal or analyzes to obtain a logical damage level and sends it to a countermeasure execution module and an environmental monitoring module, the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid-state hard disk, and the environmental monitoring module monitors the operating environment of the solid-state hard disk to generate a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read and write test signal.

[0127] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which is implemented by a processor to perform the above-mentioned methods, the method comprising: running an initial inspection module to perform a read and write test on the solid-state hard disk to obtain the initial inspection bad block information of the solid-state hard disk and send it to a bad block analysis module, the bad block analysis module analyzes and calculates the impact of the bad blocks in the solid-state hard disk to obtain the initial inspection physical damage rate and the initial inspection logical damage rate of the solid-state hard disk and send them to an impact assessment module, the impact assessment module evaluates and generates a mechanical fault signal or analyzes to obtain a logical damage level and sends it to a countermeasure execution module and an environmental monitoring module, the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid-state hard disk, and the environmental monitoring module monitors the operating environment of the solid-state hard disk to generate a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read and write test signal.

[0128] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0130] 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 deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for balancing bad blocks of a solid state drive, characterized in that: The steps of the balanced management method are as follows: Step S101, when the supporting service software of the solid state drive is initially run, the initial inspection module is run to perform a read and write test on each storage unit of the solid state drive, and the initial inspection bad block information of the solid state drive is comprehensively sorted out and sent to the bad block analysis module via the processor; The initial bad block information includes the initial bad block type, initial bad block range and initial bad block capacity of the solid state drive during the initial bad block detection; In step S101, the specific operation steps of the read-write test are as follows: Step S1011, writing the test files into the storage units in the solid state drive respectively, if the test files are successfully written into the storage units, executing step S1013, if the test files are not successfully written into the storage units, executing step S1012; Step S1012, after the user write restriction is lifted, try to write the test file again. If the test file is successfully written into the storage unit, execute step S1013. If the test file is not successfully written into the storage unit, determine that the storage unit is a physical bad block; Step S1013, reading the test file stored in each storage unit, if the test file is successfully read, the storage unit is determined to be a normal block, if the test file is not successfully read, the storage unit is determined to be a logical bad block; Among them, the SSD sets write restrictions for users. When the SSD provides data, bad blocks are hidden from the outside, and users cannot write data to bad blocks. After the user write restrictions are lifted, data can be forcibly written to logical bad blocks, but the data in the logical bad blocks cannot be read. Data cannot be written to physical bad blocks under any conditions; Step S102, the bad block analysis module analyzes the impact of the bad blocks in the solid state drive, calculates the initial physical damage rate and initial logical damage rate of the solid state drive, and sends them to the impact assessment module via the processor; In step S102, the analysis process of the bad block analysis module is as follows: Step S1021, obtaining the initial inspection bad block type, initial inspection bad block range and initial inspection bad block capacity of the solid state drive, grouping according to the initial inspection bad block type, and obtaining the initial inspection physical bad blocks and initial inspection logical bad blocks, the initial inspection physical bad block range FWa, the initial inspection physical bad block capacity RLa and the initial inspection logical bad block capacity RLb by grouping, wherein a is the initial inspection physical bad block sequence number, and the upper limit of a is m, b is the initial inspection logical bad block sequence number, and the upper limit of b is n, m and n are both positive integers and the value of m+n is equal to the number of initial inspection bad blocks; Step S1022, calculating the initial physical damage rate WS of the solid state drive according to a formula, the specific formula is as follows: ; At the same time, the initial inspection logic damage rate LS of the solid state drive is calculated according to the formula. The specific formula is as follows; ; Wherein, KS is the particle area of ​​the solid state drive, and ZL is the storage capacity of the solid state drive. The above data are known values ​​and can be extracted from the controller of the solid state drive; Step S103, the impact assessment module assesses the impact of the bad block on the operation of the solid state drive, generates a mechanical fault signal according to the assessment result, or assesses the logical damage level of the solid state drive and sends it to the processor. If the processor receives the mechanical fault signal, the solid state drive is disabled. If the processor receives the logical damage level, it is sent to the countermeasure execution module and the environment monitoring module. Step S104, the countermeasure execution module performs countermeasure management on the logical bad blocks in the solid state drive. At the same time, the environment monitoring module monitors the operating environment of the solid state drive and generates a write restriction signal, a voltage abnormality signal, a temperature abnormality signal or a read / write test signal according to the detection result and sends it to the countermeasure execution module through the processor; Step S105 , the countermeasure execution module adjusts the operating environment of the solid state drive according to the write restriction signal, the voltage abnormality signal, the temperature abnormality signal or the read / write test signal.

2. The method for balancing bad blocks of a solid state drive according to claim 1, characterized in that: The operating environment data includes the block write count, block real-time voltage, and block real-time temperature of each normal block in the solid-state drive.

3. The method for balancing bad blocks of a solid state drive according to claim 1, characterized in that: In step S103, the evaluation process of the impact evaluation module is as follows: Step S1031, obtaining the initial physical damage rate of the solid state drive and comparing it with the physical damage critical value. If the initial physical damage rate of the solid state drive is greater than or equal to the physical damage critical value, a mechanical failure signal is generated. If the initial physical damage rate of the solid state drive is less than the physical damage critical value, subsequent steps are performed. Step S1032, obtaining the initial detection logic damage rate of the solid state drive, and comparing the initial detection logic damage rate with the logic damage threshold, to determine whether the logic damage level of the solid state drive is the first logic damage level, the second logic damage level, or the third logic damage level; The influence degree of bad blocks of the first logical damage level is lower than that of bad blocks of the second logical damage level, and the influence degree of bad blocks of the second logical damage level is lower than that of bad blocks of the third logical damage level.

4. The method for balancing bad blocks of a solid state drive according to claim 3, characterized in that: In step S104, the countermeasure management process of the countermeasure execution module is as follows: If the logical damage level of the solid state drive is the first logical damage level, marking the bad blocks in the solid state drive and performing a bad block hiding operation; If the logical damage level of the solid state drive is the second logical damage level, performing a bad block replacement operation on the bad blocks in the solid state drive; If the logical damage level of the solid state drive is the third logical damage level, performing a bad block erasing operation on the bad blocks in the solid state drive; Among them, bad block hiding allows the SSD to hide bad blocks when providing data, making it impossible for users to access the bad blocks. When the number of bad blocks exceeds the limit, the SSD controller will replace the bad blocks with spare blocks, thereby achieving bad block replacement. Bad block erasure erases blocks to their initial state in units of blocks, so that they can be put back into use.

5. The method for balancing bad blocks of a solid state drive according to claim 3, characterized in that: Step S104 also includes the monitoring process of the environment monitoring module: Step S1041, obtaining and selecting corresponding monitoring standards according to the logical damage level of the solid state drive, the monitoring standards include the critical number of block writes, the block voltage floating range and the block temperature floating range, and the monitoring standards are specifically as follows: When the logic damage level of the solid state drive is the first logic damage level, the monitoring criteria are the first critical number of writes, the first block voltage floating range, and the first block temperature floating range; When the logic damage level of the solid state drive is the second logic damage level, the monitoring criteria are the second critical number of writes, the second block voltage floating range, and the second block temperature floating range; When the logic damage level of the solid state drive is the third logic damage level, the monitoring criteria are the third critical number of writes, the third block voltage floating range, and the third block temperature floating range; wherein the first write critical number is less than the second write critical number, the second write critical number is less than the third write critical number, the median of the block voltage floating interval is the rated block voltage, and the median of the block temperature floating interval is the rated block temperature; Step S1042, monitoring and obtaining the block write times of each normal block in the solid state drive and comparing them with the corresponding block write critical times: If the number of block writes of each normal block in the solid state drive is greater than or equal to the corresponding critical number of block writes, a write restriction signal is generated; If the number of block writes of each normal block in the solid state drive is less than the corresponding critical number of block writes, proceed to the subsequent steps; Step S1043, monitoring and obtaining the real-time block voltage and the real-time block temperature of each normal block in the solid state drive, and comparing them with the corresponding block voltage floating interval and block temperature floating interval respectively; If the values ​​of the block real-time voltage and the block real-time temperature both belong to the corresponding block voltage floating range and block temperature floating range, no operation is performed; If the block real-time voltage does not belong to the corresponding block voltage floating interval or the value of the block real-time temperature does not belong to the corresponding block temperature floating interval, a voltage abnormality signal or a temperature abnormality signal is generated; If the values ​​of the block real-time voltage and the block real-time temperature do not belong to the corresponding block voltage floating interval and block temperature floating interval, a read / write test signal is generated.

6. The method for balancing bad blocks of a solid state drive according to claim 5, characterized in that: In step S105, the working process of the countermeasure execution module further includes: If a write restriction signal is received, the user is restricted from writing data to the normal block; If a voltage abnormality signal is received, a command is sent to the voltage transformation element to adjust the input voltage of the solid state drive to the rated voltage; If an abnormal temperature signal is received, a command is sent to the temperature control element to adjust the operating temperature of the solid state drive to the rated temperature; If a read / write test signal is received, a read / write test is performed on the normal block.

7. A computer device, characterized in that: The computer device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the method described in any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.