WO2022156369A1 - 存储块管理信息同步记录方法、***、终端及存储介质 - Google Patents

存储块管理信息同步记录方法、***、终端及存储介质 Download PDF

Info

Publication number
WO2022156369A1
WO2022156369A1 PCT/CN2021/134141 CN2021134141W WO2022156369A1 WO 2022156369 A1 WO2022156369 A1 WO 2022156369A1 CN 2021134141 W CN2021134141 W CN 2021134141W WO 2022156369 A1 WO2022156369 A1 WO 2022156369A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
master
slave
blocks
page
Prior art date
Application number
PCT/CN2021/134141
Other languages
English (en)
French (fr)
Inventor
王敏
张闯
任智新
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Priority to US18/029,066 priority Critical patent/US20230376226A1/en
Publication of WO2022156369A1 publication Critical patent/WO2022156369A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Definitions

  • the present application relates to the field of storage technologies, and in particular, to a method, system, terminal and non-volatile storage medium for synchronously recording storage block management information.
  • NAND Flash is a kind of non-volatile memory that is widely used in various storage occasions.
  • the ideal flash memory should meet the characteristics of small size, fast operation speed, low programming voltage, strong resistance to erasing and writing, and long retention time.
  • NAND Flash is composed of blocks, and blocks are composed of pages, and their function is to store data.
  • NAND in view of the generation of record information such as load balancing and bad block management, it is necessary to select a number of items from the entire NAND.
  • block is used as a management block,
  • the present application provides a method, system, terminal and non-volatile storage medium for synchronously recording storage block management information to solve the above technical problems.
  • the present application provides a method for synchronizing and recording storage block management information, including:
  • the management information is synchronously written to the master block and the slave block according to the interval page number.
  • the two blocks with the largest difference are selected from all good blocks as the master block and the slave block, including:
  • the candidate blocks with different parity from the master block are screened out from the good blocks, and the block with the lowest number is selected from all the candidate blocks as the slave block.
  • setting the synchronization recording interval page number of the master block and the slave block includes:
  • the management information is written to the master block and the slave block synchronously according to the number of interval pages, including:
  • the corresponding page of the slave block is selected according to the number of interval pages, and the management information is synchronously written in the second half page of the corresponding page of the slave block;
  • the filled data of the slave block is erased first, and then the synchronous write operation of the master block and the slave block is performed.
  • the method further includes:
  • the method further includes:
  • the present application provides a storage block management information synchronization recording system, including:
  • the master-slave screening unit is configured to filter the two blocks with the largest difference from all good blocks as the master block and the slave block;
  • an interval setting unit configured to set the number of synchronization recording interval pages for the master block and the slave block
  • a synchronous writing unit configured to synchronously write management information to the master block and the slave block according to the interval page number.
  • the master-slave screening unit includes:
  • Good block filter module configured to filter out good blocks from all storage blocks
  • Number sorting module configured to sort all good blocks by block number
  • the main block determination module is configured to select the first good block as the main block
  • the slave block determination module is configured to filter out candidate blocks with different parities from the master block from the good blocks, and select the block with the lowest number from all the candidate blocks as the slave block.
  • a terminal in a third aspect, the computer device has a memory and one or more processors, computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the one or more processors execute any of the above The steps of a method for synchronously recording storage block management information.
  • one or more non-volatile storage media storing computer-readable instructions are provided, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute any one of the above Steps of a method for synchronously recording storage block management information.
  • FIG. 1 is a schematic flowchart of a method for synchronously recording storage block management information in one or more embodiments.
  • FIG. 2 is a schematic block diagram of a system for synchronously recording storage block management information in one or more embodiments.
  • FIG. 3 is a schematic structural diagram of a terminal in one or more embodiments.
  • FIG. 1 is a schematic flowchart of a method according to an embodiment of the present application.
  • the executive body of FIG. 1 may be a storage block management information synchronous recording system.
  • the method includes:
  • Step 110 Screen the two blocks with the largest difference from all good blocks as the master block and the slave block;
  • Step 120 setting the synchronization recording interval page number of the master block and the slave block
  • Step 130 Write management information to the master block and the slave block synchronously according to the number of interval pages.
  • the method for synchronously recording storage block management information includes:
  • the master-slave block Since the same page of the master-slave block will have information errors at the same time, consider letting the master-slave block record with a certain interval. For example, the content recorded by page0 of the master block is the same as that of page10 of the slave block, but how much interval should be selected? Well, let's take a single block with N pages as an example, and choose N/2 for the jump interval.
  • the slave block When the master block records the first half of the page, the slave block records the information of the second half of the page, and the two always maintain a gap of N/2. When the master block records the second half of the page, the slave block will record the first half of the block. which is:
  • the padding data selected in this embodiment is all 1s.
  • the main block can read the data.
  • the current main block is recorded to pageX, and the data is recorded from block to page(X+N/2-1).
  • the current main block needs to perform the following steps:
  • Step1 The page (X-1) of the main block reads the data, and the correct data is obtained together with the page (X+N/2-1) of the slave block (at this time, only the correct data of the previous page can be taken).
  • Step2 Information synchronization, which refers to the consistency of the two block information. Clear all the information of the main block (pages cannot be erased individually, the entire block must be erased), and then copy the information of the "slave block" to the main block synchronously.
  • L06B NAND has 512 blocks, and a single block has 256 pages.
  • the master block selects block2, and the slave block selects block511. After inspection, these two blocks are good blocks.
  • N 256, then the interval step size is selected N/2 or 128, page The numbers are from page1 to page256.
  • the main block records the first 128 pages, the last 128 pages are recorded from the block.
  • Data padding will write all 0s from the first 128 pages of the block.
  • the storage block management information synchronization recording method, system, terminal and storage medium use the master-slave block interval alternation method information recording method, use two block intervals and synchronously process various abnormal situations, and data is lost on one side.
  • a copy can be obtained from the other party to ensure that the NAND operating system will not be paralyzed due to frequent information errors.
  • the system 200 includes:
  • the master-slave screening unit 210 is configured to select the two blocks with the largest difference from all good blocks as the master block and the slave block;
  • an interval setting unit 220 configured to set the number of pages of synchronous recording intervals of the master block and the slave block;
  • the synchronous writing unit 230 is configured to synchronously write management information to the master block and the slave block according to the number of interval pages.
  • the master-slave screening unit includes:
  • Good block filter module configured to filter out good blocks from all storage blocks
  • Number sorting module configured to sort all good blocks by block number
  • the main block determination module is configured to select the first good block as the main block
  • the slave block determination module is configured to filter out candidate blocks with different parities from the master block from the good blocks, and select the block with the lowest number from all the candidate blocks as the slave block.
  • FIG. 3 is a schematic structural diagram of a terminal 300 provided by an embodiment of the present application.
  • the terminal 300 may be used to execute the method for synchronously recording storage block management information provided by the embodiment of the present application.
  • the terminal 300 may include: a processor 310 , a memory 320 and a communication unit 330 . These components communicate through one or more buses.
  • a processor 310 a memory 320 and a communication unit 330 .
  • These components communicate through one or more buses.
  • the structure of the server shown in the figure does not constitute a limitation to the present application. It can be either a bus-shaped structure, a star-shaped structure, or a More or fewer components than shown may be included, or some components may be combined, or a different arrangement of components.
  • the memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or their combination, such as static random access memory (SRAM), electrical Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk .
  • SRAM static random access memory
  • EEPROM electrical Erasable Programmable Read Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • magnetic Memory Flash Memory
  • magnetic Disk Magnetic Disk or Optical Disk
  • the processor 310 is the control center of the storage terminal, using various interfaces and lines to connect various parts of the entire electronic terminal, by running or executing the software programs and/or modules stored in the memory 320, and calling the data stored in the memory, To perform various functions of the electronic terminal and/or process data.
  • the processor may be composed of an integrated circuit (Integrated Circuit, IC for short), for example, may be composed of a single packaged IC, or may be composed of a plurality of packaged ICs with the same function or different functions.
  • the processor 310 may only include a central processing unit (Central Processing Unit, CPU for short).
  • the CPU may be a single computing core, or may include multiple computing cores.
  • the communication unit 330 is used for establishing a communication channel, so that the storage terminal can communicate with other terminals. Receive user data sent by other terminals or send user data to other terminals.
  • the present application also provides a computer non-volatile storage medium, wherein the computer non-volatile storage medium can store a program, and when the program is executed, it can include some or all of the steps in the embodiments provided in the present application.
  • the non-volatile storage medium can be a magnetic disk, an optical disc, a read-only memory (English: read-only memory, ROM for short) or a random access memory (English: random access memory, short: RAM), and the like.
  • the present application uses the information recording method of the master-slave block interval alternation method, uses two block intervals and synchronously handles various abnormal situations, and in the case of data loss on one side, it can be copied from the other side to ensure the NAND operating system. It will not be paralyzed due to frequent occurrence of information errors, and the technical effects that can be achieved by this embodiment can be referred to the above description, which will not be repeated here.
  • Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供一种存储块管理信息同步记录方法、***、终端及存储介质,包括:从所有好块中筛选差异最大的两个块作为主块和从块;设定主块和从块的同步记录间隔页数;根据所述间隔页数同步向主块和从块写入管理信息。本申请使用主从块的间隔交替法信息记录方法,使用两个块间隔并同步对各种异常情况进行处理,在一方数据丢失的情况下,能够从另一方得到拷贝,保证NAND运行***不会由于信息错误频繁出现而瘫痪。

Description

存储块管理信息同步记录方法、***、终端及存储介质
相关申请的交叉引用
本申请要求在2021年01月22日提交中国专利局,申请号为202110091052.4,发明名称为“存储块管理信息同步记录方法、***、终端及非易失性存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及存储技术领域,具体涉及一种存储块管理信息同步记录方法、***、终端及非易失性存储介质。
背景技术
NAND Flash是一种目前广泛应用于各种存储场合的非易失性存储器,理想的闪存存储器应该满足尺寸小,操作速度快,编程电压低,抗擦写能力强,保持时间久等特点。
NAND Flash由block即块构成,而块由page即页组成,功能是数据的存储,NAND在使用过程中,鉴于会有负载均衡和坏块管理等记录信息的产生,需要从整个NAND中选取若干block作为管理块进行使用,
但是,管理块在使用过程中,会出现信息记录出错等情况,这是不允许发生的,因为一旦管理信息记录错误,会导致NAND使用紊乱以至于报废等。如何有效地记录信息,较大可能性地避免错误地发生,是非常重要的一项研究内容。
以下两种方案是常用的记录方法:
单一block记录法
从整个NAND block库里面选择出错率低的单个块作为管理块,从page0开始按照顺序往下写,等到整个block写满后,擦除,再进行下一轮的记录。发明人意识到,这种方法单个block记录过程中出错或者变成坏块时,所记录的信息便会丢失。
主从block同步记录法
从整个NAND block库里面选择出错率低的两个块作为管理块(分别为主block,从block),依次从page0开始写入相同的内容,以防某一block记录信息出错,可以从另一个block中恢复。发明人意识到,这种方法NAND在设计过程中,会出现某些特定的 page(例如page0,page255等)出错率较高的情况,因此,即使是有备用的block可以恢复主block错误信息,仍然不可避免的在某个特定的page两个block都会出错,无法复原准确信息。
发明内容
针对现有技术的上述不足,本申请提供一种存储块管理信息同步记录方法、***、终端及非易失性存储介质,以解决上述技术问题。
第一方面,在一些实施例中,本申请提供一种存储块管理信息同步记录方法,包括:
从所有好块中筛选差异最大的两个块作为主块和从块;
设定主块和从块的同步记录间隔页数;和
根据所述间隔页数同步向主块和从块写入管理信息。
在一些实施例中,从所有好块中筛选差异最大的两个块作为主块和从块,包括:
从所有存储块中筛选出好块;
按块编号对所有好块进行排序;
选取排序最前的好块作为主块;
从好块中筛选出与主块的奇偶性不同的待选块,并从所有待选块中选取编号最靠后的块作为从块。
在一些实施例中,设定主块和从块的同步记录间隔页数,包括:
设定间隔页数为总页数的一半。
在一些实施例中,根据间隔页数同步向主块和从块写入管理信息,包括:
当主块写第一页的前半页时,根据间隔页数选定从块对应页,并在从块的对应页的后半页开始同步写入管理信息;
在向从块同步写入管理信息之前,向对应页的后半页之前的所有页写入数据进行填充;
当主块写到前半部分页的最后一页时,先对从块的填充数据进行擦除,再执行主块和从块的同步写操作。
在一些实施例中,方法还包括:
查找主块中不全为填充数据的最后一页,读取数据作为管理信息输出;
当主块数据查找失败时,查找从块中不全为填充数据的最后一页,读取数据作为管理信息输出。
在一些实施例中,方法还包括:
当在同步记录过程中发生掉电,且主块数据正确时,将主块数据复制到从块的对应页;和
当在同步记录过程中发生掉电,且主块数据不正确时,分别从主块和从块中提取掉电发生页的上一页进行校对,将主块中的数据清除,并将从块中的数据同步复制到主块。
第二方面,本申请提供一种存储块管理信息同步记录***,包括:
主从筛选单元,配置用于从所有好块中筛选差异最大的两个块作为主块和从块;
间隔设定单元,配置用于设定主块和从块的同步记录间隔页数;和
同步写入单元,配置用于根据所述间隔页数同步向主块和从块写入管理信息。
在一些实施例中,主从筛选单元包括:
好块筛选模块,配置用于从所有存储块中筛选出好块;
编号排序模块,配置用于按块编号对所有好块进行排序;
主块确定模块,配置用于选取排序最前的好块作为主块;
从块确定模块,配置用于从好块中筛选出与主块的奇偶性不同的待选块,并从所有待选块中选取编号最靠后的块作为从块。
第三方面,提供一种终端,该计算机设备存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行上述任意一项存储块管理信息同步记录方法的步骤。
第四方面,提供了一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任意一项存储块管理信息同步记录方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是一个或多个实施例中,一种存储块管理信息同步记录方法的示意性流程图。
图2是一个或多个实施例中,一种存储块管理信息同步记录***的示意性框图。
图3是一个或多个实施例中,一种终端的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
图1是本申请一个实施例的方法的示意性流程图。其中,图1执行主体可以为一种存储块管理信息同步记录***。
如图1所示,该方法包括:
步骤110,从所有好块中筛选差异最大的两个块作为主块和从块;
步骤120,设定主块和从块的同步记录间隔页数;
步骤130,根据间隔页数同步向主块和从块写入管理信息。
具体的,存储块管理信息同步记录方法包括:
S1、从所有好块中筛选差异最大的两个块作为主块和从块。
块在选择的时候有以下几种原则:
(1)必须是好块。
(2)考虑到奇偶块展现的错误分布有所区别,保证主从block的编号的奇偶性不同。
(3)在整个块分布中,主从块尽量在编号上差距越大越好,如主块选择2号,那么从块选择靠近尾部的编号。
S2、设定主块和从块的同步记录间隔页数。
既然主从block同一个页会同时出现信息错误,那么,考虑让主从block在记录的时候有一定的间隔,比如主块的page0记录的内容和从块的page10一样,但是间隔究竟要选择多少呢,我们以单个block有N个页为例,跳跃间隔选择N/2。
S3、根据间隔页数同步向主块和从块写入管理信息。
主block进行前半页的记录时,从block在进行后半页的信息记录,两者一直保持N/2的差距,当主block进行后半页记录的适合,从block会进行前半block的记录。即:
主块的pageX所写入的信息=从块的page(X+N/2)写入的信息
其中,x≤(N/2)
从块的pageX所写入的信息=主块的page(X-N/2)写入的信息
其中,N>x>(N/2)
需要注意的点是当主block刚好写到pageN/2时,从block刚好是最后一个pageN,在进行下一条信息的记录时,主block写到pageN/2+1,从block却已经写满了,这时候需要先进行从block的擦动作,再写从block的page1。同理,当从block写到pageN/2+1时,主block也要先擦再写page1。
块的属性之一就不能跳跃写,因此为了使用第N/2+1个页,必须将从block前N/2个页进行数据填充操作,由于前半块本身其数据就是没有价值的,可以任意写,保证不是擦写后的状态即可,因此可以将其写为全1或者全0,都无关紧要,但是该步骤必须是要有的。本实施例选用的填充数据为全1。
S4、读取正确记录。
读取数据的时候会出现以下几种情况:
(1)主block便可读到数据。
读取主block,找到不为全1的最后一个页,读取数据即可。
(2)主block出错,去从block取。
先读取主block,找到不为全1的最后一个页,读取数据,如果是有错误,那么去从block不全为1的最后一个页,去拿数据。
(3)出现记录时候的掉电情况。
如果记录完成主block,从block还没有记录,又有主块数据正确或者错误两种情况,
情况一,主块数据正确。
将主块正确的数据复制到从块对应页上即可,保证两者同步。
情况二,主块数据错误。
如果错误,而从块没有相关记录,这时候记录的数据便会丢失。举例当前主block记录到pageX,从block记录到page(X+N/2-1),当前主block需要进行以下几个步骤:
Step1:主block的page(X-1)读取数据,和从block的page(X+N/2-1)一起得到正确的数据(这时候只能取上一页正确的数据)。
Step2:信息同步,指的是将两个block信息一致化。将主block的所有信息清除(页是没法单独擦除的,必须整个block擦掉),然后把“从block”的信息同步复制到主block。
本实施例以L06B NAND为例进行详细说明,L06B NAND有512个block,单个block有256个页。
选择主从块编号,鉴于上述原则,主块选择block2,从块选择block511,经过检查,这两个块都是好块,上述的N=256,则间隔步长选取N/2即128,页编号从page1~page256,当主block记录前128页的时候,从block进行后128页的记录。
数据填充,将从block前128页全部写为0。
进行数据的写入,按照下面的顺序进行
主块页编号 从块页编号
1 129
2 130
3 131
128 256
进行以下几种情况的处理:
1)记录完成前两页,进行数据读取,能够在主块page2得到正确记录。
2)记录完成前两页,进行数据读取,主块page2返回错误,那么去从块page130读取正确记录。
3)记录完成主块page3,掉电。恢复上电后,主块page3能够得到正确数据,将page3的信息同步到从块page131上,使得两者同步。
4)记录完成主块page4,掉电。恢复上电后,主块page4数据错误,将主块全部擦除,将从块所有有效记录即(page129~page131)复制到主块,试得page1~page3有效,保证同步。
本申请的有益效果在于,
本申请提供的存储块管理信息同步记录方法、***、终端及存储介质,使用主从块的间隔交替法信息记录方法,使用两个块间隔并同步对各种异常情况进行处理,在一方数据丢失的情况下,能够从另一方得到拷贝,保证NAND运行***不会由于信息错误频繁出现而瘫痪。
此外,本申请设计原理可靠,结构简单,具有非常广泛的应用前景。
如图2所示,该***200包括:
主从筛选单元210,配置用于从所有好块中筛选差异最大的两个块作为主块和从块;
间隔设定单元220,配置用于设定主块和从块的同步记录间隔页数;
同步写入单元230,配置用于根据间隔页数同步向主块和从块写入管理信息。
可选地,作为本申请一个实施例,主从筛选单元包括:
好块筛选模块,配置用于从所有存储块中筛选出好块;
编号排序模块,配置用于按块编号对所有好块进行排序;
主块确定模块,配置用于选取排序最前的好块作为主块;
从块确定模块,配置用于从好块中筛选出与主块的奇偶性不同的待选块,并从所有待选块中选取编号最靠后的块作为从块。
图3为本申请实施例提供的一种终端300的结构示意图,该终端300可以用于执行本申请实施例提供的存储块管理信息同步记录方法。
其中,该终端300可以包括:处理器310、存储器320及通信单元330。这些组件通过一条或多条总线进行通信,本领域技术人员可以理解,图中示出的服务器的结构并不构成对本申请的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,该存储器320可以用于存储处理器310的执行指令,存储器320可以由任何类型的易失性或非易失性存储终端或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。当存储器320中的执行指令由处理器310执行时,使得终端300能够执行以下上述方法实施例中的部分或全部步骤。
处理器310为存储终端的控制中心,利用各种接口和线路连接整个电子终端的各个部分,通过运行或执行存储在存储器320内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行电子终端的各种功能和/或处理数据。处理器可以由集成电路(Integrated Circuit,简称IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器310可以仅包括中央处理器(Central Processing Unit,简称CPU)。在本申请实施方式中,CPU可以是单运算核心,也可以包括多运算核心。
通信单元330,用于建立通信信道,从而使存储终端可以与其它终端进行通信。接收其他终端发送的用户数据或者向其他终端发送用户数据。
本申请还提供一种计算机非易失性存储介质,其中,该计算机非易失性存储介质可存储有程序,该程序执行时可包括本申请提供的各实施例中的部分或全部步骤。非易失性存储介质可为磁碟、光盘、只读存储记忆体(英文:read-only memory,简称:ROM) 或随机存储记忆体(英文:random access memory,简称:RAM)等。
因此,本申请使用主从块的间隔交替法信息记录方法,使用两个块间隔并同步对各种异常情况进行处理,在一方数据丢失的情况下,能够从另一方得到拷贝,保证NAND运行***不会由于信息错误频繁出现而瘫痪,本实施例所能达到的技术效果可以参见上文中的描述,此处不再赘述。
本领域的技术人员可以清楚地了解到本申请实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个非易失性存储介质中如U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,包括若干指令用以使得一台计算机终端(可以是个人计算机,服务器,或者第二终端、网络终端等)执行本申请各个实施例方法的全部或部分步骤。
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于终端实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。
在本申请所提供的几个实施例中,应该理解到,所揭露的***和方法,可以通过其它的方式实现。例如,以上所描述的***实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,***或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
尽管通过参考附图并结合优选实施例的方式对本申请进行了详细描述,但本申请并不限于此。在不脱离本申请的精神和实质的前提下,本领域普通技术人员可以对本申请的实施例进行各种等效的修改或替换,而这些修改或替换都应在本申请的涵盖范围内/任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都 应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (10)

  1. 一种存储块管理信息同步记录方法,其特征在于,包括:
    从所有好块中筛选差异最大的两个块作为主块和从块;
    设定主块和从块的同步记录间隔页数;和
    根据所述间隔页数同步向主块和从块写入管理信息。
  2. 根据权利要求1所述的方法,其特征在于,所述从所有好块中筛选差异最大的两个块作为主块和从块,包括:
    从所有存储块中筛选出好块;
    按块编号对所有好块进行排序;
    选取排序最前的好块作为主块;和
    从好块中筛选出与所述主块的奇偶性不同的待选块,并从所有待选块中选取编号最靠后的块作为从块。
  3. 根据权利要求1所述的方法,其特征在于,所述设定主块和从块的同步记录间隔页数,包括:
    设定间隔页数为总页数的一半。
  4. 根据权利要求3所述的方法,其特征在于,所述根据间隔页数同步向主块和从块写入管理信息,包括:
    当主块写第一页的前半页时,根据所述间隔页数选定从块对应页,并在从块的对应页的后半页开始同步写入管理信息;
    在向所述从块同步写入管理信息之前,向所述对应页的后半页之前的所有页写入数据进行填充;和
    当主块写到前半部分页的最后一页时,先对从块的填充数据进行擦除,再执行主块和从块的同步写操作。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    查找主块中不全为填充数据的最后一页,读取数据作为管理信息输出;和
    当主块数据查找失败时,查找从块中不全为填充数据的最后一页,读取数据作为管理信息输出。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    当在同步记录过程中发生掉电,且主块数据正确时,将主块数据复制到从块的对应页;和
    当在同步记录过程中发生掉电,且主块数据不正确时,分别从主块和从块中提取掉 电发生页的上一页进行校对,将主块中的数据清除,并将从块中的数据同步复制到主块。
  7. 一种存储块管理信息同步记录***,其特征在于,包括:
    主从筛选单元,配置用于从所有好块中筛选差异最大的两个块作为主块和从块;
    间隔设定单元,配置用于设定主块和从块的同步记录间隔页数;和
    同步写入单元,配置用于根据所述间隔页数同步向主块和从块写入管理信息。
  8. 根据权利要求7所述的方法,其特征在于,所述主从筛选单元包括:
    好块筛选模块,配置用于从所有存储块中筛选出好块;
    编号排序模块,配置用于按块编号对所有好块进行排序;
    主块确定模块,配置用于选取排序最前的好块作为主块;和
    从块确定模块,配置用于从好块中筛选出与所述主块的奇偶性不同的待选块,并从所有待选块中选取编号最靠后的块作为从块。
  9. 一种终端,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如权利要求1-5方法的步骤。
  10. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如权利要求1-5方法的步骤。
PCT/CN2021/134141 2021-01-22 2021-11-29 存储块管理信息同步记录方法、***、终端及存储介质 WO2022156369A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/029,066 US20230376226A1 (en) 2021-01-22 2021-11-29 Storage block management information synchronous recording method and system, and terminal and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110091052.4 2021-01-22
CN202110091052.4A CN112764683B (zh) 2021-01-22 2021-01-22 存储块管理信息同步记录方法、***、终端及存储介质

Publications (1)

Publication Number Publication Date
WO2022156369A1 true WO2022156369A1 (zh) 2022-07-28

Family

ID=75706798

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134141 WO2022156369A1 (zh) 2021-01-22 2021-11-29 存储块管理信息同步记录方法、***、终端及存储介质

Country Status (3)

Country Link
US (1) US20230376226A1 (zh)
CN (1) CN112764683B (zh)
WO (1) WO2022156369A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764683B (zh) * 2021-01-22 2023-01-10 苏州浪潮智能科技有限公司 存储块管理信息同步记录方法、***、终端及存储介质
CN115509466B (zh) * 2022-11-17 2023-03-28 苏州浪潮智能科技有限公司 一种数据管理方法、装置及电子设备和存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014582A1 (en) * 2000-12-28 2003-01-16 Kenichi Nakanishi Data recorder and method for recording data in flash memory
CN102609370A (zh) * 2012-02-06 2012-07-25 记忆科技(深圳)有限公司 防止固态硬盘数据丢失的方法及其固态硬盘
CN102955741A (zh) * 2011-08-30 2013-03-06 联咏科技股份有限公司 存储器装置及其写入方法
CN104794075A (zh) * 2014-01-22 2015-07-22 宏达国际电子股份有限公司 存储装置、电子装置以及刻录内存的方法
CN106445724A (zh) * 2015-08-11 2017-02-22 Hgst荷兰公司 与受保护数据分开存储奇偶校验数据
CN107918566A (zh) * 2016-10-10 2018-04-17 爱思开海力士有限公司 存储器***及其操作方法
CN109710174A (zh) * 2017-10-25 2019-05-03 爱思开海力士有限公司 数据处理***及其操作方法
CN112764683A (zh) * 2021-01-22 2021-05-07 苏州浪潮智能科技有限公司 存储块管理信息同步记录方法、***、终端及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344867A (zh) * 2007-07-13 2009-01-14 深圳市江波龙电子有限公司 提高Nand型快闪存储器数据存取速度的方法
TWI409819B (zh) * 2009-03-03 2013-09-21 Silicon Motion Inc 平均地使用一快閃記憶體的複數個區塊之方法以及相關之記憶裝置及其控制器
US8195877B2 (en) * 2009-04-29 2012-06-05 Hewlett Packard Development Company, L.P. Changing the redundancy protection for data associated with a file
US8255613B2 (en) * 2009-04-30 2012-08-28 International Business Machines Corporation Wear-leveling and bad block management of limited lifetime memory devices
CN106598484A (zh) * 2016-11-17 2017-04-26 华为技术有限公司 数据的存储方法、闪存芯片以及存储装置
CN107247563A (zh) * 2017-07-06 2017-10-13 济南浪潮高新科技投资发展有限公司 一种nand flash芯片的块信息标识实现方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014582A1 (en) * 2000-12-28 2003-01-16 Kenichi Nakanishi Data recorder and method for recording data in flash memory
CN102955741A (zh) * 2011-08-30 2013-03-06 联咏科技股份有限公司 存储器装置及其写入方法
CN102609370A (zh) * 2012-02-06 2012-07-25 记忆科技(深圳)有限公司 防止固态硬盘数据丢失的方法及其固态硬盘
CN104794075A (zh) * 2014-01-22 2015-07-22 宏达国际电子股份有限公司 存储装置、电子装置以及刻录内存的方法
CN106445724A (zh) * 2015-08-11 2017-02-22 Hgst荷兰公司 与受保护数据分开存储奇偶校验数据
CN107918566A (zh) * 2016-10-10 2018-04-17 爱思开海力士有限公司 存储器***及其操作方法
CN109710174A (zh) * 2017-10-25 2019-05-03 爱思开海力士有限公司 数据处理***及其操作方法
CN112764683A (zh) * 2021-01-22 2021-05-07 苏州浪潮智能科技有限公司 存储块管理信息同步记录方法、***、终端及存储介质

Also Published As

Publication number Publication date
US20230376226A1 (en) 2023-11-23
CN112764683A (zh) 2021-05-07
CN112764683B (zh) 2023-01-10

Similar Documents

Publication Publication Date Title
CN110531940B (zh) 视频文件处理方法及装置
WO2022156369A1 (zh) 存储块管理信息同步记录方法、***、终端及存储介质
CN107562578B (zh) 一种存储数据的快照创建方法、装置、设备及存储介质
WO2022142544A1 (zh) 防止闪存数据丢失的方法、固态硬盘控制器、固态硬盘
US10628298B1 (en) Resumable garbage collection
CN106557143A (zh) 用于数据存储设备的装置和方法
CN110333971B (zh) Ssd坏块表备份方法、装置、计算机设备及存储介质
CN110502523A (zh) 业务数据存储方法、装置、服务器及计算机可读存储介质
CN110019063B (zh) 计算节点数据容灾回放的方法、终端设备及存储介质
US8015375B1 (en) Methods, systems, and computer program products for parallel processing and saving tracking information for multiple write requests in a data replication environment including multiple storage devices
CN111158858A (zh) 一种虚拟机的克隆方法和装置,及计算机可读存储介质
US8595271B1 (en) Systems and methods for performing file system checks
CN106933707B (zh) 基于raid技术的数据存储设备数据恢复方法及***
US20190354433A1 (en) Parity log with by-pass
CN115509466B (zh) 一种数据管理方法、装置及电子设备和存储介质
CN115202589B (zh) 放置组成员选择方法、装置、设备及可读存储介质
CN110729014A (zh) Ssd存储擦除计数表备份的方法、装置、计算机设备及存储介质
CN115878381A (zh) 基于srm盘的数据恢复方法及装置、存储介质、电子装置
CN110704239B (zh) 数据复制方法、装置、电子设备
CN111857586A (zh) 一种SSD Trim优化方法、***、终端及存储介质
CN108334280B (zh) 一种raid5磁盘组快速重建方法和装置
CN110019092B (zh) 数据存储的方法、控制器和***
CN111506259A (zh) 数据存储、读取方法、装置、设备及可读存储介质
CN117539690B (zh) 多磁盘数据的合并恢复方法、装置、设备、介质和产品
CN108599982A (zh) 数据恢复方法及相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21920745

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21920745

Country of ref document: EP

Kind code of ref document: A1