CN111367464B - Storage space management method and device - Google Patents

Storage space management method and device Download PDF

Info

Publication number
CN111367464B
CN111367464B CN201811595619.6A CN201811595619A CN111367464B CN 111367464 B CN111367464 B CN 111367464B CN 201811595619 A CN201811595619 A CN 201811595619A CN 111367464 B CN111367464 B CN 111367464B
Authority
CN
China
Prior art keywords
block
data
management
linked list
stored
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811595619.6A
Other languages
Chinese (zh)
Other versions
CN111367464A (en
Inventor
庄开锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhaoyi Innovation Technology Group Co ltd
Original Assignee
Zhaoyi Innovation Technology Group Co ltd
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 Zhaoyi Innovation Technology Group Co ltd filed Critical Zhaoyi Innovation Technology Group Co ltd
Priority to CN201811595619.6A priority Critical patent/CN111367464B/en
Publication of CN111367464A publication Critical patent/CN111367464A/en
Application granted granted Critical
Publication of CN111367464B publication Critical patent/CN111367464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Memory System (AREA)

Abstract

The embodiment of the invention provides a storage space management method and a storage space management device, wherein the method comprises the following steps: receiving a data storage instruction; storing the data to be stored in a first Page corresponding to a first management linked list under the condition that the space occupation information is smaller than or equal to a preset space threshold value, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list; and under the condition that the space occupation information is larger than a preset space threshold value, storing the data to be stored in a second Block corresponding to a second management linked list, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list. The embodiment of the invention combines the advantages of Page mapping management and Block mapping management, overcomes the defects of Page mapping management and Block mapping management, and realizes reasonable space management according to requirements in nonvolatile memory space management.

Description

Storage space management method and device
Technical Field
The present invention relates to the field of memory processing technologies, and in particular, to a method and apparatus for managing a storage space.
Background
With the development of various electronic devices, embedded systems, and the like, nonvolatile memory devices are widely used in electronic products. Taking a nonvolatile memory NAND flash memory (NAND Flash Memory) as an example, one NAND flash memory is a device (device), one device may have 2 dies, one Die may be divided into two flash memory slices (planes), one flash memory slice may be divided into 2048 blocks (blocks), one Block may be divided into 256 pages, and one Block may also correspond to 256 WLs (Word lines).
In the prior art, when space management is performed on a nonvolatile memory, the space management can be performed through Block mapping or Page mapping, specifically, the Block mapping is a mapping algorithm taking Block as a unit, and the mapping relation between a logic Block address and a physical Block address is recorded; page mapping is a mapping algorithm taking Page as a unit, and records the mapping relation between logical Page addresses and physical Page addresses.
However, the inventors have found in the course of studying the above-described technical solutions that the above-described technical solutions have the following drawbacks: in Block mapping management, because the Block is taken as a unit, the corresponding storage space is larger in management, and the number of nodes in a Block management linked list is relatively smaller, but when operations such as reading and writing are performed each time, the corresponding space range is larger, and when smaller data are written, a Block is also required to be occupied, so that the space waste is serious; because the Page mapping management is performed by taking pages as units, the corresponding storage space is smaller during management, and the number of nodes in the Page management linked list is relatively more, so that more management space is occupied; in summary, neither mapping method can effectively and reasonably manage the storage space of the nonvolatile memory.
Disclosure of Invention
In view of the above problems, the method and the device for managing the storage space according to the embodiments of the present invention are provided to solve the problem that storage space management is not reasonable enough.
According to a first aspect of the present invention, there is provided a storage space management method applied to a nonvolatile memory, where the nonvolatile memory is preset with at least one first management linked list and at least one second management linked list; the first management linked list is used for managing the mapping relation from the logical Page address to the physical Page address, and the second management linked list is used for managing the mapping relation from the logical Block address to the physical Block address, and the method comprises the following steps:
receiving a data storage instruction; wherein the data storage instruction comprises: space occupation information of data to be stored corresponding to the data storage instruction;
storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to a preset space threshold value, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list;
and storing the data to be stored in a second Block corresponding to the second management linked list under the condition that the space occupation information is larger than a preset space threshold value, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list.
Preferably, the method further comprises:
setting a sequence cache node of a second Block which does not reach a complete Block storage space threshold under the condition that the space occupation of data stored in the second Block does not reach the complete Block storage space threshold;
and recording the nodes in the second Block which do not reach a complete Block storage space threshold in the sequence cache nodes.
And deleting the sequence cache node corresponding to the second Block reaching a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block reaches the complete Block storage space threshold.
Preferably, the preset spatial threshold is 8Mb.
Preferably, the threshold of the storage space of the complete Block is 32Mb, and the threshold of the storage space of the Page is 16Kb.
According to a second aspect of the present invention, there is provided a storage space management apparatus applied to a nonvolatile memory, the nonvolatile memory being preset with at least one first management linked list and at least one second management linked list; the first management linked list is used for managing the mapping relation from the logical Page address to the physical Page address, and the second management linked list is used for managing the mapping relation from the logical Block address to the physical Block address, and the method comprises the following steps:
the data storage instruction receiving module is used for receiving the data storage instruction; wherein the data storage instruction comprises: space occupation information of data to be stored corresponding to the data storage instruction;
the first processing module is used for storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to a preset space threshold value, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list;
and the second processing module is used for storing the data to be stored in a second Block corresponding to the second management linked list under the condition that the space occupation information is larger than a preset space threshold value, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list.
Preferably, the apparatus further comprises:
the sequence cache node setting module is used for setting a sequence cache node of the second Block which does not reach a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block does not reach the complete Block storage space threshold;
and the recording module is used for recording the nodes in the second Block which do not reach the threshold value of the storage space of the complete Block in the sequence cache nodes.
And the deleting module is used for deleting the sequence cache node corresponding to the second Block reaching a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block reaches the complete Block storage space threshold.
Preferably, the preset spatial threshold is 8Mb.
Preferably, the threshold of the storage space of the complete Block is 32Mb, and the threshold of the storage space of the Page is 16Kb.
In the embodiment of the invention, a first management linked list for managing the mapping relation from a logical Page address to a physical Page address and a second management linked list for managing the mapping relation from a logical Block address to a physical Block address are preset in a nonvolatile memory, and according to the comparison relation between the space occupation information of data to be stored and a preset space threshold, the data to be stored can be subjected to Page mapping management by the first management linked list or Block mapping management by the second management linked list, namely, a Block-Page hybrid mapping management scheme is realized, so that reasonable space management can be realized in the nonvolatile memory space management according to requirements. Specifically, after receiving a data storage instruction including space occupation information of data to be stored corresponding to the data storage instruction, comparing the space occupation information with a preset space threshold, storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to the preset space threshold, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list; and under the condition that the space occupation information is larger than a preset space threshold value, storing the data to be stored in a second Block corresponding to the second management linked list, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list, so that the data to be stored with smaller space occupation is managed by Page mapping, and the data to be stored with larger space occupation is managed by Block mapping, thereby combining the advantages of Page mapping management and Block mapping management, overcoming the defects of Page mapping management and Block mapping management, and realizing reasonable space management according to requirements in nonvolatile memory space management.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flowchart of a method for managing storage space according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a Page management example provided in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a Block management example provided in an embodiment of the present invention;
fig. 4 is a block diagram of a storage space management device according to an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, a flowchart of a storage space management method is shown, and the method is applied to a nonvolatile memory, wherein the nonvolatile memory is preset with at least one first management linked list and at least one second management linked list; the first management linked list is used for managing the mapping relation from the logical Page address to the physical Page address, and the second management linked list is used for managing the mapping relation from the logical Block address to the physical Block address.
In the embodiment of the invention, the number of the first management linked lists and the number of the second management linked lists can be set according to actual application scenes, the first management linked list and the second management linked list can be respectively allocated with corresponding nodes according to actual requirements, the nodes of the first management linked list are used for recording the mapping relation from the logical Page address corresponding to the data to be stored to the physical Page address, and the nodes of the second management linked list are used for recording the mapping relation from the logical Block address corresponding to the data to be stored to the physical Block address.
The method specifically comprises the following steps:
step 101: receiving a data storage instruction; wherein the data storage instruction comprises: and the data storage instruction corresponds to the space occupation information of the data to be stored.
In the embodiment of the invention, the data storage instruction can be used for indicating that data to be stored is to be stored, the data to be stored can be called as data to be stored, and the data storage instruction comprises space occupation information of the data to be stored.
Step 102: and storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to a preset space threshold value, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list.
In the embodiment of the present invention, the specific value of the preset spatial threshold may be set according to the actual requirement, which is not particularly limited in the embodiment of the present invention.
In a preferred embodiment, the inventors found that in a practical preferred application, a full Block memory threshold is 32Mb and a Page memory threshold is 16Kb; therefore, the preset space threshold value is set to be larger than 16Kb and smaller than 32Mb, so that a good management effect can be achieved. Preferably, the inventor finds through a great number of experiments that the space management effect can be greatly improved when the preset space threshold is 8Mb, namely one fourth of the whole Block storage space threshold.
In the embodiment of the invention, page mapping management can be adopted when the space occupation information is smaller than or equal to the preset space threshold, specifically, the data to be stored is stored in a first Page corresponding to a first management linked list, and a first mapping relation from a logical Page address to a physical Page address of the data to be stored is recorded through a first node in the first management linked list.
In a specific application, the number of the first pages, the number of the first nodes and the like may be set according to an actual application scenario, for example, a part of space of the nonvolatile memory may be set as a Page mapping management space, and when Page mapping management is adopted, data to be stored may be adaptively stored in the Page mapping management space.
For example, referring to fig. 2, a Page mapping relationship is shown, which may have 3 first management linked lists, illustrated from left to right, where node rdmbiffer 0 records: a mapping relationship between one of the first logical Page addresses LPA0 and one of the first physical Page addresses PPA 0; in the second first management linked list from left, the node Rdm Buffer1 records: one of the logical addresses LPN1 in the first logical Page address LPA0 is mapped with one of the physical addresses PPA1 in the first physical Page address PPA0, and one of the logical addresses LPN0 in the second logical Page address LPA N is mapped with one of the physical addresses PPA1 in the second physical Page address PPA N; in the third first management linked list from left, the node Rdm Buffer N records: a mapping relationship between one of the second logical Page addresses LPA N LPN1 and one of the second physical Page addresses PPA 0.
Step 103: and storing the data to be stored in a second Block corresponding to the second management linked list under the condition that the space occupation information is larger than a preset space threshold value, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list.
In the embodiment of the invention, when the space occupation information is larger than the preset space threshold, block mapping management can be adopted, specifically, the data to be stored is stored in a second Block corresponding to a second management linked list, and a first mapping relation from a logic Block address to a physical Block address of the data to be stored is recorded through a second node in the second management linked list.
In a specific application, the number of the second blocks, the number of the second nodes and the like may be set according to an actual application scenario, for example, a part of space of the nonvolatile memory may be set as a Block mapping management space, and when Block mapping management is adopted, data to be stored may be adaptively stored in the Block mapping management space.
For example, referring to fig. 3, a Block mapping diagram is shown, where each column may represent a second management linked list, and illustrated from left to right, in the first second management linked list from left, node Block Entry 0 records: mapping relation between the first logic Block address LBA0 and the first physical Block address PBA 0; in the second management linked list from the left, the node Block Entry 1 records: mapping relation between the second logical Block address LBA1 and the second physical Block address PBA 1; and so on.
As a preferred mode of the embodiment of the present invention, the method further includes: steps A1 to A3:
step A1: and setting a sequence cache node of the second Block which corresponds to the condition that the space occupation of the data stored in the second Block does not reach a complete Block storage space threshold.
Step A2: and recording the nodes in the second Block which do not reach a complete Block storage space threshold in the sequence cache nodes.
Step A3: and deleting the sequence cache node corresponding to the second Block reaching a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block reaches the complete Block storage space threshold.
In the embodiment of the invention, the phenomenon that some data with space occupation not reaching a complete Block storage space threshold occupies one Block is considered to occur even if the data which is larger than the preset space threshold is subjected to Block mapping management, so that scattered fragment spaces exist in the Block, and certain waste is still caused to the Block space. Therefore, under the condition that the space occupation of the data stored in the second Block does not reach a complete Block storage space threshold, setting a sequence cache node corresponding to the second Block which does not reach the complete Block storage space threshold, recording a node in the second Block which does not reach the complete Block storage space threshold in the sequence cache node, recording space occupation information of the data stored in the Block in the node, and selecting the second Block which does not reach the complete Block storage space threshold for storage according to the record in the sequence cache node when new data which does not reach the complete Block storage space threshold is stored. For example, referring to fig. 3, in the first and second management linked lists from the left, the sequence Buffer nodes Seq Buffer0 and Seq Buffer1 are correspondingly set.
It can be understood that, under the condition that the space occupation of the data stored in the second Block reaches a complete Block storage space threshold, the sequence cache node corresponding to the second Block reaching the complete Block storage space threshold can be deleted without recording through the sequence cache node. For example, referring to fig. 3, there are no sequence cache nodes in the third and fourth second management linked lists from the left.
In summary, in the embodiment of the present invention, a first management linked list for managing a mapping relationship from a logical Page address to a physical Page address and a second management linked list for managing a mapping relationship from a logical Block address to a physical Block address are preset in a nonvolatile memory, and according to a comparison relationship between space occupation information of data to be stored and a preset space threshold, page mapping management can be performed on the data to be stored by the first management linked list, or Block mapping management can be performed by the second management linked list, so that a Block-Page hybrid mapping management scheme is implemented, and reasonable space management can be implemented in space management of the nonvolatile memory according to requirements. Specifically, after receiving a data storage instruction including space occupation information of data to be stored corresponding to the data storage instruction, comparing the space occupation information with a preset space threshold, storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to the preset space threshold, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list; and under the condition that the space occupation information is larger than a preset space threshold value, storing the data to be stored in a second Block corresponding to the second management linked list, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list, so that the data to be stored with smaller space occupation is managed by Page mapping, and the data to be stored with larger space occupation is managed by Block mapping, thereby combining the advantages of Page mapping management and Block mapping management, overcoming the defects of Page mapping management and Block mapping management, and realizing reasonable space management according to requirements in nonvolatile memory space management.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required for the present invention.
Referring to fig. 4, there is shown a block diagram of a memory space management apparatus applied to a nonvolatile memory, which is preset with at least one first management linked list and at least one second management linked list; the first management linked list is used for managing the mapping relation from the logical Page address to the physical Page address, and the second management linked list is used for managing the mapping relation from the logical Block address to the physical Block address, and the method comprises the following steps:
a data storage instruction receiving module 210, configured to receive a data storage instruction; wherein the data storage instruction comprises: space occupation information of data to be stored corresponding to the data storage instruction;
the first processing module 220 is configured to store the data to be stored in a first Page corresponding to the first management linked list, and record, through a first node in the first management linked list, a first mapping relationship from a logical Page address to a physical Page address of the data to be stored, when the space occupation information is less than or equal to a preset space threshold;
and the second processing module 230 is configured to store the data to be stored in a second Block corresponding to the second management linked list, and record, by using a second node in the second management linked list, a second mapping relationship from a logical Block address to a physical Block address of the data to be stored, where the space occupation information is greater than a preset space threshold.
Preferably, the apparatus further comprises:
the sequence cache node setting module is used for setting a sequence cache node of the second Block which does not reach a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block does not reach the complete Block storage space threshold;
and the recording module is used for recording the nodes in the second Block which do not reach the threshold value of the storage space of the complete Block in the sequence cache nodes.
And the deleting module is used for deleting the sequence cache node corresponding to the second Block reaching a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block reaches the complete Block storage space threshold.
Preferably, the preset spatial threshold is 8Mb.
Preferably, the threshold of the storage space of the complete Block is 32Mb, and the threshold of the storage space of the Page is 16Kb.
In summary, in the embodiment of the present invention, a first management linked list for managing a mapping relationship from a logical Page address to a physical Page address and a second management linked list for managing a mapping relationship from a logical Block address to a physical Block address are preset in a nonvolatile memory, and according to a comparison relationship between space occupation information of data to be stored and a preset space threshold, page mapping management can be performed on the data to be stored by the first management linked list, or Block mapping management can be performed by the second management linked list, so that a Block-Page hybrid mapping management scheme is implemented, and reasonable space management can be implemented in space management of the nonvolatile memory according to requirements. Specifically, after receiving a data storage instruction including space occupation information of data to be stored corresponding to the data storage instruction, comparing the space occupation information with a preset space threshold, storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to the preset space threshold, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list; and under the condition that the space occupation information is larger than a preset space threshold value, storing the data to be stored in a second Block corresponding to the second management linked list, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list, so that the data to be stored with smaller space occupation is managed by Page mapping, and the data to be stored with larger space occupation is managed by Block mapping, thereby combining the advantages of Page mapping management and Block mapping management, overcoming the defects of Page mapping management and Block mapping management, and realizing reasonable space management according to requirements in nonvolatile memory space management.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
In a typical configuration, the computer device includes one or more processors (CPUs), an input/output interface, a network interface, and memory. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media. Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include non-transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable memory space management terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable memory space management terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable storage space management terminal apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable memory space management terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a storage space management method and a storage space management device according to the present invention, and specific examples have been used herein to illustrate the principles and embodiments of the present invention, where the foregoing examples are provided to assist in understanding the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. The storage space management method is characterized by being applied to a nonvolatile memory, wherein the nonvolatile memory is preset with at least one first management linked list and at least one second management linked list; the first management linked list is used for managing the mapping relation from the logical Page address to the physical Page address, and the second management linked list is used for managing the mapping relation from the logical Block address to the physical Block address, and the method comprises the following steps:
receiving a data storage instruction; wherein the data storage instruction comprises: space occupation information of data to be stored corresponding to the data storage instruction;
storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to a preset space threshold value, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list;
and storing the data to be stored in a second Block corresponding to the second management linked list under the condition that the space occupation information is larger than a preset space threshold value, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list.
2. The method according to claim 1, wherein the method further comprises:
setting a sequence cache node of a second Block which does not reach a complete Block storage space threshold under the condition that the space occupation of data stored in the second Block does not reach the complete Block storage space threshold;
and recording the nodes in the second Block which do not reach a complete Block storage space threshold in the sequence cache nodes.
3. The method as recited in claim 2, further comprising:
and deleting the sequence cache node corresponding to the second Block reaching a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block reaches the complete Block storage space threshold.
4. A method according to claim 3, wherein the predetermined spatial threshold is 8Mb.
5. A method according to claim 3, wherein the one full Block memory threshold is 32Mb and the Page memory threshold is 16Kb.
6. The storage space management device is characterized by being applied to a nonvolatile memory, wherein the nonvolatile memory is preset with at least one first management linked list and at least one second management linked list; the first management linked list is used for managing the mapping relation from the logical Page address to the physical Page address, and the second management linked list is used for managing the mapping relation from the logical Block address to the physical Block address, and the method comprises the following steps:
the data storage instruction receiving module is used for receiving the data storage instruction; wherein the data storage instruction comprises: space occupation information of data to be stored corresponding to the data storage instruction;
the first processing module is used for storing the data to be stored in a first Page corresponding to the first management linked list under the condition that the space occupation information is smaller than or equal to a preset space threshold value, and recording a first mapping relation from a logical Page address to a physical Page address of the data to be stored through a first node in the first management linked list;
and the second processing module is used for storing the data to be stored in a second Block corresponding to the second management linked list under the condition that the space occupation information is larger than a preset space threshold value, and recording a second mapping relation from a logic Block address to a physical Block address of the data to be stored through a second node in the second management linked list.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the sequence cache node setting module is used for setting a sequence cache node of the second Block which does not reach a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block does not reach the complete Block storage space threshold;
and the recording module is used for recording the nodes in the second Block which do not reach the threshold value of the storage space of the complete Block in the sequence cache nodes.
8. The apparatus as recited in claim 7, further comprising:
and the deleting module is used for deleting the sequence cache node corresponding to the second Block reaching a complete Block storage space threshold under the condition that the space occupation of the data stored in the second Block reaches the complete Block storage space threshold.
9. The apparatus of claim 8, wherein the predetermined spatial threshold is 8Mb.
10. The apparatus of claim 8 wherein the one full Block memory threshold is 32Mb and the Page memory threshold is 16Kb.
CN201811595619.6A 2018-12-25 2018-12-25 Storage space management method and device Active CN111367464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811595619.6A CN111367464B (en) 2018-12-25 2018-12-25 Storage space management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811595619.6A CN111367464B (en) 2018-12-25 2018-12-25 Storage space management method and device

Publications (2)

Publication Number Publication Date
CN111367464A CN111367464A (en) 2020-07-03
CN111367464B true CN111367464B (en) 2024-02-20

Family

ID=71206067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811595619.6A Active CN111367464B (en) 2018-12-25 2018-12-25 Storage space management method and device

Country Status (1)

Country Link
CN (1) CN111367464B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905122B (en) * 2021-02-20 2024-04-09 炬芯科技股份有限公司 Method and device for storing data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559138A (en) * 2013-10-09 2014-02-05 华为技术有限公司 Solid state disk (SSD) and space management method thereof
CN106354658A (en) * 2016-08-29 2017-01-25 成都三零嘉微电子有限公司 Method for reducing memory resource occupation of mapping tables in hybrid mapping algorithm
CN108572792A (en) * 2017-06-13 2018-09-25 北京金山云网络技术有限公司 Date storage method, device, electronic equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI599880B (en) * 2016-03-22 2017-09-21 威盛電子股份有限公司 Non-volatile memory apparatus and operating method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559138A (en) * 2013-10-09 2014-02-05 华为技术有限公司 Solid state disk (SSD) and space management method thereof
CN106354658A (en) * 2016-08-29 2017-01-25 成都三零嘉微电子有限公司 Method for reducing memory resource occupation of mapping tables in hybrid mapping algorithm
CN108572792A (en) * 2017-06-13 2018-09-25 北京金山云网络技术有限公司 Date storage method, device, electronic equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
晏敏 ; 龙小奇 ; 章兢 ; 侯志春 ; 何敏 ; .开放式大容量NAND Flash数据存储系统设计与实现.微电子学与计算机.2009,(11),全文. *

Also Published As

Publication number Publication date
CN111367464A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN104679661B (en) hybrid storage control method and hybrid storage system
US9317214B2 (en) Operating a memory management controller
CN109753443B (en) Data processing method and device and electronic equipment
US10389380B2 (en) Efficient data path architecture for flash devices configured to perform multi-pass programming
CN103984644A (en) Data management method and device
KR20210003946A (en) Logical-physical data structure
CN113282249A (en) Data processing method, system, device and medium
CN111367464B (en) Storage space management method and device
CN110851434B (en) Data storage method, device and equipment
CN109144403B (en) Method and equipment for switching cloud disk modes
US9524124B2 (en) Semiconductor device
CN109508140B (en) Storage resource management method and device, electronic equipment and system
CN111367461B (en) Storage space management method and device
CN111367463B (en) Storage space management method and device
US9600415B1 (en) Method, apparatus, and computer program stored in computer readable medium for managing storage server in database system
CN110837338A (en) Storage index processing method and device
CN111367462B (en) Data processing method and device
CN109582938B (en) Report generation method and device
CN110737405A (en) Method and device for realizing word data storage based on solid state disk
CN111444114A (en) Method, device and system for processing data in nonvolatile memory
CN112486416B (en) Data processing method, device, storage medium and processor
CN118132600A (en) Data processing method and device, electronic equipment and storage medium
CN112241376A (en) Cache data updating method and device, storage medium and computer equipment
CN117555476A (en) Distributed storage system and data writing, reading and erasing method thereof
CN110634524A (en) Nonvolatile memory erasing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 101, Floor 1-5, Building 8, Yard 9, Fenghao East Road, Haidian District, Beijing 100094

Applicant after: Zhaoyi Innovation Technology Group Co.,Ltd.

Address before: 100083 12 Floors, Block A, Tiangong Building, Science and Technology University, 30 College Road, Haidian District, Beijing

Applicant before: GIGADEVICE SEMICONDUCTOR(BEIJING) Inc.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant