Firmware refreshing method and system for storage device, and storage medium and storage device

By detecting the number of bit inversions in the storage device and performing firmware refresh when the critical value is reached, the data integrity problem caused by NandFlash data bit inversion is solved, extending the service life of the device and ensuring data stability.

WO2025077587A1PCT designated stage expired Publication Date: 2025-04-17ROLLING WIRELESS SARL +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/121392
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-09
Filing Date
2024-09-26
Publication Date
2025-04-17

AI Technical Summary

Technical Problem

Data stored on NandFlash is bit inverted due to physical characteristics and environmental factors, which affects data integrity. Frequent firmware refreshes will reduce the stability of NandFlash, and excessive bit inversions may lead to irreversible damage to the firmware.

Method used

By performing bit inversion detection on the storage device when the detection time is met, the number of bit inversions is determined. If the number of bit inversions reaches the critical value of redundant detection, firmware refresh is performed according to the firmware refresh mechanism to avoid irregular periodic refresh.

Benefits of technology

It effectively reduces the number of firmware refreshes of storage devices, extends the service life of storage devices, ensures the stability and integrity of data, and promptly detects and deals with abnormal damage to storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024121392_17042025_PF_FP_ABST
    Figure CN2024121392_17042025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed is a firmware refreshing method for a storage device, wherein the storage device has been configured with a firmware refreshing mechanism. The firmware refreshing method for the storage device comprises: when a detection time is met, performing bitflip detection on the storage device, and determining the number of bitflips; and if the number of bitflips meets a critical value of redundancy detection, performing firmware refreshing on the storage device according to the firmware refreshing mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Storage device firmware refresh method, system, storage medium and storage device

[0001] Citation of Related Applications

[0002] This disclosure claims all rights and interests in the Chinese invention patent application with application number 202311303668.9 filed with the State Intellectual Property Office of the People's Republic of China on October 9, 2023, entitled "Firmware refresh method, system, storage medium and storage device for storage device", and incorporates the entire contents thereof into this disclosure by reference.

[0003] field

[0004] The present disclosure generally relates to the field of data storage, and more particularly to a method and system for refreshing firmware of a storage device, a storage medium, and a storage device.

[0005] background

[0006] Wireless modules typically contain several sub-firmware components, which are stored in the module's NandFlash (non-volatile memory based on NAND technology). NandFlash is divided into different areas (called partitions) to store different firmware. Due to the physical characteristics of NandFlash, data stored in NandFlash can experience bit flips over time. Reading stored data can also cause bit flips. Complex electrical environments and harsh operating environments can also cause bit flips, impacting the integrity of the data stored in NandFlash. Refreshing the firmware rewrites the NandFlash, significantly improving data stability. However, excessive refreshes can rapidly degrade NandFlash stability. Excessive bit flips can also cause irreversible damage to the firmware.

[0007] Overview

[0008] In one aspect, the present disclosure relates to a method for refreshing firmware of a storage device, wherein the storage device has been configured with a firmware refreshing mechanism. The method for refreshing firmware of the storage device includes:

[0009] When the detection time is met, performing a bit reversal detection on the storage device to determine the number of bit reversals; and

[0010] If the number of bit reversals meets a critical value for redundancy detection, the firmware of the storage device is refreshed according to the firmware refresh mechanism.

[0011] In some embodiments, the performing bit reversal detection on the storage device, before determining the number of bit reversals, further comprises:

[0012] A timer is set; the timer is configured to trigger a step of performing bit reversal detection on the storage device and determining the number of bit reversals when the timer times out.

[0013] In some embodiments, before setting the timer, the method further comprises:

[0014] Determine whether the current time meets the detection time;

[0015] If so, performing a step of performing a bit reversal detection on the storage device to determine the number of bit reversals;

[0016] If not, set a start countdown for the timer, and start the timer after the start countdown ends.

[0017] In some embodiments, determining whether the current time meets the detection time includes:

[0018] Obtaining the current time and the historical detection time of the last execution of the bit reversal detection;

[0019] Calculate the time difference between the current time and the historical detection time;

[0020] If the time difference exceeds the bit reversal detection time interval threshold, it is determined that the current time meets the detection time.

[0021] In some embodiments, before confirming that the current time meets the detection time, the method further includes:

[0022] The bit reversal detection time interval threshold is determined according to a type of error correction algorithm corresponding to the application of the storage device.

[0023] In some embodiments, performing bit inversion detection on the storage device, and determining the number of bit inversions includes:

[0024] Performing a hash calculation on the current stored data in the storage device in units of data pages to obtain a current hash value;

[0025] Determining a historical hash value of original stored data of the storage device using redundant data in the storage device;

[0026] The number of bit flips is determined according to the current hash value and the historical hash value.

[0027] In some embodiments, before performing firmware update on the storage device, the method further includes:

[0028] The critical value is determined according to a maximum number of correction bits of an error correction algorithm correspondingly applied to the storage device.

[0029] On the other hand, the present disclosure also relates to a firmware refresh system for a storage device, wherein the storage device has been configured with a firmware refresh mechanism, and the firmware refresh system for the storage device includes:

[0030] A bit reversal detection module configured to perform a bit reversal detection on the storage device when a detection time is met to determine the number of bit reversals; and

[0031] The refresh detection module is configured to refresh the firmware of the storage device according to the firmware refresh mechanism if the number of bit inversions meets a critical value of redundancy detection.

[0032] On the other hand, the present disclosure further relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the firmware refresh method for a storage device described in the present disclosure.

[0033] On the other hand, the present disclosure also provides a storage device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the firmware refresh method of the storage device described in the present disclosure is implemented.

[0034] In certain embodiments, by detecting the number of bit inversions in a storage device and triggering a firmware refresh when the number of bit inversions meets a critical value, irregular periodic refreshes are avoided, thereby effectively reducing the number of firmware refreshes of the storage device and extending the service life of the storage device. The time granularity of bit inversion detection is smaller than the time granularity of firmware refresh, so that abnormal damage to the storage device can be discovered as early as possible, thereby ensuring the integrity and stability of the storage device.

[0035] BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are merely embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0037] FIG1 is a flowchart of a firmware refresh method for a storage device provided by an embodiment of the present disclosure;

[0038] FIG2 is a schematic diagram of the structure of a firmware refresh system for a storage device provided by an embodiment of the present disclosure; and

[0039] FIG3 is a schematic diagram of the structure of a storage device provided by an embodiment of the present disclosure.

[0040] Details

[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0042] Please refer to FIG1 , which is a flowchart of a firmware refresh method for a storage device provided by an embodiment of the present disclosure. The method includes:

[0043] S101: When a detection time is met, performing a bit reversal detection on the storage device to determine the number of bit reversals; and

[0044] S102: If the number of bit inversions meets a critical value for redundancy detection, perform firmware refresh on the storage device according to the firmware refresh mechanism.

[0045] In certain embodiments, when a detection time is met, a bit reversal detection is performed on the storage device to determine the number of bit reversals in the storage device. The specific setting method of the detection time is not limited herein, and the detection time for the bit reversal detection can be determined by setting a timer. Therefore, before performing the bit reversal detection on the storage device and determining the number of bit reversals, a timer can be set first. Thus, when the timer times out, the step of performing the bit reversal detection on the storage device and determining the number of bit reversals can be triggered. It should be noted that the timer is configured to trigger the bit reversal detection after timing to avoid new bit reversals during the detection process.

[0046] In some embodiments, when setting the timer, it is possible to determine whether the current time meets the detection time; if the current time meets the detection time, the step of performing bit reversal detection on the storage device and determining the number of bit reversals can be directly executed. Otherwise, the start countdown of the timer is set, and the timer is started after the start countdown ends. There is no limitation on how to determine whether the current time meets the detection time. In some embodiments, the maximum detection time period can be set by setting a detection period, a detection time window, etc. In some embodiments, taking the setting of the maximum detection time period as an example, regular bit reversal detection of the storage device can be ensured, which can be performed as follows:

[0047] The first step is to obtain the current time and the historical detection time of the last execution of the bit reversal detection;

[0048] Step 2: Calculate the time difference between the current time and the historical detection time;

[0049] Step 3: If the time difference exceeds the bit reversal detection time interval threshold, confirm that the current time meets the detection time.

[0050] First, obtain the current time and determine the historical detection time of the last bit flip detection. If the historical detection time of the bit flip detection is not queried, it indicates that the current storage device has not performed bit flip detection, and it can be considered that the current time meets the detection time.

[0051] After obtaining the historical detection time, the time difference between the current time and the historical detection time is further determined. If the time exceeds the bit reversal detection time interval threshold, the current time can also be directly confirmed to meet the detection time. Of course, this process requires the bit reversal detection time interval threshold to be determined in advance. There is no specific limitation on how to determine the bit reversal detection time interval threshold. In one feasible approach, the bit reversal detection time interval threshold can be determined based on the type of error correction algorithm applied to the storage device. Because different error correction algorithm types have different data correction capabilities, for example, some error correction algorithms can correct 8-bit data, while others can correct 16-bit data. Therefore, the error correction algorithm type with more correctable bits can have a corresponding longer bit reversal detection time interval threshold. By setting a bit reversal detection time interval threshold that is compatible with the error correction algorithm type, frequent firmware refreshes can be avoided. Since firmware refreshes require reading and writing to the storage device, the higher the firmware refresh frequency, the shorter the storage device's service life. Therefore, by setting a bit reversal detection time interval threshold that is compatible with the error correction algorithm type, the storage device's service life can be effectively extended.

[0052] When performing bit reversal detection on the storage device and determining the number of bit reversals, a hash algorithm is mainly used to determine the number of bit reversals with the help of redundant data. In some embodiments, the process can be as follows:

[0053] The first step is to perform a hash calculation on the current stored data in the storage device in units of data pages to obtain a current hash value;

[0054] Step 2: Using the redundant data in the storage device, determine the historical hash value of the original storage data of the storage device;

[0055] Step 3: Determine the number of bit reversals according to the current hash value and the historical hash value.

[0056] Since data in storage devices is typically stored in data pages, determining the number of bit flips can be done by performing a hash calculation on each data page to obtain the current hash value. Redundant data from the error correction algorithm can then be used to determine the historical hash value of the original stored data, and the number of bit flips can be determined based on the current and historical hash values.

[0057] Furthermore, before performing a firmware update on the storage device, the critical value can be determined based on the maximum number of corrected bits of the error correction algorithm used by the storage device. It should be noted that to avoid new bit reversals during bit reversal detection, the critical value is typically smaller than the maximum number of corrected bits. For example, if the maximum number of corrected bits is 16, the critical value can be 12 bits.

[0058] In certain embodiments, by detecting the number of bit inversions in a storage device and triggering a firmware refresh when the number of bit inversions meets a critical value, irregular periodic refreshes are avoided, thereby effectively reducing the number of firmware refreshes of the storage device and extending the service life of the storage device. The time granularity of bit inversion detection is smaller than the time granularity of firmware refresh, so that abnormal damage to the storage device can be discovered as early as possible, thereby ensuring the integrity and stability of the storage device.

[0059] The following describes the firmware refresh method for a storage device provided by the present disclosure using a wireless module as an example: the wireless module has deployed the firmware refresh mechanism described in the technical background.

[0060] Step 1: After the wireless module is started, check the historical detection time of the last bit reversal detection and the current system time, and calculate the time difference between the current time and the historical detection time.

[0061] In the second step, if the time difference exceeds the bit reversal detection time interval threshold for performing bit reversal detection, a timer is set (for example, a 5-second countdown) to trigger bit reversal, and the fourth step is to wait for the timer to time out.

[0062] In step 3, if the time difference does not exceed the bit reversal detection time interval threshold for performing bit reversal detection, it indicates that the historical detection time of the last bit reversal detection does not exceed the bit reversal detection time interval threshold from the current time. The start countdown of the timer is started and the remaining time of the timer is counted down. Then, the process proceeds to step 4 to wait for the timer to time out.

[0063] Step 4: When the timer countdown ends, the bit reversal detection is triggered and the time information of the bit reversal detection is saved.

[0064] Step 5: Count the number of bit inversion detections determined in this bit inversion detection. If the number of bit inversion detection bits exceeds the critical value of redundancy detection, the firmware of the storage device is refreshed according to the firmware refresh mechanism.

[0065] Step 6. After this test is completed, you can proceed to the next test process.

[0066] The following introduces a firmware refresh system for a storage device provided by an embodiment of the present disclosure. The firmware refresh system described below and the firmware refresh method for a storage device described above can refer to each other.

[0067] The present disclosure also provides a firmware refresh system for a storage device, wherein the storage device has been configured with a firmware refresh mechanism, and the firmware refresh system for the storage device includes:

[0068] A bit reversal detection module configured to perform a bit reversal detection on the storage device when a detection time is met to determine the number of bit reversals; and

[0069] The refresh detection module is configured to refresh the firmware of the storage device according to the firmware refresh mechanism if the number of bit inversions meets a critical value of redundancy detection.

[0070] In some embodiments, the firmware flashing system for a storage device further comprises:

[0071] The timer setting module is configured to set a timer; the timer is configured to trigger the step of performing bit reversal detection on the storage device and determining the number of bit reversals when the timer times out.

[0072] In some embodiments, the firmware flashing system for a storage device further comprises:

[0073] The detection timing judgment module is configured to judge whether the current time meets the detection time; if so, enter the bit reversal detection module; if not, set the start countdown of the timer and start the timer after the start countdown ends.

[0074] In certain embodiments, the detection timing determination module includes:

[0075] a time acquisition unit configured to acquire the current time and a historical detection time of the last execution of the bit reversal detection;

[0076] A time difference calculation unit, configured to calculate the time difference between the current time and the historical detection time;

[0077] The timing judgment unit is configured to confirm that the current time meets the detection time if the time difference exceeds the bit reversal detection time interval threshold.

[0078] In some embodiments, the firmware flashing system for a storage device further comprises:

[0079] The threshold setting unit is configured to determine the bit reversal detection time interval threshold according to the type of error correction algorithm corresponding to the application of the storage device.

[0080] In certain embodiments, the bit reversal detection module includes:

[0081] a first hash calculation unit, configured to perform a hash calculation on the current stored data in the storage device in units of data pages to obtain a current hash value;

[0082] a second hash calculation unit, configured to determine a historical hash value of original storage data of the storage device by using redundant data in the storage device;

[0083] The bit reversal calculation unit is configured to determine a bit reversal quantity according to the current hash value and the historical hash value.

[0084] In some embodiments, the firmware flashing system for a storage device further comprises:

[0085] The critical value setting module is configured to determine the critical value according to the maximum number of corrected bits of the error correction algorithm corresponding to the application of the storage device.

[0086] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can implement the firmware refresh method for a storage device described in the present disclosure. In certain embodiments, the storage medium can include: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.

[0087] The present disclosure further provides a storage device. Referring to FIG3 , FIG3 is a schematic diagram of the structure of a storage device provided in an embodiment of the present disclosure, as shown in FIG3 , the storage device may include a processor 1410 and a memory 1420 .

[0088] In some embodiments, the processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). In some embodiments, the processor 1410 may also include a main processor and a coprocessor. The main processor is a processor configured to process data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor configured to process data in a standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), which is configured to render and draw the content to be displayed on the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor configured to process computing operations related to machine learning.

[0089] In certain embodiments, the memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In certain embodiments, the memory 1420 is at least configured to store the following computer program 1421, wherein, after the computer program is loaded and executed by the processor 1410, it can implement the firmware refresh method of the storage device described in the present disclosure. In certain embodiments, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.

[0090] In some embodiments, the storage device may also include a display screen 1430 , an input / output interface 1440 , a communication interface 1450 , a sensor 1460 , a power supply 1470 , and a communication bus 1480 .

[0091] Of course, the structure of the storage device shown in FIG3 does not constitute a limitation on the storage device in the embodiment of the present disclosure. In actual applications, the storage device may include more or fewer components than those shown in FIG3 , or combine certain components.

[0092] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems provided in the embodiments, since they correspond to the methods provided in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0093] This document uses specific examples to illustrate the principles and implementation methods of the present disclosure. The description of the above examples is only intended to help understand the methods and core concepts of the present disclosure. It should be noted that those skilled in the art can make various improvements and modifications to the present disclosure without departing from the principles of the present disclosure, and such improvements and modifications also fall within the scope of protection of the claims of the present disclosure.

[0094] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. A firmware refresh method for a storage device, wherein the storage device has been configured with a firmware refresh mechanism, and the firmware refresh method for the storage device comprises: When the detection time is met, performing a bit reversal detection on the storage device to determine the number of bit reversals; as well as If the bit inversion quantity meets the critical value of redundancy detection, the firmware of the storage device is refreshed according to the firmware refresh mechanism.

2. The firmware refresh method according to claim 1, wherein before performing bit inversion detection on the storage device and determining the number of bit inversions, the method further comprises: Set a timer; The timer is configured to trigger the step of performing bit reversal detection on the storage device and determining the number of bit reversals when the timer times out.

3. The firmware updating method according to claim 2, wherein before setting the timer, the method further comprises: Determine whether the current time meets the detection time; If yes, performing a step of performing a bit inversion detection on the storage device to determine the number of bit inversions; If not, a start countdown of the timer is set, and the timer is started after the start countdown ends.

4. The firmware refresh method according to claim 3, wherein the determining whether the current time meets the detection time comprises: Obtaining the current time and the historical detection time when the bit reversal detection was last performed; Calculate the time difference between the current time and the historical detection time; If the time difference exceeds the bit inversion detection time interval threshold, it is confirmed that the current time meets the detection time.

5. The firmware updating method according to claim 4, wherein before confirming that the current time meets the detection time, it further comprises: The bit reversal detection time interval threshold is determined according to the type of error correction algorithm corresponding to the application of the storage device.

6. The firmware refresh method according to any one of claims 1 to 5, wherein performing bit inversion detection on the storage device and determining the number of bit inversions comprises: Performing hash calculation on the current stored data in the storage device in units of data pages to obtain a current hash value; Determine the historical hash value of the original storage data of the storage device by using the redundant data in the storage device; The number of bit inversions is determined according to the current hash value and the historical hash value.

7. The firmware refresh method according to any one of claims 1 to 6, wherein before refreshing the firmware of the storage device, the method further comprises: The critical value is determined according to the maximum number of corrected bits of the error correction algorithm corresponding to the application of the storage device.

8. A firmware refresh system for a storage device, wherein the storage device has been configured with a firmware refresh mechanism, and the firmware refresh system for the storage device comprises: A bit reversal detection module, configured to perform a bit reversal detection on the storage device when a detection time is met to determine the number of bit reversals; as well as The refresh detection module is configured to perform a firmware refresh on the storage device according to the firmware refresh mechanism if the number of bit inversions meets a critical value of redundancy detection.

9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the firmware refreshing method for a storage device according to any one of claims 1 to 7.

10. A storage device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the firmware refresh method of the storage device according to any one of claims 1 to 7 when calling the computer program in the memory.

Citation Information

Patent Citations

  • Memory system and error correction method thereof

    CN106205683A

  • Self-adaptive data refreshing method for ensuring data continuity in solid state disk

    CN107748722A

  • Firmware refreshing method and device, wireless module and storage medium

    CN114461259A

  • Hard disk firmware refreshing method and system, terminal and storage medium

    CN116679969A

  • Firmware refreshing method and system of storage device, storage medium and storage device

    CN117331592A