Data storage method and device, storage medium and program product
By assigning serial numbers to metadata and storing address information, the problem of low metadata acquisition efficiency is solved, and fast positioning and efficient storage are achieved.
Patent Information
- Application Number
- CN202511092959.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-09-05
AI Technical Summary
In the prior art, when metadata is lost or erroneous, the electronic device needs to scan a large amount of storage area, resulting in low metadata acquisition efficiency and low storage space utilization.
Assign a target serial number to the target metadata and store it in a non-volatile storage medium. Record the target serial number and address information, and quickly locate the metadata through the serial number and address information.
It improves the efficiency of metadata acquisition, reduces scanning time, and improves storage space utilization.
Smart Images

Figure CN120596035A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data storage technology, and in particular to a data storage method, device, storage medium, and program product. Background Art
[0002] Metadata can be used to indicate the storage status of user data so as to manage user data.
[0003] In related technologies, if metadata is lost or erroneous, the electronic device can scan all possible storage areas to extract the metadata. However, this method requires scanning a large number of storage areas, which results in a long scanning time and low metadata acquisition efficiency. Summary of the Invention
[0004] The present application provides a data storage method, device, storage medium and program product to at least solve the problem of low metadata acquisition efficiency in related technologies.
[0005] In a first aspect, the present application provides a data storage method, applied to an electronic device, the method comprising:
[0006] Acquire target metadata and assign a target sequence number to the target metadata, where the target sequence number is used to indicate the order of the target metadata in the metadata acquired by the electronic device;
[0007] storing the target metadata in a first non-volatile storage medium according to the target sequence number;
[0008] Determining address information corresponding to the target metadata, where the address information is used to indicate a storage address of the target metadata in the first non-volatile storage medium;
[0009] The corresponding storage target serial number and address information corresponding to the target metadata.
[0010] In a second aspect, the present application further provides a data storage device, which is applied to an electronic device. The data storage device includes: an acquisition module, a storage module, and a determination module, wherein:
[0011] The acquisition module is used to acquire target metadata and assign a target sequence number to the target metadata, where the target sequence number is used to indicate the order of the target metadata in the metadata acquired by the electronic device;
[0012] The storage module is used to store the target metadata in a first non-volatile storage medium according to the target sequence number;
[0013] The determination module is used to determine address information corresponding to the target metadata, where the address information is used to indicate a storage address of the target metadata in the first non-volatile storage medium;
[0014] The storage module is also used to store the target serial number and the address information corresponding to the target metadata.
[0015] In a third aspect, the present application further provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned data storage methods when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned data storage methods are implemented.
[0017] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned data storage methods when executed by a processor.
[0018] Through the technical solution provided by the embodiments of the present application, the electronic device can obtain target metadata and assign a target serial number to the target metadata; based on the target serial number, the target metadata can be stored in a first non-volatile storage medium; the address information corresponding to the target metadata can be determined; and the target serial number and the address information corresponding to the target metadata can be stored accordingly. Through the above method, after assigning a target serial number to the target metadata, the target serial number and the target metadata can be stored accordingly, and the address information corresponding to the target serial number and the target metadata can be stored accordingly. In this way, if the target metadata is lost, the electronic device can search for the target metadata based on the target serial number and address information of the target metadata, thereby improving the efficiency of metadata acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 Schematic diagram of the data storage method provided in this embodiment Figure 1 ;
[0021] Figure 2 A schematic diagram of storing target metadata provided in an embodiment of the present application;
[0022] Figure 3 Schematic diagram of the data storage method provided in this embodiment Figure 2 ;
[0023] Figure 4Schematic diagram of the data storage method provided in this embodiment Figure 3 ;
[0024] Figure 5 A schematic diagram of a storage architecture provided in an embodiment of the present application;
[0025] Figure 6 Schematic diagram of the data storage method provided in this embodiment Figure 4 ;
[0026] Figure 7 Schematic diagram of the structure of the data storage device provided in the embodiment of the present application Figure 1 ;
[0027] Figure 8 Schematic diagram of the structure of the data storage device provided in the embodiment of the present application Figure 2 ;
[0028] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0030] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0031] Metadata manages the storage location, attributes, and organizational structure of user data. The integrity and consistency of metadata are crucial to ensuring the accessibility of user data. However, when metadata is missing or erroneous, the system may be unable to retrieve the metadata, and consequently, unable to access user data, resulting in poor data reliability.
[0032] To improve data reliability, a multi-redundant copy strategy is often used to address the aforementioned technical issues. Specifically, multiple metadata copies can be stored when metadata is generated, and these copies can also be updated when metadata is updated. This way, if one metadata copy is lost or erroneous, the electronic device can retrieve the correct metadata and access user data based on the correct metadata. However, in this approach, multiple metadata copies require a large amount of storage space, resulting in low storage space utilization.
[0033] In related technologies, the aforementioned technical issues are typically addressed through self-parsing. Specifically, only one copy of metadata is stored. If metadata is lost or erroneous, the electronic device can scan all possible storage areas for metadata to parse the metadata. However, this method requires the electronic device to scan a large number of storage areas, resulting in a long scanning process and, in turn, low metadata acquisition efficiency. This is particularly true when there is a large amount of metadata, further increasing the scanning workload of the electronic device and reducing metadata acquisition efficiency.
[0034] In view of this, embodiments of the present application provide a data storage method that can tag metadata with serial numbers, store a copy of the metadata in the order indicated by the serial numbers, and back up address information indicating the storage address of the metadata. This allows electronic devices to quickly locate metadata based on its address information if it is lost, improving metadata acquisition efficiency. Furthermore, compared to solutions that back up metadata, backing up address information requires less storage space, improving storage space utilization.
[0035] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0036] Figure 1 Schematic diagram of the data storage method provided in this embodiment Figure 1 See Figure 1 The execution subject of the method may be an electronic device or a processor in the electronic device. For example, the electronic device may be a server or a memory, and the processor may be a central processing unit (CPU). For ease of understanding, the following description takes the execution subject as an electronic device as an example. The method may include:
[0037] S101: Acquire target metadata and assign a target sequence number to the target metadata.
[0038] The target metadata may be metadata of user data corresponding to any input / output (IO) operation, where the IO operation may be an IO operation generated by an electronic device, or may be an IO operation received by an electronic device or sent by another electronic device.
[0039] The target sequence number is used to indicate the sequence of the target metadata in the metadata acquired by the electronic device.
[0040] For example, the electronic device may assign serial numbers to the metadata using Arabic numerals in ascending order based on the order in which the metadata are acquired. For example, if the electronic device acquires three metadata in succession, the serial numbers of the three metadata may be 1, 2, and 3, respectively.
[0041] The target metadata may include multiple sub-metadata of different types. Each type of sub-metadata may manage user data from different perspectives.
[0042] For example, the sub-metadata may be a mapping of a logical block address to a physical block address (LP), a mapping of a physical block address to a logical block address (LP), or a mapping of a hash value to a physical block address (HP). LP can be used to locate the physical address of user data, PL can be used for physical block management, and HP can be used for data deduplication.
[0043] S102: Store the target metadata in a first non-volatile storage medium according to the target sequence number.
[0044] The first non-volatile storage medium may be a storage medium that can store data even after power failure, for example, a hard disk drive (HDD) or a solid state drive (SSD).
[0045] The electronic device may first store the target metadata in a cache space, and then store the target metadata in the cache space in a first non-volatile storage medium. Sub-metadata of different types may correspond to different cache spaces in the cache and may correspond to different storage spaces in the first non-volatile storage medium.
[0046] In this embodiment, the electronic device can store the sub-metadata in the corresponding cache space according to the type and target sequence number, until multiple sub-metadata are stored in multiple cache spaces; for any sub-metadata, under preset conditions, the sub-metadata is stored from the cache space to the first non-volatile storage medium.
[0047] Specifically, for any sub-metadata, the sub-metadata may be stored in a corresponding cache space according to the type of the sub-metadata, and under a preset condition, the sub-metadata may be stored from the cache space to the first non-volatile storage medium.
[0048] For example, the preset condition may be that the available capacity of the cache space is less than or equal to a capacity threshold, or the preset condition may be that the number of sub-metadata items stored in the cache space is greater than or equal to a quantity threshold.
[0049] During the specific implementation process, for any sub-metadata, when storing the sub-metadata in the corresponding cache space, the electronic device can determine the cache space corresponding to the sub-metadata according to the type; determine the storage location of the sub-metadata in the cache space according to the target sequence number; and store the sub-metadata in the cache space according to the storage location.
[0050] During the specific implementation process, for any sub-metadata, when the sub-metadata is stored in the first non-volatile storage medium, the electronic device can determine the candidate storage space corresponding to the sub-metadata from the multiple storage spaces included in the first non-volatile storage medium according to the type of the sub-metadata; and store the sub-metadata in the candidate storage space according to the target sequence number and the size of the sub-metadata.
[0051] The following combination Figure 2 , describes the storage process of the target metadata.
[0052] Figure 2 This is a schematic diagram of a target metadata storage provided by an embodiment of the present application. Figure 2 , assuming that the target metadata may include a target LP, a target PL, and a target HP, assuming that the target sequence number of the target metadata is n, where n is an integer greater than or equal to 0. The cache may include multiple cache spaces, assuming that LP corresponds to cache space 1, PL corresponds to cache space 2, and HP corresponds to cache space 3, then the target LP and the target sequence number may be stored in cache space 1, the target PL and the target sequence number may be stored in cache space 2, and the target HP and the target sequence number may be stored in cache space 3.
[0053] like Figure 2As shown, cache space 1 can store multiple LPs in ascending order of sequence numbers, and the electronic device can determine the target LP storage location in cache space 1 based on the target sequence number. Cache space 2 can store multiple PLs in ascending order of sequence numbers, and the electronic device can determine the target PL storage location in cache space 2 based on the target sequence number. Cache space 3 can store multiple HPs in ascending order of sequence numbers, and the electronic device can determine the target HP storage location in cache space 3 based on the target sequence number.
[0054] The first non-volatile storage medium may include multiple storage spaces. Assume that LP corresponds to storage space 1, PL corresponds to storage space 2, and HP corresponds to storage space 3. Under preset condition 1, the target LP and target sequence number may be stored in storage space 1 in correspondence; under preset condition 2, the target PL and target sequence number may be stored in storage space 2 in correspondence; and under preset condition 3, the target HP and target sequence number may be stored in storage space 3 in correspondence. Preset conditions 1, 2, and 3 may be the same, or they may be different.
[0055] like Figure 2 As shown, storage space 1 can store multiple LPs in ascending order of sequence numbers, so the electronic device can store the target sequence number and target LP in storage space 1 according to the target sequence number. Storage space 2 can store multiple PLs in ascending order of sequence numbers, so the electronic device can store the target sequence number and target PL in storage space 2 according to the target sequence number. Storage space 3 can store multiple HPs in ascending order of sequence numbers, so the electronic device can store the target sequence number and target HP in storage space 3 according to the target sequence number.
[0056] S103: Determine address information corresponding to the target metadata.
[0057] The address information is used to indicate a storage address of the target metadata in the first non-volatile storage medium.
[0058] In this embodiment, the address information corresponding to the target metadata may include: sub-address information corresponding to all sub-metadata included in the target metadata. For any sub-metadata, the sub-address information corresponding to the sub-metadata may be used to indicate the storage address of the sub-metadata in the first non-volatile storage medium.
[0059] Specifically, the electronic device may determine the sub-address information corresponding to each sub-metadata corresponding to the target metadata, and may determine that the address information corresponding to the target metadata includes: the sub-address information corresponding to each sub-metadata.
[0060] For any sub-metadata, the storage space corresponding to the sub-metadata may include a first address storage unit, which may store the storage address of the sub-metadata. The storage space corresponding to the sub-metadata may also include J second address storage units corresponding to the first address storage unit, where J is an integer greater than or equal to 0. The first second address storage unit may store the address of the first address storage unit, the i+1th second address storage unit may store the address of the ith first address storage unit, and i may be 1, 2, ..., J-1.
[0061] For any sub-metadata, it can be determined that the sub-address information corresponding to the sub-metadata may be the address of the first address storage unit, or the sub-address information corresponding to the sub-metadata may be the address of the Jth second address storage unit.
[0062] S104: Store the corresponding target serial number and address information corresponding to the target metadata.
[0063] In this embodiment, the target sequence number and the address information corresponding to the target metadata can be stored in a first non-volatile storage medium, or the target sequence number and the address information corresponding to the target metadata can be stored in another non-volatile storage medium. In this way, the storage location of the target metadata can be quickly located based on the stored target sequence number and the address information corresponding to the target metadata, thereby improving the efficiency of target metadata search.
[0064] The data storage method provided in this embodiment can obtain target metadata and assign a target sequence number to the target metadata; based on the target sequence number, the target metadata can be stored in a first non-volatile storage medium; address information corresponding to the target metadata can be determined; and the target sequence number and the address information corresponding to the target metadata can be stored accordingly. Through the above method, after assigning a target sequence number to the target metadata, the target sequence number and the target metadata can be stored accordingly, and the address information corresponding to the target sequence number and the target metadata can be stored accordingly. In this way, if the target metadata is lost, the electronic device can search for the target metadata based on the target sequence number and address information of the target metadata, thereby improving the efficiency of metadata acquisition.
[0065] Based on the above embodiment, the storage space to be selected may include multiple data storage units. The rated capacities of the multiple data storage units may be the same, or the rated capacities of the multiple data storage units may be different. When storing the sub-metadata in the storage space to be selected, the data storage unit to be selected may be determined from the multiple data storage units, and the sub-metadata may be stored in the data storage unit to be selected. Figure 3 , a method for determining a candidate data storage unit and storing sub-metadata in the candidate data storage unit is described.
[0066] Figure 3 Schematic diagram of the data storage method provided in this embodiment Figure 2 See Figure 3 The execution subject of the method may be an electronic device or a processor in the electronic device. For example, the electronic device may be a server or a memory, and the processor may be a CPU. For ease of understanding, the following description takes the execution subject as an electronic device as an example. The method may include:
[0067] S301: Determine at least one data storage unit to be selected from a plurality of data storage units according to a target sequence number and a size of sub-metadata.
[0068] The total available space of at least one to-be-selected data storage unit is greater than or equal to the size of the sub-metadata.
[0069] In this embodiment, the electronic device can determine whether a first data storage unit exists among multiple data storage units, the available capacity of the first data storage unit is greater than zero and less than its own rated capacity, and the first data storage unit stores a historical sequence number, which is less than or equal to the target sequence number; if the first data storage unit exists, at least one candidate data storage unit is determined among the multiple data storage units based on the available capacity of the first data storage unit and the size of the sub-metadata; if the first data storage unit does not exist, at least one candidate data storage unit is determined among the multiple data storage units based on the size of the sub-metadata.
[0070] The first data storage unit may be a data storage unit that has stored historical metadata in the to-be-selected storage space but still has available capacity.
[0071] Specifically, according to different situations of whether the first data storage unit exists in the storage space to be selected, it is determined that the data storage unit to be selected exists in at least the following situations:
[0072] Case 1: There is a first data storage unit in the storage space to be selected.
[0073] In this case, if the size of the sub-metadata is less than or equal to the available capacity of the first data storage unit, a second data storage unit corresponding to the first data storage unit is determined as a candidate data storage unit, and the second data storage unit is used to store the data currently stored in the first data storage unit and the sub-metadata; if the size of the sub-metadata is greater than the available capacity of the first data storage unit, a second data storage unit corresponding to the first data storage unit and at least one third data storage unit are determined as candidate data storage units; wherein the second data storage unit is a data storage unit among multiple data storage units whose available capacity is equal to its own rated capacity, and the third data storage unit is a data storage unit among multiple data storage units whose available capacity is equal to its own rated capacity.
[0074] The second data storage unit may be an unused data storage unit in the storage space to be selected. The third data storage unit may also be an unused data storage unit in the storage space to be selected.
[0075] Specifically, if the size of the sub-metadata is less than or equal to the available capacity of the first data storage unit, an unused second data storage unit in the candidate storage space may be determined as the candidate data storage unit. The second data storage unit may be used to store the data currently stored in the first data storage unit and the sub-metadata.
[0076] Specifically, if the size of the sub-metadata exceeds the available capacity of the first data storage unit, an unused second data storage unit in the candidate storage space and at least one unused third data storage unit in the candidate storage space may be determined as the candidate data storage units. The second data storage unit may be used to store the data currently stored in the first data storage unit and a portion of the sub-metadata. After the second data storage unit stores a portion of the sub-metadata, the remaining sub-metadata may be stored in the third data storage unit.
[0077] Case 2: the first data storage unit does not exist in the storage space to be selected.
[0078] In this case, the electronic device may determine at least one third data storage unit as a candidate data storage unit, where the third data storage unit is a data storage unit having an available capacity equal to its own rated capacity among the multiple data storage units.
[0079] Specifically, the electronic device may determine at least one unused third data storage unit as a candidate data storage unit. It should be understood that the total rated capacity of the at least one third data storage unit is greater than or equal to the size of the sub-metadata.
[0080] S302: Store the sub-metadata and the target sequence number corresponding to the sub-metadata in at least one to-be-selected data storage unit.
[0081] In this embodiment, the data storage unit to be selected includes a sequence number field and a data field.
[0082] It should be noted that, for any candidate data storage unit, the method of storing sub-metadata in the candidate data storage unit is the same or similar. The following takes any candidate data storage unit as an example to illustrate the method of storing sub-metadata in the candidate data storage unit.
[0083] For any data storage unit to be selected, the electronic device can store the target sequence number corresponding to the sub-metadata in the sequence number field of the data storage unit to be selected; and store all or part of the sub-metadata in the data field of the data storage unit to be selected.
[0084] It should be noted that if the selected data storage unit is the second data storage unit, the electronic device may store the data currently stored in the first data storage unit and the sub-metadata in the data field of the second data storage unit in sequence according to the target sequence number. Specifically, the electronic device may first store the data currently stored in the first data storage unit in the data field of the second data storage unit, and then store all or part of the sub-metadata in the data field of the second data storage unit.
[0085] In this embodiment, after storing the sub-metadata and the target sequence number corresponding to the sub-metadata in at least one to-be-selected data storage unit, the electronic device may further determine a fourth data storage unit in the to-be-selected storage space, where the fourth data storage unit stores historical metadata and historical sequence numbers, and the available capacity of the fourth data storage unit is greater than zero, and the difference between the target sequence number and the historical sequence number is greater than or equal to a preset value; and delete the historical sequence number and historical metadata in the fourth data storage unit.
[0086] The historical sequence number may be a sequence number corresponding to the historical metadata.
[0087] The preset value can be set according to actual conditions. For example, the preset value can be 1, 2, or 3.
[0088] For example, assuming the target sequence number is 10 and the preset value is 1, after storing the sub-metadata and the target sequence number corresponding to the sub-metadata in at least one to-be-selected data storage unit, the electronic device can determine in the to-be-selected storage space a data storage unit that has already stored historical metadata and historical sequence numbers but still has available capacity and stores a historical sequence number less than or equal to 9. This data storage unit can be the fourth data storage unit, and the electronic device can clear the contents of this data storage unit.
[0089] For another example, assuming the target sequence number is 10 and the preset value is 3, after storing the sub-metadata and the target sequence number corresponding to the sub-metadata in at least one to-be-selected data storage unit, the electronic device can determine a data storage unit in the to-be-selected storage space that has already stored historical metadata and historical sequence numbers but still has available capacity and stores a historical sequence number less than or equal to 7. This data storage unit can be the fourth data storage unit, and the electronic device can clear the contents of this data storage unit.
[0090] It should be noted that by deleting the historical sequence number and historical metadata in the fourth data storage unit, the data storage unit can be reused, thereby increasing the utilization rate of the data storage unit.
[0091] It should be noted that for a fifth data storage unit that stores a historical sequence number whose difference from the target sequence number is less than a preset value and that also stores historical data, the second data storage unit can back up the metadata in the fifth data storage unit, thereby increasing the reliability of the metadata. For example, assuming the target sequence number is 10 and the preset value is 3, the electronic device can delete the content in the data storage unit that stores historical metadata and historical sequence number 7, but will not delete the content in the data storage unit that stores historical metadata and historical sequence number 8, nor will it delete the content in the data storage unit that stores historical metadata and historical sequence number 9. The data storage unit that stores historical metadata and historical sequence number 8 and the data storage unit that stores historical metadata and historical sequence number 9 can be the fifth data storage unit.
[0092] In the data storage method provided in this embodiment, at least one candidate data storage unit can be determined from multiple data storage units based on the target sequence number and the size of the sub-metadata. Furthermore, the sub-metadata and the target sequence number corresponding to the sub-metadata can be stored in the at least one candidate data storage unit. This method can achieve the purpose of storing the sub-metadata in the candidate data storage unit.
[0093] Based on any of the above embodiments, the storage space to be selected may further include a first address storage unit corresponding to the data storage unit to be selected, and the first address storage unit may be used to store the address of the data storage unit to be selected. Optionally, the storage space to be selected may further include at least one second address storage unit corresponding to the first address storage unit, and the second address storage unit may be used to store the address of the first address storage unit or the address of the second address storage unit.
[0094] The following combination Figure 4 Taking any data storage unit to be selected as an example, assuming that the storage space to be selected also includes J second address storage units, the solution will be described. Wherein, J can be an integer greater than or equal to 0.
[0095] Figure 4 Schematic diagram of the data storage method provided in this embodiment Figure 3 See Figure 4 The execution subject of the method may be an electronic device or a processor in the electronic device. For example, the electronic device may be a server or a memory, and the processor may be a CPU. For ease of understanding, the following description takes the execution subject as an electronic device as an example. The method may include:
[0096] S401: Store the address of the data storage unit to be selected and the target sequence number corresponding to the sub-metadata in the first address storage unit corresponding to the data storage unit to be selected.
[0097] It should be noted that, for any candidate data storage unit corresponding to the sub-metadata, the method for storing the address of the candidate data storage unit and the target sequence number corresponding to the sub-metadata in the first address storage unit corresponding to the candidate data storage unit is the same. This embodiment uses any candidate data storage unit as an example for description.
[0098] In this embodiment, the first address storage unit includes a sequence number field and an address field. The electronic device can store the target sequence number corresponding to the sub-metadata in the sequence number field of the first address storage unit and store the address of the selected data storage unit in the address field of the first address storage unit.
[0099] S402: Store the address of the first address storage unit and the target sequence number corresponding to the sub-metadata into the first second address storage unit.
[0100] In this embodiment, the second address storage unit includes a sequence number field and an address field. The electronic device can store the target sequence number corresponding to the sub-metadata in the sequence number field of the first second address storage unit, and store the address of the first address storage unit in the address field of the first second address storage unit.
[0101] S403 , store the address of the i-th second address storage unit and the target sequence number corresponding to the sub-metadata into the i+1-th second address storage unit, where i is 1, 2, ..., J-1.
[0102] In this embodiment, the electronic device can store the target serial number corresponding to the metadata into the serial number field of the (i+1)th second address storage unit; and store the address of the (i)th second address storage unit into the address field of the (i+1)th second address storage unit.
[0103] In the data storage method provided in this embodiment, the electronic device can store the address of the selected data storage unit and the target sequence number corresponding to the sub-metadata in the first address storage unit corresponding to the selected data storage unit; can store the address of the first address storage unit and the target sequence number corresponding to the sub-metadata in the first second address storage unit; and can store the address of the i-th second address storage unit and the target sequence number corresponding to the sub-metadata in the i+1-th second address storage unit, where i is 1, 2, ..., J-1. Through the above method, the purpose of storing the address of the selected data storage unit and the address of the first address storage unit can be achieved.
[0104] Based on any of the above embodiments, Figure 5 , the selected data storage space, the first address storage unit corresponding to the selected data storage space, and the second address storage unit corresponding to the first address storage unit are described.
[0105] Figure 5 A schematic diagram of a storage architecture provided in this application embodiment. Figure 5 , assuming that the storage space to be selected includes two data storage units to be selected, and the two data storage units to be selected are data storage unit 1 and data storage unit 2. Figure 5 As shown, two candidate data storage units respectively store part of the sub-metadata, and each candidate data storage unit stores a target sequence number.
[0106] like Figure 5 As shown, the storage space to be selected may further include a first address storage unit, in which the target sequence number and the address of each data storage space to be selected may be stored.
[0107] like Figure 5 As shown, the storage space to be selected may further include a second address storage unit, in which the target sequence number and the address of the first address storage unit may be stored.
[0108] Based on any of the above embodiments, Figure 6 , further illustrating the data storage method provided in the embodiment of the present application.
[0109] Figure 6 Schematic diagram of the data storage method provided in this embodiment Figure 4 See Figure 6 The execution subject of the method may be an electronic device or a processor in the electronic device. For example, the electronic device may be a server or a memory, and the processor may be a CPU. For ease of understanding, the following description takes the execution subject as an electronic device as an example. The method may include:
[0110] S601: Acquire target metadata and assign a target serial number to the target metadata, where the target metadata includes a plurality of sub-metadata of different types.
[0111] S602: Store the sub-metadata into a corresponding cache space according to the type and the target sequence number, until multiple sub-metadata are stored into multiple cache spaces.
[0112] It should be noted that the specific implementation of S601-S602 can be found in S101-S102 and will not be repeated here.
[0113] S603: For any sub-metadata, under preset conditions and according to the type of the sub-metadata, determine a candidate storage space corresponding to the sub-metadata from a plurality of storage spaces included in the first non-volatile storage medium.
[0114] S604 : For any piece of sub-metadata, determine at least one data storage unit to be selected from multiple data storage units in the storage space to be selected according to the target sequence number and the size of the sub-metadata.
[0115] It should be noted that the specific implementation of S604 can be found in S301 and will not be described in detail here.
[0116] S605 : For any piece of sub-metadata, store the sub-metadata and the target sequence number corresponding to the sub-metadata in at least one to-be-selected data storage unit.
[0117] It should be noted that the specific implementation of S605 can be found in S302 and will not be repeated here.
[0118] S606 : For any piece of sub-metadata, store the address of at least one to-be-selected data storage unit corresponding to the sub-metadata and the target sequence number corresponding to the sub-metadata in the first address storage unit corresponding to the to-be-selected data storage unit.
[0119] It should be noted that the specific implementation of S606 can be found in S401 and will not be repeated here.
[0120] S607 : For any piece of sub-metadata, store the address of the first address storage unit corresponding to the sub-metadata and the target sequence number corresponding to the sub-metadata in the first second address storage unit.
[0121] The first address storage unit corresponding to the sub-metadata may be the first address storage unit corresponding to the to-be-selected data storage unit corresponding to the sub-metadata.
[0122] It should be noted that the specific implementation of S607 can be found in S402 and will not be repeated here.
[0123] S608 . For any piece of sub-metadata, store the address of the i-th second address storage unit corresponding to the sub-metadata and the target sequence number corresponding to the sub-metadata in the (i+1)-th second address storage unit.
[0124] The i-th second address storage unit corresponding to the sub-metadata may be the second address storage unit corresponding to the first address storage unit corresponding to the sub-metadata.
[0125] It should be noted that the specific implementation of S608 can be found in S403 and will not be repeated here.
[0126] S609 . For any piece of sub-metadata, determine the address of the first address storage unit corresponding to the sub-metadata, or the address of the Jth second address storage unit corresponding to the sub-metadata, as the sub-address information corresponding to the sub-metadata.
[0127] Specifically, if J is equal to 0, the electronic device may determine the address of the first address storage unit corresponding to the sub-metadata as the sub-address information corresponding to the sub-metadata. If J is greater than 0, the electronic device may determine the address of the Jth second address storage unit corresponding to the sub-metadata as the sub-address information corresponding to the sub-metadata.
[0128] S610: Determine that address information corresponding to target metadata includes: sub-address information corresponding to multiple sub-metadata.
[0129] In this embodiment, the electronic device may determine the sub-address information corresponding to the plurality of sub-metadata corresponding to the target metadata as the address information corresponding to the target metadata.
[0130] Exemplarily, assuming that the target metadata includes a target LP, a target PL, and a target HP, the address information corresponding to the target metadata may include sub-address information corresponding to the target LP, sub-address information corresponding to the target PL, and sub-address information corresponding to the target HP.
[0131] S611: Store the target sequence number and the address information corresponding to the target metadata in a second non-volatile storage medium.
[0132] The second non-volatile storage medium and the first non-volatile storage medium may be the same non-volatile storage medium, or the second non-volatile storage medium and the first non-volatile storage medium may be different non-volatile storage media, which is not limited in this embodiment.
[0133] It should be noted that if the second non-volatile storage medium and the first non-volatile storage medium are different non-volatile storage media, the reliability of the metadata can be further improved.
[0134] S612: Determine a storage address of the target metadata according to the corresponding target sequence number stored in the second non-volatile storage medium and address information corresponding to the target metadata.
[0135] S613: Acquire target metadata according to the storage address of the target metadata.
[0136] In this embodiment, if the target metadata is lost, the electronic device can determine the storage address of the target metadata based on the target sequence number stored in the second non-volatile storage medium and the address information corresponding to the target metadata, and then retrieve the target metadata. This allows the target metadata to be quickly located, improving the efficiency of obtaining the target metadata.
[0137] In the data storage method provided in this embodiment, after the electronic device assigns a target sequence number to target metadata, it can store the target sequence number and target metadata in a corresponding manner, and can also store the address information corresponding to the target sequence number and target metadata in a corresponding manner. In this way, if the target metadata is lost, the electronic device can search for the target metadata based on the target sequence number and address information of the target metadata, thereby improving the efficiency of metadata acquisition.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0139] Figure 7 Schematic diagram of the structure of the data storage device provided in the embodiment of the present application Figure 1 .like Figure 7 As shown, the data storage device 10 includes: an acquisition module 11, a storage module 12 and a determination module 13, wherein:
[0140] The acquisition module 11 is used to acquire target metadata and assign a target serial number to the target metadata, where the target serial number is used to indicate the order of the target metadata in the metadata acquired by the electronic device;
[0141] The storage module 12 is configured to store the target metadata in a first non-volatile storage medium according to the target sequence number;
[0142] The determination module 13 is used to determine address information corresponding to the target metadata, where the address information is used to indicate a storage address of the target metadata in the first non-volatile storage medium;
[0143] The storage module 12 is further configured to store the target sequence number and the address information corresponding to the target metadata.
[0144] The data storage device provided in this embodiment can execute the method shown in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be described in detail in this embodiment.
[0145] In a possible implementation, the target metadata includes multiple sub-metadata of different types, each sub-metadata corresponds to a different cache space, and the storage module 12 is specifically configured to:
[0146] According to the type and target sequence number, the sub-metadata is stored in the corresponding cache space until multiple sub-metadata are stored in multiple cache spaces;
[0147] For any sub-metadata, under a preset condition, the sub-metadata is stored from the cache space to the first non-volatile storage medium.
[0148] In a possible implementation, the storage module 12 is specifically configured to:
[0149] Determine the cache space corresponding to the sub-metadata according to the type;
[0150] Determine the storage location of the sub-metadata in the cache space according to the target sequence number;
[0151] The sub-metadata is stored in the cache space according to the storage location.
[0152] In a possible implementation, the first non-volatile storage medium includes multiple storage spaces, each sub-metadata corresponds to a different storage space, and the storage module 12 is specifically configured to:
[0153] determining, according to the type of the sub-metadata, a candidate storage space corresponding to the sub-metadata from a plurality of storage spaces included in the first non-volatile storage medium;
[0154] The sub-metadata is stored in a storage space to be selected according to the target sequence number and the size of the sub-metadata.
[0155] In a possible implementation, the storage space to be selected includes multiple data storage units, and the storage module 12 is specifically configured to:
[0156] determining, according to the target sequence number and the size of the sub-metadata, at least one candidate data storage unit from the plurality of data storage units, wherein a total available space of the at least one candidate data storage unit is greater than or equal to the size of the sub-metadata;
[0157] The sub-metadata and the target sequence number corresponding to the sub-metadata are correspondingly stored in at least one to-be-selected data storage unit.
[0158] In a possible implementation, the storage module 12 is specifically configured to:
[0159] Determining whether a first data storage unit exists among the plurality of data storage units, the available capacity of the first data storage unit is greater than zero and less than its rated capacity, and the first data storage unit stores a historical sequence number, which is less than or equal to the target sequence number;
[0160] If the first data storage unit exists, determining at least one to-be-selected data storage unit from the plurality of data storage units according to the available capacity of the first data storage unit and the size of the sub-metadata;
[0161] If the first data storage unit does not exist, at least one to-be-selected data storage unit is determined from the plurality of data storage units according to the size of the sub-metadata.
[0162] In a possible implementation, the storage module 12 is specifically configured to:
[0163] If the size of the sub-metadata is less than or equal to the available capacity of the first data storage unit, determining a second data storage unit corresponding to the first data storage unit as a candidate data storage unit, the second data storage unit being used to store the data currently stored in the first data storage unit and the sub-metadata;
[0164] If the size of the sub-metadata is larger than the available capacity of the first data storage unit, determining a second data storage unit corresponding to the first data storage unit and at least one third data storage unit as candidate data storage units, the second data storage unit being used to store the sub-metadata;
[0165] The second data storage unit is a data storage unit with an available capacity equal to its own rated capacity among the multiple data storage units, and the third data storage unit is a data storage unit with an available capacity equal to its own rated capacity among the multiple data storage units.
[0166] In a possible implementation, the storage module 12 is specifically configured to:
[0167] At least one third data storage unit is determined as a candidate data storage unit, where the third data storage unit is a data storage unit having an available capacity equal to its rated capacity among the multiple data storage units.
[0168] In a possible implementation, the data storage unit to be selected includes a sequence number field and a data field; for any data storage unit to be selected, the storage module 12 is specifically configured to:
[0169] The target sequence number corresponding to the sub-metadata is stored in the sequence number field of the data storage unit to be selected;
[0170] All or part of the sub-metadata is stored in the data field of the selected data storage unit.
[0171] Figure 8 Schematic diagram of the structure of the data storage device provided in the embodiment of the present application Figure 2 .exist Figure 7 On the basis of, the data storage device 10 further includes a deletion module 14, wherein,
[0172] The determining module 13 is further configured to determine a fourth data storage unit in the to-be-selected storage space, where the fourth data storage unit stores historical metadata and historical sequence numbers, the available capacity of the fourth data storage unit is greater than zero, and the difference between the target sequence number and the historical sequence number is greater than or equal to a preset value;
[0173] The deletion module 14 is used to delete the historical sequence number and historical metadata in the fourth data storage unit.
[0174] In a possible implementation, the storage space to be selected further includes a first address storage unit corresponding to each data storage unit to be selected. For any data storage unit to be selected, the storage module 12 is further configured to:
[0175] The address of the data storage unit to be selected and the target sequence number corresponding to the sub-metadata are correspondingly stored in the first address storage unit corresponding to the data storage unit to be selected.
[0176] In a possible implementation, the first address storage unit includes a sequence number field and an address field, and the storage module 12 is specifically configured to:
[0177] Storing the target sequence number corresponding to the sub-metadata into the sequence number field of the first address storage unit;
[0178] The address of the data storage unit to be selected is stored in the address field of the first address storage unit.
[0179] In a possible implementation, the storage space to be selected further includes J second address storage units corresponding to the first address storage unit, where J is an integer greater than or equal to 0, and the storage module 12 is further configured to:
[0180] The address of the first address storage unit and the target sequence number corresponding to the sub-metadata are stored in the first second address storage unit;
[0181] The address of the i-th second address storage unit and the target sequence number corresponding to the sub-metadata are correspondingly stored in the i+1-th second address storage unit, where i is 1, 2, ..., J-1.
[0182] In a possible implementation, the second address storage unit includes a sequence number field and an address field, and the storage module 12 is specifically configured to:
[0183] The target sequence number corresponding to the sub-metadata is stored in the sequence number field of the first second address storage unit;
[0184] The address of the first address storage unit is stored in the address field of the first second address storage unit.
[0185] In a possible implementation, the determination module 13 is specifically configured to:
[0186] For any piece of sub-metadata, determining the address of the first address storage unit corresponding to the sub-metadata, or the address of the Jth second address storage unit corresponding to the sub-metadata, as the sub-address information corresponding to the sub-metadata;
[0187] Determining the address information corresponding to the target metadata includes: sub-address information corresponding to the plurality of sub-metadata.
[0188] In a possible implementation, the determination module 13 is specifically configured to:
[0189] If J is equal to 0, the address of the first address storage unit corresponding to the sub-metadata is determined as the sub-address information corresponding to the sub-metadata;
[0190] If J is greater than 0, the address of the J-th second address storage unit corresponding to the sub-metadata is determined as the sub-address information corresponding to the sub-metadata.
[0191] In a possible implementation, the storage module 12 is further configured to:
[0192] The target serial number and the address information corresponding to the target metadata are stored in the second non-volatile storage medium.
[0193] In one possible implementation,
[0194] The determination module 13 is further configured to determine a storage address of the target metadata according to the target sequence number stored in the second non-volatile storage medium and the address information corresponding to the target metadata;
[0195] The acquisition module 11 is further configured to acquire target metadata according to the storage address of the target metadata.
[0196] The data storage device provided in this embodiment can execute the method shown in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be described in detail in this embodiment.
[0197] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 9 As shown, the electronic device 20 provided in this embodiment includes: at least one processor 201 and a memory 202. Optionally, the electronic device 20 further includes a communication component 203. The processor 201, the memory 202 and the communication component 203 are connected via a bus.
[0198] During the specific implementation process, at least one processor 201 executes the computer-executable instructions stored in the memory 202, so that the at least one processor 201 executes the above-mentioned data storage method embodiment.
[0199] The specific implementation process of the processor 201 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0200] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0201] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0202] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0203] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned data storage method embodiments when running.
[0204] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0205] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above data storage method embodiments are implemented.
[0206] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned data storage method embodiments are implemented.
[0207] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0208] The above describes in detail a data storage method, device, storage medium, and program product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications may be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A data storage method, characterized in that: Applied to electronic equipment, the method includes: Acquire target metadata, and assign a target sequence number to the target metadata, where the target sequence number is used to indicate the order of the target metadata in the metadata acquired by the electronic device; storing the target metadata in a first non-volatile storage medium according to the target sequence number; Determining address information corresponding to the target metadata, where the address information is used to indicate a storage address of the target metadata in the first non-volatile storage medium; The target sequence number and the address information corresponding to the target metadata are stored accordingly.
2. The method according to claim 1, characterized in that The target metadata includes a plurality of sub-metadata of different types, each sub-metadata corresponding to a different cache space; The step of storing the target metadata in a first non-volatile storage medium according to the target sequence number includes: storing the sub-metadata into a corresponding cache space according to the type and the target sequence number, until the plurality of sub-metadata are stored into a plurality of cache spaces; For any sub-metadata, under a preset condition, the sub-metadata is stored from the cache space to the first non-volatile storage medium.
3. The method according to claim 2, characterized in that Storing the sub-metadata in a corresponding cache space according to the type and the target sequence number includes: Determine a cache space corresponding to the sub-metadata according to the type; Determining a storage location of the sub-metadata in the cache space according to the target sequence number; The sub-metadata is stored in the cache space according to the storage location.
4. The method according to claim 2 or 3, characterized in that The first non-volatile storage medium includes a plurality of storage spaces, and each sub-metadata corresponds to a different storage space; The storing the sub-metadata from the cache space to the first non-volatile storage medium includes: determining, according to the type of the sub-metadata, a candidate storage space corresponding to the sub-metadata from a plurality of storage spaces included in the first non-volatile storage medium; According to the target sequence number and the size of the sub-metadata, the sub-metadata is stored in the to-be-selected storage space.
5. The method according to claim 4, characterized in that The storage space to be selected includes a plurality of data storage units; and storing the sub-metadata in the storage space to be selected according to the size of the sub-metadata includes: determining, according to the target sequence number and the size of the sub-metadata, at least one to-be-selected data storage unit from the plurality of data storage units, wherein a total available space of the at least one to-be-selected data storage unit is greater than or equal to the size of the sub-metadata; The sub-metadata and the target sequence number corresponding to the sub-metadata are correspondingly stored in the at least one to-be-selected data storage unit.
6. The method according to claim 5, characterized in that The determining, according to the target sequence number and the size of the sub-metadata, at least one to-be-selected data storage unit from the plurality of data storage units comprises: Determining whether a first data storage unit exists among the plurality of data storage units, the available capacity of the first data storage unit being greater than zero and less than its rated capacity, and the first data storage unit storing a historical sequence number being less than or equal to the target sequence number; If the first data storage unit exists, determining at least one to-be-selected data storage unit from the plurality of data storage units according to available capacity of the first data storage unit and the size of the sub-metadata; If the first data storage unit does not exist, at least one to-be-selected data storage unit is determined from the plurality of data storage units according to the size of the sub-metadata.
7. The method according to claim 6, characterized in that The step of determining at least one to-be-selected data storage unit from the plurality of data storage units according to the available capacity of the first data storage unit and the size of the sub-metadata includes: If the size of the sub-metadata is less than or equal to the available capacity of the first data storage unit, determining a second data storage unit corresponding to the first data storage unit as the candidate data storage unit, the second data storage unit being used to store the data currently stored in the first data storage unit and the sub-metadata; If the size of the sub-metadata is larger than the available capacity of the first data storage unit, determining a second data storage unit corresponding to the first data storage unit and at least one third data storage unit as the candidate data storage units, the second data storage unit being used to store the sub-metadata; The second data storage unit is a data storage unit whose available capacity is equal to its own rated capacity among the multiple data storage units, and the third data storage unit is a data storage unit whose available capacity is equal to its own rated capacity among the multiple data storage units.
8. The method according to claim 6, characterized in that The determining, according to the size of the sub-metadata, at least one to-be-selected data storage unit from the plurality of data storage units comprises: At least one third data storage unit is determined as the to-be-selected data storage unit, where the third data storage unit is a data storage unit having an available capacity equal to its rated capacity among the plurality of data storage units.
9. The method according to claim 5, characterized in that The data storage unit to be selected includes a sequence number field and a data field. For any data storage unit to be selected, storing the sub-metadata and the target sequence number corresponding to the sub-metadata in the data storage unit to be selected includes: Storing the target sequence number corresponding to the sub-metadata in the sequence number field of the to-be-selected data storage unit; All or part of the sub-metadata is stored in the data field of the selected data storage unit.
10. The method according to claim 9, characterized in that The method further comprises: Determining a fourth data storage unit in the to-be-selected storage space, wherein the fourth data storage unit stores historical metadata and historical sequence numbers, the available capacity of the fourth data storage unit is greater than zero, and the difference between the target sequence number and the historical sequence number is greater than or equal to a preset value; The historical sequence number and historical metadata in the fourth data storage unit are deleted.
11. The method according to claim 5, characterized in that The storage space to be selected also includes a first address storage unit corresponding to each data storage unit to be selected; For any data storage unit to be selected, the method further includes: The address of the data storage unit to be selected and the target sequence number corresponding to the sub-metadata are correspondingly stored in the first address storage unit corresponding to the data storage unit to be selected.
12. The method according to claim 11, characterized in that The first address storage unit includes a sequence number field and an address field; and the step of storing the address of the to-be-selected data storage unit and the target sequence number corresponding to the sub-metadata in the first address storage unit corresponding to the to-be-selected data storage unit includes: Storing the target sequence number corresponding to the sub-metadata in the sequence number field of the first address storage unit; The address of the to-be-selected data storage unit is stored in the address field of the first address storage unit.
13. The method according to claim 11 or 12, characterized in that The storage space to be selected also includes J second address storage units corresponding to the first address storage unit, where J is an integer greater than or equal to 0; and the method further includes: storing the address of the first address storage unit and the target sequence number corresponding to the sub-metadata in the first second address storage unit; The address of the i-th second address storage unit and the target sequence number corresponding to the sub-metadata are correspondingly stored in the i+1-th second address storage unit, where i is 1, 2, ..., J-1.
14. The method according to claim 13, characterized in that The second address storage unit includes a sequence number field and an address field; and the step of storing the address of the first address storage unit and the target sequence number corresponding to the sub-metadata in the first second address storage unit includes: Storing the target sequence number corresponding to the sub-metadata into the sequence number field of the first second address storage unit; The address of the first address storage unit is stored in the address field of the first second address storage unit.
15. The method according to claim 14, characterized in that The determining the address information corresponding to the target metadata includes: For any piece of sub-metadata, determining the address of the first address storage unit corresponding to the sub-metadata, or the address of the J-th second address storage unit corresponding to the sub-metadata, as the sub-address information corresponding to the sub-metadata; Determining the address information corresponding to the target metadata includes: sub-address information corresponding to the plurality of sub-metadata.
16. The method according to claim 15, characterized in that The determining the address of the first address storage unit corresponding to the sub-metadata element, or the address of the J-th second address storage unit corresponding to the sub-metadata element, as the sub-address information corresponding to the sub-metadata element includes: If J is equal to 0, the address of the first address storage unit corresponding to the sub-metadata is determined as the sub-address information corresponding to the sub-metadata; If J is greater than 0, the address of the J-th second address storage unit corresponding to the sub-metadata is determined as the sub-address information corresponding to the sub-metadata.
17. The method according to claim 1, wherein The corresponding storage of the target sequence number and the address information corresponding to the target metadata includes: The target serial number and the address information corresponding to the target metadata are stored in a second non-volatile storage medium.
18. The method according to claim 17, characterized in that The method further comprises: determining a storage address of the target metadata according to the target sequence number stored correspondingly in the second non-volatile storage medium and address information corresponding to the target metadata; The target metadata is acquired according to the storage address of the target metadata.
19. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 18 when executing the computer program.
20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the method according to any one of claims 1 to 18 when executed by a processor.
21. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 18 is implemented.
Citation Information
Patent Citations
Method and apparatus for performing annotated atomic write operations
CN105659204A
Metadata restoration method, device and equipment, and medium
CN112162876A
Metadata configuration method and device and medium
CN115657965A
Communication data transmission and temporary storage method and device and storage medium
CN119299393A
Metadata processing method and device, processing system and storage medium
CN120144367A