CN110781101A - One-to-many mapping relation storage method and device, electronic equipment and medium - Google Patents

One-to-many mapping relation storage method and device, electronic equipment and medium Download PDF

Info

Publication number
CN110781101A
CN110781101A CN201911025169.1A CN201911025169A CN110781101A CN 110781101 A CN110781101 A CN 110781101A CN 201911025169 A CN201911025169 A CN 201911025169A CN 110781101 A CN110781101 A CN 110781101A
Authority
CN
China
Prior art keywords
block address
logical block
storage page
address storage
storing
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.)
Pending
Application number
CN201911025169.1A
Other languages
Chinese (zh)
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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology 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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201911025169.1A priority Critical patent/CN110781101A/en
Publication of CN110781101A publication Critical patent/CN110781101A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • G06F12/0653Configuration or reconfiguration with centralised address assignment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a storage method of one-to-many mapping relation, aiming at the condition that a plurality of corresponding logical block addresses exist in the same physical block address, firstly, a logical block address storage page related to the physical block address is created, namely, a plurality of different logical block addresses corresponding to the physical block address are stored in a unified mode by using pages capable of storing a plurality of contents, and in order to store more logical block addresses as far as possible, only all the logical block addresses are stored in the logical block address storage page. By applying the scheme of the application, the problems that in the prior art, due to the deduplication function, a B + tree stores more corresponding relations in a mode of creating a plurality of same tree nodes, so that the uniqueness requirement which needs to be met by a standard B + tree is lost, and the retrieval is neglected or slow in speed under the condition that the uniqueness is not met can be solved. The application also discloses a storage device, electronic equipment and a readable storage medium with one-to-many mapping relationship, and the beneficial effects are achieved.

Description

One-to-many mapping relation storage method and device, electronic equipment and medium
Technical Field
The present application relates to the field of full flash storage technologies, and in particular, to a method and an apparatus for storing a one-to-many mapping relationship, an electronic device, and a readable storage medium.
Background
In order to maximize data storage performance and optimize security, a method of adopting a full flash memory technology in combination with an SSD (solid state disk) to optimize a software stack in a software-defined manner to achieve a goal of seamless connection with an adaptive SSD disk has appeared.
The metadata management module is a very important functional module in the full flash memory storage software stack, and because the metadata is data describing data and is data with a wider data scope than general meaning (not only representing information such as types, names and values of the data, but also further providing context information of the data, such as a domain to which the data belongs, a data source and the like), how to effectively manage the metadata and use the metadata is a very worth discussing in the field of optimizing the full flash memory storage software stack.
In the full flash storage, a very important characteristic is a deduplication function, which is to store only one copy of repeated data on the SSD, so that the deduplication function can greatly save the space of the SSD, and achieve the function of capacity reduction. However, the deduplication function may also generate a mapping relationship between multiple LBA addresses (Logical Block Address Logical Block addresses) and one PBA Address (Physical Block Address Physical Block addresses). Under certain specific scenes, a large number of different logical block addresses pointing to the same physical block address exist, and the standard B + tree cannot well store the one-to-many mapping relationship between the P-L, so that the requirement for rapidly searching the corresponding relationship of the key-value pair of the P-L cannot be met.
Therefore, how to overcome the above-mentioned drawbacks of the prior art is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a one-to-many mapping relation storage method, a one-to-many mapping relation storage device, an electronic device and a readable storage medium, so that the one-to-many mapping relation stored by a B + tree can be correctly retrieved, the design standard of the B + tree is met, and a series of problems caused by wrong retrieval are reduced.
In order to achieve the above object, the present application provides a method for storing a one-to-many mapping relationship, including:
obtaining a plurality of different logical block addresses corresponding to the same physical block address;
creating a logical block address storage page associated with the physical block address;
and only storing each logic block address into the logic block address storage page respectively to obtain a one-to-many mapping relation formed between each physical block address and each logic block address stored in the logic block address storage page.
Optionally, when all of the logical block addresses cannot be stored in a unique logical block address storage page, the method further includes:
creating a second logical block address storage page;
storing the address of the second logical block address storage page as a last item of a link address in a first logical block address storage page; the first logical block address storage page is a logical block address storage page which establishes a direct association relation with the physical block address;
and respectively storing the rest of the logical block addresses to the second logical block address storage pages.
Optionally, the method for storing the one-to-many mapping relationship further includes:
an additional identification is appended to the logical block address storage page associated with another logical block address storage page of the lower layer.
Optionally, the method for storing the one-to-many mapping relationship further includes:
monitoring the residual number of the logical block addresses in the logical block address storage page;
and when the residual number is less than the number which can be accommodated by the standard B + tree structure, storing each logical block address by using the standard B + tree to store the mapping relation between the logical block address and the physical block address.
To achieve the above object, the present application also provides a storage device for one-to-many mapping relationship, the storage device comprising:
a multiple logical block address acquisition unit for acquiring a plurality of different logical block addresses corresponding to the same physical block address;
a logical block address storage page creation unit for creating a logical block address storage page associated with the physical block address;
and the multi-logical block address storage unit is used for storing the logical block addresses into the logical block address storage pages respectively to obtain a one-to-many mapping relation formed between the physical block addresses and the logical block addresses stored in the logical block address storage pages respectively.
Optionally, the storage device for one-to-many mapping relationship further includes:
a second logical block address storage page creation unit configured to create a second logical block address storage page when all of the logical block addresses cannot be stored in a unique logical block address storage page;
the logical block address storage page address association storage unit is used for storing the address of the second logical block address storage page as a last item of a link address in the first logical block address storage page; the first logical block address storage page is a logical block address storage page which establishes a direct association relation with the physical block address;
and the logic block address splitting storage unit is used for respectively storing the rest logic block addresses to the second logic block address storage page.
Optionally, the storage device for one-to-many mapping relationship further includes:
an additional identification appending unit for appending an additional identification to a logical block address storage page associated with another logical block address storage page of the lower layer.
Optionally, the storage device for one-to-many mapping relationship further includes:
the residual number monitoring unit is used for monitoring the residual number of the logical block addresses in the logical block address storage page;
and the common mode switching unit is used for switching to the mode of storing the mapping relation between the logical block address and the physical block address by the standard B + tree when the residual number is less than the number which can be accommodated by the standard B + tree structure, and storing each logical block address.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the storage method of the one-to-many mapping relationship as described above when the computer program is executed.
To achieve the above object, the present application further provides a readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the storage method of the one-to-many mapping relationship as described above.
The application provides a one-to-many mapping relation storage method, which comprises the following steps: obtaining a plurality of different logical block addresses corresponding to the same physical block address; creating a logical block address storage page associated with the physical block address; and storing the logical block addresses into the logical block address storage pages respectively to form mapping relation between each different logical block address and the same physical block address.
Obviously, for the case that a plurality of logical block addresses corresponding to the same physical block address exist, different from the existing storage mode of the one-to-many mapping relation on the B + tree, the application firstly creates a logical block address storage page associated with the physical block address, namely, a plurality of different logical block addresses corresponding to the physical block address are uniformly stored by using pages capable of storing a plurality of contents, and in order to store more logical block addresses as far as possible, the logical block address storage page only stores each logical block address, but not simultaneously stores the logical block address and the physical block address in the prior art. By applying the scheme of the application, the problems that in the prior art, under the condition that the same physical block address corresponds to more different logical block addresses due to the deduplication function, more corresponding relations are stored in the B + tree in a mode of creating a plurality of same tree nodes, so that the uniqueness requirement required to be met by the standard B + tree is lost, and the search is neglected or slow in speed under the condition that the uniqueness is not met can be solved.
The application also provides a storage device, an electronic device and a readable storage medium with one-to-many mapping relationship, which have the beneficial effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a process for accessing metadata in a full flash memory technology;
FIG. 2 is a schematic diagram of a B + tree structure;
FIG. 3 is a diagram illustrating the structure of a B + tree containing specific content;
fig. 4 is a flowchart of a method for storing a one-to-many mapping relationship according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a novel B + tree corresponding to the scheme in fig. 4 according to an embodiment of the present application;
FIG. 6 is a flowchart of a method for serially storing more LBAs by using multiple LBA pages according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a novel B + tree corresponding to the scheme in fig. 6 according to an embodiment of the present application;
fig. 8 is a flowchart illustrating a method for adjusting storage of one-to-many mapping relationships according to the remaining number of logical block addresses according to an embodiment of the present application;
fig. 9 is a block diagram of a structure of a storage device with a one-to-many mapping relationship according to an embodiment of the present application.
Detailed Description
The application aims to provide a one-to-many mapping relation storage method, a one-to-many mapping relation storage device, an electronic device and a readable storage medium, so that the one-to-many mapping relation stored by a B + tree can be correctly retrieved, the design standard of the B + tree is met, and a series of problems caused by wrong retrieval are reduced.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
To facilitate understanding of the solution provided in the present application, the present application first introduces a flow of accessing metadata in a full flash storage technology, please refer to the schematic flow diagram shown in fig. 1:
as can be seen from fig. 1, when a data query request queries corresponding data, the system will first query the metadata to find the mapping relationship between the logical block address and the physical block address of the target data (i.e., the mapping relationship of L-P). In the process, a metadata cache is firstly accessed, if corresponding metadata is found in the cache, the metadata is directly verified and returned as a response of the data query request, otherwise, the metadata is queried on an SSD, the queried metadata is also verified and returned as a response to the data query request, and finally, an initiating end initiating the data query request obtains the target data according to the received physical block address of the response of the mapping relation.
According to the above-mentioned role played by the metadata and the mapping relation in the I/O processing process, in order to support the effective search of the metadata object in the full flash memory, a suitable index structure is required to support, so as to obtain a better search performance. The B + tree index has a lookup time complexity of O (logn) and a space usage of 50% (non-leaf nodes as index nodes, not as nodes to hold data); when the B + tree is queried, the root node is traversed downwards step by step until reaching the leaf node, so that the important node in the query process is the most frequently accessed node when the leaf node is not, the lower the hierarchy, the higher the access frequency of the node is, the better search efficiency of the B + tree is seen in the aggregate, and the B + tree is more suitable for organizing metadata objects, so that the B + number is widely used in the field for storing the mapping relation between L-P.
A B + tree representation can be seen in the schematic structure diagram shown in FIG. 2, wherein the 0 th layer has two root nodes of 8 and 15, the first layer has a plurality of non-leaf nodes between 0-8 and 9-15 below 8 and 15, respectively, wherein 2, 5 and 8 are between 0-8, and 11 and 15 are between 9-15. The second layer has leaf nodes 1, 2, 3, 5, 6, 8, 9, 11, 13, 15 below 2, 5, 8, 11, and 15, respectively. Wherein, 1 and 2 are leaf nodes of non-leaf node 2 because between 0 ~ 2, 3 and 5 are leaf nodes of non-leaf node 5 because between 3 ~ 5, and others are analogized in turn, and are not repeated one by one.
As shown in the schematic diagram of fig. 2, the present application further provides a specific B + tree according to the existing B + tree storage mapping relationship by combining with the actual application scenario, please refer to fig. 3. As can be seen from fig. 3, at the intermediate node level, there are two Pt, because there are too many different logical block addresses corresponding to Pt, which is a physical block address, due to the deduplication function. Under the design standard of the existing B + tree, the number of leaf nodes governed by each intermediate node has an upper limit, and once the number limit is exceeded, only one intermediate node representing the same physical block address can be established again, so that the number of the leaf nodes is indirectly increased by increasing the number of the intermediate nodes, and all the logical block addresses are saved. However, it is obvious that this method causes a plurality of identical intermediate nodes, and when the uniqueness is not satisfied, it may not be known which intermediate node the search should be performed under, which may cause omission, and may cause the overall efficiency of the search to be low. Moreover, the same index value causes difficulty for subsequent operations such as insertion and deletion of the B + tree, and the original algorithm must be modified.
Example one
Referring to fig. 4, fig. 4 is a flowchart of a one-to-many mapping relationship storage method according to an embodiment of the present application, including the following steps:
s101: obtaining a plurality of different logical block addresses corresponding to the same physical block address;
this step aims to acquire a plurality of logical block addresses corresponding to the same physical block address, that is, to find a case where a mapping relationship needs to be formed in a one-to-many manner.
S102: creating a logical block address storage page associated with a physical block address;
on the basis of S101, this step is intended to create a logical block address storage page associated with the physical block address. Different from the prior art that the mapping relationship is stored by a plurality of leaf nodes respectively associated with the physical block address, the application provides a method for establishing only one logical block address storage page associated with the physical block address so as to uniformly store all the logical block addresses corresponding to the physical block address. The function of the role of storing pages according to the logical block address may also be referred to as "overflow pages".
In brief, according to the design standard of the existing B + tree, an intermediate node establishes an association relationship with leaf nodes whose number does not exceed the upper limit, thereby forming a corresponding relationship between a plurality of logical block addresses and physical block addresses, so that it is limited by the limit of the maximum number of nodes, and the existing implementation method of adding a same intermediate node has a defect. The reason for this problem is that the existing B + tree cannot store logical block addresses whose number exceeds the maximum number of nodes on the basis of satisfying uniqueness, so the present application provides an implementation manner for creating a logical block address storage page for uniformly storing a plurality of different logical block addresses so as to store the mapping relationship on the premise of not exceeding the limit of the maximum number of nodes. Assuming that A, B, C three LBAs all correspond to PBA, the prior art is realized by constructing three mapping relationships of A-X, B-X and C-X, which correspond to the connection lines between the A, B, C three leaf nodes as the lower node of X and X, respectively, whereas A, B, C is stored in the LBA page at the same time, which only has a single connection line with the PBA, i.e. the scheme of the present application also stores three mapping relationships of A-X, B-X and C-X in a manner similar to (A + B + C) xX and in a manner of only one association.
S103: and storing the logical block addresses into the logical block address storage pages respectively to obtain a one-to-many mapping relation formed by the physical block addresses and the logical block addresses stored in the logical block address storage pages respectively.
On the basis of S102, this step defines that only logical block addresses each corresponding to the physical block address are stored in the logical block address storage page, thereby saving as much as possible the limited storage space of the logical block address storage page, so that as many logical block addresses as possible can be stored.
As can be seen from the schematic diagram shown in fig. 3, when the B + tree is used to store the physical block address and the logical block address, the leaf node under the physical block address as the intermediate node does not only include the logical block address corresponding to the physical block address, because the physical block address of the intermediate node does not only represent itself, but also represents a critical value, thereby forming a physical block address range with another critical value, so the physical block address in the lower node as the intermediate node can include not only itself, but also other physical block addresses in the range, as shown in fig. 3, which is why the corresponding physical block address and logical block address are stored in the leaf node of the existing B + tree at the same time, because only this can the mapping relationship be accurately stored. In fig. 3, since the intermediate node of "Ph" and the one intermediate node "Pd" on the left side thereof are "Pe to Ph", the leaf nodes of "Ph" have coverage ranges of "Pe to Ph", and the logical block addresses "L9", "La", "Lb" corresponding to "Pf", "Pg", and "Ph" are stored in the leaf nodes thereof, respectively. It should be appreciated that leaf nodes have very limited storage space, and thus, when each piece of information contains more information, this results in fewer pieces being stored. Since only the logical block addresses are stored, at least twice as much information as that stored in a single leaf node can be stored in the logical block address storage page in the same position as the leaf nodes.
Therefore, the scheme provided by the application is suitable for the situation that a certain physical block address corresponds to more logical block addresses, and mainly aims to overcome a series of problems caused by the fact that the existing solution can cause the uniqueness to be not met. Therefore, referring to the schematic diagram of fig. 5 obtained by adjusting fig. 3 after applying the scheme provided by the present application, as shown in fig. 5, for a large number of logical block addresses that all have a mapping relationship with the physical block address "Pt", the present application creates a logical block address storage page associated with the "Pt", where only all logical block addresses corresponding to the "Pt" are stored in the logical block address storage page, and since the logical block address storage page only corresponds to one leaf node of the "Pt", that is, all logical block addresses are stored only by the name of one leaf node, the possibility that the maximum node number is exceeded is significantly reduced, thereby achieving the purpose of ensuring that only one "Pt" node exists.
As can be seen from the above description of the storage method of one-to-many mapping relationship provided in this embodiment, in the case where there are multiple corresponding logical block addresses for the same physical block address, unlike the existing storage method of one-to-many mapping relationship in the B + tree, in this embodiment, a logical block address storage page associated with the physical block address is first created, that is, multiple different logical block addresses corresponding to the physical block address are stored in a unified manner by using a page capable of storing multiple contents, and in order to store as many logical block addresses as possible, only each logical block address is stored in the logical block address storage page, instead of storing both logical block addresses and physical block addresses in the prior art. By applying the scheme of the embodiment, the problems that in the prior art, under the condition that the same physical block address corresponds to more different logical block addresses due to the deduplication function, more corresponding relations are stored in the B + tree in a mode of creating a plurality of same tree nodes, so that the uniqueness requirement which needs to be met by the standard B + tree is lost, and the search is neglected or slow in speed under the condition that the uniqueness is not met can be solved.
The P-L one-to-many mapping relation storage function can be well met by adopting the B + tree designed by the method, and the searching efficiency is hardly reduced; therefore, the method can obtain efficient metadata access, so that the availability of data organization is higher, the effectiveness of data is increased, and the system efficiency is improved.
In the case that a certain physical block address may correspond to a large number of different logical block addresses, a single logical block address storage page may not be completely stored due to information capacity limitation. To solve the problem, the present application provides a method for storing more logical block addresses in a concatenated manner by using a plurality of logical block address storage pages as shown in fig. 6, which includes the following steps:
s201: creating a second logical block address storage page;
s202: storing the address of the second logical block address storage page as a last item of the link address in the first logical block address storage page;
the first logical block address storage page is a logical block address storage page which establishes a direct association relation with a physical block address.
S203: and respectively storing the rest logic block addresses to a second logic block address storage page.
For easy understanding, referring to the schematic diagram shown in fig. 7 processed according to this embodiment, it can be seen that the second logical block address storage page and the first logical block address storage page form a page-by-page chain by concatenation in a manner that an address leading to the second logical block address storage page is written in the last entry of the first logical block address storage page. According to the mode, a plurality of different logical block address storage pages can be sequentially connected in series, so that the storage of a great amount of logical block addresses is completed, and a correct mapping relation is formed.
Correspondingly, the search will be sequentially performed from the first logical block address storage page to the second logical block address storage page in a traversal mode.
Furthermore, in order to facilitate the knowledge of whether another serially connected logical block address storage page exists, an additional identifier may be attached to the logical block address storage page associated with another logical block address storage page of the lower layer, so as to quickly determine whether the additional identifier is attached. Furthermore, the method can also make the additional identifier have the effect of identifying how many other logical block address storage pages are also connected in series below the current logical block address storage page in a different additional identifier manner.
On the basis of any of the above embodiments, due to the change of data, the mapping relationship will be increased and decreased, and for the case that the number of logical block addresses corresponding to a certain physical block address is decreased to a certain number, the present application also provides a processing method through fig. 8, including the following steps:
s301: monitoring the residual number of the logical block addresses in the logical block address storage page;
s302: and when the residual number is less than the number which can be accommodated by the standard B + tree structure, storing each logical block address by using a mode of storing the mapping relation between the logical block address and the physical block address by using the standard B + tree.
It can be seen that, when the remaining number is smaller than the number that can be accommodated by the standard B + tree structure, the present embodiment does not use the logical block address storage page to store multiple logical block addresses, but replaces the standard B + tree structure with a method of storing the mapping relationship between the logical block address and the physical block address. Of course, the criteria for swapping back does not, of course, exceed the limit of the maximum number of nodes, a condition that satisfies uniqueness. The purpose of the conversion is to reduce the custom modification part as much as possible, thereby ensuring the stable operation of the system as much as possible.
Because the situation is complicated and cannot be illustrated by a list, a person skilled in the art can realize that many examples exist according to the basic method principle provided by the application and the practical situation, and the protection scope of the application should be protected without enough inventive work.
Referring to fig. 9, fig. 9 is a block diagram of a structure of a storage apparatus for one-to-many mapping relationship according to an embodiment of the present application, where the apparatus may include:
a multiple logical block address acquisition unit 100 for acquiring a plurality of different logical block addresses corresponding to the same physical block address;
a logical block address storage page creation unit 200 for creating a logical block address storage page associated with a physical block address;
the multiple logical block address storage unit 300 is configured to store only the logical block addresses into the logical block address storage pages, respectively, and obtain a one-to-many mapping relationship between the physical block addresses and each logical block address stored in the logical block address storage pages.
Further, the storage device for the one-to-many mapping relationship may further include:
a second logical block address storage page creation unit configured to create a second logical block address storage page when all logical block addresses cannot be stored in a unique logical block address storage page;
the logical block address storage page address association storage unit is used for storing the address of the second logical block address storage page as a link address in the last item of the first logical block address storage page; the first logical block address storage page is a logical block address storage page establishing a direct association relation with a physical block address;
and the logic block address splitting storage unit is used for respectively storing the rest logic block addresses to the second logic block address storage page.
Further, the storage device for the one-to-many mapping relationship may further include:
an additional identification appending unit for appending an additional identification to a logical block address storage page associated with another logical block address storage page of the lower layer.
Further, the storage device for the one-to-many mapping relationship may further include:
the residual number monitoring unit is used for monitoring the residual number of the logical block addresses in the logical block address storage page;
and the common mode switching unit is used for switching the standard B + tree to store the logical block addresses in a mode of storing the mapping relation between the logical block addresses and the physical block addresses when the residual number is less than the number capable of being accommodated by the standard B + tree structure.
Based on the foregoing embodiments, the present application further provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and the processor, when calling the computer program in the memory, may implement the steps provided by the foregoing embodiments. Of course, the electronic device may also include various necessary network interfaces, power supplies, other components, and the like.
The present application also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by an execution terminal or processor, can implement the steps provided by the above-mentioned embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It will be apparent to those skilled in the art that various changes and modifications can be made in the present invention without departing from the principles of the invention, and these changes and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for storing one-to-many mapping relationship is characterized by comprising the following steps:
obtaining a plurality of different logical block addresses corresponding to the same physical block address;
creating a logical block address storage page associated with the physical block address;
and only storing each logic block address into the logic block address storage page respectively to obtain a one-to-many mapping relation formed between each physical block address and each logic block address stored in the logic block address storage page.
2. The storage method according to claim 1, wherein when all of the logical block addresses cannot be stored in a unique logical block address storage page, the method further comprises:
creating a second logical block address storage page;
storing the address of the second logical block address storage page as a last item of a link address in a first logical block address storage page; the first logical block address storage page is a logical block address storage page which establishes a direct association relation with the physical block address;
and respectively storing the rest of the logical block addresses to the second logical block address storage pages.
3. The storage method according to claim 2, further comprising:
an additional identification is appended to the logical block address storage page associated with another logical block address storage page of the lower layer.
4. The storage method according to any one of claims 1 to 3, further comprising:
monitoring the residual number of the logical block addresses in the logical block address storage page;
and when the residual number is less than the number which can be accommodated by the standard B + tree structure, storing each logical block address by using the standard B + tree to store the mapping relation between the logical block address and the physical block address.
5. A one-to-many mapping storage apparatus, comprising:
a multiple logical block address acquisition unit for acquiring a plurality of different logical block addresses corresponding to the same physical block address;
a logical block address storage page creation unit for creating a logical block address storage page associated with the physical block address;
and the multi-logical block address storage unit is used for storing the logical block addresses into the logical block address storage pages respectively to obtain a one-to-many mapping relation formed between the physical block addresses and the logical block addresses stored in the logical block address storage pages respectively.
6. The storage device of claim 5, further comprising:
a second logical block address storage page creation unit configured to create a second logical block address storage page when all of the logical block addresses cannot be stored in a unique logical block address storage page;
the logical block address storage page address association storage unit is used for storing the address of the second logical block address storage page as a last item of a link address in the first logical block address storage page; the first logical block address storage page is a logical block address storage page which establishes a direct association relation with the physical block address;
and the logic block address splitting storage unit is used for respectively storing the rest logic block addresses to the second logic block address storage page.
7. The storage device of claim 6, further comprising:
an additional identification appending unit for appending an additional identification to a logical block address storage page associated with another logical block address storage page of the lower layer.
8. The storage device of any one of claims 5 to 7, further comprising:
the residual number monitoring unit is used for monitoring the residual number of the logical block addresses in the logical block address storage page;
and the common mode switching unit is used for switching to the mode of storing the mapping relation between the logical block address and the physical block address by the standard B + tree when the residual number is less than the number which can be accommodated by the standard B + tree structure, and storing each logical block address.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the one-to-many mapping storage method of any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, characterized in that a computer program is stored therein, which when executed by a processor, implements the storage method of the one-to-many mapping relationship according to any one of claims 1 to 4.
CN201911025169.1A 2019-10-25 2019-10-25 One-to-many mapping relation storage method and device, electronic equipment and medium Pending CN110781101A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911025169.1A CN110781101A (en) 2019-10-25 2019-10-25 One-to-many mapping relation storage method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911025169.1A CN110781101A (en) 2019-10-25 2019-10-25 One-to-many mapping relation storage method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN110781101A true CN110781101A (en) 2020-02-11

Family

ID=69386794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911025169.1A Pending CN110781101A (en) 2019-10-25 2019-10-25 One-to-many mapping relation storage method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN110781101A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022037016A1 (en) * 2020-08-20 2022-02-24 苏州浪潮智能科技有限公司 Method and system for storing tree structure data, and related apparatus
CN116880780A (en) * 2023-09-08 2023-10-13 合肥康芯威存储技术有限公司 Tree data writing method, device, machine-readable medium and memory

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398783A (en) * 2007-09-28 2009-04-01 株式会社日立制作所 Storage device and deduplication method
CN103823865A (en) * 2014-02-25 2014-05-28 南京航空航天大学 Database primary memory indexing method
CN104102586A (en) * 2013-04-15 2014-10-15 中兴通讯股份有限公司 Address mapping processing method and address mapping processing device
US20170316042A1 (en) * 2016-04-27 2017-11-02 Sap Se Index page with latch-free access
CN108319625A (en) * 2017-01-17 2018-07-24 广州市动景计算机科技有限公司 Piece file mergence method and apparatus
CN109101608A (en) * 2018-08-03 2018-12-28 郑州云海信息技术有限公司 A kind of date storage method, data query method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398783A (en) * 2007-09-28 2009-04-01 株式会社日立制作所 Storage device and deduplication method
CN104102586A (en) * 2013-04-15 2014-10-15 中兴通讯股份有限公司 Address mapping processing method and address mapping processing device
CN103823865A (en) * 2014-02-25 2014-05-28 南京航空航天大学 Database primary memory indexing method
US20170316042A1 (en) * 2016-04-27 2017-11-02 Sap Se Index page with latch-free access
CN108319625A (en) * 2017-01-17 2018-07-24 广州市动景计算机科技有限公司 Piece file mergence method and apparatus
CN109101608A (en) * 2018-08-03 2018-12-28 郑州云海信息技术有限公司 A kind of date storage method, data query method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐逸文 等: "一种处理B+树重复键值的方法", 《计算机工程》 *
韩帅军: "面向归档存储的重复数据删除优化方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022037016A1 (en) * 2020-08-20 2022-02-24 苏州浪潮智能科技有限公司 Method and system for storing tree structure data, and related apparatus
CN116880780A (en) * 2023-09-08 2023-10-13 合肥康芯威存储技术有限公司 Tree data writing method, device, machine-readable medium and memory

Similar Documents

Publication Publication Date Title
RU2663358C2 (en) Clustering storage method and device
CN106294190B (en) Storage space management method and device
CN110147204B (en) Metadata disk-dropping method, device and system and computer-readable storage medium
CN110018998B (en) File management method and system, electronic equipment and storage medium
CN111125447A (en) Metadata access method, device and equipment and readable storage medium
EP2863310A1 (en) Data processing method and apparatus, and shared storage device
CN105468642A (en) Data storage method and apparatus
JP2015512604A (en) Cryptographic hash database
JP2005267600A5 (en)
KR20200122994A (en) Key Value Append
US9977598B2 (en) Electronic device and a method for managing memory space thereof
KR20170123336A (en) File manipulation method and apparatus
CN110888837B (en) Object storage small file merging method and device
CN103019887A (en) Data backup method and device
CN110399096B (en) Method, device and equipment for deleting metadata cache of distributed file system again
CN109407985B (en) Data management method and related device
CN112148217B (en) Method, device and medium for caching deduplication metadata of full flash memory system
CN110781101A (en) One-to-many mapping relation storage method and device, electronic equipment and medium
CN108874930A (en) File attribute information statistical method, device, system, equipment and storage medium
EP4137963A1 (en) Persistent key value storage device with hashing and method for operating the same
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
CN110688065A (en) Storage space management method, system, electronic equipment and storage medium
CN111984650A (en) Storage method, system and related device of tree structure data
CN105243099A (en) Large data real-time storage method based on translation document
CN111857556A (en) Method, apparatus and computer program product for managing metadata of storage objects

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200211

RJ01 Rejection of invention patent application after publication