CN111274219A - Data storage method and device, storage medium and electronic device - Google Patents
Data storage method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN111274219A CN111274219A CN202010071841.7A CN202010071841A CN111274219A CN 111274219 A CN111274219 A CN 111274219A CN 202010071841 A CN202010071841 A CN 202010071841A CN 111274219 A CN111274219 A CN 111274219A
- Authority
- CN
- China
- Prior art keywords
- data
- metadata
- area
- target data
- data area
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000013500 data storage Methods 0.000 title claims abstract description 26
- 238000000638 solvent extraction Methods 0.000 claims abstract description 10
- 238000004590 computer program Methods 0.000 claims description 18
- 230000004931 aggregating effect Effects 0.000 claims description 3
- 230000000903 blocking effect Effects 0.000 claims 2
- 230000000694 effects Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 238000013523 data management Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 238000005192 partition Methods 0.000 description 5
- 238000012795 verification Methods 0.000 description 5
- 238000011084 recovery Methods 0.000 description 4
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1847—File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1435—Saving, restoring, recovering or retrying at system level using file system or storage system metadata
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Library & Information Science (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a data storage method and device, a storage medium and an electronic device, wherein the method comprises the following steps: partitioning the determined data area to obtain N data areas, wherein the data areas are used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N; and respectively storing each target data in the M target data and the metadata corresponding to each target data into N data areas, wherein each data area stores one target data and corresponding metadata. By the method and the device, the problem of data storage is solved, and the effect of effectively managing the data storage is achieved.
Description
Technical Field
The invention relates to the field of computers, in particular to a data storage method and device, a storage medium and an electronic device.
Background
In the existing file system, a metadata area and a data area are managed in the same hard disk. The management method of the metadata and the data stored in the same hard disk has a problem in the performance of the hard disk, because the metadata and the data are stored in the same hard disk, the data volume of the metadata is small, and the data of the metadata and the data are not in the same position, so that the performance of writing data in the hard disk is poor.
By sharing the storage metadata of the Secret Data (SSD for short) and the Data that changes frequently, there is a high possibility of damage, which may result in Data on the hard disk having no Data management method, resulting in Data failure.
In view of the above technical problems, no effective solution has been proposed in the related art.
Disclosure of Invention
The embodiment of the invention provides a data storage method and device, a storage medium and an electronic device, which are used for at least solving the problem of data storage in the related technology.
According to an embodiment of the present invention, there is provided a data storage method including: partitioning the determined data area to obtain N data areas, wherein the data area is used for storing M target data, N and M are natural numbers which are larger than 1, and M is smaller than or equal to N; and respectively storing each target data of the M target data and the metadata corresponding to the target data into the N data areas, wherein each data area stores one target data and corresponding metadata.
According to another embodiment of the present invention, there is provided a data storage device including: the device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for partitioning a determined data area to obtain N data areas, the data area is used for storing M target data, N and M are natural numbers which are larger than 1, and M is smaller than or equal to N; a first storage module, configured to store each target data of the M target data and metadata corresponding to each target data into the N data areas, respectively, where each data area stores one target data and corresponding metadata.
Optionally, the apparatus further comprises: and the second storage module is used for storing M metadata corresponding to the M target data into a metadata area after the determined data area is blocked to obtain N data areas, wherein the data area and the metadata area are positioned in different drive symbols.
Optionally, the apparatus further comprises: a first recovery module, configured to recover, after each target data of the M target data and the metadata corresponding to each target data are stored in the N data areas, the M metadata from the data area when the M metadata stored in the metadata area are damaged.
Optionally, the first recovery module includes: a first determination unit configured to determine location information of metadata corresponding to each target data stored in the data area; a first extraction unit, configured to extract, according to the location information of the metadata corresponding to each piece of target data, the metadata corresponding to each piece of target data from the data area, respectively, to obtain M discrete metadata; and the aggregation unit is used for aggregating the M discrete metadata to recover the metadata in the metadata area.
Optionally, the apparatus further comprises: a first determining module, configured to format the metadata area to determine parameter information of the metadata area before storing M metadata corresponding to the M target data in the metadata area, where the parameter information of the metadata area includes at least one of: the drive letter of the metadata area, the sequence number in the metadata area and the offset information in the metadata area.
Optionally, the second determining module is configured to format the data area to determine parameter information of the data area before the determined data area is partitioned to obtain N data areas, where the parameter information of the data area includes at least one of: the drive letter of the data area, the serial number in the data area and the offset information in the data area.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the determined data area is partitioned to obtain N data areas, wherein the data area is used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N; and respectively storing each target data in the M target data and the metadata corresponding to each target data into N data areas, wherein each data area stores one target data and corresponding metadata. The purpose of storing data and metadata separately can be achieved. Therefore, the problem of data storage in the related art can be solved, and the effect of effectively managing the data storage is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a data storage method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data storage method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data area segment according to an embodiment of the present invention;
FIG. 4 is a flow diagram of replying to metadata, according to an embodiment of the invention;
FIG. 5 is a flow diagram of superblock management, according to an alternative embodiment of the present invention;
fig. 6 is a block diagram of a data storage device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the operation on a mobile terminal, fig. 1 is a hardware structure block diagram of the mobile terminal of a data storage method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the data storage method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the present embodiment, a data storage method is provided, and fig. 2 is a flowchart of a data storage method according to an embodiment of the present invention, where as shown in fig. 2, the flowchart includes the following steps:
step S202, partitioning the determined data area to obtain N data areas, wherein the data area is used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N;
step S204, storing each target data of the M target data and the metadata corresponding to each target data into N data areas, respectively, where each data area stores one target data and the corresponding metadata.
Alternatively, in this embodiment, the data area is segmented by zones, and information stored for each zone in the metadata is recorded in each zone, as shown in fig. 3. Thus, when the metadata (Inode) is damaged, the previous metadata information can be recovered through the metadata information in the zone. The proportion occupied by Inode is extremely small and can be ignored in the actual capacity calculation.
Alternatively, in this embodiment, compared with the prior art in which target data and metadata are separately stored in different drive letters, in this embodiment, another piece of metadata is stored in the data area of the same drive letter in a one-to-one correspondence with the target data, and the metadata can be recovered from other drive letters in the event of metadata loss.
Alternatively, the execution subject of the above steps may be a terminal or the like, but is not limited thereto.
Through the steps, the determined data area is partitioned to obtain N data areas, wherein the data area is used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N; and respectively storing each target data in the M target data and the metadata corresponding to each target data into N data areas, wherein each data area stores one target data and corresponding metadata. The purpose of storing data and metadata separately can be achieved. Therefore, the problem of data storage in the related art can be solved, and the effect of effectively managing the data storage is achieved.
In an optional embodiment, after the partitioning the determined data partition to obtain N data regions, the method further includes:
s1, storing M metadata corresponding to the M target data into a metadata area, wherein the data area and the metadata area are located in different drive letters.
Optionally, in this embodiment, the target data and the metadata may be stored in different drive letters, and the performance of writing data in the data area may be utilized to the maximum extent. Based on the existing data management mode, the storage performance is improved.
Alternatively, the location where the metadata is stored may be any designated location, and any storage medium may be designated as the storage location of the metadata and the superblock, thereby increasing the flexibility of data management. And meanwhile, the management of the metadata is more convenient.
In an optional embodiment, after storing each target data of the M target data and the metadata corresponding to each target data into the N data areas, respectively, the method further includes:
s1, in the case where the M pieces of metadata stored in the metadata area are damaged, the M pieces of metadata are restored from the data area.
In an alternative embodiment, in the case where M pieces of metadata stored in the metadata area are damaged, recovering the M pieces of metadata from the data area includes:
s1, determining the position information of the metadata corresponding to each target data stored in the data area;
s2, according to the position information of the metadata corresponding to each target data, extracting the metadata corresponding to each target data from the data area respectively to obtain M discrete metadata;
s3, collecting M discrete metadata to recover the metadata in the metadata region.
Optionally, in this embodiment, if the superblock and the metadata are damaged, repair is performed according to the damaged degree, and there are cases of mount failure and file system loss. The mount failure case is a superblock or metadata check failure. At this time, only the data needs to be retrieved according to the inode of the data area. The hard disk mounting is used for judging whether mounting fails or not, the mounting is used for judging whether metadata verification fails or not, and if the metadata verification fails, the data of the metadata area is recovered through the inode information of the corresponding position of the data area. And if the superblock check fails, recovering through the metadata area. If the metadata area is completely lost or the hard disk of the metadata area is damaged, the metadata information can be directly recovered by the above method, and only the metadata position recorded in the superblock needs to be modified. As shown in fig. 4, restoring metadata includes the steps of:
s401: determining that the hard disk mounting fails;
s402: whether the metadata check is successful;
s403: under the condition that the metadata verification is not successful, acquiring the error position of the metadata;
s404: acquiring the position of the data area according to the metadata position;
s405: acquiring metadata information of a data area position;
s406: updating the metadata area information;
s407: judging whether the super block verification is successful or not under the condition that the metadata verification is successful;
s408: under the condition that the super block is successfully verified, mounting is successful;
s409: and under the condition that the super block is not successfully verified, restoring the normal super block according to the information of the metadata area.
In an optional embodiment, before storing M metadata corresponding to the M target data into the metadata area, the method further includes:
s1, formatting the metadata area to determine parameter information of the metadata area, wherein the parameter information of the metadata area includes at least one of: a drive letter where the metadata area is located, a sequence number in the metadata area, and offset information in the metadata area.
In an optional embodiment, before the partitioning the determined data area to obtain N data areas, the method further includes:
s2, formatting the data area to determine parameter information of the data area, wherein the parameter information of the data area includes at least one of: the drive letter of the data area, the serial number in the data area, and the offset information in the data area.
Optionally, in this embodiment, as shown in fig. 5, the method for optimizing superblock management based on monitoring domain includes the following steps:
s501: inputting formatting parameters;
s502: formatting the position of a specified super block, wherein the position relates to a disk identifier, a serial number, a partition number and an offset, the super block is a structure for storing metadata of a corresponding file system, the stored metadata comprises the size of the file system, the size of a block and the number of idle and used blocks, and the type, the size and the state of the file system are saved;
s503: formatting the location of a designated metadata inode, relating to a drive letter, a sequence number, a partition number, and an offset;
s504: the formatting specifies the location of the data area, relating to the drive letter, sequence number, partition number and offset.
Optionally, in this embodiment, the metadata inode areas of the multiple data areas may be managed in one drive letter, or the metadata corresponding to one data area may be managed by using one drive letter. Meanwhile, the drive letter is not fixed as the SSD, and can be any storage medium, and can be a certain partition.
In summary, in this embodiment, the metadata and the data may be stored on different drive letters, and the data is written on only one disk, so that the performance of writing data in the data area may be utilized to the greatest extent. Based on the existing data management mode, the storage performance is greatly improved. The position where the metadata is stored can be any designated position, and any storage medium can be designated as the storage position of the metadata and the superblock, so that the flexibility of data management is increased. And meanwhile, the management of the metadata is more convenient. According to the method for dispersedly storing the information of the metadata in the data area, the metadata can be quickly recovered when the metadata in the metadata area is damaged.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a data storage device is further provided, and the data storage device is used to implement the foregoing embodiments and preferred embodiments, and the description of the data storage device is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a data storage apparatus according to an embodiment of the present invention, as shown in fig. 6, the apparatus including:
a first determining module 62, configured to block the determined data area to obtain N data areas, where the data area is used to store M target data, N and M are both natural numbers greater than 1, and M is less than or equal to N;
the first storage module 64 is configured to store each target data of the M target data and the metadata corresponding to each target data into N data areas, respectively, where each data area stores one target data and corresponding metadata.
Optionally, the apparatus further comprises:
and the second storage module is used for storing M metadata corresponding to the M target data into a metadata area after the determined data area is blocked to obtain N data areas, wherein the data area and the metadata area are positioned in different drive symbols.
Optionally, the apparatus further comprises:
a first recovery module, configured to recover, after each target data of the M target data and the metadata corresponding to each target data are stored in the N data areas, the M metadata from the data area when the M metadata stored in the metadata area are damaged.
Optionally, the first recovery module includes:
a first determination unit configured to determine location information of metadata corresponding to each target data stored in the data area;
a first extraction unit, configured to extract, according to the location information of the metadata corresponding to each piece of target data, the metadata corresponding to each piece of target data from the data area, respectively, to obtain M discrete metadata;
and the aggregation unit is used for aggregating the M discrete metadata to recover the metadata in the metadata area.
Optionally, the apparatus further comprises:
a first determining module, configured to format the metadata area to determine parameter information of the metadata area before storing M metadata corresponding to the M target data in the metadata area, where the parameter information of the metadata area includes at least one of: the drive letter of the metadata area, the sequence number in the metadata area and the offset information in the metadata area.
Optionally, the second determining module is configured to format the data area to determine parameter information of the data area before the determined data area is partitioned to obtain N data areas, where the parameter information of the data area includes at least one of: the drive letter of the data area, the serial number in the data area and the offset information in the data area.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, partitioning the determined data area to obtain N data areas, wherein the data areas are used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N;
s2, storing each of the M pieces of object data and the metadata corresponding to each of the object data in N data areas, respectively, where each of the data areas stores one piece of object data and the corresponding metadata.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, partitioning the determined data area to obtain N data areas, wherein the data areas are used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N;
s2, storing each of the M pieces of object data and the metadata corresponding to each of the object data in N data areas, respectively, where each of the data areas stores one piece of object data and the corresponding metadata.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. A method of storing data, comprising:
partitioning the determined data area to obtain N data areas, wherein the data area is used for storing M target data, N and M are natural numbers larger than 1, and M is smaller than or equal to N;
and respectively storing each target data of the M target data and the metadata corresponding to each target data into the N data areas, wherein each data area stores one target data and corresponding metadata.
2. The method of claim 1, wherein after blocking the determined data regions to obtain N data regions, the method further comprises:
storing M metadata corresponding to the M target data into a metadata area, wherein the data area and the metadata area are located in different drive letters.
3. The method according to claim 2, wherein after storing each target data of the M target data and the metadata corresponding to each target data into the N data areas, respectively, the method further comprises:
and in the event that the M metadata stored in the metadata area are damaged, recovering the M metadata from the data area.
4. The method according to claim 3, wherein in the event that the M metadata stored in the metadata area are corrupted, recovering the M metadata from the data area comprises:
determining the position information of metadata corresponding to each target data stored in the data area;
according to the position information of the metadata corresponding to each target data, respectively extracting the metadata corresponding to each target data from the data area to obtain M discrete metadata;
aggregating the M discrete metadata to recover the metadata in the metadata region.
5. The method according to claim 2, wherein before storing M metadata corresponding to the M target data into the metadata area, the method further comprises:
formatting the metadata region to determine parameter information of the metadata region, wherein the parameter information of the metadata region includes at least one of: the drive letter of the metadata area, the sequence number in the metadata area and the offset information in the metadata area.
6. The method of claim 1, wherein before blocking the determined data regions to obtain N data regions, the method further comprises:
formatting the data area to determine parameter information of the data area, wherein the parameter information of the data area includes at least one of: the drive letter of the data area, the serial number in the data area and the offset information in the data area.
7. A data storage device, comprising:
the device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for partitioning a determined data area to obtain N data areas, the data area is used for storing M target data, N and M are natural numbers which are larger than 1, and M is smaller than or equal to N;
a first storage module, configured to store each target data of the M target data and metadata corresponding to each target data into the N data areas, respectively, where each data area stores one target data and corresponding metadata.
8. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010071841.7A CN111274219B (en) | 2020-01-21 | 2020-01-21 | Data storage method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010071841.7A CN111274219B (en) | 2020-01-21 | 2020-01-21 | Data storage method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111274219A true CN111274219A (en) | 2020-06-12 |
CN111274219B CN111274219B (en) | 2023-12-08 |
Family
ID=70999110
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010071841.7A Active CN111274219B (en) | 2020-01-21 | 2020-01-21 | Data storage method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111274219B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113468008A (en) * | 2021-07-13 | 2021-10-01 | 深圳市越疆科技有限公司 | Detection method, device and equipment of safety controller and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009140869A1 (en) * | 2008-05-19 | 2009-11-26 | 华为技术有限公司 | Metadata uploading method, device, system and terminal |
CN106294193A (en) * | 2015-06-03 | 2017-01-04 | 杭州海康威视***技术有限公司 | Storage device and piecemeal based on this storage device storage method |
CN107315659A (en) * | 2017-06-27 | 2017-11-03 | 郑州云海信息技术有限公司 | The redundancy backup method and device of a kind of metadata |
CN108108422A (en) * | 2017-12-15 | 2018-06-01 | 郑州云海信息技术有限公司 | A kind of metadata acquisition methods, device and the medium of Ceph file system |
CN109960611A (en) * | 2019-03-07 | 2019-07-02 | 杭州迪普科技股份有限公司 | Method, apparatus, electronic equipment and the machine readable storage medium that data are restored |
CN110275861A (en) * | 2019-06-25 | 2019-09-24 | 北京明略软件***有限公司 | Date storage method and device, storage medium, electronic device |
-
2020
- 2020-01-21 CN CN202010071841.7A patent/CN111274219B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009140869A1 (en) * | 2008-05-19 | 2009-11-26 | 华为技术有限公司 | Metadata uploading method, device, system and terminal |
CN106294193A (en) * | 2015-06-03 | 2017-01-04 | 杭州海康威视***技术有限公司 | Storage device and piecemeal based on this storage device storage method |
CN107315659A (en) * | 2017-06-27 | 2017-11-03 | 郑州云海信息技术有限公司 | The redundancy backup method and device of a kind of metadata |
CN108108422A (en) * | 2017-12-15 | 2018-06-01 | 郑州云海信息技术有限公司 | A kind of metadata acquisition methods, device and the medium of Ceph file system |
CN109960611A (en) * | 2019-03-07 | 2019-07-02 | 杭州迪普科技股份有限公司 | Method, apparatus, electronic equipment and the machine readable storage medium that data are restored |
CN110275861A (en) * | 2019-06-25 | 2019-09-24 | 北京明略软件***有限公司 | Date storage method and device, storage medium, electronic device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113468008A (en) * | 2021-07-13 | 2021-10-01 | 深圳市越疆科技有限公司 | Detection method, device and equipment of safety controller and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111274219B (en) | 2023-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111831548B (en) | Dependency relationship topological graph drawing method and device | |
CN107911249B (en) | Method, device and equipment for sending command line of network equipment | |
CN107704360B (en) | Monitoring data processing method, equipment, server and storage medium | |
CN108108286A (en) | Method of data capture and device, server, storage medium | |
CN105871587A (en) | Log uploading method and device | |
CN112434039A (en) | Data storage method, device, storage medium and electronic device | |
CN111858146B (en) | Method, apparatus and computer program product for recovering data | |
CN105260639A (en) | Face recognition system data update method and device | |
CN113392082A (en) | Log duplicate removal method and device, electronic equipment and storage medium | |
CN111274219B (en) | Data storage method and device, storage medium and electronic device | |
CN108509322B (en) | Method for avoiding excessive return visit, electronic device and computer readable storage medium | |
US20160283306A1 (en) | Information processing apparatus, information processing method, and data center system | |
CN111694703A (en) | Cache region management method and device and computer equipment | |
CN108271420B (en) | Method for managing files, file system and server system | |
CN111367916B (en) | Data storage method and device | |
CN116015425B (en) | Optical module control method and device, storage medium and electronic device | |
CN115599311B (en) | Polarity inversion method and apparatus, storage medium, and electronic apparatus | |
CN111143899A (en) | Method and device for storing data, storage medium and electronic device | |
CN115878381A (en) | Data recovery method and device based on SRM disc, storage medium and electronic device | |
CN110968456A (en) | Method and device for processing fault disk in distributed storage system | |
CN113132241B (en) | ACL template dynamic configuration method and device | |
CN110704198A (en) | Data operation method, device, storage medium and processor | |
CN111625502B (en) | Data reading method and device, storage medium and electronic device | |
CN107608809B (en) | Exception handling method and device | |
CN113535654A (en) | Log processing method, system, electronic device and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |