Data migration method, readable storage medium and electronic equipment

By obtaining and installing the second version of the application compatible with the operating system on the target device, and quickly compiling hot code during the installation process, the operation problems caused by incompatible application versions of the target device are solved, and the operation performance of the application is improved and user experience.

CN119441138APending Publication Date: 2025-02-14HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310957487.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the process of a user migrating an application from the source device to the destination device, if the destination device is incompatible with the type or version of the application, it will cause the application to fail to run normally or perform poorly, affecting the user experience.

Method used

Obtain and install the second version of the application compatible with the operating system by receiving the application version in the migration data and when the application version is incompatible with the operating system of the destination device. At the same time, during the installation process, the hotspot code indicated by the hotspot code configuration information is compiled through the fast compilation mode to improve the running speed of the application.

Benefits of technology

Avoid running problems caused by the application version not being supported by the operating system of the target device, improve the operation performance and user experience of the application, and shorten the total data migration time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441138A_ABST
    Figure CN119441138A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a data migration method, a readable storage medium and electronic equipment. When the target device receives the first version of the target application sent by the source device, if the first version of the target application is incompatible with the operating system of the target device, the target device does not install the first version of the target application, but obtains and installs the second version of the target application compatible with the operating system of the target device from the server. In this way, the situation that the first version of the target application cannot run or is poor in running performance after being installed on the target equipment can be avoided, and user experience can be improved. Moreover, the target equipment can also compile the target application and / or the hotspot code in the service pack of the target application through a rapid compiling mode when the target application is installed according to the hotspot code configuration file of the target application sent by the source equipment, so that the running speed of the target application in the target equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data migration method, a readable storage medium and an electronic device. Background Art

[0002] When a user migrates an application from a source device (i.e., an electronic device that sends the application) to a destination device (i.e., an electronic device that receives the application), the application is usually copied directly from the source device to the destination device. If the destination device is not compatible with the type or version of a certain application, the destination device will not be able to run the application normally, such as being unable to start the application or having poor performance, which affects the user experience. Summary of the invention

[0003] In view of this, the present application provides a data migration method, a readable storage medium and an electronic device.

[0004] In a first aspect, the present application provides a data migration method, the method comprising: a first electronic device receives migration data sent by a second electronic device, the migration data including a first version of a first application; when the first version of the first application is incompatible with an operating system of the first electronic device, the first electronic device obtains a second version of the first application, wherein the second version of the first application is compatible with the operating system of the first electronic device; and the first electronic device installs the second version of the first application.

[0005] In the method, the first electronic device can obtain and install the second version of the first application when the received first version of the first application is incompatible with the operating system of the first electronic device. In this way, it can be avoided that the first application cannot run normally because the first version of the first application is not supported by the operating system of the first electronic device, which is conducive to improving the application experience.

[0006] In a possible implementation of the first aspect, the method further includes: when the first version of the first application is compatible with an operating system of the first electronic device, the first electronic device installs the first version of the first application.

[0007] In a possible implementation of the first aspect above, the above migration data also includes first hotspot code configuration information corresponding to the first application, and the first hotspot code configuration information is used to indicate the hotspot code in the first application; and the above method also includes: the first electronic device compiles the hotspot code indicated by the first hotspot code configuration information through a quick compilation mode during the process of installing the second version of the first application or the process of installing the first version of the first application.

[0008] In this method, during the process of installing the first version or the second version of the first application, the first electronic device can also compile the hotspot code indicated by the first hotspot code configuration information through the quick compilation mode, so that when the user uses the function corresponding to the part of the hotspot code, the first application can run faster.

[0009] In a possible implementation of the first aspect above, the above migration data also includes a patch package corresponding to the first application and second hotspot code configuration information corresponding to the patch package, and the second hotspot code configuration information is used to indicate the hotspot code in the patch package; and the above method also includes: the first electronic device compiles the hotspot code indicated by the second hotspot code configuration information through a quick compilation mode during the process of installing the second version of the first application or the process of installing the first version of the first application.

[0010] In this method, during the process of installing the first version or the second version of the first application, the first electronic device can also compile the hotspot code indicated by the second hotspot code configuration information through the quick compilation mode, so that when the user uses the function corresponding to this part of the hotspot code, the first application can run faster.

[0011] In a possible implementation of the first aspect, the method further includes: the first electronic device installing the patch package when the first electronic device is in an idle state.

[0012] In this implementation, the first electronic device can install the patch package when it is in an idle state, such as when the first electronic device is not used by the user, the display screen of the first electronic device is off, the first electronic device is in a charging state, etc., rather than directly installing the patch package during the installation of the first application. In this way, the total time of data migration can be shortened.

[0013] In a possible implementation of the first aspect, the first application is an application program in the second electronic device that is used by the user at a frequency greater than a preset frequency.

[0014] In this method, when the first application is an application program that is used by users of the second electronic device at a frequency greater than a preset frequency, the first electronic device will compile the hotspot code indicated by the first hotspot code configuration information and the second hotspot code configuration information through a quick compilation method during the installation process, which is beneficial to shorten the total duration of data migration.

[0015] In a possible implementation of the first aspect, the first version of the first application is a 32-bit application, and the second version of the first application is a 64-bit application.

[0016] In this implementation, when the operating system of the first electronic device is a 64-bit operating system, the first version of the first application may be a 32-bit application, and the second version of the first application is a 64-bit application.

[0017] In a possible implementation of the first aspect above, the obtaining of the second version of the first application includes: the first electronic device displays a first interface, the first interface includes information prompting a user to confirm updating of the first version of the first application; the first electronic device obtains the second version of the first application in response to the user confirming updating of the first version of the first application.

[0018] In a possible implementation of the first aspect above, the hotspot code indicated by the first hotspot code configuration information is compiled through the fast compilation mode, including: the first electronic device compiles the hotspot code indicated by the first hotspot code configuration information through the fast compilation mode when the first hotspot code configuration information is compatible with the operating system of the first electronic device.

[0019] In a second aspect, the present application provides a data migration method, which includes: a second electronic device and a first electronic device establish a data migration connection; the second electronic device sends a first application and first hotspot code configuration information corresponding to the first application to the first electronic device; wherein the first hotspot code configuration information is used to indicate the hotspot code in the first application, and to instruct the first electronic device to compile the hotspot code indicated by the first hotspot code configuration information through a quick compilation mode during the installation of the first application.

[0020] In this method, when the second electronic device sends migration data to the first electronic device, it can send the first application and the first hotspot code configuration information corresponding to the first application to instruct the first electronic device to compile the hotspot code indicated by the first hotspot code configuration information in a fast compilation mode during the installation of the first application. In this way, the running speed of the first application after installation in the first electronic device can be improved.

[0021] In a possible implementation of the second aspect, the method further includes: the second electronic device sends a patch package of the first application to the first electronic device, where the patch package is used to instruct the first electronic device to install the patch package when idle.

[0022] In a possible implementation of the second aspect above, the method also includes: the second electronic device sends second hotspot code configuration information to the first electronic device, wherein the second hotspot code configuration information is used to indicate the hotspot code in the patch package, and to instruct the second electronic device to compile the hotspot code indicated by the second hotspot code configuration information through a quick compilation mode during the installation of the first application.

[0023] In a possible implementation of the second aspect above, the second electronic device sends the first application and the first hotspot code configuration information corresponding to the first application to the first electronic device, including: when the first hotspot code configuration information is compatible with the operating system of the second electronic device, the second electronic device sends the first application and the first hotspot code configuration information corresponding to the first application to the first electronic device.

[0024] In the method, when the first hotspot code configuration information is compatible with the operating system of the second electronic device, the second electronic device sends the first hotspot code configuration information corresponding to the first application to the first electronic device. In this way, when the first hotspot code configuration information is incompatible with the operating system of the second electronic device, the first hotspot code configuration information corresponding to the first application may not be sent to the first electronic device. In this way, the amount of data transmitted during data migration can be reduced.

[0025] In a possible implementation of the second aspect, the first application is an application program in the second electronic device that is used by the user at a frequency greater than a preset frequency.

[0026] In this method, the second electronic device sends the first hotspot code configuration information corresponding to the first application to the first electronic device only when the first application is an application program whose user usage frequency in the second electronic device is greater than a preset frequency (i.e., the first application is a hotspot application). In this way, the amount of data transmitted during the data migration process can be reduced and the total duration of the data migration can be shortened.

[0027] In a third aspect, the present application provides a data migration method, which includes: a second electronic device is used to send migration data to a first electronic device, the migration data including a first version of a first application; the first electronic device is used to obtain and install a second version of the first application when the first version of the first application is incompatible with an operating system of the first electronic device, wherein the second version of the first application is compatible with the operating system of the first electronic device.

[0028] In a possible implementation of the third aspect, the first electronic device is further used to: install the first version of the first application when the first version of the first application is compatible with the operating system of the first electronic device.

[0029] In a possible implementation of the third aspect above, the above-mentioned migration data also includes first hotspot code configuration information corresponding to the first application, and the first hotspot code configuration information is used to indicate the hotspot code in the first application; and the first electronic device is also used to: during the process of installing the second version of the first application or the process of installing the first version of the first application, the first electronic device compiles the hotspot code indicated by the first hotspot code configuration information through a quick compilation mode.

[0030] In a possible implementation of the third aspect above, the above migration data also includes a patch package corresponding to the first application and second hotspot code configuration information corresponding to the patch package, and the second hotspot code configuration information is used to indicate the hotspot code in the patch package; and the first electronic device is also used to: during the process of installing the second version of the first application or the process of installing the first version of the first application, the first electronic device compiles the hotspot code indicated by the second hotspot code configuration information through a quick compilation mode.

[0031] In a fourth aspect, the present application provides a readable storage medium, which includes instructions. When the instructions are executed by a device, the device implements the data migration method provided by the first aspect and any possible implementation of the first aspect, or the second aspect and any possible implementation of the second aspect, or the third aspect and any possible implementation of the third aspect.

[0032] In a fifth aspect, the present application provides a device, comprising: a memory for storing instructions; a processor for executing instructions so that the device implements the data migration method provided by the first aspect and any possible implementation of the first aspect, or the second aspect and any possible implementation of the second aspect, or the third aspect and any possible implementation of the third aspect.

[0033] In a sixth aspect, the present application provides a program product, which, when running on a device, enables the device to implement the data migration method provided by the first aspect and any possible implementation of the first aspect, or the second aspect and any possible implementation of the second aspect, or the third aspect and any possible implementation of the third aspect.

[0034] It should be understood that the beneficial effects of the second to sixth aspects mentioned above can be referred to the description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 According to some embodiments of the present application, a schematic diagram of a scenario of migrating applications from a mobile phone 10 to a mobile phone 20 is shown;

[0036] Figure 2 According to some embodiments of the present application, a schematic diagram of a scenario of application migration is shown;

[0037] Figure 3 According to some embodiments of the present application, a schematic diagram of an interaction process of a data migration method is shown;

[0038] Figure 4A According to some embodiments of the present application, a schematic diagram of establishing a data migration connection between a source device and a destination device is shown;

[0039] Figure 4B According to some embodiments of the present application, another schematic diagram of establishing a data migration connection between a source device and a destination device is shown;

[0040] Figure 5 According to some embodiments of the present application, a schematic diagram of a software architecture is shown;

[0041] Figure 6 According to some embodiments of the present application, a schematic diagram of an interaction process of another data migration method is shown;

[0042] Figure 7 According to some embodiments of the present application, a schematic diagram of a method for installing a patch package of an application is shown;

[0043] Figure 8 According to some embodiments of the present application, a schematic diagram of a method for installing an application is shown;

[0044] Fig. 9 According to some embodiments of the present application, a schematic diagram of another method for installing an application is shown;

[0045] Fig.10 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION

[0046] Illustrative embodiments of the present application include, but are not limited to, a data migration method, a readable storage medium, a program product, and an electronic device.

[0047] It should be understood that the source device and the destination device can be any electronic device, including but not limited to mobile phones, tablet computers, readers, laptop computers, desktop computers, smart home devices (such as smart TVs, large screens, etc.), and are not limited here. For ease of description, the following source device and destination device are taken as mobile phones as an example to introduce the technical solution of this application.

[0048] As mentioned above, in the process of migrating an application from a source device to a destination device, if the destination device is not compatible with the type or version of a certain application, the destination device may not be able to run the application normally, such as being unable to start the application or having poor performance, affecting the user experience.

[0049] For example, Figure 1 According to some embodiments of the present application, a schematic diagram of a scenario of migrating applications from a mobile phone 10 (as a source device) to a mobile phone 20 (as a destination device) is shown.

[0050] like Figure 1As shown, both mobile phone 10 and mobile phone 20 are installed with mobile phone cloning application. Mobile phone 10 can migrate the application in mobile phone 10 to mobile phone 20 through mobile phone cloning application in response to user operation. In the process of migrating the video application to mobile phone 20, mobile phone 10 will directly copy the video application in mobile phone 10 to mobile phone 20. After the video application is installed in mobile phone 20, mobile phone 20 can start the video application in response to the user's click operation on the icon of the video application. However, in the case that the version of the video application in mobile phone 10 is incompatible with the operating system of mobile phone 20, for example, the video application in mobile phone 10 is a 32-bit application and the operating system of mobile phone 20 only supports 64-bit applications, mobile phone 20 will not be able to start the video application normally and display a prompt box U1, prompting the user "The application version is incompatible, please upgrade the application".

[0051] In this way, the user needs to reinstall the video application in the mobile phone 20 before using the video application normally, which affects the user experience.

[0052] For another example, in some scenarios, the operating system of the mobile phone 20 is a 64-bit operating system, and the 64-bit operating system can generally run 32-bit applications and 64-bit applications. However, the 64-bit operating system will bind the 32-bit application to the lowest performance core in the mobile phone 20 processor to run, resulting in poor performance of the 32-bit application, affecting the user experience.

[0053] In order to solve the problem that the destination device cannot run the application or has poor application performance when the application version in the source device is low or the number of bits of the application is low, an embodiment of the present application provides a data migration method. When the destination device receives the first version of the target application sent by the source device, it determines whether the first version of the target application is compatible with the operating system of the destination device. If it is determined that the first version of the target application is incompatible with the operating system of the destination device, the destination device does not install the first version of the target application, but obtains and installs the second version of the target application that is compatible with the operating system of the destination device from the server. In this way, it can be avoided that the first version of the target application cannot run or has poor performance after being installed on the destination device due to the incompatibility of the first version of the target application with the operating system of the destination device, which is conducive to improving the user experience.

[0054] For example, Figure 2 According to some embodiments of the present application, a schematic diagram of a scenario of application migration is shown.

[0055] refer to Figure 2Taking the process of migrating applications from mobile phone 10 (as a source device) to mobile phone 20 (as a destination device) as an example, when mobile phone 20 detects that the first version of the video application sent by mobile phone 10 is incompatible with the operating system of mobile phone 20, a prompt box U2 may be displayed to prompt the user "The video application version is incompatible, do you want to automatically install the new version?" The prompt box U2 includes a "Yes" option U21, a "No" option U22, and a "Execute the same option for subsequent applications" radio button U23. In response to the user's selection operation of the "Yes" option U21, mobile phone 20 can obtain a second version of the video application compatible with the operating system of mobile phone 20 from the server and install the second version of the video application in mobile phone 20.

[0056] It should be understood that Figure 2 In the illustrated embodiment, the mobile phone 20 can also automatically obtain and install applications that are compatible with the operation of the mobile phone 20 from the server in response to the user selecting the radio button U23 and the "Yes" option U21, upon receiving other applications sent by the mobile phone 10 that are incompatible with the operating system of the mobile phone 20.

[0057] It should be understood that the target application may be any application program sent by the source device to the destination device.

[0058] It should be understood that the first version of the target application and the second version of the target application can be target applications with the same version number but different digits, target applications with the same digits but different version numbers, or target applications with different version numbers but different digits, etc. The first version of the target application and the second version of the target application can also be target applications for different types of operating systems, or target applications for different versions of operating systems of the same type, which are not limited here.

[0059] In some embodiments, when the target application is a hot application in the source device (for example, the target application is one of multiple applications that are used more frequently than a preset frequency by the user), the source device may also send an application hot code configuration file of the target application to the destination device. It should be understood that hot code refers to a code or function that is executed more frequently by the application program, and the application hot code configuration file may record the hot code of the target application or an identifier indicating the hot code of the target application (for example, a function name, a method name, etc.).

[0060] After the destination device receives the hotspot code configuration file corresponding to the target application, when the hotspot code configuration file is compatible with the operating system of the destination device, the destination device can compile the hotspot code in a fast compilation (speed profile) mode based on the application hotspot code configuration file during the installation of the target application. In this way, since the running speed of the code encoded in the fast compilation mode is higher than that of the code compiled in other compilation methods, the running speed of the target application on the destination device can be improved.

[0061] In some embodiments, during the process of installing the target application, the target device can compile other codes other than the hotspot code in the verification compilation mode. Since the verification compilation mode compiles the code faster than the fast compilation mode, the time it takes for the target device to install the target application can be shortened, thereby shortening the total time of migrating the application.

[0062] It should be understood that the fast compilation mode is a compilation mode that compiles code written in a high-level language into machine code. In some embodiments, the fast compilation mode can be a compilation optimization based on sampling information (profile guided optimization, PGO). The running speed of the code compiled by the fast compilation mode is higher than the code compiled and run by other methods (for example, running the code by interpreting execution). It should be understood that the verification compilation mode is a compilation mode of code, which only verifies the bytecode of the code, and does not perform method compilation on the code. Therefore, the running speed of the code compiled by the verification compilation mode is slower than the code compiled by the fast compilation mode.

[0063] It should be understood that in some embodiments, even if the target application is not a hotspot application in the source device, the source device may send the application hotspot code configuration file of the target application to the destination device. After receiving the application hotspot code configuration file of the target application, the destination device may compile the hotspot code based on the application hotspot code configuration file when installing the target application, or may compile the hotspot code based on the application hotspot code configuration file when the destination device is idle, which is not limited here.

[0064] In some embodiments, when the source device sends the target application to the destination device, if a patch package of the target application is also installed in the source device, the source device may also send the patch package of the target application to the destination device.

[0065] When receiving the patch package of the target application, the target device can install the patch package of the target application when installing the target application, so that the user of the target device can use all functions of the target application after the target application is installed, thereby improving the user experience.

[0066] In some embodiments, the source device may also send the target application patch package to the destination device if the target application is a hot application in the source device; and not send the target application patch package to the destination device if the target application is not a hot application in the source device. In this way, the user experience of the hot application after the hot application is migrated to the destination device can be ensured, and the total time of migrating the application can be shortened.

[0067] In some embodiments, when the source device also stores a hotspot code configuration file corresponding to the hotspot code in the patch package of the target application (hereinafter referred to as the patch package hotspot code configuration file), the source device may also send the patch package of the target application and the patch package hotspot code configuration file at the same time when sending the target application to the destination device.

[0068] After receiving the patch package and hot code configuration file of the target application, the target device can compile the hot code in the patch package of the target application through the fast compilation mode based on the hot code configuration file of the patch package when installing the target application. For other codes other than the hot code in the patch package of the target application, the target device can compile them through the verification compilation mode, or install and compile them when the target device is idle. In this way, it can ensure that the target application can run quickly after installation, and shorten the time taken to migrate the target application.

[0069] In some embodiments, when the target application is a hot application in the source device, the target device can install the patch package of the target application and compile the hot code in the patch package through the fast compilation mode when installing the target application. When the target application is not a hot application in the source device, the target device may not install the patch package of the target application when installing the target application, but install the patch package of the target application and compile the hot code in the patch package when the target device is idle. In this way, the time for migrating the target application can be shortened.

[0070] The technical solution of the present application is described below in conjunction with the accompanying drawings.

[0071] Figure 3 According to some embodiments of the present application, a schematic diagram of an interactive process of a data migration method is shown. Figure 3 As shown, the interaction process includes the following steps:

[0072] S301: A source device and a destination device establish a data migration connection.

[0073] The source device and the destination device establish a data migration connection, and the data migration connection is used to implement data communication between the source device and the destination device.

[0074] For example, reference Figure 4A, both the mobile phone 10 and the mobile phone 20 can run the mobile phone cloning application. In response to the user selecting the "This is an old phone" option, the mobile phone 10 can identify itself as the source device and display the "Connect new device" interface. In response to the user selecting the "This is a new phone" option, the mobile phone 20 can identify itself as the destination device and display the "Connect old device" interface, which includes a QR code identifying the communication connection information of the mobile phone 20. Then, the mobile phone 10 can establish a data migration connection between the mobile phone 10 and the mobile phone 20 in response to the user operation, such as the user scanning the QR code in the "Connect old device" interface of the mobile phone 20 through the mobile phone 10.

[0075] For example, reference Figure 4B , mobile phone 10 (as the source device) can respond to the user's operation of sharing a video application (as the target application), such as the user's operation of long pressing the video application icon U41, and display the interface U42 for sharing the video application. Secondly, mobile phone 10 can respond to the user's operation of clicking the "Share" icon U43 in the interface U42 for sharing the video application, and display the interface U44 for selecting a sharing method. Thirdly, mobile phone 10 can respond to the user's operation of clicking the "Share" image U45 in the interface U44 for selecting a sharing method, and display the interface U46 for selecting a device. Finally, mobile phone 10 can respond to the user's operation of clicking the "mobile phone 20" option U47 in the interface for selecting a device, and establish a data migration connection between mobile phone 10 and mobile phone 20 (as the destination device).

[0076] It should be understood that in other embodiments, mobile phone 10 and mobile phone 20 may also establish a data migration connection in other ways under other circumstances, which is not limited here.

[0077] S302: The source device sends a first version of a target application and relevant data of the target application to the destination device.

[0078] After establishing a data migration connection with the destination device, the source device may send the first version of the target application and relevant data of the target application in the source device to the destination device.

[0079] In some embodiments, when the target application is a hotspot application in the source device, the relevant data of the target application may include an application hotspot code configuration file of the target application. It should be understood that the application hotspot code configuration file may include information such as the hotspot code of the target application or the identification of the hotspot code of the target application.

[0080] In some embodiments, when a patch package of a target application is also installed in the source device, the relevant data of the target application may include the patch package of the target application.

[0081] In some embodiments, when the source device also has a patch package hot code configuration file corresponding to the patch package of the target application, the relevant data of the target application may include the patch package hot code configuration file. It should be understood that the patch package hot code configuration file may include information such as the hot code in the patch package of the target application or the identifier of the hot code in the patch package of the target application.

[0082] It should be understood that in some embodiments, the source device can add applications that are used more frequently than a preset frequency to the hot application list according to the user's usage habits of the application program through a module for detecting user habits in the operating system (e.g., a user habit subsystem, etc.). In this way, when the target application is in the hot application list (i.e., when the target application is a hot application), the source device can send the application hot code configuration file, patch package, patch package hot code configuration file, etc. of the target application as relevant data of the target application to the destination device.

[0083] In some embodiments, when the source device does not have a module for detecting user habits, the source device can also set up an application whitelist. When the target application is on the application whitelist (that is, when the target application is a hot application), the application hotspot code configuration file, patch package, patch package hotspot code configuration file, etc. of the target application are sent to the destination device as relevant data of the target application.

[0084] In some embodiments, the relevant data of the target application may also include the version and bit number of the target application, the version of the operating system of the source device, etc.

[0085] It should be understood that in some embodiments, the relevant data of the target application may also include more data, such as user data corresponding to the target application (data generated when the user uses the target application in the source device), etc., which is not limited here.

[0086] It should be understood that in some embodiments, regardless of whether the target application is a hot application, the source device can send the target application's application hot code configuration file, patch package, patch package hot code configuration file, etc. as relevant data of the target application to the destination device.

[0087] S303: The destination device determines whether the operating system is compatible with the first version of the target application.

[0088] After receiving the first version of the target application, the destination device may determine whether the operating system of the destination device is compatible with the first version of the target application.

[0089] In an embodiment of the present application, when the operating system of the target device is compatible with the first version of the target application, the process proceeds to step S307 to install the first version of the target application; when the operating system of the target device is not compatible with the first version of the target application, indicating that installing the first version of the target application may cause the target device to be unable to operate the first version of the target application normally, the process proceeds to step S304.

[0090] It should be understood that the operating system of the destination device is incompatible with the first version of the target application, which means that the operating system of the destination device cannot run the first version of the target application, or the operating system of the destination device can run the first version of the target application but the first version of the target application has poor running performance (for example, the first version of the target application is run by a core with poor performance in the processor of the target application). For example, in the case where the operating system of the destination device is a 64-bit operating system, when the first version of the target application is a 64-bit application, the destination device can determine that the operating system of the destination device is compatible with the first version of the target application; when the first version of the target application is a 32-bit application, the destination device can determine that the operating system of the destination device is incompatible with the first version of the target application.

[0091] S304: The target device displays a prompt message indicating that the target application is not compatible.

[0092] When the destination device determines that the operating system of the destination device is incompatible with the first version of the target application, the destination device may display a prompt message indicating that the target application is incompatible.

[0093] For example, refer to Figure 2 When mobile phone 20 detects that the first version of the video application sent by mobile phone 10 (for example, the first version is a 32-bit application) is incompatible with the operating system of mobile phone 20, a prompt box U2 may be displayed to prompt the user "The video application version is incompatible, do you want to automatically install the new version?".

[0094] It should be understood that in some embodiments, the destination device may also prompt the user that the operating system of the destination device is incompatible with the target application in other forms, which is not limited here.

[0095] S305: The destination device determines whether to update the target application.

[0096] The destination device can determine whether to update the target application based on the operation or the operation performed by the user in history. If it is determined that the target application needs to be updated, the process goes to step S306; otherwise, if it is determined that the target application does not need to be updated, the process goes to step S307.

[0097] For example, reference Figure 2When the mobile phone 20 detects that the user selects the "Yes" option U21, it determines that the target application needs to be updated and goes to step S306; when the mobile phone 20 detects that the user selects the "No" option U22, it determines that the target application does not need to be updated and goes to step S307.

[0098] Continue to refer Figure 2 In some embodiments, when the mobile phone 20 detects that the user selects the radio button U23 and the "Yes" option U21, for other applications that are received in the order after the video application and are incompatible with the operating system of the target device, the target device can determine that the part of the application needs to be updated.

[0099] In some embodiments, when the user selects to update all incompatible applications on the destination device during the data migration process (e.g. Figure 2 When the mobile phone 20 detects that the user selects the radio button U23 and the "Yes" option U21, the destination device may not execute steps S304 and S305, which is not limited here.

[0100] S306: The destination device obtains a second version of the target application and installs the second version of the target application.

[0101] When determining to update the target application, the destination device may obtain the second version of the target application from the server and install the second version of the target application.

[0102] For example, in some embodiments, when the data received by the destination device includes an application hotspot code configuration file of the target application, the destination device can compile the hotspot code of the target application in a fast compilation mode (or other compilation methods with faster running speed after compilation) based on the application hotspot code configuration file when the application hotspot code configuration file is compatible with the operating system of the destination device during the installation of the second version of the target application. This is conducive to improving the running speed of the second version of the target application after installation.

[0103] It should be understood that in some embodiments, during the process of installing the second version of the target application, the destination device may compile the code other than the code recorded in the application hotspot code configuration file in verification mode (or other compilation methods that are faster than the quick compilation mode) to shorten the installation time of the target application and thereby shorten the total duration of data migration.

[0104] For example, in some embodiments, when the data received by the destination device includes a patch package of the target application, the destination device may install the patch package of the target application during the process of installing the second version of the target application, thereby ensuring the functional integrity of the second version of the target application after installation.

[0105] For example, in some embodiments, when the data received by the destination device includes the patch package of the target application and the patch package hot code configuration file corresponding to the patch package, the destination device can compile the hot code in the patch package of the target application in a fast compilation mode based on the patch package hot code configuration file during the installation of the second version of the target application when the patch package hot code configuration file is compatible with the operating system of the destination device. This is conducive to improving the running speed of functions related to the patch package after the second version of the target application is installed.

[0106] For example, in some embodiments, when the target application is not a hot application in the source device, the target device may not install the patch package of the target application during the installation of the second version of the target application, but install the patch package of the target application when the target device is idle. In this way, the installation time of the target application can be shortened, thereby shortening the total time of data migration.

[0107] For example, the destination device may obtain the aforementioned hot application list or the aforementioned application whitelist. When the target application is in the hot application list or the application whitelist (i.e., when the target application is a hot application), in the process of installing the first version of the target application, the hot code of the target application is compiled through the fast compilation mode based on the application hot code configuration file, the patch package of the target application is installed, and the hot code in the patch package of the target application is compiled through the fast compilation mode based on the patch package hot code configuration file. When the target application is not a hot application, the destination device may install the patch package of the target application when idle, and compile the hot code in the patch package of the target application through the fast compilation mode based on the patch package hot code configuration file.

[0108] S307: The destination device installs the first version of the target application based on the relevant data of the target application.

[0109] The target device may install the first version of the target application based on the first version of the target application and relevant data of the target application if the operating system of the target device is compatible with the first version of the target application or the user confirms not to update the first version of the target application.

[0110] For example, in some embodiments, when the data received by the destination device includes an application hotspot code configuration file of the target application, the destination device can compile the hotspot code of the target application in a fast compilation mode (or other compilation methods with faster running speed after compilation) based on the application hotspot code configuration file when the application hotspot code configuration file is compatible with the operating system of the destination device during the process of installing the first version of the target application. This is conducive to improving the running speed of the first version of the target application after installation.

[0111] It should be understood that in some embodiments, during the process of installing the first version of the target application, the destination device may compile the code other than the code recorded in the application hotspot code configuration file in verification mode (or other compilation methods that are faster than the quick compilation mode) to shorten the installation time of the target application and thereby shorten the total time for data migration.

[0112] For example, in some embodiments, when the data received by the destination device includes a patch package of the target application, the destination device may install the patch package of the target application during the process of installing the first version of the target application, thereby facilitating the functional integrity of the first version of the target application after installation.

[0113] For example, in some embodiments, when the data received by the destination device includes a patch package of a target application and a patch package hotspot code configuration file corresponding to the patch package, the destination device can compile the hotspot code in the patch package of the target application in a fast compilation mode based on the patch package hotspot code configuration file during the installation of the first version of the target application when the patch package hotspot code configuration file is compatible with the operating system of the destination device. This helps to improve the running speed of functions related to the patch package after the first version of the target application is installed.

[0114] For example, in some embodiments, when the target application is not a hot application in the source device, the target device may not install the patch package of the target application during the process of installing the first version of the target application, but install the patch package of the target application when the target device is idle. In this way, the installation time of the target application can be shortened, thereby shortening the total time of data migration.

[0115] For example, the destination device may obtain the aforementioned hot application list or the aforementioned application whitelist. When the target application is in the hot application list or the application whitelist (i.e., when the target application is a hot application), during the installation of the second version of the target application, the hot code of the target application is compiled through the fast compilation mode based on the application hot code configuration file, the patch package of the target application is installed, and the hot code in the patch package of the target application is compiled through the fast compilation mode based on the patch package hot code configuration file. When the target application is not a hot application, the destination device may install the patch package of the target application when idle, and compile the hot code in the patch package of the target application through the fast compilation mode based on the patch package hot code configuration file.

[0116] Through the method provided in the embodiment of the present application, the source device can update the received first version of the target application to a second version that is compatible with the operating system of the target device when the operating system of the target device is not compatible. In this way, the problem that the first version of the target application cannot be run on the target device or the first version of the target application has poor performance due to being bound to a lower-performance core in the processor of the target device can be avoided, which is conducive to improving the user experience.

[0117] In addition, the destination device can also compile the hotspot code in the target application and / or the hotspot code in the target application's patch package in a fast compilation mode based on the target application's hotspot code configuration file and / or the patch package hotspot code configuration file sent by the source device, which is beneficial to improving the running speed of the target application on the destination device.

[0118] The following describes the technical solution of the present application in combination with the software architecture of the source device and the destination device.

[0119] First, a schematic diagram of the software architecture of a source device or a destination device is introduced.

[0120] Figure 5 According to some embodiments of the present application, a schematic diagram of a software architecture is shown.

[0121] like Figure 5 As shown, the software architecture includes an application layer, an application framework layer, a system service layer and a kernel layer.

[0122] The application layer 51 may include application programs that can be run by the electronic device, which may be divided into system applications (eg, phone clone 511) and extended applications (or third-party applications, such as video 512).

[0123] When the software architecture is used for the source device, the mobile phone clone 511 can be used to send each application in the application layer 51 and the relevant data of each application (such as user data, patch packages, application hotspot code configuration files, patch package hotspot code configuration files, etc.) to the destination device.

[0124] When the software architecture is used for the source device, the mobile phone clone 511 can be used to receive the application sent by the source device, and the relevant data of each application (such as user data, patch package, application hot code configuration file, patch package hot code configuration file, etc.). The mobile phone clone 511 can also be used to determine whether the received application is compatible with the operating system of the destination device, display a message prompting that the received application is incompatible with the operating system of the destination device, and obtain and install a version of the received application that is compatible with the operating system of the destination device.

[0125] It should be understood that in other embodiments, the application layer 51 may include more or fewer applications, and the data migration method in the embodiments of the present application may be applicable to the migration or sharing of any application in the application layer 51.

[0126] The application framework layer 52 and the system service layer include a subsystem set for implementing electronic device related functions and services, such as a system basic capability subsystem set, a basic software service subsystem set, a hardware service subsystem set, etc.

[0127] The application framework layer 52 can provide a multi-language framework for the application layer 51, including an interface (UI) framework 521, a user program framework 522, and a capability framework 523. Among them, the UI framework 521 includes a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., which are not described in detail here. The user program framework 522 and the capability framework 523 can provide the application with the capabilities of various capability components required by the application, such as computing power (including CPU computing power, graphics processor computing power, image signal processor computing power, etc.), sound pickup capability (including microphone sound pickup capability, voice recognition capability, etc.), security capabilities in terms of device security protection (including trusted operating environment security level, etc.), display capability (including screen resolution, screen size, etc.), playback capability (including amplification capability, stereo sound capability, etc.), and storage capability (including device memory capability, random access memory capability, etc.), etc., which are not limited here.

[0128] It should be understood that in other embodiments, the application framework layer 52 may include more or fewer modules, and may also split or combine some modules, which is not limited here.

[0129] The system service layer 53 can provide services to the application programs of the application layer 51 through the application framework layer 52. The system service layer 53 includes a common basic subsystem 531, a multi-language runtime subsystem 532, and the like.

[0130] The common basic subsystem 531 is used to provide basic components for other subsystems and the application layer 51 .

[0131] The multi-language runtime subsystem 532 is used to compile application codes.

[0132] In some embodiments, the multi-language runtime subsystem 532 can be used to compile the hotspot code of the application and the hotspot code in the patch package of the application through the quick compilation mode, and can also be used to compile the non-hotspot code in the application and the non-hotspot code in the patch package of the application through the verification mode.

[0133] In other embodiments, the system service layer 53 may include more or fewer modules, or may merge or split some modules, which is not limited here. For example, in some embodiments, the system service layer 53 may also include distributed task scheduling, distributed data management, distributed soft bus, etc.

[0134] At least some modules in the user habit subsystem 55 can be deployed in the application framework layer 52 or the system service layer 53, and are used to generate a hot application list based on the user's frequency of use of applications in the application layer 51. The hot application list records the identifiers of applications (such as the package name of the application, etc.) that are used more frequently by users than a preset frequency.

[0135] Part of the content of each subsystem in the basic software service subsystem set is in the application framework layer 52, and the other part is in the system service layer 53, which is used to provide public and general software services for the application programs in the application layer 51. For example, the basic software service subsystem set may include a package manager service (PMS) 56, which is used to manage the application programs of the electronic device, such as the installation, update and uninstallation of the application programs.

[0136] In some embodiments, PMS 56 can also be used to record hotspot codes in applications and patch packages of applications based on user usage of various functions of the applications to obtain application hotspot code configuration files and patch package hotspot code configuration files corresponding to each application.

[0137] In some embodiments, PMS 56 may provide a calling function or interface (eg, snapshotRuntimeProfile function) to other applications or modules, so that other applications or modules may obtain the application hotspot code configuration file and the patch package hotspot code configuration file of the application through the calling function or interface.

[0138] In some embodiments, the application hotspot code configuration file and the patch package hotspot code configuration file may also be combined into one file, which is not limited here. For ease of description, the application hotspot code configuration file and the patch package hotspot code configuration file are collectively referred to as hotspot code configuration files in the following embodiments.

[0139] It should be understood that in other embodiments, the basic software service subsystem set may also include other subsystems, such as an event notification subsystem, a telephone subsystem, a multimedia subsystem, etc., which are not limited here.

[0140] Part of the content of each subsystem in the hardware service subsystem is in the application framework layer 52, and the other part is in the system service layer 53, which is used to provide hardware services for electronic devices, such as the location service subsystem.

[0141] The kernel layer 54 includes a kernel subsystem 541 and a driver subsystem 542. The kernel subsystem 541 provides basic kernel capabilities to the upper layer by shielding the differences between multiple kernels, including process / thread management, memory management, file system, network management, and peripheral management. The driver subsystem 542 includes a hardware driver framework, which can provide the mobile phone 10 with a unified peripheral access capability and management framework.

[0142] It should be understood that Figure 5 The software architecture shown is only an example. In other embodiments, the software architecture applicable to the source device and / or the destination device may be other architectures, which are not limited here.

[0143] Combine the following Figure 5 The software architecture shown introduces the technical solution of this application.

[0144] Figure 6 According to some embodiments of the present application, another interactive flow diagram of a data migration method is shown. For easy distinction, the user habit subsystem in the source device is marked as user habit subsystem 55A, the PMS in the source device is marked as PMS 56A, the mobile phone clone application in the source device is marked as mobile phone clone 511A, the PMS in the destination device is marked as PMS 56B, the mobile phone clone application in the destination device is marked as mobile phone clone 511B, and the multi-language runtime subsystem in the destination device is marked as multi-language runtime subsystem 532B.

[0145] like Figure 6 As shown, the interaction process includes the following steps:

[0146] S601: The mobile phone clone 511A establishes a data migration connection with the mobile phone clone 511B.

[0147] The mobile phone clone 511A establishes a data migration connection with the mobile phone clone 511B so that the source device can send data to the destination device.

[0148] For example, reference Figure 4A , the mobile phone clone 511A in the mobile phone 10 can respond to the user selecting the "This is an old phone" option in the interface of the mobile phone clone 511A, identify itself as the source device, and display the "Connect new device" interface. The mobile phone 20 can respond to the user selecting the "This is a new phone" option in the interface of the mobile phone clone 511B to identify itself as the destination device and display the "Connect old device" interface, and the "Connect old device" interface includes a QR code identifying the communication connection information of the mobile phone 20. Then, the mobile phone clone 511A can respond to the user operation, such as the user scanning the QR code in the "Connect old device" interface of the mobile phone 20 through the mobile phone 10, to establish a data migration connection between the mobile phone clone 511A and the mobile phone clone 511B.

[0149] It should be understood that in other embodiments, the mobile phone clone 511A and the mobile phone clone 511B may also establish a data migration connection through other methods, which are not limited here.

[0150] S602: The mobile phone clone 511A obtains a hot application list of the source device from the user habit subsystem 55A.

[0151] The mobile phone clone 511A can obtain a hot application list of the source device from the user habit subsystem 55A, where the hot application list includes an application program identifier (eg, installation package name) of at least one application most frequently used by the user in the source device.

[0152] Exemplarily, the mobile phone clone 511A may obtain the hot application list of the source device from the user habit subsystem 55A according to the calling interface of the user habit subsystem 55A.

[0153] It should be understood that in other embodiments, when there is no user habit subsystem 55A in the source device, the mobile phone clone 511A can also obtain the hot application list based on the white list set in the mobile phone 511A. Exemplarily, the mobile phone clone 511A can add application identifiers of multiple applications that are frequently used by the user to the white list, and the mobile phone clone 511A can determine the applications that have been installed in the source destination device and whose application identifiers are in the white list as the applications in the hot application list.

[0154] It should be understood that in other embodiments, the mobile phone clone 511A may also obtain the hot application list in other ways, such as obtaining from a server, which is not limited here.

[0155] S603: The mobile phone clone 511A obtains a patch package list of each hot application from the PMS 56A according to the hot application list.

[0156] After obtaining the hot application list of the source device, the mobile phone clone 511A can obtain the patch package list of each hot application from the PMS 56A according to the application program identifier of the application in the hot application list.

[0157] It should be understood that in other embodiments, when there are other applications, modules or services in the source device that record the patch package list of each application in the source device, the mobile phone clone 511A can also obtain the patch package list of each hot application from the other application, module or service. The embodiment of the present application does not limit the source of the patch package list of each hot application.

[0158] It should be understood that in order to ensure the functional integrity of the application after migration to the destination device, in some embodiments, for other applications outside the hot application list in the source device, the mobile phone clone 511A can also obtain the patch package list of these applications, which is not limited here.

[0159] S604: The mobile phone clone 511A determines whether the target application is a hot application.

[0160] After obtaining the hot application list, the mobile phone clone 511A can determine whether the target application currently being migrated is a hot application according to the hot application list. When the target application currently being migrated is a hot application, it means that the application hot code configuration file of the target application can be migrated, and the process goes to step S605 for further determination; when the target application currently being migrated is not a hot application, it means that the application hot code configuration file of the target application does not need to be migrated, and the process goes to step S607.

[0161] Exemplarily, in some embodiments, the phone clone 511A may determine that the target application is a hot application when the target application is an application in the aforementioned hot application list or an application in the aforementioned white list.

[0162] S605: The mobile phone clone 511A determines whether the hotspot code configuration file is compatible with the target device.

[0163] When the mobile phone clone 511A determines that the target application is a hotspot application, it can determine whether the hotspot code configuration file of the target application is compatible with the target device. When the hotspot code configuration file of the target application is compatible with the target device, it means that the target device can compile the hotspot code of the target application and / or the hotspot code in the patch package of the target application based on the hotspot code configuration file, and then go to step S606; otherwise, when the hotspot code configuration file of the target application is not compatible with the target device, then go to step S607.

[0164] It should be understood that the hotspot code configuration file being compatible with the target device means that the target device can compile the hotspot code in the target application or the patch package of the target application based on the hotspot code configuration file.

[0165] Exemplarily, the mobile phone clone 511A can determine whether the hotspot code configuration file is compatible with the destination device based on the type and version of the operating system of the source device and the destination device. When the versions of the operating system of the source device and the destination device are the same, it is determined that the hotspot code configuration file is compatible with the destination device. When the versions of the operating system of the source device and the destination device are different, it is determined whether the hotspot code configuration file is compatible with the destination device based on the compatibility between different versions defined by the operating system.

[0166] For example, assuming that the hotspot code configuration files of the S1 version and the S2 version of the operating system are compatible with each other, when the versions of the operating systems of the source device and the destination device are both S1 version, or when the versions of the operating systems of the source device and the destination device are both S2 version, or the version of the operating system of the source device is S1 version and the version of the operating system of the destination device is S2 version, or the version of the operating system of the source device is S2 version and the version of the operating system of the destination device is S1 version, the mobile phone clone 511A can determine that the hotspot code configuration file can be compatible with the destination device.

[0167] For another example, assuming that the S3 version of the operating system is compatible with the S4 version of the hotspot code configuration file, while the S4 version of the operating system is not compatible with the S3 version of the hotspot code configuration file. In the case where the version of the operating system of the source device is the S4 version and the version of the operating system of the destination device is the S3 version, it can be determined that the hotspot code configuration file can be compatible with the destination device; and in the case where the version of the operating system of the source device is the S3 version and the version of the operating system of the destination device is the S4 version, the mobile phone clone 511A can determine that the hotspot code configuration file cannot be compatible with the destination device.

[0168] In other embodiments, the mobile phone clone 511A may also determine whether the hotspot code configuration file is compatible with the target device in other ways, which are not limited here.

[0169] S606: The mobile phone clone 511A obtains the hotspot code configuration file from the PMS 56A and packages it into a DM format file.

[0170] When determining that the hotspot code configuration file is compatible with the target device, the mobile phone clone 511A can obtain the hotspot code file of the target application from the PMS 56A and package it into a DM format file (i.e., a file with a file extension of "DM or dm", which is a compressed file format).

[0171] Exemplarily, the mobile phone clone 511A may obtain the hotspot code configuration file from the PMS 56A based on a function or interface (eg, snapshotRuntimeProfile function) defined by the operating system of the source device.

[0172] In some embodiments, when the target application does not include a patch package, for example, the patch package list corresponding to the target application is empty, the hotspot code configuration file may only include the application hotspot code configuration file.

[0173] In some embodiments, when the target application includes a patch package, for example, the patch package list corresponding to the target application is not empty, the hotspot code configuration file may include an application hotspot code configuration file and patch package hotspot code configuration files corresponding to each patch package of the target application.

[0174] It should be understood that in other embodiments, the mobile phone clone 511A can also package the hotspot code configuration file of the target application into files of other formats, such as tar format files (i.e., files with a file extension of "TAR or tar", which is a compressed file format), zip format files (i.e., files with a file extension of "ZIP or zip", which is a compressed file format), rar format files (i.e., files with a file extension of "RAR or rar", which is a compressed file format), etc., which are not limited here.

[0175] S607: The mobile phone clone 511A sends the first version of the target application and relevant data of the target application to the mobile phone clone 511B.

[0176] When the target application is not a hotspot application, or when the target application is a hotspot application but the hotspot code configuration file of the target application is not compatible with the target device, or when the target application is a hotspot application but the hotspot code configuration file of the target application is compatible with the target device and the hotspot code configuration file of the target application has been packaged, the mobile phone clone 511A can send the first version of the target application and relevant data of the target application to the mobile phone clone 511B.

[0177] It should be understood that the first version of the target application refers to the target application in the source device.

[0178] It should be understood that the relevant data of the target application may include at least one of the following data: user data of the target application, a patch package of the target application, and a DM file corresponding to a hotspot code configuration file of the target application.

[0179] For example, when the target application is a hot application, the relevant data of the target application may include the user data of the target application, the patch package of the target application, and the DM file corresponding to the hot code configuration file of the target application. In this way, the functional integrity and running speed of the hot application in the target device can be ensured, which is conducive to improving the user experience.

[0180] It should be understood that in other embodiments, when the target application is a hot application and does not include a corresponding patch package, the relevant data of the target application may include user data of the target application and a DM file corresponding to the hot code configuration file of the target application, but not the patch package of the target application.

[0181] For example, in some embodiments, when the target application is not a hotspot application, the relevant data of the target application may include the user data of the target application, but not the patch package of the target application and the DM file corresponding to the hotspot code configuration file of the target application. In this way, for non-hotspot applications in the source device, the mobile phone clone 511A does not need to send the patch package and the DM file corresponding to the hotspot code configuration file of this part of the application to the mobile phone clone 511B, which can save data transmission time and the time it takes for the destination device to install this part of the application, which can not only ensure the functional integrity and running speed of the hotspot application in the destination device, but also help to shorten the total time of data migration.

[0182] It should be understood that in other embodiments, when the target application is not a hotspot application, the mobile phone clone 511A can also send the hotspot code configuration file and the patch package of the target application as the relevant data of the target application to the mobile phone clone 511B. In this way, the functional integrity of the target application installed in the destination device can be ensured.

[0183] It should be understood that for all applications to be migrated to the target device, the mobile phone clone 511A can send the first version of each application and related data to the mobile phone clone 511B through the process of the aforementioned steps S604 to S607.

[0184] S608: The mobile phone clone 511B determines whether the operating system is compatible with the first version of the target application.

[0185] After receiving the first version of the target application, the mobile phone clone 511B can determine whether the operating system of the target device is compatible with the first version of the target application. If the operating system of the target device is not compatible with the first version of the target application, it means that the first version of the target application may not be able to run on the target device or has poor running performance, and the target application needs to be updated, and the process goes to step S609; otherwise, the process goes to step S612.

[0186] Exemplarily, in some embodiments, the mobile phone clone 511B can determine whether the operating system of the target device is compatible with the first version of the target application based on the bit number of the operating system of the target device and the bit number of the target application. For example, when the bit number of the operating system of the target device is the same as that of the target application (for example, when the operating system of the target device is a 64-bit system and the target application is a 64-bit application), it can be determined that the operating system of the target device is compatible with the first version of the target application. When the bit number of the operating system of the target device is different from that of the target application (for example, when the operating system of the target device is a 64-bit system and the target application is a 32-bit application, or when the operating system of the target device is a 32-bit system and the target application is a 64-bit application), it can be determined that the operating system of the target device is compatible with the first version of the target application.

[0187] Exemplarily, in some embodiments, the mobile phone clone 511B can also determine whether the operating system of the target device is compatible with the first version of the target application based on the versions of the operating systems of the target device and the source device. For example, assume that the S1 version of the operating system is compatible with the application programs in the S2 version, but not compatible with the application programs in the S3 version. When the operating system of the target device is the S1 version and the operating system of the source device is the S2 version, it can be determined that the operating system of the target device is compatible with the first version of the target application; when the operating system of the target device is the S1 version and the operating system of the source device is the S3 version, it can be determined that the operating system of the target device is not compatible with the first version of the target application.

[0188] It should be understood that in other embodiments, the mobile phone clone 511B may also determine whether the operating system of the target device is compatible with the first version of the target application in other ways, which are not limited here.

[0189] S609: The mobile phone clone 511B displays a prompt message indicating that the target application is not compatible.

[0190] When the operating system of the target device is incompatible with the first version of the target application, the mobile phone clone 511B may display a prompt message indicating that the target application is incompatible.

[0191] For example, refer to Figure 2When the mobile phone clone 511B in the mobile phone 20 (as the destination device) detects that the first version (for example, the first version is a 32-bit application) of the video application (as the target application) sent by the mobile phone 10 is incompatible with the operating system of the mobile phone 20, a prompt box U2 can be displayed to prompt the user "The video application version is incompatible, do you want to automatically install the new version?".

[0192] It should be understood that in some embodiments, the destination device may also prompt the user that the operating system of the destination device is incompatible with the target application in other forms, which is not limited here.

[0193] S610: The mobile phone clone 511B determines whether to update the target application.

[0194] The mobile phone clone 511B can determine whether to update the target application according to the operation or the operation performed by the user in history. If it is determined that the target application needs to be updated, it will go to step S611; otherwise, if it is determined that the target application does not need to be updated, it will go to step 612.

[0195] For example, reference Figure 2 When the mobile phone 20 detects the user's selection operation on the "Yes" option U21, it can determine that the target application needs to be updated and go to step S611; when the mobile phone 20 detects the user's operation on the "No" option U22, it can determine that the target application does not need to be updated and go to step S612.

[0196] Continue to refer Figure 2 In some embodiments, when the mobile phone 20 detects that the user selects the radio button U23 and the "Yes" option U21, the destination device can determine that the other applications whose receiving order is after the video application and whose operating system is incompatible with the destination device need to be updated. In this way, for the applications whose receiving order is after the video application, the mobile phone clone 511B can directly execute step S611 after executing S608, without executing steps S609 and S610.

[0197] It should be understood that in other embodiments, the mobile phone clone 511B may also determine whether to update the target application in other ways, which are not limited here.

[0198] S611: The mobile phone clone 511B obtains the second version of the target application.

[0199] When determining that the target application needs to be updated, the mobile phone clone 511B may obtain the second version of the target application from the server.

[0200] For example, in some embodiments, the mobile phone clone 511B can utilize an application (such as an application market application) in the target device for users to update and install applications, and obtain a second version of the target application that is compatible with the operating system of the target device from a server of the application market application.

[0201] For example, in some embodiments, when the first version of the target application is a 32-bit application, the mobile phone clone 511B may obtain a 64-bit target application (as the second version of the target application) from the server.

[0202] It should be understood that the server may be any server that can obtain the second version of the target application, such as a server corresponding to an application in a target device where a user updates and installs the application, and this is not limited here.

[0203] It should be understood that in other embodiments, the mobile phone clone 511B may also obtain the second version of the target application in other ways, which are not limited here.

[0204] It should be understood that after the mobile phone clone 511B obtains the second version of the target application, what is installed in steps S614 to S616 is the second version of the target application.

[0205] S612: The mobile phone clone 511B determines whether the hotspot code configuration file of the target application is received.

[0206] When the operating system of the target device of mobile phone cloning 511B is compatible with the first version of the target application, or when the operating system of the target device is not compatible with the first version of the target application and the user confirms not to update the target application, or when the operating system of the target device is not compatible with the first version of the target application, the user confirms to update the target application and has obtained the second version of the target application, it can be determined whether the target device has received the hotspot code configuration file of the target application.

[0207] In some embodiments, when the mobile phone clone 511B determines that the hotspot code configuration file of the target application is received, it indicates that the hotspot code of the target application can be compiled in a fast compilation mode based on the hotspot code configuration file of the target application, and the process goes to step S613; otherwise, the process goes to step S616.

[0208] S613: The mobile phone clone 511B determines whether the operating system is compatible with the hotspot code configuration file of the target application.

[0209] When receiving the hotspot code configuration file of the target application, the mobile phone clone 511B can determine whether the operating system of the target device is compatible with the hotspot code configuration file of the target application.

[0210] When mobile phone clone 511B determines that the operating system of the target device is compatible with the hotspot code configuration file of the target application, it means that the hotspot code in the target application or the patch package of the target application can be compiled through the fast compilation mode based on the hotspot code configuration file of the target application, and go to step S614; otherwise, it means that the hotspot code of the target application cannot be compiled through the fast compilation mode based on the hotspot code configuration file of the target application, and go to step S616.

[0211] Exemplarily, the mobile phone clone 511B can determine whether the hotspot code configuration file is compatible with the destination device based on the type and version of the operating system of the source device and the destination device. When the versions of the operating system of the source device and the destination device are the same, it is determined that the destination device operating system is compatible with the hotspot code configuration file of the target application. When the versions of the operating system of the source device and the destination device are different, it is determined whether the destination device operating system is compatible with the hotspot code configuration file of the target application based on the compatibility between different versions defined by the operating system.

[0212] For example, assuming that the hotspot code configuration files of the S1 version and the S2 version of the operating system are compatible with each other, when the versions of the operating systems of the source device and the destination device are both S1 version, or when the versions of the operating systems of the source device and the destination device are both S2 version, or the version of the operating system of the source device is S1 version and the version of the operating system of the destination device is S2 version, or the version of the operating system of the source device is S2 version and the version of the operating system of the destination device is S1 version, the mobile phone clone 511B can determine that the hotspot code configuration file can be compatible with the destination device.

[0213] For another example, suppose that the S3 version of the operating system is compatible with the S4 version of the hotspot code configuration file, while the S4 version of the operating system is not compatible with the S3 version of the hotspot code configuration file. In the case where the version of the operating system of the source device is the S4 version and the version of the operating system of the destination device is the S3 version, the mobile phone clone 511B can determine that the hotspot code configuration file is compatible with the destination device; and in the case where the version of the operating system of the source device is the S3 version and the version of the operating system of the destination device is the S4 version, the mobile phone clone 511B can determine that the hotspot code configuration file is not compatible with the operating system of the destination device.

[0214] In other embodiments, the mobile phone clone 511B may also determine whether the target device operating system is compatible with the hotspot code configuration file of the target application by other methods, which are not limited here.

[0215] Through step S613, it can be confirmed again whether the target device operating system is compatible with the hotspot code configuration file of the target application to avoid errors when compiling the hotspot code of the target application or the hotspot code of the target application's patch package based on the hotspot code configuration file that is incompatible with the target device operating system.

[0216] S614: The PMS 56B installs the target application based on the hotspot code configuration file.

[0217] In the case that the destination device operating system is compatible with the hotspot code configuration file of the target application, the PMS 56B may install the target application based on the hotspot code configuration file.

[0218] For example, when the hotspot code configuration file only includes the application hotspot code configuration file of the target application, the PMS 56B can call the multi-language runtime subsystem 532B to compile the hotspot code in the target application through the fast compilation mode, and call the multi-language runtime subsystem 532B to compile the code other than the hotspot code in the target application through the verification compilation mode during the installation of the target application. In this way, the running speed of the target application after installation can be improved.

[0219] For example, when the hotspot code configuration file includes both the application hotspot code configuration file of the target application and the patch package of the target application, the PMS 56B can call the multi-language runtime subsystem 532B to compile the hotspot code in the target application and the patch package of the target application through the fast compilation mode, call the multi-language runtime subsystem 532B to compile the code other than the hotspot code in the target application through the verification compilation mode, and not compile the code other than the hotspot code in the patch package of the target application during the installation of the target application. In this way, the running speed of the target application installation can be improved, and the time for installing the target application can be shortened, thereby shortening the total time for data migration.

[0220] It should be understood that in some embodiments, for the code other than the hotspot code in the patch package of the target application, PMS56B can register the patch package of the target application with the operating system without compiling the code when the target application is installed. When the target device is in an idle state (for example, the target device is not used by the user, the display screen of the target device is off, and the target device is in a charging state), the code other than the hotspot code in the patch package of the target application is compiled. In this way, the time for installing the target application can be shortened, and the functional integrity of the target application can be ensured.

[0221] For example, after installing the target application and restoring the user data of the target application, the PMS 56B may register the patch package of the target application with the operating system of the target device (e.g., a packagedexusage configuration file, a file in the operating system used to record the patch package of the application). Then, when the target device is in an idle state, the PMS 56B may call the multi-language runtime subsystem 532B to compile the patch package of the target application into an odex file (a file format that can be run).

[0222] It should be understood that when the second version of the target application is not obtained, the PMS 56B installs the first version of the target application; when the second version of the target application is obtained, the PMS 56B installs the second version of the target application.

[0223] S615: The multi-language runtime subsystem 532B compiles the hotspot code according to the hotspot code configuration file.

[0224] The multi-language runtime subsystem 532B may compile the hotspot code according to the hotspot code configuration file in response to the call of the PMS 56B. For example, the multi-language runtime subsystem 532B may compile the hotspot code in the target application and / or the patch package of the target application in the fast compilation mode in response to the call of the PMS 56B, and compile other codes in the verification compilation mode or not compile.

[0225] It should be understood that in some embodiments, step S614 and step S615 may be performed in parallel.

[0226] S616: The PMS 56B does not install the target application based on the hotspot code configuration file.

[0227] When the target device operating system is not compatible with the hotspot code configuration file of the target application, or when the mobile phone clone 511B does not receive the hotspot code configuration file of the target application, the PMS 56B does not install the target application based on the hotspot code configuration file.

[0228] It should be understood that if the PMS 56B does not install the target application based on the hotspot code configuration file, the target application is run in an interpreted execution manner during the running process.

[0229] Through the method provided in the embodiment of the present application, the source device can update the received first version of the target application to a second version that is compatible with the operating system of the target device when the operating system of the target device is not compatible. In this way, the problem that the first version of the target application cannot be run on the target device or the first version of the target application has poor performance due to being bound to a lower-performance core in the processor of the target device can be avoided, which is conducive to improving the user experience.

[0230] In addition, the destination device can also compile the hotspot code in the target application and / or the hotspot code in the patch package of the target application in a fast compilation mode based on the target application hotspot code configuration file and / or the patch package hotspot code configuration file sent by the source device, which is beneficial to improving the running speed of the target application on the destination device.

[0231] It should be understood that Figure 6 The content and order of each step in the illustrated embodiment are only examples. In other embodiments, the order of some steps may be swapped, or some steps may be combined or split, which is not limited here. For example, the aforementioned step S602 and step S603 may be swapped in order or combined into one step.

[0232] The embodiment of the present application also provides a method for installing a patch package of an application during data migration.

[0233] Specifically, Figure 7 According to some embodiments of the present application, a schematic diagram of a method for installing a patch package of an application is shown. The execution subject of the installation method may be a destination device, such as a mobile phone clone 511B in the destination device. Figure 7 As shown, the method comprises the following steps:

[0234] S701: Determine whether the target application includes a patch package.

[0235] When installing the target application, the target device determines whether the target application includes a patch package. If the target application includes a patch package, the process goes to step S702, otherwise the process ends.

[0236] S702: Register the patch package of the target application with the operating system.

[0237] When the target application includes a patch package, the target device registers the patch package of the target application with the operating system of the target device.

[0238] For example, the destination device may register the patch package of the target application into a configuration file for recording the patch package of the application in the operating system, such as the aforementioned packagedexusage configuration file.

[0239] S703: When the target device is in an idle state, compile a patch package of the target application.

[0240] The destination device compiles the patch package of the target application when the destination device is in an idle state. For example, the destination device may compile the patch package of the target application into an odex file.

[0241] It should be understood that the destination device being in an idle state may include any of the following situations:

[0242] The destination device is not in use by the user;

[0243] The display screen of the target device is off; the target device is in charging state;

[0244] The current time of the destination device is a preset idle time period (eg, a certain period of time at night).

[0245] Based on the above method, the target device cannot compile the target application patch package into an odex file during the data migration process. Instead, the target application patch package is compiled into an odex file when the target device is in an idle state, which can shorten the total time of data migration.

[0246] The embodiment of the present application also provides a method for installing an application on a destination device during data migration.

[0247] Specifically, Figure 8 According to some embodiments of the present application, a schematic diagram of a method for installing an application is shown. The execution subject of the installation method may be a target device, such as a mobile phone clone 511B in the target device, and the operating system of the target device is a 64-bit operating system. Figure 8 As shown, the method comprises the following steps:

[0248] S801: Determine whether the target application is a 32-bit application.

[0249] When receiving the target application, the destination device can determine whether the target application is a 32-bit application. If the target application is a 32-bit application, it means that the destination device may not be able to run the target application or will bind the target application to a lower-performance core in the destination device processor for running, and the process goes to step S802; otherwise, it means that the destination device can run the target application normally, and the process ends.

[0250] S802: Display a prompt message indicating that the target application is not compatible.

[0251] If the target application is a 32-bit application, the target device displays a prompt message indicating that the target application is not compatible.

[0252] For example, refer to Figure 2 When the mobile phone clone 511B in the mobile phone 20 (as the destination device) detects that the video application (as the target application) sent by the mobile phone 10 is a 32-bit application, a prompt box U2 can be displayed to prompt the user "The video application version is incompatible, do you want to automatically install the new version?".

[0253] It should be understood that in other embodiments, the prompt message of the incompatible target application displayed by the destination device may also be other messages, or the user may be prompted in other forms (such as voice, image, etc.), which is not limited here.

[0254] S803: Determine whether the user operation instructs to update the target application.

[0255] After displaying the prompt message of the incompatible target application, the target device determines whether the user operation indicates to update the target application according to the user operation. If the user operation indicates that the target application needs to be updated, the process goes to step S804; otherwise, the process ends.

[0256] For example, reference Figure 2 When the mobile phone 20 detects the user's selection operation on the "Yes" option U21, it can determine that the target application needs to be updated and go to step S804; when the mobile phone 20 detects the user's operation on the "No" option U22, it can determine that the target application does not need to be updated and end the process.

[0257] S804: Obtain and install a 64-bit target application from the application market.

[0258] When determining that the user operation indicates to update the target application, the destination device obtains and installs the 64-bit target application from the application market.

[0259] Based on the above method, when the target application received by the destination device is a 32-bit application, the destination device can obtain and install a 64-bit target application from the application market when the user instructs to update the target application. In this way, it can avoid the 32-bit target application being unable to run on the destination device or having low running performance, which is conducive to improving user experience.

[0260] The embodiment of the present application also provides another method for installing an application during data migration.

[0261] Specifically, Fig. 9 According to some embodiments of the present application, a schematic diagram of another method for installing an application is shown. The execution subject of the installation method may be a destination device. Fig. 9 As shown, the method comprises the following steps:

[0262] S901: When the relevant data of the target application includes a hotspot code configuration file, determine whether the operating system is compatible with the hotspot code configuration file.

[0263] After receiving the target application and the target application's related data, the target device determines whether the operating system is compatible with the hotspot code configuration file if the target application's related data includes the hotspot code configuration file. If the operating system is compatible with the hotspot code configuration file of the target application, it means that the hotspot code in the target application or the target application's patch package can be compiled in the fast compilation mode, and the process goes to step S902; otherwise, the process goes to step S903.

[0264] It should be understood that the method for the target device to determine whether the operating system is compatible with the hotspot code configuration file can refer to the aforementioned step S613, which will not be repeated here.

[0265] S902: Install the target application based on the hotspot code configuration file.

[0266] The target device installs the target application based on the hotspot code configuration file when the operating system of the target device is compatible with the hotspot code configuration file. During the installation process, the target device can compile the hotspot code in the target application and / or the patch package of the target application in the fast compilation mode and compile the code other than the hotspot code in the target application and / or the patch package of the target application in the verification compilation mode based on the hotspot code configuration file.

[0267] In some embodiments, when a certain hotspot code segment is compiled in the fast compilation mode, if a compilation error occurs, the compilation of the hotspot code segment in the fast compilation mode can be canceled, so that the compiled instructions can be prevented from failing to run normally.

[0268] S903: The target application is not installed based on the hotspot code configuration file.

[0269] The target device does not install the target application based on the hotspot code configuration file if the target device's operating system is not compatible with the hotspot code configuration file. During the installation process, the target device may compile the target application and / or the code in the patch package of the target application in a verification compilation mode.

[0270] S904: Copy the user data of the target application.

[0271] After the target application is installed based on the hotspot code configuration file, or after the target application is installed without being based on the hotspot code configuration file, the target device copies the user data in the relevant data of the target application to the installation directory of the target application.

[0272] Through the above method, when installing the target application, the target device can compile the hotspot code in the target application or the patch package of the target application in a fast compilation mode based on the hotspot code configuration file, which is conducive to improving the running speed of the target application in the target device.

[0273] An embodiment of the present application also provides a computer program product, which, when executed on a device, can enable the device to implement the data migration methods provided in the aforementioned embodiments.

[0274] An embodiment of the present application further provides a readable storage medium, in which instructions are stored. When the instructions are executed by a device, the device implements the data migration method provided by the aforementioned embodiments.

[0275] The embodiment of the present application further provides an electronic device 100, which can be the aforementioned destination device or the aforementioned source device.

[0276] Specifically, Fig.10 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown.

[0277] like Fig.10 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0278] The processor 110 may include one or more processing units, for example, the processor 110 may include a central processing unit (CPU), an application processor (AP), a modem processor, a GPU, an image signal processor (ISP), a microcontroller unit (MCU), a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), a field programmable gate array (FPGA), etc. In some embodiments, different processing units may be independent devices or integrated into one or more processors.

[0279] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. When the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0280] In some embodiments, the processor 110 may be configured to execute instructions corresponding to the data migration method and the application installation method provided in the aforementioned embodiments.

[0281] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, etc.

[0282] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0283] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0284] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160.

[0285] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0286] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0287] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. For example, the interface can also be used to connect other electronic devices, such as an AR device, a display device, etc., so as to display a user interface through the AR device or the display device.

[0288] The charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also power the electronic device through the power management module 141 .

[0289] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.

[0290] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0291] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0292] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0293] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0294] In some embodiments, the electronic device 100 can send the target application and related data of the target application to the destination device through the mobile communication module 150 or the wireless communication module 160, or receive the target application and related data of the target application from the source device, or from the server or the second version of the target application.

[0295] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0296] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0297] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0298] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0299] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. In some embodiments, the program storage area may store an operating system, an application required for at least one function, etc., such as instructions for the data migration method and the application installation method provided in the aforementioned embodiments. The data storage area may store data created during the use of the electronic device 100, such as the aforementioned target application, a patch package for the target application, and a hotspot code configuration file for the target application. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor 110.

[0300] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0301] The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals.

[0302] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0303] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0304] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0305] The earphone jack 170D is used to connect a wired earphone.

[0306] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.

[0307] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0308] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0309] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0310] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0311] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 180M can also contact the human body's pulse to receive blood pressure beating signals.

[0312] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0313] Motor 191 can generate vibration prompts.

[0314] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0315] The SIM card interface 195 is used to connect a SIM card.

[0316] It is understood that the structure of the electronic device 100 shown in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0317] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0318] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A data migration method, characterized in that: include: The first electronic device receives migration data sent by the second electronic device, where the migration data includes a first version of the first application; When the first version of the first application is incompatible with the operating system of the first electronic device, the first electronic device obtains a second version of the first application, wherein the second version of the first application is compatible with the operating system of the first electronic device; The first electronic device installs the second version of the first application.

2. The method according to claim 1, characterized in that The method further comprises: When the first version of the first application is compatible with the operating system of the first electronic device, the first electronic device installs the first version of the first application.

3. The method according to claim 1 or 2, characterized in that: The migration data also includes first hotspot code configuration information corresponding to the first application, where the first hotspot code configuration information is used to indicate a hotspot code in the first application; Furthermore, the method further comprises: The first electronic device compiles the hotspot code indicated by the first hotspot code configuration information in a quick compilation mode during the process of installing the second version of the first application or the process of installing the first version of the first application.

4. The method according to any one of claims 1 to 3, characterized in that The migration data also includes a patch package corresponding to the first application and second hotspot code configuration information corresponding to the patch package, wherein the second hotspot code configuration information is used to indicate the hotspot code in the patch package; And the method further comprises: The first electronic device compiles the hotspot code indicated by the second hotspot code configuration information in a fast compilation mode during the process of installing the second version of the first application or the process of installing the first version of the first application.

5. The method according to claim 4, characterized in that The method further comprises: The first electronic device installs the patch package when the first electronic device is in an idle state.

6. The method according to claim 1, characterized in that The first application is an application program in the second electronic device that is used by the user at a frequency greater than a preset frequency.

7. The method according to claim 1, characterized in that The first version of the first application is a 32-bit application, and the second version of the first application is a 64-bit application.

8. The method according to claim 1, characterized in that The obtaining the second version of the first application includes: The first electronic device displays a first interface, wherein the first interface includes information prompting a user to confirm updating of a first version of the first application; In response to a user determining to update the first version of the first application, the first electronic device obtains the second version of the first application.

9. The method according to claim 3, characterized in that: The step of compiling the hotspot code indicated by the first hotspot code configuration information in a fast compilation mode includes: When the first hotspot code configuration information is compatible with the operating system of the first electronic device, the first electronic device compiles the hotspot code indicated by the first hotspot code configuration information through a fast compilation mode.

10. A data migration method, characterized in that: include: The second electronic device establishes a data migration connection with the first electronic device; The second electronic device sends the first application and first hotspot code configuration information corresponding to the first application to the first electronic device; The first hotspot code configuration information is used to indicate the hotspot code in the first application, and to instruct the first electronic device to compile the hotspot code indicated by the first hotspot code configuration information in a fast compilation mode during the installation of the first application.

11. The method according to claim 10, characterized in that The method further comprises: The second electronic device sends a patch package of the first application to the first electronic device, where the patch package is used to instruct the first electronic device to install the patch package when idle.

12. The method according to claim 11, characterized in that The method further comprises: The second electronic device sends second hotspot code configuration information to the first electronic device, wherein the second hotspot code configuration information is used to indicate the hotspot code in the patch package, and to instruct the second electronic device to compile the hotspot code indicated by the second hotspot code configuration information through a quick compilation mode during the installation of the first application.

13. The method according to any one of claims 10 to 12, characterized in that The second electronic device sends the first application and first hotspot code configuration information corresponding to the first application to the first electronic device, including: When the first hotspot code configuration information is compatible with the operating system of the second electronic device, the second electronic device sends the first application and the first hotspot code configuration information corresponding to the first application to the first electronic device.

14. The method according to any one of claims 1 to 13, characterized in that The first application is an application program in the second electronic device that is used by the user at a frequency greater than a preset frequency.

15. A data migration method, characterized in that: include: The second electronic device is used to send migration data to the first electronic device, where the migration data includes a first version of the first application; The first electronic device is used to obtain and install a second version of the first application when the first version of the first application is incompatible with the operating system of the first electronic device, wherein the second version of the first application is compatible with the operating system of the first electronic device.

16. The method according to claim 15, characterized in that The first electronic device is also used for: When the first version of the first application is compatible with the operating system of the first electronic device, the first version of the first application is installed.

17. The method according to claim 15 or 16, characterized in that The migration data also includes first hotspot code configuration information corresponding to the first application, where the first hotspot code configuration information is used to indicate a hotspot code in the first application; and the first electronic device is further used to: During the process of installing the second version of the first application or the process of installing the first version of the first application, the hotspot code indicated by the first hotspot code configuration information is compiled in a quick compilation mode.

18. The method according to any one of claims 15 to 17, characterized in that The migration data also includes a patch package corresponding to the first application and second hotspot code configuration information corresponding to the patch package, wherein the second hotspot code configuration information is used to indicate the hotspot code in the patch package; and the first electronic device is further used to: During the process of installing the second version of the first application or the process of installing the first version of the first application, the hotspot code indicated by the second hotspot code configuration information is compiled in a quick compilation mode.

19. A readable storage medium, characterized in that: The readable storage medium includes instructions, and when the instructions are executed by the electronic device, the electronic device implements the method according to any one of claims 1 to 18.

20. An electronic device, characterized in that: include: A memory for storing instructions; A processor, configured to execute the instructions so that the electronic device implements the method according to any one of claims 1 to 18.