Storage device and device information maintenance method

By storing device information and its backup device information separately in the memory device, and judging the consistency between the two through the memory controller, the problem of easy loss or damage in the device information in the memory device is solved, and the effective maintenance of device information is achieved and Integrity guarantee.

CN113467701BActive Publication Date: 2025-02-07WISTRON NEWEB CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010241993.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-31
Publication Date
2025-02-07
Estimated Expiration
2040-03-31

AI Technical Summary

Technical Problem

Equipment information in memory devices is easily lost or damaged, resulting in the integrity of equipment information that cannot be guaranteed.

Method used

The device information and its sub-divided device information are stored on the upper and lower sides of the memory section respectively, and the consistency of the two is judged by the memory controller. If it is inconsistent, data will be replaced to maintain consistency.

Benefits of technology

Through this method, the integrity of the equipment information can be effectively maintained and the equipment information can be prevented from affecting the backup equipment information when the memory block appears.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113467701B_ABST
    Figure CN113467701B_ABST
Patent Text Reader

Abstract

A memory device and a device information maintenance method. The memory device includes a memory array and a memory controller; the memory array includes a plurality of memory segments, wherein each memory segment includes a plurality of memory blocks; the memory controller is coupled to the memory array; in each memory segment, first device information is stored sequentially downward from the first memory block to the first memory block group, and second device information is stored sequentially upward from the last memory block to the second memory block group, the number of memory blocks included in the first memory block group is the same as the number of memory blocks included in the second memory block group, and the second device information is the backup device information of the first device information. According to the memory device and the device information maintenance method proposed in the present invention, the integrity of the device information can be maintained by verifying the consistency of the device information and its backup device information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to a memory device technology, and more particularly to a memory device technology for maintaining device information by storing device information and its backup device information on upper and lower sides of a memory segment respectively. Background Art

[0002] Device information is very important for storage devices. The device information can record information such as device model, software version number, hardware version number, partition usage, etc. In addition, the loading and upgrading operations of the firmware of the storage device require the information provided by the device information.

[0003] In some memory device operation situations, device information may be lost or damaged. For example, bad blocks may be generated due to frequent reading and writing of memory devices, bad blocks may be generated due to external factors, and power failure may occur during operation of memory devices. Therefore, it is very important to protect the integrity of device information stored in memory devices.

[0004] Therefore, it is necessary to provide a memory device and a device information maintenance method to solve the above problems. Summary of the invention

[0005] In view of the above-mentioned problems in the background technology, an embodiment of the present invention provides a storage device and a method for maintaining device information.

[0006] According to one embodiment of the present invention, a memory device is provided. The memory device includes a memory array and a memory controller. The memory array includes a plurality of memory segments, wherein each of the memory segments includes a plurality of memory blocks. The memory controller is coupled to the memory array. In each of the memory segments, a first device information is stored sequentially downward from the first memory block to a first memory block group, and a second device information is stored sequentially upward from the last memory block to a second memory block group. The number of memory blocks included in the first memory block group is the same as the number of memory blocks included in the second memory block group, and the second device information is a backup device information of the first device information.

[0007] In some embodiments, the memory controller determines whether the first device information is damaged, and determines whether the second device information is damaged. When both the first device information and the second device information are not damaged, the memory controller determines whether the device information data of the first device information is consistent with the device information data of the second device information. When the device information data of the first device information is inconsistent with the device information data of the second device information, the memory controller replaces the device information data of the second device information with the device information data of the first device information.

[0008] When the first device information is damaged but the second device information is not damaged, the memory controller replaces the device information data of the first device information with the device information data of the second device information. The memory controller writes the first device information updated with the device information data of the second device information to the memory blocks without bad blocks in the first memory block group and the new memory blocks in sequence starting from the first block of the memory segment.

[0009] When the first device information is not damaged but the second device information is damaged, the memory controller replaces the device information data of the second device information with the device information data of the first device information. The memory controller writes the second device information updated with the device information data of the first device information into the memory blocks in the second memory block group where no bad blocks occur and the new memory blocks in sequence, starting from the last block of the memory segment.

[0010] In some embodiments, the first device information includes a tag value. When the device information data of the first device information is consistent with the device information data of the second device information, the memory controller sets the tag value to a first value, and when the device information data of the first device information is inconsistent with the device information data of the second device information, the memory controller sets the tag value to a second value.

[0011] When the device information data of the first device information and the second device information need to be updated, the memory controller sets the tag value to the second value, and when the device information data of the first device information and the device information data of the second device information are updated, the memory controller sets the tag value to the first value.

[0012] According to one embodiment of the present invention, a device information maintenance method is provided. The device information maintenance method is applicable to a memory device. The steps of the device information maintenance method include, when a first device information is to be stored in a memory segment of the memory device, the first device information is stored sequentially downward from the first block of the memory segment to a first memory block group; and a second device information is stored sequentially upward from the last block of the memory segment to a second memory block group, wherein the number of memory blocks included in the first memory block group is the same as the number of memory blocks included in the second memory block group, and the second device information is a backup device information of the first device information.

[0013] According to the memory device and device information maintenance method proposed by the present invention, the integrity of the device information can be maintained by checking the consistency of the device information and its backup device information. In addition, by storing the device information and its backup device information on the upper and lower sides of a memory segment respectively, when a bad block occurs in the memory block storing the device information and the memory block below the memory block storing the device information needs to be used continuously, the backup device information will not be damaged.

[0014] As to other additional features and advantages of the present invention, those skilled in the art should be able to obtain them by making slight changes and modifications to the memory device and device information maintenance method disclosed in the implementation method of the present invention without departing from the spirit and scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A block diagram of a memory device 100 according to an embodiment of the present invention is shown.

[0016] Figure 2A-2B A schematic diagram showing a memory segment 111 according to an embodiment of the present invention is shown.

[0017] Figure 3A A schematic diagram showing device information I1 updated with device information data of device information I2 according to an embodiment of the present invention.

[0018] Figure 3B A schematic diagram showing device information I2 updated with device information data of device information I1 according to an embodiment of the present invention.

[0019] Figures 4A-4E is a flow chart of a device information maintenance method according to an embodiment of the present invention, wherein Figure 4A is a flowchart for determining whether the device information is damaged in the device information maintenance method, and Figure 4B-4EThis is a flowchart for making device information consistent in a device information maintenance method.

[0020] Figure 5A is a flowchart of step S420 according to an embodiment of the present invention.

[0021] Figure 5B is a flowchart of step S460 according to an embodiment of the present invention.

[0022] Figure 6 is a flowchart of updating device information according to an embodiment of the present invention.

[0023] Main component symbols:

[0024] 100 Memory Devices

[0025] 110 Memory Array

[0026] 111 Memory Segment

[0027] 120 Memory Controller

[0028] B1~B N Memory Block

[0029] C 1A , C 1B , C 2A , C 2B Checksum

[0030] I1~I2 Equipment Information

[0031] Steps S410~S490, S491~S497, S510~S560, S610~S660 DETAILED DESCRIPTION

[0032] This section describes the preferred method of implementing the present invention, which is intended to illustrate the spirit of the present invention rather than to limit the scope of protection of the present invention. The scope of protection of the present invention shall be determined by the appended claims.

[0033] Figure 1 A block diagram of a memory device 100 according to an embodiment of the present invention is shown. Figure 1 As shown, the memory device 100 may include a memory array 110 and a memory controller 120. Figure 1 The block diagram shown in the figure is only for the convenience of explaining the embodiments of the present invention, but the present invention is not limited to Figure 1 The memory device 100 may also include other components.

[0034] According to an embodiment of the present invention, the memory array 110 may be a non-volatile memory, such as a NAND flash memory, but the present invention is not limited thereto. The memory array 110 may include a plurality of memory segments, and each memory segment (e.g., Figure 2A-2B The memory segment 111) may include a plurality of memory blocks. Different memory segments may be used to store different device information. According to an embodiment of the present invention, when a device information is to be stored in a memory segment, the device information is stored sequentially from the first block of the memory segment, and the backup device information of the device information is stored sequentially from the last block of the memory segment. Figure 2A-2B To illustrate.

[0035] The memory controller 120 is coupled to the memory array 110 to control operations related to the memory array 110 .

[0036] Figure 2A-2B A schematic diagram of a memory segment 111 according to an embodiment of the present invention is shown. Figure 2A As shown, the memory segment 111 may include a plurality of memory blocks B1-B N .like Figure 2B As shown in FIG. 1 , when a device information I1 is to be stored in the memory segment 111, the device information I1 is stored downwards from the first memory block B1 of the memory segment 111. In addition, when the device information I1 is to be stored in the memory segment 111, the backup device information (i.e., device information I2) corresponding to the device information I1 is also stored in the memory segment 111. The device information I2 is stored from the last memory block B1 of the memory segment 111. N Start storing upwards. Figure 2B As shown, the device information I1 is stored in the first M memory blocks of the memory segment 111 (ie, memory blocks B1 to B M , which can be regarded as a first memory block group), and the device information I2 is stored in the last M memory blocks of the memory segment 111 (ie, memory block B N-M+1 ~B N , which can be regarded as a second memory block group), wherein N and M are positive integers and N is greater than M. Note that, in order to facilitate the description of the embodiments of the present invention, the following embodiments will also refer to Figure 2A-2B To illustrate.

[0037] According to an embodiment of the present invention, when the memory controller 120 needs to verify whether the device information I1 and the device information I2 are consistent, the memory controller 120 will first determine whether the device information I1 and the device information I2 are damaged (i.e., determine whether the device information I1 and the device information I2 are complete). According to an embodiment of the present invention, when the memory device 100 is restarted (i.e., powered on), the memory controller 120 will verify whether the device information I1 and the device information I2 are consistent. When the memory controller 120 determines whether the device information I1 is complete, the memory controller 120 will first obtain a checksum C from the device information I1. 1A . Checksum C 1A However, when the device information I1 is written into the memory segment 111, it has already been pre-calculated and included in the device information I1. In addition, the memory controller 120 calculates the checksum C according to the device information data included in the device information I1. 1B Next, the memory controller 120 determines the checksum C 1A and checksum C 1B Are they consistent? If the checksum is C 1A and checksum C 1B If the checksum C is consistent, the memory controller 120 will determine that the device information I1 is not damaged. 1A and checksum C 1B If the device information I1 is not consistent, the memory controller 120 will determine that the device information I1 is damaged. Similarly, when the memory controller 120 determines whether the device information I2 is complete, the memory controller 120 will first obtain a checksum C from the device information I2. 2A . Checksum C 2A However, when the device information I2 is written into the memory segment 111, it has already been pre-calculated and included in the device information I2. In addition, the memory controller 120 calculates the checksum C according to the device information data included in the device information I2. 2B Next, the memory controller 120 determines the checksum C 2A and checksum C 2B Are they consistent? If the checksum is C 2A and checksum C 2B If the checksum C is consistent, the memory controller 120 will determine that the device information I2 is not damaged. 2A and checksum C 2B If they are not consistent, the memory controller 120 determines that the device information I2 is damaged. According to an embodiment of the present invention, the memory controller 120 calculates the checksum according to an algorithm (eg, a cyclic redundancy check (CRC) algorithm, but the present invention is not limited thereto).

[0038] According to an embodiment of the present invention, when both the device information I1 and the device information I2 are not damaged, the memory controller 120 determines whether the device information data of the device information I1 and the device information data of the device information I2 are consistent. In this embodiment, the memory controller 120 determines whether the checksum C of the device information I1 is consistent with the device information data of the device information I2. 1A and device information I2C checksum 2A Whether the device information data of device information I1 and device information data of device information I2 are consistent. 1A and device information I2C checksum 2A If the device information data of the device information I1 is consistent with the device information data of the device information I2, the memory controller 120 will determine that the device information data of the device information I1 is consistent with the device information data of the device information I2. 1A and device information I2C checksum 2A If the device information data of the device information I1 is inconsistent with the device information data of the device information I2, the memory controller 120 will determine that the device information data of the device information I1 is inconsistent with the device information data of the device information I2. When the device information data of the device information I1 is inconsistent with the device information data of the device information I2, the memory controller 120 will replace the device information data of the device information I2 with the device information data of the device information I1, so that the device information data of the device information I1 is consistent with the device information data of the device information I2.

[0039] According to an embodiment of the present invention, when the device information I1 is damaged but the device information I2 is not damaged, the memory controller 120 replaces the device information data of the device information I1 with the device information data of the device information I2 to repair the device information data of the device information I1. M When no bad blocks are present, the memory controller 120 directly writes the device information data of the device information I2 into the memory blocks B1-B M , to replace the device information data of the device information I1. According to another embodiment of the present invention, when the device information I1 has been damaged, and the memory blocks B1-B M When a bad block appears in the memory controller 120, the memory controller 120 determines the memory blocks B1 to B M When the memory controller 120 starts writing the device information I1 updated with the device information data of the device information I2 from the memory block B1 to the memory block B2, the memory controller 120 skips the damaged memory block to write the device information data of the device information I2 to the memory blocks B1 to B3. M Undamaged parts and newly used memory blocks. Figure 3A For example, if memory blocks B1 to B MIf X1 bad blocks appear, the device information I1 updated with the device information data of device information I2 will occupy memory blocks B1 to B (M+X1) .

[0040] According to an embodiment of the present invention, when the device information I1 is not damaged but the device information I2 is damaged, the memory controller 120 replaces the device information data of the device information I2 with the device information data of the device information I1 to repair the device information data of the device information I2. N-M+1 ~B N When there is no bad block, the memory controller 120 directly writes the device information data of the device information I1 into the memory block B. N-M+1 ~B N , to replace the device information data of the device information I2. According to another embodiment of the present invention, when the device information I2 has been damaged, and the memory block B N-M+1 ~B N When a bad block appears in the memory block B, the memory controller 120 determines N-M+1 ~B N The number of bad blocks that appear. N When writing the device information I2 updated with the device information data of the device information I1 in sequence upward, the memory controller 120 skips the damaged memory block to write the device information data of the device information I2 into the memory block B. N-M+1 ~B N Undamaged parts and newly used memory blocks. Figure 3B For example, if memory block B N-M+1 ~B N X2 bad blocks appear, and the device information I2 updated with the device information data of device information I1 will occupy memory block B N-M+1-X2 ~B N middle.

[0041] According to an embodiment of the present invention, when both the device information I1 and the device information I2 are damaged, the memory controller 120 determines that the device information data of the device information I1 and the device information data of the device information I2 cannot be repaired. Therefore, the device information I1 and the device information I2 are rewritten into the memory block that originally stored the device information I1 and the device information I2 by an external device outside the memory device 100.

[0042] According to an embodiment of the present invention, the device information I1 includes a tag value, and the tag value is not included in the device information data of the device information I1. When the device information data of the device information I1 and the device information data of the device information I2 are consistent, the memory controller 120 may set the tag value to a first value, and when the device information data of the device information I1 and the device information data of the device information I2 are inconsistent, the memory controller 120 may set the tag value to a second value.

[0043] According to one embodiment of the present invention, when the device information data of the device information I1 and the device information data of the device information I2 need to be updated, the memory controller 120 may first set the tag value to the second value. After the device information data of the device information I1 and the device information data of the device information I2 are updated, the memory controller 120 will set the tag value to the first value again. By setting the tag value, the number of times the device information I2 is read can be reduced to extend the life of the memory block storing the device information I2. In other words, if the memory controller 120 has known that the device information data of the device information I1 and the device information data of the device information I2 are consistent based on the tag value, when the device information I1 is read, the memory controller 120 does not need to read the device information I2 again to determine whether the device information data of the device information I1 and the device information data of the device information I2 are consistent.

[0044] In an embodiment of the present invention, the erase and write operations of updating the device information I1 and the device information I2 are performed separately. For example, when the device information I1 and the device information I2 need to be updated, the memory controller 120 will first perform the erase and write operation of the device information 1, that is, erase the device information I1, and then write the device information I1. After the erase and write operation of the device information I1 is completed, the memory controller 120 will perform the erase and write operation of the device information 2, that is, erase the device information I2, and then write the device information I2.

[0045] Figures 4A-4E is a flow chart of a device information maintenance method according to an embodiment of the present invention, wherein Figure 4A is a flowchart for determining whether the device information is damaged in the device information maintenance method, and Figure 4B-4E 1 is a flowchart of making device information consistent in a corresponding device information maintenance method. The device information maintenance method may be applicable to the memory device 100. Figure 4AAs shown, in step S410, the memory controller 120 of the memory device 100 reads a first device information in a memory segment, wherein the first device information is stored in a first memory block group of the memory segment in sequence from the first block of the memory segment. In step S420, the memory controller 120 of the memory device 100 determines whether the first device information is damaged. In step S430, the memory controller 120 of the memory device 100 determines that the first device information is damaged. In step S440, the memory controller 120 of the memory device 100 determines that the first device information is not damaged. In step S450, the memory controller 120 of the memory device 100 reads a second device information in a memory segment, wherein the second device information is stored in a second memory block group of the memory segment in sequence from the last block of the memory segment. In step S460, the memory controller 120 of the memory device 100 determines whether the second device information is damaged. In step S470, the memory controller 120 of the memory device 100 determines that the second device information is damaged. In step S480, the memory controller 120 of the memory device 100 determines that the second device information is not damaged. In this embodiment, the number of memory blocks included in the first memory block group is the same as the number of memory blocks included in the second memory block group, and the second device information is a backup device information of the first device information.

[0046] In addition, in this embodiment, the first device information includes a tag value. When the device information data of the first device information is consistent with the device information data of the second device information, the memory controller 120 sets the tag value to a first value, and when the device information data of the first device information is inconsistent with the device information data of the second device information, the memory controller 120 sets the tag value to a second value.

[0047] like Figure 4BAs shown, when the memory controller 120 of the memory device 100 determines that the first device information is not damaged (S440) and the second device information is not damaged (S480), step S490 will be executed. In step S490, the memory controller 120 will determine whether the device information data of the first device information and the device information data of the second device information are consistent. If the device information data of the first device information and the device information data of the second device information are inconsistent, step S491 is performed. In step S491, the memory controller 120 replaces the device information data of the second device information with the device information data of the first device information, so that the device information data of the first device information and the device information data of the second device information are consistent. Then, in step S492, the memory controller 120 sets the tag value to the first value. If the device information data of the first device information and the device information data of the second device information are consistent, step S492 is directly performed.

[0048] like Figure 4C As shown, when the memory controller 120 of the memory device 100 determines that the first device information is not damaged (S440) and the second device information is damaged (S470), step S493 is performed. In step S493, the memory controller 120 replaces the device information data of the second device information with the device information data of the first device information to repair the device information data of the second device information. Then, in step S494, the memory controller 120 sets the tag value to the first value. According to one embodiment of the present invention, in step S493, the memory controller 120 directly writes the second device information updated with the device information data of the first device information into the second memory block group. According to another embodiment of the present invention, in step S493, the memory controller 120 starts from the last block of the above-mentioned memory segment and sequentially writes the second device information updated with the device information data of the first device information into the memory blocks in the second memory block group where no bad blocks appear and the new memory blocks.

[0049] like Figure 4DAs shown, when the memory controller 120 of the memory device 100 determines that the first device information is damaged (S430) and the second device information is not damaged (S480), step S495 is performed. In step S495, the memory controller 120 replaces the device information data of the first device information with the device information data of the second device information to repair the device information data of the first device information. Then, in step S496, the memory controller 120 sets the tag value to the first value. According to one embodiment of the present invention, in step S495, the memory controller 120 directly writes the first device information updated with the device information data of the second device information into the first memory block group. According to another embodiment of the present invention, in step S495, the memory controller 120 starts from the first block of the above-mentioned memory segment and sequentially writes the first device information updated with the device information data of the second device information into the memory blocks in the first memory block group where no bad blocks appear and the new memory blocks.

[0050] like Figure 4E As shown, when the memory controller 120 of the memory device 100 determines that the first device information is damaged (S430) and the second device information is damaged (S470), step S497 is performed. In step S497, the memory controller 120 determines that the first device information and the second device information cannot be repaired.

[0051] Figure 5A is a flow chart of step S420 according to an embodiment of the present invention. Figure 5A As shown, in step S510, the memory controller 120 first obtains a first checksum from the first device information. The first checksum may be pre-calculated and included in the first device information when the first device information is written into the memory segment. In step S520, the memory controller 120 calculates a second checksum based on the device information data included in the first device information. Then, the memory controller 120 determines whether the first checksum and the second checksum are consistent. If the first checksum and the second checksum are consistent, the memory controller 120 determines that the first device information is not damaged (S440). If the first checksum and the second checksum are inconsistent, the memory controller 120 determines that the first device information is damaged (S430).

[0052] Figure 5B FIG. 4 is a flow chart of step S460 according to an embodiment of the present invention. Figure 5BAs shown, in step S540, the memory controller 120 first obtains a third checksum from the second device information. The third checksum is pre-calculated and included in the second device information when the second device information is written into the memory segment. In step S550, the memory controller 120 calculates a fourth checksum based on the device information data included in the second device information. Then, the memory controller 120 determines whether the third checksum and the fourth checksum are consistent. If the third checksum and the fourth checksum are consistent, the memory controller 120 determines that the second device information is not damaged (S480). If the third checksum and the fourth checksum are inconsistent, the memory controller 120 determines that the first device information is damaged (S470).

[0053] According to an embodiment of the present invention, in step S490 , the memory controller 120 may determine whether the device information data of the first device information is consistent with the device information data of the second device information by determining whether the first checksum is consistent with the third checksum.

[0054] Figure 6 FIG. 1 is a flowchart of updating device information according to an embodiment of the present invention. Figure 6 As shown, in step S610, when both the first device information and the second device information need to be updated, the memory controller 120 sets the tag value to the second value. In step S620, the memory controller 120 erases the first device information. In step S630, the memory controller 120 writes the updated first device information. In step S640, the memory controller 120 erases the second device information. In step S650, the memory controller 120 writes the updated second device information. In step S660, when the first device information and the second device information are updated, the memory controller 120 sets the tag value to the first value.

[0055] According to the device information maintenance method proposed in the present invention, the integrity of the device information can be maintained by checking the consistency of the device information and its backup device information. In addition, by storing the device information and its backup device information on the upper and lower sides of a memory segment respectively, when a bad block occurs in the memory block storing the device information and the memory block below the memory block storing the device information needs to be used continuously, the backup device information will not be damaged.

[0056] Serial numbers in this specification and the claims, such as "first", "second", etc., are only for convenience of explanation and have no sequential relationship with each other.

[0057] The steps of the method and algorithm disclosed in the specification of the present invention can be directly applied to hardware and software modules or a combination of the two by executing a processor. A software module (including execution instructions and related data) and other data can be stored in a data storage device, such as a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electronically erasable programmable read-only memory (EEPROM), a temporary register, a hard disk, a portable disk, a compact disk read-only memory (CD-ROM), a DVD or any other computer-readable storage medium format known in the art. A storage medium can be coupled to a machine device, for example, such as a computer / processor (for convenience of explanation, the processor is represented in this specification), and the above-mentioned processor can read information (such as program code) and write information to the storage medium. A storage medium can integrate a processor. An application-specific integrated circuit (ASIC) includes a processor and a storage medium. A user device includes an application-specific integrated circuit. In other words, the processor and the storage medium are included in the user device in a manner that is not directly connected to the user device. In addition, in some embodiments, any suitable computer program product includes a readable storage medium, wherein the readable storage medium includes program codes related to one or more disclosed embodiments. In some embodiments, the computer program product may include packaging materials.

[0058] The above paragraphs are described using multiple levels. Obviously, the teachings of this article can be implemented in multiple ways, and any specific architecture or function disclosed in the examples is only a representative situation. According to the teachings of this article, anyone familiar with this technology should understand that each level disclosed in this article can be implemented independently or two or more levels can be combined for implementation.

[0059] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Any person skilled in the art should be able to make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the invention should be determined by the definition of the attached claims.

Claims

1. A memory device, comprising: A memory array comprising a plurality of memory segments, wherein each of the memory segments comprises a plurality of memory blocks; as well as a memory controller coupled to the memory array; In each of the above-mentioned memory segments, a first device information is sequentially stored downward from the first memory block to a first memory block group, and a second device information is sequentially stored upward from the last memory block to a second memory block group, The number of memory blocks included in the first memory block group is the same as the number of memory blocks included in the second memory block group, and the second device information is a backup device information of the first device information; The memory controller determines whether the first device information is damaged, and determines whether the second device information is damaged; When both the first device information and the second device information are not damaged, the memory controller determines whether the device information data of the first device information is consistent with the device information data of the second device information; The first device information includes a tag value, wherein when the device information data of the first device information is consistent with the device information data of the second device information, the memory controller sets the tag value to a first value, and when the device information data of the first device information is inconsistent with the device information data of the second device information, the memory controller sets the tag value to a second value.

2. The memory device of claim 1, wherein when the device information data of the first device information and the device information data of the second device information are inconsistent, the memory controller replaces the device information data of the second device information with the device information data of the first device information.

3. The memory device of claim 1, wherein when the first device information is damaged but the second device information is not damaged, the memory controller replaces the device information data of the first device information with the device information data of the second device information. 4 . The memory device of claim 3 , wherein the memory controller directly writes the first device information updated with the device information data of the second device information into the first memory block group.

5. The memory device as claimed in claim 3, wherein the memory controller writes the first device information updated with the device information data of the second device information into the memory blocks without bad blocks and new memory blocks in the first memory block group in sequence starting from the first block of the memory segment.

6. The memory device of claim 1, wherein when the first device information is not damaged but the second device information is damaged, the memory controller replaces the device information data of the second device information with the device information data of the first device information. 7 . The memory device of claim 6 , wherein the memory controller directly writes the second device information updated with the device information data of the first device information into the second memory block group.

8. The memory device as claimed in claim 6, wherein the memory controller writes the second device information updated with the device information data of the first device information into the memory blocks without bad blocks and new memory blocks in the second memory block group in sequence starting from the last block of the memory segment.

9. A memory device as described in claim 1, wherein when the device information data of the first device information and the second device information need to be updated, the memory controller sets the tag value to the second value, and when the device information data of the first device information and the device information data of the second device information are updated, the memory controller sets the tag value to the first value.

10. A device information maintenance method, applicable to a storage device, comprising: When a first device information is to be stored in a memory segment of the memory device, the first device information is stored in a first memory block group starting from the first block of the memory segment in sequence; as well as storing a second device information in a second memory block group starting from the last block of the memory segment in sequence upwards, The number of memory blocks included in the first memory block group is the same as the number of memory blocks included in the second memory block group, and the second device information is a backup device information of the first device information; The device information maintenance method further includes: Determining whether the first device information is damaged and determining whether the second device information is damaged by a memory controller of the memory device; When the first device information and the second device information are both intact, determining by the memory controller whether the device information data of the first device information and the device information data of the second device information are consistent; The first device information includes a tag value, wherein when the device information data of the first device information is consistent with the device information data of the second device information, the tag value is set to a first value by the memory controller, and when the device information data of the first device information is inconsistent with the device information data of the second device information, the tag value is set to a second value by the memory controller.

11. The device information maintenance method according to claim 10, further comprising: When the device information data of the first device information and the device information data of the second device information are inconsistent, the device information data of the second device information is replaced by the device information data of the first device information through the memory controller.

12. The device information maintenance method according to claim 10, further comprising: When the first device information is damaged but the second device information is not damaged, the device information data of the first device information is replaced by the device information data of the second device information through the memory controller.

13. The device information maintenance method according to claim 12, further comprising: The memory controller directly writes the first device information updated with the device information data of the second device information into the first memory block group.

14. The device information maintenance method according to claim 12, further comprising: The memory controller writes the first device information updated with the device information data of the second device information into the memory blocks without bad blocks and new memory blocks in the first memory block group in sequence starting from the first block of the memory segment.

15. The device information maintenance method according to claim 10, further comprising: When the first device information is not damaged but the second device information is damaged, the device information data of the second device information is replaced by the device information data of the first device information through the memory controller.

16. The device information maintenance method according to claim 15, further comprising: The second device information updated with the device information data of the first device information is directly written into the second memory block group by the memory controller.

17. The device information maintenance method according to claim 15, further comprising: The memory controller writes the second device information updated with the device information data of the first device information into the memory blocks without bad blocks and new memory blocks in the second memory block group in sequence starting from the last block of the memory segment.

18. The device information maintenance method according to claim 10, further comprising: When the device information data of the first device information and the second device information need to be updated, the tag value is set to the second value by the memory controller; as well as When the device information data of the first device information and the device information data of the second device information are updated, the tag value is set to the first value by the memory controller.

Citation Information

Patent Citations

  • Data Integrity Validation in Storage Systems

    US20090083504A1

  • Method for performing system backup in a memory device, associated memory device and controller thereof, and associated electronic device

    US20190155507A1