Patent ID: 8812772

Claim:
A data merging method for merging data belonging to a first logical block in a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module has a plurality of physical blocks, each of the physical blocks has a plurality of physical pages arranged in a sequence, the physical blocks are grouped into at least a data area and a free area, the physical blocks of the data area are mapped to a plurality of logical blocks, each of the logical blocks has a plurality of logical pages, the first logical block is one of the logical blocks, and the first logical block is mapped to a first physical block among the physical blocks of the data area, the data merging method comprising: getting a second physical block from the physical blocks of the free area; determining whether the number of logical pages storing valid data among the logical pages of the first logical block is smaller than a predetermined number; storing a logical page-to-physical page mapping table in a predetermined physical page and writing at least one valid page data belonging to the first logical block into at least one physical page of the second physical block when the number of the logical pages storing valid data among the logical pages of the first logical block is smaller than the predetermined number; and re-mapping the first logical block to the second physical block, wherein the at least one valid page data belongs to at least one valid logical page among the logical pages of the first logical block, wherein the logical page-to-physical page mapping table records a mapping relationship between the at least one valid logical page of the first logical block and the at least one physical page of the second physical block.