A solid state disk scanning method, device and related equipment
By monitoring the temperature of the controller chip and flash memory chip in the solid-state drive (SSD), the scanning process is initiated in a timely manner, solving the problem of untimely SSD scanning, ensuring data security and extending the life of the hard drive.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2026-03-27
AI Technical Summary
Existing solid-state drive (SSD) scanning methods suffer from delayed scanning, increasing the risk of data corruption.
By monitoring the real-time temperatures of the main control chip and flash memory chip, the relationship between temperature difference and threshold is determined, high-temperature timing is initiated, and timely scanning is performed to prevent data corruption.
It enables the timely detection and handling of storage blocks that may be corrupted, maximizing data security and extending the lifespan of hard drives.
Smart Images

Figure CN119883125B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of solid-state drives (SSDs), and more particularly to a SSD scanning method, apparatus, and related equipment. Background Technology
[0002] In existing technology, when an SSD (Solid State Drive) is powered on and idle, it periodically scans the storage blocks in the current storage space to check the status of the storage blocks. If bad blocks are detected, the SSD will move the data stored on the bad blocks. However, in many cases, the data has already been corrupted.
[0003] In practical applications, storage blocks do not suddenly become bad blocks. They usually first become unstable blocks and then become bad blocks. For example, when an SSD overheats due to reading and writing operations, it may further accelerate the transformation of storage blocks in the SSD into bad blocks. If the SSD waits until it is idle before starting the storage block scanning process, it may have already missed the best opportunity to maintain data security. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a solid-state drive scanning method, apparatus and related equipment to solve the technical problem of untimely scanning in existing solid-state drive scanning methods.
[0005] Firstly, this application provides a solid-state drive (SSD) scanning method, applied to a solid-state drive, the method comprising:
[0006] Obtain the first real-time temperature of the main controller chip in the solid-state drive and the second real-time temperature of the flash memory chip in the solid-state drive;
[0007] Determine the temperature difference between the first real-time temperature and the second real-time temperature, the magnitude relationship between the first real-time temperature and the first temperature threshold, and the magnitude relationship between the second real-time temperature and the first temperature threshold;
[0008] In response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold, a high-temperature timing is initiated.
[0009] In response to the temperature difference being greater than a second temperature threshold, and / or the duration obtained by the high-temperature timing being greater than a time threshold, a scan is performed on the flash memory chip.
[0010] Secondly, this application provides a solid-state drive scanning device for use in solid-state drives, the device comprising: a temperature acquisition module, a temperature monitoring module, and a scanning module;
[0011] The temperature acquisition module is configured to acquire a first real-time temperature of a master control chip in the solid state disk and a second real-time temperature of a flash memory chip in the solid state disk.
[0012] The temperature monitoring module is configured to determine a temperature difference between the first real-time temperature and the second real-time temperature, a size relationship between the first real-time temperature and a first temperature threshold, and a size relationship between the second real-time temperature and the first temperature threshold.
[0013] The temperature monitoring module is configured to start high-temperature timing in response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold.
[0014] The scanning module is configured to scan the flash memory chip in response to the temperature difference being greater than a second temperature threshold and / or a time length obtained through the high-temperature timing being greater than a time threshold.
[0015] In a third aspect, the present application provides an electronic device, which includes a processor and a memory, the memory being configured to store an application program, and the processor being configured to implement the solid state disk scanning method described above by running or executing a software program stored in the memory.
[0016] In a fourth aspect, the present application provides a computer readable storage medium, which is configured to store program codes executed by a processor, and the program codes are configured to implement the solid state disk scanning method described above.
[0017] In a fifth aspect, the present application provides a computer program product, which includes computer instructions, and when the computer instructions are run on an electronic device, the electronic device implements the solid state disk scanning method described above.
[0018] Advantages:
[0019] The present application provides a solid state disk scanning method, which is applied to a solid state disk, and the method includes the following steps: acquiring a first real-time temperature of a master control chip in the solid state disk and a second real-time temperature of a flash memory chip in the solid state disk; determining a temperature difference between the first real-time temperature and the second real-time temperature, a size relationship between the first real-time temperature and a first temperature threshold, and a size relationship between the second real-time temperature and the first temperature threshold; starting high-temperature timing in response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold; and scanning the flash memory chip in response to the temperature difference being greater than a second temperature threshold and / or a time length obtained through the high-temperature timing being greater than a time threshold.
[0020] In conclusion, the present application takes the size relationship between the real-time temperature of the master control chip and the flash memory chip and the first threshold value, and the relationship between the temperature difference between the master control chip and the flash memory chip and the second threshold value, as the condition for triggering scanning, so that the solid state disk can timely discover and timely process the storage blocks that may have data damage, thereby maintaining data safety to the greatest extent. Therefore, the present application can solve the technical problem of the existing solid state disk scanning method that scanning is not timely. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. The following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0022] Figure 1 The flowchart of the solid state disk scanning method provided by the embodiments of the present application is shown in the figure.
[0023] Figure 2 The structural diagram of the solid state disk scanning device provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be described clearly and completely in the following with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0025] The present application provides a solid state disk scanning method, which is applied to a solid state disk, such as Figure 1 as shown Figure 1 The flowchart of the solid state disk scanning method provided by the embodiments of the present application is shown in the figure. The method comprises:
[0026] S110: obtaining the first real-time temperature of the master control chip in the solid state disk and the second real-time temperature of the flash memory chip in the solid state disk.
[0027] Specifically, in actual application, high temperature can cause the performance of the circuit components inside the master control chip and the flash memory chip to decline, thereby affecting the data processing and scheduling ability of the master control chip and the data read-write speed of the flash memory chip. In addition, high temperature can cause the ability of the master control chip to process data to decline, and can also cause the flash memory chip to be more prone to read-write errors, further causing the stored data to be damaged or lost. If the data is damaged or lost, the recovery difficulty will be greatly increased.
[0028] In actual operation, since high temperature can cause the above-mentioned adverse effects, the temperature of the main control chip and the flash memory chip needs to be monitored.
[0029] In the embodiments of the present application, the main control chip and the flash memory chip of the SSD are both provided with temperature sensors for monitoring the real-time temperature of the main control chip and the flash memory chip; in actual operation, the temperature sensors send the real-time temperature monitored by them to the flash translation layer in the main control chip at a preset interval; wherein the preset interval can be determined according to actual needs, which is not limited in the present application.
[0030] In one implementation, after S110, the method further comprises steps (1)-(3), the details of which are shown as follows:
[0031] Step (1): determining the size relationship between the first real-time temperature and the third temperature threshold and the size relationship between the second real-time temperature and the third temperature threshold.
[0032] Wherein, the third temperature threshold is greater than the first temperature threshold.
[0033] Step (2): in response to the first real-time temperature and the second real-time temperature both being greater than the third temperature threshold, if the solid state disk is in the process of executing read-write operation, stopping executing read-write operation.
[0034] Specifically, in the embodiments of the present application, the third temperature threshold is greater than the first temperature threshold, and if the first real-time temperature and the second real-time temperature are both greater than the third temperature threshold, it indicates that the current main control chip and flash memory chip are already at a very high working temperature. Since the excessively high temperature can cause changes in the physical structure inside the chip, such as metal migration, insulation layer breakdown, etc., these changes can cause permanent damage to the chip, therefore, whether it is the main control chip or the flash memory chip, it is necessary to stop the current processing process as much as possible, in order to reduce the real-time temperature of the main control chip and the flash memory chip as much as possible.
[0035] In actual operation, if the stopping of executing read-write operation is caused by the first real-time temperature and the second real-time temperature both being greater than the third temperature threshold, the SSD will send a notification to the host (computer device) to inform the user of the host that the current SSD cannot perform read-write operation at the current time.
[0036] Step (3): in response to the first real-time temperature and the second real-time temperature both being reduced to be equal to or less than the fourth temperature threshold, resuming the execution of read-write operation.
[0037] Specifically, in the embodiments of the present application, if the first real-time temperature and the second real-time temperature are both reduced to be equal to or less than the fourth temperature threshold, it indicates that the main control chip and the flash memory chip are already at a safe working temperature, i.e. the read-write operation can be resumed.
[0038] In actual operation, the fourth temperature threshold value can be determined according to actual needs, which is not limited in the present application.
[0039] S120: determining the temperature difference between the first real-time temperature and the second real-time temperature, the size relationship between the first real-time temperature and the first temperature threshold value, and the size relationship between the second real-time temperature and the first temperature threshold value.
[0040] Specifically, in the embodiments of the present application, the purpose of determining the temperature difference between the first real-time temperature and the second real-time temperature, the size relationship between the first real-time temperature and the first temperature threshold value, and the size relationship between the second real-time temperature and the first temperature threshold value is mainly to comprehensively monitor and evaluate the working state of the master chip and the flash chip inside the SSD, so as to ensure the normal operation of the SSD and prolong its service life.
[0041] Wherein, comparing the first real-time temperature and the second real-time temperature can not only obtain basic information such as whether the heat dissipation performance of the SSD is good, but also determine whether the higher second real-time temperature is caused by the external temperature outside the SSD.
[0042] Comparing the first real-time temperature and the second real-time temperature with the first temperature threshold value respectively can determine whether the master chip and the flash chip are in a safe working temperature range. If the real-time temperature of the master chip and the real-time temperature of the flash chip both exceed the first threshold value, it indicates that the SSD needs to be cautious for internal operation at this time, so as to prevent the master chip and the flash chip from being damaged due to high-temperature operation.
[0043] S130: starting high-temperature timing in response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold value.
[0044] Specifically, in the embodiments of the present application, starting high-temperature timing is to respond to the current temperature abnormality of the master chip and the flash chip in time; in actual operation, when any one of the first real-time temperature and the second real-time temperature is greater than the first temperature threshold value, the timer starts to work.
[0045] In actual operation, the time length obtained by high-temperature timing is also helpful for subsequent analysis of the working time of the SSD in a high-temperature environment and evaluation of its potential impact on the hardware life.
[0046] S140: scanning the flash chip in response to the temperature difference being greater than the second temperature threshold value, and / or the time length obtained by high-temperature timing being greater than the time threshold value.
[0047] Specifically, in the embodiment of the present application, when the temperature difference is greater than the second temperature threshold and the time length obtained by high temperature timing is greater than the time threshold, it indicates that the current master chip and the flash memory chip are already at a relatively high working temperature, so the accuracy of the data processing capability of the master chip and the data read-write capability of the flash memory chip will be greatly reduced, and more importantly, the possibility of damage to the data stored in the flash memory chip will also be greatly increased.
[0048] In an implementation manner, S140 comprises steps (4) to (5), details of which are shown as follows:
[0049] Step (4): In response to the temperature difference being greater than the second temperature threshold and / or the current time length obtained by high temperature timing being greater than the time threshold, a scanning process is reserved for the flash memory chip.
[0050] Step (5): In response to the first real-time temperature and the second real-time temperature both being reduced to be equal to or less than the fifth temperature threshold, scanning is performed for the flash memory chip.
[0051] Specifically, by reserving the scanning process instead of performing it immediately, additional workload is avoided when the SSD is in a high temperature state, and performing scanning at high temperature may exacerbate temperature rise and increase the risk of damage to the memory chip and the flash memory chip; in addition, scanning at low temperature may be more efficient because the performance of the SSD at low temperature is more stable and the error rate is lower.
[0052] In an implementation manner, the first state table and the second state table are stored in the master chip, the first state table is used to record the storage location of the unstable block in the flash memory chip, and the second state table is used to record the storage location of the cold data block in the flash memory chip; S140 comprises steps (6) to (11), details of which are shown as follows:
[0053] Step (6): According to the storage location of the unstable block recorded in the first state table, a first scanning is performed on the data stored in the unstable block to obtain a first scanning result.
[0054] Specifically, when the data stored in the storage block reaches a preset ratio of the error correction limit capability of the ECC (Error Correction Code) or the data stored in the storage block enters the re-reading process for correction, the storage block is considered to be an unstable block; the re-reading process is to re-execute ECC correction after adjusting the internal parameters of the flash memory chip for the first time ECC correction failure; the preset ratio can be determined according to actual needs.
[0055] The cold data block refers to a storage block in the flash memory chip with a relatively low access frequency.
[0056] In actual operation, the unstable block and the cold data block are determined according to different standards, so there is a storage block that is both an unstable block and a cold data block.
[0057] In the embodiment of the present application, since the data stored in the unstable block is very prone to error, if the unstable block is not handled in time, it may gradually deteriorate and eventually become a storage bad block, and when the temperature in the flash memory chip is too high, it will accelerate the conversion of the unstable block to the storage bad block.
[0058] In actual operation, since the data stored in the unstable block is very prone to error, it needs to be scanned first compared to other storage blocks.
[0059] Step (7): According to the first state table, the cold data block in the plurality of unstable blocks recorded in the second state table and not subjected to the first scan is determined as a to-be-scanned block.
[0060] Specifically, after the first scan for the unstable block is completed, a scan for other storage blocks at risk of storing data is needed; in the embodiment of the present application, after the first scan for the unstable block is completed, a scan for the cold data block is needed, but since some storage blocks are both unstable blocks and cold data blocks, when scanning the cold data block, the unstable blocks that have been scanned need to be excluded.
[0061] Step (8): According to the storage location of the to-be-scanned block recorded in the second state table, a second scan is performed on the data stored in the to-be-scanned block to obtain a second scan result.
[0062] Specifically, after the to-be-scanned block is determined, a second scan is performed on the data stored in the to-be-scanned block to obtain a second scan result.
[0063] Step (9): According to the first scan result, the data stored in the unstable block with an error is determined as a storage bad block.
[0064] Specifically, by analyzing the first scan result, the unstable block with data storage error is identified and determined as a storage bad block.
[0065] Step (10): The storage bad block is added to a garbage collection queue.
[0066] Specifically, the storage blocks in the garbage collection queue are used for garbage collection (GC).
[0067] Step (11): According to the second scan result, the data stored in the cold data block with an error is determined as an unstable block.
[0068] Step (12): updating the unstable block determined according to the second scanning result to the first state table, or adding the unstable block to the garbage collection queue.
[0069] Specifically, by adding the storage bad block and the unstable block to the garbage collection queue, the storage space can be released by erasing the storage bad block and the unstable block in the garbage collection process.
[0070] Secondly, the application provides a solid state disk scanning device, which is applied to a solid state disk, such as Figure 2 As shown in the figure, Figure 2 The solid state disk scanning device provided by the embodiment of the application has the structure shown in the figure, and the device comprises a temperature acquisition module 310, a temperature monitoring module 320 and a scanning module 330.
[0071] The temperature acquisition module 310 is configured to acquire a first real-time temperature of a master control chip in the solid state disk and a second real-time temperature of a flash memory chip in the solid state disk.
[0072] The temperature monitoring module 320 is configured to determine a temperature difference between the first real-time temperature and the second real-time temperature, a size relationship between the first real-time temperature and a first temperature threshold value, and a size relationship between the second real-time temperature and the first temperature threshold value.
[0073] The temperature monitoring module 320 is configured to start high-temperature timing in response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold value.
[0074] The scanning module 330 is configured to perform scanning on the flash memory chip in response to the temperature difference being greater than a second temperature threshold value and / or a time length obtained by the high-temperature timing being greater than a time threshold value.
[0075] In an implementation manner, the temperature monitoring module 320 is further configured to determine a size relationship between the first real-time temperature and a third temperature threshold value and a size relationship between the second real-time temperature and the third temperature threshold value, wherein the third temperature threshold value is greater than the first temperature threshold value.
[0076] The device further comprises a control module.
[0077] The control module is configured to, in response to the first real-time temperature and the second real-time temperature both being greater than the third temperature threshold value, stop performing a read-write operation if the solid state disk is in a process of performing the read-write operation.
[0078] The control module is further configured to, in response to the first real-time temperature and the second real-time temperature both being reduced to be equal to or less than a fourth temperature threshold value, resume performing the read-write operation.
[0079] In an implementation manner, the scanning module 330 is further configured to, in response to the temperature difference being greater than the second temperature threshold and / or the current time length obtained by the pyrometer being greater than the time threshold, reserve a scanning process for the flash memory chip.
[0080] The scanning module 330 is further configured to, in response to the first real-time temperature and the second real-time temperature both being equal to or less than the fifth temperature threshold, scan the flash memory chip.
[0081] In an implementation manner, the first state table and the second state table are stored in the master chip, the first state table is configured to record storage positions of unstable blocks in the flash memory chip, and the second state table is configured to record storage positions of cold data blocks in the flash memory chip; the scanning module 330 is further configured to, according to the storage positions of the unstable blocks recorded in the first state table, perform a first scanning on data stored in the unstable blocks to obtain a first scanning result.
[0082] The scanning module 330 is further configured to, according to the first state table, determine, from the unstable blocks recorded in the second state table, cold data blocks that have not been scanned in the first scanning as to-be-scanned blocks.
[0083] The scanning module 330 is further configured to, according to the storage positions of the to-be-scanned blocks recorded in the second state table, perform a second scanning on data stored in the to-be-scanned blocks to obtain a second scanning result.
[0084] In an implementation manner, the apparatus further comprises a control module.
[0085] The control module is further configured to, according to the first scanning result, determine that data stored in an unstable block in which an error occurs as a storage bad block.
[0086] The control module is further configured to add the storage bad block to a garbage collection queue.
[0087] In an implementation manner, the control module is further configured to, according to the second scanning result, determine that data stored in a cold data block in which an error occurs as an unstable block.
[0088] The control module is further configured to update the unstable block determined according to the second scanning result to the first state table, or add the unstable block to the garbage collection queue.
[0089] Thirdly, the application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of S110-S140 provided in the above embodiments when executing the computer program.
[0090] Fourthly, the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer readable medium stores the computer program, and the computer program is run by a processor to execute the steps S110-S140 of the above-mentioned embodiment.
[0091] Fifthly, the present application provides a computer program product, which includes a computer readable storage medium storing program codes. The program codes include instructions for executing the method in the above-mentioned method embodiment. The specific implementation can refer to the steps S110-S140 of the method embodiment, and will not be repeated here.
[0092] In the embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There can be another division during actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0093] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the present embodiment.
[0094] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0095] It should be noted that, if the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part or the technical solutions of the present application that make contributions to the prior art. The computer software product is stored in a storage medium, includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0096] In this article, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations.
[0097] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A solid-state drive scanning method, characterized in that, Applied to solid-state drives, the method includes: Obtain the first real-time temperature of the main controller chip in the solid-state drive and the second real-time temperature of the flash memory chip in the solid-state drive; Determine the temperature difference between the first real-time temperature and the second real-time temperature, the magnitude relationship between the first real-time temperature and the first temperature threshold, and the magnitude relationship between the second real-time temperature and the first temperature threshold; In response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold, a high-temperature timing is initiated. In response to the temperature difference being greater than a second temperature threshold, and / or the duration obtained by the high-temperature timing being greater than a time threshold, a scan is performed on the flash memory chip; The main control chip stores a first state table and a second state table. The first state table records the storage locations of unstable blocks in the flash memory chip, and the second state table records the storage locations of cold data blocks in the flash memory chip. Scanning the flash memory chip includes: performing a first scan on the data stored in the unstable blocks according to the storage locations recorded in the first state table to obtain a first scan result; identifying, according to the first state table, cold data blocks among the multiple unstable blocks recorded in the second state table that have not undergone the first scan as blocks to be scanned; and performing a second scan on the data stored in the blocks to be scanned according to the storage locations recorded in the second state table to obtain a second scan result. The method further includes, after performing a first scan on the data stored in the unstable block to obtain a first scan result, identifying the unstable block containing erroneous data as a bad storage block based on the first scan result; and adding the bad storage block to the garbage collection queue. The method further includes, after performing a second scan on the data stored in the block to be scanned to obtain a second scan result, determining the cold data block with errors in the stored data as the unstable block based on the second scan result; updating the unstable block determined based on the second scan result to the first state table, or adding the unstable block to the garbage collection queue.
2. The method according to claim 1, characterized in that, After obtaining the first real-time temperature of the main controller chip in the solid-state drive and the second real-time temperature of the flash memory chip in the solid-state drive, the method further includes: Determine the magnitude relationship between the first real-time temperature and the third temperature threshold, and the magnitude relationship between the second real-time temperature and the third temperature threshold; Wherein, the third temperature threshold is greater than the first temperature threshold; In response to the fact that both the first real-time temperature and the second real-time temperature are greater than the third temperature threshold, if the solid-state drive is in the process of performing a read / write operation, the read / write operation shall be stopped. In response to both the first real-time temperature and the second real-time temperature dropping to or below the fourth temperature threshold, the read / write operation is resumed.
3. The method according to claim 1, characterized in that, The step of scanning the flash memory chip in response to the temperature difference being greater than a second temperature threshold, and / or the duration obtained by the high-temperature timing being greater than a time threshold, includes: In response to the temperature difference being greater than the second temperature threshold and / or the current duration obtained by the high-temperature timing being greater than the time threshold, the flash memory chip is scheduled for scanning. In response to both the first real-time temperature and the second real-time temperature decreasing to or below the fifth temperature threshold, a scan is performed on the flash memory chip.
4. A solid-state drive scanning device, characterized in that, The device, used in solid-state drives, includes: a temperature acquisition module, a temperature monitoring module, and a scanning module; The temperature acquisition module is used to acquire the first real-time temperature of the main control chip in the solid-state drive and the second real-time temperature of the flash memory chip in the solid-state drive. The temperature monitoring module is used to determine the temperature difference between the first real-time temperature and the second real-time temperature, the relationship between the first real-time temperature and the first temperature threshold, and the relationship between the second real-time temperature and the first temperature threshold. The temperature monitoring module is used to start a high-temperature timer in response to the first real-time temperature and / or the second real-time temperature being greater than the first temperature threshold. The scanning module is configured to scan the flash memory chip in response to the temperature difference being greater than a second temperature threshold and / or the duration obtained by the high-temperature timing being greater than a time threshold. The main control chip stores a first state table and a second state table. The first state table records the storage locations of unstable blocks in the flash memory chip, and the second state table records the storage locations of cold data blocks in the flash memory chip. Scanning the flash memory chip includes: performing a first scan on the data stored in the unstable blocks according to the storage locations recorded in the first state table to obtain a first scan result; identifying, according to the first state table, cold data blocks among the multiple unstable blocks recorded in the second state table that have not undergone the first scan as blocks to be scanned; and performing a second scan on the data stored in the blocks to be scanned according to the storage locations recorded in the second state table to obtain a second scan result. Wherein, after performing a first scan on the data stored in the unstable block to obtain a first scan result: based on the first scan result, the unstable block in which the stored data contains errors is identified as a bad storage block; the bad storage block is added to the garbage collection queue; After performing a second scan on the data stored in the block to be scanned to obtain a second scan result: based on the second scan result, the cold data block in which the stored data contains errors is identified as the unstable block; the unstable block identified based on the second scan result is updated to the first state table, or the unstable block is added to the garbage collection queue.
5. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store an application program, and the processor enabling the electronic device to implement the solid-state drive scanning method as described in any one of claims 1 to 3 by running or executing a software program stored in the memory.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code executed by a processor, the program code being used to implement the solid-state drive scanning method as described in any one of claims 1 to 3.
7. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the solid-state drive scanning method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
SSD chip bad block management method, system and device and storage medium
CN117312029A