Data migration method and related equipment
By triggering rapid migration during the data migration process, the new device recovers part of the data and temporarily stores another part, solving the problem of long data migration time and improving the efficiency of equipment usage.
Patent Information
- Application Number
- CN202311692706.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-09
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2043-12-09
AI Technical Summary
During the data migration process, especially when the data volume is large, users need to spend a long time completing the migration, resulting in the inability to use old and new devices during the migration process.
By triggering a rapid migration before the old device transmits data to the new device, the new device recovers part of the data after receiving the data, and temporarily stores the remaining data in the data folder to be restored, and then restores this part of the data after the user triggers the recovery.
It shortens the data migration time, thereby shortens the time when users cannot use new devices, and improves the efficiency of the data migration process.
Smart Images

Figure CN120162091A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and in particular, to a data migration method and related devices. Background Art
[0002] On the one hand, with the increasing amount of basic Internet data, the amount of data that needs to be stored on electronic devices such as mobile phones and tablet computers is also increasing. This means that when users replace their electronic devices, the amount of data that needs to be migrated from the old device to the new device is also increasing, especially the data of third-party applications. In the case of a large amount of data migration, it takes a long time to complete the migration. For example, it takes about 1 hour to complete the migration of 200 gigabytes (GB) of data. On the other hand, during the process of migrating data from an old device to a new device, there are many restrictions on the use of the old device and the new device (for example, unable to access the Internet due to being blocked by the data protocol, and the wireless network is also occupied due to the migration), resulting in the user being unable to use the old device and the new device during this migration process. Combining the above two aspects, in the case of a large amount of data migrated from an old device to a new device, it takes a long time to complete the migration, and the user cannot use the old device and the new device during this long period. Summary of the Invention
[0003] This application provides a data migration method and related devices. According to this data migration method, if the user triggers a quick migration before the old device transmits data to the new device, after the new device receives the data transmitted by the old device, it can recover a part of the data, and temporarily store the remaining data in a folder of data to be recovered, and then the new device recovers this part of the data after the user triggers the recovery later. This method can shorten the data migration duration, and thus shorten the duration during which the user cannot use the new device.
[0004] In a first aspect, this application provides a data migration method. This method can be applied to a first device. The method may include: the first device can receive the data to be migrated transmitted by a second device, and recover the second type of data in the data to be migrated. After the recovery of the second type of data in the data to be migrated is completed, the first device can display a first interface. Wherein, the data to be migrated may include some or all of the first type of data, and all of the second type of data. The first type of data is the data in the local data of the second device that meets a first preset condition, and the second type of data is the data in the local data of the second device that does not meet the first preset condition. The first interface may include a first icon, and the first icon is the icon corresponding to a first folder, and the first folder stores the first type of data in the data to be migrated.
[0005] In the solution provided by this application, after the first device receives the data to be migrated transmitted by the second device, it can recover a part of the data to be migrated and store the remaining data of the data to be migrated in the first folder. This method can save the time required to recover a part of the data, thereby shortening the duration required for the entire data migration process, enabling the user to use the first device as soon as possible, and avoiding the user being unable to use the first device for a long time due to the long data migration time.
[0006] It can be understood that the first device can be the new device mentioned later (for example, electronic device 200), and the second device can be the old device mentioned later (for example, electronic device 100).
[0007] In some embodiments of this application, the first type of data can be the data to be recovered later mentioned later (which can be simply referred to as the data to be recovered), and the second type of data can be the data that can be directly recovered later.
[0008] In some embodiments of this application, the first type of data can be the data without a mark mentioned later, and the second type of data can be the data with a mark mentioned later.
[0009] In some embodiments of this application, the first preset condition can be the preset condition 2 mentioned later.
[0010] In some embodiments of this application, the first folder can be the folder to be recovered mentioned later.
[0011] In some embodiments of this application, the first interface can be the user interface 1h shown in (1) of Figure 2F and the first icon can be the folder icon 106.
[0012] Combined with the first aspect, in a possible implementation manner, the first type of data can include data corresponding to one or more applications, and the first or more applications can include the first application. After the first device displays the first interface, the method can further include: the first device can detect an operation on the first icon, and in response to the operation on the first icon, the first device can display a second interface on the display screen; the first device detects an operation on the second icon, and in response to the operation on the second icon, the first device can install and recover the first application based on the data corresponding to the first application stored in the first folder. The second interface includes application icons corresponding to one or more applications, and the application icons corresponding to the one or more applications include a second icon, and the second icon is the application icon corresponding to the first application.
[0013] In the solution provided by this application, the first type of data can be data corresponding to one or more applications (i.e., application data). In this case, the first device can generate application icons corresponding to the one or more applications in the first folder on the desktop. The user can trigger the first device to restore the data corresponding to the corresponding application in the first type of data by touching the corresponding application icon (e.g., the second icon) / voice control / gesture, etc. This method can enable the user to trigger the restoration of a specific application by themselves, better meeting the user's requirements. Specifically, the user can trigger the first device to restore the application when the corresponding application is needed, and for other applications that are not needed temporarily, the corresponding data can be temporarily stored in the data folder to be restored first, and then triggered to be restored when needed later.
[0014] In some embodiments of this application, when the second device packages the data to be migrated, it can add an identifier to indicate the storage path and source file attributes corresponding to the corresponding data. After receiving the data to be migrated, the second device can restore the corresponding data based on this identifier. For example, the second device can determine the storage paths corresponding to these data based on the identifiers corresponding to different data (such as different application data) in the first type of data, and move these data according to the corresponding storage paths.
[0015] The first device can install and restore the first application based on the data corresponding to the first application stored in the first folder (which can be simply referred to as the first application data). Specifically, it can include: the first device can determine the storage path of the first application data according to the identifier corresponding to the first application data, and move the first application data according to this storage path.
[0016] It can be understood that the data restoration involved in this application refers to adjusting the position of the data in the new device according to its position (e.g., storage position) in the old device. That is to say, for the data transmitted from the old device, the new device restores its storage position in the new device to its storage position in the old device. The storage position can include the storage path (i.e., the corresponding file directory).
[0017] Combined with the first aspect, in a possible implementation manner, after the first device displays the first interface, the method can further include: the first device can detect an operation on the first icon, and in response to this operation on the first icon, the first device can restore the data stored in the first folder.
[0018] In the solution provided by this application, the user can trigger the first device to restore all of the first type of data by touching an icon (e.g., the first icon) / voice control / gesture, etc. This method can restore all of the first type of data at one time, without the user having to trigger the restoration of specific application data by themselves.
[0019] In some embodiments of the present application, the first type of data is data corresponding to one or more third-party applications.
[0020] In some embodiments of the present application, the second interface may be the user interface 1i shown in (2) of Figure 2F , the first application may be the application A1 shown in (2) of Figure 2F , and the second icon may be the application icon 107.
[0021] In combination with the first aspect, in a possible implementation, before the first device receives the data to be migrated transmitted by the second device, the method may further include: the first device receives a first message sent by the second device and creates a first folder. After the first device receives the data to be migrated transmitted by the second device, the method may further include: the first device stores the first type of data included in the data to be migrated in the first folder. The first message is used to notify the first device not to perform recovery on the first type of data during this data migration process.
[0022] In the solution provided by the present application, before transmitting the data to be migrated to the first device, the second device may first send a message to the first device to notify the user that fast data migration has been selected. In this way, after receiving the message, the first device can create the first folder without having to wait until it receives the data to be migrated to create the first folder. Moreover, the second device can send a message while screening the first type of data, which can save the data migration duration to a certain extent.
[0023] In some embodiments of the present application, the first message may be the message mentioned in step S103 and may also be the message mentioned in step S204.
[0024] In combination with the first aspect, in a possible implementation, after the first device finishes recovering the second type of data in the data to be migrated, the method may further include: the first device starts a first timer. After the first device displays the first interface, the method may further include: when the timing duration of the first timer reaches a first preset duration, the first device may display a third interface; if the first device detects a first operation on the third interface, in response to the first operation, the first device may clear the data in the first folder; if the first device detects a second operation on the third interface, in response to the second operation, the first device may clear the timing duration of the first timer and repeat the step of the first device displaying the third interface when the timing duration of the first timer reaches the first preset duration.
[0025] In some embodiments of the present application, the first timer may be the timer T1 mentioned later.
[0026] In some embodiments of the present application, the first preset duration may be the preset duration mentioned hereinafter.
[0027] In some embodiments of the present application, the third interface may be the user interface 1l as shown in Figure 2H Figure 11. The first operation on the third interface may specifically include: a user operation acting on the confirmation control 1092 in the user interface 1l. The second operation on the third interface may specifically include: a user operation acting on the cancellation control 1091 in the user interface 1l.
[0028] In combination with the first aspect, in a possible implementation manner, after the first device displays the first interface, the method may further include: in certain circumstances, the first device may automatically recover the data in the first folder.
[0029] In some embodiments of the present application, the certain circumstances may specifically include: the user is unaware. For example, the first device is in a stationary state, and / or the first device is in a standby state (which may be referred to as a sleep state or a black screen state), and / or there are no running applications in both the foreground and background of the first device.
[0030] In some embodiments of the present application, the certain circumstances may specifically further include: the computing resources of the first device are not tense. For example, the ratio of the occupied system memory of the first device to the total system memory is not greater than z. For another example, the occupied system memory of the first device is less than x.
[0031] It can be understood that z is greater than 0 and less than 1. The specific values of z and x can be set according to actual needs, and the present application does not limit this. For example, z may be 0.3 and x may be 500 megabytes (MB).
[0032] In the solution provided by the present application, the first device can automatically recover the first type of data temporarily stored in the first folder in certain circumstances. This method can not only shorten the data migration duration but also recover the part of the data that has not been recovered during the data migration process when the user does not use the first device, without the user having to trigger the recovery of that part of the data by themselves.
[0033] In combination with the first aspect, in a possible implementation manner, the method may further include: when the total number of times the first device displays the third interface reaches K times when the timing duration of the first timer reaches the first preset duration, the first device may stop the first timer. K is a positive integer.
[0034] In the solution provided by the present application, if the user has not selected to clear the data in the first folder after the first device has reminded K times, the first device may stop reminding.
[0035] In some embodiments of the present application, during each execution of the above steps by the first device, the first preset duration may be the same.
[0036] In some embodiments of the present application, during each execution of the above steps by the first device, the first preset duration may be different. For example, the more times the first device executes the above steps, the longer the first preset duration used during the execution of the above steps.
[0037] In combination with the first aspect, in a possible implementation manner, the data that meets the first preset condition may specifically include: multimedia data with cloud backup, and third-party application data whose usage situation meets the second preset condition. Among them, the third-party application data whose usage situation meets the second preset condition may specifically include any one or more of the following: data corresponding to third-party applications with a usage frequency less than the first frequency; data corresponding to third-party applications with a usage duration less than the first duration.
[0038] In the solution provided by the present application, the first type of data may include multimedia data with cloud backup in the local data of the second device, and third-party application data whose usage situation meets the second preset condition.
[0039] In some embodiments of the present application, the third-party application data whose usage situation meets the second preset condition may specifically further include: data corresponding to third-party applications whose time interval between the last usage time and the time when the second device filters the first type of data is greater than the second duration.
[0040] In some embodiments of the present application, the second preset condition may be the preset condition 3 mentioned later. The first frequency may be the threshold 4 mentioned later, the first duration may be the threshold 5 mentioned later, and the second duration may be the threshold 6 mentioned later.
[0041] In combination with the first aspect, in a possible implementation manner, after the first device displays the first interface, the method may further include: the first device may display a fourth interface; if the first device detects a third operation on the fourth interface, in response to the third operation, when there is multimedia data in the local data of the second device in the cloud-side device, the first device may receive the multimedia data in the local data of the second device transmitted by the cloud-side device.
[0042] In the solution provided by the present application, the second device may not transmit the multimedia data with cloud backup in its local data to the first device during the transmission stage, and subsequently the first device may directly obtain the multimedia data with cloud backup through cloud synchronization. This method can reduce the amount of data to be migrated, thereby shortening the data migration duration.
[0043] In some embodiments of the present application, the fourth interface may be such asFigure 2G The user interface 1k shown. For the third operation on the fourth interface, specifically, it may include: a user operation on the determination control 1082.
[0044] Combined with the first aspect, in a possible implementation manner, after the first device receives the data to be migrated transmitted by the second device, the method may further include: the first device may determine that the data with a mark in the data to be migrated is the first type of data, and the data without a mark in the data to be migrated is the second type of data.
[0045] In the solution provided in this application, after the second device screens the first type of data, it may mark the screened data so that when the first device receives the data to be migrated subsequently, it can quickly distinguish the first type of data and the second type of data.
[0046] In a second aspect, this application provides a data migration method. This method can be applied to the second device. The method may include: the second device may establish a communication connection with the first device; when a third preset condition is met, the second device may send a first message to the first device, screen the first type of data, and display the fifth interface; when the second device detects a fourth operation on the fifth interface, in response to this fourth operation, the second device may transmit the data to be migrated to the first device. Among them, the first message is used to notify the first device not to perform recovery on the first type of data during this data migration process; the data to be migrated includes part or all of the first type of data and all of the second type of data, the first type of data is the data in the local data of the second device that meets the first preset condition, and the second type of data is the data in the local data of the second device that does not meet the first preset condition.
[0047] In the solution provided in this application, before the second device transmits the data to be migrated to the first device, it can distinguish the first type of data and the second type of data in the data to be migrated, and notify the first device that only a part of the data to be migrated needs to be recovered during this data migration process, and there is no need to recover another part of the data in the data to be migrated. This method can save the time required to recover a part of the data, thereby shortening the duration required for the entire data migration process, enabling the user to use the first device as soon as possible, and avoiding the user being unable to use the first device for a long time due to the long data migration time.
[0048] In some embodiments of this application, the third preset condition may be the preset condition 1 mentioned later.
[0049] In some embodiments of this application, the fifth interface may be as Figure 2C shown in the user interface 1c. For the fourth operation on the fifth interface, specifically, it may include: a user operation on the control 104.
[0050] In combination with the second aspect, in a possible implementation, the second device transmits the data to be migrated to the first device, which may specifically include: the second device may first transmit the second type of data in the data to be migrated to the first device, and then transmit the first type of data in the data to be migrated to the first device.
[0051] In the solution provided in this application, the second device may first transmit the data that can be directly restored subsequently to the first device. After this part of the data is transmitted, the second device then transmits the data to be restored subsequently to the first device. In this way, the first device can first receive the data that can be directly restored subsequently, and while receiving the data to be restored, it can directly restore the data that can be directly restored subsequently received by the first device before. This method can save the restoration duration of a part of the data, and thus shorten the duration required for the entire data migration process.
[0052] In combination with the second aspect, in a possible implementation, meeting the third preset condition may specifically include: the second device meets the fourth preset condition, displays the sixth interface, and detects the fifth operation on the sixth interface. Among them, the second device meeting the fourth preset condition specifically includes any one or more of the following: the data volume of the local data of the second device is greater than the first data volume; the proportion of the third-party application data in the local data of the second device is greater than the first ratio; the data volume of the third-party application data in the local data of the second device is greater than the second data volume.
[0053] In the solution provided in this application, only when the data volume of the local data in the second device and / or the data volume of the third-party application data therein meet the corresponding conditions, and the user agrees to trigger a fast migration (that is, only a part of the data to be migrated is restored during this migration process), the second device may trigger a fast migration, and it will not trigger a fast migration under any circumstances. Through this method, the specific implementation manner of the data migration process is more flexible, and it can be determined whether to select a general data migration method or a fast migration method according to the specific situation of the local data of the old device.
[0054] In some embodiments of this application, the fourth preset condition may be the preset condition 4 mentioned later.
[0055] In some embodiments of this application, the sixth interface may be the user interface 1a as Figure 2B shown. The fifth operation on the sixth interface may specifically include: the user operation on the confirmation control 1012 in the user interface 1a.
[0056] In some embodiments of this application, the first data volume may be the threshold 1 mentioned later, the first ratio may be the threshold 2 mentioned later, and the second data volume may be the threshold 3 mentioned later.
[0057] In combination with the second aspect, in a possible implementation manner, the data that meets the first preset condition may specifically include: multimedia data with cloud backup, and third-party application data whose usage meets the second preset condition. Among them, the third-party application data whose usage meets the second preset condition may specifically include any one or more of the following: data corresponding to third-party applications with a usage frequency less than the first frequency; data corresponding to third-party applications with a usage duration less than the first duration.
[0058] In combination with the second aspect, in a possible implementation manner, in the case where there is no multimedia data with cloud backup in the local data of the second device, the data to be migrated may include all the first-type data; in the case where there is multimedia data with cloud backup in the local data of the second device, the data to be migrated may include part of the first-type data, and this part of the first-type data does not include the multimedia data with cloud backup in the local data of the second device.
[0059] In the solution provided in this application, in the transmission stage, the second device may not transmit all of the first-type data to the first device, but only transmit a part of the data to the first device. Subsequently, the second device may obtain this part of the untransmitted data through other means and restore this part of the data. For example, the first device may not transmit the multimedia data with cloud backup in its local data to the first device. Subsequently, the first device may directly obtain the multimedia data with cloud backup through cloud synchronization. This method can reduce the amount of data to be migrated, thereby shortening the data migration duration.
[0060] In combination with the second aspect, in a possible implementation manner, the second device screens the first-type data and displays the fifth interface, which may specifically include: the second device marks the first-type data and displays the fifth interface. The fifth interface includes a first display area and a second display area. The first display area is used to display the relevant information of the first-type data, and the second display area is used to display the relevant information of the second-type data.
[0061] In some embodiments of this application, the fifth interface may be Figure 2C the user interface 1c shown. The first display area may be the display area 103 in the user interface 1c. The second display area may be the display area 102 in the user interface 1c.
[0062] In some embodiments of this application, the relevant information of the data may specifically include: the category of the data, the amount of data, and the number of items (specifically, refer to Figure 2C the content shown in the user interface 1c).
[0063] In a third aspect, the present application provides an electronic device, which includes: one or more processors, and one or more memories; the one or more memories can be coupled to the one or more processors, and the memories are used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute the method described in the first aspect or any implementation manner of the first aspect.
[0064] In a fourth aspect, the present application provides an electronic device, which includes: one or more processors, and one or more memories; the one or more memories can be coupled to the one or more processors, and the memories are used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute the method described in the second aspect or any implementation manner of the second aspect.
[0065] In a fifth aspect, the present application provides a computer storage medium, including computer instructions, when the computer instructions run on an electronic device, causing the electronic device to execute the method described in the first aspect or any implementation manner of the first aspect.
[0066] In a sixth aspect, the present application provides a computer storage medium, including computer instructions, when the computer instructions run on an electronic device, causing the electronic device to execute the method described in the second aspect or any implementation manner of the second aspect.
[0067] In a seventh aspect, an embodiment of the present application provides a chip, which can be applied to an electronic device, the chip includes one or more processors, and the processors are used to call computer instructions to cause the electronic device to execute the method described in the first aspect or any implementation manner of the first aspect.
[0068] In an eighth aspect, an embodiment of the present application provides a chip, which can be applied to an electronic device, the chip includes one or more processors, and the processors are used to call computer instructions to cause the electronic device to execute the method described in the second aspect or any implementation manner of the second aspect.
[0069] In a ninth aspect, an embodiment of the present application provides a computer program product containing instructions, when the computer program product runs on an electronic device, causing the electronic device to execute the method described in the first aspect or any implementation manner of the first aspect.
[0070] In a tenth aspect, an embodiment of the present application provides a computer program product including instructions. When the computer program product runs on an electronic device, the electronic device is caused to execute the method described in the second aspect or any one implementation manner of the second aspect.
[0071] It can be understood that the electronic device provided in the above third aspect, the computer storage medium provided in the fifth aspect, the chip provided in the seventh aspect, and the computer program product provided in the ninth aspect are all used to execute the method described in the first aspect or any one implementation manner of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation manner in the above first aspect, and will not be elaborated here. The electronic device provided in the above fourth aspect, the computer storage medium provided in the sixth aspect, the chip provided in the eighth aspect, and the computer program product provided in the tenth aspect are all used to execute the method described in the second aspect or any one implementation manner of the second aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation manner in the above second aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 FIG. is a schematic diagram of a data migration process provided by an embodiment of the present application;
[0073] Figures 2A - 2I FIG. is a set of schematic diagrams of user interfaces provided by an embodiment of the present application;
[0074] Figure 3 FIG. is a flowchart of a data migration method provided by an embodiment of the present application;
[0075] Figure 4 FIG. is a flowchart of another data migration method provided by an embodiment of the present application;
[0076] Figure 5 FIG. is a schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;
[0077] Figure 6 FIG. is a schematic diagram of the interaction between software and hardware provided by an embodiment of the present application;
[0078] Figure 7 FIG. is a schematic diagram of the software structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0079] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
[0080] It should be understood that the terms "first", "second", etc. in the description and claims of the present application and the accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0081] It should be understood that the term "user interface" in the description and claims of the present application and the accompanying drawings is a media interface for interaction and information exchange between an application or an operating system and a user. The common manifestation form of the user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be an interface element such as an icon, a window, a control, etc. displayed on the display screen of an electronic device, where the control can include visible interface elements such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
[0082] Referring to "embodiments" in the present application means that the specific features, structures or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase at various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments.
[0083] It can be understood that the data migration between the old device and the new device can include the following two methods:
[0084] 1. There is no need to directly establish a communication connection (for example, a short-range protocol connection such as Bluetooth) between the old device and the new device, but the data in the old device is migrated to the new device through a cloud-side device (for example, a cloud server).
[0085] 2. A direct communication connection needs to be established between the old device and the new device, and through this communication connection, the data in the old device is migrated to the new device.
[0086] The above two data migration methods can be applied to different operating systems. For the second data migration method, the entire data migration process can include a connection stage, a transmission stage, and an import stage. In the connection stage, the old device establishes a communication connection with the new device, and at the same time, the old device backs up the data to be migrated. In the transmission stage, after the old device packs the backed-up data, it sends the data to the new device in sequence. In the import stage, after the new device receives the data transmitted by the old device, it performs a data restoration operation, that is, the new device installs the received data settings to keep the data consistent with that of the old device.
[0087] As Figure 1 shown, taking the example of the old device transmitting 300 GB of data, in the connection stage, the time taken for the old device to establish a communication connection with the new device is relatively short and can be ignored here. In the transmission stage, it takes about 36 minutes for the old device to transmit 300 GB of data to the new device. In the import stage, it takes about 54 minutes for the new device to import and restore the received 300 GB of data so that the data on the new device is consistent with that on the old device. That is to say, the duration of the transmission stage of this data migration accounts for about 40% of the total duration of this data migration, while the duration of the import stage of this data migration accounts for about 60% of the total duration of this data migration. Since when the old device transmits data to the new device, the data protocols of the old device and the new device are blocked, resulting in the inability to access the Internet, and the communication connection between the two (for example, Wi-Fi connection) is occupied due to data transmission, so neither the old device nor the new device can be used during the transmission stage. And because the new device needs to restore the received data during the import stage, the new device cannot be used during the import stage either. That is to say, during this data migration process, the old device cannot be used for 36 minutes, and the new device cannot be used for 90 minutes.
[0088] It can be understood that in data migration scenarios with a large amount of data, the new device takes more time to restore data during the import stage.
[0089] Based on the above, embodiments of the present application provide a data migration method and related devices. According to this data migration method, if the user triggers a quick migration before the old device transfers data to the new device, the old device can mark a part of the data, and first transfer the unmarked data to the new device, and then transfer the marked data to the new device. After receiving the unmarked data, the new device can directly restore it, and after receiving the marked data, it can first temporarily store it in the folder of data to be restored, and then restore this part of the data after the user triggers the restoration subsequently. This method can shorten the duration of the import phase, and thus shorten the duration during which the user cannot use the new device.
[0090] First, a data migration scenario provided by embodiments of the present application is introduced below.
[0091] For ease of description, in the data migration process of the present application, the old device is denoted as electronic device 100, and the new device in the data migration process is denoted as electronic device 200.
[0092] It can be understood that electronic device 100 and electronic device 200 can be terminal devices, specifically, can be devices such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), or dedicated cameras (such as single-lens reflex cameras, compact cameras), etc. Embodiments of the present application do not impose any restrictions on the specific types of electronic device 100 and electronic device 200.
[0093] 1. Connection phase ( Figures 2A - 2C )
[0094] (1) Electronic device 100 and electronic device 200 establish a communication connection.
[0095] Electronic device 100 and electronic device 200 can start the device-switching application and attempt to establish a communication connection.
[0096] Exemplarily, after the electronic device 100 opens the device replacement application, it can also display a user interface including device type options corresponding to the electronic device 100 (for example, a new device option, an old device option). The electronic device 100 can detect a user operation on the old device option on this user interface. In response to this user operation, the electronic device 100 can determine that this device is the old device for this data migration and attempt to find the new device for this data migration. Similarly, after the electronic device 200 opens the device replacement application, it can also display a user interface including device type options corresponding to the electronic device 200 (for example, a new device option, an old device option). The electronic device 200 can detect a user operation on the new device option on this user interface. In response to this user operation, the electronic device 200 can determine that this device is the new device for this data migration and attempt to find the old device for this data migration.
[0097] In some embodiments of the present application, the electronic device 100 can establish a communication connection by scanning a two-dimensional code displayed by the electronic device 200. Exemplarily, during the process that the electronic device 200 attempts to find the old device for this data migration, it can display a two-dimensional code. In this case, the user can use the electronic device 100 to scan the two-dimensional code displayed by the electronic device 200, so that the electronic device 100 and the electronic device 200 establish a communication connection. As Figure 2A shown, after the electronic device 100 scans the two-dimensional code displayed by the electronic device 200, it can establish a communication connection with the electronic device 200.
[0098] In still other embodiments of the present application, when both the electronic device 100 and the electronic device 200 turn on Bluetooth, the electronic device 100 can find the electronic device 200 by scanning the device with Bluetooth turned on and further establish a communication connection with the electronic device 200.
[0099] It can be understood that the communication connection can be a Wireless Fidelity (Wi-Fi) connection, and can also be other types of short-range protocol connections such as Bluetooth (BT).
[0100] In some embodiments of the present application, the electronic device 100 or the electronic device 200 can download the device replacement application in the application store.
[0101] In some embodiments of the present application, the system applications in the electronic device 100 include the device replacement application. In this case, the electronic device 100 does not need to download the device replacement application additionally. Similarly, in some embodiments of the present application, the system applications in the electronic device 200 include the device replacement application. In this case, the electronic device 200 does not need to download the device replacement application additionally.
[0102] It can be understood that the device switching application is an application program used for data migration, and its name is only an example provided by this application, and this application does not make any specific restrictions on this.
[0103] (2) The electronic device 100 scans the data and displays the data to be transmitted.
[0104] After the electronic device 100 and the electronic device 200 establish a communication connection, the electronic device 100 can scan the local data and determine whether the amount of the local data and / or the proportion of the third-party application data in the local data meets the corresponding conditions (for example, the preset condition 4 mentioned below). If the amount of the local data and / or the proportion of the third-party application data in the local data meets the corresponding conditions, the electronic device 100 can remind the user to choose whether to quickly migrate the data.
[0105] It is understandable that the electronic device 100 can remind the user to choose whether to quickly migrate data by displaying a prompt box, voice broadcast, vibration, or one or more other methods.
[0106] It is understandable that the relevant description of the amount of local data and / or the proportion of third-party application data in local data meeting the corresponding conditions can be found in the following text, and this application will not elaborate on it here.
[0107] For example, after the electronic device 100 and the electronic device 200 establish a communication connection, the electronic device 200 may display a user interface indicating a successful connection (eg, Figure 2B In the user interface 1b), the electronic device 100 can scan the local data and determine whether the size of the local data and / or the proportion of the third-party application data in the local data meets the corresponding conditions. If the size of the local data and / or the proportion of the third-party application data in the local data meets the corresponding conditions, the electronic device 100 can display the following Figure 2B The user interface 1a shown. The user interface 1a may include a prompt box 101. The prompt box 101 displays "whether to perform quick migration", that is, the prompt box 101 can be used to remind the user to choose whether to perform quick migration. The prompt box 101 may include a cancel control 1011 and a confirmation control 1012. The cancel control 1011 can be used to trigger the cancellation of quick migration. The confirmation control 1012 can be used to trigger the electronic device 100 and the electronic device 200 to perform quick migration.
[0108] If the user selects to quickly migrate data, that is, the user triggers the electronic device 100 to quickly migrate data, the electronic device 100 can screen and mark the local data, and then display the data that can be directly restored subsequently obtained by screening and the data to be restored subsequently on the corresponding user interface. Among them, the data that can be directly restored subsequently refers to the data that can be directly restored after being received by the electronic device 200, and the data to be restored subsequently refers to the data that cannot be directly restored after being received by the electronic device 200, but needs to be triggered by the user to be restored after this data migration is completed.
[0109] Exemplarily, the electronic device 100 can detect a user operation acting on the confirmation control 1012 in the user interface 1a. In response to this user operation, the electronic device 100 can screen and mark the scanned local data and display the user interface 1c as shown in Figure 2C The user interface 1c can include a display area 102, a display area 103, and a control 104. Among them, the display area 102 can be used to display the data that can be directly restored after being received by the electronic device 200 determined by the electronic device 100 through screening, and the display area 103 can be used to display the data to be restored after being received by the electronic device 200 determined by the electronic device 100 through screening. The control 104 is used to trigger the electronic device 100 to migrate the data to the electronic device 200.
[0110] In some embodiments of the present application, whether it is the data that can be directly restored subsequently or the data to be restored subsequently, the electronic device 100 displays them by data category. The data categories can include application data and multimedia data. Among them, the application data can be divided into system application data and third-party application data. The multimedia data can include audio data (for example, music-related data, recording-related data), video data, image data, and document data, etc. Specifically, the electronic device can display the number of items and the size of each item of application data, as well as the number of items and the size of each item of multimedia data.
[0111] Exemplarily, as shown in Figure 2C the electronic device 100 can display the number of contact data items and its data volume size, the number of message data items and its data volume size, the number of call record data items and its data volume size, the number of gallery data items and its data volume size, and the number of items and the corresponding data volume size of some other application data in the display area 102. Similarly, the electronic device 100 can also display the number of items and the corresponding data volume size of some other application data in the display area 103. Among them, the contact data, message data, and call record data can be understood as system application data, and the gallery data can be understood as multimedia data.
[0112] 2. Transmission stage ( Figure 2D )
[0113] The electronic device 100 can transmit data to the electronic device 200 through the communication connection directly established therewith. Correspondingly, the electronic device 200 can receive the data transmitted by the electronic device 100. During this transmission process, the electronic device 100 can display the data to be transmitted to the electronic device 200, while the electronic device 200 can display the received data and the restored data.
[0114] Exemplarily, the electronic device 100 can detect a user operation acting on the control 104 included in the user interface 1c. In response to this user operation, the electronic device 100 can start transmitting data to the electronic device 200. As Figure 2D shown, during the process of the electronic device 100 transmitting data to the electronic device 200, the electronic device 100 can display the user interface 1d, and the electronic device 200 can display the user interface 1e. The user interface 1d can display the data that the electronic device 100 is ready to send to the electronic device 200, such as call record data, gallery data, music-related data, and application 1-related data, etc. The user interface 1e can display the data received by the electronic device 200 from the electronic device 100, such as contact data and message data.
[0115] 3. Import phase ( Figure 2E )
[0116] After the electronic device 200 receives the data that can be directly restored subsequently transmitted by the electronic device 100, it can directly restore the data. Specifically, the electronic device 200 can first store the data that can be directly restored subsequently in a temporary file, and then adjust its position in the electronic device 200 according to the position of the data in the electronic device 100. The position of the data in the electronic device 100 can be specifically understood as the file directory to which the data belongs in the electronic device 100.
[0117] In some embodiments of the present application, the electronic device 100 can first transmit the data that can be directly restored subsequently to the electronic device 200, and then transmit the data to be restored subsequently to the electronic device 200. In this way, after the electronic device 200 receives the data that can be directly restored subsequently transmitted by the electronic device 100, it can, on the one hand, directly restore these data, and on the other hand, continue to receive the data to be restored subsequently transmitted by the electronic device 100. This method can reduce the data migration duration.
[0118] In some embodiments of the present application, after the electronic device 200 receives all the data of an application transmitted by the electronic device 100, it can restore the application. Specifically, the electronic device 200 can install the application and store the data of the application in the file directory corresponding to the application. Exemplarily, as Figure 2DAs shown, after the electronic device 200 receives all contact data (such as Figure 2C 32 items of contact data totaling 38KB as shown), the contact application can be restored. Specifically, the electronic device 200 can store the received contact data in the file directory corresponding to the contact application.
[0119] It can be understood that after the electronic device 100 transfers data to the electronic device 200, it can disconnect the communication connection with the electronic device 200. In this case, if the electronic device 200 has not fully restored the data that can be directly restored, the electronic device 200 can continue to restore the data.
[0120] Exemplarily, as Figure 2E shown, after the electronic device 100 finishes transferring data to the electronic device 200, the electronic device 100 can disconnect the communication connection with the electronic device 200 and display the user interface 1f. Correspondingly, after the electronic device 200 receives the data transferred by the electronic device 100, it can display the user interface 1g. At this time, the electronic device 200 has not fully restored all the data that can be directly restored.
[0121] 4. Restore the data to be restored during the data migration process ( Figures 2F - 2H )
[0122] If the user triggers the electronic device 100 to quickly migrate data, the electronic device 100 can send a message to the electronic device 200 to notify the electronic device 200 that the user has triggered the quick data migration. After the electronic device 200 receives the message sent by the electronic device 100 and determines that the user has triggered the quick data migration, it can create a folder for the data to be restored to store the data that cannot be directly restored during the import phase, that is, the data to be restored later, and create a folder icon on the desktop.
[0123] After the electronic device 200 has fully restored all the data that can be directly restored during the import phase, it can display the desktop interface. The desktop interface of the electronic device 200 can include a folder for the data to be restored. The user can trigger the electronic device 200 to restore the application data corresponding to the application icons in the folder for the data to be restored by clicking, voice, gesture, etc.
[0124] Exemplarily, the electronic device 100 may detect a user operation acting on the confirmation control 1012 in the user interface 1a. In response to this user operation, the electronic device 100 may send a message to the electronic device 200. After receiving the message, the electronic device 200 may determine whether the user has triggered a quick migration based on the message. If the electronic device 200 determines based on the message that the user has triggered a quick migration, the electronic device 200 may establish a data folder to be restored. After the electronic device 200 has completely restored all the data that can be directly restored during the import phase, it may display as Figure 2F shown in (1) of the user interface 1h as shown in. The user interface 1h may include a folder icon 106. The electronic device 200 may detect a user operation acting on the folder icon 106. In response to this user operation, the electronic device 200 may display as Figure 2F shown in (2) of the user interface 1i as shown in. The user interface 1i may display a number of application icons. The number of application icons are the application icons corresponding to the data to be restored. The electronic device 200 may detect a user operation acting on the application icon 107 included in the user interface 1i. In response to this user operation, the electronic device 200 may restore the data to be restored corresponding to the application icon 107, that is, install the application corresponding to the application icon 107 (i.e., Application A1), and store the application data of Application A1 in the corresponding file directory. After all the data to be restored corresponding to the application icon 107 has been restored, the electronic device 200 may display as Figure 2F shown in (3) of the user interface 1j as shown in. It can be understood that as shown in Figure 2F shown in (2) and (3) of, the state of the application icon 107 is different before and after data restoration.
[0125] In some embodiments of the present application, the data to be restored may include multimedia data backed up in the cloud, that is, multimedia data backed up on a cloud-side device (for example, a cloud server). In this case, the electronic device 100 may not transmit the multimedia data with cloud backup to the electronic device 200 during the transmission phase, but instead prompt the user whether to perform cloud synchronization after the electronic device 200 has completed restoring all the data that can be directly restored during the import phase. Cloud synchronization refers to data synchronization between the cloud-side device and the end-side device (for example, the electronic device 200). If the electronic device detects a user operation triggering cloud synchronization, the electronic device 200 may detect whether there is data in the cloud-side device that the electronic device 200 does not have. In the case where the electronic device 200 does not have this part of the multimedia data with cloud backup, but the cloud-side device has this part of the multimedia data, the cloud-side device may transmit this part of the multimedia data to the electronic device 200.
[0126] Exemplarily, after the electronic device 200 has completely restored all the data that can be directly restored during the import phase, it may display asFigure 2G The user interface 1k shown. The user interface 1k may include a prompt box 108. The text "Do you want to perform cloud synchronization?" is displayed in the prompt box 108, that is, the prompt box 101 can be used to remind the user to select whether to perform cloud synchronization. The prompt box 108 may include a cancel control 1081 and an OK control 1082. The cancel control 1081 can be used to trigger canceling cloud synchronization. The OK control 1082 can be used to trigger the electronic device 200 to perform cloud synchronization. If the electronic device 200 detects a user operation on the cancel control 1081, in response to this user operation, the electronic device 200 does not perform cloud synchronization, and the user can trigger the electronic device 200 to perform cloud synchronization by itself when needed later. If the electronic device 200 detects a user operation on the OK control 1082, in response to this user operation, the electronic device 200 can perform cloud synchronization.
[0127] In some embodiments of the present application, after the electronic device 200 has completely restored all the data that can be directly restored during the import phase, it can prompt the user to clean the data in the folder of the data to be restored at regular intervals (for example, once a month).
[0128] Exemplarily, after the electronic device 200 has completed the restoration of the data that can be directly restored, it can start a timer. When the timing duration of the timer reaches one month, the electronic device 200 can display a user interface 1l as shown in Figure 2H The user interface 1l shown. The user interface 1l may include a prompt box 109. The text "Do you want to clear the data in the folder of the data to be restored?" is displayed in the prompt box 109, that is, the prompt box 109 can be used to remind the user to select whether to perform cloud synchronization. The prompt box 109 may include a cancel control 1091 and an OK control 1092. The cancel control 1091 can be used to trigger canceling the clearing of the data in the folder of the data to be restored. The OK control 1092 can be used to trigger the electronic device 200 to clear the data in the folder of the data to be restored. If the electronic device 200 detects a user operation on the cancel control 1091, in response to this user operation, the electronic device 200 does not clear the data in the folder of the data to be restored. The user can trigger the electronic device 200 to perform the clearing by itself when needed to clear the data in the folder of the data to be restored, or can also trigger the electronic device 200 to perform the restoration when needed to restore the data in the folder of the data to be restored. If the electronic device 200 detects a user operation on the OK control 1092, in response to this user operation, the electronic device 200 can clear the data in the folder of the data to be restored.
[0129] It should be noted that in some embodiments of the present application, the user can select the data to be migrated by himself.
[0130] Exemplarily, the user interface 1c may further include a control 105, and the control 105 is used to return to the previous interface. The electronic device 100 may detect a user operation on the control 105, and in response to the user operation, the electronic device 100 may display a Figure 2I The user interface 1m shown. The user interface 1m may include a display area 110. The display area 110 may be used to display the number and size of data items scanned by the electronic device 100. The electronic device 100 may detect a user operation acting on the display area 108, and in response to the user operation, the electronic device 100 may check the data to be transmitted.
[0131] A data migration method provided by an embodiment of the present application is introduced below.
[0132] See also Figure 3 , Figure 3 This is a flow chart of a data migration method provided in an embodiment of the present application. The data migration method may include but is not limited to the following steps:
[0133] S101: The electronic device 100 and the electronic device 200 establish a communication connection.
[0134] In some embodiments of the present application, after both electronic device 100 and electronic device 200 start the device switching application, a communication connection can be established through the device switching application. For example, after both electronic device 100 and electronic device 200 start the device switching application, electronic device 100 can scan for devices that can establish a communication connection and display the device name on its display screen. The user can select the name corresponding to electronic device 200 from the device names displayed on electronic device 100, so that electronic device 100 can establish a communication connection with electronic device 200. For another example, Figure 2A As shown, after both the electronic device 100 and the electronic device 200 start the device switching application, the electronic device 100 can directly scan the QR code displayed by the electronic device 200 to establish a communication connection with the electronic device 200.
[0135] In some embodiments of the present application, the electronic device 100 and the electronic device 200 can establish a communication connection without starting the device switching application.
[0136] It is understandable that the relevant description of the communication connection can be referred to above, and this application will not elaborate on it here.
[0137] S102: When the preset condition 1 is met, the electronic device 100 marks the local data that meets the preset condition 2.
[0138] After the electronic device 100 and the electronic device 200 establish a communication connection, the electronic device 100 can scan the local data and determine whether the preset condition 1 is satisfied. When the preset condition 1 is satisfied, the electronic device 100 can mark the data in the local data that satisfies the preset condition 2. It can be understood that the marked data (i.e., the data that satisfies the preset condition 2) is the data to be restored, that is, the data that is not directly restored during the import phase.
[0139] In some embodiments of the present application, satisfying the preset condition 1 may specifically include: the electronic device detects a user operation that triggers a quick migration. For example, as Figure 2B shown, the electronic device detects a user operation acting on the confirmation control 1012 in the user interface 1a.
[0140] In some embodiments of the present application, satisfying the preset condition 1 may specifically further include any one or more of the following: the data volume of the local data of the electronic device 100 is greater than the threshold 1, the proportion of the third-party application data in the local data of the electronic device 100 is greater than the threshold 2, and the data volume of the third-party application data in the local data of the electronic device 100 is greater than the threshold 3.
[0141] It can be understood that satisfying the preset condition 1 may also include other contents, and the present application does not limit this.
[0142] It can be understood that the threshold 1 and the threshold 3 are positive numbers, and the threshold 2 is greater than 0 and less than 100%. The specific values of the threshold 1, the threshold 2, and the threshold 3 can be set according to actual needs, and the present application does not limit this. Among them, the unit of the threshold 1 can be GB. For example, the threshold 1 can be 250 GB, the threshold 2 can be 40%, and the threshold 3 can be 100 GB.
[0143] In some embodiments of the present application, the local data that satisfies the preset condition 2 may specifically include: multimedia data with cloud backups (including data such as videos, pictures, music, documents, and recordings), and third-party application data whose usage conditions satisfy the preset condition 3.
[0144] In some embodiments of the present application, the usage conditions satisfying the preset condition 3 may specifically include any one or more of the following: the usage frequency is less than the threshold 4, the usage duration is less than the threshold 5, and the interval duration between the last usage time and the time when the electronic device 100 scans the local data this time is greater than the threshold 6.
[0145] It can be understood that the usage frequency can refer to the daily / weekly / monthly / yearly usage frequency. The usage frequency can be the average value obtained by statistics over a period of time. In one possible implementation, the electronic device 100 can count the number of times each third-party application has been used in the most recent week / month / year, and determine the average daily usage frequency corresponding to each third-party application based on the number of times of use. Similarly, in one possible implementation, the electronic device 100 can count the number of times each third-party application has been used in the most recent month or year, and determine the average weekly usage frequency corresponding to each third-party application based on the number of times of use.
[0146] In some embodiments of the present application, the usage duration can refer to the average value of each usage duration counted over a period of time. In some other embodiments of the present application, the usage duration can refer to the total usage duration counted over a period of time.
[0147] It can be understood that the threshold 4, threshold 5, and threshold 6 can be set according to actual needs, and the present application does not limit this. For example, the threshold 4 is once a month, the threshold 5 can be 1 minute, and the threshold 6 can be 1 month.
[0148] It should be noted that the electronic device 100 can mark the local data that meets the preset condition 2 in various ways, and the present application does not limit the specific marking method.
[0149] It should be noted that in some other embodiments of the present application, the electronic device 100 can also mark the data in the local data that does not meet the preset condition 2. In this way, after the electronic device 100 transmits the marked data to the electronic device 200, the electronic device 200 can directly restore the marked data, and the unmarked data is the data to be restored.
[0150] S103: When the preset condition 1 is met, the electronic device 100 sends a message to the electronic device 200 to notify the electronic device 200 that the user has triggered the fast migration of data.
[0151] After the electronic device 100 and the electronic device 200 establish a communication connection, the electronic device 100 can scan the local data and determine whether the user triggers a fast migration. When the user triggers a fast migration, the electronic device 100 can send a message to the electronic device 200 to notify the electronic device 200 that the user has triggered the fast migration of data. Correspondingly, the electronic device 200 can receive the message sent by the electronic device 100.
[0152] In some embodiments of the present application, the message sent by the electronic device 100 to the electronic device 200 carries indication information. In a possible implementation, the message carries indication information, which may specifically include: the content corresponding to a specific field in the message is content 1. The indication information can be used to instruct the electronic device 200 to create a data folder to be restored.
[0153] It can be understood that the specific field can be a header field / middle field / trailer field, or a field divided in other ways. In the embodiments of the present application, the specific field can be understood as a flag bit.
[0154] It can be understood that content 1 can be set according to actual needs, and its form can be numbers, letters, characters, strings, etc., and the present application does not limit this. For example, content 1 can be 111. Another example is that content 1 can be true.
[0155] It can be understood that the electronic device 100 can first execute step S102 and then execute step S103, or first execute step S103 and then execute step S102, or execute step S102 and step S103 simultaneously. The present application does not specifically limit the execution order of step S102 and step S103.
[0156] S104: The electronic device 200 parses the message sent by the electronic device 100 and creates a data folder to be restored.
[0157] After receiving the message sent by the electronic device 100, the electronic device 200 can parse the message and create a data folder to be restored.
[0158] In some embodiments of the present application, after receiving the message sent by the electronic device 100, the electronic device 200 can parse the message and, when determining that the content corresponding to the specific field in the message is content 1, create a data folder to be restored. For example, the specific field can be a header field and content 1 can be 111. In this case, after receiving the message sent by the electronic device 100, the electronic device 200 can determine whether the content corresponding to the header field in the message is 111.
[0159] It should be noted that, on the one hand, the electronic device 200 can create a folder icon corresponding to the data folder to be restored on the desktop of the electronic device 200 so that the user can view the application data to be restored later. On the other hand, the electronic device 200 can create a file directory corresponding to the data folder to be restored. In this way, there will be a file directory corresponding to the data folder to be restored in the file system of the electronic device 200 so that the data to be restored can be stored under this file directory later.
[0160] S105: The electronic device 100 detects a user operation that triggers data transmission. In response to this user operation, the electronic device 100 transmits local data to the electronic device 200.
[0161] When the preset condition 1 is met, the electronic device 100 can remind the user to select whether to perform a quick migration. If the electronic device 100 detects a user operation that triggers data transmission, in response to this user operation, the electronic device 100 can transmit local data to the electronic device 200. Correspondingly, the electronic device 200 can receive the local data transmitted by the electronic device 100.
[0162] In some embodiments of the present application, the user operation that triggers data transmission may specifically include: a user operation on the control 104 included in the user interface 1c.
[0163] In some embodiments of the present application, the electronic device 100 preferentially transmits data that can be directly restored subsequently to the electronic device 200, and then transmits the data to be restored to the electronic device 200 after the transmission is completed. In a possible implementation manner, the electronic device 200 can directly restore the data without a mark. In this case, the electronic device 100 can preferentially transmit the local data without a mark (i.e., the local data that does not meet the preset condition 2) to the electronic device 200, and then transmit the local data with a mark (i.e., the local data that meets the preset condition 2) after the transmission is completed.
[0164] In some embodiments of the present application, the local data with a mark may include multimedia data with cloud backup. In this case, the electronic device 100 may not transmit the multimedia data with cloud backup to the electronic device 200.
[0165] S106: The electronic device 200 directly restores the data without a mark in the local data, and stores the data with a mark in the local data in the folder for data to be restored.
[0166] After receiving the local data transmitted by the electronic device 100, the electronic device 200 can create a temporary file and temporarily store the data without a mark therein. In this way, the electronic device 200 can directly restore the data stored in the temporary file (i.e., the data without a mark). Specifically, the electronic device 200 can determine the storage path of the data in the temporary file in the electronic device 100, and store the data in the corresponding storage path in the electronic device 200.
[0167] After receiving the local data transmitted by the electronic device 100, the electronic device 200 may store the marked data in the file directory corresponding to the data to be restored folder. Accordingly, in the data to be restored folder created by the electronic device 200 on the desktop, the application icon corresponding to the application to which the marked data belongs may be correspondingly displayed (such as Figure 2F as shown).
[0168] In some embodiments of the present application, after the electronic device 200 completes the restoration of the unmarked data in the local data, the desktop interface (for example, the user interface 1h) can be displayed. The desktop interface may display the folder icon corresponding to the data to be restored folder (for example, the folder icon 106).
[0169] It can be understood that the marked data may include data corresponding to one or more applications. In this case, after the electronic device 200 completes the restoration of the unmarked data in the local data, the folder icon displayed by the electronic device 200 may include the application icons corresponding to the one or more applications.
[0170] S107: The electronic device 200 detects a user operation on the data to be restored folder, and in response to the user operation, the electronic device 200 restores the data in the data to be restored folder.
[0171] The user can trigger the electronic device 200 to restore the data in the data to be restored folder by means of touch, voice control, gesture, etc. Specifically, the electronic device 200 may detect a user operation on the data to be restored folder, and in response to the user operation, the electronic device 200 may restore the data in the file directory corresponding to the data to be restored folder, that is, the electronic device 200 may determine the storage path of the data in the file directory in the electronic device 100 and store the data in the corresponding storage path in the electronic device 200.
[0172] In some embodiments of the present application, the user operation on the data to be restored folder may specifically include: a touch operation on the folder icon corresponding to the data to be restored folder. Specifically, the user can select the application to be restored by himself / herself and touch the icon corresponding to the application in the data to be restored folder displayed by the electronic device 200 (for example, the application icon 107). Accordingly, the electronic device 200 may restore the data to be restored corresponding to the application.
[0173] In some embodiments of the present application, the user operation on the data to be restored folder may specifically include: the user instructs the electronic device 200 to restore the data in the data to be restored folder through the voice assistant or gesture in the electronic device 200.
[0174] A specific implementation manner of the foregoing embodiments is introduced below.
[0175] Please refer to Figure 4 , Figure 4 which is a flowchart of another data migration method provided by an embodiment of the present application. The data migration method may include but is not limited to the following steps:
[0176] S201: The electronic device 100 and the electronic device 200 establish a communication connection.
[0177] It can be understood that the specific implementation manner of step S201 can refer to the relevant description of step S101, and the present application will not elaborate on this.
[0178] S202: The electronic device 100 scans the local data and determines whether the local data meets a preset condition 4.
[0179] After the electronic device 100 and the electronic device 200 establish a communication connection, it can scan the local data and determine whether the local data meets a preset condition 4. If the electronic device 100 determines that the local data meets the preset condition 4, the electronic device 100 can execute step S203. If the electronic device 100 determines that the local data does not meet the preset condition 4, the electronic device 100 can directly display the scanned data on the display screen for the user to select the data to be migrated (such as Figure 2I the user interface 1m shown).
[0180] It can be understood that the preset condition 4 can be related to the data volume of the local data and the third-party application data in the local data.
[0181] In some embodiments of the present application, meeting the preset condition 4 may specifically include any one or more of the following: the data volume of the local data of the electronic device 100 is greater than a threshold 1, the proportion of the third-party application data in the local data of the electronic device 100 is greater than a threshold 2, and the data volume of the third-party application data in the local data of the electronic device 100 is greater than a threshold 3.
[0182] S203: The electronic device 100 determines whether the user triggers the electronic device 100 to quickly migrate data.
[0183] If the electronic device 100 determines that the local data meets the preset condition 4, the electronic device 100 can prompt the user to select whether to perform a quick data migration, and then determine whether the user triggers the electronic device 100 to quickly migrate data. If the user triggers the electronic device 100 to quickly migrate data, the electronic device 100 can execute step S204 and step S206. If the user does not trigger the electronic device 100 to quickly migrate data, the electronic device 100 can directly display the scanned data on the display screen for the user to select the data to be migrated (such as Figure 2I the user interface 1m shown).
[0184] It is understandable that the electronic device 100 can prompt the user to select whether to quickly migrate data by displaying a prompt box on the display screen, or by playing a prompt voice through a speaker to prompt the user to select whether to quickly migrate data, or by vibrating to prompt the user to select whether to quickly migrate data. This application does not limit the specific manner of this prompt.
[0185] The electronic device 100 determines whether the user triggers the electronic device 100 to quickly migrate data. Specifically, it can refer to whether the electronic device 100 detects a user operation that triggers the electronic device 100 to quickly migrate data.
[0186] S204: The electronic device 100 sends a message to the electronic device 200 to notify the electronic device 200 that the user has triggered the quick migration of data.
[0187] If the electronic device 100 determines that the user triggers the electronic device 100 to quickly migrate data, the electronic device 100 can send a message to the electronic device 200 to notify the electronic device 200 that the user has triggered the quick migration of data. The specific implementation method can refer to the relevant description of step S103, and this application will not elaborate on it here.
[0188] Correspondingly, the electronic device 200 can receive the message sent by the electronic device 100.
[0189] S205: The electronic device 200 parses the message sent by the electronic device 100 and creates a folder for the data to be restored.
[0190] After receiving the message sent by the electronic device 100, the electronic device 200 can parse the message and then create a folder for the data to be restored. The specific method can refer to the relevant description of step S104, and this application will not elaborate on it here.
[0191] S206: The electronic device 100 marks the local data that meets the preset condition 2.
[0192] It is understandable that the specific implementation method of step S206 can refer to the relevant description of step S102, and this application will not elaborate on it here.
[0193] S207: The electronic device 100 detects a user operation that triggers the transmission of data, and in response to this user operation, transmits the local data to the electronic device 200.
[0194] It is understandable that the specific implementation method of step S207 can refer to the relevant description of step S105, and this application will not elaborate on it here.
[0195] S208: The electronic device 200 creates a temporary file, stores the unmarked data in the received local data under the temporary file, restores the unmarked data in the temporary file, and stores the marked data in the local data in the folder of data to be restored.
[0196] It can be understood that the specific implementation manner of step S208 can refer to the relevant description of step S106, and details are not described herein again in this application.
[0197] S209: The electronic device 200 starts a timer T1. The timer T1 is used to trigger the electronic device 200 to prompt the user to clear the data in the folder of data to be restored.
[0198] After the electronic device 200 has fully restored the unmarked data in the temporary file, it can start the timer T1. The electronic device 200 can prompt the user to clear the data in the folder of data to be restored by setting the timer T1.
[0199] S210: The electronic device 200 detects a user operation that triggers cloud synchronization, and in response to this user operation, performs cloud synchronization.
[0200] After the electronic device 200 has fully restored the unmarked data in the temporary file, it can prompt the user to select whether to perform cloud synchronization.
[0201] It can be understood that the electronic device 200 can prompt the user to select whether to perform cloud synchronization by displaying a prompt box on the display screen, or by playing a prompt voice through a speaker, or by vibrating. This application does not limit the specific manner of this prompt.
[0202] Exemplarily, as Figure 2G shown, after the electronic device 200 has fully restored the unmarked data in the temporary file, it can display a prompt box 108 on the display screen to prompt the user to select whether to perform cloud synchronization.
[0203] S211: When the timing duration of the timer T1 of the electronic device 200 reaches a preset duration, the electronic device 200 prompts the user to select whether to clear the data in the folder of data to be restored.
[0204] In some embodiments of this application, after the electronic device 200 starts the timer T1, when the timing duration reaches the preset duration, it can prompt the user to select whether to clear the data in the folder of data to be restored (i.e., the data to be restored).
[0205] In some embodiments of the present application, after the electronic device 200 starts the timer T1, if the electronic device 200 makes the above-mentioned prompt K times (that is, prompts K times whether to clear the data to be restored), and the user always chooses not to clear the data to be restored after making the above-mentioned prompt K times, the electronic device 200 may turn off the timer T1 and no longer make the above-mentioned prompt automatically. Wherein, K is a positive integer. It can be understood that the specific value of K can be set according to actual needs, and the present application does not limit this.
[0206] In a possible implementation manner, the interval duration for the electronic device 200 to make the above-mentioned prompt K times can be the same. For example, the electronic device 200 prompts whether to clear the data to be restored every preset duration, and a total of K times. Specifically, after the electronic device 200 starts the timer T1, when its timing duration reaches the preset duration, it makes the first above-mentioned prompt. If the user chooses not to clear the data to be restored, the electronic device 200 may clear the timing duration of the timer T1 and start timing again. When its timing duration reaches the preset duration again (or when the timing duration reaches 2 times the preset duration without clearing), it makes the second above-mentioned prompt. If the user always chooses not to clear the data to be restored, the electronic device 200 turns off the timer T1 after making the above-mentioned prompt K times, that is, the timer T1 exits the operation after prompting K times.
[0207] In another possible implementation manner, the interval duration for the electronic device 200 to make the above-mentioned prompt K times can be different. For example, the more times the user chooses not to clear the restored data, the longer the interval duration for the electronic device 200 to prompt. Taking K = 3 as an example, after the electronic device 200 starts the timer T1, when its timing duration reaches the preset duration, it makes the first above-mentioned prompt. If the user chooses not to clear the data to be restored, the electronic device 200 may clear the timing duration of the timer T1 and start timing again. When its timing duration reaches 2 times the preset duration (or when the timing duration reaches 3 times the preset duration without clearing), it makes the second above-mentioned prompt. If the user still chooses not to clear the data to be restored, the electronic device 200 may clear the timing duration of the timer T1 and start timing again. When its timing duration reaches 3 times the preset duration (or when the timing duration reaches 6 times the preset duration without clearing), it makes the third above-mentioned prompt. If the user still chooses not to clear the data to be restored, the electronic device 200 may turn off the timer T1, and the electronic device 200 no longer makes the above-mentioned prompt automatically.
[0208] In some embodiments of the present application, if the electronic device 200 detects a user operation that triggers the clearing of data in the folder of data to be restored, in response to this user operation, the electronic device 200 may further prompt the user whether to clear all the data in the folder of data to be restored or only part of the data in the folder of data to be restored. In this case, if the user selects to clear part of the data in the folder of data to be restored, the electronic device 200 may display a corresponding interface for the user to select the data to be restored that needs to be cleared (reference may be made to the user interface 1m shown in Figure 2I ). In a possible implementation, the data in the folder of data to be restored may include data corresponding to one or more applications. In this case, the user may select the application data to be cleared from the one or more applications. Specifically, the electronic device 200 may display the application icons and related information corresponding to the one or more applications, and clear the application data corresponding to the application icon targeted by the corresponding user operation.
[0209] It should be noted that, in some embodiments of the present application, after the electronic device 200 starts the timer T1, at least one of the above-mentioned prompts is made, and at least once the user selects to clear the data to be restored. In this case, if not all the data in the folder of data to be restored is cleared and the number of times of making the above-mentioned prompt is less than K, the electronic device 200 may continue to prompt whether to clear the data to be restored according to the above rules. However, if all the data in the folder of data to be restored has been cleared, or the number of times of making the above-mentioned prompt reaches K times, the electronic device 200 may turn off the timer T1 and no longer automatically make the above-mentioned prompt.
[0210] S212: The electronic device 200 detects a user operation on the folder of data to be restored, and in response to this user operation, restores the data in the folder of data to be restored.
[0211] It can be understood that the specific implementation manner of step S212 may refer to the relevant description of step S107, and the present application will not elaborate on this.
[0212] It should be noted that the above steps S209 - step S211 are optional steps. In some embodiments of the present application, the electronic device 200 may execute step S210, but does not execute step S209 and step S211. In some other embodiments of the present application, the electronic device 200 may execute step S209 and step S210, but does not execute step S211. In some other embodiments of the present application, the electronic device 200 may execute step S209 and step S211, but does not execute step S210.
[0213] Next, the software structure of the device involved in the embodiments of the present application is introduced.
[0214] The software system of an electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Among them, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In the embodiments of the present application, the Android system with a layered architecture is taken as an example, and in combination with Figure 5 exemplarily illustrate the software structure of the electronic device. The software structures of the electronic device 100 and the electronic device 200 involved in the present application can both refer to Figure 5 the software structure of the electronic device shown.
[0215] Figure 5 It is a schematic diagram of the software structure of an electronic device provided by the embodiments of the present application.
[0216] As Figure 5 shown, the software framework of the electronic device can include an application layer, an application framework layer, system libraries, a runtime, a hardware abstraction layer (HAL), and a kernel layer.
[0217] The application layer can include a series of application packages. Generally speaking, the application layer can include system applications and third-party applications. System applications are a series of core applications included with the Android system. For example, system applications can include applications such as calendar, music, gallery, Bluetooth, WLAN, call, video, and short message. And third-party applications are applications that users can choose to install. In some embodiments of the present application, users can download and install third-party applications in the application store.
[0218] In some embodiments of the present application, the application layer can also include a device-switching application and a system desktop. Among them, the device-switching application can include a backup module, a packaging module, an unpackaging module, a communication software module, a data detection module, a data screening and marking module, a transmission channel management module, a third-party application installation parsing module, and an application data recovery data module. The system desktop can include an installation display module and a data management module.
[0219] The backup module can be used to back up data in the electronic device to obtain backup data. The packaging module can be used to perform packaging processing on the backup data. The unpacking module is used to perform unpacking processing on the received data. The communication software module can be used to communicate with other devices, and specifically can be used to determine the communication rate (i.e., the data transmission rate) and the communication interface. The communication software module can include a protocol selection module and a communication interface. The protocol selection module is used to determine the transmission rate (for example, 80 megabytes per second, 160 megabytes per second), that is, to determine the size of the transmission pipeline. The communication interface can include a 2.4G / 5G transmission interface, that is, a transmission interface that supports Wi-Fi signals in the two frequency bands of 2.4 gigahertz (GHz) and 5 GHz. The data detection module can be used to detect the data volume of local data and the composition of local data (for example, the proportion of system application data, third-party application data, and multimedia data in local data). The data screening and marking module can be used to screen and mark third-party application data and multimedia data in local data that meet corresponding conditions (for example, preset condition 2). The transmission channel management module can be used to be responsible for the management of the transmission channels corresponding to the unmarked data and the marked data. The third-party application installation and parsing module can be used to be responsible for the installation of third-party applications. The application data recovery data module can be used to manage the temporary files and the data folder to be recovered established during the data migration process. The installation display module can be used to display the created data folder to be recovered on the desktop. The data management module can be used to control the timer and be responsible for responding to user operations to recover the data in the data folder to be recovered.
[0220] It should be noted that the data detection module, the data screening and marking module, the transmission channel management module, the installation display module, and the data management module are new modules in the electronic device. The third-party application installation and parsing module and the application data recovery data module are modules of new interfaces in the electronic device. Specifically, a monitoring and parsing interface for the application to be recovered (i.e., the application to which the data to be recovered belongs) is added to the third-party application installation and parsing module to achieve delayed installation of the application to be recovered. A monitoring and parsing interface for the application to be recovered is added to the application data recovery data module to achieve delayed recovery of the application to be recovered.
[0221] The application framework layer provides application programming interfaces (Application Programming Interface, API) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. The application framework layer can include a series of system services. System services are modular components focused on specific functions. The functions provided by the application framework API can communicate with the system services to access the underlying hardware.
[0222] In some embodiments of the present application, such as Figure 5As shown in the figure, the application framework layer may further include system services, a scene recognition module, and a storage access interface. Among them, the system services may include a Backup Manager Service (BMS), a Package Manager Service (PMS), a Nearby module, and a Media Provider (MP). Among them, the BMS can be used to orchestrate and initiate backup and restore operations. Specifically, the electronic device can access this service through the BackupManager API. During the execution of the backup operation, this service will query the applications in the electronic device to obtain backup data, and then pass it to the backup module, which will archive the data. During the execution of the restore operation, the BMS will retrieve the backup data and then restore the data to the device. The PMS can be used to manage all package information in the electronic device, including application installation, uninstallation, update, and parsing of AndroidManifest.xml. The Nearby module can be used to transfer data to be restored to isolate the transmission logic of data that can be directly restored during the import phase. The MP module can be used to manage the media database, specifically for managing the recognition and restoration of multimedia data (including restoring multimedia data). The scene recognition module can be used to call the clock resource to manage the timer and identify the delayed restoration scene to prompt the user whether to clear the data to be restored. The storage access interface is used to enable the data detection module to access the underlying modules related to storage.
[0223] It should be noted that the BMS, PMS, Nearby module, MP module, and scene recognition module are modules of new interfaces in the electronic device. Specifically, the BMS is added with a processing interface for the delayed restoration of the application to be restored. The PMS is added with a processing interface for the delayed installation of the application to be restored. The Nearby module is added with a transmission interface for the data to be restored to transfer the data to be restored to isolate the transmission logic of data that can be directly restored during the import phase. Among them, this transmission interface can be a Software Development Kit (SDK) interface. The MP module is added with a processing interface for multimedia data with cloud backup. The scene recognition module is added with a management interface for the delayed restoration scene.
[0224] In some embodiments of the present application, the scene recognition module can be a module in the system service.
[0225] The application framework layer may also include a content provider, a window manager, a resource manager, a phone manager, a notification manager, and a view system, etc. The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data, and enable these data to be accessed by applications. The data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide the communication function of the electronic device. For example, the management of call states (including connection, hangup, etc.). The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables applications to display notification information in the status bar, can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of a download, message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of a background-running application, and can also be a notification that appears on the screen in the form of a dialogue window. For example, prompt text information in the status bar, emit a prompt tone, vibrate the electronic device, blink the indicator light, etc.
[0226] The system library may include multiple functional modules. For example: Surface Manager, Media Libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc. The specific meanings and functions of these functional modules can be referred to relevant technical documents and will not be elaborated here. The specific meanings and functions of these functional modules can be referred to relevant technical documents and will not be elaborated here.
[0227] Runtime is responsible for the scheduling and management of the system. Runtime includes a core library and a virtual machine.
[0228] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the upper-layer software, aiming to abstract the hardware. The HAL is an abstract interface for device kernel drivers, used to implement application programming interfaces that provide access to the underlying devices for higher-level Java API frameworks. The HAL can provide a standard interface to display the hardware functions of the device to higher-level Java API frameworks. The HAL contains multiple library modules. Each of these library modules implements an interface for a specific type of hardware component. When the system framework layer API requests access to the hardware of a portable device, the operating system will load the library module for this hardware component.
[0229] The kernel layer is the layer between hardware and software. The kernel layer is the foundation of the Android system. The kernel layer is responsible for functions such as hardware drivers, networking, power supply, system security, and memory management. The kernel layer is an intermediate layer between hardware and software, and its role is to pass the requests of application programs to the hardware. The kernel layer can include display drivers, camera drivers, audio drivers, sensor drivers, communication drivers, and storage drivers, etc. Among them, the communication driver is used to pass the requests of upper-layer modules (such as application programs, communication software modules) to the communication hardware module. The storage driver is used to pass the requests of upper-layer modules to the memory. The communication driver can include Wi-Fi drivers, Bluetooth drivers, etc. The storage driver can include Flash Memory Drivers.
[0230] It should be noted that Figure 5 The schematic diagram of the software architecture of the electronic device shown is only an example, and does not limit the specific module division in different layers of the Android system. Specifically, reference can be made to the introduction of the Android system software architecture in conventional technologies. In addition, the display method provided in this application can also be implemented based on other operating systems, and this application will not list them one by one.
[0231] It is worth noting that when the electronic device is used as an old device and a new device during the data migration process, the usage of the modules in its software structure is different. Specifically, reference can be made to Figure 6 the software structures of the electronic device 100 and the electronic device 200 shown. Among them, the electronic device 100 can be understood as the electronic device used as an old device during the data migration process, and the electronic device 200 can be understood as the electronic device used as a new device during the data migration process.
[0232] Next, based on Figure 5 the software structure of the electronic device shown, combined with Figure 6 a specific implementation manner of the foregoing embodiment will be introduced from the perspective of software and hardware interaction.
[0233] As Figure 6As shown, the application layer in the electronic device 100 may include a device-switching application. The device-switching application in the electronic device 100 may specifically include a backup module, a packaging module, a communication software module, a data detection module, a data screening and marking module, and a transmission channel management module. The application framework layer in the electronic device 100 may include system services such as BMS and an interconnection module, and a storage access interface. The hardware in the electronic device 100 may include a communication hardware module and a memory. The communication hardware module is a hardware module for communicating with other devices. The communication hardware module may include a mobile communication module and a wireless communication module. The memory may be used to store various data.
[0234] As Figure 6 shown, the application layer in the electronic device 200 may include a device-switching application and a system desktop. The device-switching application in the electronic device 200 may specifically include an unpacking module, a communication software module, a third-party application installation and parsing module, an application data recovery and processing module, and a transmission channel management module. The system desktop in the electronic device 200 may include an installation display module and a data management module. The application framework layer in the electronic device 200 may include system services such as BMS, PMS, MP, and an interconnection module, and a scenario recognition module. The hardware in the electronic device 200 may include a communication hardware module and a memory.
[0235] The electronic device 100 and the electronic device 200 respectively establish a communication connection through the communication software module and the communication hardware module therein. After the electronic device 100 and the electronic device 200 establish this communication connection, the electronic device 100 may scan local data. Specifically, as Figure 6 shown in (1) below, the data detection module in the electronic device 100 may access the storage driver through the storage access interface, and further access the memory, so as to detect whether the local data stored in the memory meets a preset condition 4. If the data detection module in the electronic device 100 determines that the local data stored in the memory meets the preset condition 4, the electronic device 100 may prompt the user to select whether to quickly migrate the data (i.e., perform a quick migration).
[0236] If the electronic device 100 detects a user operation that triggers the quick migration of data, in response to this user operation, on the one hand, the electronic device 100 may send a message to the electronic device 200 through the communication software module and the communication hardware module to notify the electronic device 200 that a quick data migration is required. On the other hand, as Figure 6 shown in (2) below, the data detection module in the electronic device 100 may notify the data screening and marking module in the electronic device 100 to screen and mark the data that meets the preset condition 2 in the local data.
[0237] The electronic device 200 can receive the messages sent by the electronic device 100 through its communication software module and communication hardware module, parse the messages, and then create a data folder to be restored. Correspondingly, the installation display module in the electronic device 200 can draw the screen corresponding to the data folder to be restored so that it can be displayed on the display screen subsequently. Specifically, the installation display module in the electronic device 200 can draw the folder icon corresponding to the data folder to be restored.
[0238] After the electronic device 100 marks the data in the local data that meets the preset condition 2, it can determine the data that needs to be transmitted to the electronic device 200. As Figure 6 in (3), the backup module in the electronic device 100 can call the BMS to back up this part of the data to obtain backup data, and then transmit the backup data to the packaging module in the electronic device 100. The packaging module in the electronic device 100 can package the backup data. Specifically, the packaging module in the electronic device 100 will perform code identification on each file where the backup data is located during the packaging process of the backup data. This code identification can be used to identify file attributes, storage paths, etc. As Figure 6 in (4), the packaging module in the electronic device 100 can transmit the packaged data to the communication software module in the electronic device 100. As Figure 6 in (4), the communication software module in the electronic device 100 can send the packaged unmarked data to the interconnection module in the electronic device 100. The interconnection module in the electronic device 100 then accesses the communication hardware module through the communication driver, and finally sends the packaged unmarked data to the communication hardware module in the electronic device 200 through the communication hardware module. Similarly, as Figure 6 in (4), the communication software module in the electronic device 100 can send the packaged marked data to the transmission channel management module in the electronic device 100, and then the transmission channel management module sends it to the interconnection module in the electronic device 100. The interconnection module in the electronic device 100 then accesses the communication hardware module through the communication driver, and finally sends the packaged marked data to the communication hardware module in the electronic device 200 through the communication hardware module.
[0239] The communication hardware module in the electronic device 200 can receive the packaged data transmitted by the communication hardware module in the electronic device 100 and create a temporary file. The packaged data can include marked data and unmarked data. As Figure 6In (4) above, the electronic device 200 can transmit the packaged tagged data to the communication software module through the communication driver, the interconnection module, and the transmission channel management module, and then to the unpacking module in the electronic device 200. Similarly, the electronic device 200 can transmit the packaged untagged data to the communication software module through the communication driver and the interconnection module, and then to the unpacking module in the electronic device 200. After the unpacking module in the electronic device 200 receives the packaged data (including the packaged untagged data and the packaged tagged data), it can unpack the data to obtain the unpacked data. It can be understood that the unpacked data can include tagged data and untagged data. In some embodiments of the present application, the untagged data can include system application data, some third-party application data, and some multimedia data, and the tagged data can include some multimedia data and some third-party application data.
[0240] In some embodiments of the present application, such as Figure 6 In (5) above, the switching application in the electronic device 200 can notify the MP module in the electronic device 200 to directly recover the unpacked untagged multimedia data.
[0241] In some embodiments of the present application, the switching application in the electronic device 200 can notify the BMS in the electronic device 200 to directly recover the unpacked untagged system application data.
[0242] The electronic device 200 can temporarily store the untagged third-party application data in the unpacked data in a temporary file, and store the tagged data in the data folder to be recovered, that is, store the tagged data in the file directory corresponding to the data folder to be recovered. Specifically, as Figure 6 In (6) above, after the unpacking module in the electronic device 200 obtains the unpacked data, it can store the untagged data in the unpacked data in the file directory corresponding to the temporary file in the memory through the BMS and the storage driver, and store the tagged data in the unpacked data in the file directory corresponding to the data folder to be recovered in the memory.
[0243] Such as Figure 6 In (7) above, after the unpacking process is completed, the unpacking module in the electronic device 200 can notify the third-party application installation and parsing module in the electronic device 200 to install the application corresponding to the third-party application data in the temporary file. Further, as Figure 6 In (8) above, the third-party application installation and parsing module in the electronic device 200 can notify the PMS in the electronic device 200 to create a corresponding application file directory. Such as Figure 6In (8), after the PMS in the electronic device 200 creates the corresponding application file directory, it can feedback the installation result (for example, the application file directory creation is successful / failed) to the BMS in the electronic device 200 through interface callback. As Figure 6 In (9), after the third-party application installation and parsing module in the electronic device 200 notifies the PMS to create the corresponding application file directory, it can notify the application data recovery module in the electronic device 200 to recover the third-party application data in the temporary file. Specifically, as Figure 6 In (9), the application data recovery module in the electronic device 200 can notify the BMS in the electronic device 200 to recover the third-party application data in the temporary file. If the installation result feedback received by the BMS in the electronic device 200 from the PMS indicates successful installation, the BMS in the electronic device 200 can process the third-party application data in the temporary file, such as storing the third-party application data in the temporary file to the corresponding application file directory. Specifically, when the BMS processes the third-party application data in the temporary file, it can access the memory through the storage driver ( Figure 6 not shown in the figure, reference can be made to the relevant description above), so as to realize the movement of the storage location corresponding to the third-party application data. In some embodiments of the present application, the BMS in the electronic device 200 can determine where the third-party application data in the temporary file should be stored in the electronic device 200 through the code identifier during packaging.
[0244] As Figure 6 In (10), after the electronic device 200 finishes recovering all the data in the temporary file (for example, the system application data, third-party application data, and multimedia data in the temporary file), it can notify the data management module in the electronic device 200 to start the timer. Specifically, the data management module can call the clock resource through the scene recognition module in the electronic device 200 to start the timer (for example, timer T1). As Figure 6 In (11), when the timing duration of the timer reaches the preset duration, the scene recognition module in the electronic device 200 can notify the data management module to prompt the user to clear the data to be recovered.
[0245] As Figure 6 In (12), after the electronic device 200 finishes recovering all the system application data and the third-party application data in the temporary file, the electronic device 200 can notify the installation display module to draw the icon corresponding to the data folder to be recovered. The installation display module can also determine the application to which the data in the data folder to be recovered belongs, that is, the application to be recovered, and draw the application icon corresponding to the application to be recovered, so that the subsequent user can trigger the electronic device 200 to recover the corresponding application data by touching the corresponding application icon.
[0246] In some embodiments of the present application, the data that the electronic device 100 determines needs to be transmitted to the electronic device 200 includes data that can be directly restored in the import stage, and data to be restored. In one possible implementation, the data to be restored may include tagged third-party application data and tagged multimedia data. In another possible implementation, the data to be restored may include tagged third-party application data, but does not include tagged multimedia data.
[0247] The following introduces the hardware structure of the device involved in the embodiments of the present application.
[0248] Please refer to Figure 7 , Figure 7 which is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. The hardware structures of the electronic device 100 and the electronic device 200 involved in the present application can both refer to Figure 7 the software structure of the electronic device shown.
[0249] As Figure 7 shown, the electronic device may include: a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, an antenna 1, an antenna 2, a mobile communication module, a wireless communication module, a sensor module, a button, a motor, an indicator, a camera, a display screen, and a Subscriber Identity Module (SIM) card slot, etc. Among them, the audio module may include a speaker, a receiver, a microphone, a headphone interface, etc., and the sensor module may include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0250] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. It is understandable that the illustrated components can be implemented in hardware, software, or a combination of software and hardware. In some embodiments of the present application, the electronic device may include more components than those shown. Exemplarily, the electronic device may include other types of sensors. In some other embodiments of the present application, the electronic device may include fewer components than those shown, or combine certain components, or split certain components, or arrange different components. The interface connection relationships between the modules schematically shown in the embodiments of the present application are only illustrative and do not constitute a structural limitation on the electronic device.
[0251] The processor may include one or more processing units. For example, the processor may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-network Processing Unit (NPU), etc. A memory may also be provided in the processor for storing instructions and data.
[0252] The electronic device realizes the display function through the GPU, the display screen, the application processor, etc.
[0253] The GPU is a microprocessor for image processing, connecting the display screen and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor may include one or more GPUs, which execute program instructions to generate or change display information. The display screen is used to display images, videos, etc. In some embodiments, the electronic device may include one or more display screens.
[0254] The camera is used to capture still images or videos. The ISP is used to process the data fed back by the camera. Light is transmitted through the lens to the camera sensor, and the optical signal is converted into an electrical signal. The camera sensor transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The electronic device may include one or more cameras.
[0255] The internal memory may include one or more RAMs and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor and can be used to store the operating system or the executable programs of other running programs (e.g., machine instructions), and can also be used to store data of users and application programs, etc. The non-volatile memory can also store executable programs and data of users and application programs, etc., and can be pre-loaded into the random access memory for the processor to directly read and write.
[0256] In the embodiments of the present application, the code for implementing the memory expansion method described in the embodiments of the present application can be stored on the non-volatile memory. When running the camera application, the electronic device can load the executable code stored in the non-volatile memory into the random access memory.
[0257] The external memory interface can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device.
[0258] An electronic device can implement audio functions through an audio module, a speaker, a receiver, a microphone, a headphone jack, an application processor, etc.
[0259] The audio module is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The speaker, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The receiver, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. The microphone, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. The headphone jack is used to connect a wired headphone.
[0260] In the embodiments of the present application, when the electronic device enables the voice-to-text function, it can enable the microphone to collect sound signals and convert the sound signals into corresponding texts.
[0261] The touch sensor, also known as the "touch device". The touch sensor can be disposed on the display screen, and the touch sensor and the display screen form a touch screen, also known as the "touch panel". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen. In some other embodiments, the touch sensor can also be disposed on the surface of the electronic device, at a different position from the display screen.
[0262] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data migration method, characterized in that, The method is applied to a first device, and the method includes: The first device receives data to be migrated transmitted by a second device; the data to be migrated includes some or all of the first type of data and all of the second type of data. The first type of data is the data in the local data of the second device that meets a first preset condition, and the second type of data is the data in the local data of the second device that does not meet the first preset condition; After the first device finishes restoring the second type of data in the data to be migrated, it displays a first interface; the first interface includes a first icon, and the first icon is the icon corresponding to a first folder that stores the first type of data in the data to be migrated.
2. The method according to claim 1, characterized in that, The first type of data includes data corresponding to one or more applications; the first or more applications include a first application; after the first device displays the first interface, the method further includes: The first device detects an operation on the first icon. In response to the operation on the first icon, the first device displays a second interface; the second interface includes application icons corresponding to the one or more applications; the application icons corresponding to the one or more applications include a second icon, and the second icon is the application icon corresponding to the first application; The first device detects an operation on the second icon. In response to the operation on the second icon, the first device installs and restores the first application based on the data corresponding to the first application stored in the first folder.
3. The method according to claim 1 or 2, characterized in that, Before the first device receives the data to be migrated transmitted by the second device, the method further includes: The first device receives a first message sent by the second device and creates the first folder; the first message is used to notify the first device not to restore the first type of data during this data migration process; After the first device receives the data to be migrated transmitted by the second device, the method further includes: The first device stores the first type of data included in the data to be migrated into the first folder.
4. The method according to any one of claims 1 - 3, characterized in that, After the first device finishes restoring the second type of data in the data to be migrated, the method further includes: The first device starts a first timer; After the first device displays the first interface, the method further includes: When the timing duration of the first timer reaches a first preset duration, the first device displays a third interface; If the first device detects a first operation on the third interface, in response to the first operation, the first device clears the data in the first folder; If the first device detects a second operation on the third interface, in response to the second operation, the first device clears the timing duration of the first timer and repeats the step of when the timing duration of the first timer reaches the first preset duration, the first device displays the third interface.
5. The method according to claim 4, characterized in that, The method further includes: When the total number of times the first device executes the step of displaying the third interface reaches K times when the timing duration of the first timer reaches a first preset duration, the first device stops the first timer; K is a positive integer.
6. The method according to any one of claims 1 - 5, characterized in that, The data that meets the first preset condition specifically includes: multimedia data with cloud backup, and third-party application data whose usage meets a second preset condition; Among them, the third-party application data whose usage meets the second preset condition specifically includes any one or more of the following: data corresponding to third-party applications with a usage frequency less than a first frequency; data corresponding to third-party applications with a usage duration less than a first duration.
7. The method according to any one of claims 1 - 6, characterized in that, After the first device displays the first interface, the method further includes: The first device displays a fourth interface; If the first device detects a third operation on the fourth interface, in response to the third operation, when there is multimedia data in the local data of the second device in the cloud-side device, the first device receives the multimedia data in the local data of the second device transmitted by the cloud-side device.
8. The method according to any one of claims 1 - 7, characterized in that, After the first device receives the data to be migrated transmitted by the second device, the method further includes: The first device determines that the data with a mark in the data to be migrated is the first type of data, and the data without a mark in the data to be migrated is the second type of data.
9. A data migration method, characterized in that, The method is applied to a second device, and the method includes: The second device establishes a communication connection with the first device; When a third preset condition is met, the second device sends a first message to the first device, filters the first type of data, and displays a fifth interface; the first message is used to notify the first device not to perform recovery on the first type of data during the current data migration process; When the second device detects a fourth operation on the fifth interface, in response to the fourth operation, the second device transmits the data to be migrated to the first device; the data to be migrated includes some or all of the first type of data and all of the second type of data, the first type of data is the data in the local data of the second device that meets the first preset condition, and the second type of data is the data in the local data of the second device that does not meet the first preset condition.
10. The method according to claim 9, characterized in that, The meeting of the third preset condition specifically includes: The second device meets a fourth preset condition, displays a sixth interface, and detects a fifth operation on the sixth interface; Among them, the second device meeting the fourth preset condition specifically includes any one or more of the following: the data volume of the local data of the second device is greater than a first data volume; the proportion of third-party application data in the local data of the second device is greater than a first ratio; the data volume of third-party application data in the local data of the second device is greater than a second data volume.
11. The method according to claim 9 or 10, wherein, The data that meets the first preset condition specifically includes: multimedia data with cloud backup, and third-party application data whose usage meets a second preset condition; Among them, the third-party application data whose usage situation meets the second preset condition specifically includes any one or more of the following: data corresponding to third-party applications with a usage frequency less than the first frequency; data corresponding to third-party applications with a usage duration less than the first duration.
12. The method according to claim 11, wherein, In the case where the multimedia data with cloud backup does not exist in the local data of the second device, the data to be migrated includes all of the first type of data; in the case where the multimedia data with cloud backup exists in the local data of the second device, the data to be migrated includes a part of the first type of data, and the part of the first type of data does not include the multimedia data with cloud backup in the local data of the second device.
13. The method according to any one of claims 9-12, wherein, The second device screens the first type of data and displays the fifth interface, which specifically includes: The second device marks the first type of data; The second device displays the fifth interface, and the fifth interface includes a first display area and a second display area; the first display area is used to display the relevant information of the first type of data, and the second display area is used to display the relevant information of the second type of data.
14. An electronic device, wherein, The electronic device includes one or more memories and one or more processors; the one or more memories are coupled to the one or more processors, the memories are used to store computer program code, the computer program code includes computer instructions, and the processors call the computer instructions to execute the method described in any one of claims 1-8 or the method described in any one of claims 9-13.
15. A computer-readable storage medium, wherein, For storing computer instructions, when the computer instructions run on the electronic device, the electronic device is caused to execute the method described in any one of claims 1-8 or the method described in any one of claims 9-13.
Citation Information
Patent Citations
Data migration method and terminal equipment
CN106658753A
Method and device for migrating data of second terminal to first terminal
CN107026908A
Desktop layout processing method and device and user data processing method and device
CN107632872A
Method and device for migrating data, equipment and storage medium
CN113792024A
Data migration method and system and electronic equipment
CN115562570A