WO2022199027A1 - 一种随机写的方法、电子设备及存储介质 - Google Patents

一种随机写的方法、电子设备及存储介质 Download PDF

Info

Publication number
WO2022199027A1
WO2022199027A1 PCT/CN2021/127685 CN2021127685W WO2022199027A1 WO 2022199027 A1 WO2022199027 A1 WO 2022199027A1 CN 2021127685 W CN2021127685 W CN 2021127685W WO 2022199027 A1 WO2022199027 A1 WO 2022199027A1
Authority
WO
WIPO (PCT)
Prior art keywords
global mapping
converted
mapping table
storage unit
capacity
Prior art date
Application number
PCT/CN2021/127685
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 湖南国科微电子股份有限公司
Publication of WO2022199027A1 publication Critical patent/WO2022199027A1/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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • 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 technical field of data storage, and in particular, to a random writing method, an electronic device and a storage medium.
  • Solid State Disk SSD
  • Solid-state drives have gradually become mainstream storage devices with the advantages of fast read and write speed and small size, meeting the computing speed of current CPU (Central Processing Unit, central processing unit), and are widely used in military, vehicle, industrial control, video surveillance, network surveillance, Network terminals, electric power, medical, aviation, navigation equipment and many other fields.
  • the mapping data in the solid-state disk is organized according to continuous logical address ranges to form a global mapping table.
  • DDR Random access memory
  • the purpose of the embodiments of the present application is to provide a random write method, an electronic device and a storage medium, so as to improve the random write caused by the manufacturing cost, wafer area and design complexity of the memory cells existing in the prior art lower performance issues.
  • an embodiment of the present application provides a method for random writing, and the method includes:
  • the load instruction of the to-be-converted global mapping table that needs to be converted in the storage unit is determined, and After receiving the load instruction, load a plurality of the global mapping tables to be converted from the storage unit, perform batch data conversion on the loaded global mapping tables to be converted, and obtain a plurality of converted global mapping tables A mapping table to complete the data conversion of the global mapping table and complete the random write process in the storage unit, without increasing the manufacturing cost, wafer area and design complexity to improve the random write performance of the storage unit.
  • batch data conversion is performed on multiple global mapping tables that need data conversion, which improves the data conversion rate of the global mapping table, and improves the random write rate and random write performance of the storage unit.
  • determining the load instruction of the global mapping table to be converted according to the conversion instruction includes:
  • the global mapping table stored in the storage unit is searched to find the to-be-converted global mapping table in the storage unit for which data conversion needs to be performed;
  • the steps of searching the global mapping table stored in the storage unit and applying for the cache space are repeatedly performed until the cache space of the storage unit is used up, and a plurality of the load instructions are determined.
  • the processor when determining the load instruction of the global mapping table in the storage unit, searches and analyzes all the global mapping tables stored in the storage unit according to the conversion instruction, and finds out all the global mapping tables stored in the storage unit.
  • the global mapping table to be converted in the storage unit apply for the cache space of the storage unit according to the found capacity of the global mapping table to be converted, when the cache space is sufficient, the application is successful, and its corresponding the load instruction, and then repeat the search step in the storage unit to find out all the global mapping tables to be converted in the storage unit, until the cache space of the storage unit is used up.
  • By repeatedly searching the global mapping table to be converted in the storage unit a plurality of global mapping tables to be converted that can be converted in the cache space of the storage unit are found, and each global mapping table to be converted is determined the corresponding load instruction.
  • the loading of the global mapping table to be converted from the storage unit according to the load instruction includes:
  • the corresponding global mapping table to be converted is loaded in the storage unit according to the load instruction.
  • the corresponding global mapping table to be converted is loaded through the load instruction, which can effectively improve the efficiency and accuracy of loading.
  • performing batch data conversion on the loaded global mapping table to be converted to obtain a converted global mapping table including:
  • the data conversion process includes two processes of data swapping in and data swapping out. Convert the global mapping table to perform batch data swap in, and then perform batch data swap out for the to-be-converted global mapping table after the data swap-in, to complete the data conversion process for the to-be-converted global mapping table, and the speed of data conversion is The capacity of the global mapping table to be converted is determined. By simultaneously performing data swapping in and swapping out for a plurality of the global mapping tables to be converted, the time required for data conversion is effectively saved, and the efficiency of data conversion is improved.
  • the method further includes:
  • the capacity of the global mapping table to be converted is dynamically adjusted by the capacity of the storage unit, and the maximum number of global mapping tables that can perform data conversion in the storage unit is determined by the capacity of the global mapping table to be converted.
  • the dynamic adjustment includes: determining a reference capacity value of the storage unit according to the user logical space capacity of the storage unit; and calculating the capacity of the global mapping table to be converted according to the reference capacity value.
  • the capacity of the global mapping table to be converted is dynamically adjusted by the capacity of the storage unit, and a global mapping capable of data conversion in the storage unit is determined according to the capacity of the global mapping table to be converted
  • the maximum number of tables is dynamically adjusted to calculate the capacity of the to-be-converted global mapping table according to the capacity of storage units of different capacity levels.
  • Reference capacity value and then calculate the capacity of the to-be-converted global mapping table according to the reference capacity value, and determine the storage unit by calculating the capacity of the to-be-converted global mapping table in the storage unit.
  • the determining the reference capacity value of the storage unit according to the user logical space capacity of the storage unit includes:
  • a reference capacity value of a single interval is determined, wherein the reference capacity value is used to determine the interval in which the user logical space capacity is located.
  • the reference capacity value of the storage unit is calculated according to the user logical space capacity of the storage unit
  • data block cleaning is performed on the total data blocks in the storage unit to remove damage in the storage unit
  • Useless data blocks such as data blocks
  • obtain the available data blocks of the storage unit calculate the user logical space capacity of the storage unit according to the available data blocks, and then calculate the storage unit according to the user logical space capacity.
  • the storage space in the storage unit is divided into different intervals, and the reference capacity is the reference capacity value of a single interval, which is used to determine the interval where the user logical space capacity is located.
  • the calculation of the size can obtain the reference capacity value in the storage unit.
  • calculating the capacity of the to-be-converted global mapping table according to the reference capacity value includes:
  • the capacity of the to-be-converted global mapping table is calculated according to the data occupied space of the first-level table in the storage unit and the available capacity value.
  • the available capacity value of the storage unit is calculated by the obtained reference capacity value in the storage unit, and according to the data occupied space of the first-level table in the storage unit and the The available capacity value is calculated, and the capacity of the global mapping table to be converted is calculated, and the first-level table is the first-level mapping table in the storage unit.
  • the capacity value is used to calculate and adjust the capacity of the global mapping table to be converted, so that the corresponding global mapping table to be converted can be determined for different data in different storage units to satisfy various operations of various storage units.
  • an embodiment of the present application further provides an electronic device, the electronic device includes a memory and a processor, the memory stores program instructions, and when the processor reads and executes the program instructions, executes the The steps in any one of the implementation manners of the first aspect above.
  • embodiments of the present application further provide a readable storage medium, where computer program instructions are stored in the readable storage medium, and when the computer program instructions are read and run by a processor, the above-mentioned Steps in any implementation of the first aspect.
  • the embodiments of the present application provide a random write method, an electronic device and a storage medium.
  • Multiple global mapping tables to be converted are processed at the same time, which improves the data conversion rate of the global mapping table, and can improve the random write rate and random write performance of the storage unit without increasing the manufacturing cost, wafer area and design complexity.
  • FIG. 1 is a schematic flowchart of a method for random writing provided by an embodiment of the present application
  • step S2 of a random writing method provided by an embodiment of the present application
  • step S3 is a detailed schematic flowchart of step S3 of a method for random writing provided by an embodiment of the present application;
  • FIG. 4 is a detailed schematic flowchart of step S4 of a random writing method provided by an embodiment of the present application.
  • the embodiment of the present application provides a random write method, which is applied to an electronic device where a storage unit is located, and the storage unit can be various solid-state hard disks of different capacities, personal computers (personal computers, PCs), wearable devices, and terminal devices. It is a part of a device with a data storage function such as a personal computer (personal computer, PC), a tablet computer, a smart phone, a personal digital assistant (personal digital assistant, PDA) and other electronic devices with logical computing functions.
  • FIG. 1 is a schematic flowchart of a random writing method provided by an embodiment of the present application, and the method includes the following steps:
  • Step S1 monitoring the conversion instruction of the global mapping table in the storage unit.
  • the NAND Flash flash memory of the storage unit when using the NAND Flash flash memory of the storage unit, it is necessary to establish a forward mapping relationship between the logical address and the physical address of the NAND Flash.
  • This forward mapping relationship is independently managed inside the storage unit and stored in a fixed This area is marked as the entry area, and the global mapping table is the form formed after the forward mapping relationship data is organized according to the continuous logical address range.
  • the processor where the storage unit is located needs to convert the mapping relationship of the global mapping table stored in the storage unit according to the random read/write command when starting the random write process, and issue a global map to the storage unit that needs to be converted. Conversion instructions for the mapping table.
  • Step S2 Determine the load instruction of the global mapping table to be converted according to the conversion instruction.
  • the processor determines, according to the conversion instruction, a load instruction of the global mapping table to be converted that needs to be converted in the storage unit.
  • Step S3 Load the global mapping table to be converted from the storage unit according to the load instruction.
  • the designated storage space of the storage unit may be a NAND Flash flash memory
  • the processor can load multiple to-be-ready flash memories from the NAND Flash flash memory in the storage unit. Convert the global mapping table.
  • the physical NAND Flash memory will be established.
  • the reverse mapping relationship between the address and the logical address and then uniformly convert the reverse mapping relationship data into the forward mapping relationship data.
  • step S4 batch data conversion is performed on the loaded global mapping table to be converted, so as to obtain a converted global mapping table.
  • the processor where the storage unit is located simultaneously performs batch data conversion on the loaded global mapping tables to be converted, which reduces the time required for the data conversion of the global mapping tables, and obtains multiple converted global mapping tables , completes the data conversion for the mapping relationship in the storage unit, and completes the random write process.
  • multiple global mapping tables after data conversion can be aggregated and refreshed, the split global mapping tables can be aggregated, and the merged multiple global mapping tables can be refreshed after aggregation.
  • data conversion in the random write process can be performed again to complete multiple random write processes, which improves the random write rate and random write performance of the storage unit.
  • the capacity of the global mapping table in storage units of different capacities can be dynamically adjusted by improving the space utilization rate of the first-level mapping table in the storage unit.
  • FIG. 2 is a detailed schematic flowchart of step S2 of a random writing method provided by an embodiment of the present application. The method includes:
  • Step S21 Search the global mapping table stored in the storage unit according to the conversion instruction, so as to find the to-be-converted global mapping table in the storage unit for which data conversion needs to be performed.
  • the processor searches all the global mapping tables stored in the storage unit according to the random read and write commands in the process of random writing of the storage unit, and finds out the global mapping table that needs to perform data conversion in the storage unit, and processes
  • the controller can determine whether the global mapping table needs to perform data conversion through the mapping relationship of the global mapping table in the random writing process.
  • Step S22 apply for the cache space of the storage unit according to the conversion instruction and the found capacity of the corresponding global mapping table to be converted, and when the application is successful, determine the corresponding global mapping table to be converted. Load instruction.
  • the cache space of the storage unit is applied for according to the conversion instruction and the capacity of the global mapping table to be converted corresponding to the conversion instruction, and when the capacity of the cache space is sufficient, it is determined that the global mapping table corresponding to the conversion instruction corresponds to Load instruction.
  • the cache space of the corresponding global mapping table to be converted when applying for the cache space of the corresponding global mapping table to be converted, if the cache space is insufficient, the application fails, the processor resources are released, the global mapping table to be converted cannot be loaded, and the corresponding load cannot be determined. command, store the global mapping table to be converted in the cache command queue for waiting, and let the global mapping table to be converted be sorted in the cache command queue in an orderly manner, and then when the cache space capacity is sufficient, the command pair can be set according to the instructions in the cache command queue.
  • the corresponding global mapping table to be converted generates a load instruction.
  • Step S23 repeating the steps of searching the global mapping table stored in the storage unit and applying for the cache space, until the cache space of the storage unit is used up, and determining a plurality of the load instructions .
  • the processor repeats the above steps of searching for the global mapping table to be converted that needs to be converted and applying for the cache space of the storage unit according to the capacity of each global mapping table to be converted, and assigning the corresponding load instruction when the cache space is sufficient, until Cache space is used up. Therefore, when the cache space of the global mapping table in the storage unit is used up, the processor finds multiple global mapping tables to be converted in the storage unit, and determines a load instruction corresponding to each global mapping table to be converted.
  • the processor repeatedly searches the storage unit for the operation of the to-be-converted global mapping table that needs to be converted, searches out the to-be-converted global mapping tables in the storage unit in turn, and determines each to-be-converted global mapping table.
  • the load instructions corresponding to the mapping table can quickly determine the load instructions of all the global mapping tables to be converted in the storage unit.
  • FIG. 3 is a detailed schematic flowchart of step S3 of a random writing method provided by an embodiment of the present application. The method includes:
  • Step S31 Determine the to-be-converted global mapping table corresponding to each load instruction.
  • the processor determines the corresponding global mapping table to be converted according to each load instruction, for example, loads the global mapping table to be converted stored in the NAND Flash flash memory in the storage unit.
  • Step S32 Load the corresponding global mapping table to be converted in the storage unit according to the load instruction.
  • the corresponding global mapping table is loaded from the storage unit according to the load instruction, so that a plurality of to-be-converted global mapping tables in the storage unit that need to be converted can be loaded respectively.
  • the processor can load the global mapping table to be converted correspondingly according to the load instruction, so that multiple global mapping tables to be converted in the storage unit can be loaded respectively.
  • FIG. 4 is a detailed schematic flowchart of step S4 of a random writing method provided by an embodiment of the present application. The method includes:
  • Step S41 perform batch data swapping in of the loaded multiple global mapping tables to be converted.
  • the processor can simultaneously perform batch data swapping in all the loaded global mapping tables to be converted, and obtain multiple global mapping tables after data swapping in. .
  • the interleaving operation of the kernel can be divided into two steps: one: send the data of the global mapping table to be converted in the storage unit to the storage bus, and then send it to the NAND Flash flash memory from the storage bus; two: send the data to be converted
  • the data of the global mapping table is sent from the NAND Flash flash memory to the storage bus, and then sent back to the storage unit by the storage bus.
  • the interleaving operation is that when one chip select is performing the first step, the other chip select is performing the second step.
  • the size of the interleaving resource depends on the number of chip selects in the flash memory on a channel.
  • Step S42 performing batch data swapping out of the plurality of global mapping tables to be converted after data swapping is completed, to obtain a plurality of the converted global mapping tables.
  • the processor can simultaneously perform batch data swapping out of the to-be-converted global mapping table after data swapping in, so as to obtain a plurality of global mapping tables after data conversion. mapping table.
  • the data conversion process includes two steps of data swapping in and data swapping out, and the speed of data conversion is determined by the capacity of the global mapping table to be converted.
  • the processor loads 16 global mapping tables to be converted from the storage unit according to 16 load instructions. If the interleaving operation resources in the core of the processor are sufficient, the processor can load the 16 global mapping tables to be converted.
  • To perform batch conversion it is no longer necessary to perform a single lookup of the global mapping table to be converted as in the prior art, perform a single load and a single conversion after the lookup, and then repeat this process continuously to batch convert the global mapping table to be converted, which can effectively save the global
  • the conversion time of the mapping table improves the conversion efficiency of the global mapping table, thereby improving the random write performance of the storage unit.
  • batch data conversion is performed on the loaded global mapping table to be converted, and multiple loaded global mapping tables to be converted are processed simultaneously, which can effectively improve the performance of the global mapping table under various conditions.
  • the conversion efficiency is improved, and the random write performance of the storage unit is improved.
  • the capacity of the global mapping table to be converted is dynamically adjusted by the capacity of the storage unit, and the capacity of the global mapping table to be converted can be calculated and adjusted according to the storage units of different capacity levels, and stored.
  • the maximum number of global mapping tables that can perform data conversion in a unit is determined by the adjusted capacity of the global mapping table to be converted.
  • the reference capacity value of the storage unit is determined according to the user logical space capacity of the storage unit.
  • the reference capacity value of the storage unit is determined from the user logical space capacity of the storage unit, and the total data blocks in the storage unit are firstly cleaned to obtain available data blocks, and according to the available data blocks , obtain the user logical space capacity of the storage unit, and on the basis of the user logical space capacity, divide the storage space of the storage unit into several different intervals, determine the reference capacity value of a single interval, and use the reference capacity value as In determining the interval in which the user logical space capacity is located, the size of the reference capacity value is the initial capacity value of the interval. In some embodiments, due to the size of the mapping relationship, for some storage units with a capacity less than 64 GB Its reference capacity values are all 64GB.
  • the user logical space capacity of the storage unit is obtained according to the capacity configuration parameters issued by the mass production tool .
  • the capacity of the global mapping table to be converted is calculated according to the reference capacity value.
  • the final available capacity value of the storage unit can be calculated according to the reference capacity value, and the available capacity value determines the interval in which the finally calculated global mapping table to be converted is located, and then according to the data occupied space and available capacity value of the first-level table in the storage unit , calculate the size of the capacity of the global mapping table to be converted, and divide the size of the resources of the global mapping table for data conversion by the size of the space occupied by the total capacity of the global mapping table to be converted in the storage unit, and determine the storage The maximum number of global mapping tables capable of data transformation in a cell.
  • the capacity of the global mapping table to be converted is adjusted, which can effectively improve the data conversion efficiency of the global mapping table. , which improves the random write performance of the storage unit, reduces the number of refreshes of the global mapping table, reduces the degree of data wear in the entry area of the storage unit, and improves the service life of the storage unit and the reliability of the data in the storage unit.
  • the size of the global mapping table is generally 32KB, and the aggregation operation of merging multiple global mapping tables to be converted is not required.
  • Tconvert In terms of read and write time, the time of Tconvert is negligible. After each to-be-converted global mapping table is individually converted, the global mapping table will be refreshed, causing wear and tear to the data blocks in the table entry area, reducing the service life of the storage unit and the reliability of the data.
  • simultaneous data conversion can be performed on all loaded global mapping tables to be converted. Since the capacity of the global mapping table to be converted can be adjusted according to the capacity of different storage units, the capacity of the global mapping table is higher than that of the prior art.
  • the capacity is small, such as 8KB
  • the data throughput rate in the same forward/reverse mapping relationship data and the same NAND Flash flash memory as in the prior art is 400MT/s
  • the global mapping table to be converted can be aggregated NVMe (Non-Volatile Memory express, standard and information Open collection) storage system to improve the efficiency of data swapping out, split the global mapping table to be converted and then perform data conversion, through PCIe (Peripheral Component Interconnect express, high-speed serial computer expansion bus standard) channel and processing The controller is directly connected, which can effectively reduce the delay
  • the capacity of the global mapping table is 32KB or 64KB, it is a complete global mapping table and does not require aggregation. After the simultaneous conversion of all the global mapping tables to be converted, the aggregated global mapping table will be refreshed, which is implemented in this application.
  • the size of the global mapping table can be changed to a quarter of the original size. Taking the original size of the global mapping table as 32KB as an example, the original quarter is 8KB.
  • four global mapping tables that have completed data conversion are required to aggregate.
  • the global mapping table is refreshed once, so the number of refreshes of the global mapping table of 8192 forward/reverse mapping relationships is 1/4 of the prior art.
  • the data blocks cause wear and tear, so the number of refreshes is 1/4 of the prior art, which can reduce the wear on the data blocks in the entry area, and can effectively improve the service life of the storage unit and the reliability of the data. Therefore, due to the reduction of the capacity of the global mapping table, the conversion efficiency of the global mapping table in this case is four times higher than that in the prior art, that is, the random write performance of the storage unit is improved four times.
  • the capacity of the global mapping table to be converted in the capacity levels of different storage units is adjusted to determine the storage unit.
  • the maximum number of global mapping tables that can perform data conversion in the unit, and the random write performance of the storage unit can be improved by adjusting the capacity of the global mapping tables under different capacity levels and processing multiple global mapping tables to be converted at the same time.
  • An embodiment of the present application further provides an electronic device, the electronic device includes a memory and a processor, where program instructions are stored in the memory, and when the processor reads and executes the program instructions, executes the program instructions provided in this embodiment. Steps in any one of the methods described in a random writing method.
  • the electronic device may be a personal computer (personal computer, PC), a tablet computer, a smart phone, a personal digital assistant (personal digital assistant, PDA) and other electronic devices with logical computing functions.
  • PC personal computer
  • PDA personal digital assistant
  • Embodiments of the present application further provide a readable storage medium, where computer program instructions are stored in the readable storage medium, and when the computer program instructions are read and run by a processor, the computer program instructions provided in this embodiment are executed. Steps in any one of the methods described in a random writing method.
  • the embodiments of the present application provide a random write method, electronic device, and storage medium.
  • Multiple global mapping tables to be converted are processed at the same time, reducing the time required for data conversion, improving the data conversion rate of the global mapping table, and improving the storage unit without increasing the manufacturing cost, wafer area and design complexity. random write rate and random write performance.
  • each block in the block diagrams may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function(s) .
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams, and combinations in the block diagrams can be implemented by special purpose hardware-based systems that perform the specified functions or actions, or by combinations of special purpose hardware and computer instructions.
  • each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
  • this embodiment also provides a readable storage medium with computer program instructions stored in it, and when the computer program instructions are read and executed by a processor, execute any one of the block data storage methods in the method. A step of.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RanDom Access Memory), magnetic disk or optical disk and other media that can store program codes .

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种随机写的方法、电子设备及存储介质,涉及数据存储技术领域,该方法包括:监控存储单元中全局映射表的转换指令(S1),根据转换指令确定出待转换全局映射表的加载指令(S2),根据加载指令从存储单元中加载所述待转换全局映射表(S3),将加载后的待转换全局映射表进行批量数据转换,以得到转换后的全局映射表(S4),以完成随机写的过程。通过将存储单元中进行随机写过程中多个需要进行数据转换的全局映射表进行批量数据转换,对多个待转换全局映射表同时进行处理,减小了全局映射表的数据转换所需的时间,提高了全局映射表的数据转换速率,提升了存储单元的随机写性能。

Description

一种随机写的方法、电子设备及存储介质
相关申请的交叉引用
本申请要求于2021年03月25日提交中国专利局的申请号为202110323391.0、名称为“一种随机写的方法、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据存储技术领域,具体而言,涉及一种随机写的方法、电子设备及存储介质。
背景技术
随着科技的发展,市场和用户对数据存储设备性能的要求越来越高,因此许多存储单元,例如固态硬盘(Solid State Disk,SSD)的应用也越来越广泛。固态硬盘以读写速度快、体积小的优势逐渐成为了主流存储器件,满足目前CPU(Central Processing Unit,中央处理器)的计算速度,广泛应用于军事、车载、工控、视频监控、网络监控、网络终端、电力、医疗、航空、导航设备等诸多领域。固态硬盘中的映射数据按照连续逻辑地址区间进行组织,形成全局映射表。
为了满足更多更高的存储需求,需要对存储单元的随机写性能进行优化和提升。当前提升存储单元,例如固态硬盘随机写性能一般使用两种方式:一,增加固态硬盘中主控内存空间的大小;二:使用DDR SDRAM(Double Data Rate Synchronous Dynamic Random Access Memory,双倍速率同步动态随机存储器),通常简称DDR,在其中保存完整的用户数据的映射关系。而方式一中,增加主控内存空间的大小会增大晶片面积,增加制造成本,方式二中由于DDR的引入,也会增加产品成本,增加晶片的设计复杂度。
发明内容
有鉴于此,本申请实施例的目的在于提供一种随机写的方法、电子设备及存储介质,以改善现有技术中存在的存储单元的由于制造成本、晶片面积和设计复杂度造成的随机写性能较低的问题。
为了解决上述问题,第一方面,本申请实施例提供了一种随机写的方法,所述方法包括:
监控存储单元中全局映射表的转换指令;
根据所述转换指令确定出待转换全局映射表的加载指令;
根据所述加载指令从所述存储单元中加载所述待转换全局映射表;
将加载后的所述待转换全局映射表进行批量数据转换,以得到转换后的全局映射表。
在上述实现过程中,在随机写过程中通过对所述存储单元中的全局映射表的转换指令进行监控,确定出所述存储单元中需要进行数据转换的待转换全局映射表的加载指令,并在接收到所述加载指令后从所述存储单元中加载多个所述待转换全局映射表,将加载后的多个所述待转换全局映射表进行批量数据转换,得到多个转换后的全局映射表,以完成全局映射表的数据转换,完成所述存储单元中的随机写过程,无需通过增加制造成本,晶片面积以及设计复杂度来提升存储单元的随机写性能,通过对所述存储单元中在随机写过程中对需要进行数据转换的多个全局映射表进行批量数据转换,提高了所述全局映射表的数据转换速率,提升了存储单元的随机写速率和随机写性能。
可选地,所述根据所述转换指令确定出待转换全局映射表的加载指令,包括:
根据所述转换指令对所述存储单元中存储的全局映射表进行查找,以查找出所述存储单元中的需要进行数据转换的所述待转换全局映射表;
根据所述转换指令以及查找到的对应的所述待转换全局映射表的容量对所述存储单元的缓存空间进行申请,在申请成功时,确定出所述待转换全局映射表对应的加载指令;
重复执行所述对所述存储单元中存储的全局映射表进行查找以及对所述缓存空间进行申请的步骤,直到所述存储单元的缓存空间使用完毕,确定出多个所述加载指令。
在上述实现过程中,在确定所述存储单元中的全局映射表的加载指令时,由处理器根据所述转换指令对所述存储单元中储存的所有全局映射表进行查找与分析,查找出所述存储单元中的待转换全局映射表,根据查找到的所述待转换全局映射表的容量对所述存储单元的缓存空间进行申请,在所述缓存空间足够时,申请成功,确定出其对应的所述加载指令,再在所述存储单元中重复执行所述查找步骤,找出所述存储单元中的所有待转换全局映射表,直到所述存储单元的缓存空间使用完毕。通过在所述存储单元中重复进行查找待转换全局映射表的方式,找出所述存储单元的缓存空间中能够进行转换的多个待转换全局映射表,并确定出每个待转换全局映射表对应的加载指令。
可选地,所述根据所述加载指令从所述存储单元中加载所述待转换全局映射表,包括:
确定出每个所述加载指令对应的所述待转换全局映射表;
根据所述加载指令在所述存储单元中加载对应的所述待转换全局映射表。
在上述实现过程中,通过所述加载指令对对应的所述待转换全局映射表进行加载,能够有效地提高加载的效率和准确性。
可选地,所述将加载后的所述待转换全局映射表进行批量数据转换,以得到转换后的全局映射表,包括:
将加载的多个所述待转换全局映射表进行批量数据换入;
对数据换入完成后的多个所述待转换全局映射表进行批量数据换出,得到多个所述转 换后的全局映射表,其中,所述数据转换包括数据换入和数据换出,所述数据转换的速度由所述待转换全局映射表的容量决定。
在上述实现过程中,所述数据转换的过程中包括数据换入和数据换出两个过程,根据所述处理器的内核的性能,先对从所述存储单元中加载的多个所述待转换全局映射表进行批量数据换入,再对进行数据换入后的所述待转换全局映射表进行批量数据换出,完成对所述待转换全局映射表的数据转换过程,数据转换的速度由所述待转换全局映射表的容量决定。通过对多个所述待转换全局映射表同时进行数据换入和换出,有效地节省了数据转换所需的时间,提高了数据转换的效率。
可选地,所述方法还包括:
对多个所述转换后的全局映射表进行聚合;
对聚合后的全局映射表进行刷新,得到刷新后的全局映射表。
在上述实现过程中,通过对多个所述转换后的全局映射表进行聚合,再对聚合后的全局映射表进行刷新,能够得到刷新后的全局映射表,通过在所述存储单元中重复进行随机写的过程,提高随机写的效率。
可选地,所述待转换全局映射表的容量由所述存储单元的容量进行动态调整,所述存储单元中能够进行数据转换的全局映射表的最大数量由所述待转换全局映射表的容量决定;
其中,所述动态调整包括:根据所述存储单元的用户逻辑空间容量确定出所述存储单元的参考容量值;根据所述参考容量值计算出所述待转换全局映射表的容量。
在上述实现过程中,所述待转换全局映射表的容量由所述存储单元的容量进行动态调整,根据所述待转换全局映射表的容量确定出所述存储单元中能够进行数据转换的全局映射表的最大数量,动态调整为根据不同容量等级的存储单元的容量对所述待转换全局映射表的容量进行计算,先根据所述存储单元的用户逻辑空间容量的大小确定出所述存储单元的参考容量值,再根据所述参考容量值计算出所述待转换全局映射表的容量,通过对所述存储单元中的所述待转换全局映射表的容量进行计算,以确定出所述存储单元中能够进行数据转换的全局映射表的最大数量,根据不同存储单元容量等级,对所述待转换全局映射表的容量进行动态调整,能够有效的提高全局映射表的数据转换效率,提高存储单元的随机写性能,且减少了全局映射表的刷新次数,减小表项区中的数据磨损程度,提升存储单元的使用寿命和存储单元中数据的可靠性,满足用户的多种需求,适用于多种不同的处理器中。
可选地,所述根据所述存储单元的用户逻辑空间容量确定出所述存储单元的参考容量值,包括:
将所述存储单元中的总数据块进行数据块清洗,以得到可用数据块;
根据所述可用数据块,得到所述存储单元的所述用户逻辑空间容量;
基于所述用户逻辑空间容量将所述存储单元的存储空间划分为不同的区间;
确定单个区间的参考容量值,其中,所述参考容量值用于确定所述用户逻辑空间容量所在的区间。
在上述实现过程,在根据所述存储单元的用户逻辑空间容量计算所述存储单元的参考容量值时,对所述存储单元中的总数据块进行数据块清洗,去除所述存储单元中的损坏的数据区块等无用数据块,得到所述存储单元的可用数据块,根据所述可用数据块计算出所述存储单元的用户逻辑空间容量,再根据所述用户逻辑空间容量将所述存储单元中的存储空间划分为不同的区间,所述参考容量为单个区间的参考容量值,用于确定所述用户逻辑空间容量的所在的区间,通过对所述存储单元中的可用的用户逻辑空间容量的大小的计算,能够得到所述存储单元中的参考容量值。
可选地,所述根据所述参考容量值计算出所述待转换全局映射表的容量,包括:
根据所述参考容量值计算出所述存储单元的可用容量值;
根据所述存储单元中一级表的数据占用空间和所述可用容量值,计算出所述待转换全局映射表的容量。
在上述实现过程中,通过得出的所述存储单元中的所述参考容量值,计算出所述存储单元的可用容量值,并根据所述存储单元中的一级表的数据占用空间和所述可用容量值,计算出所述待转换全局映射表的容量,所述一级表为所述存储单元中的一级映射表,通过在大规模生产中根据所述参考容量值和所述可用容量值,对所述待转换全局映射表的容量进行计算和调整,能够针对不同的存储单元中的不同的数据确定出对应的待转换全局映射表,满足多种不同存储单元的多种运算。
第二方面,本申请实施例还提供了一种电子设备,所述电子设备包括存储器和处理器,所述存储器中存储有程序指令,所述处理器读取并运行所述程序指令时,执行上述第一方面中任一实现方式中的步骤。
第三方面,本申请实施例还提供了一种可读取存储介质,所述可读取存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器读取并运行时,执行上述第一方面中任一实现方式中的步骤。
综上所述,本申请实施例提供了一种随机写的方法、电子设备及存储介质,通过将存储单元中进行随机写过程中需要进行数据转换的待转换全局映射表进行批量数据转换,对多个待转换全局映射表同时进行处理,提高了全局映射表的数据转换速率,能够在不增加制造成本和晶片面积以及设计复杂度的情况下,提升存储单元的随机写速率和随机写性能。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1为本申请实施例提供的一种随机写的方法的流程示意图;
图2为本申请实施例提供的一种随机写的方法的步骤S2的详细流程示意图;
图3为本申请实施例提供的一种随机写的方法的步骤S3的详细流程示意图;
图4为本申请实施例提供的一种随机写的方法的步骤S4的详细流程示意图。
具体实施方式
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请实施例的一部分实施例,而不是全部的实施例。基于本申请实施例的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本申请实施例保护的范围。
本申请实施例提供了一种随机写的方法,应用于存储单元所在的电子设备,该存储单元可以为各种不同容量大小的固态硬盘、个人电脑(personal computer,PC)、穿戴设备、终端设备等带有数据存储功能设备中的一部分,该电子设备可以为个人电脑(personal computer,PC)、平板电脑、智能手机、个人数字助理(personal digital assistant,PDA)等具有逻辑计算功能的电子设备。
请参阅图1,图1为本申请实施例提供的一种随机写的方法的流程示意图,该方法包括以下步骤:
步骤S1,监控存储单元中全局映射表的转换指令。
示例地,在使用存储单元的NAND Flash闪存存储器时,需要建立逻辑地址到NAND Flash的物理地址之间的正向映射关系,这种正向映射关系在存储单元的内部进行独立管理,存放在固定的NAND Flash区间,该区域标记为表项区,而全局映射表为该正向映射关系数据按照连续逻辑地址区间进行组织后形成的表单。其中,存储单元所在的处理器在开始随机写的过程时,根据随机读写的命令,需要对存储单元中存储的全局映射表的映射关系进行转换,向存储单元中下达对需要进行转换的全局映射表的转换指令。
步骤S2,根据所述转换指令确定出待转换全局映射表的加载指令。
其中,处理器根据转换指令确定出存储单元中需要进行数据转换的待转换全局映射表的加载指令。
步骤S3,根据所述加载指令从所述存储单元中加载所述待转换全局映射表。
其中,在存储单元接收到处理器发出的多个加载指令后,示例地,存储单元的指定存 储空间可以为NAND Flash闪存存储器,处理器能够从存储单元中的NAND Flash闪存存储器中加载多个待转换全局映射表。
需要说明的是,在没有动态随机存取存储器(Dynamic Random Access Memory,DRAM)的存储单元中,为了减小表项区中NAND Flash闪存存储器中数据块的写放大,会建立NAND Flash闪存存储器物理地址与逻辑地址之间的反向映射关系,再统一将反向映射关系数据转换到正向映射关系数据中,由于没有动态随机存取内存的存储单元的特性,其OCB(On-Chip-Buffer,主控内存空间)的容量较小,无法容纳完整的用户数据的映射关系,只会预留较小的内存空间用于映射关系数据的数据换入和换出,在各种不同的存储单元产品中,由于预留的内存空间较小,所以导致存储单元中的映射关系转换效率较低,且表项区的数据块磨损严重,降低存储单元的随机写性能。
步骤S4,将加载后的所述待转换全局映射表进行批量数据转换,以得到转换后的全局映射表。
其中,由存储单元所处的处理器同时对加载后的多个待转换全局映射表进行批量数据转换,减小了全局映射表进行数据转换所需要的时间,得到多个转换后的全局映射表,完成存储单元中对于映射关系的数据转换,完成此次随机写的过程。
需要说明的是,可以对于多个完成数据转换后的全局映射表进行聚合和刷新,对拆分后的全局映射表进行聚合,在聚合后对合并的多个全局映射表进行刷新,在得到刷新后的全局映射表后可以再次进行随机写过程中的数据转换,以完成多个随机写过程,提升了存储单元的随机写速率和随机写性能。
需要说明的是,在没有动态随机存取内存的存储单元中,能够通过提高存储单元中一级映射表的空间利用率的方式,以动态调整不同容量的存储单元中的全局映射表的容量大小。
在上述实施方式中,通过将存储单元中进行随机写过程中需要进行数据转换的待转换全局映射表进行批量数据转换,对多个待转换全局映射表同时进行处理,能够减小数据转换所需的时间,提高了全局映射表的数据转换速率,提升了存储单元的随机写速率和随机写性能。
请参阅图2,图2为本申请实施例提供的一种随机写的方法的步骤S2的详细流程示意图,该方法包括:
步骤S21,根据所述转换指令对所述存储单元中存储的全局映射表进行查找,以查找出所述存储单元中的需要进行数据转换的所述待转换全局映射表。
其中,由处理器在存储单元进行随机写的过程中根据随机读写的命令对存储单元中存储的全部的全局映射表进行查找,并查找出存储单元中需要进行数据转换的全局映射表, 处理器能够通过全局映射表在随机写过程中的映射关系来确定该全局映射表是否需要进行数据转换。
步骤S22,根据所述转换指令以及查找到的对应的所述待转换全局映射表的容量对所述存储单元的缓存空间进行申请,在申请成功时,确定出所述待转换全局映射表对应的加载指令。
其中,根据转换指令以及转换指令对应的查找到的待转换全局映射表的容量对存储单元的缓存空间进行申请,在缓存空间的容量足够时,确定出转换指令对应的待转换全局映射表对应的加载指令。
需要说明的是,在申请对应的待转换的全局映射表的缓存空间时,若缓存空间不足时,则申请失败,释放处理器资源,无法对待转换全局映射表进行加载,无法确定出对应的加载指令,将待转换全局映射表存储到缓存命令队列中进行等待,让待转换全局映射表在缓存命令队列中进行有序的排序,后续在缓存空间容量足够时可以根据缓存命令队列中的指令对对应的待转换全局映射表生成加载指令。
步骤S23,重复执行所述对所述存储单元中存储的全局映射表进行查找以及对所述缓存空间进行申请的步骤,直到所述存储单元的缓存空间使用完毕,确定出多个所述加载指令。
其中,处理器重复上述查找需要进行数据转换的待转换全局映射表以及针对每个待转换全局映射表的容量对存储单元的缓存空间进行申请,缓存空间足够时分配对应的加载指令的步骤,直至缓存空间使用完毕。因此当存储单元中的全局映射表的缓存空间使用完毕时,处理器找出存储单元中多个待转换全局映射表,并确定出与每个待转换全局映射表对应的加载指令。
在上述实施方式中,通过处理器在存储单元中进行重复查找需要进行数据转换的待转换全局映射表的操作,将存储单元中的待转换全局映射表依次查找出来,并确定每一个待转换全局映射表对应的加载指令,能够快速地确定出存储单元中所有待转换全局映射表的加载指令。
请参阅图3,图3为本申请实施例提供的一种随机写的方法的步骤S3的详细流程示意图,该方法包括:
步骤S31,确定出每个所述加载指令对应的所述待转换全局映射表。
其中,处理器根据每个加载指令确定出与其对应的待转换全局映射表,例如从存储单元中的NAND Flash闪存存储器中加载存储在其中的待转换全局映射表。
步骤S32,根据所述加载指令在所述存储单元中加载对应的所述待转换全局映射表。
其中,根据加载指令从存储单元中加载对应的全局映射表,能够将存储单元中多个需 要进行数据转换的待转换全局映射表分别进行加载。
在上述实施例中,通过处理器根据加载指令对待转换全局映射表进行对应的加载,能够将存储单元中的多个待转换全局映射表分别进行加载。
请参阅图4,图4为本申请实施例提供的一种随机写的方法的步骤S4的详细流程示意图,该方法包括:
步骤S41,将加载后的多个所述待转换全局映射表进行批量数据换入。
其中,在处理器的内核中的交错操作资源足够多的情况下,能够满足同时由处理器对加载的所有待转换全局映射表进行批量数据换入,得到多个数据换入后的全局映射表。
示例地,内核的交错操作可以分为两步:一:将存储单元中的待转换全局映射表的数据发送到存储总线中,再由存储总线发送到NAND Flash闪存存储器中;二:将待转换全局映射表的数据从NAND Flash闪存存储器中发送到存储总线中,再由存储总线发回存储单元中,交错操作就是一个片选在进行第一步时,另一个片选在执行第二步,交错操作资源的大小取决于一个通道上闪存的片选的数量。
步骤S42,对数据换入完成后的多个所述待转换全局映射表进行批量数据换出,得到多个所述转换后的全局映射表。
其中,在处理器的内核中的交错操作资源足够多的情况下,能够满足同时由处理器对数据换入后的待转换全局映射表进行批量数据换出,得到多个进行数据转换后的全局映射表。
需要说明的是,数据转换过程包括数据换入和数据换出两个步骤,数据转换的速度由待转换全局映射表的容量大小决定。
例如,处理器按照16个加载指令从存储单元中加载了16个待转换全局映射表,在处理器的内核中的交错操作资源足够多的情况下,处理器能够将16个待转换全局映射表进行批量转换,无需再像现有技术中对待转换全局映射表进行单个查找,查找后进行单个加载和单个转换,再不断重复这个过程,将待转换全局映射表进行批量转换,能够有效的节约全局映射表转换的时间,提高全局映射表的转换效率,从而提高存储单元的随机写性能。
在上述实施方式中,对加载后的待转换全局映射表进行批量数据转换,对加载后的多个待转换全局映射表同时进行处理,能够在多种不同的情况下有效的提高全局映射表的转换效率,提高存储单元的随机写性能。
需要说明的是,上述随机写方法中,待转换全局映射表的容量由所述存储单元的容量进行动态调整,能够根据不同容量等级的存储单元对待转换全局映射表的容量进行计算和调整,存储单元中能够进行数据转换的全局映射表的最大数量由调整后的待转换全局映射表的容量决定。
对待转换全局映射表的容量进行动态调整时,首先,根据所述存储单元的用户逻辑空间容量确定出所述存储单元的参考容量值。
其中,由所述存储单元的用户逻辑空间容量确定出所述存储单元的参考容量值,先将所述存储单元中的总数据块进行数据块清洗,以得到可用数据块,并根据可用数据块,得到所述存储单元的所述用户逻辑空间容量,在基于用户逻辑空间容量的基础上,将存储单元的存储空间划分为不同的几个区间,确定单个区间的参考容量值,参考容量值用于确定所述用户逻辑空间容量所在的区间,参考容量值的大小为该区间的起始容量值,在一些实施例中,由于映射关系大小的原因,针对一些容量小于64GB的存储单元的时,其参考容量值全部为64GB。
示例地,进行数据清洗时,可以在存储单元的总数据块数量的基础上,去除原始损坏的数据块数量、新增损坏的数据块数量、保留给***管理员工作之用的数据块数量、预留空间、***数据块数量和固定在单阶存储单元的高效缓冲存储的数据块数量等数据块之后,根据大规模生产工具中下发的容量配置参数,得出存储单元的用户逻辑空间容量。
其次,再根据所述参考容量值计算出所述待转换全局映射表的容量。
其中,根据参考容量值能够计算出存储单元最终的可用容量值,可用容量值决定最终计算出的待转换全局映射表位于的区间,再根据存储单元中一级表的数据占用空间和可用容量值,计算出到待转换全局映射表的容量大小,由总的待转换全局映射表的容量在存储单元中占有的空间的大小,划分出全局映射表进行数据转换时的资源的大小,确定出存储单元中能够进行数据转换的全局映射表的最大数量。
需要说明的是,在存储单元中的一级表的数据占有空间有限的情况下,根据不同存储单元容量等级,对待转换全局映射表的容量进行调整,能够有效的提高全局映射表的数据转换效率,提高存储单元的随机写性能,且减少了全局映射表的刷新次数,减小存储单元的表项区中的数据磨损程度,提升存储单元的使用寿命和存储单元中数据的可靠性。
在现有技术的操作中,全局映射表的大小一般为32KB,不需要对多个待转换全局映射表进行合并的聚合操作,在正向/反向映射关系数据中假设有8192个数据(item),每个数据都属于不同的全局映射表,设定NAND Flash闪存存储器中的数据吞吐速率为400MT/s,所以在现有技术中一次只能转换一个待转换全局映射表,并不断重复该转换过程,所有待转换全局映射表进行一次数据转换时的时间消耗T=(Trans-SLC+Tconvert+Tprog-SLC)×8192=(0.08+0.32)×8192=3.2768s,其中,Trans-SLC为进行数据换入的时间,Tprog-SLC为进行数据换出的时间,Tconvert为处理器执行软件代码和硬件加速器加速查找实现所有待转换全局映射表的数据转换动作的时间,相比NAND Flash闪存存储器中的读写时间来看,Tconvert的时间可以忽略不计。在每个待转换全局映射表进行单独的转换后都会对全 局映射表进行刷新,对表项区的数据块造成磨损,降低存储单元的使用寿命及数据的可靠性。
在本申请实施例中,能够对加载的所有待转换全局映射表进行同时数据转换,由于能够根据不同的存储单元的容量调节待转换全局映射表的容量,所以全局映射表的容量比现有技术中的容量小,例如8KB,在与现有技术中相同的正向/反向映射关系数据、相同的NAND Flash闪存存储器中的数据吞吐速率为400MT/s,总共转换完成时间T=(Trans-SLC+Tconvert+Tprog-SLC)×8192=(0.08+0.32)×8192/4=0.8192s,在进行数据换出时,可以对待转换全局映射表进行聚合NVMe(Non-Volatile Memory express,标准和信息的开放收集)存储***来对提高数据换出时的效率,将待转换全局映射表进行拆分后再进行数据转换,通过PCIe(Peripheral Component Interconnect express,高速串行计算机扩展总线标准)通道跟处理器直接相连,能够有效的减小数据的延迟。当全局映射表的容量大小为32KB或者64KB时,为一个完整的全局映射表,无需聚合,在对所有待转换全局映射表进行同时转换后会对聚合的全局映射表进行刷新,在本申请实施例中全局映射表的大小可以变为原来的四分之一,以全局映射表原大小32KB为例,原来的四分之一为8KB,此时需要四个完成数据转换的全局映射表才能聚合为一个全局映射表,对全局映射表进行一次刷新,所以8192个正向/反向映射关系的全局映射表刷新的次数为现有技术的1/4,由于每次刷新会对表项区的数据块造成磨损,因此刷新的次数为现有技术的1/4能够降低对表项区的数据块的磨损,能够有效提高存储单元的使用寿命以及数据的可靠性。因此,由于全局映射表容量的减小,在这种情况下全局映射表的转换效率比现有技术中提高了四倍,即存储单元的随机写性能提高了四倍。
在上述实施方式中,在大规模的生产中针对不同容量等级的存储单元,根据存储单元中各种数据的容量,不同存储单元的容量等级中待转换全局映射表的容量进行调整,以确定存储单元中能够进行数据转换的全局映射表的最大数量,并通过调整不同容量等级下的全局映射表的容量,并且对多个待转换全局映射表同时进行处理来提高存储单元的随机写性能。
本申请实施例还提供了一种电子设备,该电子设备包括存储器和处理器,所述存储器中存储有程序指令,所述处理器读取并运行所述程序指令时,执行本实施例提供的一种随机写的方法中任一项所述方法中的步骤。
应当理解是,该电子设备可以是个人电脑(personal computer,PC)、平板电脑、智能手机、个人数字助理(personal digital assistant,PDA)等具有逻辑计算功能的电子设备。
本申请实施例还提供了一种可读取存储介质,所述可读取存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器读取并运行时,执行本实施例提供的一种随机写 的方法中任一项所述方法中的步骤。
综上所述,本申请实施例提供了一种随机写的方法、电子设备和存储介质,通过将存储单元中进行随机写过程中需要进行数据转换的待转换全局映射表进行批量数据转换,对多个待转换全局映射表同时进行处理,减小数据转换所需的时间,提高了全局映射表的数据转换速率,能够在不增加制造成本和晶片面积以及设计复杂度的情况下,提升存储单元的随机写速率和随机写性能。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的框图显示了根据本申请的多个实施例的设备的可能实现的体系架构、功能和操作。在这点上,框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图中的每个方框、以及框图的组合,可以用执行规定的功能或动作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。因此本实施例还提供了一种可读取存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器读取并运行时,执行区块数据存储方法中任一项所述方法中的步骤。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RanDom Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本申请的实施例而已,并不用于限制本申请的保护范围,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟 悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (10)

  1. 一种随机写的方法,其特征在于,所述方法包括:
    监控存储单元中全局映射表的转换指令;
    根据所述转换指令确定出待转换全局映射表的加载指令;
    根据所述加载指令从所述存储单元中加载所述待转换全局映射表;
    将加载后的所述待转换全局映射表进行批量数据转换,以得到转换后的全局映射表。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述转换指令确定出待转换全局映射表的加载指令,包括:
    根据所述转换指令对所述存储单元中存储的全局映射表进行查找,以查找出所述存储单元中的需要进行数据转换的所述待转换全局映射表;
    根据所述转换指令以及查找到的对应的所述待转换全局映射表的容量对所述存储单元的缓存空间进行申请,在申请成功时,确定出所述待转换全局映射表对应的加载指令;
    重复执行所述对所述存储单元中存储的全局映射表进行查找以及对所述缓存空间进行申请的步骤,直到所述存储单元的缓存空间使用完毕,确定出多个所述加载指令。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述加载指令从所述存储单元中加载所述待转换全局映射表,包括:
    确定出每个所述加载指令对应的所述待转换全局映射表;
    根据所述加载指令在所述存储单元中加载对应的所述待转换全局映射表。
  4. 根据权利要求3所述的方法,其特征在于,所述将加载后的所述待转换全局映射表进行批量数据转换,以得到转换后的全局映射表,包括:
    将加载后的多个所述待转换全局映射表进行批量数据换入;
    对数据换入完成后的多个所述待转换全局映射表进行批量数据换出,得到多个所述转换后的全局映射表,其中,所述数据转换包括数据换入和数据换出,所述数据转换的速度由所述待转换全局映射表的容量决定。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    对多个所述转换后的全局映射表进行聚合;
    对聚合后的全局映射表进行刷新,得到刷新后的全局映射表。
  6. 根据权利要求1所述的方法,其特征在于,所述待转换全局映射表的容量由所述存储单元的容量进行动态调整,所述存储单元中能够进行数据转换的全局映射表的最大数量由动态调整后的所述待转换全局映射表的容量决定;
    其中,所述动态调整包括:根据所述存储单元的用户逻辑空间容量确定出所述存储单 元的参考容量值;根据所述参考容量值计算出所述待转换全局映射表的容量。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述存储单元的用户逻辑空间容量确定出所述存储单元的参考容量值,包括:
    将所述存储单元中的总数据块进行数据块清洗,以得到可用数据块;
    根据所述可用数据块,得到所述存储单元的所述用户逻辑空间容量;
    基于所述用户逻辑空间容量将所述存储单元的存储空间划分为不同的区间;
    确定单个区间的参考容量值,其中,所述参考容量值用于确定所述用户逻辑空间容量所在的区间。
  8. 根据权利要求6所述的方法,其特征在于,所述根据所述参考容量值计算出所述待转换全局映射表的容量,包括:
    根据所述参考容量值计算出所述存储单元的可用容量值;
    根据所述存储单元中一级表的数据占用空间和所述可用容量值,计算出所述待转换全局映射表的容量。
  9. 一种电子设备,其特征在于,所述电子设备包括存储器和处理器,所述存储器中存储有程序指令,所述处理器运行所述程序指令时,执行权利要求1-8中任一项所述方法中的步骤。
  10. 一种可读取存储介质,其特征在于,所述可读取存储介质中存储有计算机程序指令,所述计算机程序指令被一处理器运行时,执行权利要求1-8任一项所述方法中的步骤。
PCT/CN2021/127685 2021-03-25 2021-10-29 一种随机写的方法、电子设备及存储介质 WO2022199027A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110323391.0 2021-03-25
CN202110323391.0A CN112882663B (zh) 2021-03-25 2021-03-25 一种随机写的方法、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022199027A1 true WO2022199027A1 (zh) 2022-09-29

Family

ID=76042396

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/127685 WO2022199027A1 (zh) 2021-03-25 2021-10-29 一种随机写的方法、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN112882663B (zh)
WO (1) WO2022199027A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882663B (zh) * 2021-03-25 2022-10-14 湖南国科微电子股份有限公司 一种随机写的方法、电子设备及存储介质
CN114707478B (zh) * 2022-06-06 2022-09-02 飞腾信息技术有限公司 映射表生成方法、装置、设备及存储介质
CN116540950B (zh) * 2023-07-05 2023-09-29 合肥康芯威存储技术有限公司 一种存储器件及其写入数据的控制方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981963A (zh) * 2012-10-30 2013-03-20 华中科技大学 一种固态盘的闪存转换层的实现方法
CN104166634A (zh) * 2014-08-12 2014-11-26 华中科技大学 一种固态盘***中的映射表缓存管理方法
US20140358876A1 (en) * 2013-05-29 2014-12-04 International Business Machines Corporation Managing a multi-version database
CN107832013A (zh) * 2017-11-03 2018-03-23 中国科学技术大学 一种管理固态硬盘映射表的方法
CN109783398A (zh) * 2019-01-18 2019-05-21 上海海事大学 一种基于相关感知页面级ftl固态硬盘性能优化方法
CN110262982A (zh) * 2019-05-05 2019-09-20 杭州电子科技大学 一种固态硬盘地址映射的方法
CN112882663A (zh) * 2021-03-25 2021-06-01 湖南国科微电子股份有限公司 一种随机写的方法、电子设备及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9547589B2 (en) * 2008-06-18 2017-01-17 Super Talent Technology, Corp. Endurance translation layer (ETL) and diversion of temp files for reduced flash wear of a super-endurance solid-state drive
WO2012161659A1 (en) * 2011-05-24 2012-11-29 Agency For Science, Technology And Research A memory storage device, and a related zone-based block management and mapping method
CN103744612A (zh) * 2013-12-17 2014-04-23 记忆科技(深圳)有限公司 基于闪存转换层的精简配置的方法及其***
CN104281535B (zh) * 2014-09-24 2017-11-17 北京兆易创新科技股份有限公司 一种映射表在内存中的处理方法和装置
CN105760776A (zh) * 2016-02-04 2016-07-13 联想(北京)有限公司 一种数据处理方法及电子设备
CN109815166B (zh) * 2018-12-28 2020-10-09 深圳市德明利技术股份有限公司 一种存储数据的动态回收处理方法及存储装置
CN110413228B (zh) * 2019-07-09 2022-10-14 江苏芯盛智能科技有限公司 一种映射表管理方法、***及电子设备和存储介质
CN112559386B (zh) * 2020-12-22 2024-06-18 深圳忆联信息***有限公司 提升ssd性能的方法、装置、计算机设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981963A (zh) * 2012-10-30 2013-03-20 华中科技大学 一种固态盘的闪存转换层的实现方法
US20140358876A1 (en) * 2013-05-29 2014-12-04 International Business Machines Corporation Managing a multi-version database
CN104166634A (zh) * 2014-08-12 2014-11-26 华中科技大学 一种固态盘***中的映射表缓存管理方法
CN107832013A (zh) * 2017-11-03 2018-03-23 中国科学技术大学 一种管理固态硬盘映射表的方法
CN109783398A (zh) * 2019-01-18 2019-05-21 上海海事大学 一种基于相关感知页面级ftl固态硬盘性能优化方法
CN110262982A (zh) * 2019-05-05 2019-09-20 杭州电子科技大学 一种固态硬盘地址映射的方法
CN112882663A (zh) * 2021-03-25 2021-06-01 湖南国科微电子股份有限公司 一种随机写的方法、电子设备及存储介质

Also Published As

Publication number Publication date
CN112882663B (zh) 2022-10-14
CN112882663A (zh) 2021-06-01

Similar Documents

Publication Publication Date Title
WO2022199027A1 (zh) 一种随机写的方法、电子设备及存储介质
US9092321B2 (en) System and method for performing efficient searches and queries in a storage node
US9021189B2 (en) System and method for performing efficient processing of data stored in a storage node
KR101665611B1 (ko) 컴퓨터 시스템 및 메모리 관리의 방법
US20150127691A1 (en) Efficient implementations for mapreduce systems
JP6062121B1 (ja) 単一チャネル内のdram空間合体のための方法および装置
US20200150903A1 (en) Method for executing hard disk operation command, hard disk, and storage medium
CN110941395B (zh) 动态随机存取存储器、内存管理方法、***及存储介质
US11025271B2 (en) Compression of high dynamic ratio fields for machine learning
CN104219318A (zh) 一种分布式文件存储***及方法
US9569381B2 (en) Scheduler for memory
US20170091127A1 (en) Techniques to Couple with a Storage Device via Multiple Communication Ports
US9336135B1 (en) Systems and methods for performing search and complex pattern matching in a solid state drive
WO2021258512A1 (zh) 数据的聚合处理装置、方法和存储介质
CN108932112B (zh) 一种固态颗粒的数据读写方法、装置、设备及介质
CN105426112A (zh) 固态硬盘动态调整高速缓冲区的方法
TWM528459U (zh) 資料儲存系統以及電子裝置
US11429299B2 (en) System and method for managing conversion of low-locality data into high-locality data
CN105930101A (zh) 一种基于闪存固态盘的弱指纹重复数据删除机制
CN105718392A (zh) 细胞阵列文件存储***及其文件存储设备与文件存储方法
US20230176966A1 (en) Methods and apparatus for persistent data structures
CN112214095A (zh) 一种控制硬盘功耗的方法和设备
US8122208B2 (en) System and method for memory architecture configuration
US11907141B1 (en) Flexible dual ranks memory system to boost performance
Liu et al. LazySort: A customized sorting algorithm for non-volatile memory

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: 21932635

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: 21932635

Country of ref document: EP

Kind code of ref document: A1