CN112711384A - Data storage method and device based on multiple storage devices - Google Patents

Data storage method and device based on multiple storage devices Download PDF

Info

Publication number
CN112711384A
CN112711384A CN202011644176.2A CN202011644176A CN112711384A CN 112711384 A CN112711384 A CN 112711384A CN 202011644176 A CN202011644176 A CN 202011644176A CN 112711384 A CN112711384 A CN 112711384A
Authority
CN
China
Prior art keywords
storage
data
stored
storage device
magnitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011644176.2A
Other languages
Chinese (zh)
Inventor
王然
苏国忠
潘家铭
王钊
陈丹丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hualu Optical Storage Research Institute Dalian Co ltd
Original Assignee
Hualu Optical Storage Research Institute Dalian 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 Hualu Optical Storage Research Institute Dalian Co ltd filed Critical Hualu Optical Storage Research Institute Dalian Co ltd
Priority to CN202011644176.2A priority Critical patent/CN112711384A/en
Publication of CN112711384A publication Critical patent/CN112711384A/en
Pending legal-status Critical Current

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
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0623Securing storage systems in relation to content
    • 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/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0683Plurality of storage devices

Landscapes

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

Abstract

The invention discloses a data storage method and a device based on a plurality of storage devices, wherein the magnitude of data to be stored which can be stored by the plurality of storage devices at least comprises two, and the method comprises the following steps: when data to be stored is received, determining the data magnitude of the data to be stored; and determining a target storage device corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, and writing the data to be stored into the corresponding target storage device. According to the invention, the available storage space of the plurality of storage devices is divided into at least 2 storage magnitude intervals, when the data to be stored is received, the target storage device corresponding to the data to be stored is determined according to the data magnitude of the data to be stored, the data to be stored is written into the corresponding target storage device, the parallel storage capacity of the storage devices is improved, and when a single storage device fails, the data to be stored can be distributed to other storage devices, so that the system fault tolerance rate is high.

Description

Data storage method and device based on multiple storage devices
Technical Field
The invention relates to the technical field of storage, in particular to a data storage method and device based on a plurality of storage devices.
Background
The storage device comprises a blue-ray disc library, a tape library and the like, and the method for storing and archiving the data by the storage device comprises the steps of writing the data into a cache by archiving backup software, calling a manipulator to operate, loading a specified disc box (or tape) to an optical drive (or tape drive), recording the cached data into an ios9660 file system (or writing the data into the tape by Tar), and finishing the data archiving.
The archiving and storing method in the related art is that when data to be stored is received, the data to be stored is stored in corresponding storage equipment according to the use sequence of the storage equipment, and when the use space of one storage equipment is exhausted, the storage operation of the data to be stored is completed by switching to the next storage equipment until all the data to be stored are stored. However, when the amount of data to be stored is large, the storage method may result in long waiting time for the subsequent data to be stored, and the storage efficiency is low.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defects that when the usage space of one storage device is nearly exhausted, the storage device is switched to the next storage device for storage, which results in long waiting time of the subsequent data to be stored, and low storage efficiency, so as to provide a data storage method, an apparatus and a computer device based on multiple storage devices.
According to a first aspect, the present invention discloses a data storage method based on a plurality of storage devices, where the magnitude of data to be stored that can be stored by the plurality of storage devices includes at least two, including the following steps: when data to be stored is received, determining the data magnitude of the data to be stored; and determining a target storage device corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, and writing the data to be stored into the corresponding target storage device.
Optionally, the method further comprises: obtaining the available storage space of each storage device; determining the space occupation ratio of each storage device according to the available storage space of each storage device; determining a storage magnitude interval of each storage device according to the space ratio; and storing the storage magnitude interval of each storage device in a preset database.
Optionally, the determining, according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, a target storage device corresponding to the data to be stored includes: acquiring the type information of each storage device; storing the type information of each storage device in a preset database; receiving a selection request of a user, wherein the selection request of the user comprises: a storage device type; and determining a target storage device corresponding to the data to be stored according to the selection request of the user, the data magnitude of the data to be stored and the storage magnitude interval of each storage device.
Optionally, the method further comprises: responding to the timing operation; and when the time interval reaches a preset time length, repeatedly executing the steps from the acquisition of the storage space of each storage device to the storage of the storage magnitude interval of each storage device in the preset database.
According to a second aspect, the present invention also discloses a data storage apparatus based on a plurality of storage devices, where the magnitude of data to be stored that can be stored by the plurality of storage devices includes at least two, including: the device comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining the data magnitude of data to be stored when the data to be stored is received; and the second determining module is used for determining the target storage equipment corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage equipment, and writing the data to be stored into the corresponding target storage equipment.
Optionally, the apparatus further comprises: a first obtaining module, configured to obtain an available storage space of each storage device; a third determining module, configured to determine a space fraction of each storage device according to an available storage space of each storage device; the fourth determining module is used for determining the storage magnitude interval of each storage device according to the space ratio; and the first storage module is used for storing the storage magnitude interval of each storage device in a preset database.
Optionally, the second determining module includes: the second acquisition module is used for acquiring the type information of each storage device; the second storage module is used for storing the type information of each storage device in a preset database; a receiving module, configured to receive a selection request of a user, where the selection request of the user includes: a storage device type; and the second determining submodule is used for determining the target storage equipment corresponding to the data to be stored according to the selection request of the user, the data magnitude of the data to be stored and the storage magnitude interval of each storage equipment.
Optionally, the apparatus further comprises: the response module is used for responding to the timing operation; and the repeated execution module is used for repeatedly executing the steps from the acquisition of the storage space of each storage device to the storage of the storage magnitude interval of each storage device in the preset database when the time interval reaches a preset duration.
According to a third aspect, the invention also discloses a computer device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the method for storing data based on multiple storage devices according to the first aspect or any optional implementation of the first aspect.
According to a fourth aspect, the present invention also discloses a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the data storage method based on multiple storage devices according to the first aspect or any one of the optional embodiments of the first aspect.
The technical scheme of the invention has the following advantages:
the invention provides a data storage method and a data storage device based on a plurality of storage devices, wherein the magnitude of data to be stored which can be stored by the plurality of storage devices at least comprises two magnitudes, the magnitude of the data to be stored is determined when the data to be stored is received, a target storage device corresponding to the data to be stored is determined according to the magnitude of the data to be stored, and the data to be stored is written into the corresponding target storage device. According to the invention, the available storage space of the plurality of storage devices is divided into at least 2 storage magnitude intervals, when the data to be stored is received, the target storage device corresponding to the data to be stored is determined according to the data magnitude of the data to be stored, the data to be stored is written into the corresponding target storage device, the plurality of data to be stored can be stored simultaneously, the parallel storage capacity of the storage devices is improved, and when a single storage device fails, the data to be stored can be distributed to other storage devices, so that the system fault tolerance rate is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a specific example of a data storage method based on multiple storage devices according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a specific example of a data storage apparatus based on a plurality of storage devices in an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a computer device.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention discloses a data storage method based on a plurality of storage devices, as shown in fig. 1, the magnitude of data to be stored which can be stored by the plurality of storage devices at least comprises two, the plurality of storage devices are all connected with a server, and the method comprises the following steps:
s11: and when the data to be stored is received, determining the data magnitude of the data to be stored.
Illustratively, the data to be stored is sent from the client to the server, and the sending method can be sending through a wireless network or a wired network. The sending method of the data to be stored is not particularly limited in the embodiments of the present invention, and those skilled in the art may determine the sending method according to the connection method between the client and the server. The receiving method and the sending method of the data to be stored correspond to each other, and are not described herein again. The data to be stored may include only one data packet or may include a plurality of data packets. The embodiment of the invention does not specifically limit the quantity of the data to be stored, and can be determined according to the actual storage requirement. The data magnitude of the data to be stored may be the size of the data to be stored.
S12: and determining a target storage device corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, and writing the data to be stored into the corresponding target storage device.
Exemplarily, determining the target storage device corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device may specifically be: and judging the data magnitude of the data to be stored falls into the storage magnitude interval of which storage device, namely determining the storage device as a target storage device corresponding to the data to be stored.
The storage magnitude interval of each storage device may be determined by the available storage space of each storage device, or may be determined according to the space proportion of each storage device.
The invention provides a data storage method based on a plurality of storage devices, which is characterized in that the magnitude of data to be stored which can be stored by the plurality of storage devices comprises at least two magnitudes, the magnitude of the data to be stored is determined when the data to be stored is received, a target storage device corresponding to the data to be stored is determined according to the magnitude of the data to be stored, and the data to be stored is written into the corresponding target storage device. According to the invention, the available storage space of the plurality of storage devices is divided into at least 2 storage magnitude intervals, when the data to be stored is received, the target storage device corresponding to the data to be stored is determined according to the data magnitude of the data to be stored, the data to be stored is written into the corresponding target storage device, the plurality of data to be stored can be stored simultaneously, the parallel storage capacity of the storage devices is improved, and when a single storage device fails, the data to be stored can be distributed to other storage devices, so that the system fault tolerance rate is high.
As an optional implementation manner of the embodiment of the present invention, the data storage method based on multiple storage devices further includes:
first, the available storage space of each storage device is obtained. The available memory space of the storage device may be obtained by calling the scsi interface of the computer system.
Secondly, the space occupation ratio of each storage device is determined according to the available storage space of each storage device. The proportion of each storage device in the total available storage space, namely the space ratio, can be obtained through the obtained available storage space of each storage device.
And thirdly, determining the storage magnitude interval of each storage device according to the space ratio.
For example, each storage device is divided into storage magnitude intervals by space ratio, the plurality of storage devices may be divided into 2 storage magnitude intervals, or may be divided into a plurality of storage magnitude intervals. When the data is divided into a plurality of storage magnitude intervals, the data to be stored can be stored in different storage devices, and balanced distribution is achieved.
For example, if the space ratio of the storage device 1 is 30%, the space ratio of the storage device 2 is 50%, and the space ratio of the storage device 3 is 80%, the storage level interval of the storage device 1 and the storage device 2 may be [ 0-30% ], or [ 0-20% ], and the storage level interval of the storage device 3 is [ 50% -80% ]. Or the storage magnitude interval of the storage device 1 may be [ 0-30% ], the storage magnitude interval of the storage device 2 is [ 30% -50% ], and the storage magnitude interval of the storage device 3 is [ 50% -80% ].
And thirdly, storing the storage magnitude interval of each storage device in a preset database.
According to the embodiment of the invention, the storage magnitude intervals of the storage devices are stored in the preset database, the preset database is utilized to provide uniform service for the user, the user does not need to consider the available storage space of a single storage device, and the user experience is improved.
As an optional implementation manner of the embodiment of the present invention, the step S12 includes:
first, type information of each storage device is acquired.
Illustratively, the type information of the storage device may include a blu-ray disc, a tape library storage device, and the like. The method for acquiring the type information of the storage device may be acquired by calling a sci interface of the computer system, and the embodiment of the present invention does not specifically limit the type information of the storage device and the method for acquiring the storage device, and may be determined by a person skilled in the art according to actual situations.
And secondly, storing the type information of each storage device in a preset database, wherein the type information of each storage device is also stored in the preset database, so that different users can conveniently screen the storage devices according to requirements.
Thirdly, receiving a selection request of a user, wherein the selection request of the user comprises: the type of device is stored.
Illustratively, different users have different storage device selection tendencies, e.g., there are users who want to store data in tape. The user's selection request includes a storage device type. The selection request of the user may be manually input by the user or input by the user through an intelligent terminal, and the receiving method of the selection request of the user is not particularly limited in the embodiment of the present invention, and may be determined by a person skilled in the art according to a time situation.
And thirdly, determining a target storage device corresponding to the data to be stored according to the selection request of the user, the data magnitude of the data to be stored and the storage magnitude interval of each storage device.
For example, according to a selection request of a user, a data magnitude of data to be stored, and a storage magnitude interval of each storage device, determining a target storage device corresponding to the data to be stored may specifically be: selecting and screening out storage equipment meeting the user requirements according to a selection request of a user, and then determining target storage equipment corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of the screened storage equipment.
The embodiment of the invention can better adapt to the requirements of different users by considering the storage requirements of the users, and improves the user experience.
As an optional implementation manner of the embodiment of the present invention, the data storage method based on multiple storage devices further includes:
first, a response timing operation.
Illustratively, the timing operation can be executed by a clock carried by the server, or by other timing devices connected with the server. The execution subject of the timing operation is not specifically limited in the embodiment of the present invention, and may be determined by a person skilled in the art according to actual conditions.
And secondly, when the time interval reaches the preset time length, repeatedly executing the steps from obtaining the storage space of each storage device to storing the storage magnitude interval of each storage device in a preset database.
The preset time period is exemplarily 1 minute, and the preset time period is not particularly limited in the embodiment of the present invention and can be determined by a person skilled in the art according to actual situations.
The data to be stored is written into the data to be stored, the storage space of the storage device is reduced all the time, the storage magnitude interval of each storage device needs to be adjusted at regular time, and the steps from obtaining the storage space of each storage device to storing the storage magnitude interval of each storage device in the preset database are repeatedly executed, so that the storage magnitude interval of each device is adjusted at regular time.
The embodiment of the present invention further discloses a data storage apparatus based on a plurality of storage devices, as shown in fig. 2, the magnitude of data to be stored that can be stored by the plurality of storage devices includes at least two, including:
the first determining module 21 is configured to determine a data magnitude of the data to be stored when the data to be stored is received; the specific implementation manner is described in the above embodiment in relation to step S11, and is not described herein again.
The second determining module 22 is configured to determine, according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, a target storage device corresponding to the data to be stored, and write the data to be stored into the corresponding target storage device. The specific implementation manner is described in the above embodiment in relation to step S12, and is not described herein again.
The data storage device based on the plurality of storage devices, provided by the invention, has at least two kinds of magnitude of data to be stored, which can be stored by the plurality of storage devices. According to the invention, the available storage space of the plurality of storage devices is divided into at least 2 storage magnitude intervals, when the data to be stored is received, the target storage device corresponding to the data to be stored is determined according to the data magnitude of the data to be stored, the data to be stored is written into the corresponding target storage device, the plurality of data to be stored can be stored simultaneously, the parallel storage capacity of the storage devices is improved, and when a single storage device fails, the data to be stored can be distributed to other storage devices, so that the system fault tolerance rate is high.
As an optional implementation manner of the embodiment of the present invention, the data storage apparatus based on multiple storage devices further includes:
the first acquisition module is used for acquiring the available storage space of each storage device; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The third determining module is used for determining the space occupation ratio of each storage device according to the available storage space of each storage device; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The fourth determining module is used for determining the storage magnitude interval of each storage device according to the space ratio; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The first storage module is used for storing the storage magnitude interval of each storage device in a preset database. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the second determining module 22 includes:
the second acquisition module is used for acquiring the type information of each storage device; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The second storage module is used for storing the type information of each storage device in a preset database; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
A receiving module, configured to receive a selection request of a user, where the selection request of the user includes: a storage device type; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the second determining submodule is used for determining the target storage equipment corresponding to the data to be stored according to the selection request of the user, the data magnitude of the data to be stored and the storage magnitude interval of each storage equipment. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the data storage apparatus based on multiple storage devices further includes:
the response module is used for responding to the timing operation; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the repeated execution module is used for repeatedly executing the steps from the step of obtaining the storage space of each storage device to the step of storing the storage magnitude interval of each storage device in the preset database when the time interval reaches the preset duration. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
An embodiment of the present invention further provides a computer device, as shown in fig. 3, the computer device may include a processor 31 and a memory 32, where the processor 31 and the memory 32 may be connected by a bus or in another manner, and fig. 3 takes the example of being connected by a bus as an example.
The processor 31 may be a Central Processing Unit (CPU). The Processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 32, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first determining module 21 and the second determining module 22 shown in fig. 2) corresponding to the data storage method based on multiple storage devices in the embodiment of the present invention. The processor 31 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 32, that is, implements the data storage method based on multiple storage devices in the above method embodiments.
The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 31, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, and these remote memories may be connected to the processor 31 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 one or more modules are stored in the memory 32 and, when executed by the processor 31, perform a data storage method based on multiple storage devices as in the embodiment shown in fig. 1.
The details of the computer device can be understood with reference to the corresponding related descriptions and effects in the embodiment shown in fig. 1, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A data storage method based on a plurality of storage devices is characterized in that the magnitude of data to be stored which can be stored by the plurality of storage devices comprises at least two, and the method comprises the following steps:
when data to be stored is received, determining the data magnitude of the data to be stored;
and determining a target storage device corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, and writing the data to be stored into the corresponding target storage device.
2. The method of claim 1, further comprising:
obtaining the available storage space of each storage device;
determining the space occupation ratio of each storage device according to the available storage space of each storage device;
determining a storage magnitude interval of each storage device according to the space ratio;
and storing the storage magnitude interval of each storage device in a preset database.
3. The method according to claim 2, wherein the determining, according to the data magnitude of the data to be stored and the storage magnitude interval of each storage device, a target storage device corresponding to the data to be stored includes:
acquiring the type information of each storage device;
storing the type information of each storage device in a preset database;
receiving a selection request of a user, wherein the selection request of the user comprises: a storage device type;
and determining a target storage device corresponding to the data to be stored according to the selection request of the user, the data magnitude of the data to be stored and the storage magnitude interval of each storage device.
4. The method of claim 2, further comprising:
responding to the timing operation;
and when the time interval reaches a preset time length, repeatedly executing the steps from the acquisition of the storage space of each storage device to the storage of the storage magnitude interval of each storage device in the preset database.
5. A data storage apparatus based on a plurality of storage devices, wherein the plurality of storage devices are capable of storing data to be stored in at least two orders, comprising:
the device comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining the data magnitude of data to be stored when the data to be stored is received;
and the second determining module is used for determining the target storage equipment corresponding to the data to be stored according to the data magnitude of the data to be stored and the storage magnitude interval of each storage equipment, and writing the data to be stored into the corresponding target storage equipment.
6. The apparatus of claim 5, further comprising:
a first obtaining module, configured to obtain an available storage space of each storage device;
a third determining module, configured to determine a space fraction of each storage device according to an available storage space of each storage device;
the fourth determining module is used for determining the storage magnitude interval of each storage device according to the space ratio;
and the first storage module is used for storing the storage magnitude interval of each storage device in a preset database.
7. The apparatus of claim 6, wherein the second determining module comprises:
the second acquisition module is used for acquiring the type information of each storage device;
the second storage module is used for storing the type information of each storage device in a preset database;
a receiving module, configured to receive a selection request of a user, where the selection request of the user includes: a storage device type;
and the second determining submodule is used for determining the target storage equipment corresponding to the data to be stored according to the selection request of the user, the data magnitude of the data to be stored and the storage magnitude interval of each storage equipment.
8. The apparatus of claim 6, further comprising:
the response module is used for responding to the timing operation;
and the repeated execution module is used for repeatedly executing the steps from the acquisition of the storage space of each storage device to the storage of the storage magnitude interval of each storage device in the preset database when the time interval reaches a preset duration.
9. A computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the method of storing data based on multiple storage devices of any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for data storage based on a plurality of storage devices according to any one of claims 1 to 4.
CN202011644176.2A 2020-12-30 2020-12-30 Data storage method and device based on multiple storage devices Pending CN112711384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011644176.2A CN112711384A (en) 2020-12-30 2020-12-30 Data storage method and device based on multiple storage devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011644176.2A CN112711384A (en) 2020-12-30 2020-12-30 Data storage method and device based on multiple storage devices

Publications (1)

Publication Number Publication Date
CN112711384A true CN112711384A (en) 2021-04-27

Family

ID=75548077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011644176.2A Pending CN112711384A (en) 2020-12-30 2020-12-30 Data storage method and device based on multiple storage devices

Country Status (1)

Country Link
CN (1) CN112711384A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791739A (en) * 2021-09-26 2021-12-14 重庆紫光华山智安科技有限公司 Data unloading method, system, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967121A (en) * 2017-10-25 2018-04-27 华为技术有限公司 Method for writing data and storage device
CN109542961A (en) * 2018-10-19 2019-03-29 中国平安财产保险股份有限公司 Date storage method, device, computer equipment and storage medium
CN111897487A (en) * 2020-06-15 2020-11-06 北京瀚诺半导体科技有限公司 Method, apparatus, electronic device and medium for managing data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107967121A (en) * 2017-10-25 2018-04-27 华为技术有限公司 Method for writing data and storage device
CN109542961A (en) * 2018-10-19 2019-03-29 中国平安财产保险股份有限公司 Date storage method, device, computer equipment and storage medium
CN111897487A (en) * 2020-06-15 2020-11-06 北京瀚诺半导体科技有限公司 Method, apparatus, electronic device and medium for managing data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791739A (en) * 2021-09-26 2021-12-14 重庆紫光华山智安科技有限公司 Data unloading method, system, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10523507B2 (en) Method and system for tuning performance of microservices-based applications
JP6530462B2 (en) Determining and monitoring the performance capabilities of computer resource services
CN111600952B (en) Scene pushing method, scene pushing execution device, terminal, server and scene pushing system
EP3419247B1 (en) Method and device for storage resource allocation for video cloud storage
CN110166523B (en) Content updating method, device, equipment and computer readable storage medium
CN110321075B (en) Data migration method, device, equipment and storage medium based on nbd equipment
CN104202434A (en) Node access method and device
CN109981702B (en) File storage method and system
CN107566214B (en) Performance test method and device
CN107656807A (en) The automatic elastic telescopic method and device of a kind of virtual resource
CN103607428A (en) Method of accessing shared memory and apparatus thereof
EP4024815A1 (en) Data uploading method, system and apparatus, and electronic device
CN108874324B (en) Access request processing method, device, equipment and readable storage medium
CN108280134B (en) Data circulation system and method based on account limit control, storage medium and terminal
CN112711384A (en) Data storage method and device based on multiple storage devices
CN109977074B (en) HDFS-based LOB data processing method and device
CN108509639B (en) Table information management method, device and readable storage medium
CN113037420B (en) Reading time stamp obtaining method and device, electronic equipment and storage medium
CN110333823B (en) Data migration method, device, equipment and storage medium based on nbd equipment
CN114020214A (en) Storage cluster capacity expansion method and device, electronic equipment and readable storage medium
CN110677463B (en) Parallel data transmission method, device, medium and electronic equipment
CN111405313B (en) Method and system for storing streaming media data
CN112084163A (en) Data writing method and device and computer equipment
CN113946274A (en) Data processing method, device, equipment and medium
CN116578631B (en) Data interaction method, data acquisition equipment, data processing equipment and interaction system

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