CN113467716B - Method, device, equipment and readable medium for data storage - Google Patents

Method, device, equipment and readable medium for data storage Download PDF

Info

Publication number
CN113467716B
CN113467716B CN202110656301.XA CN202110656301A CN113467716B CN 113467716 B CN113467716 B CN 113467716B CN 202110656301 A CN202110656301 A CN 202110656301A CN 113467716 B CN113467716 B CN 113467716B
Authority
CN
China
Prior art keywords
data
array
stored
area
storing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110656301.XA
Other languages
Chinese (zh)
Other versions
CN113467716A (en
Inventor
白建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110656301.XA priority Critical patent/CN113467716B/en
Publication of CN113467716A publication Critical patent/CN113467716A/en
Application granted granted Critical
Publication of CN113467716B publication Critical patent/CN113467716B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a data storage method, a device, equipment and a readable medium, wherein the method comprises the following steps: storing the data to be stored into a first array; dividing the hard disk into three areas according to a preset proportion, and storing addresses corresponding to the three areas into a second array; storing each data in the first array into an address corresponding to a region in the second array; and responding to the fact that each data in the first array is completely stored, updating the data in the first array, and storing each data in the updated first array into an address corresponding to the next area in the second array. By using the scheme of the invention, the operation times can be reduced, the operation complexity is reduced, the storage performance is improved, the maintainability is strong, and the maintenance cost is low.

Description

Method, device, equipment and readable medium for data storage
Technical Field
The present invention relates to the field of computers, and more particularly to a method, apparatus, device, and readable medium for data storage.
Background
The indexes such as performance, reliability and the like of SSD solid state drives published by different manufacturers are all administrative, and transverse comparison is difficult. For this reason, the united states Joint Electron Device Engineering Council (JEDEC) published the solid state disk standard specifications JESD218 and JESD219 that are expected to solve this problem.
In order to achieve the objective of SSD industry standards, JEDEC JC-64.8 solid State disk Committee first provided meaningful, practical, durability and reliability metrics to allow customers to better choose the correct SSD applications and workloads. In 9 2010, JEDEC announced that two widely expected solid state disk standards were promulgated: JESD218 Solid State Disk (SSD) requirements and durability test methods and JESD219 solid state disk durability workload.
The conventional way to implement JESD219 is to use a third party tool to generate data. However, the third party tool is specially installed and configured, each time the third party tool changes an environment, the configuration is complex, the professional requirement is high, the third party tool uses a special script to control the generated data format, learns the grammar of the script again, the third party tool can operate only on a specific platform, all scenes are difficult to cover, and the problem of omission is easy.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, apparatus, device and readable medium for data storage, which can reduce the number of operations, reduce the complexity of operations, improve the storage performance, and have strong maintainability and low maintenance cost.
Based on the above objects, an aspect of an embodiment of the present invention provides a method for data storage, including the steps of:
storing the data to be stored into a first array;
dividing the hard disk into three areas according to a preset proportion, and storing addresses corresponding to the three areas into a second array;
storing each data in the first array into an address corresponding to a region in the second array;
and responding to the fact that each data in the first array is completely stored, updating the data in the first array, and storing each data in the updated first array into an address corresponding to the next area in the second array.
According to one embodiment of the invention, the first array is a= {0.5k,4}, {1k,1}, {1.5k,1}, {2k,1}, {2.5k,1}, {3k,1}, {3.5k,1}, {4k,67}, {8k,10}, {16k,7}, {32k,3}, {64k,3}, wherein each data in the first array comprises a data block size and a data block number.
According to one embodiment of the present invention, the second array is b= { first area, second area, first area, third area, first area, second area }.
According to one embodiment of the present invention, dividing the hard disk into three areas according to a preset ratio includes:
dividing 50% of storage space of a hard disk into a first area;
dividing the remaining 30% of the storage space of the hard disk into a second area;
the remaining 20% of the storage space of the hard disk is divided into a third area.
According to one embodiment of the invention, storing data to be stored in a first array includes:
sequentially acquiring the size and the number of data blocks stored in each data in the first array;
sequentially storing the data to be stored into a first array according to the acquired data block size and the acquired data block number;
and in response to the first array failing to store all of the data to be stored, storing the rest of the data into the first array when the first array is updated.
According to one embodiment of the present invention, storing each data in the first array into an address corresponding to a region in the second array includes:
reading the size of the data blocks and the number of the data blocks of the first data which are not stored in the first array;
reading one data in the second array to obtain a region where the data is to be stored;
generating a random number based on the read area to be stored, and performing alignment processing on the random number and the size of the first data block obtained by reading;
and taking the random number as a starting logical address of data storage, and writing the first data which is not stored into the read area to be stored.
According to one embodiment of the present invention, writing the first data, which is not stored, into the read area to be stored using the random number as the start logical address of the data storage includes:
writing a first data block in first data which is not stored into a read area to be stored;
judging whether the writing times are smaller than the number of the read data blocks or not;
and writing the second data block in the first data which is not stored into the read area to be stored until the writing times are equal to the number of the read data blocks.
In another aspect of an embodiment of the present invention, there is also provided an apparatus for storing data, the apparatus including:
the first storage module is configured to store data to be stored into the first array;
the dividing module is configured to divide the hard disk into three areas according to a preset proportion and store addresses corresponding to the three areas into the second array;
the second storage module is configured to store each data in the first array into an address corresponding to a region in the second array;
and the updating module is configured to respond to that each data in the first array is completely stored to update the data in the first array, and store each data in the updated first array into an address corresponding to a next area in the second array.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: the data storage method provided by the embodiment of the invention is characterized by storing the data to be stored into the first array; dividing the hard disk into three areas according to a preset proportion, and storing addresses corresponding to the three areas into a second array; storing each data in the first array into an address corresponding to a region in the second array; and responding to the technical scheme that each data in the first array is completely stored and updated, and each data in the first array is stored in the address corresponding to the next area in the second array after updating, the operation times can be reduced, the operation complexity is reduced, the storage performance is improved, the maintainability is strong, and the maintenance cost is low.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method of data storage according to one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for data storage according to one embodiment of the invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the above object in view, a first aspect of the embodiments of the present invention proposes an embodiment of a method of data storage. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, storing data to be stored into a first array.
The first array is a= {0.5K,4}, {1K,1}, {1.5K,1}, {2K,1}, {2.5K,1}, {3K,1}, {3.5K,1}, {4K,67}, {8K,10}, {16K,7}, {32K,3}, {64K,3}, wherein the data of 0.5K,1K etc. in the first array represents the data block size, the number of data blocks is represented by the number of data blocks after the data block size, for example {0.5K,4} represents the data block of 0.5K size. For example, there are 3 pieces of data to be stored, 10K, 100K and 500K respectively, the first 4 pieces of data of 0.5K in 10K are stored in the first part of the array a, the last 1 pieces of data of 1K are stored in the second part, the last 1 pieces of data of 1.5K are stored in the third part, and so on until the whole storage of 10K data is completed, then 100K data are stored in the position where the first array a is not stored yet until the first array a is full, at this time, a part of data of 500K is not stored yet, then when the first array a is waited for to update the data, then the data which is not stored is written into the first array a.
S2, dividing the hard disk into three areas according to a preset proportion, and storing addresses corresponding to the three areas into a second array.
The area space of the hard disk is divided into a first area a, a second area b and a third area c. Wherein the area a occupies 50% of the entire storage space and the area b occupies 30% of the entire storage space. The area c is 20% of the total memory size, and the second group b= { a, B, a, c, a, B, a, c, a, B }.
S3, storing each data in the first array into an address corresponding to a region in the second array.
Taking the area corresponding to the second array from the beginning of the first array as an example, reading {0.5K,4} in the first array A, reading an a area in the second array B, generating a random number according to the a area, aligning the random number with a first 0.5K data block in the first array A as a starting logic address of data storage, storing the first 0.5K data in a hard disk corresponding to the a area, then storing the second 0.5K until 4 0.5K data blocks are stored, then reading {1K,1} in the first array A, sequentially storing the 1K data blocks in the a area, and then reading the data from the first array A until the data in the first array A is completely stored.
And S4, responding to the fact that all data in the first array are stored, updating the data in the first array, and storing each data in the updated first array into an address corresponding to a next area in the second array.
After the data in the first array a is completely stored, the data in the first array a is updated, that is, the data to be stored in the first array a which is not stored in the first array a is continuously stored in the first array a, then the data is stored from the first data in the first array a, at this time, the second data in the second array B needs to be read, for example, the second data is read into the area B, the updated data in the first array a is stored in the area B according to the method until all the data are stored in the hard disk, and if the data in the second array B is read to the last, the next storage is read from the first, and the process is repeated.
According to the technical scheme, JESD219 regulation can be met, operation times can be reduced, operation complexity is reduced, storage performance is improved, maintainability is high, and maintenance cost is low.
In a preferred embodiment of the invention, the first array is a= { {0.5K,4}, {1K,1}, {1.5K,1}, {2K,1}, {2.5K,1}, {3K,1}, {3.5K,1}, {4K,67}, {8K,10}, {16K,7}, {32K,3}, {64K,3}, wherein each data in the first array comprises a data block size and a data block number, that is, the data of 0.5K,1K etc. in the first array represents the data block size, the number following the data block size represents the data block number, for example {0.5K,4} represents the data block of 0.5K size.
In a preferred embodiment of the present invention, the second array is b= { first area, second area, first area, third area, first area, second area }.
In a preferred embodiment of the present invention, dividing the hard disk into three areas according to a preset ratio includes:
dividing 50% of storage space of a hard disk into a first area;
dividing the remaining 30% of the storage space of the hard disk into a second area;
the remaining 20% of the storage space of the hard disk is divided into a third area. The area space of the hard disk is divided into a first area a, a second area b and a third area c. Wherein the area a occupies 50% of the entire storage space and the area b occupies 30% of the entire storage space. The area c is 20% of the total memory size, and the second group b= { a, B, a, c, a, B, a, c, a, B }.
In a preferred embodiment of the present invention, storing data to be stored in a first array includes:
sequentially acquiring the size and the number of data blocks stored in each data in the first array;
sequentially storing the data to be stored into a first array according to the acquired data block size and the acquired data block number;
and in response to the first array failing to store all of the data to be stored, storing the rest of the data into the first array when the first array is updated. For example, there are 3 pieces of data to be stored, 10K, 200K and 600K respectively, the first 4 pieces of data of 0.5K in 10K are stored in the first part of the array a, the last 1 pieces of data of 1K are stored in the second part, the last 1 pieces of data of 1.5K are stored in the third part, and so on until the whole storage of 10K data is completed, then 200K data are stored in the position where the first array a is not stored yet until the first array a is full, at this time, a part of data of 600K is not stored yet, then when the first array a is waited for to update the data, then the data which is not stored is written into the first array a.
In a preferred embodiment of the present invention, storing each data in the first array into an address corresponding to a region in the second array includes:
reading the size of the data blocks and the number of the data blocks of the first data which are not stored in the first array;
reading one data in the second array to obtain a region where the data is to be stored;
generating a random number based on the read area to be stored, and performing alignment processing on the random number and the size of the first data block obtained by reading;
and taking the random number as a starting logical address of data storage, and writing the first data which is not stored into the read area to be stored.
In a preferred embodiment of the present invention, writing the first data, which is not stored, into the read area to be stored using the random number as a start logical address of data storage includes:
writing a first data block in first data which is not stored into a read area to be stored;
judging whether the writing times are smaller than the number of the read data blocks or not;
and writing the second data block in the first data which is not stored into the read area to be stored until the writing times are equal to the number of the read data blocks.
By the technical scheme, the operation times can be reduced, the operation complexity is reduced, the storage performance is improved, the maintainability is strong, and the maintenance cost is low.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
With the above object in mind, in a second aspect of the embodiments of the present invention, there is provided an apparatus for data storage, as shown in fig. 2, an apparatus 200 includes:
the first storage module is configured to store data to be stored into the first array.
The first array is a= {0.5K,4}, {1K,1}, {1.5K,1}, {2K,1}, {2.5K,1}, {3K,1}, {3.5K,1}, {4K,67}, {8K,10}, {16K,7}, {32K,3}, {64K,3}, wherein the data of 0.5K,1K etc. in the first array represents the data block size, the number of data blocks is represented by the number of data blocks after the data block size, for example {0.5K,4} represents the data block of 0.5K size. For example, there are 3 pieces of data to be stored, 10K, 100K and 500K respectively, the first 4 pieces of data of 0.5K in 10K are stored in the first part of the array a, the last 1 pieces of data of 1K are stored in the second part, the last 1 pieces of data of 1.5K are stored in the third part, and so on until the whole storage of 10K data is completed, then 100K data are stored in the position where the first array a is not stored yet until the first array a is full, at this time, a part of data of 500K is not stored yet, then when the first array a is waited for to update the data, then the data which is not stored is written into the first array a.
The dividing module is configured to divide the hard disk into three areas according to a preset proportion and store addresses corresponding to the three areas into the second array.
The area space of the hard disk is divided into a first area a, a second area b and a third area c. Wherein the area a occupies 50% of the entire storage space and the area b occupies 30% of the entire storage space. The area c is 20% of the total memory size, and the second group b= { a, B, a, c, a, B, a, c, a, B }.
And the second storage module is configured to store each data in the first array into an address corresponding to a region in the second array.
Taking the area corresponding to the second array from the beginning of the first array as an example, reading {0.5K,4} in the first array A, reading an a area in the second array B, generating a random number according to the a area, aligning the random number with a first 0.5K data block in the first array A as a starting logic address of data storage, storing the first 0.5K data in a hard disk corresponding to the a area, then storing the second 0.5K until 4 0.5K data blocks are stored, then reading {1K,1} in the first array A, sequentially storing the 1K data blocks in the a area, and then reading the data from the first array A until the data in the first array A is completely stored.
And the updating module is configured to respond to that each data in the first array is completely stored to update the data in the first array, and store each data in the updated first array into an address corresponding to a next area in the second array.
After the data in the first array a is completely stored, the data in the first array a is updated, that is, the data to be stored in the first array a which is not stored in the first array a is continuously stored in the first array a, then the data is stored from the first data in the first array a, at this time, the second data in the second array B needs to be read, for example, the second data is read into the area B, the updated data in the first array a is stored in the area B according to the method until all the data are stored in the hard disk, and if the data in the second array B is read to the last, the next storage is read from the first, and the process is repeated.
In a preferred embodiment of the present invention, the first array is a= {0.5k,4}, {1k,1}, {1.5k,1}, {2k,1}, {2.5k,1}, {3k,1}, {3.5k,1}, {4k,67}, {8k,10}, {16k,7}, {32k,3}, {64k,3}, wherein each data in the first array comprises a data block size and a data block number.
In a preferred embodiment of the present invention, the second array is b= { first area, second area, first area, third area, first area, second area }.
In a preferred embodiment of the present invention, dividing the hard disk into three areas according to a preset ratio includes:
dividing 50% of storage space of a hard disk into a first area;
dividing the remaining 30% of the storage space of the hard disk into a second area;
the remaining 20% of the storage space of the hard disk is divided into a third area.
In a preferred embodiment of the present invention, storing data to be stored in a first array includes:
sequentially acquiring the size and the number of data blocks stored in each data in the first array;
sequentially storing the data to be stored into a first array according to the acquired data block size and the acquired data block number;
and in response to the first array failing to store all of the data to be stored, storing the rest of the data into the first array when the first array is updated.
In a preferred embodiment of the present invention, storing each data in the first array into an address corresponding to a region in the second array includes:
reading the size of the data blocks and the number of the data blocks of the first data which are not stored in the first array;
reading one data in the second array to obtain a region where the data is to be stored;
generating a random number based on the read area to be stored, and performing alignment processing on the random number and the size of the first data block obtained by reading;
and taking the random number as a starting logical address of data storage, and writing the first data which is not stored into the read area to be stored.
In a preferred embodiment of the present invention, writing the first data, which is not stored, into the read area to be stored using the random number as a start logical address of data storage includes:
writing a first data block in first data which is not stored into a read area to be stored;
judging whether the writing times are smaller than the number of the read data blocks or not;
and writing the second data block in the first data which is not stored into the read area to be stored until the writing times are equal to the number of the read data blocks.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor performing the method of:
storing the data to be stored into a first array;
dividing the hard disk into three areas according to a preset proportion, and storing addresses corresponding to the three areas into a second array;
storing each data in the first array into an address corresponding to a region in the second array;
and responding to the fact that each data in the first array is completely stored, updating the data in the first array, and storing each data in the updated first array into an address corresponding to the next area in the second array.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium stores S31 a computer program S32 which, when executed by a processor, performs the method as above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (6)

1. A method of data storage comprising the steps of:
storing data to be stored in a first array, the first array being a= {0.5k,4}, {1k,1}, {1.5k,1}, {2k,1}, {2.5k,1}, {3k,1}, {3.5k,1}, {4k,67}, {8k,10}, {16k,7}, {32k,3}, {64k,3}, wherein each data in the first array comprises a data block size and a data block number, wherein storing the data to be stored in the first array comprises: sequentially acquiring the size and the number of data blocks stored in each data in the first array, sequentially storing the data to be stored in the first array according to the acquired size and the number of the data blocks, and storing the rest data in the first array when the first array is updated in response to the failure of the first array to store all the data to be stored;
dividing the hard disk into three areas according to a preset proportion, and storing addresses corresponding to the three areas into a second array, wherein the second array is B= { first area, second area, first area, third area, first area, second area };
storing each data in the first array into an address corresponding to a region in the second array, wherein storing each data in the first array into an address corresponding to a region in the second array comprises: reading the size and the number of data blocks of first data which are not stored in the first array, reading one data in the second array to obtain a data to be stored area, generating a random number based on the read to-be-stored area, performing alignment processing on the random number and the read to-be-obtained first data block size, taking the random number as a starting logical address of data storage, and writing the first data which are not stored into the read to-be-stored area;
and in response to the fact that all data in the first array are stored, updating the data in the first array, and storing each data in the updated first array into an address corresponding to a next area in the second array.
2. The method of claim 1, wherein dividing the hard disk into three areas according to a predetermined ratio comprises:
dividing 50% of the storage space of the hard disk into a first area;
dividing the remaining 30% of the storage space of the hard disk into a second area;
and dividing the remaining 20% of the storage space of the hard disk into a third area.
3. The method of claim 1, wherein writing the first data not stored into the read region to be stored using the random number as a starting logical address for data storage comprises:
writing a first data block in first data which is not stored into the read area to be stored;
judging whether the writing times are smaller than the number of the read data blocks or not;
and writing a second data block in the first data which is not stored into the read area to be stored until the writing times are equal to the number of the read data blocks.
4. An apparatus for data storage, the apparatus comprising:
a first memory module configured to store data to be stored into a first array of a = {0.5k,4}, {1k,1}, {1.5k,1}, {2k,1}, {2.5k,1}, {3k,1}, {3.5k,1}, {4k,67}, {8k,10}, {16k,7}, {32k,3}, {64k,3}, wherein each data in the first array comprises a data block size and a data block number, wherein storing the data to be stored into the first array comprises: sequentially acquiring the size and the number of data blocks stored in each data in the first array, sequentially storing the data to be stored in the first array according to the acquired size and the number of the data blocks, and storing the rest data in the first array when the first array is updated in response to the failure of the first array to store all the data to be stored;
the dividing module is configured to divide the hard disk into three areas according to a preset proportion, and store addresses corresponding to the three areas into a second array, wherein the second array is B= { the first area, the second area, the first area, the third area, the first area and the second area };
the second storage module is configured to store each data in the first array into an address corresponding to a region in the second array, and is further configured to read the size and the number of data blocks of the first data which are not stored in the first array, read one data in the second array to obtain a region where the data is to be stored, generate a random number based on the read region where the data is to be stored, perform alignment processing on the random number and the read first data block size, take the random number as a starting logical address of data storage, and write the first data which is not stored into the read region where the data is to be stored;
and the updating module is configured to respond to that each data in the first array is completely stored to update the data in the first array, and store each data in the updated first array into an address corresponding to the next area in the second array.
5. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which instructions when executed by the processor implement the steps of the method of any one of claims 1-3.
6. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any of claims 1-3.
CN202110656301.XA 2021-06-11 2021-06-11 Method, device, equipment and readable medium for data storage Active CN113467716B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110656301.XA CN113467716B (en) 2021-06-11 2021-06-11 Method, device, equipment and readable medium for data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110656301.XA CN113467716B (en) 2021-06-11 2021-06-11 Method, device, equipment and readable medium for data storage

Publications (2)

Publication Number Publication Date
CN113467716A CN113467716A (en) 2021-10-01
CN113467716B true CN113467716B (en) 2023-05-23

Family

ID=77869919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110656301.XA Active CN113467716B (en) 2021-06-11 2021-06-11 Method, device, equipment and readable medium for data storage

Country Status (1)

Country Link
CN (1) CN113467716B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383670A (en) * 2016-09-21 2017-02-08 华为技术有限公司 Data processing method and storage device
CN108121813A (en) * 2017-12-27 2018-06-05 东软集团股份有限公司 Data managing method, device, system, storage medium and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7921178B2 (en) * 2008-12-04 2011-04-05 Voltaire Ltd. Device, system, and method of accessing storage
WO2014147840A1 (en) * 2013-03-22 2014-09-25 富士通株式会社 Access control program, disk device, and access control method
US9720769B2 (en) * 2014-12-03 2017-08-01 Sandisk Technologies Llc Storage parameters for a data storage device
CN105353982B (en) * 2015-10-28 2018-12-11 浪潮(北京)电子信息产业有限公司 A kind of data access processing method and device based on circulation array
CN111078128B (en) * 2018-10-22 2023-05-16 浙江宇视科技有限公司 Data management method and device and solid state disk
CN113760186A (en) * 2019-07-30 2021-12-07 华为技术有限公司 Data storage method and device, computing equipment, storage system and storage medium
CN110764705B (en) * 2019-10-22 2023-08-04 北京锐安科技有限公司 Data reading and writing method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383670A (en) * 2016-09-21 2017-02-08 华为技术有限公司 Data processing method and storage device
CN108121813A (en) * 2017-12-27 2018-06-05 东软集团股份有限公司 Data managing method, device, system, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113467716A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
US7757015B2 (en) Device, method and computer program product readable medium for determining the identity of a component
US20060112215A1 (en) Apparatus and method for processing data of flash memory
JP2003058419A (en) Window-based flash memory storage system, and its managing method and access method
US8347052B2 (en) Initializing of a memory area
US10042570B2 (en) Tape backup and restore in a disk storage environment with intelligent data placement
CN107240421B (en) Memory test method and device, storage medium and test terminal
CN105808451B (en) Data caching method and related device
US11380356B2 (en) Flexible on-cylinder limit for drive performance management
CN113467716B (en) Method, device, equipment and readable medium for data storage
KR20150103886A (en) Data processing apparatus for pipeline execution acceleration and method thereof
CN116382582A (en) RAID remapping method, system, equipment and storage medium
US20220223177A1 (en) System and method for write-retry management
US8566686B2 (en) System and method for optimizing read-modify-write operations in a RAID 6 volume
CN110543434B (en) NAND flash device, memory table management method, device and storage medium
JP5824087B2 (en) Method and system for error correction code seeding and storage medium
JP4127307B2 (en) Data storage device, data processing system, data processing method, and data processing device
CN113625950A (en) Method, system, equipment and medium for initializing redundant array of independent disks
CN114265812B (en) Method, device, equipment and medium for reducing access delay of RISC-V vector processor
CN112015328B (en) Method and device for creating 5 th-level redundant array of independent disks
CN110858167A (en) Memory fault isolation method, device and equipment
CN109117312B (en) Data recovery method and device
CN113608681B (en) Data storage method, system, equipment and medium
CN117687929B (en) Request generator, method, apparatus, medium, and program product for validating a cache
KR102172219B1 (en) Apparatus and method for processing metadata of object
CN113805799A (en) Method, device and equipment for managing latest write records of RAID (redundant array of independent disk) array and readable 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