A data migration method, device, apparatus, and storage medium
By generating target transactions to obtain the maximum primary key information and performing tracking operations, and using a thread pool to control the migration speed, the problem of downtime and service interruption during data migration in internet companies has been solved, achieving automated and seamless data migration, and improving the reliability of data migration and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG AISINO CO LTD
- Filing Date
- 2023-02-01
- Publication Date
- 2026-07-03
AI Technical Summary
During data migration in internet companies, existing technologies suffer from frequent downtime and service interruptions, affecting user experience and increasing the probability of operational errors, making it impossible to achieve automated and seamless data migration.
By receiving data migration requests, generating target transactions, obtaining the maximum primary key information and performing tracking operations, retrieving the data to be migrated from the source database and migrating it to the target database, and using a thread pool to control the migration speed, automated and seamless data migration is achieved.
It enables automated data migration without downtime or service interruption, improving the reliability and efficiency of data migration, reducing the probability of operational errors, and enhancing the user experience.
Smart Images

Figure CN115905186B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic information technology, and in particular to a data migration method, apparatus, device, and storage medium. Background Technology
[0002] The internet industry is characterized by a large user base, high traffic, and massive amounts of data. To ensure reliable data access, internet companies typically employ distributed, multi-cluster data storage methods. MySQL is the most frequently used database in everyday projects.
[0003] As business grows, data volume expands rapidly. To maintain efficient data access, data is often split and migrated to reduce the size of individual tables on single nodes. However, internet companies typically have numerous applications, leading to frequent data migrations. Currently, migration processes inevitably involve some downtime and service interruptions, impacting user experience. Furthermore, many migration tasks require manual execution by operations personnel, increasing the probability of errors.
[0004] In summary, how to achieve automated and seamless data migration without downtime or service interruption during the migration process is a technical problem that needs to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a data migration method, apparatus, device, and storage medium that can achieve automated and seamless data migration without requiring downtime or service interruption during the migration process. The specific solution is as follows:
[0006] In a first aspect, this application discloses a data migration method, including:
[0007] Receive data migration requests;
[0008] Based on the data migration request, a target transaction is generated, and the target transaction is used to obtain the maximum primary key information of the data to be migrated and to perform data tracking operations.
[0009] The corresponding data to be migrated is obtained from the source database using the maximum primary key information and historical data migration point information, and then the data to be migrated is migrated to the target database.
[0010] Optionally, receiving the data migration request includes:
[0011] Receives a data migration request that includes a historical data migration sub-request and an incremental data migration sub-request.
[0012] Optionally, generating the target thing based on the data migration request includes:
[0013] Based on the historical data sub-migration request, a target item is generated, and the target item is used to obtain the maximum primary key information of the historical data, perform the tracking operation, and record the start time.
[0014] Optionally, before obtaining the corresponding data to be migrated from the source database using the maximum primary key information and historical data migration point information, the method further includes:
[0015] Start a preset timed task and use the preset timed task to persist the historical data migration point information to a preset database.
[0016] Optionally, migrating the data to be migrated to the target database includes:
[0017] Create a migration incremental data queue and migrate incremental data to the target database starting from a preset time position before the start time;
[0018] Detect whether the currently migrated incremental data has reached the preset tracking point; if it has, replay the incremental data to be migrated in the migration incremental data queue.
[0019] Optionally, after replaying the incremental data to be migrated in the migration incremental data queue, the method further includes:
[0020] Determine whether the timestamp of the incremental data to be migrated has reached the current system time. If it has, stop playing back the incremental data to be migrated and record the identification information of the migrated incremental data.
[0021] Optionally, the data migration method further includes:
[0022] Create an execution thread pool and set the number of target threads in the thread pool so that all target threads can be used to perform the migration of data to be migrated to the target database.
[0023] Secondly, this application discloses a data migration apparatus, comprising:
[0024] The request receiving module is used to receive data migration requests;
[0025] The information acquisition module is used to generate a target object based on the data migration request, and use the target object to acquire the maximum primary key information of the data to be migrated and to perform data tracking operations.
[0026] The data migration module is used to obtain the corresponding data to be migrated from the source database using the maximum primary key information and historical data migration point information, and to migrate the data to be migrated to the target database.
[0027] Thirdly, this application discloses an electronic device, including:
[0028] Memory, used to store computer programs;
[0029] A processor for executing the computer program to implement the steps of the aforementioned disclosed data migration method.
[0030] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed data migration method.
[0031] Therefore, this application discloses a data migration method, including: receiving a data migration request; generating a target transaction based on the data migration request; using the target transaction to obtain the maximum primary key information of the data to be migrated and to perform data tracking operations; using the maximum primary key information and historical data migration point information to obtain the corresponding data to be migrated from the source database, and migrating the data to be migrated to the target database. It is evident that by using the target transaction to obtain the maximum primary key information and perform corresponding data tracking operations to obtain the data to be migrated, and then migrating the data to be migrated from the source database to the target database, automated migration is achieved, and the migration is performed silently and without any downtime or deployment. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0033] Figure 1 This is a flowchart of a data migration method disclosed in this application;
[0034] Figure 2 This is a flowchart of a specific data migration method disclosed in this application;
[0035] Figure 3 This application discloses a flowchart of a data migration method for a Nono invoice project.
[0036] Figure 4 This is a flowchart of a MySQL log monitoring method disclosed in this application;
[0037] Figure 5 This is a schematic diagram of the structure of a data migration device disclosed in this application;
[0038] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0040] The internet industry is characterized by a large user base, high traffic, and massive amounts of data. To ensure reliable data access, internet companies typically employ distributed, multi-cluster data storage methods. MySQL is the most frequently used database in everyday projects.
[0041] As business grows, data volume expands rapidly. To maintain efficient data access, data is often split and migrated to reduce the size of individual tables on single nodes. However, internet companies typically have numerous applications, leading to frequent data migrations. Currently, migration processes inevitably involve some downtime and service interruptions, impacting user experience. Furthermore, many migration tasks require manual execution by operations personnel, increasing the probability of errors.
[0042] Therefore, this application provides a data migration solution that enables automated and seamless data migration without requiring downtime or service interruption during the migration process.
[0043] Reference Figure 1 As shown in the figure, an embodiment of the present invention discloses a data migration method, including:
[0044] Step S11: Receive data migration request.
[0045] In this embodiment, a data migration request containing both historical data migration sub-requests and incremental data migration sub-requests is received. It is understood that the Nono Invoice project used a database sharding and table partitioning design based on tax ID, but as the project grew, the existing table data volume became increasingly large. Incremental migration via MySQL logs was used to migrate the data. Because the data migration process was non-disruptive, the data migration request received included both historical and incremental data migration sub-requests. Specifically, the incremental data refers to newly generated data during the data migration process in the source database.
[0046] Step S12: Generate a target transaction based on the data migration request, and use the target transaction to obtain the maximum primary key information of the data to be migrated and perform the data tracking operation.
[0047] In this embodiment, a target transaction is generated based on the received data migration request. This target transaction is used to execute SQL instructions to obtain the maximum primary key `max_id` and to execute tracking SQL instructions to begin data collection. Specifically, the target transaction is generated based on the historical data sub-migration request, and is used to obtain the maximum primary key information of the historical data, perform tracking operations, and record the start time. It can be understood that when a historical data migration sub-request is received, a corresponding target transaction is generated immediately, and then the target transaction is used to execute SQL instructions to obtain the maximum primary key `max_id`, execute tracking SQL instructions to collect data, and simultaneously record the time `time_start`.
[0048] In this embodiment, before retrieving the corresponding data to be migrated from the source database using the maximum primary key information and historical data migration point information, the method further includes: starting a preset scheduled task and using the preset scheduled task to persist the historical data migration point information to a preset database. It can be understood that before performing historical data migration, a preset scheduled task is started first, and the preset scheduled task persists the historical data migration points to the preset database every second.
[0049] In this embodiment, before generating the target transaction based on the data migration request, the source database's data recording logs are continuously monitored, and the monitored logs are continuously pushed to the message queue. Specifically, the MySQL replication level is set to row level because other levels, such as mixed level and statement level, cannot ensure that data is not corrupted or lost during log replay. A new parsing record is added to track the parsing progress. The binlog logs of the corresponding MySQL table are parsed, and the offset is recorded after each parsing segment. The parsed logs are pushed to the message queue and partitioned according to the primary key to ensure the orderliness of operations on each data item. The binlog logs are continuously scanned, and parsing continues from the last offset position, with the logs being pushed to the message queue.
[0050] Step S13: Use the maximum primary key information and historical data migration point information to obtain the corresponding data to be migrated from the source database, and migrate the data to be migrated to the target database.
[0051] In this embodiment, the min_id of the data to be migrated is obtained based on the max_id and the historical data migration point information obtained from the preset database. Then, the corresponding data to be migrated is obtained from the source database using the max_id and min_id, and the obtained data to be migrated is inserted into the target database. It should be noted that when there is no migration point information, min_id is 0.
[0052] It's important to note that to control the migration speed, an execution thread pool is created, and the number of target threads in the pool is set. This ensures that all target threads are used to migrate the data to the target database. Essentially, creating the execution thread pool based on the configuration primarily involves setting the maximum number of threads to control the migration speed. Then, the threads in the pool batch-fetch the data to be migrated, with the retrieval criteria being that the primary key `id` is less than `max_id` and greater than `min_id`. 500 records are retrieved in ascending order of `id`, and this batch of data is migrated concurrently from the source database to the target database. During the insertion process, the IDs of the migrated data are recorded. When migrating data, the unique primary key is used to check if the data already exists in the target database. If the data already exists, it is not migrated. This is to prevent delays in persistence during automatic recovery from interruptions. After successful data saving, the maximum ID of this migration is saved to a local cache. This cache is used to resume migration from the point of interruption if historical data migration tasks are manually stopped due to high server load or unexpected server crashes. After a batch of data to be migrated is retrieved during a data migration process, the process enters a loop to retrieve batches of data to be migrated, migrating each batch of data in a loop until the retrieved data is empty. At this point, the historical data migration is complete. It is evident that by setting the number of threads in a thread pool to achieve batch data migration, the data migration speed can be adjusted, reducing the pressure on the source database.
[0053] Therefore, this application discloses a data migration method, including: receiving a data migration request; generating a target transaction based on the data migration request; using the target transaction to obtain the maximum primary key information of the data to be migrated and to perform data tracking operations; using the maximum primary key information and historical data migration point information to obtain the corresponding data to be migrated from the source database, and migrating the data to be migrated to the target database. It is evident that by using the target transaction to obtain the maximum primary key information and perform corresponding data tracking operations to obtain the data to be migrated, and then migrating the data to be migrated from the source database to the target database, automated migration is achieved, and the migration is performed silently and without any downtime or deployment.
[0054] Reference Figure 2 As shown, this embodiment of the invention discloses a specific data migration method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:
[0055] Step S21: Receive a data migration request that includes a historical data migration sub-request and an incremental data migration sub-request.
[0056] Step S22: Generate a target transaction based on the data migration request, and use the target transaction to obtain the maximum primary key information of the data to be migrated and perform data tracking operations.
[0057] Step S23: Use the maximum primary key information and historical data migration point information to obtain the corresponding data to be migrated from the source database.
[0058] For more detailed processing procedures in steps S21, S22, and S23, please refer to the aforementioned disclosed embodiments; they will not be repeated here.
[0059] Step S24: Create a migration incremental data queue and migrate incremental data to the target database starting from a preset time position before the start time; detect whether the currently migrated incremental data has reached the preset tracking point position; if it has, replay the incremental data to be migrated in the migration incremental data queue.
[0060] In this embodiment, for incremental data migration sub-requests, to migrate incremental data, an incremental data queue for consumers to consume incremental data is first created, and incremental data consumption begins from a preset time position before the start time. The start time is the time_start recorded when executing the tracking SQL command, and the preset time position before the start time can be 5 minutes before time_start. For example, a message queue for incremental data consumption is created, and consumption begins 5 minutes before time_start. When consuming incremental logs, it is determined whether the tracking SQL position has been consumed. If it has, the incremental data SQL is replayed. It can be understood that since the source database writes data changes to a binary log, the records are called binary log events, which can be viewed using `show binlog events`. Therefore, consuming incremental logs is equivalent to consuming the corresponding incremental data, continuously replaying the incremental SQL. If the tracking SQL position has not been consumed, the operation of consuming incremental logs continues to be monitored until the currently consumed incremental log has reached the tracking SQL position, at which point the corresponding incremental data replay operation is performed.
[0061] Step S25: Determine whether the timestamp of the incremental data to be migrated has reached the current system time. If it has, stop playing back the incremental data to be migrated and record the identification information of the migrated incremental data.
[0062] In this embodiment, the timestamp of the incremental SQL statement is checked to see if it reaches the current system time. If it does, it means the incremental data in the target database has approached or caught up with the source database. At this point, the playback of the incremental data to be migrated stops, and the identification information of the migrated incremental data is recorded. If it has not reached the current system time, the playback of the incremental data to be migrated continues until the timestamp reaches the current system time, at which point it stops. During the incremental process, the ID of the incremental data is recorded. This process is continuous and only stops when the data migration is complete.
[0063] In this embodiment, the entry point for deletion and update operations in the source database is blocked after the data migration is complete, while queries in the source database can still be performed normally. Then, the data source is switched to the target database. Based on the data ID recorded at the end of the data migration, the relevant data in the source database is cleaned up.
[0064] In this embodiment, refer to Figure 3 As shown, the process involves viewing logs in the source database using binlog, which contains incremental data information. A message queue is then created, and the parsed binlog logs are pushed to it. For historical data migration, corresponding tracking SQL commands are executed, and historical data migration is performed based on these commands and historical migration point information. After historical data migration is complete, incremental data migration begins. This requires creating a consumer to consume incremental data from the message queue and checking if the consumed incremental data has reached the tracking SQL position. If it has, the SQL command to replay the incremental data is initiated, initiating the migration. It is then determined whether the incremental data in the target database has caught up with the incremental data in the source database, i.e., whether the timestamp of the replayed incremental data has reached the current system time. If it has, the source database is blocked, and the update operation is deleted. Afterward, the data source is switched to the target database, and the corresponding data in the source database is cleaned up based on the latest recorded data ID. The process of pushing the parsed binlog logs to the message queue is described in detail below. Figure 4 As shown, the process first monitors the binlog, then records the parsing progress, and then executes SQL to insert the data point. Simultaneously, it obtains the `max_id`, copies existing data in batches, and updates the copy progress. This existing data is historical data. Next, a consumer is started to consume incremental data from the message queue and monitors the consumption of incremental logs until the consumed incremental logs reach the data point's SQL position. Then, the incremental logs are replayed until the timestamp of the replayed incremental logs reaches the current system time. At this point, updates to the source database are blocked, the update operation entry is deleted, the application data source is switched to the target data source, and the data in the source data source is cleaned up.
[0065] This demonstrates that by adopting a silent and seamless migration method during incremental data migration, without requiring downtime for deployment, data is not lost, there is no downtime, and rollback and anomaly recovery are possible, thus improving database performance.
[0066] Reference Figure 5 As shown, an embodiment of the present invention discloses a data migration apparatus, comprising:
[0067] Request receiving module 11 is used to receive data migration requests;
[0068] Information acquisition module 12 is used to generate a target object based on the data migration request, and use the target object to acquire the maximum primary key information of the data to be migrated and to perform data tracking operations;
[0069] The data migration module 13 is used to obtain the corresponding data to be migrated from the source database using the maximum primary key information and historical data migration point information, and to migrate the data to be migrated to the target database.
[0070] Therefore, this application discloses receiving a data migration request; generating a target transaction based on the data migration request; using the target transaction to obtain the maximum primary key information of the data to be migrated and to perform data tracking operations; using the maximum primary key information and historical data migration point information to obtain the corresponding data to be migrated from the source database, and then migrating the data to be migrated to the target database. It is evident that by using the target transaction to obtain the maximum primary key information and perform corresponding data tracking operations to obtain the data to be migrated, and then migrating the data to be migrated from the source database to the target database, automated migration is achieved, and the migration is performed silently and without any downtime or deployment.
[0071] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0072] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data migration method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0073] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0074] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0075] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0076] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the data migration method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0077] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed data migration method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0078] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0079] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can implement the described functions using different methods for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. Software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.
[0080] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0081] The above provides a detailed description of the data migration method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data migration method, characterized by, include: Receive data migration requests; Based on the data migration request, a target transaction is generated, and the target transaction is used to obtain the maximum primary key information of the data to be migrated and to perform data tracking operations. Using the maximum primary key information and historical data migration point information, the corresponding data to be migrated is obtained from the source database, and the data to be migrated is migrated to the target database; The receiving of the data migration request includes: Receives a data migration request that includes historical data migration sub-requests and incremental data migration sub-requests; The generation of the target item based on the data migration request includes: Based on the historical data migration sub-request, a target transaction is generated, and the target transaction is used to obtain the maximum primary key information of the historical data, perform the data tracking operation, and record the start time. Before obtaining the corresponding data to be migrated from the source database using the maximum primary key information and historical data migration point information, the method further includes: Start a preset timed task and use the preset timed task to persist the historical data migration point information to a preset database; The process of migrating the data to be migrated to the target database includes: Create a migration incremental data queue and migrate incremental data to the target database starting from a preset time position before the start time; Detect whether the currently migrated incremental data has reached the preset tracking point; if it has, replay the incremental data to be migrated in the migration incremental data queue. After replaying the incremental data to be migrated in the migration incremental data queue, the process further includes: Determine whether the timestamp of the incremental data to be migrated has reached the current system time. If it has, stop playing back the incremental data to be migrated and record the identification information of the migrated incremental data.
2. The data migration method of claim 1, wherein, Also includes: Create an execution thread pool and set the number of target threads in the thread pool so that all target threads can be used to perform the migration of data to be migrated to the target database.
3. A data migration apparatus, characterized by comprising: include: The request receiving module is used to receive data migration requests; The information acquisition module is used to generate a target object based on the data migration request, and use the target object to acquire the maximum primary key information of the data to be migrated and to perform data tracking operations. The data migration module is used to obtain the corresponding data to be migrated from the source database using the maximum primary key information and historical data migration point information, and to migrate the data to be migrated to the target database; The request receiving module is specifically used to receive a data migration request that includes a historical data migration sub-request and an incremental data migration sub-request. The information acquisition module is specifically used to generate a target item based on the historical data migration sub-request, and use the target item to acquire the maximum primary key information of the historical data, perform the data tracking operation, and record the start time. The data migration device is also used to start a preset timed task and use the preset timed task to persist historical data migration point information to a preset database. The data migration module is specifically used to create a migration incremental data queue and migrate incremental data to the target database starting from a preset time position before the start time; detect whether the currently migrated incremental data has reached the preset tracking point position; if it has, replay the incremental data to be migrated in the migration incremental data queue. The data migration device is also used to determine whether the timestamp of the incremental data to be migrated has reached the current system time. If it has, the device stops playing back the incremental data to be migrated and records the identification information of the migrated incremental data.
4. An electronic device, comprising: include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the data migration method as described in claim 1 or 2.
5. A computer readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the data migration method as described in claim 1 or 2.