CN106547485B - Data migration method and device - Google Patents

Data migration method and device Download PDF

Info

Publication number
CN106547485B
CN106547485B CN201610915921.XA CN201610915921A CN106547485B CN 106547485 B CN106547485 B CN 106547485B CN 201610915921 A CN201610915921 A CN 201610915921A CN 106547485 B CN106547485 B CN 106547485B
Authority
CN
China
Prior art keywords
migration
record
file
list
source terminal
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.)
Expired - Fee Related
Application number
CN201610915921.XA
Other languages
Chinese (zh)
Other versions
CN106547485A (en
Inventor
梅小虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610915921.XA priority Critical patent/CN106547485B/en
Publication of CN106547485A publication Critical patent/CN106547485A/en
Application granted granted Critical
Publication of CN106547485B publication Critical patent/CN106547485B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file 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/0643Management of files

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)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data migration method, which comprises the following steps: after accessing a migration source terminal, acquiring a file list on the migration source terminal; acquiring a first migration record stored locally, determining an untransmitted file in the file list according to the first migration record, and adding the file to the untransmitted list; reading the file on the migration source terminal according to the non-transmission list and storing the file to the local; and updating the first migration record. In addition, the embodiment of the invention also discloses a data migration device. By adopting the embodiment of the invention, the operation flexibility of data migration can be improved.

Description

数据迁移方法及装置Data migration method and device

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种数据迁移方法及装置。The present invention relates to the field of computer technology, and in particular, to a data migration method and device.

背景技术Background technique

随着终端技术的发展,智能手机、平板电脑等智能终端的更新换代速度是越来越快,用户在换手机时,不希望原来的旧手机上的所有数据都随着手机的更换而消失不见,希望将旧手机上的部分资料拷贝到新手机中去,因此,目前很多供应商或应用市场都提供了手机搬家的功能,即可以将整个旧手机上的数据、软件、设置等数据全部原封不动的拷贝到新手机上去,为用户在换机的过程中提供方便。With the development of terminal technology, the replacement speed of smart terminals such as smart phones and tablet computers is getting faster and faster. When users change mobile phones, they do not want all the data on the old mobile phones to disappear with the replacement of mobile phones. , I hope to copy some data on the old mobile phone to the new mobile phone. Therefore, many suppliers or application markets currently provide the function of mobile phone relocation, that is, the data, software, settings and other data on the entire old mobile phone can be all intact. Copy it to the new mobile phone without moving, providing convenience for users in the process of changing phones.

一般来讲,新旧手机上的数据转移是通过WIFI、蓝牙或者其他数据连接实现的,而旧手机上的数据量一般较大,在手机搬家的过程中数据传输所耗费的时间将比较长,并且在此过程中不可断开上述WIFI或蓝牙等数据连接,一旦断开上述数据连接,则可能出现数据意外损坏的情况,造成部分数据无法正常使用。也就是说,在手机搬家过程的技术方案中数据迁移因为传输时间长且中途不可断开传输连接导致的容易出现的数据传输不完整的问题。Generally speaking, the data transfer between the old and new mobile phones is achieved through WIFI, Bluetooth or other data connections, while the amount of data on the old mobile phone is generally large, and the data transfer time during the mobile phone moving process will be relatively long, and During this process, the above data connection such as WIFI or Bluetooth cannot be disconnected. Once the above data connection is disconnected, the data may be accidentally damaged, resulting in some data not being able to be used normally. That is to say, in the technical solution of the mobile phone moving process, the data migration is prone to the problem of incomplete data transmission due to the long transmission time and the inability to disconnect the transmission connection in the middle.

发明内容SUMMARY OF THE INVENTION

本发明实施例提出了一种数据迁移方法,可以解决手机搬家过程中因为数据传输时间过长且中途不可断开连接从而导致的容易出现的数据传输的完整性不足的技术问题。The embodiment of the present invention proposes a data migration method, which can solve the technical problem of insufficient integrity of data transmission, which is easy to occur due to the long data transmission time and the inability to disconnect the connection in the middle of the mobile phone moving process.

一种数据迁移方法,包括:A data migration method including:

在接入迁移源终端之后,获取所述迁移源终端上的文件列表;After accessing the migration source terminal, obtain a file list on the migration source terminal;

获取本地存储的第一迁移记录,根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表;Obtain the first migration record stored locally, and determine the untransferred files in the file list according to the first migration record and add them to the untransferred list;

根据所述未传输列表读取所述迁移源终端上的文件并存储到本地;Read the file on the migration source terminal according to the untransferred list and store it locally;

更新所述第一迁移记录。The first migration record is updated.

可选的,在其中一个实施例中,所述根据所述迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤之前还包括:Optionally, in one of the embodiments, before the step of determining the untransferred files in the file list according to the migration record and adding them to the untransferred list, the step further includes:

获取所述迁移源终端上的第二迁移记录;acquiring the second migration record on the migration source terminal;

判断所述第一迁移记录与所述第二迁移记录是否一致;Judging whether the first migration record is consistent with the second migration record;

若是,则执行所述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤。If so, the step of determining the untransferred files in the file list according to the first migration record and adding them to the untransferred list is performed.

可选的,在其中一个实施例中,所述判断所述第一迁移记录与所述第二迁移记录是否一致的步骤之后还包括:Optionally, in one of the embodiments, after the step of judging whether the first migration record is consistent with the second migration record further includes:

在所述第一迁移记录与所述第二迁移记录不一致时,获取本地已存储文件的存储文件列表;When the first migration record is inconsistent with the second migration record, acquiring a stored file list of locally stored files;

判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致;Judging whether the stored file list is consistent with the transferred files in the first migration record;

在所述存储文件列表与所述第一迁移记录中的已传输文件一致时,执行所述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤。When the stored file list is consistent with the transferred files in the first migration record, the step of determining untransferred files in the file list according to the first migration record and adding them to the untransferred list is performed.

可选的,在其中一个实施例中,所述判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致的步骤之后还包括:Optionally, in one of the embodiments, after the step of judging whether the stored file list is consistent with the transferred files in the first migration record further includes:

在所述存储文件列表与所述第一迁移记录中的已传输文件不一致时,判断所述存储文件列表与所述第二迁移记录中的已传输文件是否一致,在所述本存储文件列表与所述第二迁移记录中的已传输文件一致时,根据所述第二迁移记录确定所述文件列表中的未传输文件并添加到所述未传输列表。When the stored file list is inconsistent with the transferred files in the first migration record, it is judged whether the stored file list is consistent with the transferred files in the second migration record. When the transferred files in the second migration record are consistent, the untransferred files in the file list are determined according to the second migration record and added to the untransferred list.

可选的,在其中一个实施例中,所述方法还包括:Optionally, in one embodiment, the method further includes:

在本地中未存储有第一迁移记录时,根据所述文件列表读取所述迁移源终端上的文件并存储到本地;When the first migration record is not stored locally, read the file on the migration source terminal according to the file list and store it locally;

生成迁移记录,所述迁移记录用于记载将所述迁移源终端上的文件存储到本地的数据迁移记录,将所述迁移记录作为第一迁移记录存储到本地。A migration record is generated, where the migration record is used to record a data migration record for storing the file on the migration source terminal locally, and the migration record is stored locally as a first migration record.

可选的,在其中一个实施例中,所述生成迁移记录之后还包括:Optionally, in one embodiment, after generating the migration record, the method further includes:

将所述迁移记录作为第二迁移记录发送至所述迁移源终端;sending the migration record to the migration source terminal as a second migration record;

监测所述迁移记录是否发生更新事件,在监测到所述迁移记录的更新事件时,将更新后的迁移记录作为更新后的第二迁移记录发送至所述迁移源终端,所述迁移源终端根据接收到的更新后的第二迁移记录对所述第二迁移记录进行更新。Monitor whether an update event occurs in the migration record, and when monitoring the update event of the migration record, send the updated migration record as the updated second migration record to the migration source terminal, and the migration source terminal according to the The received updated second migration record updates the second migration record.

此外,还提出了一种数据迁移装置。In addition, a data migration device is also proposed.

一种数据迁移装置,包括:A data migration device, comprising:

文件列表获取模块,用于在接入迁移源终端之后,获取所述迁移源终端上的文件列表;a file list acquisition module, configured to acquire a file list on the migration source terminal after accessing the migration source terminal;

未传输列表确定模块,用于获取本地存储的第一迁移记录,根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表;an untransferred list determination module, configured to obtain a locally stored first migration record, determine untransferred files in the file list according to the first migration record, and add them to the untransferred list;

数据迁移模块,用于根据所述未传输列表读取所述迁移源终端上的文件并存储到本地;a data migration module, configured to read the file on the migration source terminal according to the untransferred list and store it locally;

第一迁移记录更新模块,用于更新所述第一迁移记录。A first migration record updating module, configured to update the first migration record.

可选的,在其中一个实施例中,所述装置还包括迁移记录校验模块,用于获取所述迁移源终端上的第二迁移记录;判断所述第一迁移记录与所述第二迁移记录是否一致;在所述第一迁移记录与所述第二迁移记录一致时,调用所述未传输列表确定模块。Optionally, in one embodiment, the apparatus further includes a migration record verification module, configured to obtain a second migration record on the migration source terminal; determine the difference between the first migration record and the second migration record. Whether the records are consistent; when the first migration record is consistent with the second migration record, the untransmitted list determination module is called.

可选的,在其中一个实施例中,所述迁移记录校验模块还用于在所述第一迁移记录与所述第二迁移记录不一致时,获取本地已存储文件的存储文件列表;判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致;在所述存储文件列表与所述第一迁移记录中的已传输文件一致时,调用所述未传输列表确定模块。Optionally, in one embodiment, the migration record verification module is further configured to obtain a storage file list of locally stored files when the first migration record is inconsistent with the second migration record; whether the stored file list is consistent with the transferred files in the first migration record; when the stored file list is consistent with the transferred files in the first migration record, the untransferred list determination module is invoked.

可选的,在其中一个实施例中,所述迁移记录校验模块还用于在所述存储文件列表与所述第一迁移记录中的已传输文件不一致时,判断所述存储文件列表与所述第二迁移记录中的已传输文件是否一致,在所述本存储文件列表与所述第二迁移记录中的已传输文件一致时,根据所述第二迁移记录确定所述文件列表中的未传输文件并添加到所述未传输列表。Optionally, in one embodiment, the migration record verification module is further configured to judge that the stored file list is consistent with the transferred file in the first migration record when the stored file list is inconsistent with the transferred file. whether the transferred files in the second migration record are consistent, and when the current stored file list is consistent with the transferred files in the second migration record, determine whether the files in the file list are not in the file list according to the second migration record. Transfer files and add to the untransferred list.

可选的,在其中一个实施例中,所述装置还包括迁移记录创建模块,用于在本地中未存储有第一迁移记录时,根据所述文件列表读取所述迁移源终端上的文件并存储到本地;生成迁移记录,所述迁移记录用于记载将所述迁移源终端上的文件存储到本地的数据迁移记录,将所述迁移记录作为第一迁移记录存储到本地。Optionally, in one embodiment, the apparatus further includes a migration record creation module, configured to read the file on the migration source terminal according to the file list when the first migration record is not stored locally. and store the data locally; generate a migration record, where the migration record is used to record the data migration record of storing the file on the migration source terminal locally, and store the migration record locally as the first migration record.

可选的,在其中一个实施例中,所述装置还包括第二迁移记录更新模块,用于将所述迁移记录作为第二迁移记录发送至所述迁移源终端;监测所述迁移记录是否发生更新事件,在监测到所述迁移记录的更新事件时,将更新后的迁移记录作为更新后的第二迁移记录发送至所述迁移源终端,所述迁移源终端根据接收到的更新后的第二迁移记录对所述第二迁移记录进行更新。Optionally, in one embodiment, the apparatus further includes a second migration record updating module, configured to send the migration record as the second migration record to the migration source terminal; monitor whether the migration record occurs The update event, when monitoring the update event of the migration record, sending the updated migration record as the updated second migration record to the migration source terminal, and the migration source terminal according to the received updated first migration record. The second migration record updates the second migration record.

采用了上述数据迁移方法和装置之后,在目标迁移终端与迁移源终端之间进行数据迁移时,用迁移记录来记载两个终端之间的数据迁移情况,并且在数据迁移被中断之后并且再次发起数据迁移时,根据原来的迁移记录来确定已经传输的文件和还未进行传输的文件,从而继续原来的数据迁移。也就是说,在数据迁移的过程中就算数据迁移被中止,下次可以根据迁移记录继续原来未完成的数据迁移,增加了在数据迁移过程中的操作灵活性,并且避免了在数据迁移的过程中因为数据迁移被中止造成的数据完整性不足的缺陷,提高了迁移数据的完整性。After using the above data migration method and device, when data migration is performed between the target migration terminal and the migration source terminal, the migration record is used to record the data migration situation between the two terminals, and after the data migration is interrupted, it is initiated again During data migration, the files that have been transferred and the files that have not been transferred are determined according to the original migration record, so as to continue the original data migration. That is to say, even if the data migration is suspended during the data migration process, the original unfinished data migration can be continued according to the migration record next time, which increases the operational flexibility during the data migration process and avoids the need for data migration in the process of data migration. This improves the integrity of the migrated data due to the defect of insufficient data integrity caused by the suspension of data migration.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

其中:in:

图1为一个实施例中一种数据迁移方法的流程示意图;1 is a schematic flowchart of a data migration method in one embodiment;

图2为一个实施例中一种数据迁移装置的结构示意图;2 is a schematic structural diagram of a data migration apparatus in one embodiment;

图3为一个实施例中运行前述数据迁移方法的计算机设备的结构示意图。FIG. 3 is a schematic structural diagram of a computer device running the foregoing data migration method in one embodiment.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在本实施例中,提出了一种数据迁移方法,该方法的实现可依赖于计算机程序,该计算机程序可运行于基于冯诺依曼体系的计算机系统之上,该计算机程序可以是终端与终端之间的数据迁移应用程序,例如换机应用、手机搬家应用等应用程序。该计算机系统可以是运行上述计算机程序的例如智能手机、平板电脑、个人电脑等服务器或终端。In this embodiment, a data migration method is proposed. The implementation of the method can depend on a computer program, and the computer program can run on a computer system based on the von Neumann system. The computer program can be a terminal and a terminal. Data migration applications between mobile phones, such as mobile phone changing applications, mobile phone moving applications and other applications. The computer system may be a server or terminal such as a smart phone, a tablet computer, a personal computer, etc. running the above-mentioned computer program.

具体的,如图1所示,上述数据迁移方法包括如下步骤S102-S108:Specifically, as shown in FIG. 1, the above data migration method includes the following steps S102-S108:

步骤S102:在接入迁移源终端之后,获取所述迁移源终端上的文件列表。Step S102: After accessing the migration source terminal, acquire a file list on the migration source terminal.

在本实施例中,执行终端为数据迁移的目标迁移终端,也就是说,在本实施例中,将迁移源终端上的数据转存至本地的目标迁移终端上,例如,在进行数据迁移的过程中,是将旧手机上数据原封不动的拷贝到新手机上去,旧手机即为迁移源终端,新手机即为目标迁移终端。In this embodiment, the execution terminal is the target migration terminal of data migration, that is to say, in this embodiment, the data on the migration source terminal is transferred to the local target migration terminal, for example, during the data migration In the process, the data on the old mobile phone is copied to the new mobile phone intact, the old mobile phone is the migration source terminal, and the new mobile phone is the target migration terminal.

在进行数据迁移之前,首先需要建立迁移终端与目标迁移源终端之间的通信连接,例如,目标迁移终端与迁移源终端之间的通信连接可以是蓝牙、wifi、NFC或者有线连接,也就是说,可以通过上述通信连接将迁移源终端上的数据迁移至本地的目标迁移终端上去。Before data migration, it is first necessary to establish a communication connection between the migration terminal and the target migration source terminal. For example, the communication connection between the target migration terminal and the migration source terminal can be Bluetooth, wifi, NFC or wired connection, that is to say , the data on the migration source terminal can be migrated to the local target migration terminal through the above communication connection.

例如,在一个实施例中,在作为目标迁移终端的新手机以及作为迁移源终端的旧手机中,分别进入到终端上安装的例如“手机搬家”等数据迁移应用中之后,可以建立新旧手机直接的通信连接。For example, in one embodiment, after the new mobile phone as the target migration terminal and the old mobile phone as the migration source terminal respectively enter the data migration applications such as "mobile phone move" installed on the terminals, the new and old mobile phones can be directly communication connection.

需要说明的是,在本实施例中,在建立了目标迁移终端与迁移源终端之间的通信连接之后,用户可以在新手机上预览旧手机上的数据。具体的,在目标迁移终端接入迁移源终端之后,目标迁移终端通过与迁移源终端之间的通信连接,获取迁移源终端上的文件列表,该文件列表即为需要迁移的所有文件的文件列表。It should be noted that, in this embodiment, after the communication connection between the target migration terminal and the migration source terminal is established, the user can preview the data on the old mobile phone on the new mobile phone. Specifically, after the target migration terminal accesses the migration source terminal, the target migration terminal obtains the file list on the migration source terminal through the communication connection with the migration source terminal, and the file list is the file list of all files to be migrated .

步骤S104:获取本地存储的第一迁移记录,根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表。Step S104: Acquire a locally stored first migration record, determine an untransferred file in the file list according to the first migration record, and add it to the untransferred list.

在本实施例中,若在本次进行数据迁移之前,目标迁移终端与迁移源终端之间进行过数据迁移,并且数据迁移因为通信连接断开或者用户主动终止数据迁移等原因导致了数据迁移终止或者数据迁移没有全部完成,在此种情况下,在本地的目标迁移终端上生成了迁移记录并且该迁移记录是与之前目标迁移终端与迁移源终端之间的数据迁移的历史是对应的。根据上述迁移记录,可以确定目标迁移终端与迁移源终端之间已经迁移的数据和还未进行数据迁移的数据。In this embodiment, if data migration has been performed between the target migration terminal and the migration source terminal before the current data migration, and the data migration is terminated due to the disconnection of the communication connection or the user's initiative to terminate the data migration, etc. Or the data migration is not completely completed. In this case, a migration record is generated on the local target migration terminal and the migration record corresponds to the previous data migration history between the target migration terminal and the migration source terminal. According to the above migration record, the data that has been migrated between the target migration terminal and the migration source terminal and the data that has not yet been migrated can be determined.

在本地目标迁移终端存储的迁移记录为第一迁移记录,根据第一迁移记录可以在获取的迁移源终端上的文件列表中,确定在该文件列表中已经进行了数据迁移的已传输文件和在该文件列表中还未进行数据迁移的未传输文件,在确定过了上述文件列表中的未传输文件之后,将所有的未传输文件添加到未传输列表中。The migration record stored in the local destination migration terminal is the first migration record. According to the first migration record, it can be determined from the file list on the migration source terminal obtained in the file list that the transferred files that have undergone data migration and the files in the file list have been migrated. For the untransferred files in the file list that have not yet undergone data migration, after determining the untransferred files in the above file list, all untransferred files are added to the untransferred list.

需要说明的是,在本实施例中,在目标迁移终端的显示界面上还可以展示有上述未传输列表,例如,在相应的操作界面中,展示了未传输列表展示组件,其中未传输列表展示组件用来展示还未进行数据迁移的文件所对应的为传输列表。并且,在完成了某一个未传输文件的数据迁移之后,将该文件从上述未传输列表中删除。It should be noted that, in this embodiment, the above-mentioned untransferred list may also be displayed on the display interface of the target migration terminal. For example, in the corresponding operation interface, the untransferred list display component is displayed, wherein the untransferred list display component is displayed. The component is used to display the transfer list corresponding to the files that have not yet been migrated. And, after the data migration of a certain untransferred file is completed, the file is deleted from the above untransferred list.

步骤S106:根据所述未传输列表读取所述迁移源终端上的文件并存储到本地。Step S106: Read the file on the migration source terminal according to the untransferred list and store it locally.

根据未传输列表上包含的每一个未传输文件,逐一的从迁移源终端上读取该未传输文件,并且将读取到的未传输文件通过上述目标迁移终端与迁移源终端之间的通信连接存储在迁移终端本地,即完成该未传输文件的数据迁移。According to each untransferred file included in the untransferred list, read the untransferred files from the migration source terminal one by one, and pass the read untransferred files through the communication connection between the target migration terminal and the migration source terminal The data is stored locally on the migration terminal, that is, the data migration of the untransferred file is completed.

步骤S108:更新所述第一迁移记录。Step S108: Update the first migration record.

在本实施例中,每完成一个文件的数据迁移,均将相应的数据迁移对应的记录更新在上述第一迁移记录中,也就是说,第一迁移记录是实时记载的数据迁移的迁移进度。In this embodiment, each time the data migration of a file is completed, the record corresponding to the corresponding data migration is updated in the first migration record, that is, the first migration record is the migration progress of the data migration recorded in real time.

需要说明的是,上述操作步骤所针对的都是在本地的目标迁移终端上存储有第一迁移记录的情况,若在本地未存储有第一迁移记录(即在之前目标迁移终端与迁移源终端之间并没有进行过数据迁移),则不需要根据第一迁移记录确定文件列表中的未传输文件,而是将文件列表中的所有的文件均判定为未传输文件。It should be noted that the above operation steps are aimed at the situation where the first migration record is stored on the local target migration terminal. No data migration has been performed between), it is not necessary to determine the untransferred files in the file list according to the first migration record, but all files in the file list are determined as untransferred files.

具体的,在一个实施例中,上述方法还包括:在本地中未存储有第一迁移记录时,根据所述文件列表读取所述迁移源终端上的文件并存储到本地;生成迁移记录,所述迁移记录用于记载将所述迁移源终端上的文件存储到本地的数据迁移记录,将所述迁移记录作为第一迁移记录存储到本地。Specifically, in one embodiment, the above method further includes: when the first migration record is not stored locally, reading the file on the migration source terminal according to the file list and storing it locally; generating a migration record, The migration record is used to record the data migration record of storing the file on the migration source terminal locally, and the migration record is stored locally as the first migration record.

也就是说,若目标迁移终端与迁移源终端之间是首次进行数据迁移,则直接根据步骤S102中获取的迁移源终端上的文件列表来逐一进行数据迁移,并且,同时生成迁移记录来记载目标迁移终端与迁移源终端之间的数据迁移进度和具体的迁移数据情况。That is to say, if data migration is performed for the first time between the target migration terminal and the migration source terminal, the data migration is directly performed one by one according to the file list on the migration source terminal obtained in step S102, and a migration record is generated to record the target at the same time. The data migration progress between the migration terminal and the migration source terminal and the specific migration data situation.

需要说明的是,迁移记录不仅在目标迁移终端上有保存,还在迁移源终端上也有保存。It should be noted that the migration record is not only saved on the target migration terminal, but also saved on the migration source terminal.

具体的,在一个实施例中,所述生成迁移记录之后还包括:将所述迁移记录作为第二迁移记录发送至所述迁移源终端;监测所述迁移记录是否发生更新事件,在监测到所述迁移记录的更新事件时,将更新后的迁移记录作为更新后的第二迁移记录发送至所述迁移源终端,所述迁移源终端根据接收到的更新后的第二迁移记录对所述第二迁移记录进行更新。Specifically, in an embodiment, after generating the migration record, the method further includes: sending the migration record as a second migration record to the migration source terminal; monitoring whether an update event occurs in the migration record, and after monitoring the migration record When the update event of the migration record is detected, the updated migration record is sent to the migration source terminal as the updated second migration record, and the migration source terminal sends the updated migration record to the migration source terminal according to the received updated second migration record. 2. Migration records are updated.

也就是说,在迁移记录生成的同时,将该迁移记录也发送给迁移源终端,由迁移源终端进行存储,并且,在每一次迁移记录发生更新时,都对迁移源终端上存储的迁移记录进行同步的更新,也就是说,保证了迁移源终端以及目标迁移终端上的迁移记录的同步性。That is to say, when the migration record is generated, the migration record is also sent to the migration source terminal for storage by the migration source terminal, and every time the migration record is updated, the migration record stored on the migration source terminal is updated. The synchronization is updated, that is, the synchronization of the migration records on the migration source terminal and the target migration terminal is ensured.

进一步的,为了提高在数据迁移的过程中再次续迁移的情况下,续迁移数据的准备性和完整性,还需要对目标迁移终端以及迁移源终端上分别存储的迁移记录进行校验。Further, in order to improve the readiness and integrity of the re-migration data in the case of re-migration during the data migration process, it is also necessary to verify the migration records stored on the target migration terminal and the migration source terminal respectively.

具体的,上述根据所述迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤之前还包括:获取所述迁移源终端上的第二迁移记录;判断所述第一迁移记录与所述第二迁移记录是否一致;若是,则执行所述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤。Specifically, before the step of determining the untransferred files in the file list according to the migration records and adding them to the untransferred list, the step further includes: acquiring a second migration record on the migration source terminal; judging the first migration records Whether the record is consistent with the second migration record; if so, the step of determining an untransferred file in the file list according to the first migration record and adding it to the untransferred list is performed.

即,只有在迁移源终端上存储的第二迁移记录与本地的目标迁移终端上存储的第一迁移记录是一致的情况下,才直接执行上述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤,在此种情况下,因为第一迁移记录与第二迁移记录是一致的,因此以第一迁移记录还是第二迁移记录作为确定未传输文件的基础的效果是一致的。That is, only when the second migration record stored on the migration source terminal is consistent with the first migration record stored on the local target migration terminal, the above-mentioned determining according to the first migration record is performed directly in the file list. The step of adding the untransferred file to the untransferred list. In this case, because the first migration record and the second migration record are consistent, the first migration record or the second migration record is used as the basis for determining the untransferred file. The basic effect is the same.

进一步的,若迁移源终端上存储的第二迁移记录与本地的目标迁移终端上存储的第一迁移记录不是一致的,则需要进行进一步的确定,确定在确定未传输文件的过程中是基于第一迁移记录还是第二迁移记录。Further, if the second migration record stored on the migration source terminal is not consistent with the first migration record stored on the local target migration terminal, further determination is required, and it is determined that the process of determining the untransferred file is based on the first migration record. The first migration record is also the second migration record.

具体的,所述判断所述第一迁移记录与所述第二迁移记录是否一致的步骤之后还包括:在所述第一迁移记录与所述第二迁移记录不一致时,获取本地已存储文件的存储文件列表;判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致;在所述存储文件列表与所述第一迁移记录中的已传输文件一致时,执行所述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤;在所述存储文件列表与所述第一迁移记录中的已传输文件不一致时,判断所述存储文件列表与所述第二迁移记录中的已传输文件是否一致,在所述本存储文件列表与所述第二迁移记录中的已传输文件一致时,根据所述第二迁移记录确定所述文件列表中的未传输文件并添加到所述未传输列表。Specifically, after the step of judging whether the first migration record and the second migration record are consistent, the step further includes: when the first migration record is inconsistent with the second migration record, obtaining the locally stored file Stored file list; determine whether the stored file list is consistent with the transferred file in the first migration record; when the stored file list is consistent with the transferred file in the first migration record, execute the The first migration record determines the untransferred file in the file list and adds it to the untransferred list; when the stored file list is inconsistent with the transferred file in the first migration record, it is determined that the stored file Whether the file list is consistent with the transferred file in the second migration record, when the stored file list is consistent with the transferred file in the second migration record, determine the file according to the second migration record The untransferred files in the list are added to said untransferred list.

也就是说,若迁移源终端上存储的第二迁移记录与本地的目标迁移终端上存储的第一迁移记录不是一致的,则需要判断迁移源终端上存储的第二迁移记录以及本地的目标迁移终端上存储的第一迁移记录中记载的已传输文件是否存在某一个迁移记录与本地的目标迁移终端上已存储的文件是一致的,则说明该迁移记录与目标迁移终端上的已存储文件是一致的,因此,应该根据该迁移记录来确定上述步骤S102中获取的文件列表中的未传输文件。That is to say, if the second migration record stored on the migration source terminal is not consistent with the first migration record stored on the local target migration terminal, it is necessary to determine the second migration record stored on the migration source terminal and the local target migration record. Whether there is a certain migration record in the transferred file recorded in the first migration record stored on the terminal is consistent with the file stored on the local target migration terminal, it means that the migration record is the same as the file stored on the target migration terminal. Therefore, the untransferred files in the file list obtained in the above step S102 should be determined according to the migration record.

在一个实施例中,如图2所示,还提出了一种数据迁移装置,包括文件列表获取模块102、未传输列表确定模块104、数据迁移模块106以及第一迁移记录更新模块108,其中:In one embodiment, as shown in FIG. 2, a data migration apparatus is also proposed, including a file list acquisition module 102, an untransmitted list determination module 104, a data migration module 106, and a first migration record update module 108, wherein:

文件列表获取模块102,用于在接入迁移源终端之后,获取所述迁移源终端上的文件列表;a file list obtaining module 102, configured to obtain a file list on the migration source terminal after accessing the migration source terminal;

未传输列表确定模块104,用于获取本地存储的第一迁移记录,根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表;an untransferred list determining module 104, configured to obtain a locally stored first migration record, determine untransferred files in the file list according to the first migration record, and add them to the untransferred list;

数据迁移模块106,用于根据所述未传输列表读取所述迁移源终端上的文件并存储到本地;a data migration module 106, configured to read the file on the migration source terminal according to the untransferred list and store it locally;

第一迁移记录更新模块108,用于更新所述第一迁移记录。The first migration record updating module 108 is configured to update the first migration record.

可选的,在一个实施例中,如图2所示,上述装置还包括迁移记录校验模块110,用于获取所述迁移源终端上的第二迁移记录;判断所述第一迁移记录与所述第二迁移记录是否一致;在所述第一迁移记录与所述第二迁移记录一致时,调用所述未传输列表确定模块。Optionally, in an embodiment, as shown in FIG. 2 , the above-mentioned apparatus further includes a migration record verification module 110, which is used to obtain a second migration record on the migration source terminal; Whether the second migration record is consistent; when the first migration record is consistent with the second migration record, the untransferred list determination module is invoked.

可选的,在一个实施例中,上述迁移记录校验模块110还用于在所述第一迁移记录与所述第二迁移记录不一致时,获取本地已存储文件的存储文件列表;判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致;在所述存储文件列表与所述第一迁移记录中的已传输文件一致时,调用所述未传输列表确定模块104。Optionally, in one embodiment, the above-mentioned migration record verification module 110 is further configured to obtain a storage file list of locally stored files when the first migration record is inconsistent with the second migration record; Whether the stored file list is consistent with the transferred files in the first migration record; when the stored file list is consistent with the transferred files in the first migration record, the untransferred list determination module 104 is invoked.

可选的,在一个实施例中,上述迁移记录校验模块110还用于在所述存储文件列表与所述第一迁移记录中的已传输文件不一致时,判断所述存储文件列表与所述第二迁移记录中的已传输文件是否一致,在所述本存储文件列表与所述第二迁移记录中的已传输文件一致时,根据所述第二迁移记录确定所述文件列表中的未传输文件并添加到所述未传输列表。Optionally, in one embodiment, the above-mentioned migration record verification module 110 is further configured to judge that the stored file list is consistent with the transferred file in the first migration record when the stored file list is inconsistent with the Whether the transferred files in the second migration record are consistent, when the stored file list is consistent with the transferred files in the second migration record, determine the untransferred files in the file list according to the second migration record file and add it to the untransferred list.

可选的,在一个实施例中,如图2所示,上述装置还包括迁移记录创建模块112,用于在本地中未存储有第一迁移记录时,根据所述文件列表读取所述迁移源终端上的文件并存储到本地;生成迁移记录,所述迁移记录用于记载将所述迁移源终端上的文件存储到本地的数据迁移记录,将所述迁移记录作为第一迁移记录存储到本地。Optionally, in an embodiment, as shown in FIG. 2 , the above-mentioned apparatus further includes a migration record creation module 112, configured to read the migration record according to the file list when the first migration record is not stored locally. The file on the source terminal is stored locally; a migration record is generated, and the migration record is used to record the data migration record of storing the file on the migration source terminal to the local, and the migration record is stored as the first migration record in local.

可选的,在一个实施例中,如图2所示,上述装置还包括第二迁移记录更新模块114,用于将所述迁移记录作为第二迁移记录发送至所述迁移源终端;监测所述迁移记录是否发生更新事件,在监测到所述迁移记录的更新事件时,将更新后的迁移记录作为更新后的第二迁移记录发送至所述迁移源终端,所述迁移源终端根据接收到的更新后的第二迁移记录对所述第二迁移记录进行更新。Optionally, in an embodiment, as shown in FIG. 2 , the above-mentioned apparatus further includes a second migration record updating module 114, configured to send the migration record as the second migration record to the migration source terminal; whether an update event has occurred in the migration record, and when monitoring the update event of the migration record, send the updated migration record as the updated second migration record to the migration source terminal, and the migration source terminal will send the updated migration record to the migration source terminal according to the received The updated second migration record updates the second migration record.

采用了上述数据迁移方法和装置之后,在目标迁移终端与迁移源终端之间进行数据迁移时,用迁移记录来记载两个终端之间的数据迁移情况,并且在数据迁移被中断之后并且再次发起数据迁移时,根据原来的迁移记录来确定已经传输的文件和还未进行传输的文件,从而继续原来的数据迁移。也就是说,在数据迁移的过程中就算数据迁移被中止,下次可以根据迁移记录继续原来未完成的数据迁移,增加了在数据迁移过程中的操作灵活性,并且避免了在数据迁移的过程中因为数据迁移被中止造成的数据完整性不足的缺陷,提高了迁移数据的完整性。After using the above data migration method and device, when data migration is performed between the target migration terminal and the migration source terminal, the migration record is used to record the data migration situation between the two terminals, and after the data migration is interrupted, it is initiated again During data migration, the files that have been transferred and the files that have not been transferred are determined according to the original migration record, so as to continue the original data migration. That is to say, even if the data migration is suspended during the data migration process, the original unfinished data migration can be continued according to the migration record next time, which increases the operational flexibility during the data migration process and avoids the need for data migration in the process of data migration. This improves the integrity of the migrated data due to the defect of insufficient data integrity caused by the suspension of data migration.

在一个实施例中,如图3所示,图3展示了一种运行上述数据迁移方法的基于冯诺依曼体系的计算机系统的终端。该计算机系统可以是智能手机、平板电脑、掌上电脑、笔记本电脑或个人电脑等终端设备。具体的,可包括通过系统总线连接的外部输入接口1001、处理器1002、存储器1003和输出接口1004。其中,外部输入接口1001可选的可至少包括网络接口10012。存储器1003可包括外存储器10032(例如硬盘、光盘或软盘等)和内存储器10034。输出接口1004可至少包括显示屏10042等设备。In one embodiment, as shown in FIG. 3 , FIG. 3 shows a terminal of a computer system based on the von Neumann architecture running the above data migration method. The computer system may be a terminal device such as a smart phone, a tablet computer, a palmtop computer, a notebook computer or a personal computer. Specifically, it may include an external input interface 1001, a processor 1002, a memory 1003, and an output interface 1004 connected through a system bus. The external input interface 1001 may optionally include at least a network interface 10012 . The memory 1003 may include an external memory 10032 (eg, a hard disk, an optical disk, or a floppy disk, etc.) and an internal memory 10034 . The output interface 1004 may at least include a display screen 10042 and other devices.

在本实施例中,本方法的运行基于计算机程序,该计算机程序的程序文件存储于前述基于冯诺依曼体系的计算机系统的外存储器10032中,在运行时被加载到内存储器10034中,然后被编译为机器码之后传递至处理器1002中执行,从而使得基于冯诺依曼体系的计算机系统中形成逻辑上的文件列表获取模块102、未传输列表确定模块104、数据迁移模块106、第一迁移记录更新模块108、迁移记录校验模块110、迁移记录创建模块112以及第二迁移记录更新模块114。且在上述数据迁移方法执行过程中,输入的参数均通过外部输入接口1001接收,并传递至存储器1003中缓存,然后输入到处理器1002中进行处理,处理的结果数据或缓存于存储器1003中进行后续地处理,或被传递至输出接口1004进行输出。In this embodiment, the operation of this method is based on a computer program, and the program file of the computer program is stored in the external memory 10032 of the aforementioned computer system based on the von Neumann system, loaded into the internal memory 10034 during operation, and then After being compiled into machine code, it is passed to the processor 1002 for execution, so that the computer system based on the von Neumann system forms a logical file list acquisition module 102, an untransmitted list determination module 104, a data migration module 106, a first The migration record update module 108 , the migration record verification module 110 , the migration record creation module 112 and the second migration record update module 114 . And in the execution process of the above data migration method, the input parameters are all received through the external input interface 1001, and passed to the memory 1003 to be cached, and then input to the processor 1002 for processing, and the processed result data may be cached in the memory 1003 for processing. Subsequent processing, or passed to the output interface 1004 for output.

具体的,在本实施例中,上述处理器1002用于执行如下操作:Specifically, in this embodiment, the above-mentioned processor 1002 is configured to perform the following operations:

在接入迁移源终端之后,获取所述迁移源终端上的文件列表;After accessing the migration source terminal, obtain a file list on the migration source terminal;

获取本地存储的第一迁移记录,根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表;Obtain the first migration record stored locally, and determine the untransferred files in the file list according to the first migration record and add them to the untransferred list;

根据所述未传输列表读取所述迁移源终端上的文件并存储到本地;Read the file on the migration source terminal according to the untransferred list and store it locally;

更新所述第一迁移记录。The first migration record is updated.

在一个可选的实施例中,在处理器1002根据所述迁移记录确定所述文件列表中的未传输文件并添加到未传输列表之前,处理器1002还用于获取所述迁移源终端上的第二迁移记录;判断所述第一迁移记录与所述第二迁移记录是否一致;若是,则执行所述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤。In an optional embodiment, before the processor 1002 determines the untransferred file in the file list according to the migration record and adds it to the untransferred list, the processor 1002 is further configured to obtain the file on the migration source terminal. second migration record; determine whether the first migration record is consistent with the second migration record; if so, execute the determining of the untransferred file in the file list according to the first migration record and add it to the untransferred file List of steps.

在一个可选的实施例中,在处理器1002判断所述第一迁移记录与所述第二迁移记录是否一致之后,处理器1002还用于在所述第一迁移记录与所述第二迁移记录不一致时,获取本地已存储文件的存储文件列表;判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致;在所述存储文件列表与所述第一迁移记录中的已传输文件一致时,执行所述根据所述第一迁移记录确定所述文件列表中的未传输文件并添加到未传输列表的步骤。In an optional embodiment, after the processor 1002 determines whether the first migration record and the second migration record are consistent, the processor 1002 is further configured to perform the same operation between the first migration record and the second migration record When the records are inconsistent, obtain the stored file list of the locally stored files; determine whether the stored file list is consistent with the transferred files in the first migration record; When the transferred files are consistent, the step of determining the untransferred files in the file list according to the first migration record and adding them to the untransferred list is performed.

在一个可选的实施例中,在处理器1002判断所述存储文件列表与所述第一迁移记录中的已传输文件是否一致之后,处理器1002还用于在所述存储文件列表与所述第一迁移记录中的已传输文件不一致时,判断所述存储文件列表与所述第二迁移记录中的已传输文件是否一致,在所述本存储文件列表与所述第二迁移记录中的已传输文件一致时,根据所述第二迁移记录确定所述文件列表中的未传输文件并添加到所述未传输列表。In an optional embodiment, after the processor 1002 determines whether the stored file list is consistent with the transferred file in the first migration record, the processor 1002 is further configured to compare the stored file list with the transferred file in the first migration record. When the transferred files in the first migration record are inconsistent, it is determined whether the stored file list is consistent with the transferred files in the second migration record. When the transferred files are consistent, the untransferred files in the file list are determined according to the second migration record and added to the untransferred list.

在一个可选的实施例中,处理器1002还用于在本地中未存储有第一迁移记录时,根据所述文件列表读取所述迁移源终端上的文件并存储到本地;生成迁移记录,所述迁移记录用于记载将所述迁移源终端上的文件存储到本地的数据迁移记录,将所述迁移记录作为第一迁移记录存储到本地。In an optional embodiment, the processor 1002 is further configured to read a file on the migration source terminal according to the file list and store it locally when the first migration record is not stored locally; generate a migration record , the migration record is used to record the data migration record of storing the file on the migration source terminal to the local, and the migration record is stored locally as the first migration record.

在一个可选的实施例中,在处理器1002生成迁移记录之后,处理器1002还用于将所述迁移记录作为第二迁移记录发送至所述迁移源终端;监测所述迁移记录是否发生更新事件,在监测到所述迁移记录的更新事件时,将更新后的迁移记录作为更新后的第二迁移记录发送至所述迁移源终端,所述迁移源终端根据接收到的更新后的第二迁移记录对所述第二迁移记录进行更新。In an optional embodiment, after the processor 1002 generates the migration record, the processor 1002 is further configured to send the migration record as the second migration record to the migration source terminal; monitor whether the migration record is updated event, when monitoring the update event of the migration record, sending the updated migration record as the updated second migration record to the migration source terminal, and the migration source terminal according to the received updated second migration record The migration record updates the second migration record.

以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims (4)

1. A method of data migration, comprising: after a target migration terminal accesses a migration source terminal, acquiring a file list on the migration source terminal, wherein the migration source terminal and the target migration terminal are both provided with data migration applications, a user can preview data on the migration source terminal on the target migration terminal after a communication connection between the migration source terminal and the target migration terminal is established, wherein the data migration applications are mobile phone applications or mobile phone moving applications, in the process of data migration, the data on an old mobile phone is copied to a new mobile phone without being changed, the old mobile phone is the migration source terminal, and the new mobile phone is the target migration terminal;
acquiring a second migration record on the migration source terminal;
acquiring a first migration record of local storage, and judging whether the first migration record is consistent with the second migration record;
if the first migration record is consistent with the second migration record, determining the file which is not transmitted in the file list according to the first migration record and adding the file to the file list which is not transmitted;
when the first migration record is inconsistent with the second migration record, acquiring a storage file list of a local stored file; judging whether the storage file list is consistent with the transmitted files in the first migration record or not; when the storage file list is consistent with the transferred files in the first migration record, determining the non-transferred files in the file list according to the first migration record and adding the non-transferred files to the non-transferred list;
when the storage file list is inconsistent with the transmitted files in the first migration record, judging whether the storage file list is consistent with the transmitted files in the second migration record, and when the local storage file list is consistent with the transmitted files in the second migration record, determining the untransmitted files in the file list according to the second migration record and adding the untransmitted files to the untransmitted list; reading the file on the migration source terminal according to the non-transmission list and storing the file to the local;
updating the first migration record so that the migration progress of data migration is recorded in real time in the first migration record;
the method comprises the steps that the non-transmission list can be displayed on a display interface of a target migration terminal, a non-transmission list display component is displayed in a corresponding operation interface and used for displaying a transmission list corresponding to a file which is not subjected to data migration, and the file is deleted from the non-transmission list after the data migration of one non-transmission file is completed;
wherein the method further comprises:
when the first migration record is not stored in the local, reading the file on the migration source terminal according to the file list and storing the file in the local; the method comprises the steps that a first migration record is not stored locally, and the fact that data migration is not carried out between a target migration terminal and a migration source terminal in the past is indicated, and all files in a file list are judged to be untransmitted files without determining the untransmitted files in the file list according to the first migration record;
generating a migration record, wherein the migration record is used for recording a data migration record for storing a file on the migration source terminal to the local, and storing the migration record to the local as a first migration record;
wherein, after the generating the migration record, further comprising:
sending the migration record serving as a second migration record to the migration source terminal; and monitoring whether the migration record has an update event, and when the update event of the migration record is monitored, sending the updated migration record serving as an updated second migration record to the migration source terminal, wherein the migration source terminal updates the second migration record according to the received updated second migration record.
2. A data migration apparatus, comprising:
a file list obtaining module, configured to obtain a file list on a migration source terminal after accessing the migration source terminal, where the data migration apparatus is applied to a target migration terminal, and both the migration source terminal and the target migration terminal are installed with a data migration application, where after a communication connection between the migration source terminal and the target migration terminal is established, a user can preview data on the migration source terminal on the target migration terminal, the data migration application is a change machine application or a mobile phone moving application, and in a data migration process, data on an old mobile phone is copied to a new mobile phone without being changed, the old mobile phone is the migration source terminal, and the new mobile phone is the target migration terminal;
the non-transmission list determining module is used for acquiring a first migration record stored locally, determining a non-transmission file in the file list according to the first migration record and adding the non-transmission file to the non-transmission list;
the data migration module is used for reading the file on the migration source terminal according to the non-transmission list and storing the file to the local;
the first migration record updating module is used for updating the first migration record so that the migration progress of data migration is recorded in real time in the first migration record;
the device further comprises a migration record checking module, which is used for acquiring a second migration record on the migration source terminal; judging whether the first migration record is consistent with the second migration record; when the first migration record is consistent with the second migration record, calling the non-transmission list determining module;
the migration record checking module is further configured to obtain a storage file list of a locally stored file when the first migration record is inconsistent with the second migration record; judging whether the storage file list is consistent with the transmitted files in the first migration record or not; when the storage file list is consistent with the transferred files in the first migration record, calling the non-transferred list determining module;
the migration record checking module is further configured to determine whether the stored file list is consistent with the transferred file in the second migration record when the stored file list is inconsistent with the transferred file in the first migration record, and determine an untransmitted file in the file list according to the second migration record and add the untransmitted file to the untransmitted list when the local stored file list is consistent with the transferred file in the second migration record;
the device also comprises a migration record creating module, which is used for reading the file on the migration source terminal according to the file list and storing the file to the local when the first migration record is not stored in the local; generating a migration record, wherein the migration record is used for recording a data migration record for storing a file on the migration source terminal to the local, and the migration record is stored to the local as a first migration record, where the local does not store the first migration record, and indicates that data migration has not been performed between the target migration terminal and the migration source terminal before, and all files in the file list are determined to be untransmitted files without determining the untransmitted files in the file list according to the first migration record;
the method comprises the steps that the non-transmission list can be displayed on a display interface of a target migration terminal, a non-transmission list display component is displayed in a corresponding operation interface and used for displaying a transmission list corresponding to a file which is not subjected to data migration, and the file is deleted from the non-transmission list after the data migration of one non-transmission file is completed;
the device further comprises a second migration record updating module, which is used for sending the migration record serving as a second migration record to the migration source terminal; and monitoring whether the migration record has an update event, and when the update event of the migration record is monitored, sending the updated migration record serving as an updated second migration record to the migration source terminal, wherein the migration source terminal updates the second migration record according to the received updated second migration record.
3. A terminal capable of implementing the data migration method according to claim 1, wherein the terminal comprises: an external input interface, a processor, a memory and an output interface;
wherein the memory stores a computer program;
the processor is configured to execute the computer program stored in the memory to perform the data migration method of claim 1.
4. A computer storage medium storing a computer program, wherein the computer program is executed by a processor to perform the data migration method of claim 1.
CN201610915921.XA 2016-10-20 2016-10-20 Data migration method and device Expired - Fee Related CN106547485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610915921.XA CN106547485B (en) 2016-10-20 2016-10-20 Data migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610915921.XA CN106547485B (en) 2016-10-20 2016-10-20 Data migration method and device

Publications (2)

Publication Number Publication Date
CN106547485A CN106547485A (en) 2017-03-29
CN106547485B true CN106547485B (en) 2020-09-08

Family

ID=58391979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610915921.XA Expired - Fee Related CN106547485B (en) 2016-10-20 2016-10-20 Data migration method and device

Country Status (1)

Country Link
CN (1) CN106547485B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107517269B (en) * 2017-09-07 2020-09-08 深圳市酷开网络科技有限公司 Remote synchronous push file caching method and system based on VR equipment
CN112000614A (en) * 2019-05-27 2020-11-27 北京白帽汇科技有限公司 Method and device for quickly and accurately migrating distributed system files
CN116048848A (en) * 2022-05-16 2023-05-02 荣耀终端有限公司 A data transmission method, device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009111492A4 (en) * 2008-03-04 2009-11-05 Apple Inc. Data synchronization protocol
CN102495906A (en) * 2011-12-23 2012-06-13 天津神舟通用数据技术有限公司 Incremental data migration method capable of realizing breakpoint transmission
CN103019827A (en) * 2012-12-28 2013-04-03 盘石软件(上海)有限公司 Breakpoint re-copying method for medium data
CN105376277A (en) * 2014-08-25 2016-03-02 Tcl集团股份有限公司 Data synchronization method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610225B (en) * 2008-06-20 2012-01-25 华为技术有限公司 Method, system and device for synchronous processing
CN102594874B (en) * 2008-06-20 2014-12-17 华为技术有限公司 Synchronization processing method and device
CN101656652A (en) * 2008-08-21 2010-02-24 中国移动通信集团公司 Content synchronization method, equipment and system for dynamic content delivery

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009111492A4 (en) * 2008-03-04 2009-11-05 Apple Inc. Data synchronization protocol
CN102495906A (en) * 2011-12-23 2012-06-13 天津神舟通用数据技术有限公司 Incremental data migration method capable of realizing breakpoint transmission
CN103019827A (en) * 2012-12-28 2013-04-03 盘石软件(上海)有限公司 Breakpoint re-copying method for medium data
CN105376277A (en) * 2014-08-25 2016-03-02 Tcl集团股份有限公司 Data synchronization method and device

Also Published As

Publication number Publication date
CN106547485A (en) 2017-03-29

Similar Documents

Publication Publication Date Title
WO2018049888A1 (en) Application data migration method and device
CN112948340A (en) Data synchronization method and device, electronic equipment and readable storage medium
CN110046000B (en) Small program running method and device
CN106446114B (en) Data migration method and device
CN106547486A (en) A data migration method and device
US20240086360A1 (en) File saving method and electronic device
CN106547485B (en) Data migration method and device
JP7691463B2 (en) MEMORY-EFFICIENT SOFTWARE PATCHING FOR UPDATING APPLICATIONS ON A COMPUTING DEVICE - Patent application
CN110069919A (en) Information acquisition method and device
CN106776143A (en) The method and terminal device of a kind of mirror back-up for end application
CN108733797A (en) Document handling method and relevant apparatus
WO2018049880A1 (en) Data migration method and device
WO2018049883A1 (en) File operation method and device
WO2016066081A1 (en) Data writing method and device
CN114356504A (en) Data migration method, device, electronic device and storage medium in cluster
WO2022083190A1 (en) Data downloading method and apparatus, computer device, and storage medium
CN118132204A (en) Container management method, device, equipment and medium
CN106527979A (en) Data migration method and device
WO2017096889A1 (en) Method and device for upgrading and downgrading system
CN106528658B (en) Application file searching method and device
CN112306723B (en) Operation information acquisition method and device applied to applet
CN114416696A (en) Data migration method and device, electronic equipment and storage medium
CN114816482A (en) Upgrading method, device, computer equipment and storage medium for block storage service
CN111367898A (en) Data processing method, device, system, electronic equipment and storage medium
CN111324386A (en) Method and device for starting personal application program, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200908