CN113296696A - Data access method, computing device and storage medium - Google Patents

Data access method, computing device and storage medium Download PDF

Info

Publication number
CN113296696A
CN113296696A CN202110231751.4A CN202110231751A CN113296696A CN 113296696 A CN113296696 A CN 113296696A CN 202110231751 A CN202110231751 A CN 202110231751A CN 113296696 A CN113296696 A CN 113296696A
Authority
CN
China
Prior art keywords
data
storage medium
migrated
information
written
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
CN202110231751.4A
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.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte 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 Alibaba Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202110231751.4A priority Critical patent/CN113296696A/en
Publication of CN113296696A publication Critical patent/CN113296696A/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/0608Saving storage space on storage systems
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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 embodiment of the application provides a data access method, a computing device and a storage medium, wherein in the embodiment of the application, an access request is obtained, and the access request carries information of access data; determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium; and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request. The user can store the data separately without perception, and the experience of the user is improved.

Description

Data access method, computing device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data access method, a data reading method, a data writing method, a data migration method, a computing device, and a storage medium.
Background
The cloud storage is an online storage mode, and data can be stored in a plurality of virtual servers instead of exclusive servers. The user needing data storage can meet the requirement of data storage by purchasing or leasing the storage space of the virtual server. However, the more data a user stores on a virtual server, the greater the storage cost of the user, so how to make the user experience better when storing a large amount of data is an important issue, and reducing the storage cost is an important issue.
Disclosure of Invention
Aspects of the present disclosure provide a data access method, a data read method, a data write method, a data migration method, a computing device, and a storage medium, which are capable of reducing storage costs while enabling an imperceptible access by a user.
An embodiment of the present application provides a data access method, including: acquiring an access request, wherein the access request carries information of access data; determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium; and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
The embodiment of the application provides a data migration method, which comprises the following steps: scanning data stored in a first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium, wherein the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
The embodiment of the present application further provides a data reading method, including: receiving a reading request, wherein the reading request carries reading data information; determining whether the read data is migrated data according to the read data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium; and if the read data is migrated data, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning.
An embodiment of the present application further provides a data writing method, including: receiving a write-in request, wherein the write-in request carries write-in data information; determining whether the written data is migrated data or not according to the written data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for writing data corresponding to the first storage medium is less than the time for writing data corresponding to the second storage medium; and if the written data is migrated data, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written corresponding to the written data information and the written data, and storing the writing result in a corresponding file of the first storage medium.
An embodiment of the present application further provides a computing device, including: a memory, a processor; the memory for storing a computer program; the processor to scan data stored in a first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium, wherein the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
An embodiment of the present application further provides a computing device, including: a memory, a processor, and a communication component; the memory for storing a computer program; the communication component is used for receiving a reading request, and the reading request carries reading data information; the processor to execute the computer program to: determining whether the read data is migrated data according to the read data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium; and if the read data is migrated data, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning.
An embodiment of the present application further provides a computing device, including: a memory, a processor, and a communication component; the memory for storing a computer program; the communication component is used for receiving a write-in request, and the write-in request carries write-in data information; the processor to execute the computer program to: determining whether the written data is migrated data or not according to the written data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for writing data corresponding to the first storage medium is less than the time for writing data corresponding to the second storage medium; and if the written data is migrated data, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written corresponding to the written data information and the written data, and storing the writing result in a corresponding file of the first storage medium.
An embodiment of the present application further provides a computing device, including: a memory, a processor, and a communication component; the memory for storing a computer program; the communication component is used for acquiring an access request, and the access request carries information of access data; the processor to execute the computer program to: determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium; and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps of the above-mentioned method.
In the embodiment of the application, an access request is obtained, and the access request carries information of access data; determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium; and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
Although the data is stored in the first storage medium and the second storage medium, for the user, the time for accessing the data corresponding to the first storage medium is less than the time for accessing the data corresponding to the second storage medium; the cost of the second storage medium is made lower than that of the first storage medium, thereby reducing the storage cost. In this way, the user does not need to delete the stored data to reduce the storage cost, so that the experience of the user is improved. Meanwhile, although the data is stored in the first storage medium and the second storage medium, no additional operation is required to be performed by the user, and no additional operation and maintenance operation is required to be added. I.e. the access data of the second storage medium can be accessed by sending an access request as usual. The same as the data operation accessing the first storage medium. The user can store the data separately without perception, and the experience of the user is improved. Meanwhile, a large amount of reconstruction cost and operation and maintenance cost can be saved.
Correspondingly, scanning the data stored in the first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium, wherein the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium. The storage cost can be reduced. In this way, the user does not need to delete the stored data to reduce the storage cost, so that the experience of the user is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of a data access system according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for accessing data according to an exemplary embodiment of the present application;
FIG. 3 is a schematic illustration of data migration in an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of reading data according to an exemplary embodiment of the present application;
FIG. 5 is a diagram illustrating writing data in accordance with an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of data writing according to an exemplary embodiment of the present application;
FIG. 7 is a flowchart illustrating a data reading method according to an exemplary embodiment of the present application;
FIG. 8 is a flowchart illustrating a data writing method according to an exemplary embodiment of the present application;
FIG. 9 is a flowchart illustrating a data migration method according to an exemplary embodiment of the present application;
FIG. 10 is a schematic diagram of a data access device according to an exemplary embodiment of the present application;
fig. 11 is a schematic structural diagram of a data reading apparatus according to an exemplary embodiment of the present application;
fig. 12 is a schematic structural diagram of a data writing apparatus according to an exemplary embodiment of the present application;
FIG. 13 is a schematic block diagram of a computing device provided in an exemplary embodiment of the present application;
FIG. 14 is a schematic block diagram of a computing device provided in an exemplary embodiment of the present application;
fig. 15 is a schematic structural diagram of a computing device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Users of cloud services increasingly pay attention to cost control when using file storage resources, and when many users are visited back, the starting points of operations of deleting stock data and transferring data to other cloud products are mostly found to control the total storage cost.
Therefore, the data lifecycle-based management function and the management of cold and hot data are provided, the mode of accessing the cold and hot data is not different, and any additional operation and maintenance operation is not required. And a large amount of reconstruction cost and operation and maintenance cost are saved so as to reduce the storage cost.
Fig. 1 is a schematic structural diagram of a data access system according to an exemplary embodiment of the present application. As shown in fig. 1, the system 100 may include: a first device 101, a second device 102, and the system 100 may further include a third device 103.
The first device 101 may be a device with certain computing capability, may implement a function of sending a request to the second device 102, and may receive data sent by the second device 102. The basic structure of the first device 101 may include: at least one processor. The number of processors may depend on the configuration and type of device with a certain computing power. A device with certain computing capabilities may also include Memory, which may be volatile, such as RAM, non-volatile, such as Read-Only Memory (ROM), flash Memory, etc., or both. The memory typically stores an Operating System (OS), one or more application programs, and may also store program data and the like. In addition to the processing unit and the memory, the device with certain computing capabilities also includes some basic configurations, such as a network card chip, an IO bus, a display component, and some peripheral devices. Alternatively, some peripheral devices may include, for example, a keyboard, a stylus, and the like. Other peripheral devices are well known in the art and will not be described in detail herein. Alternatively, the first device 101 may be a smart terminal, such as a mobile phone, a desktop computer, a notebook, a tablet computer, and the like.
The second device 102 refers to a device that can provide computing processing services in a network virtual environment, and may refer to a device that performs access data lookup and access processing using a network. In physical implementation, the second device 102 may be any device capable of providing computing services, responding to service requests, and performing data processing, and may be, for example, a cloud server, a cloud host, a virtual center, a regular server, and the like. The second device 102 mainly includes a processor, a hard disk, a memory, a system bus, and the like, and is similar to a general computer architecture. The device may have disposed thereon a first storage medium and a second storage medium.
Specifically, the first device 101 sends an access request, and the second device 102 obtains the access request, where the access request carries information of access data; determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium; and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request. Finally, the second device 102 transmits the access result to the first device 101.
Further, the second device 102 that scans data stored in the first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
Specifically, the first device 101 may send a read request to the second device 102, where the read request carries read data information. The second device 102 receives a reading request, wherein the reading request carries reading data information; and determining whether the read data is migrated data or not according to the read data information, if so, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning. I.e. the read data, which may also be referred to as read result, is sent to the first device 101. And the first device 101 receives the reading result and displays the reading result.
In addition, the first device 101 sends a write request to the second device 102, where the write request carries write data information. The second device 102 receives a write request, wherein the write request carries write data information; and determining whether the written data is migrated data or not according to the written data information, if so, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written and the written data corresponding to the written data information, and storing the writing result in a corresponding file of the first storage medium. The second device 102 may send a message of successful writing and the writing result to the first device 101.
It should be understood that at the time of the data migration, the same second device 102 may have the first storage medium and may also have the second storage medium. In addition, when only the first storage medium is in the second device 102, as shown in fig. 1, the data to be migrated may be sent to the third device 103, and the second storage medium is disposed on the third device 103, so that the data migration is completed, which is not described herein again.
The third device 103 may be a device that can provide a computing processing service in a network virtual environment, and may be a device that stores data using a network. In physical implementation, the third device 103 may be any device capable of providing computing services, responding to service requests, and performing data storage, and may be, for example, a cloud server, a cloud host, a virtual center, a regular server, and the like. The third device 103 mainly includes a processor, a hard disk, a memory, a system bus, and the like, and is similar to a general computer architecture.
It should be noted that, for reading data, the second device 102 may obtain the read data from the third device 103, and the third device 103 may send the read data in the migrated data to the second device 102, and then the second device 102 sends the read result to the first device 101.
For writing data, the second device 102 may also obtain the written data from the third device 103, and the third device 103 may send the written data in the migrated data to the second device 102, and then the second device 102 performs data writing to obtain a writing result, and stores the writing result in a corresponding file of the first storage medium. The second device 102 may send a message of successful writing and the writing result to the first device 101 for presentation.
In the data access scenario of the embodiment of the application, the second device 102, such as a cloud server, periodically scans data in the first hard disk deployed by the second device, where the data may be data in units of files. I.e. the files in the first hard disk can be scanned. And according to the migration condition, for example, files or data which are not accessed for 14 days, the files or data are used as the data to be migrated, or files to be migrated. And the data to be migrated or the file to be migrated can be migrated to a second hard disk on the cloud server, wherein the time for reading and writing the data of the second hard disk is longer than the time for reading and writing the data of the first hard disk. In addition, the second hard disk may be provided on another server.
After the migration is completed, the cloud server may receive a read request sent by a user through the first device 101, such as a computer, where the read request may carry read data information, and the read data information has a file identifier, such as a file name. The cloud server may look up data meta information of the corresponding file based on the file name, and the meta information may include information indicating whether data (which may also be a file) is stored in the second storage medium. If so, the migrated data, i.e., the read data, in the corresponding migrated file can be found from the second hard disk according to the read position information of the read data information carried in the read request. Or directly finding the migrated data from the data meta information, reading the migrated data, and returning the data to the computer of the user.
The cloud server may receive a write request sent by a user through the first device 101, such as a computer, where the write request may carry write data information, which has a file identifier, such as a file name. The cloud server may look up data meta information of the corresponding file based on the file name, and the meta information may include information indicating whether data (which may also be a file) is stored in the second storage medium. If yes, acquiring written data in the migrated data from the second storage medium according to the storage position of the corresponding migrated data in the second storage medium; and writing data according to the data to be written carried by the writing request and the acquired written data, for example, merging the data, and storing the writing result into a corresponding file of the first storage medium.
It should be noted that, for application scenarios, scenarios conforming to data storage may be applicable.
In the present embodiment described above, the first device 101, the second device 102, and the third device 103 perform network connection, and the network connection may be wireless connection. If the first device 101, the second device 102, and the third device 103 are communicatively connected, the network format of the mobile network may be any one of 2G (gsm), 2.5G (gprs), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G + (LTE +), WiMax, 5G, and the like.
The following describes the access process of data in detail with reference to the method embodiment.
Fig. 2 is a flowchart illustrating a data access method according to an exemplary embodiment of the present application. The method 200 provided by the embodiment of the present application is executed by a computing device, such as a cloud server. The method 200 comprises the steps of:
201: and acquiring an access request, wherein the access request carries information of access data.
202: and determining whether the access data is migrated data or not according to the information.
The migrated data is migrated from the first storage medium to the second storage medium, and the time for accessing the data corresponding to the first storage medium is less than the time for accessing the data corresponding to the second storage medium.
203: and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
The following is detailed for the above steps:
201: and acquiring an access request, wherein the access request carries information of access data.
The access request may include a read request and a write request. Accessing information of data may include reading data information as well as writing data information.
For example, a user may access the cloud server through a web page of a computer, as shown in fig. 4, and the user may access the cloud server through a website 306 (the cloud server is not shown in fig. 4, but should be understood to be accessing the cloud server). And the computer responds to the reading operation of the user and sends a reading request to the cloud server, and the reading request can carry the information of the read data. Or the like, or, alternatively,
the user accesses the cloud server through a web page of the computer, and as shown in fig. 5, the user may access the cloud server through a website 306 (the cloud server is not shown in fig. 5, but should be understood to be accessing the cloud server). And sending a write-in request to the cloud server by the computer in response to the write-in operation of the user, wherein the write-in request can carry write-in data information.
202: and determining whether the access data is migrated data or not according to the information.
The migrated data is migrated from the first storage medium to the second storage medium, and the time for accessing the data corresponding to the first storage medium is less than the time for accessing the data corresponding to the second storage medium. Accessing data may refer to reading data or writing data. It should be understood that this comparison of times is based on a reference premise that data of the same scale is accessed.
The first storage medium may be a storage medium with better performance, such as a hard disk with better performance, and the storage medium is superior to the second storage medium and may be represented in terms of time for reading and writing data, for example, the time for reading and writing data by the first storage medium is shorter than the time for reading data by the second storage medium. It should be appreciated that since the performance of the first storage medium is better than the performance of the second storage medium, the storage cost of the first storage medium is higher than the storage cost of the second storage medium.
Note that, as for the first storage medium, stored data may be stored in units of files. That is, scanning is performed in units of files when scanning is performed, and migration is performed in units when migration is performed. Of course, other storage units may also be used for storage, such as directly storing data, or storing data in other storage area blocks, and the corresponding scanning and migration are also performed in the corresponding units.
For directly storing with data, the cloud server directly scans all stored data in the first storage medium, such as the first hard disk.
For storage in units of files, the cloud server may directly scan for the files.
The specific implementation process is described in the following from the fact that a user has no perception to access cold and hot data and a large amount of transformation cost and operation and maintenance cost are saved.
For the read process:
specifically, determining whether the access data is migrated data according to the information includes: and searching information corresponding to the read file identification and indicating that the migrated data is stored in the second storage medium.
The read data information may include a read data identifier (which may be the file identifier) of the read data or may include a read file identifier of the read data, that is, the file identifier of the read data. It may also include the storage location of the read data in the file (i.e., the read location of the data in the file), such as the offset, i.e., the starting read bit, within the offset file, and the length of the read data.
For example, as described above, the cloud server may determine metadata information of a corresponding file according to a read file identifier (or a read data identifier, which may also be a read file identifier) in the information, such as a file name, and determine whether the file is migrated data or migrated files (i.e., cold and hot data) from the metadata information in the first storage medium 302.
For the write process:
the writing data information comprises a writing file identifier of data to be written; determining whether the access data is migrated data according to the information, including: searching information which corresponds to the written file identification and represents that the migrated data is stored in a second storage medium;
the written data information may include a written file identifier of the data to be written, or may be a written data identifier (which may be a written file identifier of the written data), or a written file identifier of the written data. The storage location in the write file where the written data is located (i.e. the writing location information of the written data in the write file, which can also be understood as the writing location information required for the data to be written), such as the offset amount, i.e. the starting writing location, in the offset file, and the length of the written data, can also be included.
For example, as described above, the cloud server may determine metadata information of a corresponding written file according to a written file identifier (the data identifier may also be a written file identifier) in the information, such as a file name, and determine whether the written file is migrated data or a migrated file (i.e., hot and cold data) from the metadata information in the first storage medium 302.
203: and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
For the read process:
specifically, determining the storage location of the access data on the second storage medium based on the information includes: and searching the storage position of the read data corresponding to the read file identification in the second storage medium.
When the access request includes a read request, performing access processing on access data according to the access request, including: and returning the acquired access data as read data.
For example, as described above, if not (i.e., hot data), the corresponding read data can be directly found according to the storage location in the first storage medium 302 recorded in the metadata information 401, as shown in fig. 4. Or finding the corresponding file according to the storage position, and acquiring the corresponding read data according to the storage position of the data in the file.
If so, i.e., cold data, has been migrated. The corresponding migrated data or migrated file in the second storage medium 305, i.e. read data or read file, may be found by the cloud server according to the storage location in the metadata information 402. The corresponding migrated data may be read directly, i.e., read data. Or finding the corresponding file according to the storage position, namely reading the file, and acquiring the corresponding read data according to the storage position of the data in the file, namely reading the cold data.
And after the cloud server acquires the read data, returning the read data to the computer of the user for display.
For the write process:
specifically, determining the storage location of the access data on the second storage medium based on the information includes: and searching the storage position of the written data corresponding to the written file identification in the second storage medium.
When the access request includes a write request, performing access processing on access data according to the access request, including: and writing data according to the data to be written and the written data corresponding to the written data information, and storing the writing result into a corresponding file of the first storage medium, wherein the written data is access data.
For example, as described above, if not (i.e., hot data), the corresponding written data can be directly found according to the storage location in the first storage medium 302 recorded in the metadata information 401, as shown in fig. 4. Alternatively, the corresponding write file is found according to the storage location, and the data length is written according to the storage location of the written data in the write file, i.e. the write location, such as the offset in the offset file, i.e. the start write bit, and the length. And acquiring corresponding written data, and writing the data.
If so, i.e., cold data, has been migrated. The corresponding migrated data or migrated file, i.e. written data or written file, in the second storage medium 305, may be found by the cloud server according to the storage location in the metadata information 402, which may also be referred to as a written file. The corresponding migrated data, i.e., written data, may be directly obtained. Or finding the corresponding written file according to the storage position, and acquiring the corresponding written data according to the storage position of the written data in the written file, namely acquiring the corresponding cold data.
After the cloud server obtains the written data, the data to be written is written into the written data in a writing mode such as adding, modifying, covering and the like, and the writing result is obtained and can be stored into the first storage medium or the second storage medium. Meanwhile, the final writing success or failure result can be returned to the computer of the user for displaying.
It should be noted that storing the write result in the second storage medium may still be stored in the location where the previously written data is located. And storing the writing result in the first storage medium, the writing result may be stored in the form of a file.
Specifically, if the access data is migrated data, determining a storage location of the access data in the second storage medium based on the information, and acquiring the migrated data includes: and if the written data in the written file corresponding to the written data information belongs to the migrated data, determining the storage position of the written file in the second storage medium based on the information, and acquiring the written data in the written file from the second storage medium.
Since the foregoing has been set forth, further description is omitted herein.
Wherein writing the data information further comprises: writing position information of the data to be written in the corresponding written file; obtaining access data, comprising: searching the written file according to the storage position; and acquiring the written data in the written file according to the writing position information.
Since the foregoing has been set forth, further description is omitted herein. Only the description is as follows: to enable a better implementation of the writing process, the data writing may be performed by recalling the corresponding migrated data from the second storage medium. And for better data recall and writing, data blocks corresponding to cold data may be recalled.
Specifically, acquiring the written data in the written file according to the writing position information includes: and acquiring a long block corresponding to the written data in the written file according to the writing position information so as to write data into the written file.
Wherein a long block may refer to an extend long block. And the layout (layout) of the file stored on the storage medium may be in the form of variable length blocks (variable extensions), i.e. a file may be composed of a plurality of long blocks. The small file can store all user data by using a plurality of extensions with smaller size, the large file can store complete user data by using a larger number of extensions with larger size, and in order to clarify the use efficiency of the storage space, the larger the number of the extension long block in one file is, the larger the size is.
For example, according to the foregoing, when finding the written data from the second storage medium, the cloud server directly obtains the corresponding long block, where the long block has the written data. So that the data to be written is written into the long block.
The data layout of the above-mentioned files may cause significant write amplification and bandwidth waste for data flow between two storage media types when the user uses low frequency storage and the user is unaware of the writing process. For example, when a user writes new data of length at a certain offset in a file, the written new data is logically located in this ExtentN block. At this time, if data in the ExtentN is recalled (recall) from the NAS low frequency storage according to the ExtentN granularity, serious write amplification and bandwidth waste are caused, because the size of the ExtentN may be large, and the new data length written by the user this time may be small. Then to solve this problem, a targeted optimization can be made without sensing the write flow, and when the user does not sense that the write has migrated to the file on the NAS low frequency storage and the write offset is logically located at the large size extend, a slice (segment) recall approach is adopted.
Specifically, when the initial write bit of the data to be written in the write file in the write location information is greater than the bit threshold, the method 200 further includes: determining a long block corresponding to the written data in the written file according to the writing position information; determining corresponding written data from the long block according to the writing position information, and dividing the long block according to the written data to obtain sub-blocks corresponding to the written data; and writing data according to the data to be written and the sub-blocks, and storing the writing result into a corresponding file of the first storage medium based on the sub-blocks.
For example, as described above, when the bits of the offset are greater than the bit threshold, the cloud server finds the corresponding extentN according to the above-described manner, and then determines the corresponding written data therein. At this time, the extentN may be first divided into a plurality of sub-block segments, and then the cloud server acquires the sub-block segment corresponding to the written data, where the sub-block has corresponding written data. And the cloud server writes the data to be written into the sub-block segment and stores the data into a corresponding file of the first storage medium.
As shown in fig. 6, a file 602 in the second storage medium, which stores user data, wherein a sub-block segment to which data is written is acquired by the cloud server, and the data to be written is written into the sub-block segment, a write result is obtained, and the write result is stored in an extensn, that is, a long block N, in the file 601 in the first storage medium. The long block N does not have any unrecalled data or write results corresponding to unrecalled data.
When the bits of the offset are less than or equal to the bit threshold, data can be written in the sub-block, or data can be written in the long block.
The writing result is finally stored in the first storage medium, so that the user can conveniently find the writing result when writing or reading the writing result next time so as to perform the reading and writing process.
It should be further noted that, in the reading process, after the cloud server acquires the corresponding read data, the read data may be transferred from the second storage medium to the first storage medium, so that the user can subsequently read and write the read data. The transferring process may be similar to the process of storing the writing result to the first storage medium, but there is no data writing process, and the obtained read data is directly transferred to the corresponding file in the first storage medium.
Since the write result is stored in the first storage medium, the recall of the data may be recorded, or which sub-block segments are recalled, in order to facilitate searching for corresponding data in the subsequent read-write process.
Specifically, the method 200 further includes: recording the obtained sub-blocks, wherein the sub-blocks point to corresponding writing results; when a reading request is received and reading data corresponding to reading data information carried by the reading request exists in the recorded sub-blocks, acquiring corresponding reading data from the corresponding sub-blocks to return; or when a write request is received and written data corresponding to the written data information carried by the write request exists in the recorded sub-blocks, writing data according to the data to be written and the corresponding sub-blocks, and storing a write result into a corresponding file of the first storage medium based on the sub-blocks.
For example, as shown in fig. 6, according to the foregoing, the cloud server records the recalled sub-block segment, which may be recorded in the bitmap603, and this bitmap603 may be set in the corresponding metadata information. In the subsequent reading and writing process, after the corresponding metadata information is found, whether the data is recalled or not can be determined according to whether the bitmap603 exists or not and the corresponding sub-block. It should be understood that the sub-blocks herein correspond to the above-described writing results, but the storage locations thereof in the file are the same as those of the recalled data. Thus, the storage location and the writing result of the sub-block can be recorded. The subsequent read and write processes can be implemented according to the storage location or the write result. Thereby improving the efficiency of subsequent data processing and access.
In addition, the method 200 further comprises: and if the access data is the non-migrated data, acquiring the access data from the first storage medium based on the information and performing access processing.
Since the foregoing has been set forth, further description is omitted herein.
In addition, for the above data migration process, the specific implementation manner is as follows:
specifically, the method 200 further includes: scanning data stored in a first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
Wherein scanning data stored in a first storage medium comprises: scanning a file stored in a first storage medium; and when the data in the file accords with the data to be migrated of the preset migration condition, executing the step of migrating the data to be migrated to the second storage medium in a file form.
For example, according to the foregoing, the cloud server scans all files in a first Storage medium, such as a first hard disk, of a Network Attached Storage (NAS) Storage system, and performs a data migration step if data in the file meets to-be-migrated data of a preset migration condition (e.g., data that is not accessed within 14 days), or if the file meets the preset migration condition (e.g., file that is not accessed within 14 days). Or executing, and migrating the file to be migrated to the second storage medium.
In addition, the scanning may be triggered by a time trigger, such as a timing trigger, which may be a user-defined time. The timing trigger may be a user-defined timing, or may be an automatic timing of the cloud server, for example, one 2-hour scanning. For user-defined timing, a user can set timing through a webpage of a computer and send the timing time to the cloud server, and the cloud server can trigger scanning according to the timing time after acquiring the timing time.
It should be noted that, when scanning for the first time, it may be triggered based on the migration condition. For example, after the user provides the migration condition to the cloud server, the cloud server starts scanning within a preset time after receiving the migration condition, such as 2 hours or triggering immediately after receiving the migration condition. The preset time may be provided by a user or autonomously determined by the cloud server.
Specifically, the method 200 further includes: acquiring a migration condition provided by a user as a preset migration condition; determining a corresponding migration task according to a preset migration condition; and executing a migration task, and scanning the data stored in the first storage medium based on the migration task.
The migration condition (which may also be referred to as a life management cycle policy) for managing the data life cycle of the user may be represented as data that has not been accessed within a preset time. Such as data, or files, that have not been accessed for 14 days.
The mode for providing the migration condition by the user may include an Application Programming Interface (API) or console configuration. For example, the user may send the migration conditions through an Open API interface provided, which may send the migration conditions to the cloud server. For the console configuration, the user may pull a console configuration page of the cloud server through a web page of the computer, then perform configuration of the migration condition on the page, and send a configuration request or configuration information to the cloud server through the page. The cloud server receives the configuration request or the configuration information, and then the migration condition can be acquired.
For example, as described above, as shown in fig. 3, after the user 301 sends the lifecycle management policy to the cloud server through the interface API or the console configuration, the cloud server generates a corresponding migration task based on the policy, and after the task is generated, the task may be executed according to the trigger time (i.e., the trigger time of the scanning). The data in its first storage medium 302 is scanned according to the lifecycle management policy.
And the cloud server scans the data to be migrated or scans the corresponding files according to the life cycle management strategy. And taking the data or the files conforming to the life cycle management strategy as corresponding data to be migrated or files to be migrated to a second storage medium of the cloud server. As shown in fig. 3, the cloud server may use data to be migrated that conforms to the lifecycle management policy as cold data 304 and use data that does not conform to the lifecycle management policy as hot data 303. It should be understood that the partitioning of the cold and hot data is based on a lifecycle management policy partitioning, i.e., based on the access frequency of the user. The cloud server performs data migration of the cold data 304 to the second storage medium 305.
It should be noted that the second storage medium may be deployed on other server devices, and based on this, the data to be migrated or the file to be migrated may be migrated to the second storage medium on other servers. Further, as shown in fig. 3, the data stored in the first storage medium may be data from a container arrangement engine K8S (kubernets) 309, a remote dictionary service redis308, an artificial intelligence ai (artificial intelligence)307, a website 306, and the like. The cloud server may support data storage for the user's container arrangement engine K8S (kubernets) 309, remote dictionary service redis308, artificial intelligence ai (intellectual intelligence)307, and website 306, etc.
It should also be noted that: the data migration process may be performed according to a migration condition provided by a user, and the migration condition may determine which storage area of the first storage medium of the user is to be scanned for data, such as an a-directory disk in the first hard disk. The cloud server may perform data migration only for the a-directory disk and the other disks of the user may not perform data migration.
After the user activates the function of the lifecycle management policy for data, the price of the same storage amount is greatly reduced compared with the storage without the lifecycle management policy (i.e., the storage without data migration).
After data migration, in order to facilitate subsequent reading and writing of data by a user, the migrated data may be labeled or described, so that in a subsequent reading and writing process, whether the migrated data belongs to the migrated data or not can be determined, and thus, which storage medium to perform the reading and writing operation from can be determined.
Specifically, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the method 200 further includes: and recording the storage position of the migrated data in the second storage medium, wherein the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
The recording may be performed in a manner of recording in metadata information of the migrated data. The metadata information is used to describe data. Since the embodiment of the present application may also perform scanning and migrating data in units of files, the metadata information may also be used for describing files. The metadata information is associated with a corresponding data identifier (which may be a file identifier, where the file identifier may be a write file identifier and a read file identifier according to different access requests) or a file identifier, such as a file name. As can be seen from the foregoing, the file identifier may be carried by information of the access data in the access request. The metadata information can be determined by the corresponding identification. The metadata information may include the storage location of the migrated data or migrated file (the location may be clear of the second storage medium), and may also include an iNode (index node) number, a user identifier, a data authority, an access time, and the like of the file. The iNode (index node) number of the file may be associated with a file identifier or a data identifier, and has a corresponding relationship, so that the metadata information is associated with the corresponding data identifier (which may be the file identifier) or the file identifier.
During subsequent reading and writing, corresponding metadata information can be determined according to file identifiers (namely corresponding read file identifiers and corresponding write file identifiers) or data identifiers carried in the reading and writing requests, and whether the metadata information is migrated data or migrated files can be determined according to the storage position. It should be understood that for non-migrated data or non-migrated files, i.e., hot data, their corresponding metadata information is also recorded at the storage location of the first storage medium.
However, in order to more directly determine whether the data is migrated data or migrated file, information indicating whether the data is migrated data or migrated file, such as cold data or hot data, may be directly recorded. It should be understood that whether cold or hot data, or information is represented, it can be represented by specific symbols or data or the like. For example, cold data, i.e., migrated data or migrated files, may be a "1". Hot data, i.e., non-migrated data or non-migrated files, may be "0" or the like. The information may also be recorded in the metadata information, and at the same time, the storage location of the migrated data or migrated file may also be recorded. Thus, as described above, subsequent read and write processes can be performed.
Specifically, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the method 200 further includes: information indicating that the migrated data is stored in the second storage medium is recorded, and the indicated information has a correspondence with the information of the access data, so that it is determined whether the access data is migrated data based on the information.
Since the foregoing has been set forth, further description is omitted herein. Only the description is as follows: the information can be stored through the metadata information, or can be directly recorded, recorded through other recording forms, and associated with corresponding data or files, that is, the subsequent reading and writing process can be realized.
Based on this, on the basis of effectively reducing the storage cost for the user, after the user configures a life cycle management strategy and part of data is automatically migrated to the low-frequency storage (namely, the second storage medium storage) to become cold data, the mode of accessing the cold and hot parts of data has no difference, only the access is carried out on the basis of a standard preset interface, and no additional operation and maintenance operation is needed, so that the goal of user service 0 transformation is achieved, and a large amount of transformation cost and operation and maintenance cost are saved. The method meets the requirements of users on cost reduction and efficiency improvement in scenes such as audit filing, database backup and disaster recovery backup.
According to the foregoing, if the user no longer accesses the written result within a future period of time, the written result will be migrated to the NAS low frequency storage again by the configured lifecycle management policy.
Specifically, the method 200 further includes: scanning a corresponding file stored to a first storage medium; and when the data in the file accords with the data to be migrated of the preset migration condition, executing the step of migrating the data to be migrated to the second storage medium in a file form.
For example, according to the foregoing, the cloud server may continue to periodically trigger the task of the life cycle management policy, and scan corresponding data according to the task, and if the file in which the write result is located or the write result directly conforms to the life cycle management policy, the write result may be migrated to the second storage medium in units of files. The written result may also be migrated directly to the second storage medium. Otherwise it remains in the first storage medium.
Based on the similar inventive concept, fig. 7 shows a flowchart of a data reading method according to another exemplary embodiment of the present application. The method 700 provided by the embodiment of the present application is executed by a cloud server, and the method 700 includes the following steps:
701: and receiving a reading request, wherein the reading request carries reading data information.
702: and determining whether the read data is migrated data or not according to the read data information.
The migrated data is migrated from the first storage medium to the second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium
703: and if the read data is migrated data, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning.
Since the detailed description of the embodiment of steps 701-703 has been set forth above, it is not repeated here.
In addition, reference may also be made to various steps in the method 200 described above, where the method 700 is not described in detail.
Based on the similar inventive concept, fig. 8 is a flowchart illustrating a data writing method according to another exemplary embodiment of the present application. The method 800 provided by the embodiment of the present application is executed by a cloud server, and the method 800 includes the following steps:
801: and receiving a write-in request, wherein the write-in request carries write-in data information.
802: and determining whether the written data is migrated data or not according to the written data information.
The migrated data is migrated from the first storage medium to the second storage medium, and the time for writing data corresponding to the first storage medium is less than the time for writing data corresponding to the second storage medium.
803: and if the written data is migrated data, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written corresponding to the written data information and the written data, and storing the writing result in a corresponding file of the first storage medium.
Since the detailed description of the steps 801-803 has been given above, the detailed description is omitted here.
In addition, the method 800 may refer to the steps of the method 200, which are not described in detail.
Based on the similar inventive concept, fig. 9 shows a flowchart of a data migration method according to another exemplary embodiment of the present application. The method 900 provided by the embodiment of the present application is executed by a cloud server, and the method 900 includes the following steps:
901: scanning data stored in a first storage medium;
902: and when the data to be migrated which meets the preset migration condition exists in the data, migrating the data to be migrated to a second storage medium.
And the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium.
903: and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
Since the detailed description of the specific implementation of steps 901-903 has been described above, it is not repeated here.
In addition, the method 900 further includes: acquiring a migration condition provided by a user as a preset migration condition; determining a corresponding migration task according to a preset migration condition; and executing the migration task, and scanning the data stored in the first storage medium based on the migration task.
Wherein the migration condition is represented as data that has not been accessed within a preset time.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the method 900 further includes: and recording the storage position of the migrated data in the second storage medium, wherein the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the method 900 further includes: and recording information which indicates that the migrated data is stored in the second storage medium, wherein the information which indicates and the information which accesses the data have a corresponding relation, so that whether the access data is migrated data or not is determined based on the information.
Specifically, scanning data stored in a first storage medium includes: scanning a file stored in a first storage medium; and when the data in the file accords with the data to be migrated of the preset migration condition, executing the step of migrating the data to be migrated to the second storage medium in a file form.
In addition, reference may also be made to the above-mentioned steps of the method 200 for details of the method 900 that are not described in detail.
Fig. 10 is a schematic structural framework diagram of a data access device according to an exemplary embodiment of the present application. The apparatus 1000 may be applied to a cloud server. The apparatus 1000 comprises: an acquisition module 1001, a determination module 1002 and a processing module 1003; the following detailed description is directed to the functions of the various modules:
an obtaining module 1001 is configured to obtain an access request, where the access request carries information of access data.
The determining module 1002 is configured to determine whether the access data is migrated data according to the information. The migrated data is migrated from the first storage medium to the second storage medium, and the time for accessing the data corresponding to the first storage medium is less than the time for accessing the data corresponding to the second storage medium.
The processing module 1003 is configured to determine, based on the information, a storage location of the access data in the second storage medium if the access data is migrated data, acquire the access data, and perform access processing on the access data according to the access request.
Furthermore, the obtaining module 1001 is further configured to: and if the access data is the non-migrated data, acquiring the access data from the first storage medium based on the information and performing access processing.
In addition, the apparatus 1000 further comprises: and the scanning module is used for scanning the data stored in the first storage medium. And the migration module is used for migrating the data to be migrated to the second storage medium when the data to be migrated which meets the preset migration condition exists in the data. And the reservation module is used for reserving the data to be reserved in the first storage medium when the data to be reserved does not accord with the preset migration condition.
In addition, the obtaining module 1001 is further configured to obtain a migration condition provided by a user as a preset migration condition; the determining module 1002 is further configured to determine a corresponding migration task according to a preset migration condition; the apparatus 1000 further comprises: and the execution module is used for executing the migration task and scanning the data stored in the first storage medium based on the migration task.
Wherein the migration condition is represented as data that has not been accessed within a preset time.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the apparatus 1000 further includes: and the recording module is used for recording the storage position of the migrated data on the second storage medium, and the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the recording module is further configured to record information indicating that the migrated data is stored in the second storage medium, where the indicated information has a corresponding relationship with the information of the access data, so as to determine whether the access data is migrated data based on the information.
Specifically, the scanning module includes: a scanning unit for scanning a file stored in a first storage medium; and the execution unit is used for executing the step of migrating the data to be migrated to the second storage medium in a file form when the data in the file conforms to the data to be migrated of the preset migration condition.
Furthermore, the access request comprises a read request, the information of the access data comprises read data information; and the processing module 1003 is configured to return the acquired access data as read data.
In addition, the read data information includes a read file identification of the read data; a determining module 1002, configured to find information corresponding to the read file identifier and indicating that the migrated data is stored in the second storage medium; and the processing module 1003 is configured to search a storage location of the read data corresponding to the read file identifier in the second storage medium.
Furthermore, the access request comprises a write request, the information to access the data comprises write data information; the processing module 1003 is configured to perform data writing according to the data to be written and the written data corresponding to the written data information, and store a writing result in a corresponding file of the first storage medium, where the written data is access data.
In addition, the written data information comprises a written file identifier of the data to be written; a determining module 1002 configured to: searching information which corresponds to the written file identification and represents that the migrated data is stored in a second storage medium; and the processing module 1003 is configured to search a storage location of the written data corresponding to the written file identifier in the second storage medium.
Further, the processing module 1003 is configured to: and if the written data in the written file corresponding to the written data information belongs to the migrated data, determining the storage position of the written file in the second storage medium based on the information, and acquiring the written data in the written file from the second storage medium.
Specifically, writing the data information further includes: writing position information of the data to be written in the corresponding written file; the acquisition module 1001 includes: the searching unit is used for searching the written file according to the storage position; and an obtaining unit configured to obtain the written data in the written file according to the writing position information.
Specifically, the obtaining unit is configured to obtain a long block corresponding to the written data in the written file according to the writing position information, so as to perform data writing with the data to be written.
In addition, when the initial write bit of the data to be written in the write file in the write location information is greater than the bit threshold, the determining module 1002 is further configured to: determining a long block corresponding to the written data in the written file according to the writing position information; the apparatus 1000 further comprises: the dividing module is used for determining corresponding written data from the long block according to the written position information and dividing the long block according to the written data to obtain sub blocks corresponding to the written data; and the writing module is used for writing data according to the data to be written and the sub-blocks and storing the writing result into the corresponding file of the first storage medium based on the sub-blocks.
In addition, the recording module is further configured to: recording the obtained sub-blocks, wherein the sub-blocks point to corresponding writing results; the acquisition module is further used for acquiring corresponding read data from the corresponding subblock to return when the read request is received and the read data corresponding to the read data information carried by the read request exists in the recorded subblock; or the writing module is further configured to, when the writing request is received and written data corresponding to the written data information carried in the writing request exists in the recorded sub-block, write data according to the data to be written and the corresponding sub-block, and store a writing result in a corresponding file of the first storage medium based on the sub-block.
In addition, the scanning module is further configured to: scanning a corresponding file stored to a first storage medium; and the migration module is further used for executing the step of migrating the data to be migrated to the second storage medium in a file form when the data in the file conforms to the data to be migrated of the preset migration condition.
Fig. 11 is a schematic structural framework diagram of a data reading apparatus according to another exemplary embodiment of the present application. The apparatus 1100 may be applied to a cloud server. The apparatus 1100 comprises: the receiving module 1101 and the determining module 1102 are described in detail below with respect to functions of the respective modules:
the receiving module 1001 is configured to receive a read request, where the read request carries read data information.
A determining module 1102, configured to determine whether the read data is migrated data according to the read data information.
The migrated data is migrated from the first storage medium to the second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium.
The determining module 1102 is configured to determine, based on the read data information, a storage location of the read data in the second storage medium, acquire the read data, and return the read data if the read data is migrated data.
For parts of the content that cannot be mentioned by the apparatus 1100, reference may be made to the content of the apparatus 1000 described above.
Fig. 12 is a schematic structural framework diagram illustrating a data writing apparatus according to still another exemplary embodiment of the present application. The apparatus 1200 may be applied to a cloud server. The apparatus 1200 includes: the receiving module 1201, the determining module 1202, and the writing module 1203 are described in detail below with respect to functions of the respective modules:
a receiving module 1201, configured to receive a write request, where the write request carries write data information.
A determining module 1202, configured to determine whether the written data is migrated data according to the write data information.
The migrated data is migrated from the first storage medium to the second storage medium, and the time for writing data corresponding to the first storage medium is less than the time for writing data corresponding to the second storage medium.
The writing module 1203 is configured to determine, based on the written data information, a storage location of the written data in the second storage medium if the written data is migrated data, acquire the written data, write data according to the data to be written and the written data corresponding to the written data information, and store a writing result in a corresponding file of the first storage medium.
For some contents that cannot be mentioned in the apparatus 1200, the contents of the apparatus 1000 described above may be referred to.
Having described the internal functionality and structure of the apparatus 1000 shown in FIG. 10, in one possible design, the structure of the apparatus 1000 shown in FIG. 10 may be implemented as a computing device, such as a cloud server. As shown in fig. 13, the apparatus 1300 may include: memory 1301, processor 1302, and communications component 1303;
a memory 1301 for storing a computer program.
And the communication component 1303 is configured to obtain an access request, where the access request carries information of access data.
A processor 1302 for executing a computer program for: determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium; and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
Further, processor 1302 is further configured to: and if the access data is the non-migrated data, acquiring the access data from the first storage medium based on the information and performing access processing.
Further, processor 1302 is further configured to: scanning data stored in a first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
Further, processor 1302 is further configured to: acquiring a migration condition provided by a user as a preset migration condition; determining a corresponding migration task according to a preset migration condition; and executing the migration task, and scanning the data stored in the first storage medium based on the migration task.
Wherein the migration condition is represented as data that has not been accessed within a preset time.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the processor 1302 is further configured to: and recording the storage position of the migrated data in the second storage medium, wherein the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the processor 1302 is further configured to: information indicating that the migrated data is stored in the second storage medium is recorded, and the indicated information has a correspondence with the information of the access data, so that it is determined whether the access data is migrated data based on the information.
Specifically, the processor 1302 is specifically configured to: scanning a file stored in a first storage medium; and when the data in the file accords with the data to be migrated of the preset migration condition, executing the step of migrating the data to be migrated to the second storage medium in a file form.
Furthermore, the access request comprises a read request, the information of the access data comprises read data information; the processor 1302 is specifically configured to: and returning the acquired access data as read data.
In addition, the read data information includes a read file identification of the read data; the processor 1302 is specifically configured to: searching information which corresponds to the read file identification and represents that the migrated data is stored in a second storage medium; and searching the storage position of the read data corresponding to the read file identification in the second storage medium.
Furthermore, the access request comprises a write request, the information to access the data comprises write data information; the processor 1302 is specifically configured to: and writing data according to the data to be written and the written data corresponding to the written data information, and storing the writing result into a corresponding file of the first storage medium, wherein the written data is access data.
In addition, the written data information comprises a written file identifier of the data to be written; the processor 1302 is specifically configured to: searching information which corresponds to the written file identification and represents that the migrated data is stored in a second storage medium; and searching the storage position of the written data corresponding to the written file identification in the second storage medium.
Further, the processor 1302 is specifically configured to: and if the written data in the written file corresponding to the written data information belongs to the migrated data, determining the storage position of the written file in the second storage medium based on the information, and acquiring the written data in the written file from the second storage medium.
Specifically, writing the data information further includes: writing position information of the data to be written in the corresponding written file; the processor 1302 is specifically configured to: searching the written file according to the storage position; and acquiring the written data in the written file according to the writing position information.
Specifically, the processor 1302 is specifically configured to: and acquiring a long block corresponding to the written data in the written file according to the writing position information so as to write data into the written file.
In addition, when the initial write bit of the data to be written in the write file in the write location information is greater than the bit threshold, the processor 1302 is specifically configured to: determining a long block corresponding to the written data in the written file according to the writing position information; determining corresponding written data from the long block according to the writing position information, and dividing the long block according to the written data to obtain sub-blocks corresponding to the written data; and writing data according to the data to be written and the sub-blocks, and storing the writing result into a corresponding file of the first storage medium based on the sub-blocks.
Further, the processor 1302 is specifically configured to: recording the obtained sub-blocks, wherein the sub-blocks point to corresponding writing results; when a reading request is received and reading data corresponding to reading data information carried by the reading request exists in the recorded sub-blocks, acquiring corresponding reading data from the corresponding sub-blocks to return; or when the write request is received and the written data corresponding to the write data information carried by the write request exists in the recorded sub-blocks, writing data according to the data to be written and the corresponding sub-blocks, and storing the write result into the corresponding file of the first storage medium based on the sub-blocks.
Further, the processor 1302 is specifically configured to: scanning a corresponding file stored to a first storage medium; and when the data in the file accords with the data to be migrated of the preset migration condition, executing the step of migrating the data to be migrated to the second storage medium in a file form.
In addition, embodiments of the present invention provide a computer storage medium, and the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of a method for accessing data in the method embodiments of fig. 2-6.
Having described the internal functionality and structure of the apparatus 1100 shown in FIG. 11, in one possible design, the structure of the apparatus 1100 shown in FIG. 11 may be implemented as a computing device, such as a cloud server. As shown in fig. 14, the apparatus 1400 may include: memory 1401, processor 1402, and communications component 1403;
a memory 1401 for storing the computer program.
A communication component 1403, configured to receive a read request, where the read request carries read data information.
A processor 1402 for executing the computer program for: determining whether the read data is migrated data or not according to the read data information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium; and if the read data is migrated data, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning.
It should be noted that, for some contents that the apparatus 1400 fails to mention, reference may be made to the contents of the apparatus 1300 described above.
In addition, an embodiment of the present invention provides a computer storage medium, and the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of a data reading method in the method embodiment of fig. 7.
Having described the internal functionality and structure of the apparatus 1200 shown in FIG. 12, in one possible design, the structure of the apparatus 1200 shown in FIG. 12 may be implemented as a computing device, such as a cloud server. As shown in fig. 15, the apparatus 1500 may include: memory 1501, processor 1502, and communications component 1503;
a memory 1501 is used for storing computer programs.
The communication component 1503 is configured to receive a write request, where the write request carries write data information.
A processor 1502 for executing the computer program for: determining whether the written data is migrated data or not according to the written data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium; and if the written data is migrated data, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written corresponding to the written data information and the written data, and storing the writing result in a corresponding file of the first storage medium.
For some contents that cannot be mentioned by the apparatus 1500, the contents of the apparatus 1300 described above may be referred to.
In addition, an embodiment of the present invention provides a computer storage medium, and the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of a data writing method in the method embodiment of fig. 8.
The application further provides a data migration device. The apparatus 1600 may be applied to a cloud server. The apparatus 1600 includes: the scanning module 1601, the determining module 1602, and the processing module 1603 are described in detail below with respect to functions of the respective modules:
a scanning module 1601 to scan data stored in a first storage medium.
A determining module 1602, configured to migrate the data to be migrated to the second storage medium when the data to be migrated meets the preset migration condition.
And the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium.
The processing module 1603 is configured to, when there is data to be preserved that does not meet the preset migration condition in the data, preserve the data to be preserved in the first storage medium.
In addition, the method 1600 further comprises: the acquisition module is used for acquiring the migration condition provided by the user as a preset migration condition; the determining module is used for determining a corresponding migration task according to a preset migration condition; and the execution module is used for executing the migration task and scanning the data stored in the first storage medium based on the migration task.
Wherein the migration condition is represented as data that has not been accessed within a preset time.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the apparatus 1600 further includes: and the recording module is used for recording the storage position of the migrated data on the second storage medium, and the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the recording module is further configured to: information indicating that the migrated data is stored in the second storage medium is recorded, and the indicated information has a correspondence with the information of the access data, so that it is determined whether the access data is migrated data based on the information.
Specifically, the scanning module 1601 includes: a scanning unit for scanning a file stored in a first storage medium; and the execution unit is used for executing the step of migrating the data to be migrated to the second storage medium in a file form when the data in the file conforms to the data to be migrated of the preset migration condition.
For parts that cannot be mentioned by the apparatus 1600, reference may be made to the contents of the apparatus 1000 described above.
While the internal functionality and structure of apparatus 1600 are described above, in one possible design, the structure of apparatus 1600 may be implemented as a computing device, such as a cloud server. The apparatus 1700 may include: memory 1701, processor 1702;
the memory 1701 is used to store a computer program.
A processor 1702 for scanning data stored in a first storage medium; when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium, wherein the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium; and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
Further, the processor 1702 is further configured to: acquiring a migration condition provided by a user as a preset migration condition; determining a corresponding migration task according to a preset migration condition; and executing the migration task, and scanning the data stored in the first storage medium based on the migration task.
Wherein the migration condition is represented as data that has not been accessed within a preset time.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the processor 1702 is further configured to: and recording the storage position of the migrated data in the second storage medium, wherein the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
In addition, after the data to be migrated is migrated to the second storage medium, the data to be migrated is used as migrated data in the second storage medium, and the processor 1702 is further configured to: information indicating that the migrated data is stored in the second storage medium is recorded, and the indicated information has a correspondence with the information of the access data, so that it is determined whether the access data is migrated data based on the information.
Specifically, the processor 1702 is specifically configured to: scanning a file stored in a first storage medium; and when the data in the file accords with the data to be migrated of the preset migration condition, executing the step of migrating the data to be migrated to the second storage medium in a file form.
It should be noted that, for some contents that the apparatus 1700 fails to refer to, reference may be made to the contents of the apparatus 1300 described above.
Additionally, embodiments of the present invention provide a computer storage medium, where the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of a method for migrating data in method 900 embodiment.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are merely used for distinguishing different operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable multimedia data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable multimedia data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable multimedia data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable multimedia data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (31)

1. A method for accessing data, comprising:
acquiring an access request, wherein the access request carries information of access data;
determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium;
and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
2. The method of claim 1, further comprising:
and if the access data is non-migrated data, acquiring the access data from the first storage medium based on the information to perform access processing.
3. The method of claim 1, further comprising:
scanning data stored in a first storage medium;
when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium;
and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
4. The method of claim 3, further comprising:
acquiring a migration condition provided by a user as the preset migration condition;
determining a corresponding migration task according to the preset migration condition;
and executing the migration task, and scanning the data stored in the first storage medium based on the migration task.
5. The method of claim 3, wherein the migration condition is represented as data that has not been accessed within a preset time.
6. The method of claim 3, wherein after migrating the data to be migrated to a second storage medium, the data to be migrated serves as migrated data in the second storage medium, and the method further comprises:
and recording the storage position of the migrated data in the second storage medium, wherein the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
7. The method of claim 6, wherein after migrating the data to be migrated to a second storage medium, the data to be migrated serves as migrated data in the second storage medium, and the method further comprises:
and recording information which indicates that the migrated data is stored in the second storage medium, wherein the information which indicates and the information which accesses the data have a corresponding relation, so that whether the access data is migrated data or not is determined based on the information.
8. The method of claim 3, wherein scanning data stored in the first storage medium comprises:
scanning a file stored in the first storage medium;
and when the data in the file conforms to the data to be migrated under the preset migration condition, executing the step of migrating the data to be migrated to a second storage medium in a file form.
9. The method of claim 1, wherein the access request comprises a read request, and the information for accessing data comprises read data information;
performing access processing on the access data according to the access request, including: and returning the acquired access data as read data.
10. The method of claim 9, wherein the read data information includes a read file identification of the read data;
determining whether the access data is migrated data according to the information includes: searching information corresponding to the read file identification and indicating that the migrated data is stored in the second storage medium;
determining a storage location of the access data on the second storage medium based on the information, including: and searching the storage position of the read data corresponding to the read file identification in the second storage medium.
11. The method of claim 1, wherein the access request comprises a write request, and the information for accessing data comprises write data information;
performing access processing on the access data according to the access request, including:
and writing data according to the data to be written and the written data corresponding to the written data information, and storing a writing result into a corresponding file of the first storage medium, wherein the written data is the access data.
12. The method according to claim 11, wherein the write data information includes a write file identifier of the data to be written;
determining whether the access data is migrated data according to the information includes: searching information corresponding to the written file identification and indicating that the migrated data is stored in the second storage medium;
determining a storage location of the access data on the second storage medium based on the information, including: and searching the storage position of the written data corresponding to the written file identification in the second storage medium.
13. The method according to claim 11, wherein if the access data is migrated data, determining a storage location of the access data in the second storage medium based on the information, and acquiring the migrated data comprises:
and if the written data in the written file corresponding to the written data information belongs to migrated data, determining the storage position of the written file in the second storage medium based on the information, and acquiring the written data in the written file from the second storage medium.
14. The method of claim 11, wherein writing the data information further comprises: writing position information of the data to be written in the corresponding writing file;
the obtaining the access data includes:
searching the written file according to the storage position;
and acquiring the written data in the written file according to the written position information.
15. The method according to claim 14, wherein the obtaining the written data in the written file according to the writing location information comprises:
and acquiring a long block corresponding to the written data in the written file according to the writing position information so as to write data into the data to be written.
16. The method of claim 15, wherein when a starting write bit of data to be written in the write location information in the write file is greater than a bit threshold, the method further comprises:
determining a long block corresponding to the written data in the written file according to the written position information;
determining corresponding written data from the long block according to the writing position information, and dividing the long block according to the written data to obtain sub-blocks corresponding to the written data;
and writing data according to the data to be written and the sub-blocks, and storing a writing result into a corresponding file of the first storage medium based on the sub-blocks.
17. The method of claim 16, further comprising:
recording the obtained sub-blocks, wherein the sub-blocks point to corresponding writing results;
when a reading request is received and reading data corresponding to reading data information carried by the reading request exists in the recorded sub-blocks, acquiring corresponding reading data from the corresponding sub-blocks for returning; or
When a write-in request is received and written-in data corresponding to write-in data information carried by the write-in request exists in the recorded sub-blocks, data are written in according to the to-be-written-in data and the corresponding sub-blocks, and a write-in result is stored in a corresponding file of the first storage medium based on the sub-blocks.
18. The method of claim 11, 16 or 17, further comprising:
scanning the corresponding file stored to the first storage medium;
and when the data in the file conforms to the data to be migrated under the preset migration condition, executing the step of migrating the data to be migrated to a second storage medium in a file form.
19. A method for reading data, comprising:
receiving a reading request, wherein the reading request carries reading data information;
determining whether the read data is migrated data or not according to the read data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium;
and if the read data is migrated data, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning.
20. A method for writing data, comprising:
receiving a write-in request, wherein the write-in request carries write-in data information;
determining whether the written data is migrated data or not according to the written data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for writing data corresponding to the first storage medium is less than the time for writing data corresponding to the second storage medium;
and if the written data is migrated data, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written corresponding to the written data information and the written data, and storing the writing result in a corresponding file of the first storage medium.
21. A method for migrating data, comprising:
scanning data stored in a first storage medium;
when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium, wherein the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium;
and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
22. The method of claim 21, further comprising:
acquiring a migration condition provided by a user as the preset migration condition;
determining a corresponding migration task according to the preset migration condition;
and executing the migration task, and scanning the data stored in the first storage medium based on the migration task.
23. The method of claim 22, wherein the migration condition is represented as data that has not been accessed within a preset time.
24. The method of claim 21, wherein after migrating the data to be migrated to a second storage medium, the data to be migrated serves as migrated data in the second storage medium, and the method further comprises:
and recording the storage position of the migrated data in the second storage medium, wherein the storage position has a corresponding relation with the information of the access data, so that the storage position is determined based on the information.
25. The method of claim 24, wherein after migrating the data to be migrated to a second storage medium, the data to be migrated serves as migrated data in the second storage medium, and the method further comprises:
and recording information which indicates that the migrated data is stored in the second storage medium, wherein the information which indicates and the information which accesses the data have a corresponding relation, so that whether the access data is migrated data or not is determined based on the information.
26. The method of claim 21, wherein scanning data stored in the first storage medium comprises:
scanning a file stored in the first storage medium;
and when the data in the file conforms to the data to be migrated under the preset migration condition, executing the step of migrating the data to be migrated to a second storage medium in a file form.
27. A computing device, comprising: a memory, a processor;
the memory for storing a computer program;
the processor to scan data stored in a first storage medium;
when data to be migrated which meets a preset migration condition exists in the data, migrating the data to be migrated to a second storage medium, wherein the time for reading and writing the data corresponding to the first storage medium is less than the time for reading and writing the data corresponding to the second storage medium;
and when the data to be preserved does not meet the preset migration condition, preserving the data to be preserved in the first storage medium.
28. A computing device, comprising: a memory, a processor, and a communication component;
the memory for storing a computer program;
the communication component is used for receiving a reading request, and the reading request carries reading data information;
the processor to execute the computer program to:
determining whether the read data is migrated data or not according to the read data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for reading data corresponding to the first storage medium is less than the time for reading data corresponding to the second storage medium;
and if the read data is migrated data, determining the storage position of the read data in the second storage medium based on the read data information, acquiring the read data, and returning.
29. A computing device, comprising: a memory, a processor, and a communication component;
the memory for storing a computer program;
the communication component is used for receiving a write-in request, and the write-in request carries write-in data information;
the processor to execute the computer program to:
determining whether the written data is migrated data or not according to the written data information, wherein the migrated data is migrated from a first storage medium to a second storage medium, and the time for writing data corresponding to the first storage medium is less than the time for writing data corresponding to the second storage medium;
and if the written data is migrated data, determining the storage position of the written data in the second storage medium based on the written data information, acquiring the written data, writing data according to the data to be written corresponding to the written data information and the written data, and storing the writing result in a corresponding file of the first storage medium.
30. A computing device, comprising: a memory, a processor, and a communication component;
the memory for storing a computer program;
the communication component is used for acquiring an access request, and the access request carries information of access data;
the processor to execute the computer program to:
determining whether the access data is migrated data or not according to the information, wherein the migrated data is migrated from the first storage medium to the second storage medium, and the time of the access data corresponding to the first storage medium is less than the time of the access data corresponding to the second storage medium;
and if the access data is migrated data, determining the storage position of the access data in the second storage medium based on the information, acquiring the access data, and performing access processing on the access data according to the access request.
31. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, causes the one or more processors to perform the steps of the method of any one of claims 1-26.
CN202110231751.4A 2021-03-02 2021-03-02 Data access method, computing device and storage medium Pending CN113296696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110231751.4A CN113296696A (en) 2021-03-02 2021-03-02 Data access method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110231751.4A CN113296696A (en) 2021-03-02 2021-03-02 Data access method, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN113296696A true CN113296696A (en) 2021-08-24

Family

ID=77319226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110231751.4A Pending CN113296696A (en) 2021-03-02 2021-03-02 Data access method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN113296696A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918513A (en) * 2021-12-10 2022-01-11 北京百度网讯科技有限公司 Data migration method, device, equipment and storage medium based on block chain
CN114422600A (en) * 2021-12-31 2022-04-29 成都鲁易科技有限公司 File scheduling system based on cloud storage and file scheduling method based on cloud storage
CN114924696A (en) * 2022-07-18 2022-08-19 上海有孚数迅科技有限公司 Method, apparatus, medium, and program product for storage management
CN115718571A (en) * 2022-11-23 2023-02-28 深圳计算科学研究院 Data management method and device based on multi-dimensional features
CN115904263A (en) * 2023-03-10 2023-04-04 浪潮电子信息产业股份有限公司 Data migration method, system, equipment and computer readable storage medium
CN116860166A (en) * 2023-07-04 2023-10-10 北京云宽志业网络技术有限公司 Data migration method, device, electronic equipment and storage medium
WO2023201650A1 (en) * 2022-04-21 2023-10-26 宇龙计算机通信科技(深圳)有限公司 File operation method and apparatus, computer device, and readable storage medium
WO2023201653A1 (en) * 2022-04-21 2023-10-26 宇龙计算机通信科技(深圳)有限公司 File operation method and apparatus, computer device, and readable storage medium
WO2024045846A1 (en) * 2022-08-31 2024-03-07 华为技术有限公司 Method, apparatus and system for adjusting migration bandwidth of storage medium, and chip
WO2024055670A1 (en) * 2022-09-13 2024-03-21 华为云计算技术有限公司 Cloud computing technology-based data migration method and cloud management platform

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558991A (en) * 2011-12-31 2014-02-05 华为数字技术(成都)有限公司 Method, device and storage equipment for hierarchically storing data
US20150347492A1 (en) * 2014-05-28 2015-12-03 International Business Machines Corporation Representing an outlier value in a non-nullable column as null in metadata
CN105183389A (en) * 2015-09-15 2015-12-23 北京金山安全软件有限公司 Data hierarchical management method and device and electronic equipment
CN107172168A (en) * 2017-05-27 2017-09-15 郑州云海信息技术有限公司 A kind of mixed cloud data storage moving method and system
CN111427844A (en) * 2020-04-15 2020-07-17 成都信息工程大学 Data migration system and method for file hierarchical storage
US20200326871A1 (en) * 2019-04-09 2020-10-15 International Business Machines Corporation Tiered storage optimization and migration
CN112286459A (en) * 2020-10-29 2021-01-29 苏州浪潮智能科技有限公司 Data processing method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558991A (en) * 2011-12-31 2014-02-05 华为数字技术(成都)有限公司 Method, device and storage equipment for hierarchically storing data
US20150347492A1 (en) * 2014-05-28 2015-12-03 International Business Machines Corporation Representing an outlier value in a non-nullable column as null in metadata
CN105183389A (en) * 2015-09-15 2015-12-23 北京金山安全软件有限公司 Data hierarchical management method and device and electronic equipment
CN107172168A (en) * 2017-05-27 2017-09-15 郑州云海信息技术有限公司 A kind of mixed cloud data storage moving method and system
US20200326871A1 (en) * 2019-04-09 2020-10-15 International Business Machines Corporation Tiered storage optimization and migration
CN111427844A (en) * 2020-04-15 2020-07-17 成都信息工程大学 Data migration system and method for file hierarchical storage
CN112286459A (en) * 2020-10-29 2021-01-29 苏州浪潮智能科技有限公司 Data processing method, device, equipment and medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918513B (en) * 2021-12-10 2022-03-08 北京百度网讯科技有限公司 Data migration method, device, equipment and storage medium based on block chain
CN113918513A (en) * 2021-12-10 2022-01-11 北京百度网讯科技有限公司 Data migration method, device, equipment and storage medium based on block chain
CN114422600A (en) * 2021-12-31 2022-04-29 成都鲁易科技有限公司 File scheduling system based on cloud storage and file scheduling method based on cloud storage
CN114422600B (en) * 2021-12-31 2023-11-07 成都鲁易科技有限公司 File scheduling system based on cloud storage and file scheduling method based on cloud storage
WO2023201650A1 (en) * 2022-04-21 2023-10-26 宇龙计算机通信科技(深圳)有限公司 File operation method and apparatus, computer device, and readable storage medium
WO2023201653A1 (en) * 2022-04-21 2023-10-26 宇龙计算机通信科技(深圳)有限公司 File operation method and apparatus, computer device, and readable storage medium
CN114924696A (en) * 2022-07-18 2022-08-19 上海有孚数迅科技有限公司 Method, apparatus, medium, and program product for storage management
WO2024045846A1 (en) * 2022-08-31 2024-03-07 华为技术有限公司 Method, apparatus and system for adjusting migration bandwidth of storage medium, and chip
WO2024055670A1 (en) * 2022-09-13 2024-03-21 华为云计算技术有限公司 Cloud computing technology-based data migration method and cloud management platform
CN115718571B (en) * 2022-11-23 2023-08-22 深圳计算科学研究院 Data management method and device based on multidimensional features
CN115718571A (en) * 2022-11-23 2023-02-28 深圳计算科学研究院 Data management method and device based on multi-dimensional features
CN115904263A (en) * 2023-03-10 2023-04-04 浪潮电子信息产业股份有限公司 Data migration method, system, equipment and computer readable storage medium
CN116860166A (en) * 2023-07-04 2023-10-10 北京云宽志业网络技术有限公司 Data migration method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113296696A (en) Data access method, computing device and storage medium
CN102667772B (en) File level hierarchical storage management system, method, and apparatus
EP3260993A1 (en) File operation method and device
CN113672175A (en) Distributed object storage method, device and equipment and computer storage medium
CN108733306B (en) File merging method and device
CN109804359A (en) For the system and method by write back data to storage equipment
US8572338B1 (en) Systems and methods for creating space-saving snapshots
US11112986B2 (en) Systems and methods for storing information within hybrid storage with local and cloud-based storage devices
CN113568582B (en) Data management method, device and storage equipment
CN111666044A (en) Method for accessing shingled magnetic recording SMR hard disk and server
CN111475483A (en) Database migration method and device and computing equipment
CN106357703B (en) Cluster switching method and device
CN103049224A (en) Method, device and system for importing data into physical tape
CN116401004A (en) Data sharing method, device, system and storage medium
CN103744875A (en) Data rapid transferring method and system based on file system
CN115114232A (en) Method, device and medium for enumerating historical version objects
CN113434470B (en) Data distribution method and device and electronic equipment
CN113448946B (en) Data migration method and device and electronic equipment
CN105808451B (en) Data caching method and related device
CN103544254B (en) A kind of data managing method and device
CN111435323B (en) Information transmission method, device, terminal, server and storage medium
CN113297267A (en) Data caching and task processing method, device, equipment and storage medium
CN116225782A (en) Method and system for processing snapshot
US20230409235A1 (en) File system improvements for zoned storage device operations
CN109508140B (en) Storage resource management method and device, electronic equipment and 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240322

Address after: # 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Applicant after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Applicant before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore