Cross-user-space data migration method, electronic equipment and storage medium
By setting up data migration modules and cloning modules in electronic devices, data migration in different user spaces in the same device is solved, and a convenient data migration solution is provided.
Patent Information
- Application Number
- CN202311365873.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2043-10-19
AI Technical Summary
The prior art cannot realize the migration of data between different user spaces in the same electronic device, resulting in inconvenience of user use.
By setting up a data migration module and a cloning module in the electronic device, the function of the first system sending application data to the second system is realized, including the installation package of the application, cache data and migration of application setting data.
The data migration of different user spaces in the same electronic device is realized, providing users with convenience of use without the need to use external devices or other applications.
Smart Images

Figure CN119902799A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data cloning, and in particular to a method for data migration across user spaces, an electronic device, and a storage medium. Background Art
[0002] As the performance of electronic devices continues to improve, in order to meet the needs of users, two or more user spaces, which can also be called multiple systems, are set up simultaneously in an electronic device. Users can switch between different user spaces when using the electronic device.
[0003] However, currently, data in different user spaces in the same electronic device cannot be migrated to each other, which brings inconvenience to users. Summary of the invention
[0004] The present application provides a data migration method across user spaces, an electronic device, and a storage medium, which can realize mutual migration of data between different user spaces in the same electronic device, bringing convenience to users.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a method for data migration across user spaces, which is applied to an electronic device, wherein a first system and a second system exist in the electronic device, and the method includes:
[0007] The first system receives a data migration instruction, the data migration instruction comprising a data migration instruction for migrating application data of a first application in the first system to the second system;
[0008] The first system sends application data of the first application to the second system, where the application data includes an installation package of the first application;
[0009] The second system receives application data of the first application sent by the first system;
[0010] The second system installs the first application in the second system.
[0011] In the present application, the first system can send the installation package of the application in the present system to the second system, and after the second system receives the installation package sent by the first system, the second system parses the installation package to install the corresponding application in the second system. The present application can realize the function of transmitting data between the first system and the second system without the help of the functions of external devices or other applications, realizes the mutual migration of data between different user spaces in the same electronic device, and brings convenience to the user.
[0012] As another implementation of the first aspect, the data migration operation is further used to migrate first information of the first application, the application data further includes first information of the first application, and the first information includes cache data and / or application setting data of the first application; the method further includes:
[0013] After the first application is installed in the second system, the first information of the first application is restored in the first application installed by the second system, wherein when the first information includes the cache data, restoring the first information of the first application is to import the cache data; when the first information includes the application setting data, restoring the first information of the first application is to set the first application installed by the second system according to the application setting data.
[0014] In the present application, a method for migrating cache data and application setting data of an application across user spaces is provided. After a second system receives cache data and application setting data sent by a first system, the second system can restore the cache data and application setting data, thereby enriching the migrated data across user spaces.
[0015] As another implementation of the first aspect, the first system receiving a data migration instruction includes:
[0016] The data migration module in the first system receives the data migration instruction.
[0017] In the present application, a data migration module is set in the first system, and the data migration module user realizes data migration across user spaces.
[0018] As another implementation manner of the first aspect, the application data is the first information;
[0019] Before the first system sends the application data of the first application to the second system, the method further includes:
[0020] The data migration module in the first system sends the data migration instruction to the cloning module in the first system, where the data migration instruction includes second information, where the second information represents identification information of application data of the first application program;
[0021] The cloning module in the first system determines, based on the second information in the data migration instruction, that the data to be migrated is data in the first application program;
[0022] The cloning module in the first system sends the data migration instruction to the first application in the first system;
[0023] After receiving the data migration instruction, the first application in the first system sends the application data of the first application to the cloning module in the first system;
[0024] After receiving the application data of the first application, the cloning module in the first system sends the application data of the first application to the data migration module in the first system;
[0025] Accordingly, the first system sends the application data of the first application to the second system, including:
[0026] The data migration module in the first system sends the application data of the first application to the data migration module in the second system;
[0027] Correspondingly, the second system receives the application data of the first application sent by the first system, including:
[0028] The data migration module in the second system receives the application data of the first application program sent by the data migration module in the first system.
[0029] In the present application, a cloning module is set in the first system, and the cloning module is used to receive the data migration instruction sent by the data migration module. The cloning module is also used to determine whether the data to be migrated is the data of the application according to the data migration instruction. Finally, the cloning module sends the data migration instruction to the application, so that the application sends the application data of the application to the data migration module through the cloning module, thereby realizing the backup of the application data.
[0030] As another implementation of the first aspect, the first application includes a second application, and the second application is not an application developed by a manufacturer of the electronic device; the second information includes identification information of application data of the second application;
[0031] The cloning module in the first system sends the data migration instruction to the first application in the first system, including:
[0032] The cloning module in the first system sends the data migration instruction to the BMS module in the first system;
[0033] After receiving the data migration instruction, the BMS module in the first system determines, according to the data migration instruction, that the data to be migrated is data in the second application program;
[0034] The BMS module in the first system sends the data migration instruction to the backup and recovery module of the second application in the first system;
[0035] Correspondingly, after receiving the data migration instruction, the first application in the first system sends the application data of the first application to the cloning module in the first system, including:
[0036] After receiving the data migration instruction, the backup and recovery module of the second application in the first system sends the application data of the second application to the BMS module in the first system;
[0037] After receiving the application data of the second application, the BMS module in the first system sends the application data of the second application to the clone module in the first system.
[0038] In the present application, for third-party applications, a backup and recovery module is provided in the third-party applications. The cloning module in the first system sends a data migration instruction to the backup and recovery module through the BMS module, so that after the backup and recovery module in the third-party application receives the data migration instruction, the backup and recovery module collects the application data and sends the application data to the cloning module through the BMS module, thereby realizing the backup of the application data in the third-party application.
[0039] As another implementation of the first aspect, the first application includes a third application, and the third application is an application developed by a manufacturer of the electronic device; the second information includes identification information of application data of the third application;
[0040] The cloning module in the first system sends the data migration instruction to the first application in the first system, including:
[0041] The cloning module in the first system sends the data migration instruction to the decoupling module of the third application in the first system;
[0042] Correspondingly, after receiving the data migration instruction, the first application in the first system sends the application data of the first application to the cloning module in the first system, including:
[0043] After the decoupling module of the third application in the first system receives the data migration instruction, the decoupling module of the third application in the first system sends the application data of the third application to the cloning module in the first system.
[0044] In the present application, for the self-developed application, a decoupling module is provided in the self-developed application, and the cloning module in the first system sends a data migration instruction to the decoupling module, so that after the decoupling module in the final self-developed application receives the data migration instruction, the decoupling module collects the application data and sends the application data to the cloning module, thereby realizing the backup of the application data in the self-developed application.
[0045] As another implementation of the first aspect, restoring the first information of the first application in the first application installed by the second system includes:
[0046] The data migration module in the second system sends the application data of the first application to the storage module in the second system, where the application data of the first application carries the second information;
[0047] The storage module in the second system stores the application data of the first application, obtains the storage address of the application data of the first application, and the storage module in the second system sends the storage address of the application data of the first application to the data migration module in the second system;
[0048] After receiving the storage address of the application data of the first application, the data migration module in the second system generates a data recovery instruction, where the data recovery instruction includes the storage address of the application data of the first application and the second information;
[0049] The data migration module in the second system sends the data recovery instruction to the cloning module in the second system;
[0050] After receiving the data recovery instruction, the cloning module in the second system determines, according to the data recovery instruction, that the data to be recovered is the data in the first application program;
[0051] The cloning module in the second system sends the data recovery instruction to the first application in the second system;
[0052] After receiving the data recovery instruction, the first application in the second system obtains the application data of the first application from the storage module according to the storage address in the data recovery instruction, and the first application in the second system restores the first information of the first application to the first application.
[0053] In the present application, after the second system receives the application data sent by the first system, it first stores the application data, then sends the storage address of the application data to the corresponding application through the cloning module, and finally the application obtains the application data according to the storage address of the application data and restores the application data, thereby realizing rapid transmission and recovery of data.
[0054] As another implementation of the first aspect, the first application includes a second application, and the second application is not an application developed by a manufacturer of the electronic device;
[0055] The cloning module in the second system sends the data recovery instruction to the first application in the second system, including:
[0056] The cloning module in the second system sends the data recovery instruction to the BMS module in the second system;
[0057] After receiving the data recovery instruction, the BMS module in the second system determines that the data to be recovered is data in the second application program according to the second information in the data recovery instruction;
[0058] The BMS module in the second system sends the data recovery instruction to the backup and recovery module of the second application in the second system;
[0059] Correspondingly, after receiving the data recovery instruction, the first application in the second system obtains the application data of the first application from the storage module according to the storage address in the data recovery instruction, and the first application in the second system restores the first information of the first application to the first application, including:
[0060] After the backup and recovery module of the second application in the second system receives the data recovery instruction, the backup and recovery module of the second application in the second system obtains the application data of the second application from the storage module according to the storage address in the data recovery instruction, and the backup and recovery module of the second application in the second system restores the first information of the second application to the second application.
[0061] In the present application, for third-party applications, the cloning module in the second system transmits data recovery instructions to the backup and recovery module of the third-party application through the BMS module, so that the third-party application can use the backup and recovery module to restore the application data after receiving the data recovery instructions, thereby realizing the recovery of the application data.
[0062] As another implementation of the first aspect, the first application includes a third application, and the third application is an application developed by a manufacturer of the electronic device;
[0063] The cloning module in the second system sends the data recovery instruction to the first application in the second system, including:
[0064] The cloning module in the second system sends the data recovery instruction to the decoupling module of the third application in the second system;
[0065] Correspondingly, after receiving the data recovery instruction, the first application in the second system obtains the application data of the first application from the storage module according to the storage address in the data recovery instruction, and the first application in the second system restores the first information of the first application to the first application, including:
[0066] After the decoupling module of the third application in the second system receives the data recovery instruction, the decoupling module of the third application in the second system obtains the application data of the third application from the storage module according to the storage address in the data recovery instruction, and the decoupling module of the third application in the second system restores the first information of the third application to the third application.
[0067] In this application, for self-developed applications, the cloning module in the second system transmits data recovery instructions to the old module of the third-party application, so that the self-developed application can use the decoupling module to restore the application data after receiving the data recovery instructions, thereby realizing the recovery of the application data.
[0068] As another implementation of the first aspect, the data migration instruction further includes a data migration instruction for migrating file data in the first system to the second system, the file data including at least one of a picture, a video, an audio, and a text;
[0069] After the first system receives the data migration instruction, the method further includes:
[0070] The first system sends the file data to the second system;
[0071] The second system receives the file data sent by the first system;
[0072] The second system restores the file data to the second system.
[0073] In the present application, a data migration method for file data across user spaces is provided, so that the migrated data across user spaces is richer.
[0074] As another implementation of the first aspect, before the first system sends the file data to the second system, the method further includes:
[0075] The data migration module in the first system sends the data migration instruction to the clone module in the first system, where the data migration instruction includes third information, and the third information represents identification information of the file data;
[0076] After receiving the data migration instruction, the cloning module in the first system determines that the data to be migrated is the file data based on the third information in the data migration instruction;
[0077] The cloning module in the first system sends the data migration instruction to the file providing module in the first system;
[0078] The file providing module in the first system receives the data migration instruction and sends the file data to the cloning module in the first system;
[0079] After the cloning module in the first system receives the file data, the cloning module in the first system sends the file data to the data migration module in the first system;
[0080] Accordingly, the first system sends the file data to the second system, including:
[0081] The data migration module in the first system sends the file data to the data migration module in the second system;
[0082] Correspondingly, the second system receives the file data sent by the first system, including:
[0083] The data migration module in the second system receives the file data sent by the first system.
[0084] In the present application, for file data, the data migration module in the first system sends data migration instructions to the file providing module through the cloning module. The file providing module can collect file data, and the file providing module sends file data to the data migration module through the cloning module, so that the data migration module in the first system can send file data to the data migration module in the second system, thereby realizing the migration of file data across user spaces.
[0085] As another implementation of the first aspect, the second system restoring the file data to the second system includes:
[0086] The data migration module in the second system sends the file data to the storage module in the second system;
[0087] After receiving the file data, the storage module in the second system stores the file data and obtains a storage address of the file data, and the storage module in the second system sends the storage address of the file data to a data migration module in the second system;
[0088] After receiving the storage address of the file data, the data migration module in the second system generates a data recovery instruction, the data recovery instruction including the storage address of the file data and the third information, and the data migration module in the second system sends the data recovery instruction to the cloning module in the second system;
[0089] After receiving the data recovery instruction, the cloning module in the second system determines that the data to be recovered is the file data according to the data recovery instruction, and the cloning module in the second system sends the data recovery instruction to the file providing module in the second system;
[0090] After receiving the data recovery instruction, the file providing module in the second system obtains the file data from the storage module based on the storage address of the file data in the data recovery instruction, and the file providing module in the second system recovers the file data to the second system.
[0091] In the present application, after the second system receives the file data sent by the first system, it first stores the file data. The data migration module in the second system sends the storage address of the file data to the file providing module through the cloning module, so that the file providing module can obtain the file data according to the storage address of the file data, and restore the file data, thereby completing the recovery of the file data in the second system.
[0092] As another implementation of the first aspect, after the backup and recovery module of the second application in the second system receives the data recovery instruction, the backup and recovery module of the second application in the second system obtains the application data of the second application from the storage module according to the storage address in the data recovery instruction, and after the backup and recovery module of the second application in the second system restores the first information of the second application to the second application, the method further includes:
[0093] The backup and recovery module of the second application in the second system sends a data recovery result to the BMS module in the second system, where the data recovery result is used to indicate whether the first information of the second application is successfully recovered;
[0094] After receiving the data recovery result, the BMS module in the second system sends the data recovery result to the clone module in the second system;
[0095] After receiving the data recovery result, the cloning module in the second system sends the data recovery result to the data migration module in the second system;
[0096] After receiving the data recovery result, the data migration module in the second system sends the data recovery result to the data migration module in the first system.
[0097] In the present application, after completing the recovery of the application data, the backup and recovery module in the second system sends the data recovery result to the cloning module through the BMS, and the cloning module sends the data recovery result to the data migration module of the second system, so that the second system can send the data recovery result to the data migration module in the first system through the data migration module, so that the user can understand whether the data migration is successful.
[0098] As another implementation of the first aspect, after the cloning module in the first system receives the application data of the first application, the method further includes:
[0099] The cloning module in the first system stores the application data of the first application and obtains the storage address of the application data of the first application;
[0100] The cloning module in the first system sends the storage address of the application data of the first application to the data migration module in the first system;
[0101] After receiving the storage address of the application data of the first application, the data migration module in the first system obtains the application data of the first application from the cloning module in the first system according to the storage address of the application data of the first application.
[0102] In the present application, when transmitting application data in the first system, after receiving the application data, the cloning module in the first system can first back up the application data to obtain the backup address of the application data. The cloning module sends the backup address to the data migration module so that the data migration module can obtain the application data according to the backup address, thereby making the data transmission speed faster and the data backup process more efficient.
[0103] In a second aspect, an electronic device is provided, comprising a processor, wherein the processor is used to run a computer program stored in a memory to implement any method of the first aspect of the present application.
[0104] In a third aspect, a chip system is provided, including a processor, wherein the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any method of the first aspect of the present application.
[0105] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method of any one of the first aspects of the present application is implemented.
[0106] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any one of the methods in the first aspect of the present application.
[0107] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0109] Figure 2 A schematic diagram of a method for performing data migration across user spaces using another electronic device provided in an embodiment of the present application;
[0110] Figure 3 A schematic diagram of a method for using the WeChat application to perform data migration across user spaces provided in an embodiment of the present application;
[0111] Figure 4 A schematic diagram of a method for using Baidu Cloud to migrate data across user spaces provided in an embodiment of the present application;
[0112] Figure 5 A schematic diagram of an interface for data migration across user spaces provided in an embodiment of the present application;
[0113] Figure 6 A schematic diagram of an architecture for data migration across multiple spaces provided in an embodiment of the present application;
[0114] Figure 7 A schematic diagram of the software architecture of a system in an electronic device provided in an embodiment of the present application;
[0115] Figure 8 A schematic diagram of another interface for data migration across user spaces provided in an embodiment of the present application;
[0116] Fig. 9 A schematic diagram of a data backup method for a third-party application in a first system provided in an embodiment of the present application;
[0117] Fig.10 A schematic diagram of a method for recovering data of a third-party application in a second system provided in an embodiment of the present application;
[0118] Fig.11 A schematic diagram of a method for backing up data of a self-developed application in a first system provided in an embodiment of the present application;
[0119] Fig.12A schematic diagram of a method for recovering data of a self-developed application program in a second system provided in an embodiment of the present application;
[0120] Fig.13 A schematic diagram of another interface for data migration across user spaces provided in an embodiment of the present application;
[0121] Fig.14 A schematic diagram of a method for backing up file data in a first system provided in an embodiment of the present application;
[0122] Fig.15 A schematic diagram of a method for recovering file data in a second system provided in an embodiment of the present application;
[0123] Fig.16 A schematic diagram of a method for backing up multiple data to be migrated in a first system provided in an embodiment of the present application;
[0124] Fig.17 A schematic diagram of a method for recovering multiple types of data to be migrated in a second system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0125] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.
[0126] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0127] It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more than two; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0128] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0129] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0130] The data migration method across user spaces provided in the embodiment of the present application can be applied to electronic devices such as tablet computers, mobile phones, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiment of the present application does not limit the specific type of electronic devices.
[0131] Figure 1 The schematic diagram of the structure of an electronic device is 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, 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 touch sensor 180K, etc.
[0132] It is to be understood that the structure illustrated 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.
[0133] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0134] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0135] 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. If 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.
[0136] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.).
[0137] 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.
[0138] The embodiments of the present application do not particularly limit the specific structure of the execution subject of a method for data migration across user spaces, as long as the code of a method for data migration across user spaces according to the embodiments of the present application can be run to perform processing according to a method for data migration across user spaces provided by the embodiments of the present application. For example, the execution subject of a method for data migration across user spaces provided by the embodiments of the present application may be a functional module in an electronic device that can call and execute a program, or a processing device applied to an electronic device, such as a chip.
[0139] As user demands increase, the functions of smart electronic devices become more and more powerful, and people become more and more dependent on electronic devices. Users can use electronic devices for work, life, and other related activities. As an example, users can store data (e.g., documents, videos, audio, pictures, etc.) in electronic devices or perform related processing on the stored data. Among the data stored by users, there are some important data or confidential data. In order to ensure the security of important data and confidential data, a more secure storage method is needed to store important data or confidential data.
[0140] In this regard, dual systems (also referred to as dual user spaces) or multiple systems (multiple user spaces) are set up in some electronic devices. The systems in the electronic devices are independent of each other and do not communicate with each other. Applications can be installed in each system, data can be stored, etc. For the sake of convenience, this application takes the existence of two systems in an electronic device as an example for explanation, and for the sake of convenience, this application refers to one system as the first system and the other system as the second system; or, one system is referred to as the main user space and the other system is referred to as the sub-user space.
[0141] At present, when there are two systems in an electronic device, due to the independence of the two systems and the fact that they are set in the same electronic device, the data between the two systems cannot interact directly, that is, the data in one system cannot be directly migrated to another system. If the user needs to migrate data from one system to another system, it is necessary to use another electronic device or the data transmission capabilities of certain applications to achieve data migration across user spaces, which brings inconvenience to the user. Data migration refers to copying or cutting data in one user space to another user space.
[0142] In one embodiment, if Figure 2 The method shown is to achieve data migration across user spaces with the help of another electronic device. Figure 2 There are a main user space and a sub-user space in the first electronic device, and the data in the main user space in the first electronic device needs to be migrated to the sub-user space in the first electronic device as an example for explanation.
[0143] Specifically, the user enables the main user space in the first electronic device, and shares or sends the migration data that needs to be migrated in the main user space in the first electronic device to the second electronic device. For example, the first electronic device transmits the migration data to the second electronic device via Bluetooth, and the second electronic device stores the migration data after receiving it. The user enables the sub-user space in the first electronic device, and uses the second electronic device to share or send the stored migration data to the sub-user space in the first electronic device, so that the sub-user space of the first electronic device contains data migrated from the main user space of the first electronic device, thereby achieving the purpose of transmitting data from the main user space to the sub-user space in an electronic device. If it is necessary to migrate data from the sub-user space in the first electronic device to the main user space, the data can also be transmitted with the help of the second electronic device according to the above method, which will not be repeated here.
[0144] In another embodiment, a method for data migration across user spaces is implemented with the help of a data transmission function of an application in an electronic device. Figure 3 There are a main user space and a sub-user space in the electronic device, and there is a first WeChat application in the main user space, and the first WeChat application uses a first account to log in; there is a second WeChat application in the sub-user space, and the second WeChat application uses a second account to log in.
[0145] Specifically, when the user uses the main user space of the electronic device, he opens the first WeChat application and sends the migration data that needs to be migrated to the second account under the first WeChat application. After the user enters the sub-user space and opens the second WeChat application, the migration data sent by the first account can be received, so that the migration data sent by the main user space exists in the sub-user space of the electronic device, thereby achieving the purpose of transmitting data from the main user space to the sub-user space in an electronic device. Of course, in actual use, applications other than WeChat can also be used to migrate data across user spaces, such as QQ applications or DingTalk applications.
[0146] In another embodiment, if Figure 4 The method shown is to achieve data migration across user spaces with the help of Baidu Netdisk. Figure 4 There are main user space and sub-user space in the electronic device. When the user uses the main user space of the electronic device, the migration data to be migrated is uploaded to Baidu Cloud through Baidu Netdisk for storage. When the user uses the sub-user space of the electronic device, the migration data is downloaded from Baidu Cloud through Baidu Netdisk, so that the sub-user space obtains the migration data migrated from the main user space, realizing the purpose of transmitting data from the main user space to the sub-user space in an electronic device.
[0147] It can be seen that the existing methods of realizing data migration across user spaces all require the use of another electronic device or the introduction of other accounts for data transmission. The data transmission efficiency of using another electronic device for data transmission is low, and the security of data cannot be guaranteed when introducing other accounts for data transmission. In addition, for data transmission using cloud space, the transmission between the electronic device and the server is designed, and the data transmission efficiency is low. Moreover, when data migration across user spaces is carried out with the help of another electronic device or with the help of the data transmission capabilities of certain applications, only pictures or videos can be transmitted between the two systems, and locally cached application data and setting data cannot be transmitted. In addition, when performing data migration across user spaces according to the current method, batch transmission of data cannot be performed, the data transmission efficiency is low, and the security is relatively low.
[0148] In view of this, in order to achieve the effect of direct data transmission between two systems in the same electronic device, this application proposes a data migration method across user spaces, which can achieve data migration across user spaces on a single device without the need for other accounts or servers. Figure 5 As shown, the electronic device displays when in use Figure 5 (a) interface in the Figure 5 The interface (a) in FIG. 1 displays the options of “moving data out” and “moving files in”. If the user needs to migrate data across user spaces, the user can click the option of “moving data out” or “moving files in”. In response to the user clicking the option of “moving data out”, the electronic device displays Figure 5 (b) interface, Figure 5 The (b) interface in the figure shows the data categories that can be migrated across users, such as pictures, videos, audio, text, third-party applications, and self-developed applications. Users can Figure 5 In the (b) interface, select the data category that needs to be migrated, for example, Figure 5 In the (b) interface, after the user clicks on pictures, videos, third-party applications and self-developed applications, the options of pictures, videos, third-party applications and self-developed applications are in a selected state. In response to the user clicking on the "OK" option, the electronic device displays Figure 5 (c) interface, Figure 5 The (c) interface shows pictures, videos, third-party applications, and self-developed applications that can be moved. Users can Figure 5 In the (c) interface, select the data to be migrated, for example, Figure 5 In the interface (c), after the user selects picture 1, video 1, WeChat and YOYO, picture 1, video 1, WeChat and YOYO are in a selected state. In response to the user clicking the "migration" option, the electronic device performs a data migration operation across user spaces.
[0149] Among them, third-party applications are applications installed in electronic devices that are not developed by the manufacturer of the electronic device, such as WeChat applications, Weibo applications, and Baidu applications, etc. Self-developed applications are applications developed by the manufacturer of the electronic device installed in the electronic device, such as YOYO applications, etc.
[0150] Specifically, when there are multiple systems (user spaces) in an electronic device, a data migration module (also referred to as a data migration service or data migration middleware) for performing data transmission across user spaces is provided in each system (also referred to as each user space), so as to facilitate the use of the data migration module to perform data migration across user spaces. For ease of explanation, take the case where there are two systems (two user spaces) in an electronic device as an example, where one user space is called the main user space and the other user space is called the sub-user space. A data migration module is provided in the main user space of the electronic device, and a data migration module is provided in the sub-user space of the electronic device. The data migration modules in the same electronic device can communicate with each other to realize the mutual transmission of data in different user spaces.
[0151] Take the migration of data from the main user space to the sub-user space as an example. Figure 6As shown, the electronic device backs up the migration data that needs to be migrated in the main user space to the data migration module in the main user space, and the data migration module in the main user space sends the migration data to be migrated to the data migration module in the sub-user space. After the data migration module in the sub-user space receives the migration data sent by the data migration module in the main user space, it restores the migration data to the corresponding position for storage. In this application, the migration data may include file data, third-party application data, self-developed application data, and system setting data. Among them, the file data may include pictures, videos, audio, and text, etc., and the process of file data migrating from one system to another may be a copying process. The third-party application data is the data of the third-party application, and the third-party application data may include the installation package of the third-party application, cached data, application setting data (such as WeChat chat background picture), etc., and the cached data may include chat records and local cache information (such as cached video), etc. The self-developed application data is the data in the self-developed application, and the self-developed application data may include the installation package of the self-developed application, cached data, application setting data, etc. The system setting data may include the desktop wallpaper of the electronic device, the display language of the electronic device, the text display font, the text display font size, etc. The data migration of third-party application data, self-developed application data, and system setting data includes the data backup process and the data recovery process. The third-party application data, self-developed application data, and system setting data are backed up in the main user space, and the backed-up third-party application data, self-developed application data, and system setting data are sent to the sub-user space; after the sub-user space receives the third-party application data, self-developed application data, and system setting data, the third-party application data, self-developed application data, and system setting data are restored in the sub-user space.
[0152] Below, before introducing the method of the present application, the software system of the electronic device involved in the embodiment of the present application is described. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to exemplify the software system of the electronic device.
[0153] Figure 7 is a block diagram of a software system of an electronic device provided in an embodiment of the present application. Figure 7 The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into three layers, from top to bottom, namely, the application layer, the system service layer, and the system framework layer.
[0154] The application layer may include a series of application packages, and the application layer may receive user operations. Figure 7As shown, the application layer may include a setting application, a first application, a second application, a third application, a fourth application, and the like. Among them, the first application and the second application are self-developed applications, such as "intelligent voice assistant application" and "smart life application". The third application and the fourth application are third-party applications installed in electronic devices, such as "Baidu application", "WeChat application", etc. There is a decoupling module in both the first application and the second application. There is a backup and recovery module (backup agent module) in both the third application and the fourth application. The functions of the decoupling module and the backup agent module are similar, and both are used to back up and restore data in the corresponding application. Specifically, the decoupling module of the first application is used to back up and restore data that can be backed up in the first application. The decoupling module of the second application is used to back up and restore data that can be backed up in the second application. The backup and recovery module of the third application is used to back up and restore data in the third application. The backup and recovery module of the fourth application is used to back up and restore data in the fourth application. The setting application is a system application, and the setting application is used to set the functions of the electronic device.
[0155] The system service layer may include a data migration module and a cloning module, wherein the data migration module is used to send the data that needs to be migrated in the system to the data migration module of other systems to achieve data migration across user spaces; the cloning module is used to collect the data that needs to be migrated in the system and store the data that needs to be migrated in the cloning module so that the data migration module can obtain the data that needs to be migrated from the cloning module. For example, the cloning module can collect application data and file data, etc. In addition, the cloning module can also process the data that needs to be migrated, such as compression and encryption.
[0156] The system framework layer may include a backup manager service module (BMS module) and a content provider for file data (provider module, which may also be called a file providing module). Among them, the BMS module is used to transmit data or instructions between the clone module and the backup agent module of the application. For example, the data of the first application backed up in the backup agent module of the first application is forwarded to the clone module for processing through the BMS module. The provider module is used to provide stored file data, such as pictures, audio, video, and text.
[0157] It should be noted that the structure of each system in the electronic device can adopt the above Figure 7 For example, the main user space and the sub-user space both use the above Figure 7In the system architecture, when the main user space and the sub-user space perform data migration across user spaces, the data migration module in the main user space communicates with the data migration module in the sub-user space to achieve data migration between the two user spaces.
[0158] Next, a method for data migration across user spaces proposed in this application is described.
[0159] When an application is installed in the first system but not in the second system, the first system can directly send the installation package of the application to the second system so that the second system can install the application, eliminating the need for the user to search and download the installation package. The migration method for the installation package of the application includes:
[0160] The first system receives a data migration instruction, which is used to instruct the first system to migrate an installation package of an application (first application) to the second system. The application is a third-party application and / or a self-developed application, and can also be other applications.
[0161] The first system sends an installation package of an application to the second system. The data of the application can be recorded as application data, and the application data can include the installation package, local cache data (also known as cache data), and application setting data. The local cache data (also known as cache data) and application setting data can also be recorded as the first information.
[0162] After the second system receives the installation package of the application sent by the first system, the second system installs the corresponding application in the second system.
[0163] Next, a method of data migration will be described when the same application is installed in the first system and the second system.
[0164] like Figure 8 As shown, when the user uses the first system, the electronic device displays Figure 8 (a) interface in the Figure 8 In the interface (a) of FIG. 1 , the option of “moving out data” is displayed. If the user needs to migrate data across user spaces, the user can click the option of “moving out data”. After receiving the operation of the user clicking the option of “moving out data”, the electronic device displays Figure 8 (b) interface, Figure 8The (b) interface in the figure shows the categories of data that can be migrated across user spaces, such as pictures, videos, audio, documents, third-party applications, and self-developed applications. If the user needs to migrate data in a third-party application, the user can click the "Third-party Application" option. After receiving the user's click on the "Third-party Application" option, the third-party application option of the electronic device is selected; the user clicks the "OK" option, and the electronic device displays Figure 8 (c) interface, Figure 8 The (c) interface in the figure shows the third-party applications that can be migrated across user spaces, such as WeChat, QQ, and Weibo. The user can select the third-party application that needs to be migrated. For example, if the user needs to migrate the data in the WeChat application, the user clicks "WeChat" and the WeChat application is displayed as selected. Figure 8 After the user selects a third-party application, the user can click the "Migrate" option. After receiving the user's operation of clicking the "Migrate" option (data migration operation), the electronic device generates a data migration instruction and sends the data migration instruction to the data migration module in the first system. In actual use, the user can select multiple third-party applications at the same time to achieve simultaneous migration of data of multiple third-party applications. For example, the user can select Figure 8 "WeChat Application" and "QQ Application" in the (c) interface.
[0165] In actual applications, users select Figure 8 After selecting the WeChat application on the (c) interface, the types of data that can be migrated in WeChat can also be displayed, such as WeChat application setting data, WeChat chat history, local cache data in WeChat, etc., so that the user can select the category of data to be migrated.
[0166] Combine the following Figure 8 , describes the method of migrating data from third-party applications across user spaces. Fig. 9 As shown, Fig. 9 FIG. 4 shows the process of migrating data in a third-party application A (a second application) across user spaces.
[0167] S11, a data migration module in the first system receives a data migration instruction, where the data migration instruction includes key information (second information) of the data to be migrated.
[0168] The first system may be a main user space or a sub-user space, which is not limited here. The data to be migrated is application data in a third-party application A.
[0169] If the data to be migrated is data in a third-party application A, the key information of the data to be migrated may include the application name or application identifier of the third-party application A, the installation time, the type identifier of the data to be migrated selected by the user, etc. For example, the type identifier of the chat record may be "A1", the type identifier of the application setting data may be "A2", etc., and the type identifier may be set as needed.
[0170] S12, the data migration module in the first system sends a data migration instruction to the clone module in the first system.
[0171] S13, after the cloning module in the first system receives the data migration instruction, the cloning module in the first system determines that the data to be migrated belongs to the data of the third-party application according to the key information in the data migration instruction.
[0172] Specifically, since the key information includes the application name or application identifier of the third application A, the cloning module can determine the application that needs to migrate data based on the application name or application identifier in the key information, query the category of the application that needs to migrate data to which it belongs, and determine that the application that needs to migrate data belongs to a third-party application; or, the category identifier of the application that needs to migrate data is carried in the key information, and the category identifier is used to characterize whether the application for the data to be migrated belongs to a third-party application or a self-developed application. For example, if the application that needs to migrate data is a third-party application, the key information carries the category identifier "1" of the third application.
[0173] As an example, the key information includes "WeChat", and the cloning module can determine that the data in WeChat needs to be migrated based on the key information. The cloning module can also determine that the category to which WeChat belongs is a third-party application.
[0174] Specifically, after determining that the data to be migrated is data in the third-party application A, the cloning module can also query the data query path of the third-party application that needs to be migrated, and write the data query path of the third-party application A into the key information of the third-party application A in the data migration instruction. For example, if the data in WeChat needs to be migrated, the cloning module can query the data query path of WeChat, and write the data query path corresponding to WeChat into the key information corresponding to WeChat.
[0175] S14, the clone module in the first system sends a data migration instruction to the BMS module in the first system.
[0176] S15, after the BMS module in the first system receives the data migration instruction, the BMS module in the first system determines that the data to be migrated is data in the third-party application A according to key information in the data migration instruction.
[0177] In another embodiment, if the data migration instruction carries a data query path, after receiving the data migration instruction, the BMS module in the first system may send the data migration instruction to the third-party application A according to the data query path in the data migration instruction.
[0178] S16, the BMS module in the first system sends a data migration instruction to the backup agent module of the third-party application A in the first system.
[0179] S17, after the backup agent module of the third-party application in the first system receives the data migration instruction, the backup agent module retrieves / collects the first data (application data) in the third-party application A, where the first data is the data in the third-party application A that can be migrated.
[0180] Specifically, when the key information in the data migration instruction includes the type identifier of the data to be migrated, the backup agent module of the third-party application in the first system collects the first data according to the type identifier of the data to be migrated.
[0181] In this embodiment, the first data may include application setting data in the third-party application A, local cache data, chat records, etc.
[0182] S18, the backup agent module of the third-party application A in the first system sends the first data to the BMS module in the first system.
[0183] In this embodiment, the backup agent module of the third-party application A packages the first data and sends the packaged first data to the BMS module in the first system.
[0184] When packaging the first data, the first data may also be tagged, and the tag of the first data contains the corresponding key information of the first data, so that after receiving the first data, the second system can parse which application the first data should be restored to. The key information of the first data is the same as the key information of the data to be migrated. For example, if the first data is a chat record in WeChat, the key information in the first data is "WeChat".
[0185] S19, after the BMS module in the first system receives the first data, the BMS module in the first system sends the first data to the clone module in the first system.
[0186] S20, after receiving the first data, the cloning module in the first system backs up the first data to obtain a backup address of the first data.
[0187] Specifically, after receiving the first data, the cloning module may process the first data, for example, the cloning module compresses and / or encrypts the first data to obtain the processed first data. The cloning module backs up the processed first data to obtain the backup address of the first data. In this embodiment, compressing the first data can reduce the storage space occupied by the first data, thereby achieving the purpose of saving storage space. In addition, encrypting the first data can ensure the storage and transmission security of the first data.
[0188] S21, the cloning module in the first system sends the backup address of the first data to the data migration module of the first system.
[0189] In another implementation, the above step S20 may also be: after receiving the first data, the cloning module sends the first data to the data migration module of the first system. Alternatively, after processing the first data, the cloning module sends the processed first data to the data migration module of the first system.
[0190] S22, after receiving the backup address of the first data, the data migration module of the first system obtains the first data from the cloning module in the first system according to the backup address of the first data.
[0191] Alternatively, after receiving the backup address of the first data, the data migration module of the first system sends a data query instruction to the clone module of the first system, and the data query instruction includes the backup address of the first data. After receiving the data query instruction, the clone module of the first system queries the first data according to the backup address in the data query instruction, and the clone module of the first system sends the first data to the data migration module of the first system.
[0192] S23, after the data migration module of the first system obtains the first data, the data migration module of the first system sends the first data to the data migration module of the second system.
[0193] In this embodiment, the first data may also be compressed data, encrypted data, or compressed and encrypted data.
[0194] The following is combined with Fig.10 , a process of restoring the first data after the second system receives the first data is described.
[0195] S31, the data migration module in the second system receives the first data sent by the data migration module in the first system, where the first data is data in the third-party application A.
[0196] The first data carries key information of the first data.
[0197] S32, the data migration module in the second system sends the first data to the storage module in the second system so that the storage module in the second system stores the first data and obtains the storage address of the first data, and the storage module in the second system sends the storage address of the first data to the data migration module in the second system.
[0198] S33, the data migration module in the second system receives the storage address of the first data sent by the storage module, and the data migration module in the second system generates a data recovery instruction based on the storage address of the first data.
[0199] The data recovery instruction includes the storage address of the first data and key information of the first data.
[0200] S34, the data migration module of the second system sends a data recovery instruction to the clone module in the second system.
[0201] S35, after receiving the data recovery instruction, the cloning module in the second system determines, according to the data recovery instruction, that the first data is data in a third-party application.
[0202] Specifically, the method for determining that the first data is data in a third-party application includes:
[0203] Since the data recovery instruction carries the key information of the first data, after receiving the data recovery instruction, the cloning module in the second system can determine that the first data is data in a third-party application according to the key information of the first data in the data recovery instruction.
[0204] S36, the clone module in the second system sends a data recovery instruction to the BMS module in the second system.
[0205] S37, after the BMS module in the second system receives the data recovery instruction, the BMS module in the second system determines that the first data is data in the third-party application A according to the data recovery instruction.
[0206] In this embodiment, the method for the BMS module to determine that the first data is data in the third-party application A is the same as the above step S35. Please refer to the description of step S35, which will not be repeated here.
[0207] S38, the BMS module in the second system sends a data recovery instruction to the backup agent module of the third-party application A to which the first data belongs.
[0208] S39, after the backup agent module of the third-party application A in the second system receives the data recovery instruction, it obtains the first data from the storage module according to the storage address of the first data in the data recovery instruction, and restores the first data to the third-party application A to obtain first result information (data recovery result), and the first result information is used to indicate whether the recovery of the first data is successful.
[0209] In this embodiment, after the backup agent module of the third-party application A receives the data recovery instruction, it extracts the key information in the data recovery instruction and verifies the key information to determine whether the first data in the data recovery instruction belongs to its own application data. For example, the key information of the first data is "WeChat". After the backupagent module of the third-party application A receives the data recovery instruction, it determines that "WeChat" in the key information is its own application name, and then determines that the first data in the data recovery instruction belongs to its own application data, and can restore the first data.
[0210] S40, the backup agent module of the third-party application A in the second system sends first result information to the BMS module in the second system.
[0211] S41, after the BMS module in the second system receives the first result information, the BMS module in the second system sends the first result information to the clone module in the second system.
[0212] S42: After the cloning module in the second system receives the first result information, the cloning module in the second system sends the first result information to the data migration module in the second system.
[0213] S43, after the data migration module in the second system receives the first result information, the data migration module in the second system sends the first result information to the data migration module in the first system.
[0214] In this embodiment, after receiving the first result information, the data migration module in the first system sends the first result information to the application layer of the first system for display, so that the user can understand whether the first data migration is successful.
[0215] In the above, after the second system receives the first data, the first data is stored, and the storage address of the first data is transmitted between the modules of the second system, which can reduce the data transmission amount and increase the data transmission speed.
[0216] In another achievable manner, the first data may be directly transmitted between the modules of the second system, including:
[0217] After executing step S31, the data migration module in the second system generates a data recovery instruction according to the first data, and the data recovery instruction includes the first data. Execute steps S34 to S38. After receiving the data recovery instruction, the backup agent module in the second system extracts the first data in the data recovery instruction, recovers the first data and obtains the first result information. Execute steps S40 to S43.
[0218] When transmitting the first data, if the first data is encrypted and / or compressed data, the cloning module in the second system may decrypt and / or decompress the first data.
[0219] Secondly, combined Fig.11 , a method for migrating data in a self-developed application across user spaces is described. Specifically, a method for migrating data in a self-developed application B (a third application) across user spaces is described as an example.
[0220] S51, the data migration module in the first system receives a data migration instruction, wherein the data migration instruction includes key information (second information) of the data to be migrated. The data to be migrated is application data of the self-developed application B.
[0221] In this embodiment, the self-developed application B is a self-developed application that needs to perform data migration. The key information of the data to be migrated includes the application name or application identifier of the self-developed application, the type identifier of the data to be migrated (setting data, cache data, etc.), etc.
[0222] S52: The data migration module in the first system sends a data migration instruction to the clone module in the first system.
[0223] S53, after the cloning module in the first system receives the data migration instruction, the cloning module in the first system determines that the data to be migrated is the data of the self-developed application B according to the key information in the data migration instruction.
[0224] Specifically, the cloning module determines that the data to be migrated is data of the self-developed application B according to the key information of the data to be migrated in the data migration instruction.
[0225] S54, the cloning module in the first system sends a data migration instruction to the decoupling module of the self-developed application B.
[0226] S55, after the decoupling module of the self-developed application B in the first system receives the data migration instruction, the decoupling module of the self-developed application B in the first system collects the second data in the self-developed application B, and the second data is the data in the self-developed application B that needs to be migrated.
[0227] The second data may include application setting data, local cache data, historical query data, etc.
[0228] S56, the decoupling module of the self-developed application B in the first system sends second data to the clone module in the first system.
[0229] In this embodiment, the second data includes key information of the second data, so that the second system can determine the location where the second data should be restored after receiving the second data. The key information of the second data is the same as the key information of the data to be migrated in step S51.
[0230] S57, after the cloning module in the first system receives the second data, the cloning module in the first system backs up the second data to obtain a backup address of the second data.
[0231] In another embodiment, after the cloning module in the first system receives the second data, the cloning module in the first system sends the second data to the data migration module of the first system.
[0232] In another embodiment, after receiving the second data, the cloning module in the first system processes the second data, for example, the cloning module compresses and / or encrypts the second data to obtain processed second data. The cloning module in the first system sends the processed second data to the data migration module of the first system.
[0233] In another embodiment, after receiving the second data, the clone module in the first system processes the second data to obtain the processed second data. The clone module in the first system backs up the processed second data to obtain the storage address of the second data.
[0234] S58, the cloning module in the first system sends the backup address of the second data to the data migration module in the first system.
[0235] S59, after the data migration module in the first system receives the backup address of the second data, the data migration module in the first system reads the second data from the clone module of the first system according to the backup address of the second data.
[0236] S60: After the data migration module in the first system acquires the second data, the data migration module in the first system sends the second data to the data migration module in the second system.
[0237] In another embodiment, if the data migration module in the first system receives the second data sent by the cloning module, the data migration module in the first system directly sends the second data to the data migration module in the second system.
[0238] In another embodiment, if the data migration module in the first system receives the processed second data sent by the cloning module, after the data migration module in the first system receives the processed second data, the data migration module in the first system sends the processed second data to the data migration module in the second system.
[0239] The following is combined with Fig.12 , a process of restoring the second data after the second system receives the second data is described.
[0240] S61: The data migration module in the second system receives second data sent by the data migration module in the first system.
[0241] S62, the data migration module in the second system sends the second data to the storage module in the second system, the storage module stores the second data, obtains the storage address of the second data, and the storage module of the second system sends the storage address of the second data to the data migration module in the second system.
[0242] S63, the data migration module in the second system receives the storage address of the second data sent by the storage module, and the data migration module in the second system generates a data recovery instruction according to the storage address of the second data, wherein the data recovery instruction includes the storage address of the second data and key information of the second data.
[0243] S64: The data migration module in the second system sends a data recovery instruction to the clone module in the second system.
[0244] S65, after the cloning module in the second system receives the data recovery instruction, the cloning module in the second system determines that the second data belongs to the data in the self-developed application B according to the key information in the second data in the data recovery instruction.
[0245] In this embodiment, since the data recovery instruction contains key information of the second data, and the key information includes the application name or application identifier of the self-developed application B, it can be determined based on the key information that the second data is the data of the self-developed application B, and then it can be determined that the second data should be restored to the self-developed application B.
[0246] S66, the cloning module in the second system sends a data recovery instruction to the decoupling module of the self-developed application B.
[0247] S67, after the decoupling module of the self-developed application B in the second system receives the data recovery instruction, it obtains the second data from the storage module according to the storage address of the second data, restores the second data to the self-developed application B, and obtains second result information (data recovery result), and the second result information indicates whether the second data recovery is successful or failed.
[0248] S68, the decoupling module of the self-developed application B in the second system sends second result information to the clone module in the second system.
[0249] S69, after receiving the second result information, the cloning module in the second system sends the second result information to the data migration module in the second system.
[0250] S70, after the data migration module in the second system receives the second result information, the data migration module in the second system sends the second result information to the data migration module in the first system.
[0251] In this embodiment, after the data migration module in the first system receives the second result information, the data migration module in the first system sends the second result information to the application layer in the first system, so that the user can understand the migration status of the second data according to the second result information.
[0252] In another achievable manner, the second data can be directly transmitted between the modules of the second system, including:
[0253] After executing step S61, the data migration module in the second system generates a data recovery instruction according to the second data, and the data recovery instruction includes the second data. Execute steps S64 to S66. After receiving the data recovery instruction, the decoupling module in the second system extracts the second data in the data recovery instruction, recovers the second data and obtains the first result information. Execute steps S68 to S70.
[0254] When transmitting the second data, if the second data is encrypted and / or compressed data, the cloning module in the second system may decrypt and / or decompress the second data.
[0255] Finally, combine Fig.13 , a method for migrating file data across user spaces is described. In this application, file data may include text, pictures, videos, and audio, etc.; wherein, file data may be data collected from a camera, data saved by an application, and data obtained by screenshots. For example, when a user uses WeChat to chat, the user saves pictures and text in the chat content, and the saved pictures and text belong to file data. For another example, when a user uses an application to browse a page, the content on the page is saved by taking a screenshot, and the saved page content exists in the form of file data.
[0256] like Fig.13 As shown, when the user uses the first system, the electronic device displays Fig.13 (a) interface in the Fig.13In the interface (a) of FIG. 1 , the option of “moving out data” is displayed. If the user needs to migrate data across user spaces, the user can click the option of “moving out data”. After receiving the operation of the user clicking the option of “moving out data”, the electronic device displays Fig.13 (b) interface, Fig.13 The (b) interface in the figure shows the categories of data that can be migrated across user spaces, such as pictures, videos, audio, documents, third-party applications, and self-developed applications. If the user needs to migrate file data, the user can click one or more of the options of "Pictures", "Videos", "Audio", and "Text". After receiving the user's operation of clicking the "Pictures" and "Videos" options, the "Pictures" and "Videos" options of the electronic device are selected; the user clicks the "OK" option, and the electronic device displays Fig.13 (c) interface, Fig.13 The (c) interface in FIG. 1 displays the file data that can be migrated across user spaces, such as picture 1, picture 2, picture 3, video 1, and video 2. The user can select the pictures and videos to be migrated. For example, if the user wants to migrate picture 1 and video 1, the user clicks picture 1 and video 1, and picture 1 and video 1 are selected. Fig.13 As shown in (c) in the figure, after the user selects the picture 1 and the video 1, the user can click the "migration" option, and the electronic device receives the user's operation of clicking the "migration" option (data migration operation), generates a data migration instruction, and sends the data migration instruction to the data migration module in the first system.
[0257] Combine the following Fig.14 , a method for migrating file data across user spaces is described. Specifically, the data to be migrated is file data C as an example for description.
[0258] S71, a data migration module in the first system receives a data migration instruction, where the data migration instruction includes key information of the data to be migrated.
[0259] In this embodiment, the key information of the data to be migrated includes the format, size, creation date, file number, etc. of the file data.
[0260] S72: The data migration module in the first system sends a data migration instruction to the clone module in the first system.
[0261] S73, after the cloning module in the first system receives the data migration instruction, the cloning module in the first system determines that the data to be migrated is file data C according to key information in the data migration instruction.
[0262] S74, the cloning module in the first system sends a data migration instruction to the provider module (file providing module).
[0263] S75, after the provider module in the first system receives the data migration instruction, the provider module in the first system collects third data, where the third data is the file data C to be migrated indicated by the user in the data migration instruction.
[0264] The third data may include text, pictures, videos and / or audio, etc.
[0265] S76, the provider module in the first system sends third data to the clone module in the first system.
[0266] In this embodiment, the third data includes key information of the third data, so that the second system can determine the position where the third data should be restored after receiving the third data.
[0267] S77, after the cloning module in the first system receives the third data, the cloning module in the first system backs up the third data to obtain a backup address of the third data.
[0268] In another embodiment, after the cloning module in the first system receives the third data, the cloning module in the first system sends the third data to the data migration module of the first system.
[0269] In another embodiment, after the cloning module in the first system receives the third data, the cloning module processes the third data, for example, the cloning module compresses and / or encrypts the third data, etc., to obtain processed third data. The cloning module in the first system sends the processed third data to the data migration module of the first system.
[0270] In another embodiment, after receiving the third data, the clone module in the first system processes the third data to obtain the processed third data. The clone module in the first system backs up the processed third data to obtain the backup address of the second data.
[0271] S78, the cloning module in the first system sends the backup address of the third data to the data migration module in the first system.
[0272] S79, after the data migration module in the first system receives the backup address of the third data, the data migration module in the first system reads the third data from the clone module of the first system according to the backup address of the third data.
[0273] S80: After the data migration module in the first system acquires the third data, the data migration module in the first system sends the third data to the data migration module in the second system.
[0274] In another embodiment, if the data migration module in the first system receives the third data sent by the cloning module, the data migration module in the first system sends the third data to the data migration module in the second system.
[0275] In another embodiment, if the data migration module in the first system receives the processed third data sent by the cloning module, after the data migration module in the first system receives the processed third data, the data migration module in the first system sends the processed third data to the data migration module in the second system.
[0276] The following is combined with Fig.15 , a process of restoring the third data after the second system receives the third data is described.
[0277] S81, the data migration module in the second system receives third data sent by the data migration module in the first system.
[0278] S82, a data migration module in the second system generates a data recovery instruction according to the third data, where the data recovery instruction includes the third data.
[0279] S83: The data migration module in the second system sends a data recovery instruction to the clone module in the second system.
[0280] S84, after the cloning module in the second system receives the data recovery instruction, the cloning module in the second system determines that the third data belongs to the file data C according to the key information of the third data in the data recovery instruction.
[0281] In one embodiment, if the third data is encrypted data, the cloning module in the second system needs to decrypt the third data. If the third data is compressed data, the cloning module in the second system needs to decompress the third data.
[0282] S85, the clone module in the second system sends a data recovery instruction to the provider module in the second system.
[0283] S86, after receiving the data recovery instruction, the provider module in the second system recovers the third data to the corresponding file storage location in the second system, and obtains third result information (data recovery result), where the third result information indicates that the third data recovery is successful or failed.
[0284] S87, the provider module in the second system sends third result information to the clone module in the second system.
[0285] S88, after receiving the third result information, the cloning module in the second system sends the third result information to the data migration module in the second system.
[0286] S89, after the data migration module in the second system receives the third result information, the data migration module in the second system sends the third result information to the data migration module in the first system.
[0287] In this embodiment, after the data migration module in the first system receives the third result information, the data migration module in the first system sends the third result information to the application layer in the first system, so that the user can understand the migration status of the file data according to the third result information.
[0288] In another achievable manner, after receiving the third data, the data migration module in the second system may also send the third data to the storage module in the second system, and the storage module in the second system stores the third data to obtain the storage address of the third data. The storage module in the second system sends the storage address of the third data to the data migration module in the second system, and after receiving the storage address of the third data, the data migration module in the second system generates a data recovery instruction according to the storage address of the third data, and the data recovery instruction includes the storage address of the third data and the key information of the third data. Execute the above steps S83 to S85. After receiving the data recovery instruction, the provider module in the second system obtains the third data from the storage module according to the storage address of the third data, and recovers the third data in the second system to obtain the third result information. Execute the above steps S87 to S89.
[0289] Next, combine Fig.16 , describes a method for simultaneously migrating data of third-party applications, data of self-developed applications, and file data across user spaces.
[0290] S101, a data migration module in the first system receives a data migration instruction, where the data migration instruction includes key information of the data to be migrated, where the data to be migrated is data of a third-party application A, data of a self-developed application B, and data of file data C.
[0291] S102: The data migration module in the first system sends a data migration instruction to the clone module in the first system.
[0292] S103, after the cloning module in the first system receives the data migration instruction, the cloning module in the first system determines that the data to be migrated is data in a third-party application, data in the self-developed application B, and file data according to key information in the data migration instruction.
[0293] S104: When the data to be migrated is data of a third-party application, the data migration module in the first system sends a data migration instruction to the BMS module in the first system.
[0294] Alternatively, the data migration module in the first system sends a first migration instruction to the BMS module in the first system, where the first migration instruction includes key information of the data of the third-party application A.
[0295] The key information of the data of the third-party application A includes the application name or application identifier of the third-party application A, etc.
[0296] S105, after receiving the data migration instruction, the BMS module in the first system determines that the data to be migrated is the data of the third-party application A according to the key information in the data migration instruction.
[0297] Alternatively, after receiving the first migration instruction, the BMS module in the first system determines that the data to be migrated is data of the third-party application A according to key information in the first migration instruction.
[0298] S106, the BMS module in the first system sends a data migration instruction to the backup agent module of the third-party application A.
[0299] Alternatively, the BMS module in the first system sends a first migration instruction to the backup agent module of the third-party application A.
[0300] S107: After the backup agent module of the third-party application A in the first system receives the data migration instruction, the backup agent module of the third-party application A in the first system collects the first data in the third-party application A.
[0301] S108, the backup agent module of the third-party application A in the first system sends first data to the BMS module in the first system.
[0302] S109, after the BMS module in the first system receives the first data, the BMS module in the first system sends the first data to the clone module in the first system.
[0303] S110, after receiving the first data, the cloning module in the first system backs up the first data and obtains a backup address of the first data.
[0304] In this embodiment, after the cloning module in the first system receives the first data, the cloning module in the first system processes the first data, for example, compression processing and encryption processing, etc., to obtain the processed first data, and the cloning module in the first system backs up the processed first data to obtain the storage address of the first data.
[0305] S111, the cloning module in the first system sends a backup address of the first data to the data migration module in the first system.
[0306] S112, after the data migration module in the first system receives the backup address of the first data, the data migration module in the first system obtains the first data from the cloning module in the first system according to the backup address of the first data.
[0307] S113, when the data to be migrated is the data of the self-developed application B, the cloning module in the first system sends a data migration instruction to the decoupling module of the self-developed application B.
[0308] Alternatively, the cloning module in the first system sends a second migration instruction to the decoupling module of the self-developed application B, where the second migration instruction includes key information of the data of the self-developed application B.
[0309] S114, after the decoupling module of the self-developed application B in the first system receives the data migration instruction, the decoupling module of the self-developed application B in the first system collects the second data of the self-developed application B, where the second data is the data in the self-developed application B that needs to be migrated.
[0310] S115, the decoupling module of the self-developed application B in the first system sends second data to the clone module in the first system.
[0311] S116, after the cloning module in the first system receives the second data, the cloning module in the first system backs up the second data and obtains a backup address of the second data.
[0312] S117, the cloning module in the first system sends the backup address of the second data to the data migration module in the first system.
[0313] S118, after the data migration module in the first system receives the backup address of the second data, the data migration module in the first system obtains the second data from the cloning module in the first system according to the backup address of the second data.
[0314] S119: When the data to be migrated is file data C, the cloning module in the first system sends a data migration instruction to the provider module in the first system.
[0315] Alternatively, the cloning module in the first system sends a third migration instruction to the provider module in the first system, where the third migration instruction includes key information of the file data C.
[0316] S120: After receiving the data migration instruction, the provider module in the first system collects third data, which is file data C that needs to be migrated.
[0317] S121, the provider module in the first system sends third data to the clone module in the first system.
[0318] S122, after receiving the third data, the cloning module in the first system backs up the third data and obtains a backup address of the third data.
[0319] In this embodiment, after the cloning module in the first system receives the third data, the cloning module in the first system processes the third data, for example, compression processing and encryption processing, etc., to obtain processed third data, and the cloning module in the first system backs up the processed third data to obtain a backup address of the third data.
[0320] S123, the cloning module in the first system sends the backup address of the third data to the data migration module in the first system.
[0321] S124, after the data migration module in the first system receives the backup address of the third data, the data migration module in the first system obtains the third data from the cloning module in the first system according to the backup address of the third data.
[0322] S125, after the data migration module in the first system obtains the first data, the second data and the third data, the data migration module in the first system sends the first data, the second data and the third data to the data migration module in the second system.
[0323] Specifically, after the data migration module in the first system obtains the first data, the second data and the third data, the data migration module in the first system packages the first data, the second data and the third data to obtain a data packet of the data to be migrated, and the data migration module in the first system sends the data packet of the data to be migrated to the data migration module in the second system, and the data packet includes the first data, the second data and the third data.
[0324] The first data includes key information of the first data, and the key information of the first data includes an application name or an application identifier of the third-party application A, and the like.
[0325] The second data includes key information of the second data, and the key information of the second data includes the application name or application identifier of the self-developed application B, etc.
[0326] The third data includes key information of the third data. The key information of the third data includes data type of the third data. The data type includes picture, video, text, audio, etc.
[0327] Finally, combine Fig.17 , describes a method for the second system to recover data of third-party applications, data of self-developed applications, and file data.
[0328] S201, a data migration module in a second system receives a data packet sent by a data migration module in a first system, where the data packet includes first data, second data, and third data.
[0329] In another embodiment, the data migration module in the second system receives the first data, the second data and the third data sent by the data migration module in the first system.
[0330] S202: After receiving the data packet, the data migration module in the second system generates a data recovery instruction based on the data packet, where the data recovery instruction includes the first data, the second data and the third data.
[0331] S203: The data migration module in the second system sends a data recovery instruction to the cloning module in the second system.
[0332] S204, after the cloning module in the second system receives the data recovery instruction, the cloning module in the second system parses the data recovery instruction and determines that the first data in the data recovery instruction is data in the third-party application A, the second data is data in the self-developed application B, and the third data is file data C.
[0333] In this embodiment, if the first data in the data packet is compressed data, the cloning module in the second system needs to decompress the first data. If the first data in the data packet is encrypted data, the cloning module in the second system needs to decrypt the second data. The processing of the second data and the third data is not described in detail here.
[0334] S205 , for the first data, the cloning module in the second system sends a data recovery instruction to the BMS module in the second system.
[0335] Alternatively, the clone module in the second system sends the first data or the first recovery instruction to the BMS module in the second system, where the first recovery instruction includes the first data.
[0336] S206, after receiving the data recovery instruction, the BMS module in the second system parses the data recovery instruction to determine that the first data is data of the third-party application A.
[0337] S207, the BMS module in the second system sends a data recovery instruction to the backup agent module of the third-party application A.
[0338] Alternatively, the BMS module in the second system sends the first data or the first recovery instruction to the backup agent module of the third-party application A.
[0339] S208, after receiving the data recovery instruction, the backup agent module of the third-party application A in the second system recovers the first data to the third-party application A and obtains first result information, where the first result information indicates whether the first data is recovered successfully.
[0340] S209, the backup agent module of the third-party application A in the second system sends first result information to the BMS module in the second system.
[0341] S210, after receiving the first result information, the BMS module in the second system sends the first result information to the clone module in the second system.
[0342] In another embodiment, after receiving the first result information, the cloning module in the second system sends the first result information to the data migration module in the second system.
[0343] S212, for the second data, the cloning module in the second system sends a data recovery instruction to the decoupling module of the self-developed application B in the second system.
[0344] Alternatively, the clone module in the second system sends the second data or a second recovery instruction to the decoupling module of the self-developed application B in the second system, and the second recovery instruction includes the second data.
[0345] S213, after receiving the data recovery instruction, the decoupling module of the self-developed application B in the second system recovers the second data to the self-developed application B and obtains second result information, where the second result information indicates whether the second data has been recovered successfully.
[0346] S214, the decoupling module of the self-developed application B in the second system sends second result information to the cloning module of the second system.
[0347] In another embodiment, the cloning module in the second system sends the second result information to the data migration module of the second system.
[0348] S216: For the third data, the clone module in the second system sends a data recovery instruction to the provider module in the second system.
[0349] Alternatively, the clone module in the second system sends the third data or the third recovery instruction to the provider module in the second system, where the third recovery instruction includes the third data.
[0350] S217, after receiving the data recovery instruction, the provider module in the second system recovers the third data to the storage location of the file data in the second system, and obtains third result information, where the third result information indicates whether the third data is recovered successfully.
[0351] S218, the provider module in the second system sends third result information to the clone module in the second system.
[0352] In another embodiment, the cloning module in the second system sends third result information to the data migration module in the second system.
[0353] S219, the cloning module in the second system sends result information to the data migration module in the second system, where the result information includes first result information, second result information, and third result information.
[0354] S220: The data migration module in the second system sends result information to the data migration module in the first system.
[0355] After the data migration module in the first system receives the result information sent by the data migration module in the second system, the data migration module in the first system sends the result information to the application layer in the first system so that the user can understand the data migration status according to the result information.
[0356] In another achievable manner, the method for simultaneously migrating data of a third-party application, data of a self-developed application, and file data across user spaces may also include:
[0357] The process from step S101 to step S109 is performed.
[0358] The process from step S113 to step S115 is performed.
[0359] Execute the process from step S119 to step S121 described above.
[0360] After receiving the first data, the second data and the third data, the cloning module in the system compresses the first data, the second data and the third data to obtain a data packet of the data to be migrated.
[0361] The cloning module in the first system stores the data packet of the data to be migrated, and obtains the storage address of the data packet of the data to be migrated.
[0362] The cloning module in the first system sends the storage address of the data packet of the data to be migrated to the data migration module in the first system.
[0363] After receiving the storage address of the data packet of the data to be migrated, the data migration module in the first system obtains the data packet of the data to be migrated from the cloning module in the first system according to the storage address of the data packet of the data to be migrated.
[0364] The data migration module in the first system sends a data packet of data to be migrated to the data migration module in the second system.
[0365] In another achievable manner, after the data migration module in the second system receives the data packet sent by the data migration module in the first system, the data migration module in the second system sends the data packet to the storage module, and the storage module stores the data packet to obtain the storage address of the data packet. The storage module in the second system sends the storage address of the data packet to the data migration module in the second system.
[0366] After receiving the storage address of the data packet, the data migration module in the second system generates a data recovery instruction according to the storage address of the data packet, and the data recovery instruction includes the storage address of the data packet, key information of the first data, key information of the second data, and key information of the third data. The storage address of the data packet may include the storage address of the first data, the storage address of the second data, and the storage address of the third data.
[0367] Execute the above steps S203 to S220.
[0368] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0369] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0370] The embodiment of the present application also provides a computer program product. When the computer program product is executed on a first device, the first device can implement the steps in the above-mentioned method embodiments.
[0371] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0372] The embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.
[0373] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0374] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0375] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for data migration across user spaces, characterized in that: Applied to an electronic device, wherein the electronic device has a first system and a second system, the method includes: The first system receives a data migration instruction, the data migration instruction comprising a data migration instruction for migrating application data of a first application in the first system to the second system; The first system sends application data of the first application to the second system, where the application data includes an installation package of the first application; The second system receives application data of the first application sent by the first system; The second system installs the first application in the second system.
2. The method according to claim 1, characterized in that The data migration operation is further used to migrate first information of the first application, the application data further includes first information of the first application, and the first information includes cache data and / or application setting data of the first application; the method further includes: After the first application is installed in the second system, the first information of the first application is restored in the first application installed by the second system, wherein when the first information includes the cache data, restoring the first information of the first application is importing the cache data; when the first information includes the application setting data, restoring the first information of the first application is setting the first application installed by the second system according to the application setting data.
3. The method according to claim 2, characterized in that The first system receives a data migration instruction, including: The data migration module in the first system receives the data migration instruction.
4. The method according to claim 3, characterized in that The application data is the first information; Before the first system sends the application data of the first application to the second system, the method further includes: The data migration module in the first system sends the data migration instruction to the cloning module in the first system, where the data migration instruction includes second information, where the second information represents identification information of application data of the first application program; The cloning module in the first system determines, based on the second information in the data migration instruction, that the data to be migrated is data in the first application program; The cloning module in the first system sends the data migration instruction to the first application in the first system; After receiving the data migration instruction, the first application in the first system sends the application data of the first application to the cloning module in the first system; After receiving the application data of the first application, the cloning module in the first system sends the application data of the first application to the data migration module in the first system; Accordingly, the first system sends the application data of the first application to the second system, including: The data migration module in the first system sends the application data of the first application to the data migration module in the second system; Correspondingly, the second system receives the application data of the first application sent by the first system, including: The data migration module in the second system receives the application data of the first application program sent by the data migration module in the first system.
5. The method according to claim 4, characterized in that The first application includes a second application, and the second application is not an application developed by a manufacturer of the electronic device; the second information includes identification information of application data of the second application; The cloning module in the first system sends the data migration instruction to the first application in the first system, including: The cloning module in the first system sends the data migration instruction to the BMS module in the first system; After receiving the data migration instruction, the BMS module in the first system determines, according to the data migration instruction, that the data to be migrated is data in the second application program; The BMS module in the first system sends the data migration instruction to the backup and recovery module of the second application in the first system; Correspondingly, after receiving the data migration instruction, the first application in the first system sends the application data of the first application to the cloning module in the first system, including: After receiving the data migration instruction, the backup and recovery module of the second application in the first system sends the application data of the second application to the BMS module in the first system; After receiving the application data of the second application, the BMS module in the first system sends the application data of the second application to the clone module in the first system.
6. The method according to claim 4, characterized in that The first application includes a third application, and the third application is an application developed by a manufacturer of the electronic device; the second information includes identification information of application data of the third application; The cloning module in the first system sends the data migration instruction to the first application in the first system, including: The cloning module in the first system sends the data migration instruction to the decoupling module of the third application in the first system; Correspondingly, after receiving the data migration instruction, the first application in the first system sends the application data of the first application to the cloning module in the first system, including: After the decoupling module of the third application in the first system receives the data migration instruction, the decoupling module of the third application in the first system sends the application data of the third application to the cloning module in the first system.
7. The method according to claim 4, characterized in that Restoring the first information of the first application in the first application installed by the second system includes: The data migration module in the second system sends the application data of the first application to the storage module in the second system, where the application data of the first application carries the second information; The storage module in the second system stores the application data of the first application, obtains the storage address of the application data of the first application, and the storage module in the second system sends the storage address of the application data of the first application to the data migration module in the second system; After receiving the storage address of the application data of the first application, the data migration module in the second system generates a data recovery instruction, wherein the data recovery instruction includes the storage address of the application data of the first application and the second information; The data migration module in the second system sends the data recovery instruction to the cloning module in the second system; After receiving the data recovery instruction, the cloning module in the second system determines, according to the data recovery instruction, that the data to be recovered is the data in the first application program; The cloning module in the second system sends the data recovery instruction to the first application in the second system; After receiving the data recovery instruction, the first application in the second system obtains the application data of the first application from the storage module according to the storage address in the data recovery instruction, and the first application in the second system restores the first information of the first application to the first application.
8. The method according to claim 7, characterized in that The first application includes a second application, and the second application is not an application developed by a manufacturer of the electronic device; The cloning module in the second system sends the data recovery instruction to the first application in the second system, including: The cloning module in the second system sends the data recovery instruction to the BMS module in the second system; After receiving the data recovery instruction, the BMS module in the second system determines that the data to be recovered is data in the second application program according to the second information in the data recovery instruction; The BMS module in the second system sends the data recovery instruction to the backup and recovery module of the second application in the second system; Correspondingly, after receiving the data recovery instruction, the first application in the second system obtains the application data of the first application from the storage module according to the storage address in the data recovery instruction, and the first application in the second system restores the first information of the first application to the first application, including: After the backup and recovery module of the second application in the second system receives the data recovery instruction, the backup and recovery module of the second application in the second system obtains the application data of the second application from the storage module according to the storage address in the data recovery instruction, and the backup and recovery module of the second application in the second system restores the first information of the second application to the second application.
9. The method according to claim 7, characterized in that The first application includes a third application, and the third application is an application developed by a manufacturer of the electronic device; The cloning module in the second system sends the data recovery instruction to the first application in the second system, including: The cloning module in the second system sends the data recovery instruction to the decoupling module of the third application in the second system; Correspondingly, after receiving the data recovery instruction, the first application in the second system obtains the application data of the first application from the storage module according to the storage address in the data recovery instruction, and the first application in the second system restores the first information of the first application to the first application, including: After the decoupling module of the third application in the second system receives the data recovery instruction, the decoupling module of the third application in the second system obtains the application data of the third application from the storage module according to the storage address in the data recovery instruction, and the decoupling module of the third application in the second system restores the first information of the third application to the third application.
10. The method according to claim 3, characterized in that The data migration instruction also includes a data migration instruction for migrating file data from the first system to the second system, wherein the file data includes at least one of a picture, a video, an audio, and a text; After the first system receives the data migration instruction, the method further includes: The first system sends the file data to the second system; The second system receives the file data sent by the first system; The second system restores the file data to the second system.
11. The method according to claim 10, characterized in that Before the first system sends the file data to the second system, the method further includes: The data migration module in the first system sends the data migration instruction to the clone module in the first system, where the data migration instruction includes third information, and the third information represents identification information of the file data; After receiving the data migration instruction, the cloning module in the first system determines that the data to be migrated is the file data based on the third information in the data migration instruction; The cloning module in the first system sends the data migration instruction to the file providing module in the first system; After receiving the data migration instruction, the file providing module in the first system sends the file data to the cloning module in the first system; After the cloning module in the first system receives the file data, the cloning module in the first system sends the file data to the data migration module in the first system; Accordingly, the first system sends the file data to the second system, including: The data migration module in the first system sends the file data to the data migration module in the second system; Correspondingly, the second system receives the file data sent by the first system, including: The data migration module in the second system receives the file data sent by the first system.
12. The method according to claim 11, characterized in that The second system restoring the file data to the second system includes: The data migration module in the second system sends the file data to the storage module in the second system; After receiving the file data, the storage module in the second system stores the file data and obtains a storage address of the file data, and the storage module in the second system sends the storage address of the file data to a data migration module in the second system; After receiving the storage address of the file data, the data migration module in the second system generates a data recovery instruction, the data recovery instruction including the storage address of the file data and the third information, and the data migration module in the second system sends the data recovery instruction to the cloning module in the second system; After receiving the data recovery instruction, the cloning module in the second system determines that the data to be recovered is the file data according to the data recovery instruction, and the cloning module in the second system sends the data recovery instruction to the file providing module in the second system; After receiving the data recovery instruction, the file providing module in the second system obtains the file data from the storage module based on the storage address of the file data in the data recovery instruction, and the file providing module in the second system recovers the file data to the second system.
13. The method according to claim 8, characterized in that After the backup and recovery module of the second application in the second system receives the data recovery instruction, the backup and recovery module of the second application in the second system obtains the application data of the second application from the storage module according to the storage address in the data recovery instruction, and after the backup and recovery module of the second application in the second system recovers the first information of the second application to the second application, the method further includes: The backup and recovery module of the second application in the second system sends a data recovery result to the BMS module in the second system, where the data recovery result is used to indicate whether the first information of the second application is successfully recovered; After receiving the data recovery result, the BMS module in the second system sends the data recovery result to the clone module in the second system; After receiving the data recovery result, the cloning module in the second system sends the data recovery result to the data migration module in the second system; After receiving the data recovery result, the data migration module in the second system sends the data recovery result to the data migration module in the first system.
14. The method according to claim 4, characterized in that After the cloning module in the first system receives the application data of the first application, the method further includes: The cloning module in the first system stores the application data of the first application and obtains the storage address of the application data of the first application; The cloning module in the first system sends the storage address of the application data of the first application to the data migration module in the first system; After receiving the storage address of the application data of the first application, the data migration module in the first system obtains the application data of the first application from the cloning module in the first system according to the storage address of the application data of the first application.
15. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is used to run a computer program stored in a memory, so that the electronic device implements the method according to any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Data migration method and device
CN105912951A
Method of restoring to factory settings, mobile terminal and device with storage function
CN107704337A
Information processing method and device
CN108108173A
File migration method, electronic equipment and storage medium
CN116069723A
Recovering performance of a file system post-migration
US9122689B1