CN116089358B - Data migration method and electronic equipment - Google Patents

Data migration method and electronic equipment Download PDF

Info

Publication number
CN116089358B
CN116089358B CN202210622137.5A CN202210622137A CN116089358B CN 116089358 B CN116089358 B CN 116089358B CN 202210622137 A CN202210622137 A CN 202210622137A CN 116089358 B CN116089358 B CN 116089358B
Authority
CN
China
Prior art keywords
data
migration
electronic device
migrated
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210622137.5A
Other languages
Chinese (zh)
Other versions
CN116089358A (en
Inventor
郝婧
张娇
赵金龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210622137.5A priority Critical patent/CN116089358B/en
Publication of CN116089358A publication Critical patent/CN116089358A/en
Application granted granted Critical
Publication of CN116089358B publication Critical patent/CN116089358B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/119Details of migration of file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs

Abstract

The embodiment of the application provides a data migration method and electronic equipment, which are applied to the technical field of electronics. According to the method, a preset duration threshold for completing data migration is determined through the data volume of data to be migrated in the first electronic device, target migration data in the data to be migrated is determined based on the preset duration threshold, and the target migration data is migrated to the second electronic device. Therefore, according to the embodiment of the application, a part of data is determined from the data to be migrated as target migration data according to the preset time threshold of the data to be migrated, the target migration data on the old equipment is quickly migrated to the new equipment, and the time required by migrating the target migration data to the new equipment is reduced, so that a user can quickly use the new equipment in a short time.

Description

Data migration method and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a data migration method and an electronic device.
Background
With the continuous development of information technology, electronic devices such as mobile phones and tablet computers are increasingly popular, and the updating speed of the electronic devices is also increased, so that the frequency of replacing the electronic devices by users is increased to a certain extent.
When a user needs to replace an electronic device, data in the old device may need to be migrated to the new device. However, current data migration methods require a long time to migrate data in an old device to a new device.
Disclosure of Invention
The embodiment of the application provides a data migration method and electronic equipment, which are used for reducing the data migration time by determining part of key target migration data from data to be migrated of old equipment and migrating the key target migration data to new equipment.
In a first aspect, an embodiment of the present application provides a data migration method, including: the first electronic device establishes connection with the second electronic device; the first electronic equipment determines a preset duration threshold for completing the data migration according to the data volume of the data to be migrated; the first electronic device determines target migration data according to a preset duration threshold; the target migration data is a part of the data to be migrated; the first electronic device displays a first interface; the first interface comprises a first option, the first option comprises a data volume of target migration data and target migration duration, the target migration duration is a duration required for estimating migration of the target migration data to the second electronic equipment, and the target migration duration is smaller than or equal to a preset duration threshold; in response to an operation input to the first interface, the first electronic device migrates the target migration data to the second electronic device.
The first interface may be a migration mode selection interface. In this way, according to the preset time threshold of the data to be migrated, the method and the device for migrating the target migration data determine a part of the data to be migrated from the data to be migrated as the target migration data, and quickly migrate the target migration data on the old device to the new device, so that the time required by migrating the target migration data to the new device is reduced, and a user can quickly use the new device in a short time.
In one possible implementation manner, the determining, by the first electronic device, a preset duration threshold for completing the data migration according to the data amount of the data to be migrated includes: the first electronic device estimates a first migration duration required for migrating the data to be migrated to the second electronic device according to the data quantity of the data to be migrated; the first electronic device determines a preset duration threshold corresponding to the first migration duration. In this way, the method for determining the preset time threshold by estimating the first migration time length for migrating the data to be migrated to the second electronic device can accurately measure the preset time threshold by combining the estimated first migration time length, namely accurately estimating the maximum value of the allowable migration time length when migrating the target migration data to the second electronic device.
In one possible implementation manner, the estimating, by the first electronic device, a first migration duration required for migrating the data to be migrated to the second electronic device according to the data amount of the data to be migrated includes: the method comprises the steps that first electronic equipment obtains data amounts respectively corresponding to various migration data included in data to be migrated; the first electronic device estimates a first migration duration required for migrating the data to be migrated to the second electronic device according to the data volume of each migration data in the plurality of migration data and the corresponding migration speed. Therefore, the migration speed of different types of migration data in the actual data migration process may be different, and therefore, the first migration duration can be estimated more accurately by combining the data quantity of each type of migration data and the corresponding migration speed.
In one possible implementation manner, the estimating, by the first electronic device, a first migration duration required for migrating the data to be migrated to the second electronic device according to the data amount of each of the plurality of migration data and the corresponding migration speed includes: the first electronic equipment takes the data volume of each migration data and the ratio of the corresponding migration speed as the corresponding migration duration of each migration data; the first electronic equipment sums the migration duration corresponding to each migration data in the plurality of migration data to obtain a first migration duration of the data to be migrated.
In a possible implementation manner, the determining, by the first electronic device, a preset duration threshold corresponding to the first migration duration includes: the first electronic equipment determines a data model corresponding to data to be migrated according to a time interval in which a first migration time is located; the first electronic device determines a preset duration threshold corresponding to the data model. Therefore, the method and the device can determine the preset time length threshold based on the preset data model, and the determination mode of the preset time length threshold is simpler.
In one possible implementation manner, the determining, by the first electronic device, target migration data according to a preset duration threshold includes: the method comprises the steps that first electronic equipment determines the data quantity of basic key data in data to be migrated; the first electronic device estimates a second migration duration required for migrating the basic key data to the second electronic device according to the data quantity of the basic key data; and the first electronic equipment determines target migration data according to the second migration duration and a preset duration threshold. Therefore, the target migration data can be determined by comparing the second migration duration of the basic key data with the preset duration threshold value, so that more important data are determined as the target migration data to migrate to the second electronic equipment on the basis that the target migration duration of the finally determined target migration data is smaller than or equal to the preset duration threshold value, and the target migration data can be directly used by a user when the user uses the second electronic equipment after the machine change, thereby improving the use experience of the user.
In one possible implementation manner, the determining, by the first electronic device, target migration data according to the second migration duration and the preset duration threshold includes: and under the condition that the second migration time length is greater than a preset time length threshold value, the first electronic equipment takes part of key data in the basic key data as target migration data. Therefore, when the second migration time is longer than the preset time threshold, it is indicated that all basic key data cannot be migrated to the second electronic device within the preset time threshold, and therefore, part of key data in the basic key data needs to be used as target migration data, so that the migration time required when the target migration data is migrated to the second electronic device is shorter, and the purpose of quick machine change is achieved.
In one possible implementation manner, the first electronic device uses part of the basic key data as target migration data, including: the first electronic equipment acquires the priority of each key data in the basic key data; and the first electronic equipment sequentially removes the key data in the basic key data according to the order of the priority from low to high until the migration duration of the residual key data is less than or equal to a preset duration threshold value, and takes the residual key data as target migration data. Therefore, because the basic key data with higher priority is the data which is easier to use by the user, some basic key data with higher priority can be used as target migration data to migrate to the second electronic equipment, and the basic key data with higher priority can be used by the user when the second electronic equipment is used after the quick change is realized.
In one possible implementation manner, the determining, by the first electronic device, target migration data according to the second migration duration and the preset duration threshold includes: under the condition that the second migration time length is smaller than a preset time length threshold value, the first electronic device determines recommended application data in the data to be migrated; the first electronic device takes the basic key data and the recommended application data as target migration data. Therefore, when the second migration duration is smaller than the preset duration threshold, it is indicated that all basic key data can be migrated to the second electronic device within the preset duration threshold, and therefore when the basic key data is migrated to the second electronic device, recommended application data can be migrated to the second electronic device together, and when a user uses the second electronic device after changing the machine, application programs corresponding to the recommended application data can be directly used, and the use experience of the user is improved.
In one possible implementation manner, the determining, by the first electronic device, recommended application data in the data to be migrated includes: the method comprises the steps that first electronic equipment obtains priority of each application data in data to be migrated; the first electronic equipment sequentially adds application data on the basis of basic key data according to the order of priority from high to low until the migration time length of the added N application data and basic key data is greater than a preset time length threshold value, and takes the added first N-1 application data as recommended application data; n is a positive integer. Therefore, the application data with high priority is application data which is easier to use by the user after the machine change, so that the application data with high priority can be used as recommended application data to be migrated to the second electronic equipment, and the use experience of the user after the machine change is improved.
In one possible implementation manner, the first electronic device obtains a priority of each application data in the data to be migrated, including: the method comprises the steps that first electronic equipment obtains using parameters of application programs corresponding to application data; the usage parameters include a usage duration and/or a usage frequency; the first electronic device determines the priority of each application data according to the use parameters. In this way, the priority of each application data in the data to be migrated can be accurately determined according to the actual use condition of the user.
In one possible implementation manner, the first electronic device determines the priority of each application data according to the usage parameter, including: and the first electronic equipment performs weighted summation on the using duration and the using frequency of the application program corresponding to each application data to obtain the priority of each application data. In this way, the priority of the application data is determined by combining the use duration and the use frequency, so that the finally determined priority of each application data is more accurate.
In one possible implementation, the first interface further includes a first control; in response to an operation input to the first interface, the first electronic device migrates target migration data to the second electronic device, including: responding to the operation of the first control input in the first interface, and displaying a second interface by the first electronic equipment; in response to operation of the second control input in the second interface, the first electronic device migrates the target migration data to the second electronic device. The first control can be a first mode selection control, the second interface can be a first data selection interface, and the second control can be a first migration control.
In one possible implementation, after the first electronic device migrates the target migration data to the second electronic device, the method further includes: under the condition that all target migration data are migrated to the second electronic equipment, the first electronic equipment is disconnected with the second electronic equipment; under the condition that connection is established with the second electronic equipment again, the first electronic equipment displays a prompt box; the prompt box comprises a data list of non-migrated data and a confirmation control, wherein the non-migrated data is data except target migration data in the data to be migrated; in response to operation of the validation control input, the first electronic device migrates the non-migrated data to the second electronic device. Therefore, the method and the device can migrate the data which are not migrated last time to the second electronic device under the condition that the first electronic device and the second electronic device are connected again, so that the use experience of a user is further improved.
In addition, the embodiment of the application also provides a data migration method, which comprises the following steps: the first electronic device establishes connection with the second electronic device; when the data volume of the data to be migrated in the first electronic equipment is larger than a preset threshold, the first electronic equipment determines first target migration data which is part of the data to be migrated; the first electronic device displays a first option in a first target interface, wherein the first option comprises the data volume of first target migration data and first target migration duration, and the first target migration duration is a duration required by estimating migration of the first target migration data to the second electronic device; when the data volume of the data to be migrated in the first electronic equipment is smaller than or equal to a preset threshold value, the first electronic equipment determines second target migration data which are part of the data to be migrated, and the data volume of the second target migration data is smaller than that of the first target migration data; the first electronic device displays a second option in the second interface, wherein the second option comprises the data volume of second target migration data and second target migration duration, and the second target migration duration is a duration required by estimating to migrate the second target migration data to the second electronic device.
The preset threshold value can be set according to actual conditions, the first electronic device can be old device, and the second electronic device can be new device. In this way, when the data volume of the data to be migrated in the old equipment is larger than the preset threshold value, the data volume of the data to be migrated in the old equipment is larger, and the first target migration data can be determined from the data to be migrated; when the data amount of the data to be migrated in the old equipment is smaller than or equal to the preset threshold value, the data amount of the data to be migrated in the old equipment is smaller, and the second target migration data can be determined from the data to be migrated. The second target migration data has a smaller data volume than the first target migration data.
Therefore, the first electronic device can migrate part of data in the data to be migrated to the second electronic device, and quick machine changing is realized. When the data amount of the data to be migrated in the first electronic device is more, the target migration data to be migrated to the second electronic device for the first time is more; when the data volume of the data to be migrated in one electronic device is smaller, the target migration data to be migrated to the second electronic device for the first time is smaller.
In a second aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory is configured to store a computer program, and the processor is configured to invoke the computer program to execute the data migration method described above.
In a third aspect, an embodiment of the present application proposes a computer readable storage medium, in which a computer program or an instruction is stored, which when executed implements the above-mentioned data migration method.
In a fourth aspect, an embodiment of the present application proposes a computer program product, including a computer program, which when executed causes a computer to perform the above-mentioned data migration method.
The effects of each possible implementation manner of the second aspect to the fourth aspect are similar to those of the first aspect and the possible designs of the first aspect, and are not described herein.
Drawings
FIG. 1 is a schematic diagram of a system architecture to which a data migration method according to an embodiment of the present application is applicable;
fig. 2 is a schematic diagram of a hardware system of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic software system structure of an electronic device according to an embodiment of the present application;
fig. 4 is a flowchart of a first electronic device according to an embodiment of the present application to migrate target migration data to a second electronic device;
Fig. 5 is a schematic diagram of an interface displayed on a second electronic device when the first electronic device and the second electronic device are connected according to an embodiment of the present application;
fig. 6 is a schematic diagram of an interface displayed on a first electronic device when the first electronic device and a second electronic device according to an embodiment of the present application are connected;
FIG. 7 is a flowchart illustrating a method for estimating migration duration according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a method for determining a data model according to an embodiment of the present application;
FIG. 9 is an interface schematic diagram of a data migration method according to an embodiment of the present application;
fig. 10 is a flowchart of a first electronic device migrating non-migrated data to a second electronic device according to an embodiment of the present application;
FIG. 11 is a schematic diagram of an interface for migrating non-migrated data according to an embodiment of the present application
FIG. 12 is a schematic diagram of another interface of a data migration method according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to clearly describe the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first chip and the second chip are merely for distinguishing different chips, and the order of the different chips is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
As the use of electronic devices becomes more popular, the update speed of electronic devices becomes faster and faster, so that the frequency of replacing electronic devices by users is increased to some extent.
In the related art, clone applications (also referred to as a machine changing application and the like) can be installed on both the new device and the old device, and when a user needs to change the electronic device, communication connection between the new device and the old device is established based on the clone applications, and data to be migrated on the old device is migrated to the new device, so that the purpose of convenient machine changing is achieved.
However, this data migration method typically migrates all the data to be migrated on the old device to the new device; and, as the old device is used, the data amount of the data to be migrated in the old device is also increasing, resulting in a longer time required to migrate all the data to be migrated in the old device to the new device.
Based on the above, the embodiment of the application provides a data migration method and an electronic device, wherein a preset duration threshold for completing the data migration is determined according to the data volume of data to be migrated in a first electronic device, target migration data in the data to be migrated is determined based on the preset duration threshold, and the target migration data is migrated to a new device. Therefore, according to the embodiment of the application, a part of data is determined from the data to be migrated as target migration data according to the preset time threshold of the data to be migrated, the target migration data on the old equipment is quickly migrated to the new equipment, and the time required by migrating the target migration data to the new equipment is reduced, so that a user can quickly use the new equipment in a short time.
Fig. 1 is a schematic diagram of a system architecture suitable for a data migration method according to an embodiment of the present application, where the system architecture includes a first electronic device 100 and a second electronic device 200, and the first electronic device 100 and the second electronic device 200 may establish a communication connection, and the first electronic device 100 may migrate data to be migrated therein to the second electronic device 200, so as to achieve the purpose of convenient machine replacement.
In some embodiments, the first electronic device 100 may be a transmitting device for transmitting data to be migrated, for transmitting data to be migrated to the second electronic device 200. The first electronic device 100 may be, for example, an old device that the user previously used.
The second electronic device 200 may be a receiving device for receiving data to be migrated, and is configured to receive data to be migrated sent by the first electronic device 100. For example, the second electronic device 200 may be a new device newly acquired by the user for replacing the first electronic device 100.
By way of example, the first electronic device 100 and the second electronic device 200 may be different types of electronic devices. For example, the first electronic device 100 is a mobile phone, and the second electronic device 200 is a tablet computer. By way of example, the first electronic device 100 and the second electronic device 200 may be different brands of electronic devices. For example, the first electronic device 100 is a mobile phone of brand a, and the second electronic device 200 is a mobile phone of brand B.
For example, the first electronic device 100 and the second electronic device 200 may be mobile phones, tablet computers (Pad), wearable devices, vehicle-mounted devices, augmented reality (augmented reality, AR) devices, virtual Reality (VR) devices, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and other electronic devices, and the specific technology and specific device configuration adopted by the first electronic device 100 and the second electronic device 200 are not limited in the embodiments of the present application.
Of course, it is understood that the embodiment of the present application may also be applicable to backing up the data to be migrated on the first electronic device 100 to a certain storage device. Accordingly, the second electronic device 200 may be a storage device for storing data to be migrated on the first electronic device 100, where the storage device may be a cloud server or a usb disk, etc.
In order to better understand the embodiments of the present application, the structure of the first electronic device 100 according to the embodiments of the present application is described below.
Fig. 2 shows a schematic structural diagram of the first electronic device 100. The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriberidentification module, SIM) card interface 195, etc.
The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the application, the first electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processingunit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the first electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. An antenna in the first electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on the first electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wirelesslocal area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the first electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of first electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that first electronic device 100 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code division multiple access (wideband code division multipleaccess, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidounavigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellitesystem, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The first electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used for displaying images, displaying videos, receiving sliding operations, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrixorganic light emitting diod (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot lightemitting diodes, QLED), or the like. In some embodiments, the first electronic device 100 may include at least one display screen 194.
The first electronic device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the first electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the first electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the first electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The first electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. The gyro sensor 180B may be used to determine a motion gesture of the first electronic device 100. The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a hall sensor. The first electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. The acceleration sensor 180E may detect the magnitude of acceleration of the first electronic device 100 in various directions (typically three axes). A distance sensor 180F for measuring a distance.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The first electronic device 100 can detect that the user holds the first electronic device 100 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen. The ambient light sensor 180L is used to sense ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. The fingerprint sensor 180H is used to collect a fingerprint. The temperature sensor 180J is for detecting temperature. In some embodiments, the first electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the first electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the first electronic device 100.
The software system of the first electronic device 100 or the second electronic device 200 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. In the embodiment of the present application, taking an Android system with a layered architecture as an example, a software structure of the first electronic device 100 is illustrated.
Fig. 3 is a software structural block diagram of the first electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 3, the application package may include applications such as phone, mailbox, calendar, camera, and clone applications.
The cloning application includes two parts, namely an application interface and a logic module, and the application interface may also be called a User Interface (UI).
The application interface is a medium interface for interaction and information exchange between the clone application and the user, and the medium interface realizes conversion between an internal form of information and an acceptable form of the user. The application interface is source code written in a specific computer language such as java, extensible markup language (extensible markuplanguage, XML) and the like, and the interface source code is analyzed and rendered on the electronic equipment and finally presented as recognizable to a user. In some embodiments, the application interfaces of the cloning application include one or more of a data selection interface, a data transfer interface, and a data migration reporting interface.
The data selection interface includes a migration mode selection interface, a first data selection interface, and a second data selection interface. The migration mode selection interface is used for displaying the data migration modes provided by the embodiment of the application, which are respectively a recommended data migration mode and a full data migration mode; the first data selection interface is used for displaying a data list of the recommended target migration data; the second data selection interface is used for the data list of all the data to be migrated.
The data transmission interface is used for displaying related prompt information when the data of the first electronic device 100 is migrated to the second electronic device 200, such as information of an application name, a data transmission progress, a data transmission rate, a time length required when the data transmission is completed, and the like, corresponding to the data currently being transmitted.
The data migration report interface is used for displaying prompt information when the migration operation of the data of the first electronic device 100 to the second electronic device 200 is completed.
In some embodiments, the logic module for cloning the application may include one or more of a migration duration estimation module, a data model decision module, and an application recommendation calculation module. The migration duration estimating module is configured to estimate a duration required when part or all of the data in the first electronic device 100 is migrated to the second electronic device 200; the data model decision module is configured to determine a data model corresponding to a first migration duration required when all data in the first electronic device 100 is migrated to the second electronic device 200; the application recommendation calculation module is configured to determine key target migration data from all data to be migrated of the first electronic device 100.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application layer applications. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layer may include a window manager, a content provider, an input system, a notification manager, a resource manager, a telephony manager, and a view system, among others.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The input system is used for managing programs of the input device. For example, the input system may determine input operations such as a mouse click operation, a keyboard input operation, and a touch swipe.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The telephony manager is for managing mobile device functions, comprising: the mobile phone call state, the acquisition of telephone information (equipment, sim card and network information), the monitoring of the telephone state and the calling of a telephone dialer to dial a telephone.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in virtual machines. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: an image drawing module, an image rendering module, an image synthesizing module, a function library, an input processing library and the like.
The image drawing module is used for drawing two-dimensional or three-dimensional images. The image rendering module is used for rendering two-dimensional or three-dimensional images. The image synthesis module is used for synthesizing two-dimensional or three-dimensional images.
In a possible implementation manner, an application draws an image through an image drawing module, then the application renders the drawn image through an image rendering module, and then the application sends the rendered image to a cache queue for displaying a synthesis process. Each time a vsync signal arrives, a display composition process (e.g., surface flinger) sequentially acquires one frame of image to be composed from a buffer queue, and then performs image composition by an image composition module.
The function library provides macros, type definitions, string operation functions, mathematical computation functions, input-output functions, and the like used in the C language.
The input processing library is used for processing the library of the input device, and can realize mouse, keyboard, touch input processing and the like.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a touch panel driver, an LCD/LED screen driver, a display driver, a Bluetooth driver, a WIFI driver, a keyboard driver, a shared memory driver, a camera driver, a sensor driver and the like.
The hardware may be an audio device, a bluetooth device, a camera device, a sensor device, etc.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be implemented independently or combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
In the following embodiments, the purpose of realizing convenient phone exchange through data migration will be described by taking the first electronic device 100 and the second electronic device 200 as mobile phones as examples.
Fig. 4 is a flowchart of a first electronic device migrating target migration data to a second electronic device according to an embodiment of the present application. Referring to fig. 4, the corresponding data migration method specifically may include the following steps:
in step 401, the first electronic device establishes a connection with the second electronic device.
In some embodiments, a cloning application, such as an "change cloning" application, is installed on both the first electronic device and the second electronic device, and may be used to interact with the user.
When the user needs to migrate data on a first electronic device (e.g., an old device) to a second electronic device (e.g., a new device), the user may click on an icon corresponding to a cloned application displayed on a main interface of the second electronic device, and the second electronic device displays a first cloned interface 501 as shown in (a) of fig. 5 in response to the user's click operation on the cloned application icon. The first cloning interface 501 is used for displaying the relevant description of the clone function of the exchange machine, such as "fast migration of data of contacts, photos, schedules, etc. to new devices" shown in fig. 5 (a); in addition, the first clone interface 501 also displays a device type option, as shown in fig. 5 (a), which is a new device (received data) option, and which is an old device (transmitted data) option.
The user may click on the "this is new device (receive data)" option, and the second electronic device may display a second clone interface 502 as shown in fig. 5 (b) in response to the user clicking on the "this is new device (receive data)" option. The second clone interface 502 includes a plurality of device types of the first electronic device for the user to select, for example, a glowing old device type (i.e., a type corresponding to when the first electronic device is a glowing device), an Android old device type (i.e., a type corresponding to when the first electronic device is other Android devices than the glowing device), and an iOS old device type (i.e., a type corresponding to when the first electronic device is an iPhone, iPad, or the like using the iOS system).
In some embodiments, assuming that the device type of the first electronic device is a glowing old device type, the user may click on an option corresponding to the glowing old device type, the second electronic device may respond to a click operation of the user on the option corresponding to the glowing old device type, and the second electronic device may display a third clone interface 503 as shown in fig. 5 (c). The third clone interface 503 includes a hotspot two-dimensional code 5031 provided by the second electronic device for use in establishing a Wi-Fi connection with the first electronic device, and instructions directing the user to perform a connection operation on the first electronic device, such as "open ' change clone at old device", select ' this is old device ', scan the underlying two-dimensional code to establish a connection.
In order to prevent that the Wi-Fi connection between the first electronic device and the second electronic device may not be successfully established when the Wi-Fi connection between the first electronic device and the second electronic device is established through the hotspot two-dimensional code 5031, the third cloning interface 503 further displays a prompt message for manually establishing the Wi-Fi connection between the first electronic device and the second electronic device, such as "if the two-dimensional code cannot be connected, please click the manual connection under the old device scanning interface, connect the WLAN below", and the connection information and the password of the WLAN. In addition, for the case where the first electronic device does not install the clone application, the third clone interface 503 also displays an installation link of the "clone switch" application for guiding the user to install the "clone switch" application on the first electronic device.
Accordingly, the user may click on an icon corresponding to the clone application displayed on the main interface of the first electronic device, and the first electronic device displays a fourth clone interface 601 as shown in (a) of fig. 6 in response to the click operation of the clone application icon by the user. The fourth clone interface 601 is for displaying a related description of the change clone function such as "fast transfer of data of contacts, photos, schedules, etc. to a new device" as shown in fig. 6 (a), and the fourth clone interface 601 also displays a device type option such as "this is a new device (receive data)" option as shown in fig. 6 (a), and "this is an old device (transmit data)" option.
The user may click on the "this is old device (send data)" option, and the first electronic device may display a fifth clone interface 602 as shown in fig. 6 (b) in response to the user clicking on the "this is old device (send data)" option. The fifth clone interface 602 includes a scan window 6021 of the hotspot two-dimensional code, and instructions for directing the user to perform a connection operation on the second electronic device, such as "please open a 'change clone' on the new device, select 'this is that the new device' obtains the hotspot two-dimensional code.
The user may align the scanning window 6021 of the hotspot two-dimensional code displayed on the first electronic device with the hotspot two-dimensional code 5031 shown in (c) in fig. 5, so that the first electronic device scans the hotspot two-dimensional code 5031 displayed on the third cloning interface 503 of the second electronic device, and the first electronic device is connected to the hotspot of the second electronic device, so as to establish Wi-Fi connection between the first electronic device and the second electronic device. The Wi-Fi connection described above may also be referred to as a Wi-Fi peer-to-peer (P2P) connection.
When the scan window 6021 of the hot spot two-dimensional code displayed on the first electronic device is used to scan the hot spot two-dimensional code 5031 displayed on the third clone interface 503 of the second electronic device, the first electronic device jumps to the sixth clone interface 603 shown in fig. 6 (c). The sixth cloning interface 603 includes a diagram for showing the current connection process of the first electronic device and the second electronic device, such as dynamic ripple of sound waves, which may be displayed in the sixth cloning interface 603 in a flashing form, which is not limited by the embodiment of the present application.
It should be noted that the interfaces shown in fig. 5 (a) to 5 (c) and the interfaces shown in fig. 6 (a) to 6 (c) are only examples. In practical applications, the interface involved in the connection process of the first electronic device and the second electronic device may further include other more or less contents, which is not limited in the embodiment of the present application.
In addition, in other embodiments, the first electronic device and the second electronic device may also be connected by other connection manners besides the Wi-Fi connection, for example, the first electronic device and the second electronic device may also be connected by NFC or bluetooth.
Or, the first electronic device and the second electronic device may be connected by other connection modes besides the mode of scanning the two-dimensional code, for example, connection is established by adopting modes such as proximity discovery or touch discovery. When the user holds the second electronic device and gradually approaches the first electronic device, the first electronic device may scan a broadcast message sent by the second electronic device, the first electronic device determines a distance between the first electronic device and the second electronic device according to a signal intensity of the scanned broadcast message, and when the distance between the first electronic device and the second electronic device is smaller than a preset distance, a pairing connection interface pops up on a display screen of the first electronic device, and the user may perform a pairing connection operation on the pairing connection interface to establish connection between the first electronic device and the second electronic device.
Step 402, the first electronic device obtains data amounts respectively corresponding to a plurality of kinds of migration data included in the data to be migrated.
In some embodiments, in a process of establishing connection between the first electronic device and the second electronic device, or after the first electronic device and the second electronic device are successfully established, the migration duration estimation module in the clone application installed on the first electronic device may acquire the data amount corresponding to each piece of migration data in the data to be migrated stored in the first electronic device by calling an API interface provided by the application program framework layer.
For example, the data to be migrated stored in the first electronic device may include: contact, short message, call record, document, system setting, memo, schedule, data of each third party application, pictures, video and other migration data.
It should be noted that, the third party application is an application program different from the native application, and the third party application refers to an application program that is produced by a third party and requires a user to install on the electronic device. While the native application refers to an application program pre-installed on the electronic device, and belongs to an application program of the electronic device.
For each migration data included in the data to be migrated, the migration duration estimation module in the clone application can acquire data amounts corresponding to a plurality of different migration data included in the data to be migrated, namely, data amounts corresponding to each migration data included in the data to be migrated, by calling different API interfaces provided by the application program framework layer, and the data amounts correspond to one API interface respectively.
By way of example, the migration duration estimation module may obtain the data size of the contact by calling a first interface A1 provided by the application framework layer; the migration duration estimation module can also acquire the data volume of the short message by calling a second interface A2 provided by the application program framework layer; the migration duration estimation module can also acquire the data quantity corresponding to the data of one of the third party applications by calling a third interface A3 provided by the application program framework layer.
The migration duration estimation module can classify different migration data after acquiring data amounts respectively corresponding to each migration data included in the data to be migrated. By way of example, the respective migration data included in the data to be migrated may be divided into the following three categories, which are structured data, application data, and media file data, respectively.
Structured data refers to data represented and stored using a relational database in a two-dimensional form, and is generally characterized in that the data is represented in units of rows, one row represents information of one entity, and attributes of each row of data are identical, or the structured data may be represented in units of columns, one column represents information of one entity, and attributes of each column of data are identical. For example, contacts, messages, schedules, etc. in the data to be migrated all belong to the structured data.
The application data refers to data of third party applications such as social applications, shopping applications, and gaming applications. The data of the third party application may include an installation package of the third party application, a login account of the third party application, a login password, data collected in the third party application, and some usage records. For example, for a social class application, the usage record may be a chat record or the like.
Media file data refers to data such as photographs, video, audio, or documents.
The above description describes three types of migration data, which are included in the data to be migrated, as structured data, application data, and media file data. It will be appreciated that the data types of the data to be migrated after being partitioned are not limited to the three types of data described above, but may include other more or fewer data types, etc. In addition, the data to be migrated is not limited to the above-described data type classification.
It should be noted that, because different types of migration data in the data to be migrated are located in different folders when being stored, when the migration duration estimation module obtains the data amounts corresponding to the migration data included in the data to be migrated, the folder names or storage paths where the migration data are located can be known correspondingly, and therefore the migration duration estimation module can perform type division on the migration data included in the data to be migrated according to the folder names or storage paths where the migration data are located.
Illustratively, if the structured data is located in the first folder B1, the application data is located in the second folder B2, and the media file data is located in the third folder B3. Therefore, when the folder in which a certain migration data in the data to be migrated is located is the first folder B1, the migration data belongs to the structured data; when the folder in which another migration data in the data to be migrated is located is a second folder B2, the migration data belongs to the application data; when the folder in which the migration data is located is the third folder B3, the migration data belongs to the media file data.
Therefore, after classifying different migration data, the migration duration estimation module sums the data amounts corresponding to the migration data of the same type to obtain the data amounts corresponding to the migration data of the same type. Specifically, summing the data volume corresponding to each migration data included in the structured data to obtain the data volume corresponding to the structured data; summing the data quantity corresponding to each migration data included in the application data to obtain the data quantity corresponding to the application data; and summing the data quantity corresponding to each migration data included in the media file data to obtain the data quantity corresponding to the media file data.
In summary, the migration duration estimation module in the cloning application can acquire the data amounts respectively corresponding to the three types of migration data included in the data to be migrated through the mode.
In step 403, the first electronic device uses the data size of each type of migration data and the ratio of the corresponding migration speed as the migration duration corresponding to each type of migration data.
In some embodiments, migration speeds corresponding to various types of migration data may be stored in advance, and the migration speeds may be set according to empirical values. For example, the migration speed corresponding to the structured data is 20MB/s, the migration speed corresponding to the application data is 7.5MB/s, and the migration speed corresponding to the media file data is 20MB/s.
In other embodiments, the first electronic device may also measure and calculate migration speeds corresponding to various types of migration data in real time, so that the first migration duration obtained by final calculation is more accurate. The first electronic device may send a test data packet of each data type to the second electronic device, where the second electronic device may return response information for the test data packet to the first electronic device, where the response information includes a first time when the second electronic device receives the test data packet, and the first electronic device may obtain a second time when the test data packet is sent, calculate a time difference between the first time and the second time, and finally obtain a migration speed of each migration data according to a ratio of a data amount of the test data packet to the time difference.
The migration duration estimation module in the clone application installed on the first electronic device can take the ratio of the data volume of each migration data and the corresponding migration speed as the corresponding migration duration of each migration data. For example, as shown in fig. 7, the migration duration estimation module uses the ratio of the data amount corresponding to the structured data and the corresponding migration speed as the migration duration corresponding to the structured data; the migration duration estimation module takes the data quantity corresponding to the application data and the ratio of the corresponding migration speeds as the migration duration corresponding to the application data; the migration duration estimation module takes the ratio of the data quantity corresponding to the media file data and the corresponding migration speed as the migration duration corresponding to the media file data.
For example, the data amount corresponding to the structured data is H1, and the units thereof are MB, and the migration duration T1 = H1/20 corresponding to the structured data is in seconds; correspondingly, the data quantity corresponding to the application data is H2, the units are MB, and the migration time length T2 = H2/7.5 corresponding to the application data is seconds; and the data amount corresponding to the media file data is H3, and the units are MB, and the migration duration T3 = H3/20 corresponding to the media file data is in seconds.
Step 404, the first electronic device sums the migration durations corresponding to each of the plurality of migration data to obtain a first migration duration of the data to be migrated.
In some embodiments, the migration duration estimation module sums the migration durations corresponding to each type of migration data after calculating the migration duration corresponding to each type of migration data in the three types of migration data, so as to obtain a first migration duration of the data to be migrated.
As shown in fig. 7, the first migration duration of the data to be migrated is determined by a migration duration corresponding to the structured data, a migration duration corresponding to the application data, and a migration duration corresponding to the media file data. The first migration duration is a duration required when all data to be migrated in the first electronic device are migrated to the second electronic device.
For example, the migration duration corresponding to the structured data is T1, the migration duration corresponding to the application data is T2, and the migration duration corresponding to the media file data is T3, where the first migration duration t0=t1+t2+t3 of the data to be migrated.
For example, the migration duration T1 corresponding to the structured data is 15 seconds, the migration duration T2 corresponding to the application data is 3000 seconds, the migration duration T3 corresponding to the media file data is 527 seconds, and then the first migration duration T0 of the data to be migrated is 3542 seconds, which is approximately equal to 59 minutes.
In another implementation manner, the first electronic device may also obtain a data amount corresponding to each piece of migration data included in the data to be migrated, calculate a ratio of the data amount of each piece of migration data to a migration speed of a type to which the data is attached, obtain a migration duration of each piece of migration data, and finally sum migration durations of all pieces of migration data to obtain a first migration duration of the data to be migrated.
Step 405, the first electronic device determines a data model corresponding to the data to be migrated according to a duration interval in which the first migration duration is located.
In some embodiments, after the migration duration estimation module in the clone application calculates the first migration duration of the data to be migrated, the data model decision module in the clone application may determine, by using a duration interval in which the first migration duration is located, a data model corresponding to the data to be migrated.
As shown in fig. 8, the data models corresponding to the data to be migrated include a light model, a moderate model and a heavy model, and the duration interval corresponding to the light model is within 30 minutes, the duration interval corresponding to the moderate model is 30 minutes to 60 minutes, and the duration interval corresponding to the heavy model is more than 60 minutes.
When the first migration duration is less than or equal to 30 minutes, the data model decision module determines that the data model corresponding to the data to be migrated is a light module; when the first migration time is longer than 30 minutes and smaller than 60 minutes, the data model decision module determines that a data model corresponding to data to be migrated is a moderate model; and when the first migration time is longer than or equal to 60 minutes, the data model decision module determines a data model corresponding to the data to be migrated as a weight model.
For example, when the first migration duration T0 of the data to be migrated is 59 minutes and is greater than 30 minutes and less than 60 minutes, the data model decision module determines that the data model corresponding to the data to be migrated is a moderate model.
It should be noted that, the duration interval corresponding to each data model described in the foregoing process is only an optional example, and in practical application, the duration interval corresponding to each data model includes but is not limited to the foregoing example, for example, the duration interval corresponding to the light model may be within 40 minutes, the duration interval corresponding to the medium model may be between 40 minutes and 80 minutes, and the duration interval corresponding to the heavy model may be above 80 minutes.
Furthermore, the three data models described in the above process are also merely one alternative example, and in practical applications, classification of the data models is not limited to the above examples. For example, the data model corresponding to the data to be migrated may also include a first data model, a second data model, a third data model and a fourth data model, where the duration intervals corresponding to the four data models do not overlap.
Therefore, in combination with the steps 402 to 405, it can be seen that the embodiment of the present application predicts the first migration duration of the data to be migrated according to the data amount of the data to be migrated, and determines the data model based on the first migration duration.
In another possible implementation, the data model may also be determined directly from the data volume of the data to be migrated. Specifically, a data model corresponding to the data to be migrated can be determined according to a data volume interval in which the data volume of the data to be migrated is located.
For example, the data volume section corresponding to the light model is within 8G, the data volume section corresponding to the medium model is 8G to 20G, and the data volume section corresponding to the heavy model is 20G or more. When the data volume of the data to be migrated is smaller than or equal to 8G, the data model decision module determines that the data model corresponding to the data to be migrated is a light module; when the data volume of the data to be migrated is more than 8G and less than 20G, the data model decision module determines that the data model corresponding to the data to be migrated is a moderate model; when the data volume of the data to be migrated is larger than or equal to 20G, the data model decision module determines a data model corresponding to the data to be migrated as a weight model.
In step 406, the first electronic device determines a preset duration threshold corresponding to the data model.
In some embodiments, a duration threshold corresponding to each data model is preset, where the duration threshold represents a maximum value of allowable migration duration when the target migration data is migrated to the second electronic device. For example, the duration threshold for the light model is 10 minutes, the duration threshold for the medium model is 20 minutes, and the duration threshold for the heavy model is 40 minutes.
Therefore, after the data model decision module in the cloning application decides the data model corresponding to the data to be migrated, the preset duration threshold corresponding to the data model can be further determined. For example, when the data model corresponding to the data to be migrated is a light model, the data model decision module may determine that the corresponding preset duration threshold is 10 minutes; when the data model corresponding to the data to be migrated is a moderate model, the data model decision module can determine that the corresponding preset duration threshold value is 20 minutes; when the data model corresponding to the data to be migrated is a gravity model, the data model decision module can determine that the corresponding preset duration threshold is 40 minutes.
In other embodiments, the preset coefficient may be preset, and after the migration duration estimation module in the cloning application calculates the first migration duration of the data to be migrated, the data model decision module in the cloning application may directly use the product of the first migration duration and the preset coefficient as the preset duration threshold. The preset coefficient is a positive number less than 1.
For example, the preset coefficient is 0.4, and the preset duration threshold may be 12 minutes when the first migration duration is 30 minutes, and 24 minutes when the first migration duration is 60 minutes.
In still other embodiments, a relationship comparison table between different data volume intervals and time length thresholds may be preset, and after the data volume of the data to be migrated is obtained, the corresponding preset time length threshold is found according to the data volume interval in which the data volume of the data to be migrated is located.
In step 407, the first electronic device obtains the data amount of the basic key data in the data to be migrated.
In some embodiments, after determining the preset duration thresholds corresponding to all the data to be migrated, the application recommendation calculation module in the clone application may determine the basic key data from the data to be migrated.
The basic key data refers to important data in the data to be migrated. The basic key data comprise key data such as contacts, short messages, call records, documents, system settings, memorandum, schedules and the like.
It should be noted that the basic key data is several data set empirically in advance, and the basic key data is not necessarily associated with the above three types of data, i.e., structured data, application data, and media file data. In some embodiments, part of the data in the underlying critical data may be structured data, while another part of the data may be media file data; alternatively, in other embodiments, the underlying critical data may be part or all of the structured data.
In step 408, the first electronic device predicts a second migration duration of the basic key data according to the data amount of the basic key data.
In some embodiments, after the application recommendation calculation module obtains the data amount of the basic key data in the data to be migrated, the migration duration estimation module in the cloning application may estimate the second migration duration of the basic key data according to the data amount of the basic key data. The second migration duration refers to a duration required when all basic key data in the first electronic device are migrated to the second electronic device.
The method for estimating the second migration duration of the basic key data may be similar to the method for estimating the first migration duration of the data to be migrated described in steps 402 to 404. And classifying each data in the basic key data, calculating migration time lengths corresponding to each type of data in the basic key data, and finally summing the migration time lengths corresponding to each type of data in the basic key data to obtain a second migration time length of the basic key data. To avoid repetition, the method for estimating the second migration duration of the underlying critical data is not described in detail herein.
Or when calculating the first migration duration of the data to be migrated in the above process, if a mode of sequentially calculating the migration duration of each migration data and summing the migration durations of all migration data is adopted, when estimating the second migration duration of the basic key data, the step can obtain the migration duration of each basic key data in the calculated migration duration of each migration data, and finally sum the migration durations of each basic key data to obtain the second migration duration of the basic key data.
In step 409, the first electronic device determines whether the second migration duration is less than a preset duration threshold.
In some embodiments, the migration duration estimation module in the clone application may compare the second migration duration with the preset duration threshold determined in step 406 above after estimating the second migration duration of the basic key data. When the second migration time is greater than the preset time threshold, the application recommendation calculation module in the cloned application performs the following step 410; when the second migration duration is less than the preset duration threshold, the application recommendation calculation module in the cloned application performs the following steps 411 and 412. For the case where the second migration duration is equal to the preset duration threshold, the basic key data may be directly used as the target migration data, which is not shown in fig. 4.
For example, taking a data model corresponding to the data to be migrated as a light model, and the duration threshold corresponding to the light model is 10 minutes, so that the second migration duration corresponding to the basic key data can be compared with the preset duration threshold for 10 minutes; taking a data model corresponding to data to be migrated as a middle model as an example, and comparing a second migration duration corresponding to basic key data with a preset duration threshold for 20 minutes if a duration threshold corresponding to the middle model is 20 minutes; taking the data model corresponding to the data to be migrated as a gravity model as an example, if the duration threshold corresponding to the gravity model is 40 minutes, the second migration duration corresponding to the basic key data can be compared with the preset duration threshold for 40 minutes.
In step 410, the first electronic device uses part of the basic key data as the target migration data when the second migration time is longer than the preset time threshold.
In some embodiments, when the second migration time period is greater than the preset time period threshold, it is indicated that the time period required for all the basic key data in the first electronic device to migrate to the second electronic device is longer, and it cannot be satisfied that all the basic key data are migrated to the second electronic device within the preset time period threshold. Therefore, the application recommendation calculation module in the clone application can take part of the key data in the basic key data as target migration data and remove the rest key data in the basic key data, so that the target migration duration required by the target migration data when migrating to the second electronic device is estimated to be smaller than or equal to a preset duration threshold.
The target migration data is part of the key data in the basic key data, and the basic key data is part of the data in the data to be migrated, so that the target migration data can be understood as part of the data in the data to be migrated.
In one possible implementation manner, when the application recommendation calculation module takes part of the key data in the basic key data as the target migration data, the key data serving as the target migration data, namely the key data serving as the target migration data, which is higher in priority, can be determined according to the priority of each key data in the basic key data.
Specifically, the first electronic device obtains the priority of each key data in the basic key data; and the first electronic equipment sequentially removes the key data in the basic key data according to the order of the priority from low to high until the migration duration of the residual key data is less than or equal to a preset duration threshold value, and takes the residual key data as target migration data.
The priority of each key data in the basic key data is determined in advance, and the priority of each key data can be determined according to the priority order fed back by the user. For example, the first electronic device may receive the priority order of each key data input by the user, or may count the priority orders of each key data input by a plurality of users in advance, thereby obtaining the priority of each key data.
In some embodiments, the basic key data includes key data such as contacts, sms, call records, documents, system settings, memos, schedules, etc., where the priority of each key data is in the order from high to low: contacts, memos, messages, call records, schedules, system settings, documents.
Therefore, after the application recommendation calculation module acquires the priority of each key data in the basic key data, the application recommendation calculation module sequentially removes the key data in the basic key data according to the order of the priority from low to high, and judges whether the migration duration of the residual key data is smaller than or equal to a preset duration threshold value after removing one key data. When the migration time length of the residual key data is longer than a preset time length threshold value, the application recommendation calculation module continues to remove the key data according to the order of the priority from low to high until the migration time length of the residual key data is smaller than or equal to the preset time length threshold value, and the residual key data is used as target migration data.
For example, the priorities of the respective key data are in order from high to low: contacts, memos, messages, call records, schedules, system settings, documents. Therefore, under the condition that the second migration time length is greater than the preset time length threshold, the application recommendation calculation module firstly removes the document in the basic key data, and judges whether the migration time length corresponding to the residual key data (namely, the residual key data at the moment comprises contacts, memos, short messages, call records, schedules and system settings) is less than or equal to the preset time length threshold. When the migration time length corresponding to the residual key data is less than or equal to a preset time length threshold value, setting contacts, memos, short messages, call records, schedules and systems as target migration data; and when the migration time length corresponding to the residual key data is greater than the preset time length threshold, the application recommendation calculation module continues to remove the system settings in the basic key data, and judges again whether the migration time length corresponding to the residual key data (namely, the residual key data at this time comprises contacts, memos, short messages, call records and schedules) is less than or equal to the preset time length threshold. According to the mode, key data in the basic key data are sequentially removed until the migration duration of the residual key data is smaller than or equal to a preset duration threshold value, and the residual key data are used as target migration data.
It should be noted that, in the process of determining whether the migration duration of the remaining critical data is less than or equal to the preset duration threshold after removing one critical data, the method for estimating the migration duration of the remaining critical data is similar to the method for estimating the first migration duration of the data to be migrated described in steps 402 to 404, so that repetition is avoided and redundant description is omitted.
In step 411, the first electronic device determines recommended application data in the data to be migrated if the second migration duration is less than the preset duration threshold.
In some embodiments, when the second migration duration is less than the preset duration threshold, it is indicated that the duration required for all the basic key data in the first electronic device to be migrated to the second electronic device is shorter, and all the basic key data can be migrated to the second electronic device within the preset duration threshold. Therefore, in order to further improve the use experience of the user when using the second electronic device after the machine change, the application recommendation calculation module in the clone application can determine recommended application data from the data to be migrated, so that the recommended application data can be migrated to the second electronic device together when basic key data is migrated to the second electronic device later, and the user can directly use application programs corresponding to the recommended application data when using the second electronic device after the machine change, thereby improving the use experience of the user.
In one possible implementation manner, when determining recommended application data from data to be migrated, the application recommendation calculation module may determine recommended application data according to priorities of application data in the data to be migrated, where the recommended application data is application data with a higher priority in the application data.
Specifically, the first electronic device obtains the priority of each application data in the data to be migrated; the first electronic equipment sequentially adds application data on the basis of basic key data according to the order of priority from high to low until the migration time length of the added N application data and the basic key data is greater than a preset time length threshold value, and takes the added first N-1 application data as recommended application data, wherein N is a positive integer.
The application recommendation calculation module can determine the priority of each application data in the data to be migrated according to the use condition of the user; the application recommendation calculation module sequentially adds the application data with high priority on the basis of the basic key data according to the order of the priorities of the application data from high to low, and judges whether migration time length corresponding to the basic key data and the added application data with high priority is greater than a preset time length threshold value after adding one application data with high priority each time. When the migration time length corresponding to the basic key data and the added high-priority application data is smaller than or equal to a preset time length threshold, the application recommendation calculation module continues to add additional application data according to the order of the priorities of the application data from high to low until the migration time length corresponding to the basic key data and all the added application data is larger than the preset time length threshold. And assuming that after N application data are added in turn, the migration time length corresponding to the N application data and the basic key data is longer than a preset time length threshold, and taking the added first N-1 application data as recommended application data. Therefore, the target migration duration required for migrating the target migration data (including the basic key data and the recommended application data) to the second electronic device is estimated to be less than or equal to the preset duration threshold.
For example, each application data in the data to be migrated is: the first application data X1, the second application data X2, the third application data X3, the fourth application data X4 and the fifth application data X5, and the application data in the data to be migrated sequentially comprises the following steps according to the order of priority from high to low: fifth application data X5, first application data X1, second application data X2, fourth application data X4, and third application data X3. Therefore, under the condition that the second migration time is smaller than the preset time threshold, the application recommendation calculation module adds fifth application data X5 on the basis of the basic key data, and judges whether migration time corresponding to the basic key data and the fifth application data X5 is larger than the preset time threshold.
When the migration time length corresponding to the basic key data and the fifth application data X5 is greater than a preset time length threshold, recommending that the application data is empty, and the target application data at the moment is the basic key data; and when the migration duration corresponding to the basic key data and the fifth application data X5 is less than or equal to the preset duration threshold, the application recommendation calculation module continues to add the first application data X1, and judges whether the migration duration corresponding to the basic key data, the fifth application data X5 and the first application data X1 is greater than the preset duration threshold. When the migration time length corresponding to the basic key data, the fifth application data X5 and the first application data X1 is longer than a preset time length threshold, the fifth application data X5 is used as recommended application data; and when the migration time length corresponding to the basic key data, the fifth application data X5 and the first application data X1 is less than or equal to the preset time length threshold, continuing to add the application data according to the mode until the migration time length of the added N application data and the basic key data is greater than the preset time length threshold, and taking the added first N-1 application data as recommended application data.
In some embodiments, when determining the priority of each application data in the data to be migrated, the application recommendation calculation module may set the usage situation of the application program corresponding to each application data.
Specifically, the first electronic device obtains use parameters of the application programs corresponding to each application data, wherein the use parameters comprise use duration and/or use frequency; and the first electronic equipment determines the priority of each application data in the data to be migrated according to the use parameters.
The application recommendation calculation module can call the android disclosure interface to obtain the use parameters of the application programs corresponding to each application data, wherein the use parameters comprise the use duration and/or the use frequency. Then, the application recommendation calculation module determines the priority of each application data in the data to be migrated according to the use parameters.
The use time length of the application program corresponding to each application data is positively correlated with the corresponding priority thereof, namely, when the use time length of the application program corresponding to the application data is longer, the priority corresponding to the application data is higher, and when the use time length of the application program corresponding to the application data is shorter, the priority corresponding to the application data is lower. The use frequency of the application programs corresponding to each application data is positively correlated with the corresponding priority thereof, namely, when the use frequency of the application programs corresponding to the application data is higher, the priority corresponding to the application data is higher, and when the use frequency of the application programs corresponding to the application data is lower, the priority corresponding to the application data is lower.
The acquired usage parameter of the application program may be a usage parameter of the application program within a preset period of time. The preset period may be a use parameter for a certain period of time before the current time, for example, the preset period may be a use parameter for 1 week, 2 weeks, 1 month, or the like before the current time.
It should be noted that, the above current time may be understood as a time when the application recommendation calculation module invokes the android disclosure interface to obtain the usage parameters.
In the first case, the usage parameters include only the usage duration. The application recommendation calculation module in the first electronic device can directly take the use time length of the application program corresponding to each application data as the priority of each application data.
That is, the application recommendation calculation module may sort the usage time periods of the application programs corresponding to the respective application data in a descending order, and the higher the priority of the application data before the sorting is, the lower the priority of the application data after the sorting is.
In the second case, the usage parameters include only the usage frequency. The application recommendation calculation module in the first electronic device can directly take the use frequency of the application program corresponding to each application data as the priority of each application data.
That is, the application recommendation calculation module may sort the usage frequency of the application programs corresponding to each application data in a descending order, and the higher the priority of the application data before the sorting is, the lower the priority of the application data after the sorting is.
In a third case, the usage parameters include a usage duration and a usage frequency. The application recommendation calculation module in the first electronic device can perform weighted summation on the use duration and the use frequency of the application program corresponding to each application data to obtain the priority of each application data. That is, the priority level y=w1×t+w2×p of the application data, W1 is the weight of the usage time period, T is the usage time period of the application program corresponding to the application data, W2 is the weight of the usage frequency, and P is the usage frequency of the application program corresponding to the application data.
That is, the application recommendation calculation module may sort the weighted summation results of the usage time periods and the usage frequencies corresponding to the respective application data in a descending order, where the higher the priority of the application data before sorting is, the lower the priority of the application data after sorting is.
The weight of the usage period and the weight of the usage frequency may be set according to an empirical value. The weights of the usage periods and the usage frequencies may be equal or unequal, which is not limited in the embodiment of the present application. For example, the weight of the usage period and the weight of the usage frequency may be both 0.5, or the weight of the usage period is 0.4, and the weight of the usage frequency is 0.6.
In step 412, the first electronic device uses the basic key data and the recommended application data as target migration data.
In some embodiments, the application recommendation calculation module in the cloned application takes the base key data and the recommended application data as target migration data after determining the recommended application data.
The target migration data at this time includes basic key data and recommended application data, and since the basic key data and recommended application data are part of key data in the data to be migrated, the target migration data can also be understood as part of data in the data to be migrated.
Therefore, in combination with the steps 407 to 412, it can be seen that in the embodiment of the present application, the second preset duration corresponding to the basic key data is compared with the preset duration threshold, and a portion of the key target migration data is determined from the data to be migrated, which is used as the data when the data migration is performed for the first time.
In other embodiments, the target migration data may also be determined directly according to a preset duration threshold. When the preset duration threshold is smaller than or equal to the first set threshold, the basic key data are used as target migration data, and when the preset duration threshold is larger than the first set threshold, the basic key data and the recommended application data with higher priority are used as target migration data. And, the larger the difference between the preset duration threshold and the first set threshold, the larger the amount of recommended application data. The first set threshold may be determined based on empirical values.
Alternatively, in some embodiments, the target migration data may also be determined directly according to the first migration duration of the data to be migrated. When the first migration time length is smaller than or equal to a second set threshold value, the basic key data are used as target migration data, and when the first migration time length is longer than the second set threshold value, the basic key data and recommended application data with higher priority are used as target migration data. And, the larger the difference between the first migration period and the second set threshold value, the larger the amount of recommended application data. The second set threshold may be determined based on empirical values.
In step 413, the first electronic device migrates the target migration data to the second electronic device.
In some embodiments, after determining the first migrated target migration data, the first electronic device may migrate the target migration data to the second electronic device, thereby implementing fast migration of the critical target migration data on the first electronic device to the second electronic device, so that the user may use the second electronic device in a short time.
In one possible implementation, after determining the target migration data for the first migration, the first electronic device displays a migration mode selection interface 901 as shown in (a) of fig. 9. The migration mode selection interface 901 includes a description related to a recommended data migration mode and a description related to a full-scale data migration mode provided in the embodiment of the present application, where the description related to the recommended data migration mode may be referred to as a first option.
The recommended data migration mode may also be referred to as a very simple mode, where the recommended data migration mode is used to migrate target migration data in the first electronic device to the second electronic device, where the target migration data is some basic data in the first electronic device, so that when the recommended data migration mode is used to perform data migration, the machine change speed is faster. In addition, the relevant description of the recommended data migration mode includes the data amount of the target migration data, as shown by "data size 10.54GB" in fig. 9 (a), and the relevant description of the recommended data migration mode further includes estimating the target migration period required to move the target migration data to the second electronic device, as shown by "estimated time-consuming 19 minutes" in fig. 9 (a). It can be seen that the target migration duration "19 minutes" is less than the preset duration threshold "20 minutes".
And the full-volume data migration mode is used for completely migrating all data to be migrated in the first electronic device to the second electronic device. In addition, the related description of the full-size data migration mode includes the data amount of all data to be migrated, as shown by "data size 32.59GB" in fig. 9 (a), and also includes a first migration period required to estimate migration of all data to be migrated to the second electronic device, as shown by "expected time period of 59 minutes" in fig. 9 (a).
In addition, the migration mode selection interface 901 further includes a first mode selection control 9011 corresponding to the recommended data migration mode, and a second mode selection control 9012 corresponding to the full-scale data migration mode. The first mode selection control 9011 is an "immediate migration" control corresponding to the recommended data migration mode shown in fig. 9 (a), and the second mode selection control 9012 is an "immediate migration" control corresponding to the full-volume data migration mode shown in fig. 9 (a).
When the user needs to implement quick change, the user may click on the first mode selection control 9011 in the migration mode selection interface 901, and the first electronic device displays the first data selection interface 902 as shown in (b) of fig. 9 in response to the first operation on the first mode selection control 9011. The first data selection interface 902 includes a data list of target migration data and a first migration control 9021, where the first migration control 9021 is a "next" control shown in (b) in fig. 9.
The data list of the target migration data includes application icons and selection boxes corresponding to the respective data in the target migration data. Taking the example that the target migration data includes basic key data and recommended application data, as shown in (b) of fig. 9, the data list of the target migration data may include a contact icon, an information icon (i.e., a text message icon), a call record icon, a document icon, a system setting icon, a memo icon, a schedule icon, and recommended application and data icons. The user can determine whether to migrate the data corresponding to the application icon when the data migration is performed for the first time by clicking the selection box corresponding to the application icon. In addition, the content such as the data size of the data is displayed at the position corresponding to the application icon corresponding to each data.
The user may click on a first migration control 9021 in the first data selection interface 902, and the first electronic device migrates the target migration data to the second electronic device in response to a second operation on the first migration control 9021.
Further, the first electronic device, in response to a second operation of the first migration control 9021, may first jump from the first data selection interface 902 to a data transfer interface 903 as shown in fig. 9 (c). The data transmission interface 903 may display related prompt information when migrating the target migration data of the first electronic device 100 to the second electronic device, such as information including an application name, a data transmission progress, a data transmission rate, and a time period required when the data transmission is completed, which correspond to the data currently being transmitted.
In addition, the data transfer interface 903 also includes a cancel control 9031. When the user needs to cancel the current data migration operation, the user may click on the cancel control 9031, and the first electronic device may cancel the operation of the current data migration in response to the click operation on the cancel control 9031.
In the case where the first electronic device migrates all of the target migration data to the second electronic device, the first electronic device may jump from the data transfer interface 903 to a data migration report interface 904 as shown in (d) in fig. 9. The data migration report interface 904 includes a prompt message, which is used to prompt that the migration of the target migration data is completed, and that the remaining data can be migrated when the next connection is performed, as shown in (d) of fig. 9.
Note that the interfaces shown in fig. 9 (a) to 9 (d) are only examples. In practical applications, the interface involved in the migration process of the first electronic device to migrate the target migration data to the second electronic device may further include other more or less contents, which is not limited by the embodiment of the present application.
As shown in fig. 9 (a), for the data to be migrated of 32.59GB, the expected migration duration is 59 minutes when all the data to be migrated is migrated to the second electronic device, so that the embodiment of the present application may determine a portion of critical target migration data from the data to be migrated, where the data amount of the target migration data is 10.54GB, and the expected duration is 19 minutes when the target migration data is migrated to the second electronic device. Therefore, the data migration time is reduced, and the user can quickly use the second electronic device in a short time.
Therefore, the embodiment of the application can determine the preset time length threshold for finishing the data migration through the data quantity of the data to be migrated in the first electronic device, determine the target migration data in the data to be migrated based on the preset time length threshold, and quickly migrate the target migration data on the first electronic device to the second electronic device, thereby reducing the time length required by migrating the target migration data to the second electronic device, and enabling a user to quickly use the second electronic device in a shorter time.
The data migration process shown above is directed to a scenario in which only target migration data is migrated for the first time, and since the data to be migrated in the first electronic device includes other non-migration data in addition to the target migration data. Therefore, in practical application, when the user is in urgent use of the second electronic device, the target migration data may be migrated to the second electronic device, and then other non-migration data except the target migration data is migrated slowly when the waiting time is abundant.
Fig. 10 is a flowchart of a first electronic device migrating non-migrated data to a second electronic device according to an embodiment of the present application. Referring to fig. 10, the data migration method may specifically include the following steps:
in step 1001, the first electronic device migrates the target migration data to the second electronic device.
For the specific execution process of first migrating the target migration data to the second electronic device, reference may be made to the specific execution process of the embodiment shown in fig. 4, and in order to avoid repetition, a description thereof will be omitted.
In step 1002, the first electronic device is disconnected from the second electronic device in the case where the target migration data is completely migrated to the second electronic device.
In some embodiments, where the first electronic device migrates all of the target migration data to the second electronic device, the first electronic device will display a data migration report interface 904 as shown in fig. 9 (d). The data migration report interface 904 includes a prompt message, which is used to prompt that the migration of the target migration data is completed, and the remaining data can be migrated when the data is connected next time. In addition, the data migration report interface 904 also includes a validation control 9041, which validation control 9041 may be a "know" control as shown in fig. 9 (d).
The user can perform clicking operation on the confirmation control 9041 in the data migration report interface 904, and the first electronic device responds to clicking operation on the confirmation control 9041 by the user and controls the first electronic device to disconnect from the second electronic device, so that the user can normally use the second electronic device.
In step 1003, the first electronic device reestablishes the connection with the second electronic device.
In some embodiments, the first electronic device reestablishes a connection with the second electronic device when the user wants to migrate data that was not migrated last time by the first electronic device to the second electronic device during the idle period. The manner in which the first electronic device reestablishes the connection with the second electronic device may be referred to the description corresponding to step 401 above.
In step 1004, the first electronic device receives the first session ID sent by the second electronic device.
In some embodiments, in the process that the first electronic device establishes a connection with the second electronic device for the first time and migrates the target migration data to the second electronic device, the first electronic device may randomly generate a first session ID, and the first electronic device and the second electronic device may respectively store the first session ID. Wherein the first session ID may be a universally unique identifier (universally unique identifier, UUID).
Thus, after the first electronic device establishes a connection with the second electronic device again, the second electronic device may send the first session ID stored therein to the first electronic device.
In an alternative implementation manner, after the first electronic device establishes connection with the second electronic device again, the first electronic device sends a session ID query request to the second electronic device, and the second electronic device returns the saved first session ID to the first electronic device according to the session ID query request.
In another alternative implementation, after the first electronic device establishes the connection with the second electronic device again, the second electronic device directly sends the first session ID stored in the second electronic device to the first electronic device, without the first electronic device having to obtain the first session ID by sending a session ID query request.
In step 1005, the first electronic device determines whether a session ID consistent with the first session ID is stored.
In some embodiments, the first electronic device, after receiving the first session ID sent by the second electronic device, queries whether it has previously stored a session ID, and whether the stored session ID is consistent with the first session ID sent by the second electronic device.
When the session ID stored in the first electronic device is consistent with the first session ID sent by the second electronic device, it indicates that the connection has been established between the first electronic device and the second electronic device, that is, the connection is not the first connection, in this case, the following step 1006 is executed.
When the first electronic device does not store the session ID, or the stored session ID is inconsistent with the first session ID sent by the second electronic device, it is indicated that the first electronic device and the second electronic device have not been previously connected, that is, the connection is the first connection, in this case, the steps corresponding to the first migration operation may be executed according to the embodiment shown in fig. 4, which is not described herein again.
In step 1006, if the first electronic device stores a session ID consistent with the first session ID, the first electronic device displays a prompt box to prompt the user whether to continue to migrate the last data that has not been migrated.
In the case where the first electronic device stores a session ID that matches the first session ID, the first electronic device pops up a prompt 1101 on the sixth clone interface 603, at which point the interface displayed on the first electronic device is as shown in fig. 11. The prompt box 1101 includes prompt information for prompting the user whether to continue to migrate the last data that has not been migrated, such as "whether to continue to migrate the last data that has not been migrated" in the prompt box 1101 shown in fig. 11; the prompt box 1101 further includes a data list of non-migrated data, where the data list of non-migrated data includes application icons and selection boxes corresponding to respective data in the non-migrated data, and as shown in fig. 11, the data list of non-migrated data may include gallery icons, music icons, applications, data icons, and the like. At a position corresponding to the application icon corresponding to each data, contents such as a data size of the data are also displayed.
In addition, prompt 1101 includes a confirm control and a cancel control. When the user does not need to migrate the last data which is not migrated, and the user clicks the cancel control in the prompt box 1101, the first electronic device responds to the click operation of the cancel control in the prompt box 1101 to withdraw from the migration operation of the data which is not migrated.
In step 1007, the first electronic device receives a third operation of the confirmation control in the prompt box by the user.
In step 1008, the first electronic device migrates the non-migrated data to the second electronic device in response to the third operation.
In some embodiments, when the user needs to migrate the last data that has not been migrated to the second electronic device, the user may click on the confirmation control in the prompt 1101, so that the first electronic device receives a third operation of the confirmation control in the prompt 1101 by the user, where the third operation may be understood as a click operation on the confirmation control in the prompt 1101.
And the first electronic device responds to the third operation of the confirmation control to migrate the non-migrated data to the second electronic device, wherein the non-migrated data is the data except the target migration data in the data to be migrated.
The determination method of the non-migrated data can be determined in the following two ways. In the first manner, after the first electronic device sends the target migration data to the second electronic device, the first electronic device records the migrated target migration data, so that the first electronic device directly determines other non-migrated data except the target migration data in the data to be migrated according to the recorded target migration data. In the second mode, after the first electronic device and the second electronic device establish connection again, the second electronic device reads the target migration data received before and then sends the data list of the target migration data to the first electronic device, so that an electronic device can determine other non-migrated data except the target migration data in the data to be migrated according to the data list of the target migration data sent by the second electronic device.
The data migration process shown above is directed to a scenario of migrating only target migration data for the first time, and in the embodiment of the present application, the first electronic device may migrate all data to be migrated to the second electronic device when establishing connection with the second electronic device for the first time.
The migration mode selection interface 901 shown in fig. 12 (a) is the same as the migration mode selection interface 901 shown in fig. 9 (a), and includes a description of the full-size data migration mode and a second mode selection control 9012 corresponding to the full-size data migration mode.
When the user needs to migrate all the data to be migrated together to the second electronic device, the user may click on the second mode selection control 9012 in the migration mode selection interface 901, and the first electronic device displays the second data selection interface 1200 as shown in (b) of fig. 12 in response to the click operation on the second mode selection control 9012. The second data selection interface 1200 includes a data list of all data to be migrated, where the data list of the data to be migrated includes application icons and selection boxes corresponding to each data in all data to be migrated.
Note that, the interface shown in (c) in fig. 12 is also the second data selection interface 1200, and since there may be a problem of incomplete display when the display screen of the first electronic device displays the entire data list of the data to be migrated, the second data selection interface 1200 shown in (c) in fig. 12 may be displayed by sliding upward in the arrow direction shown in (b) in fig. 12.
In addition, the second data selection interface 1200 also includes a second migration control 1201, and the first migration control 9021 is a "next" control shown in (c) in fig. 12.
The user may click on the second migration control 1201 in the second data selection interface 1200, and the first electronic device migrates all the data to be migrated to the second electronic device in response to the click operation on the second migration control 1201.
In summary, the data migration method of the embodiment of the application not only supports the data migration of the extremely simple mode to reduce the time required by the data migration, but also supports the data migration of the full-quantity mode, so that a user can select a proper migration mode according to actual conditions, thereby improving the use experience of the user.
Fig. 13 is a schematic hardware structure of an electronic device according to an embodiment of the present application. The electronic device may be the first electronic device 100, where the first electronic device 100 includes: memory 101, processor 110, and communication interface 102, wherein memory 101, processor 110, and communication interface 102 may communicate; illustratively, the memory 101, the processor 110, and the communication interface 102 may communicate over a communication bus.
The memory 101 may be a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access memory (random access memory, RAM). The memory 101 may store a computer program, which is controlled to be executed by the processor 110, and which is communicated by the communication interface 102, thereby implementing the data migration method provided by the above-described embodiment of the present application.
The first electronic device 100 of the present embodiment may be correspondingly configured to perform the steps performed in the foregoing method embodiments, and the implementation principle and technical effects are similar, which are not repeated herein.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer readable media can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
In one possible implementation, the computer readable medium may include RAM, ROM, compact disk-read only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium targeted for carrying or storing the desired program code in the form of instructions or data structures and accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (digital subscriber line, DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes optical disc, laser disc, optical disc, digital versatile disc (digital versatile disc, DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (or programs). When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. Usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid State Disks (SSDs)), among others.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing detailed description of the application has been presented for purposes of illustration and description, and it should be understood that the foregoing is by way of illustration and description only, and is not intended to limit the scope of the application.

Claims (11)

1. A method of data migration, comprising:
the first electronic device establishes connection with the second electronic device;
the first electronic device estimates a first migration duration required for migrating the data to be migrated to the second electronic device according to the data quantity of the data to be migrated;
the first electronic device determines a data model corresponding to the data to be migrated from preset data models according to a time interval in which the first migration time is located; the preset data model comprises a first data model, a second data model and a third data model, time intervals corresponding to the first data model, the second data model and the third data model are not overlapped and respectively correspond to a preset time threshold value, and the preset time threshold value represents the maximum value of allowable migration time when target migration data are migrated to the second electronic equipment;
the first electronic device determines a preset duration threshold corresponding to a data model corresponding to the data to be migrated;
the first electronic device determines the data quantity of basic key data in the data to be migrated;
the first electronic device estimates a second migration duration required for migrating the basic key data to the second electronic device according to the data quantity of the basic key data;
When the second migration duration is smaller than the preset duration threshold, the first electronic device obtains the priority of each application data in the data to be migrated;
the first electronic equipment sequentially adds the application data on the basis of the basic key data according to the order of the priority from high to low until the migration time length of the added N application data and the basic key data is longer than the preset time length threshold, and takes the added first N-1 application data as recommended application data; the N is a positive integer;
the first electronic device determines the basic key data and the recommended application data as the target migration data, wherein the target migration data is a part of the data to be migrated;
the first electronic device displays a first interface, wherein the first interface comprises a first option, the first option comprises a data amount of the target migration data and a target migration duration, the target migration duration is a duration required for estimating to migrate the target migration data to the second electronic device, and the target migration duration is smaller than or equal to the preset duration threshold;
And responding to the operation input to the first interface, and migrating the target migration data to the second electronic device by the first electronic device.
2. The method of claim 1, wherein the first electronic device estimates a first migration duration required for migrating the data to be migrated to the second electronic device according to a data amount of the data to be migrated, including:
the first electronic equipment acquires data volumes respectively corresponding to a plurality of migration data included in the data to be migrated;
and the first electronic equipment estimates a first migration duration required for migrating the data to be migrated to the second electronic equipment according to the data volume of each migration data in the plurality of migration data and the corresponding migration speed.
3. The method of claim 2, wherein the estimating, by the first electronic device, a first migration duration required for migrating the data to be migrated to the second electronic device according to the data amount of each of the plurality of migration data and the corresponding migration speed includes:
the first electronic device takes the ratio of the data volume of each migration data and the corresponding migration speed as the migration duration corresponding to each migration data;
And the first electronic equipment sums the migration duration corresponding to each migration data in the plurality of migration data to obtain a first migration duration of the data to be migrated.
4. The method according to claim 1, characterized in that the method further comprises:
and under the condition that the second migration time length is larger than the preset time length threshold, the first electronic device takes part of key data in the basic key data as the target migration data.
5. The method of claim 4, wherein the first electronic device regarding a portion of the underlying critical data as the target migration data comprises:
the first electronic device obtains the priority of each key data in the basic key data;
and the first electronic equipment sequentially removes the key data in the basic key data according to the order of the priority from low to high until the migration duration of the residual key data is less than or equal to the preset duration threshold value, and takes the residual key data as the target migration data.
6. The method of claim 1, wherein the first electronic device obtaining the priority of each application data in the data to be migrated comprises:
The first electronic equipment acquires the use parameters of the application programs corresponding to the application data; the use parameters comprise a use duration and/or a use frequency;
and the first electronic equipment determines the priority of each application data according to the use parameters.
7. The method of claim 6, wherein the first electronic device determining the priority of the respective application data based on the usage parameters comprises:
and the first electronic equipment performs weighted summation on the using duration and the using frequency of the application program corresponding to each application data to obtain the priority of each application data.
8. The method of claim 1, wherein the first interface further comprises a first control; the responding to the operation input to the first interface, the first electronic device migrating the target migration data to the second electronic device, comprising:
responsive to operation of the first control input in the first interface, the first electronic device displays a second interface;
and responding to the operation of the second control input in the second interface, and migrating the target migration data to the second electronic device by the first electronic device.
9. The method of any one of claims 1 to 8, further comprising, after the first electronic device migrates the target migration data to the second electronic device:
under the condition that all the target migration data are migrated to the second electronic equipment, the first electronic equipment is disconnected with the second electronic equipment;
under the condition that connection is established with the second electronic equipment again, the first electronic equipment displays a prompt box; the prompt box comprises a data list of non-migrated data and a confirmation control, wherein the non-migrated data is data except the target migration data in the data to be migrated;
and responding to the operation of the input of the confirmation control, and migrating the non-migrated data to the second electronic device by the first electronic device.
10. An electronic device comprising a memory for storing a computer program and a processor for invoking the computer program to perform the data migration method of any of claims 1 to 9.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program or instructions which, when executed, implement the data migration method of any one of claims 1 to 9.
CN202210622137.5A 2022-06-02 2022-06-02 Data migration method and electronic equipment Active CN116089358B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210622137.5A CN116089358B (en) 2022-06-02 2022-06-02 Data migration method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210622137.5A CN116089358B (en) 2022-06-02 2022-06-02 Data migration method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116089358A CN116089358A (en) 2023-05-09
CN116089358B true CN116089358B (en) 2023-11-24

Family

ID=86197923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210622137.5A Active CN116089358B (en) 2022-06-02 2022-06-02 Data migration method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116089358B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702169B (en) * 2023-05-19 2024-02-06 国网物资有限公司 Data encryption migration method, electronic device and computer readable medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375465A (en) * 2016-09-14 2017-02-01 广东欧珀移动通信有限公司 Data migration method and server
CN107145386A (en) * 2017-04-28 2017-09-08 广东欧珀移动通信有限公司 Data migration method, terminal device and computer-readable recording medium
WO2018113533A1 (en) * 2016-12-22 2018-06-28 阿里巴巴集团控股有限公司 Method, apparatus and system for metadata migration, and device
CN109460188A (en) * 2018-11-13 2019-03-12 郑州云海信息技术有限公司 A kind of data migration method, system, equipment and computer readable storage medium
CN110555014A (en) * 2019-09-06 2019-12-10 中国联合网络通信集团有限公司 Data migration method and system, electronic device and storage medium
CN111897654A (en) * 2020-07-31 2020-11-06 腾讯科技(深圳)有限公司 Method and device for migrating application to cloud platform, electronic equipment and storage medium
CN112433813A (en) * 2020-11-19 2021-03-02 北京浪潮数据技术有限公司 Resource scheduling method, system, equipment and computer readable storage medium
CN113126924A (en) * 2021-04-21 2021-07-16 山东英信计算机技术有限公司 Data migration method, device and equipment and computer readable storage medium
CN114553958A (en) * 2022-01-04 2022-05-27 深圳绿米联创科技有限公司 Data migration processing method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200379946A1 (en) * 2019-05-30 2020-12-03 Apple Inc. Device, method, and graphical user interface for migrating data to a first device during a new device set-up workflow

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375465A (en) * 2016-09-14 2017-02-01 广东欧珀移动通信有限公司 Data migration method and server
WO2018113533A1 (en) * 2016-12-22 2018-06-28 阿里巴巴集团控股有限公司 Method, apparatus and system for metadata migration, and device
CN107145386A (en) * 2017-04-28 2017-09-08 广东欧珀移动通信有限公司 Data migration method, terminal device and computer-readable recording medium
CN109460188A (en) * 2018-11-13 2019-03-12 郑州云海信息技术有限公司 A kind of data migration method, system, equipment and computer readable storage medium
CN110555014A (en) * 2019-09-06 2019-12-10 中国联合网络通信集团有限公司 Data migration method and system, electronic device and storage medium
CN111897654A (en) * 2020-07-31 2020-11-06 腾讯科技(深圳)有限公司 Method and device for migrating application to cloud platform, electronic equipment and storage medium
CN112433813A (en) * 2020-11-19 2021-03-02 北京浪潮数据技术有限公司 Resource scheduling method, system, equipment and computer readable storage medium
CN113126924A (en) * 2021-04-21 2021-07-16 山东英信计算机技术有限公司 Data migration method, device and equipment and computer readable storage medium
CN114553958A (en) * 2022-01-04 2022-05-27 深圳绿米联创科技有限公司 Data migration processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116089358A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
US20230049548A1 (en) Audio Output Method and Terminal Device
EP3876506B1 (en) Method for presenting video on electronic device when incoming call comes, and electronic device
US20220358089A1 (en) Learning-Based Keyword Search Method and Electronic Device
US20230070358A1 (en) File Sharing Method, System, and Related Device
US20230054451A1 (en) Communication Connection Method and Electronic Device
CN113805797B (en) Processing method of network resource, electronic equipment and computer readable storage medium
WO2022037480A1 (en) Task processing method and related electronic device
US20230418630A1 (en) Operation sequence adding method, electronic device, and system
EP4345669A1 (en) User privacy protection method and apparatus
CN116089358B (en) Data migration method and electronic equipment
CN113709026B (en) Method, device, storage medium and program product for processing instant communication message
WO2022022674A1 (en) Application icon layout method and related apparatus
CN114741256B (en) Sensor monitoring method and device and terminal equipment
CN114173286B (en) Method and device for determining test path, electronic equipment and readable storage medium
WO2022247446A1 (en) Performance optimization method and related device
CN114371895B (en) Terminal equipment, mail marking method and storage medium
CN115314427A (en) Protocol testing method, electronic equipment and chip system
CN113810857B (en) Beacon message processing method and system
WO2020216144A1 (en) Method for adding mail contact, and electronic device
CN117009023B (en) Method for displaying notification information and related device
CN116708647B (en) Notification message reply method and electronic equipment
CN113254409B (en) File sharing method, system and related equipment
EP4336865A1 (en) Interaction method and apparatus for electronic device
CN115828227B (en) Method for identifying advertisement popup, electronic equipment and storage medium
WO2023045876A1 (en) Application installation method and related devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant