WO2017032262A1 - Data migration method and device - Google Patents

Data migration method and device Download PDF

Info

Publication number
WO2017032262A1
WO2017032262A1 PCT/CN2016/095854 CN2016095854W WO2017032262A1 WO 2017032262 A1 WO2017032262 A1 WO 2017032262A1 CN 2016095854 W CN2016095854 W CN 2016095854W WO 2017032262 A1 WO2017032262 A1 WO 2017032262A1
Authority
WO
WIPO (PCT)
Prior art keywords
migration
migrated
file
task
fragment
Prior art date
Application number
PCT/CN2016/095854
Other languages
French (fr)
Chinese (zh)
Inventor
闫长海
尹书威
刘中巍
丁辉
周皓
Original Assignee
阿里巴巴集团控股有限公司
闫长海
尹书威
刘中巍
丁辉
周皓
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 阿里巴巴集团控股有限公司, 闫长海, 尹书威, 刘中巍, 丁辉, 周皓 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017032262A1 publication Critical patent/WO2017032262A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a data migration method.
  • the application also relates to a data migration device.
  • cloud storage has become one of the indispensable technologies.
  • cloud storage services available on the market (such as Facebook Cloud OSS9), which is very popular with customers. Therefore, with the increasing number of users, users will inevitably encounter the replacement of cloud storage services in the process of using cloud storage.
  • the present application provides a data migration method for conveniently and quickly migrating data stored in a network, improving migration efficiency, and saving device resources.
  • the method includes:
  • each of the fragment files is migrated in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks, specifically:
  • the migration stream is used to transfer data from the source network storage to the memory;
  • the data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
  • the method before obtaining the sub-migration task of each fragment file from the fragment migration queue, the method further includes:
  • the file to be migrated is sliced into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and corresponding to each of the fragment files is generated. Submigration task.
  • the method further includes:
  • the migration task is generated according to the scan result, and the migration task is added to the asynchronous migration task queue.
  • the method further includes:
  • the present application also provides a data migration device, including:
  • Obtaining a module obtaining a sub-migration task of each fragment file from the fragment migration queue, where the sub-migration task
  • the slice file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated;
  • the migration module performs migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
  • the migration module is specifically configured to:
  • the data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
  • the method further comprises:
  • the determining module obtains the to-be-migrated task from the asynchronous migration queue, and determines whether the to-be-migrated file corresponding to the to-be-migrated task has been migrated;
  • the determining module acquires other tasks to be migrated from the asynchronous migration queue
  • the determining module processes the file to be migrated into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and generates and segments each of the segments.
  • the method further comprises:
  • Generating a module acquiring the migration configuration information, scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, generating the migration task according to the scan result, and adding the migration task to the asynchronous migration In the task queue.
  • the method further comprises:
  • the update module determines whether all the fragment files corresponding to the file to be migrated are successfully migrated, and updates and stores the migration status of the file to be migrated when the determination result is yes.
  • the sub-migration task of obtaining each fragment file from the fragment migration queue that is, the fragmentation from the source network storage corresponding to the file to be migrated according to each sub-migration task
  • the files are migrated, so that network resources can be fully utilized for fragment migration, which improves the migration efficiency of network storage resources and saves device resources.
  • FIG. 1 is a schematic flowchart of a data migration method proposed by the present application.
  • FIG. 2 is a schematic structural diagram of a data migration device according to the present application.
  • the present application proposes a data migration method, as shown in FIG. 1, including the following steps:
  • S101 Obtain a sub-migration task of each fragment file from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated.
  • the application For the file migration request made by the user, the application first needs to obtain the migration configuration information based on the request, and after scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, and then generating the location according to the scan result.
  • the migration task is described, and the migration task is added to the asynchronous migration task queue.
  • the present application needs to perform the fragmentation processing for each file to be migrated. Therefore, in the preferred embodiment of the present application, the task to be migrated needs to be obtained from the asynchronous migration queue before the step, and the determination is performed. Whether the file to be migrated corresponding to the task to be migrated has been migrated, and the following processing is performed based on the result:
  • S102 Perform migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
  • the data to be migrated In the existing data dumping process, the data to be migrated must be downloaded from the source network storage to a temporary storage space, and then the data to be migrated is uploaded from the temporary space to the target network storage.
  • Such a dumping method not only requires additional setting of the intermediate storage space for downloading and uploading, but also requires a certain amount of time for the downloading process and the uploading process. Therefore, in order to further improve the migration efficiency of the network storage, the technical solution of the present application removes two local IO operations in the existing migration process.
  • the data migration flow corresponding to each of the fragment files is first requested to the source network, and then the data migration stream is uploaded as a data input stream to the sub-migration task designation. Target network storage.
  • the technical solution of the present application obtains the points and points.
  • the destination address of the data migration stream is directly directed to the target storage (ie, as an uploaded data input stream), so that the data transmission is all implemented in the memory without having to rely on The middle of the hard drive to the village. Therefore, the data of each fragment file can be directly downloaded and uploaded through the memory.
  • the migration of the entire file is guaranteed.
  • the preferred embodiment of the present application further determines whether all the fragment files corresponding to the file to be migrated are successfully migrated, and when the result is YES, the migration status of the file to be migrated is updated and stored. If so, continue to get the sub-migration task of each fragment file from the fragment migration queue.
  • the present application also proposes a data migration device, as shown in FIG. 2, including:
  • the obtaining module 210 is configured to obtain a sub-migration task of each fragment file from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated. ;
  • the migration module 220 performs migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
  • the migration module is specifically configured to:
  • the data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
  • the determining module obtains the to-be-migrated task from the asynchronous migration queue, and determines whether the to-be-migrated file corresponding to the to-be-migrated task has been migrated;
  • the determining module acquires other tasks to be migrated from the asynchronous migration queue
  • the determining module processes the file to be migrated into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and generates and segments each of the segments.
  • Generating a module acquiring the migration configuration information, scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, generating the migration task according to the scan result, and adding the migration task to the asynchronous migration In the task queue.
  • the sub-migration task of each fragment file is obtained from the fragment migration queue, that is, each fragment file is migrated from the source network storage corresponding to the file to be migrated according to each sub-migration task. Therefore, the network resources can be fully utilized for fragment migration, the migration efficiency of the network storage resources is improved, and the equipment consumes resources.
  • the present application can be implemented by hardware, or by software plus a necessary general hardware platform.
  • the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several The instructions are for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various implementation scenarios of the present application.
  • modules in the apparatus in the implementation scenario may be distributed in the apparatus for implementing the scenario according to the implementation scenario description, or may be correspondingly changed in one or more devices different from the implementation scenario.
  • the modules of the above implementation scenarios may be combined into one module, or may be further split into multiple sub-modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed is a data migration method. A sub-migration task of each fragmented file is acquired from a fragmented migration queue. That is, each fragmented file is migrated from a source network memory corresponding to a to-be-migrated file according to each sub-migration task, such that fragmented migration can be performed by fully utilizing network resources, thereby improving the migration efficiency of network storage resources, and saving resources of a device.

Description

一种数据迁移方法及设备Data migration method and device 技术领域Technical field
本申请涉及通信技术领域,特别涉及一种数据迁移方法。本申请同时还涉及一种数据迁移设备。The present application relates to the field of communications technologies, and in particular, to a data migration method. The application also relates to a data migration device.
背景技术Background technique
随着互联网技术的不断发展,云存储越来越成为不可或缺的技术之一。现在市场上提供云存储服务有很多(比如阿里云的OSS…),很受客户喜欢。因此随着使用用户数量越来越多,用户在使用云存储的过程中也不可避免碰到更换云存储服务的情况。With the continuous development of Internet technology, cloud storage has become one of the indispensable technologies. There are a lot of cloud storage services available on the market (such as Alibaba Cloud OSS...), which is very popular with customers. Therefore, with the increasing number of users, users will inevitably encounter the replacement of cloud storage services in the process of using cloud storage.
在现有技术中,当用户想更换云存储服务的时候,发现迁移云存储中的数据很麻烦。有的用户云存储的数据很大(几十T到PB),用传统方法迁移,需要很多的机器来进行迁移,迁移的时间也非常长,迁移成本很高。In the prior art, when a user wants to replace a cloud storage service, it is troublesome to migrate data in the cloud storage. Some users store large amounts of data (tens of T to PB). Migration by traditional methods requires a lot of machines for migration, migration time is very long, and migration costs are high.
发明内容Summary of the invention
本申请提供了一种数据迁移方法,用以方便快捷地针对网络存储的数据进行迁移,提高迁移效率以及节省设备资源。该方法包括:The present application provides a data migration method for conveniently and quickly migrating data stored in a network, improving migration efficiency, and saving device resources. The method includes:
从分片迁移队列中获取各个分片文件的子迁移任务,所述分片文件由待迁移文件分片生成,所述子迁移任务根据与所述待迁移文件对应的迁移任务生成;Obtaining a sub-migration task of each fragment file from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated;
根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理。Performing migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
优选地,根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理,具体为:Preferably, each of the fragment files is migrated in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks, specifically:
向所述源网络存储请求与各所述分片文件对应的数据迁移流,所述数据 迁移流用于将数据从所述源网络存储转移至内存;And requesting, by the source network, a data migration flow corresponding to each of the fragment files, where the data is The migration stream is used to transfer data from the source network storage to the memory;
将所述数据迁移流作为数据输入流上传至所述子迁移任务指定的目标网络存储,所述数据输入流用于将所述数据从所述内存转移至所述目标网络存储。The data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
优选地,在从分片迁移队列中获取各个分片文件的子迁移任务之前,还包括:Preferably, before obtaining the sub-migration task of each fragment file from the fragment migration queue, the method further includes:
从异步迁移队列中获取所述待迁移任务;Obtaining the to-be-migrated task from the asynchronous migration queue;
判断与所述待迁移任务对应的待迁移文件是否已迁移完成;Determining whether the file to be migrated corresponding to the task to be migrated has been migrated;
若判断结果为是,从所述异步迁移队列中获取其他的待迁移任务;If the judgment result is yes, obtain other tasks to be migrated from the asynchronous migration queue;
若判断结果为否,根据所述待迁移文件的容量以及预设的分片参数将所述待迁移文件分片处理为多个所述分片文件,并生成与各所述分片文件对应的子迁移任务。If the result of the determination is no, the file to be migrated is sliced into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and corresponding to each of the fragment files is generated. Submigration task.
优选地,在从异步迁移队列中获取所述待迁移任务之前,还包括:Preferably, before the obtaining the task to be migrated from the asynchronous migration queue, the method further includes:
获取迁移配置信息;Obtain migration configuration information;
根据所述迁移配置信息在所述源网络存储的文件中扫描所述待迁移文件;Scan the file to be migrated in a file stored in the source network according to the migration configuration information;
根据扫描结果生成所述迁移任务,并将所述迁移任务加入所述异步迁移任务队列中。The migration task is generated according to the scan result, and the migration task is added to the asynchronous migration task queue.
优选地,在根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理之后,还包括:Preferably, after performing the migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks, the method further includes:
判断与所述待迁移文件对应的所有分片文件是否全部迁移成功;Determining whether all the fragment files corresponding to the file to be migrated are successfully migrated;
若是,更新并存储所述待迁移文件的迁移状态。If yes, update and store the migration status of the file to be migrated.
相应地,本申请还提出了一种数据迁移设备,包括:Correspondingly, the present application also provides a data migration device, including:
获取模块,从分片迁移队列中获取各个分片文件的子迁移任务,所述分 片文件由待迁移文件分片生成,所述子迁移任务根据与所述待迁移文件对应的迁移任务生成;Obtaining a module, obtaining a sub-migration task of each fragment file from the fragment migration queue, where the sub-migration task The slice file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated;
迁移模块,根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理。The migration module performs migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
优选地,所述迁移模块具体用于:Preferably, the migration module is specifically configured to:
向所述源网络存储请求与各所述分片文件对应的数据迁移流,所述数据迁移流用于将数据从所述源网络存储转移至内存;And requesting, by the source network, a data migration flow corresponding to each of the fragment files, where the data migration flow is used to transfer data from the source network storage to a memory;
将所述数据迁移流作为数据输入流上传至所述子迁移任务指定的目标网络存储,所述数据输入流用于将所述数据从所述内存转移至所述目标网络存储。The data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
优选地,还包括:Preferably, the method further comprises:
判断模块,从异步迁移队列中获取所述待迁移任务,判断与所述待迁移任务对应的待迁移文件是否已迁移完成;The determining module obtains the to-be-migrated task from the asynchronous migration queue, and determines whether the to-be-migrated file corresponding to the to-be-migrated task has been migrated;
若判断结果为是,所述判断模块从所述异步迁移队列中获取其他的待迁移任务;If the determination result is yes, the determining module acquires other tasks to be migrated from the asynchronous migration queue;
若判断结果为否,所述判断模块根据所述待迁移文件的容量以及预设的分片参数将所述待迁移文件分片处理为多个所述分片文件,并生成与各所述分片文件对应的子迁移任务。If the determination result is no, the determining module processes the file to be migrated into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and generates and segments each of the segments. The sub-migration task corresponding to the slice file.
优选地,还包括:Preferably, the method further comprises:
生成模块,获取迁移配置信息,根据所述迁移配置信息在所述源网络存储的文件中扫描所述待迁移文件,根据扫描结果生成所述迁移任务,并将所述迁移任务加入所述异步迁移任务队列中。Generating a module, acquiring the migration configuration information, scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, generating the migration task according to the scan result, and adding the migration task to the asynchronous migration In the task queue.
优选地,还包括:Preferably, the method further comprises:
更新模块,判断与所述待迁移文件对应的所有分片文件是否全部迁移成功,并在判断结果为是时更新并存储所述待迁移文件的迁移状态。 The update module determines whether all the fragment files corresponding to the file to be migrated are successfully migrated, and updates and stores the migration status of the file to be migrated when the determination result is yes.
由此可见,通过应用本申请的技术方案,在从分片迁移队列中获取各个分片文件的子迁移任务,即根据各子迁移任务从与待迁移文件对应的源网络存储中对各分片文件进行迁移处理,从而能够充分利用网络资源进行分片迁移,提高了网络存储资源的迁移效率,以及节省了设备资源。It can be seen that, by applying the technical solution of the present application, the sub-migration task of obtaining each fragment file from the fragment migration queue, that is, the fragmentation from the source network storage corresponding to the file to be migrated according to each sub-migration task The files are migrated, so that network resources can be fully utilized for fragment migration, which improves the migration efficiency of network storage resources and saves device resources.
附图说明DRAWINGS
图1为本申请提出的一种数据迁移方法的流程示意图;1 is a schematic flowchart of a data migration method proposed by the present application;
图2为本申请提出的一种数据迁移设备的结构示意图。FIG. 2 is a schematic structural diagram of a data migration device according to the present application.
具体实施方式detailed description
有鉴于背景技术所提出的技术问题,本申请提出了一种数据迁移方法,如图1所示,包括如下步骤:In view of the technical problems raised by the background art, the present application proposes a data migration method, as shown in FIG. 1, including the following steps:
S101,从分片迁移队列中获取各个分片文件的子迁移任务,所述分片文件由待迁移文件分片生成,所述子迁移任务根据与所述待迁移文件对应的迁移任务生成。S101: Obtain a sub-migration task of each fragment file from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated.
针对用户所提出的文件迁移请求,本申请首先需要基于请求获取迁移配置信息,在根据所述迁移配置信息在所述源网络存储的文件中扫描所述待迁移文件之后,再根据扫描结果生成所述迁移任务,并将所述迁移任务加入所述异步迁移任务队列中。For the file migration request made by the user, the application first needs to obtain the migration configuration information based on the request, and after scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, and then generating the location according to the scan result. The migration task is described, and the migration task is added to the asynchronous migration task queue.
后续过程中,由于本申请需要针对各个待迁移文件进行分片处理,因此在本申请的优选实施例中,在该步骤之前首先需要从异步迁移队列中获取所述待迁移任务,判断与所述待迁移任务对应的待迁移文件是否已迁移完成,并基于结果做如下处理:In the subsequent process, the present application needs to perform the fragmentation processing for each file to be migrated. Therefore, in the preferred embodiment of the present application, the task to be migrated needs to be obtained from the asynchronous migration queue before the step, and the determination is performed. Whether the file to be migrated corresponding to the task to be migrated has been migrated, and the following processing is performed based on the result:
(1)若判断结果为是,从所述异步迁移队列中获取其他的待迁移任务;(1) If the judgment result is yes, obtain other tasks to be migrated from the asynchronous migration queue;
(2)若判断结果为否,根据所述待迁移文件的容量以及预设的分片参数 将所述待迁移文件分片处理为多个所述分片文件,并生成与各所述分片文件对应的子迁移任务。(2) If the judgment result is no, according to the capacity of the file to be migrated and the preset fragmentation parameter The file to be migrated is sliced into a plurality of the fragment files, and a sub-migration task corresponding to each of the fragment files is generated.
S102,根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理。S102: Perform migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
在现有的数据转存过程中,必须将待迁移的数据从源网络存储中下载到一个临时的存储空间中,后续再从该临时空间将待迁移数据上传至目标网络存储中。这样的转存方式不仅需要额外地设置下载以及上传的中间存储空间,而且下载过程以及上传过程均需要耗费一定的时间。因此为进一步提高网络存储的迁移效率,本申请的技术方案去掉了现有的迁移过程中的两次本地IO操作。在本步骤对应的优选实施例中,首先向所述源网络存储请求与各所述分片文件对应的数据迁移流,随后将所述数据迁移流作为数据输入流上传至所述子迁移任务指定的目标网络存储。由于数据迁移流的作用都是将数据从源网络存储中下载到内存中,而数据输入流的作用则是将数据从内存中直接上传至目标存储,因此本申请的技术方案在获取到与分片的待迁移数据对应的数据迁移流之后,将该数据迁移流的目的地址直接指向目标存储(即作为上传的数据输入流),这样数据的传输全部都在内存中实现,而不必再依赖于中间硬盘的转村。从而实现各个分片文件的数据仅通过内存直接完成下载以及上传。In the existing data dumping process, the data to be migrated must be downloaded from the source network storage to a temporary storage space, and then the data to be migrated is uploaded from the temporary space to the target network storage. Such a dumping method not only requires additional setting of the intermediate storage space for downloading and uploading, but also requires a certain amount of time for the downloading process and the uploading process. Therefore, in order to further improve the migration efficiency of the network storage, the technical solution of the present application removes two local IO operations in the existing migration process. In a preferred embodiment corresponding to the step, the data migration flow corresponding to each of the fragment files is first requested to the source network, and then the data migration stream is uploaded as a data input stream to the sub-migration task designation. Target network storage. Since the data migration stream is used to download data from the source network storage into the memory, and the data input stream is used to upload the data directly from the memory to the target storage, the technical solution of the present application obtains the points and points. After the data migration stream corresponding to the data to be migrated, the destination address of the data migration stream is directly directed to the target storage (ie, as an uploaded data input stream), so that the data transmission is all implemented in the memory without having to rely on The middle of the hard drive to the village. Therefore, the data of each fragment file can be directly downloaded and uploaded through the memory.
为了确保各个分片文件最后都迁移完毕,从而保证整个文件的迁移成功。在该步骤之后,本申请优选实施例还将判断与所述待迁移文件对应的所有分片文件是否全部迁移成功,并在结果为是时更新并存储所述待迁移文件的迁移状态,若否的话则继续从分片迁移队列中获取各个分片文件的子迁移任务。In order to ensure that the entire shard file is migrated at the end, the migration of the entire file is guaranteed. After the step, the preferred embodiment of the present application further determines whether all the fragment files corresponding to the file to be migrated are successfully migrated, and when the result is YES, the migration status of the file to be migrated is updated and stored. If so, continue to get the sub-migration task of each fragment file from the fragment migration queue.
为达到以上技术目的,本申请还提出了一种数据迁移设备,如图2所示,包括: To achieve the above technical purpose, the present application also proposes a data migration device, as shown in FIG. 2, including:
获取模块210,从分片迁移队列中获取各个分片文件的子迁移任务,所述分片文件由待迁移文件分片生成,所述子迁移任务根据与所述待迁移文件对应的迁移任务生成;The obtaining module 210 is configured to obtain a sub-migration task of each fragment file from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated. ;
迁移模块220,根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理。The migration module 220 performs migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
在具体的应用场景中,所述迁移模块具体用于:In a specific application scenario, the migration module is specifically configured to:
向所述源网络存储请求与各所述分片文件对应的数据迁移流,所述数据迁移流用于将数据从所述源网络存储转移至内存;And requesting, by the source network, a data migration flow corresponding to each of the fragment files, where the data migration flow is used to transfer data from the source network storage to a memory;
将所述数据迁移流作为数据输入流上传至所述子迁移任务指定的目标网络存储,所述数据输入流用于将所述数据从所述内存转移至所述目标网络存储。The data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
在具体的应用场景中,还包括:In specific application scenarios, it also includes:
判断模块,从异步迁移队列中获取所述待迁移任务,判断与所述待迁移任务对应的待迁移文件是否已迁移完成;The determining module obtains the to-be-migrated task from the asynchronous migration queue, and determines whether the to-be-migrated file corresponding to the to-be-migrated task has been migrated;
若判断结果为是,所述判断模块从所述异步迁移队列中获取其他的待迁移任务;If the determination result is yes, the determining module acquires other tasks to be migrated from the asynchronous migration queue;
若判断结果为否,所述判断模块根据所述待迁移文件的容量以及预设的分片参数将所述待迁移文件分片处理为多个所述分片文件,并生成与各所述分片文件对应的子迁移任务。If the determination result is no, the determining module processes the file to be migrated into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and generates and segments each of the segments. The sub-migration task corresponding to the slice file.
在具体的应用场景中,还包括:In specific application scenarios, it also includes:
生成模块,获取迁移配置信息,根据所述迁移配置信息在所述源网络存储的文件中扫描所述待迁移文件,根据扫描结果生成所述迁移任务,并将所述迁移任务加入所述异步迁移任务队列中。Generating a module, acquiring the migration configuration information, scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, generating the migration task according to the scan result, and adding the migration task to the asynchronous migration In the task queue.
在具体的应用场景中,还包括:In specific application scenarios, it also includes:
更新模块,判断与所述待迁移文件对应的所有分片文件是否全部迁移成 功,并在判断结果为是时更新并存储所述待迁移文件的迁移状态。Updating the module, determining whether all the fragment files corresponding to the file to be migrated are migrated into Work, and update and store the migration status of the file to be migrated when the judgment result is YES.
通过应用本申请的技术方案,在从分片迁移队列中获取各个分片文件的子迁移任务,即根据各子迁移任务从与待迁移文件对应的源网络存储中对各分片文件进行迁移处理,从而能够充分利用网络资源进行分片迁移,提高了网络存储资源的迁移效率,以及节省了设备消耗资源。By applying the technical solution of the present application, the sub-migration task of each fragment file is obtained from the fragment migration queue, that is, each fragment file is migrated from the source network storage corresponding to the file to be migrated according to each sub-migration task. Therefore, the network resources can be fully utilized for fragment migration, the migration efficiency of the network storage resources is improved, and the equipment consumes resources.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以通过硬件实现,也可以借助软件加必要的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several The instructions are for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various implementation scenarios of the present application.
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。A person skilled in the art can understand that the drawings are only a schematic diagram of a preferred implementation scenario, and the modules or processes in the drawings are not necessarily required to implement the application.
本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。A person skilled in the art may understand that the modules in the apparatus in the implementation scenario may be distributed in the apparatus for implementing the scenario according to the implementation scenario description, or may be correspondingly changed in one or more devices different from the implementation scenario. The modules of the above implementation scenarios may be combined into one module, or may be further split into multiple sub-modules.
上述本申请序号仅仅为了描述,不代表实施场景的优劣。The above serial numbers are only for the description, and do not represent the advantages and disadvantages of the implementation scenario.
以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。 The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any changes that can be made by those skilled in the art should fall within the protection scope of the present application.

Claims (10)

  1. 一种数据迁移方法,其特征在于,包括:A data migration method, comprising:
    从分片迁移队列中获取各个分片文件的子迁移任务,所述分片文件由待迁移文件分片生成,所述子迁移任务根据与所述待迁移文件对应的迁移任务生成;Obtaining a sub-migration task of each fragment file from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated;
    根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理。Performing migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
  2. 如权利要求1所述的方法,其特征在于,根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理,具体为:The method according to claim 1, wherein each of the fragment files is migrated in a source network storage corresponding to the file to be migrated according to each of the sub-migration tasks, specifically:
    向所述源网络存储请求与各所述分片文件对应的数据迁移流,所述数据迁移流用于将数据从所述源网络存储转移至内存;And requesting, by the source network, a data migration flow corresponding to each of the fragment files, where the data migration flow is used to transfer data from the source network storage to a memory;
    将所述数据迁移流作为数据输入流上传至所述子迁移任务指定的目标网络存储,所述数据输入流用于将所述数据从所述内存转移至所述目标网络存储。The data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
  3. 如权利要求1所述的方法,其特征在于,在从分片迁移队列中获取各个分片文件的子迁移任务之前,还包括:The method according to claim 1, wherein before the sub-migration task of each fragment file is obtained from the fragment migration queue, the method further comprises:
    从异步迁移队列中获取所述待迁移任务;Obtaining the to-be-migrated task from the asynchronous migration queue;
    判断与所述待迁移任务对应的待迁移文件是否已迁移完成;Determining whether the file to be migrated corresponding to the task to be migrated has been migrated;
    若判断结果为是,从所述异步迁移队列中获取其他的待迁移任务;If the judgment result is yes, obtain other tasks to be migrated from the asynchronous migration queue;
    若判断结果为否,根据所述待迁移文件的容量以及预设的分片参数将所述待迁移文件分片处理为多个所述分片文件,并生成与各所述分片文件对应的子迁移任务。If the result of the determination is no, the file to be migrated is sliced into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and corresponding to each of the fragment files is generated. Submigration task.
  4. 如权利要求1所述的方法,其特征在于,在从异步迁移队列中获取所述待迁移任务之前,还包括: The method of claim 1, further comprising: before acquiring the task to be migrated from the asynchronous migration queue, further comprising:
    获取迁移配置信息;Obtain migration configuration information;
    根据所述迁移配置信息在所述源网络存储的文件中扫描所述待迁移文件;Scan the file to be migrated in a file stored in the source network according to the migration configuration information;
    根据扫描结果生成所述迁移任务,并将所述迁移任务加入所述异步迁移任务队列中。The migration task is generated according to the scan result, and the migration task is added to the asynchronous migration task queue.
  5. 如权利要求1所述的方法,其特征在于,在根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理之后,还包括:The method according to claim 1, further comprising: after performing the migration processing on each of the fragment files in the source network storage corresponding to the file to be migrated according to each of the sub-migration tasks, further comprising:
    判断与所述待迁移文件对应的所有分片文件是否全部迁移成功;Determining whether all the fragment files corresponding to the file to be migrated are successfully migrated;
    若是,更新并存储所述待迁移文件的迁移状态。If yes, update and store the migration status of the file to be migrated.
  6. 一种数据迁移设备,其特征在于,包括:A data migration device, comprising:
    获取模块,从分片迁移队列中获取各个分片文件的子迁移任务,所述分片文件由待迁移文件分片生成,所述子迁移任务根据与所述待迁移文件对应的迁移任务生成;Obtaining a module, the sub-migration task of each fragment file is obtained from the fragment migration queue, where the fragment file is generated by the file to be migrated, and the sub-migration task is generated according to the migration task corresponding to the file to be migrated;
    迁移模块,根据各所述子迁移任务在与所述待迁移文件对应的源网络存储中对各所述分片文件进行迁移处理。The migration module performs migration processing on each of the fragment files in the source network storage corresponding to the to-be-migrated file according to each of the sub-migration tasks.
  7. 如权利要求6所述的设备,其特征在于,所述迁移模块具体用于:The device according to claim 6, wherein the migration module is specifically configured to:
    向所述源网络存储请求与各所述分片文件对应的数据迁移流,所述数据迁移流用于将数据从所述源网络存储转移至内存;And requesting, by the source network, a data migration flow corresponding to each of the fragment files, where the data migration flow is used to transfer data from the source network storage to a memory;
    将所述数据迁移流作为数据输入流上传至所述子迁移任务指定的目标网络存储,所述数据输入流用于将所述数据从所述内存转移至所述目标网络存储。The data migration stream is uploaded as a data input stream to a target network storage specified by the sub-migration task, the data input stream being used to transfer the data from the memory to the target network storage.
  8. 如权利要求6所述的设备,其特征在于,还包括:The device of claim 6 further comprising:
    判断模块,从异步迁移队列中获取所述待迁移任务,判断与所述待迁移 任务对应的待迁移文件是否已迁移完成;The determining module obtains the to-be-migrated task from the asynchronous migration queue, and determines and migrates the to-be-migrated Whether the file to be migrated corresponding to the task has been migrated.
    若判断结果为是,所述判断模块从所述异步迁移队列中获取其他的待迁移任务;If the determination result is yes, the determining module acquires other tasks to be migrated from the asynchronous migration queue;
    若判断结果为否,所述判断模块根据所述待迁移文件的容量以及预设的分片参数将所述待迁移文件分片处理为多个所述分片文件,并生成与各所述分片文件对应的子迁移任务。If the determination result is no, the determining module processes the file to be migrated into a plurality of the fragment files according to the capacity of the file to be migrated and the preset fragmentation parameter, and generates and segments each of the segments. The sub-migration task corresponding to the slice file.
  9. 如权利要求6所述的设备,其特征在于,还包括:The device of claim 6 further comprising:
    生成模块,获取迁移配置信息,根据所述迁移配置信息在所述源网络存储的文件中扫描所述待迁移文件,根据扫描结果生成所述迁移任务,并将所述迁移任务加入所述异步迁移任务队列中。Generating a module, acquiring the migration configuration information, scanning the to-be-migrated file in the file stored in the source network according to the migration configuration information, generating the migration task according to the scan result, and adding the migration task to the asynchronous migration In the task queue.
  10. 如权利要求6所述的设备,其特征在于,还包括:The device of claim 6 further comprising:
    更新模块,判断与所述待迁移文件对应的所有分片文件是否全部迁移成功,并在判断结果为是时更新并存储所述待迁移文件的迁移状态。 The update module determines whether all the fragment files corresponding to the file to be migrated are successfully migrated, and updates and stores the migration status of the file to be migrated when the determination result is yes.
PCT/CN2016/095854 2015-08-27 2016-08-18 Data migration method and device WO2017032262A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510536873.9A CN106487841A (en) 2015-08-27 2015-08-27 A kind of data migration method and equipment
CN201510536873.9 2015-08-27

Publications (1)

Publication Number Publication Date
WO2017032262A1 true WO2017032262A1 (en) 2017-03-02

Family

ID=58099614

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095854 WO2017032262A1 (en) 2015-08-27 2016-08-18 Data migration method and device

Country Status (2)

Country Link
CN (1) CN106487841A (en)
WO (1) WO2017032262A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446180A (en) * 2018-03-23 2018-08-24 南京航空航天大学 A kind of data center dynamic method for scheduling task based on Data Migration

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710679B (en) * 2018-12-28 2021-03-23 北京旷视科技有限公司 Data extraction method and device
CN110597766B (en) * 2019-08-16 2024-01-05 深圳市元征科技股份有限公司 Data transmission method and device
CN112199355B (en) * 2020-12-09 2021-04-16 北京易真学思教育科技有限公司 Data migration method and device, electronic equipment and storage medium
CN112866025B (en) * 2021-01-14 2022-10-11 公安部第三研究所 Intelligent contract fragmentation processing method
CN113791736A (en) * 2021-09-15 2021-12-14 京东科技信息技术有限公司 Data migration method, network card device, server and data migration system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090198748A1 (en) * 2008-02-06 2009-08-06 Kevin John Ash Apparatus, system, and method for relocating storage pool hot spots
CN104144175A (en) * 2013-05-06 2014-11-12 腾讯科技(深圳)有限公司 Method, device and system for data migration
CN104536994A (en) * 2014-12-11 2015-04-22 北京京东尚科信息技术有限公司 Universal data migration method and device
CN104731888A (en) * 2015-03-12 2015-06-24 北京奇虎科技有限公司 Data migration method, device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924269B2 (en) * 2006-05-13 2014-12-30 Sap Ag Consistent set of interfaces derived from a business object model
CN102999537B (en) * 2011-09-19 2017-01-18 阿里巴巴集团控股有限公司 System and method for data migration
CN104077239B (en) * 2014-06-24 2017-04-26 华为技术有限公司 IP hard disk, and memory system and data operation method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090198748A1 (en) * 2008-02-06 2009-08-06 Kevin John Ash Apparatus, system, and method for relocating storage pool hot spots
CN104144175A (en) * 2013-05-06 2014-11-12 腾讯科技(深圳)有限公司 Method, device and system for data migration
CN104536994A (en) * 2014-12-11 2015-04-22 北京京东尚科信息技术有限公司 Universal data migration method and device
CN104731888A (en) * 2015-03-12 2015-06-24 北京奇虎科技有限公司 Data migration method, device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446180A (en) * 2018-03-23 2018-08-24 南京航空航天大学 A kind of data center dynamic method for scheduling task based on Data Migration

Also Published As

Publication number Publication date
CN106487841A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017032262A1 (en) Data migration method and device
US10341251B2 (en) Method and system for securely transmitting volumes into cloud
JP6629697B2 (en) Method and apparatus for extracting a virtual machine image file
US10599457B2 (en) Importing and exporting virtual disk images
US10158693B2 (en) Peer-to-peer network download optimization
US9330106B2 (en) Selective synchronization of remotely stored content
US10958633B2 (en) Method and system for securely transmitting volumes into cloud
US10901780B2 (en) Operating system migration while preserving applications, data, and settings
US9854034B2 (en) Workload deployment density management for a multi-stage computing architecture implemented within a multi-tenant computing environment
CN103873290A (en) Evaluating distributed application performance in a new environment
US9720719B2 (en) Method and system for optimizing virtual disk provisioning
JP2008523520A5 (en)
US20180063284A1 (en) Application delivery to a computing device using dynamic application volume creation and streaming
US10911558B1 (en) On-demand network segmentation
US11373119B1 (en) Framework for building, orchestrating and deploying large-scale machine learning applications
US11605021B1 (en) Iterative model training and deployment for automated learning systems
US20150286437A1 (en) Anti-virus scan via a secondary storage controller that maintains an asynchronous copy of data of a primary storage controller
US20210111949A1 (en) Hierarchical cloud computing resource configuration techniques
TW201327391A (en) System and method for applying virtual machines
US20180288138A1 (en) Load Balancing Between Computing Clouds
US11372811B1 (en) Optimizing disk volume scanning using snapshot metadata
US20180063234A1 (en) Assigning client virtual machines based on location
US10332182B2 (en) Automatic application layer suggestion
US11797535B1 (en) Use of batch mode function execution in database engines to enable efficient calls to remote services
US10244085B2 (en) Transmission control protocol (TPC) data handling

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16838521

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16838521

Country of ref document: EP

Kind code of ref document: A1