A data migration method and related device

CN120162091BActive Publication Date: 2026-08-07HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2023-12-09
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

例如,完成200吉字节(GB)数据的迁移大概需要花费1个小时

Benefits of technology

[0059] In the solution provided in this application, during the transmission phase, the second device may not transmit all of the first type of data to the first device, but only a portion of it. The second device can subsequently retrieve and recover this untransmitted data through other means. For example, the first device may not transmit multimedia data with cloud backups from its local data to the first device; the first device can later directly retrieve this cloud-backed multimedia data through cloud synchronization. This method can reduce the amount of data to be migrated, thereby shortening the data migration time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162091B_ABST
    Figure CN120162091B_ABST
Patent Text Reader

Abstract

The application discloses a data migration method and related equipment. According to the data migration method, if a user triggers a quick migration before an old device transmits to-be-migrated data to a new device, the old device can mark a part of the to-be-migrated data, and after the new device receives the to-be-migrated data, the new device can restore data without the mark and temporarily store the data with the mark in a to-be-restored data folder, and then restore the part of data after the user triggers the restoration. The method can save the time required for restoring a part of data, shorten the time required for the whole data migration process, and enable the user to use the first device as soon as possible, avoiding the situation that the user cannot use the first device for a long time due to a long data migration time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a data migration method and related equipment. Background Technology

[0002] On the one hand, with the ever-increasing volume of basic internet data, electronic devices such as mobile phones and tablets need to store more and more data. 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 third-party application data. When the amount of data to be migrated is large, it takes a considerable amount of time to complete the migration. For example, migrating 200 gigabytes (GB) of data can take approximately one hour. On the other hand, during the data migration process from the old device to the new device, there are many restrictions on the use of both devices (for example, internet access may be blocked due to data protocols, and wireless networks may be occupied due to the migration), preventing users from using either the old or new devices during this process. Combining these two aspects, when the amount of data to be migrated from the old device to the new device is large, it takes a considerable amount of time to complete the migration, and users are unable to use either the old or new devices for an extended period. Summary of the Invention

[0003] This application provides a data migration method and related equipment. According to this data migration method, if a user triggers a fast migration before data is transferred from the old device to the new device, the new device can recover a portion of the data after receiving it from the old device, while temporarily storing the remaining data in a data folder to be recovered. This remaining data can be recovered by the new device when the user triggers recovery later. This method can shorten the data migration time, thereby reducing the time the user is unable to use the new device.

[0004] Firstly, this application provides a data migration method. This method can be applied to a first device. The method may include: the first device receiving data to be migrated transmitted by a second device, and restoring a second type of data within the data to be migrated; after the restoration of the second type of data is complete, the first device can display a first interface. 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 consists of data in the second device's local data that meets a first preset condition, and the second type of data consists of data in the second device's local data that does not meet the first preset condition. The first interface may include a first icon, which is the icon corresponding to a first folder, which stores the first type of data in the data to be migrated.

[0005] In the solution provided in this application, after the first device receives the data to be migrated transmitted by the second device, it can restore a portion of the data to be migrated, while storing the remaining data in the first folder. This method can save the time required to restore a portion of the data, thereby shortening the overall data migration process and allowing users to use the first device as soon as possible, avoiding the inability to use the first device for an extended period due to excessively long data migration times.

[0006] It is understood that the first device may be a new device as mentioned below (e.g., electronic device 200), and the second device may be an old device as mentioned below (e.g., electronic device 100).

[0007] In some embodiments of this application, the first type of data may be the data to be recovered later (hereinafter referred to as the data to be recovered), and the second type of data may be the data that can be directly recovered later.

[0008] In some embodiments of this application, the first type of data may be the unlabeled data mentioned below, and the second type of data may be the labeled data mentioned below.

[0009] In some embodiments of this application, the first preset condition may be preset condition 2 mentioned below.

[0010] In some embodiments of this application, the first folder may be the folder to be recovered mentioned below.

[0011] In some embodiments of this application, the first interface can be as follows: Figure 2F The user interface 1h shown in (1) can have a folder icon 106 as the first icon.

[0012] In conjunction with the first aspect, in one possible implementation, the first type of data may include data corresponding to one or more applications, and the first or more applications may include the first application. After the first device displays the first interface, the method may further include: the first device can detect an operation on a 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 a second icon, and in response to the operation on the second icon, the first device can install and restore the first application based on the data corresponding to the first application stored in a first folder. The second interface includes application icons corresponding to one or more applications, and the application icons corresponding to one or more applications include a second icon, which is the application icon corresponding to the first application.

[0013] In the solution provided in 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. Users 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, gestures, etc. This method allows users to trigger the restoration of specific applications themselves, better meeting user requirements. Specifically, users can trigger the first device to restore the application when they need to use it, while the data of other applications that are not needed for the time being can be temporarily stored in the data to be restored folder and restored when needed later.

[0014] In some embodiments of this application, the second device can add an identifier to the data to be migrated when packaging it, indicating the storage path and source file attributes of the corresponding data. After receiving the data to be migrated, the second device can restore the corresponding data based on the identifier. For example, the second device can determine the storage path corresponding to different data (such as different application data) in the first type of data based on the identifiers corresponding to these data, and move the data according to the corresponding storage path.

[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 (hereinafter referred to as the first application data). Specifically, 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 the storage path.

[0016] It is understood that the data recovery involved in this application refers to adjusting the location of data in the new device according to its location in the old device (e.g., storage location). In other words, for data transferred from the old device, the new device restores its storage location in the new device to its storage location in the old device. The storage location may include the storage path (i.e., the corresponding file directory).

[0017] In conjunction with the first aspect, in one possible implementation, after the first device displays the first interface, the method may 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 restore data stored in the first folder.

[0018] In the solution provided in 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, or gestures. This method can restore the first type of data in one go, without requiring the user to manually trigger the restoration of specific application data.

[0019] In some embodiments of this application, the first type of data is data corresponding to one or more third-party applications.

[0020] In some embodiments of this application, the second interface can be as follows: Figure 2F The user interface 1i shown in (2) can be the first application, such as Figure 2F In (2) shown in the figure, the second icon can be application icon 107.

[0021] In conjunction with the first aspect, in one 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 receiving a first message sent by the second device and creating 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 storing the first type of data included in the data to be migrated into the first folder. The first message is used to notify the first device that the first type of data will not be restored during this data migration process.

[0022] In the solution provided in this application, before transmitting the data to be migrated to the first device, the second device can first send a message to the first device to notify the user that they have selected to trigger fast data migration. In this way, after receiving the message, the first device can create the first folder without waiting to receive the data to be migrated. Furthermore, the second device can send a message to the first device while filtering the first type of data, which can save data migration time to some extent.

[0023] In some embodiments of this application, the first message may be the message mentioned in step S103 or the message mentioned in step S204.

[0024] In conjunction with the first aspect, in one possible implementation, after the first device has completed the recovery of the second type of data in the data to be migrated, the method may further include: the first device starting a first timer. After the first device displays a first interface, the method may further include: when the 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 reset the duration of the first timer to zero and repeat the step of displaying the third interface when the duration of the first timer reaches the first preset duration.

[0025] In some embodiments of this application, the first timer may be the timer T1 mentioned below.

[0026] In some embodiments of this application, the first preset duration may be the preset duration mentioned below.

[0027] In some embodiments of this application, the third interface can be as follows: Figure 2H The user interface 1l shown. A first operation on the third interface may specifically include a user operation performed on the confirm control 1092 within the user interface 1l. A second operation on the third interface may specifically include a user operation performed on the cancel control 1091 within the user interface 1l.

[0028] In conjunction with the first aspect, in one possible implementation, after the first device displays the first interface, the method may further include: under certain circumstances, the first device can automatically restore the data in the first folder.

[0029] In some embodiments of this application, certain situations may specifically include: the user is unaware of the situation. For example, the first device is in a static state, and / or the first device is in a standby state (which may be referred to as a hibernation state or a black screen state), and / or there are no applications running in the foreground or background of the first device.

[0030] In some embodiments of this application, under certain circumstances, the following may also be included: the computing resources of the first device are not strained. For example, the ratio of the system memory already used by the first device to the total system memory is not greater than z. Another example is that the system memory already used by the first device is less than x.

[0031] It is 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 this application does not impose any restrictions on them. For example, z can be 0.3 and x can be 500 megabytes (MB).

[0032] In the solution provided in this application, the first device can automatically recover the first type of data temporarily stored in the first folder under certain circumstances. This method can shorten the data migration time and recover the part of the data that has not yet been recovered during the data migration process without the user using the first device, without the user having to trigger the recovery of that part of the data.

[0033] In conjunction with the first aspect, in one possible implementation, the method may further include: if the first device performs the step of displaying the third interface a total of K times when the timing duration of the first timer reaches a first preset duration, the first device may stop the first timer. K is a positive integer.

[0034] In the solution provided in this application, if the user has not clearly selected 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 this application, the first preset duration may be the same each time the first device performs the above steps.

[0036] In some embodiments of this application, the first preset duration may vary each time the first device performs the above steps. For example, the more times the first device performs the above steps, the longer the first preset duration is used during the execution of the above steps.

[0037] In conjunction with the first aspect, in one possible implementation, 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. Specifically, the third-party application data whose usage meets the second preset condition may include any one or more of the following: data corresponding to third-party applications whose usage frequency is less than the first frequency; and data corresponding to third-party applications whose usage duration is less than the first duration.

[0038] In the solution provided in this application, the first type of data may include multimedia data backed up in the cloud from the local data of the second device, as well as third-party application data whose usage meets the second preset conditions.

[0039] In some embodiments of this application, the third-party application data whose usage meets the second preset condition may further include: data corresponding to third-party applications whose interval between the last usage time and the time when the second device filters the first type of data is longer than the second duration.

[0040] In some embodiments of this application, the second preset condition can be preset condition 3 mentioned below. The first frequency can be threshold 4 mentioned below, the first duration can be threshold 5 mentioned below, and the second duration can be threshold 6 mentioned below.

[0041] In conjunction with the first aspect, in one possible implementation, 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, if multimedia data from the local data of the second device exists in the cloud-side device, the first device may receive the multimedia data from the local data of the second device transmitted by the cloud-side device.

[0042] In the solution provided in this application, the second device may not transmit multimedia data with cloud backups from its local data to the first device during the transmission phase. Subsequently, the first device can directly obtain the multimedia data with cloud backups through cloud synchronization. This method can reduce the amount of data to be migrated, thereby shortening the data migration time.

[0043] In some embodiments of this application, the fourth interface can be as follows: Figure 2G The user interface 1k shown. The third operation for the fourth interface may specifically include: a user operation performed on the control 1082.

[0044] In conjunction with the first aspect, in one possible implementation, 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 to be migrated with tags is first type data, and the data to be migrated without tags is second type data.

[0045] In the solution provided in this application, after the second device filters the first type of data, it can mark the filtered data so that the first device can quickly distinguish between the first type of data and the second type of data after receiving the data to be migrated.

[0046] Secondly, this application provides a data migration method. This method can be applied to a second device. The method may include: the second device establishing a communication connection with a first device; under the condition of satisfying a third preset condition, the second device sending a first message to the first device to filter first type of data and display a fifth interface; the second device detecting a fourth operation on the fifth interface, and in response to the fourth operation, the second device transmitting the data to be migrated to the first device. The first message is used to notify the first device that it will not restore the first type of data during this data migration process; the data to be migrated includes some or all of the first type of data and all of the second type of data, where the first type of data is data in the second device's local data that meets the first preset condition, and the second type of data is data in the second device's local data that does not meet the first preset condition.

[0047] In the solution provided in this application, before transmitting the data to be migrated to the first device, the second device can distinguish between 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 portion of the data to be migrated needs to be restored during this data migration process, without needing to restore the other portion. This method can save the time required to restore a portion of the data, thereby shortening the overall data migration process and allowing users to use the first device as soon as possible, avoiding the inability to use the first device for an extended period due to excessively long data migration times.

[0048] In some embodiments of this application, the third preset condition may be preset condition 1 mentioned below.

[0049] In some embodiments of this application, the fifth interface can be as follows: Figure 2C The user interface 1c shown. The fourth operation for the fifth interface may specifically include: a user operation performed on control 104.

[0050] In conjunction with the second aspect, in one possible implementation, the second device transmits the data to be migrated to the first device. Specifically, this may include: the second device first transmitting the second type of data to be migrated to the first device, and then transmitting the first type of data to be migrated to the first device.

[0051] In the solution provided in this application, the second device can first transmit the data that can be directly recovered to the first device. After this part of the data transmission is completed, the second device transmits the data to be recovered to the first device. In this way, the first device can first receive the data that can be directly recovered, and at the same time as receiving the data to be recovered, it can directly recover the data that was previously received by the first device that can be directly recovered. This method can save some of the data recovery time, thereby shortening the time required for the entire data migration process.

[0052] In conjunction with the second aspect, in one possible implementation, satisfying the third preset condition may specifically include: the second device satisfying the fourth preset condition, displaying the sixth interface, and detecting the fifth operation targeting the sixth interface. Specifically, satisfying the fourth preset condition includes any one or more of the following: the amount of local data on the second device is greater than the first data amount; the proportion of third-party application data in the local data of the second device is greater than the first ratio; and the amount of third-party application data in the local data of the second device is greater than the second data amount.

[0053] In the solution provided in this application, the second device may trigger a fast migration only if the amount of local data and / or the amount of third-party application data in the second device meets the corresponding conditions, and the user agrees to trigger a fast migration (i.e., only a portion of the data to be migrated is restored during this migration process). Fast migration is not triggered under all circumstances. This method allows for greater flexibility in the specific implementation of the data migration process, enabling the selection of either a general data migration method or a fast migration method based on the specific circumstances of the local data on the old device.

[0054] In some embodiments of this application, the fourth preset condition may be preset condition 4 mentioned below.

[0055] In some embodiments of this application, the sixth interface can be as follows: Figure 2B The user interface 1a shown. The fifth operation for the sixth interface may specifically include: a user operation performed on the determination control 1012 in the user interface 1a.

[0056] In some embodiments of this application, the first data volume can be the threshold 1 mentioned below, the first ratio can be the threshold 2 mentioned below, and the second data volume can be the threshold 3 mentioned below.

[0057] In conjunction with the second aspect, in one possible implementation, 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. Specifically, the third-party application data whose usage meets the second preset condition may include any one or more of the following: data corresponding to third-party applications whose usage frequency is less than the first frequency; and data corresponding to third-party applications whose usage duration is less than the first duration.

[0058] In conjunction with the second aspect, in one possible implementation, if there is no cloud-backed multimedia data in the local data of the second device, the data to be migrated may include all of the first type of data; if there is cloud-backed multimedia data in the local data of the second device, the data to be migrated may include a portion of the first type of data, and this portion of the first type of data does not include the cloud-backed multimedia data in the local data of the second device.

[0059] In the solution provided in this application, during the transmission phase, the second device may not transmit all of the first type of data to the first device, but only a portion of it. The second device can subsequently retrieve and recover this untransmitted data through other means. For example, the first device may not transmit multimedia data with cloud backups from its local data to the first device; the first device can later directly retrieve this cloud-backed multimedia data through cloud synchronization. This method can reduce the amount of data to be migrated, thereby shortening the data migration time.

[0060] In conjunction with the second aspect, in one possible implementation, the second device filters the first type of data and displays a fifth interface. Specifically, this may include: the second device marking the first type of data and displaying the fifth interface. The fifth interface includes a first display area and a second display area. The first display area is used to display relevant information about the first type of data, and the second display area is used to display relevant information about the second type of data.

[0061] In some embodiments of this application, the fifth interface can be as follows: Figure 2C The user interface 1c shown. The first display area can be display area 103 in user interface 1c. The second display area can be display area 102 in user interface 1c.

[0062] In some embodiments of this application, the relevant information about the data may specifically include: the data category, data volume, and number of items (see details). Figure 2C The content shown in the user interface 1c).

[0063] Thirdly, this application provides an electronic device comprising: one or more processors and one or more memories; the one or more memories may be coupled to the one or more processors, the memories being used to store computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to perform the method as described in the first aspect or any implementation thereof.

[0064] Fourthly, this application provides an electronic device comprising: one or more processors and one or more memories; the one or more memories may be coupled to the one or more processors, the memories being used to store computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to perform the method described in the second aspect or any implementation thereof.

[0065] Fifthly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect or any implementation thereof.

[0066] In a sixth aspect, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the second aspect or any implementation thereof.

[0067] In a seventh aspect, embodiments of this application provide a chip that can be applied to an electronic device. The chip includes one or more processors that invoke computer instructions to cause the electronic device to perform the method described in the first aspect or any implementation thereof.

[0068] Eighthly, embodiments of this application provide a chip that can be applied to an electronic device. The chip includes one or more processors that invoke computer instructions to cause the electronic device to perform the method described in the second aspect or any implementation thereof.

[0069] Ninthly, embodiments of this application provide a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the method described in the first aspect or any implementation thereof.

[0070] In a tenth aspect, embodiments of this application provide a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the method described in the second aspect or any implementation thereof.

[0071] It is understood that the electronic device provided in the 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 implementation thereof. Therefore, the beneficial effects they can achieve can be referenced to the beneficial effects of any possible implementation of the first aspect, and will not be repeated here. The electronic device provided in the 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 implementation thereof. Therefore, the beneficial effects they can achieve can be referenced to the beneficial effects of any possible implementation of the second aspect, and will not be repeated here. Attached Figure Description

[0072] Figure 1 A schematic diagram illustrating a data migration process provided in an embodiment of this application;

[0073] Figures 2A-2I A set of user interface diagrams provided for embodiments of this application;

[0074] Figure 3 A flowchart illustrating a data migration method provided in this application embodiment;

[0075] Figure 4 A flowchart illustrating yet another data migration method provided in this application embodiment;

[0076] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0077] Figure 6 A schematic diagram of software and hardware interaction provided for an embodiment of this application;

[0078] Figure 7 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0079] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0080] It should be understood that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0081] It should be understood that the term "user interface" in the specification, claims, and drawings of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0082] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0083] It is understandable that data migration between old and new devices can include the following two methods:

[0084] 1. There is no need to establish a direct communication connection between the old and new devices (e.g., short-range protocol connection such as Bluetooth). Instead, data is migrated from the old devices to the new devices through cloud-side devices (e.g., cloud servers).

[0085] 2. A direct communication connection needs to be established between the old and new devices, and this communication connection is used to migrate data from the old device to the new device.

[0086] The two data migration methods described above are applicable to different operating systems. For the second data migration method, the entire data migration process can include a connection phase, a transmission phase, and an import phase. In the connection phase, the old device establishes a communication connection with the new device, and the old device backs up the data to be migrated. In the transmission phase, the old device packages the backed-up data and sends it to the new device in sequence. In the import phase, after receiving the data transmitted from the old device, the new device performs a data restoration operation, that is, the new device configures and installs the received data to maintain consistency with the data on the old device.

[0087] like Figure 1 As shown, taking the transfer of 300GB of data from an old device as an example, the time spent establishing a communication connection between the old and new devices during the connection phase is relatively short and can be ignored. During the transmission phase, it takes approximately 36 minutes for the old device to transfer the 300GB of data to the new device. During the import phase, the new device imports and restores the received 300GB of data to ensure consistency with the data on the old device, a process that takes approximately 54 minutes. In other words, the transmission phase accounts for about 40% of the total data migration time, while the import phase accounts for about 60%. Because the data protocols of both the old and new devices are blocked during data transmission, preventing internet access, and the communication connection between them (e.g., Wi-Fi connection) is occupied due to data transmission, both devices are unusable during the transmission phase. Furthermore, because the new device needs to restore the received data during the import phase, it is also unusable during this phase. In other words, during this data migration process, the old equipment was unusable for 36 minutes, while the new equipment was unusable for 90 minutes.

[0088] It is understandable that in data migration scenarios with large amounts of data, the time spent by the new device in the data recovery phase is relatively long.

[0089] Based on the above, this application provides a data migration method and related equipment. According to this data migration method, if a user triggers a fast migration before data is transferred from the old device to the new device, the old device can mark a portion of the data and first transmit the unmarked data to the new device, followed by the marked data. The new device can directly restore the unmarked data upon receiving it, while the marked data can be temporarily stored in a data folder to be restored, to be restored later when the user triggers the restoration. This method can shorten the time spent in the import phase, thereby reducing the time the user is unable to use the new device.

[0090] The following section first introduces a data migration scenario provided by an embodiment of this application.

[0091] For ease of description, this application refers to the old device in the data migration process as electronic device 100, and the new device in the data migration process as electronic device 200.

[0092] It is understood that electronic devices 100 and 200 can be terminal devices, specifically mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), or dedicated cameras (e.g., SLR cameras, point-and-shoot cameras), etc. This application embodiment does not impose any restrictions on the specific types of electronic devices 100 and 200.

[0093] 1. Connection Phase ( Figures 2A-2C )

[0094] (1) Electronic device 100 and electronic device 200 establish a communication connection.

[0095] Electronic devices 100 and 200 can enable the switching application and attempt to establish a communication connection.

[0096] For example, after opening the device migration application, electronic device 100 can also display a user interface containing device type options (e.g., new device option, old device option) corresponding to electronic device 100. Electronic device 100 can detect user operations on the old device option of this user interface. In response to the user operation, electronic device 100 can determine that its device is the old device in this data migration and attempt to find the new device for this data migration. Similarly, after opening the device migration application, electronic device 200 can also display a user interface containing device type options (e.g., new device option, old device option) corresponding to electronic device 200. Electronic device 200 can detect user operations on the new device option of this user interface. In response to the user operation, electronic device 200 can determine that its device is the new device in this data migration and attempt to find the old device for this data migration.

[0097] In some embodiments of this application, electronic device 100 can establish a communication connection by scanning a QR code displayed by electronic device 200. For example, during the process of electronic device 200 attempting to locate the old device in this data migration, a QR code may be displayed. In this case, the user can use electronic device 100 to scan the QR code displayed by electronic device 200, thereby establishing a communication connection between electronic device 100 and electronic device 200. Figure 2A As shown, after scanning the QR code displayed by the electronic device 200, the electronic device 100 can establish a communication connection with the electronic device 200.

[0098] In some other embodiments of this application, when both electronic device 100 and electronic device 200 have Bluetooth enabled, electronic device 100 can find electronic device 200 by scanning for devices with Bluetooth enabled, and further establish a communication connection with electronic device 200.

[0099] Understandably, the communication connection can be a Wireless Fidelity (Wi-Fi) connection, or other short-range protocol connections such as Bluetooth (BT).

[0100] In some embodiments of this application, electronic device 100 or electronic device 200 can download switching applications from an app store.

[0101] In some embodiments of this application, the system applications in electronic device 100 include a switching application. In this case, electronic device 100 does not need to download the switching application separately. Similarly, in some embodiments of this application, the system applications in electronic device 200 include a switching application. In this case, electronic device 200 does not need to download the switching application separately.

[0102] It is understood that the device switching application is an application used for data migration, and its name is merely an example provided in this application, which does not impose any specific limitations on it.

[0103] (2) Electronic device 100 scans the data and displays the data to be transmitted.

[0104] After electronic device 100 and electronic device 200 establish a communication connection, electronic device 100 can scan local data and determine whether the amount of local data and / or the proportion of third-party application data in the local data meet the corresponding conditions (e.g., the preset condition 4 mentioned below). If the amount of local data and / or the proportion of third-party application data in the local data meet the corresponding conditions, electronic device 100 can remind the user to choose whether to quickly migrate the data.

[0105] Understandably, electronic device 100 can remind the user to choose whether to quickly migrate data by displaying a prompt box, making a voice announcement, or vibrating.

[0106] It is understood that the relevant descriptions regarding 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 will not be elaborated here.

[0107] For example, after electronic device 100 and electronic device 200 establish a communication connection, electronic device 200 can display a user interface indicating a successful connection (e.g., ...). Figure 2B In the user interface 1b), the electronic device 100 can scan local data and determine whether the size of the local data and / or the proportion of third-party application data in the local data meet the corresponding conditions. If the size of the local data and / or the proportion of third-party application data in the local data meet the corresponding conditions, the electronic device 100 can display, as shown in the following... Figure 2B The user interface 1a is shown. User interface 1a may include a prompt box 101. The prompt box 101 displays "Perform quick migration?", meaning the prompt box 101 can be used to remind the user to choose whether to perform a quick migration. The prompt box 101 may include a cancel control 1011 and a confirm control 1012. The cancel control 1011 can be used to trigger the cancellation of the quick migration. The confirm control 1012 can be used to trigger the quick migration of electronic devices 100 and 200.

[0108] If the user selects to quickly migrate data (i.e., the user triggers electronic device 100 to quickly migrate data), electronic device 100 can filter and mark the local data, and then display the filtered data that can be directly recovered later, as well as the data to be recovered later, on the corresponding user interface. Here, data that can be directly recovered later refers to data that electronic device 200 can directly recover after receiving it, while data to be recovered later refers to data that electronic device 200 cannot directly recover after receiving it, but requires the user to trigger recovery after this data migration is completed.

[0109] For example, electronic device 100 can detect user actions performed on a determination control 1012 in user interface 1a. In response to the user action, electronic device 100 can filter and label scanned local data and display data such as... Figure 2C The user interface 1c shown is included. User interface 1c may include a display area 102, a display area 103, and a control 104. Display area 102 can be used to display data that electronic device 100 has filtered and determined can be directly recovered by electronic device 200 after receiving it, while display area 103 can be used to display data that electronic device 100 has filtered and determined to be recovered by electronic device 200 after receiving it. Control 104 is used to trigger electronic device 100 to migrate data to electronic device 200.

[0110] In some embodiments of this application, the electronic device 100 displays data by category, whether it is data that can be directly recovered later or data that needs to be recovered later. Data categories can include application data and multimedia data. Application data can be further divided into system application data and third-party application data. Multimedia data can include audio data (e.g., music-related data, recording-related data), video data, image data, and document data, etc. Specifically, the electronic device can display the number and size of each type of application data, as well as the number and size of each type of multimedia data.

[0111] For example, such as Figure 2C As shown, the electronic device 100 can display the number and size of contact data items, message data items, call log data items, gallery data items, and the number and size of some other application data items in display area 102. Similarly, the electronic device 100 can also display the number and size of some other application data items in display area 103. Contact data, message data, and call log data can be understood as system application data, and gallery data can be understood as multimedia data.

[0112] 2. Transmission stage ( Figure 2D )

[0113] Electronic device 100 can transmit data to electronic device 200 through a direct communication connection established with electronic device 200. Correspondingly, electronic device 200 can receive data transmitted by electronic device 100. During this transmission process, electronic device 100 can display data ready to be transmitted to electronic device 200, while electronic device 200 can display data that has been received and recovered.

[0114] For example, electronic device 100 can detect user actions performed on controls 104 included in user interface 1c, and in response to the user actions, electronic device 100 can begin transmitting data to electronic device 200. Figure 2D As shown, during the data transmission process from electronic device 100 to electronic device 200, electronic device 100 can display user interface 1d, and electronic device 200 can display user interface 1e. User interface 1d can display the data that electronic device 100 is preparing to send to electronic device 200, such as call log data, gallery data, music-related data, and application 1-related data. User interface 1e can display the data that electronic device 200 has already received from electronic device 100, such as contact data and message data.

[0115] 3. Introduction Phase ( Figure 2E )

[0116] After receiving subsequently recoverable data transmitted by electronic device 100, electronic device 200 can directly recover that data. Specifically, electronic device 200 can first store the subsequently recoverable data in a temporary file, and then adjust its position in electronic device 100 according to its position therein. The position of the data in electronic device 100 can be understood as the file directory to which the data belongs within electronic device 100.

[0117] In some embodiments of this application, electronic device 100 may first transmit data that can be directly recovered to electronic device 200, and then transmit data that needs to be recovered to electronic device 200. In this way, after receiving the data that can be directly recovered from electronic device 100, electronic device 200 can directly recover this data while simultaneously continuing to receive the data that needs to be recovered from electronic device 100. This method can reduce data migration time.

[0118] In some embodiments of this application, after receiving all the data of an application transmitted by electronic device 100, electronic device 200 can restore the application. Specifically, electronic device 200 can install the application and store the application's data in the file directory corresponding to the application. For example, Figure 2DAs shown, electronic device 200 receives all contact data (such as...) Figure 2C After processing the 32 contact data items (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 is understandable that after electronic device 100 transmits data to electronic device 200, it can disconnect the communication connection with electronic device 200. In this case, if electronic device 200 has not yet fully recovered the data that can be directly recovered, electronic device 200 can continue to recover the data.

[0120] For example, such as Figure 2E As shown, after electronic device 100 completes the data transmission to electronic device 200, electronic device 100 can disconnect the communication connection with electronic device 200 and display user interface 1f. Correspondingly, after electronic device 200 receives the data transmitted by electronic device 100, it can display user interface 1g. At this time, electronic device 200 has not yet completed the recovery of all the data that can be directly recovered.

[0121] 4. Recover the data to be recovered during the data migration process. Figures 2F-2H )

[0122] If a user triggers a fast data migration on electronic device 100, electronic device 100 can send a message to electronic device 200 to notify it that the user has triggered the fast data migration. After receiving the message from electronic device 100 and confirming that the user has triggered the fast data migration, electronic device 200 can create a folder for data that cannot be directly recovered during the import phase, i.e., data to be recovered later, and create a new folder icon on the desktop.

[0123] After the electronic device 200 has completed the import phase and recovered all directly recoverable data, it can display a desktop interface. The desktop interface of the electronic device 200 may include a folder of data to be recovered. Users can trigger the electronic device 200 to recover application data corresponding to the application icons in the folder of data to be recovered through clicking, sound, gestures, etc.

[0124] For example, electronic device 100 can detect user actions performed on the determination control 1012 in user interface 1a. In response to the user action, electronic device 100 can send a message to electronic device 200. After receiving the message, electronic device 200 can determine whether the user has triggered a fast migration. If electronic device 200 determines that the user has triggered a fast migration based on the message, electronic device 200 can create a data folder to be recovered. After electronic device 200 has recovered all directly recoverable data during the import phase, it can display the following: Figure 2F The user interface 1h is shown in (1) above. The user interface 1h may include a folder icon 106. The electronic device 200 can detect user actions performed on the folder icon 106, and in response to the user actions, the electronic device 200 can display as shown in (1). Figure 2F User interface 1i is shown in (2) above. User interface 1i can display several application icons. These application icons are the application icons corresponding to the data to be recovered. Electronic device 200 can detect user operations performed on application icons 107 included in user interface 1i. In response to the user operation, electronic device 200 can recover the data to be recovered corresponding to application icon 107, that is, install the application corresponding to 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 recovered corresponding to application icon 107 has been recovered, electronic device 200 can display as shown below. Figure 2F User interface 1j is shown in (3) above. It is understandable that... Figure 2F As shown in (2) and (3) in the figure, the state of application icon 107 is different before and after data recovery.

[0125] In some embodiments of this application, the data to be restored may include multimedia data with cloud backup, i.e., multimedia data backed up on a cloud-side device (e.g., a cloud server). In this case, electronic device 100 may not transmit the multimedia data with cloud backup to electronic device 200 during the transmission phase. Instead, electronic device 200 may prompt the user to perform cloud synchronization only after the data that can be directly restored has been restored during the import phase. Cloud synchronization refers to data synchronization between the cloud-side device and the end-side device (e.g., electronic device 200). If the electronic device detects a user operation that triggers cloud synchronization, electronic device 200 can detect whether the cloud-side device contains data that electronic device 200 does not have. If the multimedia data with cloud backup does not exist in electronic device 200, but exists in the cloud-side device, the cloud-side device can transmit this portion of the multimedia data to electronic device 200.

[0126] For example, after the electronic device 200 has completely recovered all the data that can be directly recovered during the import phase, it can display as follows: Figure 2G The user interface 1k is shown. User interface 1k may include a prompt box 108. The prompt box 108 displays "Whether to perform cloud synchronization," meaning the prompt box 101 can be used to remind the user to choose whether to perform cloud synchronization. The prompt box 108 may include a cancel control 1081 and a confirm control 1082. The cancel control 1081 can be used to trigger the cancellation of cloud synchronization. The confirm 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 the user operation, the electronic device 200 will not perform cloud synchronization. The user can then manually trigger cloud synchronization when needed. If the electronic device 200 detects a user operation on the confirm control 1082, in response to the user operation, the electronic device 200 can perform cloud synchronization.

[0127] In some embodiments of this application, after the electronic device 200 has completed the recovery of all data that can be directly recovered during the import phase, it may prompt the user to clean up the data in the data folder to be recovered at regular intervals (e.g., once a month).

[0128] For example, after completing the recovery of directly recoverable data, the electronic device 200 can start a timer. When the timer has been running for one month, the electronic device 200 can display the following: Figure 2H The user interface 1l shown is included. User interface 1l may include a prompt box 109. The prompt box 109 displays "Clear data in the data folder to be recovered?", meaning the prompt box 109 can be used to remind the user to choose whether to perform cloud synchronization. The prompt box 109 may include a cancel control 1091 and a confirm control 1092. The cancel control 1091 can be used to trigger the cancellation of clearing data in the data folder to be recovered. The confirm control 1092 can be used to trigger the electronic device 200 to clear data in the data folder to be recovered. If the electronic device 200 detects a user operation on the cancel control 1091, in response to the user operation, the electronic device 200 will not clear the data in the data folder to be recovered. The user can subsequently trigger the electronic device 200 to clear or recover data in the data folder to be recovered when needed. If the electronic device 200 detects a user operation on the confirm control 1092, in response to the user operation, the electronic device 200 can clear the data in the data folder to be recovered.

[0129] It should be noted that in some embodiments of this application, users can choose the data to be migrated.

[0130] For example, the user interface 1c may also include a control 105 for returning to the previous level interface. The electronic device 100 can detect user actions applied to the control 105, and in response to the user action, the electronic device 100 can display, as shown below... Figure 2I The user interface 1m is shown. The user interface 1m may include a display area 110. The display area 110 can be used to display the number and size of data items scanned by the electronic device 100. The electronic device 100 can detect user operations performed on the display area 108, and in response to the user operations, the electronic device 100 can select the data to be transmitted.

[0131] The following describes a data migration method provided by an embodiment of this application.

[0132] Please see Figure 3 , Figure 3 A flowchart illustrating a data migration method provided in an embodiment of this application. This data migration method may include, but is not limited to, the following steps:

[0133] S101: Electronic device 100 and electronic device 200 establish a communication connection.

[0134] In some embodiments of this application, after both electronic device 100 and electronic device 200 have the device switching application enabled, a communication connection can be established through the device switching application. For example, after both electronic device 100 and electronic device 200 have the device switching application enabled, electronic device 100 can scan for devices that can establish a communication connection and display the device names on its display screen. The user can select the name corresponding to electronic device 200 from the device names displayed on electronic device 100, thus enabling electronic device 100 to establish a communication connection with electronic device 200. For another example, such as... Figure 2A As shown, after both electronic devices 100 and 200 have enabled the device switching application, electronic device 100 can directly scan the QR code displayed by electronic device 200 to establish a communication connection with electronic device 200.

[0135] In some embodiments of this application, electronic device 100 and electronic device 200 can establish a communication connection without opening the switching application.

[0136] As can be understood, the relevant description of the communication connection can be found above, and will not be elaborated here.

[0137] S102: If preset condition 1 is met, the electronic device 100 marks the local data that meets preset condition 2.

[0138] After electronic device 100 and electronic device 200 establish a communication connection, electronic device 100 can scan local data and determine whether preset condition 1 is met. If preset condition 1 is met, electronic device 100 can mark the data in the local data that meets preset condition 2. It can be understood that the marked data (i.e., the data that meets preset condition 2) is the data to be recovered, that is, the data that is not directly recovered during the import stage.

[0139] In some embodiments of this application, satisfying preset condition 1 may specifically include: the electronic device detecting a user operation that triggers a rapid migration. For example, as... Figure 2B As shown, the electronic device detects a user action performed on the determination control 1012 in the user interface 1a.

[0140] In some embodiments of this application, the preset condition 1 is satisfied, which may specifically include any one or more of the following: the amount of local data of electronic device 100 is greater than threshold 1, the proportion of third-party application data in the local data of electronic device 100 is greater than threshold 2, and the amount of third-party application data in the local data of electronic device 100 is greater than threshold 3.

[0141] It is understood that satisfying preset condition 1 may include other content, and this application does not limit this.

[0142] It is understood that threshold 1 and threshold 3 are positive numbers, and threshold 2 is greater than 0 and less than 100%. The specific values ​​of threshold 1, threshold 2, and threshold 3 can be set according to actual needs, and this application does not impose any restrictions on them. Among them, the unit of threshold 1 can be GB. For example, threshold 1 can be 250GB, threshold 2 can be 40%, and threshold 3 can be 100GB.

[0143] In some embodiments of this application, local data that meets preset condition 2 may specifically include: multimedia data with cloud backup (including video, pictures, music, documents and recordings, etc.) and third-party application data whose usage meets preset condition 3.

[0144] In some embodiments of this application, the usage condition meets the preset condition 3, which may 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 between the last usage time and the current scanning of local data by the electronic device 100 is greater than the threshold 6.

[0145] It is understandable that usage frequency can refer to daily / weekly / monthly / yearly usage frequency. Usage frequency can be an average value statistically obtained over a period of time. In one possible implementation, electronic device 100 can count the number of times each third-party application was used in the most recent week / month / year, and determine the average daily usage frequency corresponding to each third-party application based on this usage count. Similarly, in one possible implementation, electronic device 100 can count the number of times each third-party application was used in the most recent month or year, and determine the average weekly usage frequency corresponding to each third-party application based on this usage count.

[0146] In some embodiments of this application, usage duration may refer to the average of each usage duration counted over a period of time. In still other embodiments of this application, usage duration may refer to the total usage duration counted over a period of time.

[0147] It is understood that thresholds 4, 5, and 6 can be set according to actual needs, and this application does not impose any restrictions on them. For example, threshold 4 can be set to once a month, threshold 5 to once a minute, and threshold 6 to once a month.

[0148] It should be noted that the electronic device 100 can mark local data that meets the preset condition 2 in a variety of ways, and this application does not limit the specific marking method.

[0149] It should be noted that in some other embodiments of this 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 recover the marked data, while the unmarked data is the data to be recovered.

[0150] S103: If preset condition 1 is met, electronic device 100 sends a message to electronic device 200 to notify electronic device 200 that the user has triggered fast data migration.

[0151] After electronic device 100 and electronic device 200 establish a communication connection, electronic device 100 can scan local data and determine whether the user has triggered a fast migration. If the user triggers a fast migration, electronic device 100 can send a message to electronic device 200 to notify it that the user has triggered a fast data migration. Correspondingly, electronic device 200 can receive this message sent by electronic device 100.

[0152] In some embodiments of this application, the message sent by electronic device 100 to electronic device 200 carries indication information. In one possible implementation, the message carrying indication information may specifically include: the content corresponding to a specific field in the message is content 1. This indication information can be used to instruct electronic device 200 to create a folder of data to be recovered.

[0153] It is understood that this specific field can be a header field, a middle field, a footer field, or a field divided in other ways. In the embodiments of this application, this specific field can be understood as a flag bit.

[0154] It is understood that content 1 can be set according to actual needs, and its form can be numbers, letters, characters, strings, etc., which is not limited in this application. For example, content 1 can be 111. Another example is that content 1 can be true.

[0155] It is understood that the electronic device 100 may execute step S102 first and then step S103, or it may execute step S103 first and then step S102, or it may execute steps S102 and S103 simultaneously. This application does not impose specific restrictions on the order of steps S102 and S103.

[0156] S104: Electronic device 200 parses the message sent by electronic device 100 and creates a data folder to be recovered.

[0157] After receiving a message from electronic device 100, electronic device 200 can parse the message and create a data folder to be recovered.

[0158] In some embodiments of this application, after receiving a message sent by electronic device 100, electronic device 200 can parse the message and, if it determines that the content corresponding to a specific field in the message is content 1, create a data folder to be recovered. 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 electronic device 100, 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 to be recovered folder on the desktop of the electronic device 200 so that users can view the application data to be recovered later. On the other hand, the electronic device 200 can create a file directory corresponding to the data to be recovered folder. In this way, the file system of the electronic device 200 will have a file directory corresponding to the data to be recovered folder, so that the data to be recovered can be stored in the file directory later.

[0160] S105: Electronic device 100 detects a user operation that triggers data transmission, and in response to the user operation, electronic device 100 transmits local data to electronic device 200.

[0161] If preset condition 1 is met, electronic device 100 can prompt the user to choose whether to perform a fast migration. If electronic device 100 detects a user operation that triggers data transmission, in response to the user operation, electronic device 100 can transmit local data to electronic device 200. Correspondingly, electronic device 200 can receive the local data transmitted by electronic device 100.

[0162] In some embodiments of this application, the user operation that triggers the transmission of data may specifically include: a user operation performed on the control 104 included in the user interface 1c.

[0163] In some embodiments of this application, electronic device 100 prioritizes transmitting data that can be directly recovered to electronic device 200, and then transmits the data to be recovered to electronic device 200 after the transmission is complete. In one possible implementation, electronic device 200 can directly recover untagged data. In this case, electronic device 100 can prioritize transmitting untagged local data (i.e., local data that does not meet preset condition 2) to electronic device 200, and then transmit tagged local data (i.e., local data that meets preset condition 2) after the transmission is complete.

[0164] In some embodiments of this application, the tagged local data may include multimedia data with cloud backup. In this case, electronic device 100 may not transmit the multimedia data with cloud backup to electronic device 200.

[0165] S106: Electronic device 200 directly recovers the untagged data in the local data and stores the tagged data in the local data to the data folder to be recovered.

[0166] After receiving local data transmitted by electronic device 100, electronic device 200 can create a temporary file and temporarily store the untagged data in the temporary file. In this way, electronic device 200 can directly recover the data stored in the temporary file (i.e., the untagged data). Specifically, electronic device 200 can determine the storage path of the data in the temporary file in electronic device 100 and store the data in the corresponding storage path in electronic device 200.

[0167] After receiving local data transmitted by electronic device 100, electronic device 200 can store the tagged data in the file directory corresponding to the data to be recovered folder. Correspondingly, electronic device 200 can display the application icon (e.g., [example application icon]) of the application to which the tagged data belongs in the data to be recovered folder created on the desktop. Figure 2F (As shown).

[0168] In some embodiments of this application, after the electronic device 200 completes the recovery of the untagged data in the local data, it can display a desktop interface (e.g., user interface 1h). The desktop interface can display folder icons (e.g., folder icon 106) corresponding to the folder containing the data to be recovered.

[0169] It is understood that tagged data may include data corresponding to one or more applications. In this case, after the electronic device 200 completes the recovery of the untagged data in the local data, the folder icons displayed by the electronic device 200 may include application icons corresponding to the one or more applications.

[0170] S107: Electronic device 200 detects a user operation on the data folder to be recovered, and in response to the user operation, electronic device 200 recovers the data in the data folder to be recovered.

[0171] Users can trigger the electronic device 200 to recover data in the data folder to be recovered through touch, voice control, gestures, etc. Specifically, the electronic device 200 can detect user operations on the data folder to be recovered. In response to the user operation, the electronic device 200 can recover the data in the file directory corresponding to the data folder to be recovered. That is, the electronic device 200 can 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 this application, user operations on the data folder to be recovered may specifically include: touch operations on the folder icon corresponding to the data folder to be recovered. Specifically, the user can select the application to be recovered and touch the icon (e.g., application icon 107) of the application in the data folder to be recovered displayed on the electronic device 200. Accordingly, the electronic device 200 can recover the data to be recovered corresponding to that application.

[0173] In some embodiments of this application, user operations on the data folder to be recovered may specifically include: the user instructing the electronic device 200 to recover the data in the data folder to be recovered through a voice assistant or gesture in the electronic device 200.

[0174] The following describes a specific implementation of the aforementioned embodiments.

[0175] Please see Figure 4 , Figure 4 A flowchart illustrating yet another data migration method provided in this application embodiment. This data migration method may include, but is not limited to, the following steps:

[0176] S201: Electronic device 100 and electronic device 200 establish a communication connection.

[0177] It is understood that the specific implementation of step S201 can be referred to the relevant description of step S101, and this application will not repeat it here.

[0178] S202: Electronic device 100 scans local data and determines whether the local data meets preset condition 4.

[0179] After electronic device 100 and electronic device 200 establish a communication connection, they can scan local data and determine whether the local data meets preset condition 4. If electronic device 100 determines that the local data meets preset condition 4, then electronic device 100 can execute step S203. If electronic device 100 determines that the local data does not meet preset condition 4, then electronic device 100 can directly display the scanned data on the display screen for the user to select the data to be migrated (e.g., ...). Figure 2I The user interface shown is 1m.

[0180] Understandably, preset condition 4 can be related to the amount of local data and the third-party application data in the local data.

[0181] In some embodiments of this application, the preset condition 4 is satisfied, which may specifically include any one or more of the following: the amount of local data of electronic device 100 is greater than threshold 1, the proportion of third-party application data in the local data of electronic device 100 is greater than threshold 2, and the amount of third-party application data in the local data of electronic device 100 is greater than threshold 3.

[0182] S203: Electronic device 100 determines whether the user has triggered electronic device 100 to quickly migrate data.

[0183] If the electronic device 100 determines that the local data meets preset condition 4, the electronic device 100 can prompt the user to select whether to perform a fast data migration, thereby determining whether the user has triggered the electronic device 100 to perform a fast data migration. If the user triggers the electronic device 100 to perform a fast data migration, the electronic device 100 can execute steps S204 and S206. If the user does not trigger the electronic device 100 to perform a fast data migration, the electronic device 100 can directly display the scanned data on the display screen for the user to select the data to be migrated (e.g., ...). Figure 2I The user interface shown is 1m.

[0184] It is understood that the electronic device 100 may prompt the user to choose whether to quickly migrate data by displaying a prompt box on the screen, by playing a prompt voice through the speaker, or by vibrating. This application does not limit the specific method of prompting.

[0185] Electronic device 100 determines whether the user has triggered the electronic device 100 to quickly migrate data. Specifically, this can refer to whether the electronic device 100 has detected the user operation that triggered the electronic device 100 to quickly migrate data.

[0186] S204: Electronic device 100 sends a message to electronic device 200 to notify electronic device 200 that the user has triggered a fast data migration.

[0187] If electronic device 100 determines that the user has triggered the fast data migration of electronic device 100, electronic device 100 can send a message to electronic device 200 to notify electronic device 200 that the user has triggered the fast data migration. For the specific implementation method, please refer to the relevant description of step S103, which will not be repeated here.

[0188] Correspondingly, electronic device 200 can receive messages sent by electronic device 100.

[0189] S205: Electronic device 200 parses the message sent by electronic device 100 and creates a data folder to be recovered.

[0190] After receiving the message sent by the electronic device 100, the electronic device 200 can parse the message and then create a data folder to be recovered. For details, please refer to the relevant description of step S104. This application will not repeat the details here.

[0191] S206: Electronic device 100 marks local data that meets preset condition 2.

[0192] It is understood that the specific implementation of step S206 can be referred to the relevant description of step S102, and this application will not repeat it here.

[0193] S207: Electronic device 100 detects a user operation that triggers data transmission and, in response to the user operation, transmits local data to electronic device 200.

[0194] It is understood that the specific implementation of step S207 can be referred to the relevant description of step S105, and this application will not repeat it here.

[0195] S208: Electronic device 200 creates a temporary file, stores the untagged data in the received local data in the temporary file, restores the untagged data in the temporary file, and stores the tagged data in the local data in the data to be restored folder.

[0196] It is understood that the specific implementation of step S208 can be referred to the relevant description of step S106, and this application will not repeat it here.

[0197] S209: Electronic device 200 starts timer T1. Timer T1 is used to trigger electronic device 200 to prompt the user to clear the data in the data folder to be recovered.

[0198] After the electronic device 200 has completely recovered all the untagged data in the temporary files, it can start timer T1. The electronic device 200 can use timer T1 to prompt the user to clear the data in the data folder to be recovered.

[0199] S210: Electronic device 200 detects a user operation that triggers cloud synchronization and, in response to the user operation, performs cloud synchronization.

[0200] After the electronic device 200 has completely restored all the untagged data in the temporary files, it can prompt the user to choose whether to perform cloud synchronization.

[0201] It is understood that the electronic device 200 may prompt the user to choose whether to perform cloud synchronization by displaying a prompt box on the screen, by playing a prompt voice through the speaker, or by vibrating. This application does not limit the specific method of prompting.

[0202] For example, such as Figure 2G As shown, after the electronic device 200 has completely restored all the unmarked data in the temporary file, it can display a prompt box 108 on the screen to prompt the user to choose whether to perform cloud synchronization.

[0203] S211: When the timer T1 reaches the preset duration, the electronic device 200 prompts the user to choose whether to clear the data in the data folder to be recovered.

[0204] In some embodiments of this application, after the electronic device 200 starts the timer T1, it can prompt the user to choose whether to clear the data in the data folder to be recovered (i.e., the data to be recovered) when the timer duration reaches a preset duration.

[0205] In some embodiments of this application, after the electronic device 200 starts timer T1, if the electronic device 200 provides the above prompts K times (i.e., prompts K times whether to clear the data to be recovered), and the user consistently chooses not to clear the data to be recovered after providing the above prompts K times, then the electronic device 200 can turn off timer T1 and stop automatically providing the above prompts. Here, K is a positive integer. It is understood that the specific value of K can be set according to actual needs, and this application does not impose any restrictions on it.

[0206] In one possible implementation, the interval between the K prompts made by the electronic device 200 can be the same. For example, the electronic device 200 prompts whether to clear the data to be recovered once every preset time interval, for a total of K prompts. Specifically, after the electronic device 200 starts timer T1, it makes the first prompt when its timing reaches the preset time. If the user chooses not to clear the data to be recovered, the electronic device 200 can reset the timing of timer T1 to zero and restart the timing. When its timing reaches the preset time again (or reaches twice the preset time without resetting), it makes the second prompt. If the user continues to choose not to clear the data to be recovered, the electronic device 200 makes the above prompts K times and then closes timer T1, that is, timer T1 exits operation after making K prompts.

[0207] In another possible implementation, the interval between the K prompts given by the electronic device 200 can be different. For example, the more times the user chooses not to clear the data to be recovered, the longer the interval between the prompts given by the electronic device 200. Taking K=3 as an example, after the electronic device 200 starts timer T1, it will give the first prompt when the timer reaches the preset duration. If the user chooses not to clear the data to be recovered, the electronic device 200 can reset the timer T1 to zero and restart the timer. When the timer reaches twice the preset duration (or three times the preset duration without resetting), it will give the second prompt. If the user still chooses not to clear the data to be recovered, the electronic device 200 can reset the timer T1 to zero and restart the timer. When the timer reaches three times the preset duration (or six times the preset duration without resetting), it will give the third prompt. If the user still chooses not to clear the data to be recovered, the electronic device 200 can turn off timer T1, and the electronic device 200 will no longer automatically give the above prompts.

[0208] In some embodiments of this application, if the electronic device 200 detects a user operation that triggers the deletion of data in the data folder to be recovered, in response to the user operation, the electronic device 200 can further prompt the user whether to delete all data in the data folder to be recovered or to delete only some data in the data folder to be recovered. In this case, if the user chooses to delete only some data in the data folder to be recovered, the electronic device 200 can display a corresponding interface for the user to select the data to be recovered that needs to be deleted (see reference here). Figure 2I The user interface shown is 1m. In one possible implementation, the data in the data folder to be recovered may include data corresponding to one or more applications. In this case, the user can select the application data to be cleared from the one or more applications. Specifically, the electronic device 200 can 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 user operation.

[0209] It should be noted that in some embodiments of this application, after the electronic device 200 starts timer T1, it will make the above prompt at least once, and the user will choose to clear the data to be recovered at least once. In this case, if the data in the data folder to be recovered is not completely cleared and the number of times the above prompt is made is less than K, the electronic device 200 can continue to prompt whether to clear the data to be recovered according to the above rules. However, if the data in the data folder to be recovered has been completely cleared, or the number of times the above prompt is made reaches K, the electronic device 200 can turn off timer T1 and will no longer automatically make the above prompt.

[0210] S212: Electronic device 200 detects a user operation on the data folder to be recovered, and in response to the user operation, recovers the data in the data folder to be recovered.

[0211] It is understood that the specific implementation of step S212 can be referred to the relevant description of step S107, and this application will not repeat it here.

[0212] It should be noted that steps S209-S211 are optional. In some embodiments of this application, the electronic device 200 may execute step S210, but not steps S209 and S211. In still other embodiments of this application, the electronic device 200 may execute steps S209 and S210, but not step S211. In yet still other embodiments of this application, the electronic device 200 may execute steps S209 and S211, but not step S210.

[0213] The software structure of the apparatus involved in the embodiments of this application is described below.

[0214] The software system of electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. Among these, a layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. This application uses a layered architecture Android system as an example, combined with... Figure 5 The software structure of the electronic device is illustrated by example. The software structures of both the electronic device 100 and the electronic device 200 involved in this application can be referred to... Figure 5 The software structure of the electronic device shown.

[0215] Figure 5 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application.

[0216] like Figure 5 As shown, the software framework of an electronic device may 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, the application layer can include system applications and third-party applications. System applications are a series of core applications that come with the Android system. For example, system applications may include applications such as Calendar, Music, Gallery, Bluetooth, WLAN, Call, Video, and SMS. Third-party applications are applications that users can choose to install. In some embodiments of this application, users can download and install third-party applications from app stores.

[0218] In some embodiments of this application, the application layer may further include a device switching application and a system desktop. The device switching application may include a backup module, a packaging module, an unpacking module, a communication software module, a data detection module, a data filtering and marking module, a transmission channel management module, a third-party application installation and parsing module, and an application data recovery module. The system desktop may include an installation display module and a data management module.

[0219] The backup module is used to back up data in electronic devices to obtain backup data. The packaging module is used to package the backup data. The unpacking module is used to unpack the received data. The communication software module is used to communicate with other devices, specifically to determine the communication rate (i.e., the data transmission rate) and the communication interface. The communication software module may include a protocol selection module and a communication interface. The protocol selection module is used to determine the transmission rate (e.g., 80 megabytes per second, 160 megabytes per second), i.e., to determine the size of the transmission channel. The communication interface may include a 2.4G / 5G transmission interface, i.e., a transmission interface supporting Wi-Fi signals in the 2.4 GHz and 5 GHz frequency bands. The data detection module is used to detect the amount of local data and its composition (e.g., the proportion of system application data, third-party application data, and multimedia data in the local data). The data filtering and marking module is used to filter and mark third-party application data and multimedia data in the local data that meet certain conditions (e.g., preset condition 2). The transmission channel management module is responsible for managing the transmission channels corresponding to unmarked data and marked data. The third-party application installation and parsing module is used to handle the installation of third-party applications. The application data recovery module manages temporary files and folders of data to be recovered created during data migration. The installation display module displays the folders of data to be recovered on the desktop. The data management module controls timers and is responsible for responding to user actions to recover data in the folders of data to be recovered.

[0220] It should be noted that the data detection module, data filtering and marking module, transmission channel management module, installation display module, and data management module are newly added modules in the electronic device. The third-party application installation parsing module and application data recovery module are modules with newly added interfaces in the electronic device. Specifically, the third-party application installation parsing module adds a monitoring and parsing interface for the application to be recovered (i.e., the application to which the data to be recovered belongs), in order to enable delayed installation of the application to be recovered. The application data recovery module adds a monitoring and parsing interface for the application to be recovered, in order to enable delayed recovery of the application to be recovered.

[0221] The application framework layer provides an Application Programming Interface (API) and programming framework for applications in the application layer. The application framework layer includes predefined functions. It may also include a series of system services. System services are modular components focused on specific functionalities. The functionality provided by the application framework API allows communication with these system services to access the underlying hardware.

[0222] In some embodiments of this application, such as Figure 5As shown, the application framework layer can also include system services, a scene recognition module, and a storage access interface. System services can include a Backup Manager Service (BMS), a Package Manager Service (PMS), a Nearby module, and a Media Provider (MP). The BMS is used to orchestrate and initiate backup and restore operations. Specifically, electronic devices can access this service through the BackupManager API. During a backup operation, the service queries the applications on the electronic device to obtain backup data and then passes it to the backup module, which archives the data. During a restore operation, the BMS retrieves the backup data and restores it to the device. The PMS manages all package information on the electronic device, including application installation, uninstallation, updates, and parsing of AndroidManifest.xml. The Nearby module is used to transmit data to be restored, isolating the transmission logic of data that can be directly restored during the import phase. The MP module manages the media database, specifically managing the identification and restoration of multimedia data (including restoring multimedia data). The scene recognition module can be used to manage timers by calling clock resources and to identify delayed recovery scenarios, prompting the user whether to clear the data to be recovered. The storage access interface is used to enable the data detection module to access the underlying storage-related modules.

[0223] It should be noted that BMS, PMS, the interconnection module, the MP module, and the scene recognition module are modules with newly added interfaces in the electronic device. Specifically, the BMS adds a processing interface for delayed recovery of the application to be recovered. The PMS adds a processing interface for delayed installation of the application to be recovered. The interconnection module adds a transmission interface for the data to be recovered, used to transmit the data to be recovered, to isolate the transmission logic of data that can be directly recovered during the import stage. This transmission interface can be a Software Development Kit (SDK) interface. The MP module adds a processing interface for multimedia data with cloud backup. The scene recognition module adds a management interface for delayed recovery scenarios.

[0224] In some embodiments of this application, the scene recognition module may be a module in a system service.

[0225] The application framework layer may also include content providers, window managers, resource managers, phone managers, notification managers, and view systems. Window managers manage window programs. They can obtain screen size, determine the presence of a status bar, lock the screen, and capture screenshots. Content providers store and retrieve data, making this data accessible to applications. This data may include videos, images, audio, made and received calls, browsing history and bookmarks, phone books, etc. View systems include visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon may include views for displaying text and views for displaying images. Phone managers provide communication functions for electronic devices, such as managing call status (including connection, hang-up, etc.). Resource managers provide applications with various resources, such as localized strings, icons, images, layout files, video files, etc. Notification managers allow applications to display notification information in the status bar. They can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, notification managers are used to notify of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, causing electronic devices to vibrate, and flashing indicator lights.

[0226] System libraries can include multiple functional modules. Examples include: Surface Manager, Media Libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL). The specific meanings and functions of these modules can be found in relevant technical documentation and will not be elaborated upon here.

[0227] The runtime is responsible for system scheduling and management. The runtime includes core libraries and virtual machines.

[0228] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and upper-level software, its purpose being to abstract hardware. The HAL is an abstract interface for device kernel drivers, providing application programming interfaces (APIs) for accessing the underlying device to higher-level Java API frameworks. The HAL can provide a standard interface that exposes device hardware functionality to higher-level Java API frameworks. The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component. When the system framework layer API requests access to the portable device's hardware, the operating system loads the library module for that hardware component.

[0229] The kernel layer is the layer between hardware and software. It is the foundation of the Android system. The kernel layer is responsible for hardware drivers, networking, power, system security, and memory management. As an intermediary between hardware and software, the kernel layer's role is to pass application requests to the hardware. The kernel layer can include display drivers, camera drivers, audio drivers, sensor drivers, communication drivers, and storage drivers. Specifically, communication drivers pass requests from upper-layer modules (e.g., applications, communication software modules) to communication hardware modules. Storage drivers pass requests from upper-layer modules to the memory. Communication drivers can include Wi-Fi drivers, Bluetooth drivers, etc. Storage drivers can include flash memory drivers.

[0230] It should be noted that the application provided Figure 5 The illustrated software architecture diagram of the electronic device is merely an example and does not limit the specific module divisions within different layers of the Android system. For details, please refer to the descriptions of the Android system software architecture in conventional technical documents. Furthermore, the display method provided in this application can also be implemented on other operating systems, which will not be listed here.

[0231] It is worth noting that the usage of modules in the software structure of electronic devices differs when they are used as old and new devices during data migration. For details, please refer to [reference needed]. Figure 6 The software structures of electronic devices 100 and 200 are shown. Electronic device 100 can be understood as an electronic device used as a legacy device during the data migration process, while electronic device 200 can be understood as an electronic device used as a new device during the data migration process.

[0232] The following is based on Figure 5 The software structure of the electronic device shown, combined with Figure 6 From the perspective of software and hardware interaction, a specific implementation of the aforementioned embodiment is introduced.

[0233] like Figure 6As shown, the application layer in electronic device 100 may include a switching application. Specifically, the switching application in electronic device 100 may include a backup module, a packaging module, a communication software module, a data detection module, a data filtering and marking module, and a transmission channel management module. The application framework layer in electronic device 100 may include system services such as BMS and interconnection modules, as well as storage access interfaces. The hardware in electronic device 100 may include a communication hardware module and a memory. The communication hardware module is a hardware module used for communicating with other devices. The communication hardware module may include a mobile communication module and a wireless communication module. The memory can be used to store various data.

[0234] like Figure 6 As shown, the application layer in electronic device 200 may include a switching application and a system desktop. The switching application in 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 electronic device 200 may include an installation and display module and a data management module. The application framework layer in electronic device 200 may include system services such as BMS, PMS, MP, and interconnection modules, as well as a scene recognition module. The hardware in electronic device 200 may include a communication hardware module and a memory.

[0235] Electronic devices 100 and 200 establish a communication connection through their respective communication software and hardware modules. After establishing this connection, electronic device 100 can scan local data. Specifically, for example... Figure 6 In (1), the data detection module in the electronic device 100 can access the storage driver through the storage access interface, and further access the memory, thereby detecting whether the local data stored in the memory meets the 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 can prompt the user to choose whether to quickly migrate the data (i.e., perform a quick migration).

[0236] If electronic device 100 detects a user operation that triggers rapid data migration, in response to the user operation, on the one hand, electronic device 100 can send a message to electronic device 200 through the communication software module and the communication hardware module to notify electronic device 200 that rapid data migration is required; on the other hand, if... Figure 6 In (2), the data detection module in the electronic device 100 can notify the data filtering and marking module in the electronic device 100 to filter and mark the data in the local data that meets the preset condition 2.

[0237] Electronic device 200 can receive messages sent by electronic device 100 through its communication software and hardware modules, parse the messages, and then create a folder for data to be recovered. Correspondingly, the installation display module in electronic device 200 can draw the corresponding screen for the folder for data to be recovered, so that it can be displayed on the screen later. Specifically, the installation display module in electronic device 200 can draw the folder icon corresponding to the folder for data to be recovered.

[0238] After marking the data in the local data that meets preset condition 2, electronic device 100 can determine the data that needs to be transmitted to electronic device 200. For example... Figure 6 In (3), the backup module in electronic device 100 can call the BMS to back up this part of the data, obtain the backup data, and then transmit the backup data to the packaging module in electronic device 100. The packaging module in electronic device 100 can package the backup data. Specifically, during the packaging process, the packaging module in electronic device 100 will assign a code identifier to each file containing the backup data. This code identifier can be used to identify file attributes and storage paths, etc. Figure 6 In (4), the packetization module in electronic device 100 can transmit the packetized data to the communication software module in electronic device 100. For example... Figure 6 In (4), the communication software module in electronic device 100 can send the packaged untagged data to the interconnect module in electronic device 100. The interconnect module in electronic device 100 then accesses the communication hardware module through the communication driver, and finally sends the packaged untagged data to the communication hardware module in electronic device 200 through the communication hardware module. Similarly, such as Figure 6 In (4), the communication software module in the electronic device 100 can send the packaged and tagged 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 and tagged data to the communication hardware module in the electronic device 200 through the communication hardware module.

[0239] The communication hardware module in electronic device 200 can receive packaged data transmitted from the communication hardware module in electronic device 100 and create temporary files. This packaged data can include both tagged and untagged data. For example... Figure 6In (4), the electronic device 200 can transmit the packaged tagged data to the communication software module via the communication driver, interconnection module, and transmission channel management module, and then transmit it 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 via the communication driver and interconnection module, and then transmit it to the unpacking module in the electronic device 200. After receiving the packaged data (including the packaged untagged data and the packaged tagged data), the unpacking module in the electronic device 200 can unpack the data to obtain the unpacked data. It is understood that the unpacked data can include tagged data and untagged data. In some embodiments of this 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 this application, such as Figure 6 In (5), 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 this application, the switching application in the electronic device 200 can notify the BMS in the electronic device 200 to directly restore the unpacked, untagged system application data.

[0242] Electronic device 200 can temporarily store untagged third-party application data from the unpacked data in a temporary file, while storing tagged data in the data to be recovered folder, specifically in the file directory corresponding to the data to be recovered folder. For example... Figure 6 In (6), after the unpacking module in the electronic device 200 obtains the unpacked data, it can use the BMS and storage driver to store the unmarked data in the temporary file corresponding to the file directory in the memory, and store the marked data in the unpacked data in the file directory corresponding to the data to be recovered folder in the memory.

[0243] like Figure 6 In step (7), 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. Furthermore, as... Figure 6 In (8), the third-party application installation parsing module in electronic device 200 can notify the PMS in electronic device 200 to create the corresponding application file directory. For example Figure 6In step (8), after the PMS in the electronic device 200 creates the corresponding application file directory, it can use an interface callback to send the installation result (e.g., whether the application file directory was created successfully / failed) back to the BMS in the electronic device 200. Figure 6 In step (9), after the third-party application installation parsing module in electronic device 200 notifies PMS to create the corresponding application file directory, it can notify the application data recovery module in electronic device 200 to recover the third-party application data in the temporary files. Specifically, for example... Figure 6 In (9), the application data recovery module in electronic device 200 can notify the BMS in electronic device 200 to recover the third-party application data in the temporary file. If the installation result received by the BMS in electronic device 200 from the PMS indicates successful installation, the BMS in 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 in the corresponding application file directory. Specifically, when processing the third-party application data in the temporary file, the BMS can access the memory through the storage driver ( Figure 6 (Not shown in the diagram, but please refer to the relevant description above), thereby enabling the movement of the storage location corresponding to the third-party application data. In some embodiments of this 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 by using the code identifier during packaging.

[0244] like Figure 6 In step (10), after the electronic device 200 has fully restored all the data in the temporary file (e.g., 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 (e.g., timer T1) through the scene recognition module in the electronic device 200. Figure 6 In (11), when 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 restored.

[0245] like Figure 6 In (12), after the electronic device 200 has fully restored the system application data and the third-party application data in the temporary files, the electronic device 200 can notify the installation display module to draw the icon corresponding to the data folder to be restored. The installation display module can also determine the application to which the data in the data folder to be restored belongs, i.e. the application to be restored, and draw the application icon corresponding to the application to be restored, so that the user can trigger the electronic device 200 to restore the corresponding application data by touching the corresponding application icon.

[0246] In some embodiments of this application, electronic device 100 determines that the data to be transmitted to electronic device 200 includes data that can be directly recovered during the import phase, as well as data to be recovered. In one possible implementation, the data to be recovered may include tagged third-party application data and tagged multimedia data. In yet another possible implementation, the data to be recovered may include tagged third-party application data, but not tagged multimedia data.

[0247] The hardware structure of the device involved in the embodiments of this application is described below.

[0248] Please see Figure 7 , Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The hardware structures of the electronic devices 100 and 200 involved in this application can be referred to... Figure 7 The software structure of the electronic device shown.

[0249] like Figure 7 As shown, the electronic device may include: a processor, an external memory interface, internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, antenna 1, antenna 2, a mobile communication module, a wireless communication module, a sensor module, buttons, a motor, an indicator, a camera, a display screen, and a Subscriber Identity Module (SIM) card slot, etc. The audio module may include a speaker, a receiver, a microphone, a headphone jack, etc., and the sensor module may include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer, a proximity 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 is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. It is understood that the illustrated components can be implemented in hardware, software, or a combination of both. In some embodiments of this application, the electronic device may include more components than illustrated. For example, the electronic device may include other types of sensors. In still other embodiments of this application, the electronic device may include fewer components than illustrated, or combine some components, or split some components, or arrange different components. The interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device.

[0251] A processor may include one or more processing units, such as 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). The processor may also include memory for storing instructions and data.

[0252] Electronic devices achieve display functions through GPUs, displays, and application processors.

[0253] A GPU is a microprocessor for image processing, connected to a display screen and an application processor. A GPU performs mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information. A display screen is used to display images, videos, etc. In some embodiments, an electronic device may include one or more displays screens.

[0254] A camera is used to capture still images or videos. An ISP (Image Signal Processor) processes the data fed back from the camera. Light is transmitted through the lens to the camera's photosensitive element, where the light signal is converted into an electrical signal. The camera's photosensitive element then transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. Electronic devices may include one or more cameras.

[0255] Internal memory may include one or more RAMs and one or more non-volatile memory (NVMs). RAMs can be directly read and written by the processor and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. NVMs can also store executable programs and user and application data, and can be pre-loaded into RAMs for direct processor access.

[0256] In this embodiment, the code implementing the memory expansion method described in this embodiment can be stored in non-volatile memory. When running a camera application, the electronic device can load the executable code stored in the non-volatile memory into random access memory.

[0257] External memory interfaces can be used to connect to external non-volatile memory, thereby expanding the storage capacity of electronic devices.

[0258] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.

[0259] The audio module converts digital audio information into analog audio signals for output, and also converts analog audio input into digital audio signals. The speaker, also called a "horn," converts audio electrical signals into sound signals. The receiver, also called a "handset," converts audio electrical signals into sound signals. The microphone, also called a "microphone" or "voice transducer," converts sound signals into electrical signals. The headphone jack is used to connect wired headphones.

[0260] In this embodiment of the application, when the electronic device has the speech-to-text function enabled, it can use the microphone to collect sound signals and convert the sound signals into corresponding text.

[0261] A touch sensor, also known as a "touch device," is a component of an electronic device. Touch sensors can be mounted on a display screen, and the touch sensor and display screen together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. It then transmits the detected touch operation to an 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 embodiments, the touch sensor may also be located on the surface of the electronic device, in a different position than the display screen.

[0262] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this 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 a first message sent by the second device and creates a first folder; the first message is used to notify the first device that it will not restore the first type of data during this data migration process; The first device receives the data to be migrated transmitted by the 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, wherein 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; The first device has completed the recovery of the second type of data in the data to be migrated and displays the first interface; the first interface is a desktop interface including a first icon, the first icon is the icon corresponding to the first folder, and the first folder stores the first type of data in the data to be migrated; When the first device displays the first interface, it does not restore the first type of data in the data to be migrated.

2. The method as described in 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, and 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, which is the application icon corresponding to the first application; The first device detects an operation on the second icon, and 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 as described in claim 1 or 2, 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 stores the first type of data, including the data to be migrated, into the first folder.

4. The method as described in claim 1 or 2, characterized in that, After the first device has completed the recovery of the second type of data in the data to be migrated, the method further includes: The first device starts the first timer; After the first device displays the first interface, the method further includes: When the duration of the first timer reaches the first preset duration, the first device displays the 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 resets the duration of the first timer to zero and repeats the step of displaying the third interface when the duration of the first timer reaches a first preset duration.

5. The method as described in claim 4, characterized in that, The method further includes: When the first device performs the step of displaying the third interface a total of K times when the timing duration of the first timer reaches the first preset duration, the first device stops the first timer; where K is a positive integer.

6. The method according to any one of claims 1, 2, and 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 the second preset condition. Specifically, the third-party application data whose usage meets the second preset condition includes any one or more of the following: data corresponding to third-party applications whose usage frequency is less than the first frequency; and data corresponding to third-party applications whose usage duration is less than the first duration.

7. The method according to any one of claims 1, 2, and 5, characterized in that, After the first device displays the first interface, the method further includes: The first device displays the fourth interface; If the first device detects a third operation on the fourth interface, in response to the third operation, and if multimedia data from the local data of the second device exists in the cloud-side device, the first device receives the multimedia data from the local data of the second device transmitted by the cloud-side device.

8. The method according to any one of claims 1, 2, and 5, 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 tags in the data to be migrated is the first type of data, while the data without tags 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; If the fourth preset condition is met, the second device displays a quick migration confirmation control; In response to the operation of the fast migration determination control, the second device sends a first message to the first device to filter the first type of data and display the fifth interface; the first message is used to notify the first device not to restore the storage location of the first type of data in the first device to the storage location of the first type of data in the second device during this data migration process; 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. The first device is used to receive the data to be migrated, and to display a first interface when the second type of data in the data to be migrated has been restored; the first interface is a desktop interface including a first icon, the first icon being the icon corresponding to a first folder, the first folder storing the first type of data in the data to be migrated; when the first device displays the first interface, the first type of data in the data to be migrated has not been restored.

10. The method as described in claim 9, characterized in that, The second device meets the fourth preset condition, specifically including any one or more of the following: the amount of local data of the second device is greater than the first amount of data; the proportion of third-party application data in the local data of the second device is greater than the first ratio; the amount of third-party application data in the local data of the second device is greater than the second amount of data.

11. The method as described in claim 9 or 10, 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 the second preset condition. Specifically, the third-party application data whose usage meets the second preset condition includes any one or more of the following: data corresponding to third-party applications whose usage frequency is less than the first frequency; and data corresponding to third-party applications whose usage duration is less than the first duration.

12. The method as described in claim 11, characterized in that, If the multimedia data with cloud backup is not present in the local data of the second device, the data to be migrated includes all of the first type of data; if the multimedia data with cloud backup is present in the local data of the second device, the data to be migrated includes a portion of the first type of data, and the portion 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, 10, and 12, characterized in that, The second device filters the first type of data and displays the fifth interface, specifically including: The second device marks the first type of data; The second device displays the fifth interface, which includes a first display area and a second display area; the first display area is used to display relevant information of the first type of data, and the second display area is used to display relevant information of the second type of data.

14. An electronic device, characterized in that, 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 processor invokes the computer instructions to perform the method of any one of claims 1-8 or any one of claims 9-13.

15. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-8 or 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

  • Data migration method and electronic equipment

    CN116089358A