Data processing method and device of solid state disk controller and solid state disk controller
By using phase change memory in the solid state hard disk controller for data backup and brushing down to NAND flash memory after power-on recovery, the problem of slow data backup when the SSD controller is abnormally powered down is solved, and the accuracy of data backup is improved. efficiency.
Patent Information
- Application Number
- CN202411036393.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
AI Technical Summary
When the solid-state drive controller is powered off abnormally, the data is slow to brush under NAND, which can easily lead to NAND media errors, increasing the error rate and time of data backup operations.
When there is an abnormality in the solid-state hard disk, use the phase change memory to backup the data, and after the recovery and power-up, the backup data will be flushed to NAND flash memory. The data will be divided into multiple groups through encryption rules for cyclic writing and reading, thereby improving the data Efficiency of writing and reading.
It reduces the probability of NAND flash memory brushing errors due to abnormal power failure, improves the accuracy of data backup operations, and shortens data backup time due to the fast writing speed of phase change memory.
Smart Images

Figure CN118963665A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method and device for a solid-state hard disk controller and a solid-state hard disk controller. Background Art
[0002] With the development of the information technology industry and the popularization of electronic devices, people's dependence on electronic devices has increased year by year. As an effective carrier of information in electronic devices, storage media plays a vital role in the operation of the equipment. As an important storage medium in electronic devices, solid-state drives carry important tasks such as data storage, data protection, and data processing, and data protection has great economic value for specific users. When users use solid-state drives, they can hardly intervene in sudden anomalies and power failures. At this time, the exception handling of solid-state drive controllers is particularly important.
[0003] At present, the way to deal with sudden SSD controller anomalies and power failures caused by anomalies is generally to have the NAND controller write important data to the NAND flash memory within the tens of milliseconds when the capacitor briefly maintains the chip operating voltage. However, when a temporary power failure occurs, the NAND flash memory may be prone to NAND medium errors during the power failure protection process, and the NAND data is refreshed slowly. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and device for a solid-state hard disk controller and a solid-state hard disk controller, so as to solve the problem of slow NAND data refresh when the solid-state hard disk controller loses power abnormally in the prior art.
[0005] The technical solutions provided by the embodiments of this application are as follows:
[0006] On the one hand, an embodiment of the present application provides a data processing method of a solid state drive controller, comprising:
[0007] When it is determined that an abnormal situation occurs in the solid state drive, backup data corresponding to the abnormal type of the abnormal situation is obtained, and the backup data is backed up to the phase change memory; wherein the abnormal type includes abnormal power failure and watchdog reset;
[0008] After confirming that the solid state drive is powered on again, the backup data in the phase change memory is flushed to the NAND flash memory.
[0009] In a possible implementation, acquiring backup data corresponding to the abnormal type of the abnormal situation, and backing up the backup data to a phase change memory includes:
[0010] If the abnormality type is abnormal power failure, the user data and running data in the cache are obtained as backup data; if the abnormality type is watchdog reset, the user data in the cache, the running data in the cache and the specific data in the snapshot register are obtained as backup data;
[0011] The backup data is written into the phase-change memory according to the encryption rules.
[0012] In a possible implementation manner, the exception type is a watchdog reset; after the backup data is written into the phase change memory according to the encryption rule, the method further includes:
[0013] Generate a reset notification and send it to the watchdog to make the watchdog perform a reset operation.
[0014] In a possible implementation, writing the backup data into the phase change memory according to the encryption rule includes:
[0015] The backup data is divided into multiple groups of data to be written, and encrypted writing operations are cyclically performed on the multiple groups of data to be written; the encrypted writing operations include:
[0016] The first encrypted data is written into a phase change memory, and in the process of writing the first encrypted data into the phase change memory, the next group of data to be written in the multiple groups of data to be written is obtained and encrypted to obtain the second encrypted data; wherein, when the encrypted write operation is performed for the first time, the first encrypted data is the encrypted data obtained by encrypting the first group of data to be written in the multiple groups of data to be written; when the encrypted write operation is not performed for the first time, the first encrypted data is the second encrypted data obtained when the encrypted write operation was performed last time.
[0017] In a possible implementation manner, the data processing method of the solid state drive controller further includes:
[0018] When it is determined that there is no abnormality in the solid state drive, the firmware operation log data is captured at a preset time interval;
[0019] According to the preset encryption rules, the firmware operation log data is stored in the phase change memory;
[0020] When the firmware operation log data stored in the phase change memory reaches the minimum write unit of the NAND flash memory, the operation data in the phase change memory is flushed to the NAND flash memory.
[0021] In a possible implementation manner, after the backup data in the phase change memory is flushed to the NAND flash memory, the method further includes:
[0022] Read the backup data in the NAND flash memory and read the firmware operation log data in the phase change memory according to the preset decryption rules;
[0023] Determine the cause of the SSD failure based on the backup data and firmware operation log data.
[0024] In a possible implementation, reading the firmware operation log data in the phase change memory according to a preset decryption rule includes:
[0025] The firmware operation log data is divided into multiple groups of data to be read, and the read and decryption operations are cyclically performed on the multiple groups of data to be read; the read and decryption operations include:
[0026] The first decrypted data is decrypted, and in the process of decrypting the first decrypted data, the next group of data to be read from the multiple groups of data to be read is read as the second decrypted data; wherein, when the read decryption operation is performed for the first time, the first decrypted data is the first group of data to be read from the multiple groups of data to be read; when the read decryption operation is not performed for the first time, the first decrypted data is the second decrypted data obtained when the read decryption operation was performed last time.
[0027] On the other hand, an embodiment of the present application provides a data processing device of a solid state drive controller, comprising:
[0028] An abnormality judgment unit is used to obtain backup data corresponding to the abnormality type of the abnormality when determining that the solid state drive has an abnormality, and back up the backup data to the phase change memory; wherein the abnormality type includes abnormal power failure and watchdog reset;
[0029] The data flushing unit is used to flush the backup data in the phase change memory to the NAND flash memory after the solid state drive is powered on again.
[0030] In a possible implementation manner, the abnormality determination unit is specifically configured to:
[0031] If the abnormality type is abnormal power failure, the user data and running data in the cache are obtained as backup data; if the abnormality type is watchdog reset, the user data in the cache, the running data in the cache and the specific data in the snapshot register are obtained as backup data;
[0032] The backup data is written into the phase-change memory according to the encryption rules.
[0033] On the other hand, an embodiment of the present application provides a solid-state hard disk controller, including: a phase change controller, a NAND controller, a central processing unit and a cache controller; a data processing device of the solid-state hard disk controller provided by the embodiment of the present application is arranged in the phase change controller; the phase change controller is electrically connected to the NAND controller, the central processing unit and the cache controller respectively.
[0034] The beneficial effects of the embodiments of the present application are as follows:
[0035] In the embodiment of the present application, when an abnormal situation occurs in the solid-state hard disk, the phase change memory is used to back up data, and after the solid-state hard disk is powered on again, the backup data in the phase change memory is flushed to the NAND flash memory. The backup data in the phase change memory will not be lost in the event of a power failure, and there is no need to use an additional capacitor to flush the NAND flash memory in the event of a power failure, thereby reducing the probability of NAND flash memory flushing errors due to abnormal power failures and improving the accuracy of data backup operations. In addition, since the data writing speed of the phase change memory is faster than that of the NAND flash memory, the phase change memory can reduce the data backup time while ensuring data backup.
[0036] Other features and advantages of the present application will be described in the subsequent description, and in part, will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0038] Figure 1 It is a schematic diagram of the general flow of the data processing method of the solid state drive controller under abnormal conditions in an embodiment of the present application;
[0039] Figure 2 This is a schematic diagram of an overview of a data processing method of a solid state drive controller under normal circumstances in an embodiment of the present application;
[0040] Figure 3 This is a schematic diagram of the general flow of the data encryption method in the embodiment of the present application;
[0041] Figure 4 This is a schematic diagram of the general flow of the data decryption method in the embodiment of the present application;
[0042] Figure 5 This is a structural schematic diagram of a data processing device of a solid state hard disk controller in an embodiment of the present application;
[0043] Figure 6 Schematic diagram of the structure of the solid state drive controller in the embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and beneficial effects of this application clearer, the technical solution in the embodiment of this application will be clearly and completely described below in conjunction with the drawings in the embodiment of this application. Obviously, the described embodiment is only a part of the embodiment of this application, not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] Currently, when a temporary power outage occurs, NAND flash memory may be prone to NAND medium errors during the power-off protection process, resulting in a high error rate in data backup operations when the solid-state drive controller loses power abnormally.
[0046] Based on this, an embodiment of the present application provides a data processing method for a solid-state hard disk controller. When an abnormal situation occurs in the solid-state hard disk, a phase change memory is used to back up data, and after the solid-state hard disk is powered on again, the backup data in the phase change memory is flushed to the NAND flash memory. The backup data in the phase change memory will not be lost in the event of a power failure, and there is no need to use an additional capacitor to flush the NAND flash memory in the event of a power failure, thereby reducing the probability of NAND flash memory flushing errors due to abnormal power failures and improving the accuracy of data backup operations. In addition, since the data writing speed of the phase change memory is faster than that of the NAND flash memory, the phase change memory can reduce the data backup time while ensuring data backup.
[0047] The technical solutions provided by the embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0048] The present application embodiment provides a data processing method for a solid state drive controller, referring to Figure 1 As shown, the general flow of the data processing method of the solid state drive controller provided by the embodiment of the present application is as follows:
[0049] Step 101: When it is determined that an abnormal situation occurs in the solid state drive, backup data corresponding to the abnormal type of the abnormal situation is obtained, and the backup data is backed up to a phase change memory; wherein the abnormal type includes abnormal power failure and watchdog reset.
[0050] In an embodiment of the present application, abnormal conditions include abnormal power supply voltage of the solid-state hard disk and receipt of a watchdog reset instruction, wherein the abnormal condition of the abnormal power supply voltage of the solid-state hard disk corresponds to an abnormal power failure, and the abnormal condition of receiving a watchdog reset instruction corresponds to a watchdog reset. The sustainable power supply durations are different for different abnormal types. The sustainable power supply duration corresponds to the duration consumed to obtain backup data and back up the backup data to a phase change memory. Therefore, different backup data are set for different abnormal types to ensure complete and reliable backup of the backup data within the sustainable power supply duration. The phase change controller of the solid-state hard disk controller communicates with the cache controller so that the cache controller obtains the backup data corresponding to the abnormal type of the abnormal condition from the cache and sends it to the phase change controller. The phase change controller backs up the backup data to the phase change memory. Specifically, the following methods may be used, but are not limited to:
[0051] First, if the exception type is abnormal power failure, the user data and running data in the cache are obtained as backup data; if the exception type is watchdog reset, the user data in the cache, the running data in the cache and the specific data in the snapshot register are obtained as backup data.
[0052] Then, the backup data is written into the phase change memory according to the encryption rules.
[0053] In practical applications, the operating data in the cache refers to the variables required for the FW operation process and the FW operation log. The user data in the cache refers to the important user data in the cache. The specific data in the snapshot register is the value of the snapshot register. The maintainable power supply duration corresponding to the abnormal power failure is shorter, and the maintainable power supply duration corresponding to the abnormal type of watchdog reset is longer, and the time consumed to obtain and back up the value of the snapshot register is longer. Therefore, when the abnormal power failure type is an abnormal power failure, the phase change controller of the solid-state drive controller communicates with the cache controller, so that the cache controller of the solid-state drive controller obtains user data and operating data from the cache and sends it to the phase change controller, and the phase change controller encrypts the user data and operating data and writes them to the phase change memory.
[0054] When the abnormal power-off type is a watchdog reset, the phase change controller of the solid-state hard disk controller communicates with the cache controller so that the cache controller of the solid-state hard disk controller obtains user data and operation data from the cache and sends them to the phase change controller. The phase change controller encrypts the user data and operation data and writes them into the phase change memory. In addition, the phase change controller of the solid-state hard disk controller also communicates with the central processing unit so that the central processing unit obtains specific data in the snapshot register and sends the specific data in the snapshot register to the phase change controller. The phase change controller encrypts the specific data in the snapshot register and writes it into the phase change memory.
[0055] In a possible implementation manner, when the exception type is a watchdog reset, after the backup data is written into the phase change memory according to the encryption rule, the method further includes:
[0056] Generate a reset notification and send it to the watchdog to make the watchdog perform a reset operation.
[0057] In actual applications, the power supply duration that can be maintained corresponding to the watchdog reset is longer when the exception type is a watchdog reset. This is because the system reset time is controllable. After the backup data is acquired and written into the phase change memory, the phase change controller of the solid-state drive controller generates a reset notification and sends it to the watchdog. The watchdog controls the system reset, and the external power supply stops supplying power to the solid-state drive during the reset.
[0058] Step 102: After confirming that the solid state drive is powered on again, the backup data in the phase change memory is flushed to the NAND flash memory.
[0059] In the embodiment of the present application, all the backup data in the phase change memory can be flushed to the NAND flash memory, and part of the backup data in the phase change memory can be flushed to the NAND flash memory.
[0060] In one possible implementation, see Figure 2 As shown, the data processing method of the solid state hard disk controller also includes:
[0061] Step 201: When it is determined that the solid state drive has no abnormality, the firmware operation log data is captured at a preset time interval.
[0062] Step 202: store the firmware operation log data into the phase change memory according to the preset encryption rule.
[0063] Step 203: When the firmware operation log data stored in the phase change memory reaches the minimum write unit of the NAND flash memory, the operation data in the phase change memory is flushed to the NAND flash memory.
[0064] In the embodiment of the present application, the firmware operation log data refers to the firmware operation log. After determining that the solid-state hard disk is operating normally, the phase change controller of the solid-state hard disk controller automatically captures the firmware operation log stored in the cache at a preset time interval, and stores the firmware operation log data in the phase change memory according to the preset encryption rules. The minimum write unit of NAND is 16KB. When the firmware operation log data stored in the phase change memory reaches the minimum write unit of the NAND flash memory, the phase change controller flushes the operation data in the phase change memory to the NAND flash memory. Compared with the existing method of directly storing the firmware operation log in the cache into the NAND flash memory at a certain interval, if the amount of data does not reach the minimum write unit, the NAND flash memory is written according to the minimum write unit. Compared with this method, the present invention uses the phase change memory to balance the frequent reading and writing of the NAND flash memory. At a fixed interval, the phase change controller controls the phase change memory to back up the firmware operation log in the cache. After the firmware operation log in the phase change memory reaches the preset minimum write unit, the phase change controller flushes the firmware operation log from the phase change memory to the NAND flash memory. Since an erase operation is required before each write to NAND flash memory, the use of phase change memory can reduce the erase and write frequency of NAND flash memory, thereby extending its life. In addition, when the existing firmware log does not reach the preset capacity threshold, the interval time has expired and the NAND flash memory is written according to a minimum write unit. This operation will waste NAND space and write time. The use of phase change memory avoids the problem of data waste and there is no situation of writing empty data.
[0065] In a possible implementation manner, after the backup data in the phase change memory is flushed to the NAND flash memory, the method further includes:
[0066] First, read the backup data in the NAND flash memory, and read the firmware operation log data in the phase change memory according to the preset decryption rules;
[0067] Then, determine the cause of the SSD failure based on the backup data and firmware operation log data.
[0068] In a possible implementation, the backup data is written into the phase change memory according to the encryption rule, which may be in the following manners but not limited to:
[0069] The backup data is divided into multiple groups of data to be written, and encrypted writing operations are cyclically performed on the multiple groups of data to be written; the encrypted writing operations include:
[0070] The first encrypted data is written into a phase change memory, and in the process of writing the first encrypted data into the phase change memory, the next group of data to be written in the multiple groups of data to be written is obtained and encrypted to obtain the second encrypted data; wherein, when the encrypted write operation is performed for the first time, the first encrypted data is the encrypted data obtained by encrypting the first group of data to be written in the multiple groups of data to be written; when the encrypted write operation is not performed for the first time, the first encrypted data is the second encrypted data obtained when the encrypted write operation was performed last time.
[0071] In the embodiment of the present application, the backup data can be divided according to the preset data size. The preset data size can be 128 bits. Figure 3 As shown, the phase change controller obtains a first group of data to be written and encrypts it; while the phase change controller writes the encrypted first group of data to be written into the phase change memory, the phase change controller obtains a second group of data to be written and encrypts it; while the phase change controller writes the encrypted second group of data to be written into the phase change memory, the phase change controller obtains a third group of data to be written and encrypts it, and so on, until the phase change controller completes the encryption and writing of all the data to be written. Since the time taken by the phase change controller to write the encrypted data to be written into the phase change memory is longer than the time taken by the phase change controller to encrypt the data to be written, the phase change controller uses control to obtain the next group of data to be written in multiple groups of data to be written for encryption during the process of writing the first encrypted data into the phase change memory. On the one hand, non-sensing encryption is realized on the chip side, and on the other hand, fast data encryption of the phase change controller is realized, so as to ensure the data security of the memory without wasting encryption time, thereby ensuring the throughput performance of the phase change controller.
[0072] In a possible implementation, the firmware operation log data in the phase change memory is read according to the preset decryption rule, which may be in the following manners but not limited to:
[0073] The firmware operation log data is divided into multiple groups of data to be read, and the read and decryption operations are cyclically performed on the multiple groups of data to be read; the read and decryption operations include:
[0074] The first decrypted data is decrypted, and in the process of decrypting the first decrypted data, the next group of data to be read from the multiple groups of data to be read is read as the second decrypted data; wherein, when the read decryption operation is performed for the first time, the first decrypted data is the first group of data to be read from the multiple groups of data to be read; when the read decryption operation is not performed for the first time, the first decrypted data is the second decrypted data obtained when the read decryption operation was performed last time.
[0075] In the embodiment of the present application, the firmware operation log data can be divided according to a preset data size, and the preset data size can be 128 bits. Figure 4As shown, the phase change controller reads a first group of data to be read from the phase change memory; the phase change controller decrypts the first group of data to be read, and reads a second group of data to be read from the phase change memory; the phase change controller decrypts the second group of data to be read, and reads a third group of data to be read from the phase change memory, and so on, until the reading and decryption of all the data to be read are completed. Since the time taken to read the data to be read from the phase change memory is longer than the time taken to decrypt the data to be read, the phase change controller reads the next group of data to be read from the phase change memory in the process of decrypting the first decrypted data. On the one hand, non-sensing decryption on the chip side is realized, and on the other hand, fast data decryption of the phase change controller is realized, so as to ensure the data security of the memory without wasting decryption time, thereby ensuring the throughput performance of the phase change controller.
[0076] Based on the above embodiments, the present application provides a data processing device for a solid state drive controller. Figure 5 As shown, the data processing device 500 of the solid state drive controller provided in the embodiment of the present application at least includes:
[0077] The abnormality judgment unit 501 is used to obtain backup data corresponding to the abnormality type of the abnormality when determining that the solid state drive has an abnormality, and back up the backup data to the phase change memory; wherein the abnormality type includes abnormal power failure and watchdog reset;
[0078] The data flushing unit 502 is used to flush the backup data in the phase change memory to the NAND flash memory after the solid state drive is powered on again.
[0079] In a possible implementation, the abnormality determination unit 501 is specifically configured to:
[0080] If the abnormality type is abnormal power failure, the user data and running data in the cache are obtained as backup data; if the abnormality type is watchdog reset, the user data in the cache, the running data in the cache and the specific data in the snapshot register are obtained as backup data;
[0081] The backup data is written into the phase-change memory according to the encryption rules.
[0082] In a possible implementation manner, the data processing device 500 of the solid state drive controller further includes:
[0083] The reset unit 503 is used to generate a reset notification and send it to the watchdog, so that the watchdog performs a reset operation.
[0084] In a possible implementation manner, the abnormality determination unit 501 is specifically configured to:
[0085] The backup data is divided into multiple groups of data to be written, and encrypted writing operations are cyclically performed on the multiple groups of data to be written; the encrypted writing operations include:
[0086] The first encrypted data is written into a phase change memory, and in the process of writing the first encrypted data into the phase change memory, the next group of data to be written in the multiple groups of data to be written is obtained and encrypted to obtain the second encrypted data; wherein, when the encrypted write operation is performed for the first time, the first encrypted data is the encrypted data obtained by encrypting the first group of data to be written in the multiple groups of data to be written; when the encrypted write operation is not performed for the first time, the first encrypted data is the second encrypted data obtained when the encrypted write operation was performed last time.
[0087] In a possible implementation manner, the data processing device 500 of the solid state drive controller further includes:
[0088] The conventional storage unit 504 is used to capture the firmware operation log data at a preset time interval when it is determined that there is no abnormality in the solid-state hard disk; store the firmware operation log data in the phase change memory according to the preset encryption rules; when the firmware operation log data stored in the phase change memory reaches the minimum write unit of the NAND flash memory, the operation data in the phase change memory is flushed to the NAND flash memory.
[0089] In a possible implementation manner, the data processing device 500 of the solid state drive controller further includes:
[0090] The fault judgment unit 505 is used to read the backup data in the NAND flash memory and read the firmware operation log data in the phase change memory according to the preset decryption rules; and determine the fault cause of the solid state drive according to the backup data and the firmware operation log data.
[0091] In a possible implementation, the conventional storage unit 504 is specifically used for:
[0092] The firmware operation log data is divided into multiple groups of data to be read, and the read and decryption operations are cyclically performed on the multiple groups of data to be read; the read and decryption operations include:
[0093] The first decrypted data is decrypted, and in the process of decrypting the first decrypted data, the next group of data to be read from the multiple groups of data to be read is read as the second decrypted data; wherein, when the read and decryption operation is performed for the first time, the first decrypted data is the first group of data to be read from the multiple groups of data to be read; when the encryption and write operation is not performed for the first time, the first decrypted data is the second decrypted data obtained when the read and decryption operation was performed last time.
[0094] It should be noted that the principle of solving the technical problem by the data processing device 500 provided in the embodiment of the present application is similar to the data processing method provided in the embodiment of the present application. Therefore, the implementation of the data processing device 500 provided in the embodiment of the present application can refer to the implementation of the data processing method provided in the embodiment of the present application, and the repeated parts will not be repeated.
[0095] Based on the above embodiments, the present application provides a solid state drive controller. Figure 6 As shown, the solid state drive controller 600 provided in the embodiment of the present application at least includes: a phase change controller 610, a NAND controller 620, a central processing unit 630 and a cache controller 640; the phase change controller 610 is provided with a data processing device of the solid state drive controller provided in the embodiment of the present application; the phase change controller 610 is electrically connected to the NAND controller 620, the central processing unit 630 and the cache controller 640 respectively. Among them, the phase change controller 610 communicates with the NAND controller 620 to enable the phase change controller 610 to flush data to the NAND flash memory connected to the NAND controller 620, or read data from the NAND flash memory. The central processing unit 630 is used to communicate with the phase change controller, and the central processing unit 630 obtains specific data in the snapshot register and sends the specific data to the phase change controller 610. The cache controller 640 communicates with the phase change controller 610 to enable the phase change controller 610 to obtain data from the cache connected to the cache controller 640.
[0096] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0097] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0098] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0099] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data processing method for a solid state hard disk controller, characterized in that: include: When it is determined that an abnormal situation occurs in the solid state drive, backup data corresponding to the abnormal type of the abnormal situation is obtained, and the backup data is backed up to the phase change memory; wherein the abnormal type includes abnormal power failure and watchdog reset; After determining that the solid state drive is powered on again, the backup data in the phase change memory is flushed to the NAND flash memory.
2. The data processing method of the solid state drive controller according to claim 1, characterized in that: Acquiring backup data corresponding to the abnormal type of the abnormal situation, and backing up the backup data to a phase change memory, including: If the abnormality type is abnormal power failure, the user data and operating data in the cache are obtained as backup data; if the abnormality type is a watchdog reset, the user data in the cache, the operating data in the cache and the specific data in the snapshot register are obtained as backup data; The backup data is written into the phase-change memory according to encryption rules.
3. The data processing method of the solid state drive controller according to claim 2, characterized in that: The abnormal type is a watchdog reset; after writing the backup data into the phase change memory according to the encryption rule, the method further includes: Generate a reset notification and send it to the watchdog to make the watchdog perform a reset operation.
4. The data processing method of the solid state drive controller according to claim 2, characterized in that: Writing the backup data into the phase change memory according to the encryption rule includes: The backup data is divided into multiple groups of data to be written, and encryption writing operations are cyclically performed on the multiple groups of data to be written; the encryption writing operations include: The first encrypted data is written into the phase change memory, and in the process of writing the first encrypted data into the phase change memory, the next group of data to be written in the multiple groups of data to be written is obtained and encrypted to obtain the second encrypted data; wherein, when the encrypted write operation is performed for the first time, the first encrypted data is the encrypted data obtained by encrypting the first group of data to be written in the multiple groups of data to be written; when the encrypted write operation is not performed for the first time, the first encrypted data is the second encrypted data obtained when the encrypted write operation was performed last time.
5. The data processing method of the solid state hard disk controller according to any one of claims 1 to 4, characterized in that: Also includes: When it is determined that the solid state drive has no abnormality, capturing firmware operation log data at a preset time interval; According to a preset encryption rule, storing the firmware operation log data into the phase change memory; When the firmware operation log data stored in the phase change memory reaches the minimum write unit of the NAND flash memory, the operation data in the phase change memory is flushed to the NAND flash memory.
6. The data processing method of the solid state hard disk controller according to claim 5, characterized in that: After the backup data in the phase change memory is flushed to the NAND flash memory, the method further includes: Read the backup data in the NAND flash memory, and read the firmware operation log data in the phase change memory according to a preset decryption rule; The cause of the failure of the solid state drive is determined according to the backup data and the firmware operation log data.
7. The data processing method of the solid state disk controller according to claim 6, characterized in that: Reading the firmware operation log data in the phase change memory according to a preset decryption rule includes: The firmware operation log data is divided into multiple groups of data to be read, and a read and decryption operation is cyclically performed on the multiple groups of data to be read; the read and decryption operation includes: The first decrypted data is decrypted, and in the process of decrypting the first decrypted data, the next group of data to be read from the multiple groups of data to be read is read as the second decrypted data; wherein, when the read decryption operation is performed for the first time, the first decrypted data is the first group of data to be read from the multiple groups of data to be read; when the read decryption operation is not performed for the first time, the first decrypted data is the second decrypted data obtained when the read decryption operation was performed last time.
8. A data processing device for a solid state hard disk controller, characterized in that: include: An abnormality judgment unit is used to obtain backup data corresponding to the abnormal type of the abnormal situation when determining that the solid state hard disk has an abnormal situation, and back up the backup data to the phase change memory; wherein the abnormal type includes abnormal power failure and watchdog reset; The data flushing unit is used to flush the backup data in the phase change memory to the NAND flash memory after determining that the solid state hard disk is powered on again.
9. The data processing device of the solid state disk controller according to claim 8, characterized in that: The abnormality judgment unit is specifically used for: If the abnormality type is abnormal power failure, the user data and operating data in the cache are obtained as backup data; if the abnormality type is a watchdog reset, the user data in the cache, the operating data in the cache and the specific data in the snapshot register are obtained as backup data; The backup data is written into the phase-change memory according to encryption rules.
10. A solid state hard disk controller, characterized in that: include: A phase change controller, a NAND controller, a central processing unit and a cache controller; the phase change controller is provided with a data processing device of a solid state hard disk controller as described in claim 8 or 9; the phase change controller is electrically connected to the NAND controller, the central processing unit and the cache controller respectively.
Citation Information
Cited By
Abnormal power failure test method and device for solid state disk in data encryption and decryption process
CN119724320A
Abnormal power failure test method and device for solid state hard disk during data encryption and decryption process
CN119724320B
Data processing method and equipment during power failure of memory and medium
CN119739354A
