CN106792442B - Data migration method and device - Google Patents

Data migration method and device Download PDF

Info

Publication number
CN106792442B
CN106792442B CN201611088748.7A CN201611088748A CN106792442B CN 106792442 B CN106792442 B CN 106792442B CN 201611088748 A CN201611088748 A CN 201611088748A CN 106792442 B CN106792442 B CN 106792442B
Authority
CN
China
Prior art keywords
application
terminal
migration
application identifier
data
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
CN201611088748.7A
Other languages
Chinese (zh)
Other versions
CN106792442A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611088748.7A priority Critical patent/CN106792442B/en
Publication of CN106792442A publication Critical patent/CN106792442A/en
Application granted granted Critical
Publication of CN106792442B publication Critical patent/CN106792442B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/64Details of telephonic subscriber devices file transfer between terminals

Abstract

The disclosure discloses a data migration method and device, and belongs to the technical field of communication. The data migration method comprises the following steps: acquiring migration data, wherein the migration data is data corresponding to target content in an operating environment of a first terminal, the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently, and transmitting the migration data to a second terminal, and the migration data is used for indicating the second terminal to restore the operating environment. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.

Description

Data migration method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a data migration method and apparatus.
Background
With the continuous improvement of living standard, people can hold a plurality of terminals in daily life and migrate the data of one terminal to other terminals, so that when one terminal cannot work, other terminals can be adopted to continue working.
In the related art, when a user migrates data of a first terminal, a designated application for migrating the data may be started at the first terminal, an account of the user is logged in the designated application, the data to be migrated is selected, and a "backup" option is selected, so that the data to be migrated is uploaded to a server by the first terminal. And the user starts the designated application at the second terminal, logs in the same account as before, and selects a recovery option, so that the second terminal can download the data uploaded by the first terminal from the server, and can migrate the data of the first terminal to the second terminal after the downloading is finished.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
for the application and/or webpage currently opened by the first terminal, the user can only open the same application and/or webpage again at the second terminal, which takes a long time and is inefficient.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a data migration method and apparatus. The technical scheme is as follows:
according to a first aspect of the present disclosure, there is provided a data migration method, the method comprising:
acquiring migration data, wherein the migration data is data corresponding to target content in an operating environment of a first terminal, and the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently;
and transmitting the migration data to a second terminal, wherein the migration data is used for indicating the second terminal to recover the operating environment.
Optionally, the target content includes at least one application that the first terminal has currently opened;
the acquiring migration data includes:
acquiring an opened application list according to a Software Development Kit (SDK), wherein the opened application list comprises: the first terminal identifies the application of each opened application at present;
acquiring application data of each opened application according to each application identifier;
and determining each application identification and application data of the application corresponding to each application identification as the migration data.
Optionally, the target content includes at least one webpage that the first terminal has opened currently;
the acquiring migration data includes:
acquiring at least one Uniform Resource Locator (URL) recorded in a webpage control according to a preset Application Programming Interface (API), wherein each URL corresponds to a webpage;
acquiring an application identifier corresponding to the application for starting each URL according to each URL;
establishing a corresponding relation between each URL and a corresponding application identifier;
and determining the corresponding relation as the migration data.
Optionally, the transmitting the migration data to the second terminal includes:
packaging the migration data according to a preset protocol to obtain packaged migration data;
and transmitting the encapsulated migration data to the second terminal.
Optionally, the transmitting the migration data to the second terminal includes:
generating a two-dimensional code according to the migration data, displaying the two-dimensional code, and scanning the two-dimensional code to enable the second terminal to obtain the migration data;
or, establishing a wireless connection between the first terminal and the second terminal, and transmitting the migration data to the second terminal through the wireless connection;
or transmitting the migration data to the second terminal through a Near Field Communication (NFC) technology.
Optionally, the obtaining migration data includes:
receiving a migration instruction;
displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction;
receiving a selection instruction generated by triggering at least one migration button by a user;
determining the content indicated by the at least one migration button corresponding to the selection instruction as target content;
and determining the data corresponding to the target content as the migration data.
According to a second aspect of the present disclosure, there is provided a data migration method, the method comprising:
acquiring migration data transmitted by a first terminal, wherein the migration data is data corresponding to target content in an operating environment of the first terminal, and the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently;
and recovering the operating environment of the first terminal at the second terminal according to the migration data.
Optionally, the restoring, at the second terminal, the operating environment of the first terminal according to the migration data includes:
identifying the migration data according to a preset protocol;
when the migration data comprises at least one application identifier, opening an application corresponding to each application identifier according to the at least one application identifier;
and when the migration data comprises at least one Uniform Resource Locator (URL), opening a webpage corresponding to each URL according to the at least one URL.
Optionally, the migration data further includes application data of an application corresponding to each application identifier in the at least one application identifier;
the opening the application corresponding to each application identifier according to the at least one application identifier includes:
for each application identifier, determining whether the second terminal comprises an application corresponding to the application identifier;
when the second terminal comprises the application corresponding to the application identifier, acquiring application data corresponding to the application identifier, and starting the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier;
and when the second terminal does not comprise the application corresponding to the application identifier, prompting a user to download the application corresponding to the application identifier.
Optionally, the migration data further includes a correspondence between each URL and a corresponding application identifier, where the correspondence records at least one URL and an application identifier corresponding to an application that opens each URL;
the opening of the webpage corresponding to each URL according to the at least one URL comprises:
judging whether the second terminal comprises an application corresponding to the first application identifier, wherein the first application identifier is any application identifier recorded in the corresponding relation;
when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier in the corresponding relation;
and when the second terminal does not comprise the application corresponding to the first application identifier, prompting a user to download the application corresponding to the first application identifier.
Optionally, the restoring, at the second terminal, the operating environment of the first terminal according to the migration data includes:
displaying a selection button of each content in the running environment corresponding to the migration data according to the migration data;
receiving a selection instruction generated by triggering at least one selection button by a user;
and opening the content indicated by the at least one selection button corresponding to the selection instruction.
Optionally, the obtaining migration data transmitted by the first terminal includes:
scanning the two-dimensional code displayed by the first terminal to obtain migration data corresponding to the two-dimensional code;
or receiving migration data transmitted by the first terminal according to the wireless connection established between the first terminal and the second terminal;
or receiving the migration data transmitted by the first terminal through a Near Field Communication (NFC) technology.
According to a third aspect of the present disclosure, there is provided a data migration apparatus, the apparatus comprising:
the system comprises an acquisition module, a migration module and a display module, wherein the acquisition module is configured to acquire migration data, the migration data is data corresponding to target content in an operating environment of a first terminal, and the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently;
a transmission module configured to transmit the migration data to a second terminal, where the migration data is used to instruct the second terminal to restore the operating environment.
Optionally, the target content includes at least one application that the first terminal has currently opened;
the obtaining module is further configured to obtain an opened application list according to the software development kit SDK, obtain application data of each opened application according to each application identifier, and determine each application identifier and the application data of the application corresponding to each application identifier as the migration data, where the opened application list includes: and the application identifier of each opened application currently of the first terminal.
Optionally, the target content includes at least one webpage that the first terminal has opened currently;
the obtaining module is further configured to obtain at least one Uniform Resource Locator (URL) recorded in the web page control according to a preset Application Programming Interface (API), obtain an application identifier corresponding to an application for starting each URL according to each URL, establish a corresponding relationship between each URL and the corresponding application identifier, and determine the corresponding relationship as the migration data, wherein each URL corresponds to one web page.
Optionally, the transmission module is further configured to encapsulate the migration data according to a preset protocol to obtain encapsulated migration data, and transmit the encapsulated migration data to the second terminal.
Optionally, the transmission module is further configured to generate a two-dimensional code according to the migration data, display the two-dimensional code, and scan the two-dimensional code so that the second terminal can obtain the migration data;
or, establishing a wireless connection between the first terminal and the second terminal, and transmitting the migration data to the second terminal through the wireless connection;
or transmitting the migration data to the second terminal through a Near Field Communication (NFC) technology.
Optionally, the obtaining module is further configured to receive a migration instruction, display a migration button corresponding to each content in an operating environment of the first terminal according to the migration instruction, receive a selection instruction generated by a user triggering at least one migration button, determine a content indicated by the at least one migration button corresponding to the selection instruction as a target content, and determine data corresponding to the target content as the migration data.
According to a fourth aspect of the present disclosure, there is provided a data migration apparatus, the apparatus comprising:
the mobile terminal comprises an acquisition module, a processing module and a display module, wherein the acquisition module is configured to acquire migration data transmitted by a first terminal, the migration data is data corresponding to target content in an operating environment of the first terminal, and the target content comprises at least one application and/or at least one webpage which is opened by the first terminal currently;
and the restoring module is configured to restore the operating environment of the first terminal at the second terminal according to the migration data.
Optionally, the recovery module is further configured to identify the migration data according to a preset protocol, when the migration data includes at least one application identifier, open an application corresponding to each application identifier according to the at least one application identifier, and when the migration data includes at least one uniform resource locator URL, open a web page corresponding to each URL according to the at least one URL.
Optionally, the migration data further includes application data of an application corresponding to each application identifier in the at least one application identifier;
the recovery module is further configured to determine, for each application identifier, whether the second terminal includes an application corresponding to the application identifier, obtain application data corresponding to the application identifier when the second terminal includes the application corresponding to the application identifier, open the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier, and prompt a user to download the application corresponding to the application identifier when the second terminal does not include the application corresponding to the application identifier.
Optionally, the migration data further includes a correspondence between each URL and a corresponding application identifier, where the correspondence records at least one URL and an application identifier corresponding to an application that opens each URL;
the recovery module is further configured to determine whether the second terminal includes an application corresponding to the first application identifier, open at least one webpage according to at least one URL corresponding to the first application identifier in the correspondence when the second terminal includes an application corresponding to the first application identifier, and prompt a user to download an application corresponding to the first application identifier when the second terminal does not include an application corresponding to the first application identifier, where the first application identifier is any application identifier recorded in the correspondence.
Optionally, the recovery module is further configured to display a selection button of each content in the execution environment corresponding to the migration data according to the migration data, receive a selection instruction generated by a user triggering at least one selection button, and start the content indicated by the at least one selection button corresponding to the selection instruction.
Optionally, the obtaining module is further configured to scan a two-dimensional code displayed by the first terminal, and obtain migration data corresponding to the two-dimensional code;
or receiving migration data transmitted by the first terminal according to the wireless connection established between the first terminal and the second terminal;
or receiving the migration data transmitted by the first terminal through a Near Field Communication (NFC) technology.
According to a fifth aspect of the present disclosure, there is provided a data migration apparatus, the apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
acquiring migration data, wherein the migration data is data corresponding to target content in an operating environment of a first terminal, and the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently;
and transmitting the migration data to a second terminal, wherein the migration data is used for indicating the second terminal to recover the operating environment.
According to a sixth aspect of the present disclosure, there is provided a data migration apparatus, the apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
acquiring migration data transmitted by a first terminal, wherein the migration data is data corresponding to target content in an operating environment of the first terminal, and the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently;
and recovering the operating environment of the first terminal at the second terminal according to the migration data.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
and after the second terminal receives the migration data, restoring the operating environment of the first terminal according to the migration data. The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic illustration of an implementation environment involved in a data migration method according to some exemplary embodiments;
FIG. 2 is a flow chart illustrating a method of data migration in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of data migration in accordance with another exemplary embodiment;
FIG. 4 is a flow chart diagram illustrating a method of data migration in accordance with yet another illustrative embodiment;
FIG. 5 is an interface diagram of a first terminal shown in accordance with an exemplary embodiment;
FIG. 6 is an interface diagram of a second terminal shown in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating a data migration apparatus in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating a data migration apparatus in accordance with another exemplary embodiment;
FIG. 9 is a block diagram illustrating a data migration apparatus according to yet another example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The term "and/or" in this disclosure is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 is a schematic diagram illustrating an implementation environment involved in a data migration method according to some exemplary embodiments, and as shown in fig. 1, the implementation environment may include a first terminal 110 and a second terminal 120.
The first terminal 110 and the second terminal 120 may be mobile phones, tablets or other terminal devices, which is not limited in this embodiment.
The first terminal 110 is configured to obtain the migration data and send the migration data to the second terminal. The migration data is data corresponding to target content in the operating environment of the first terminal 110, where the target content includes at least one application and/or at least one web page that the first terminal 110 has currently opened.
The second terminal 120 is configured to obtain the migration data sent by the first terminal 110, recover the operating environment of the first terminal 110 according to the migration data, and start the target content in the operating environment.
Fig. 2 is a flowchart illustrating a data migration method according to an exemplary embodiment, where as shown in fig. 2, the data migration method is applied to a first terminal in the implementation environment shown in fig. 1, and includes the following steps:
in step 201, migration data is obtained.
The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal.
In step 202, the migration data is transmitted to the second terminal.
Wherein the migration data is used for instructing the second terminal to restore the operating environment.
In summary, in the data migration method provided in the embodiment of the present disclosure, the first terminal obtains the migration data, and transmits the migration data to the second terminal, so that the second terminal recovers the operating environment of the first terminal according to the migration data after receiving the migration data. The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.
Fig. 3 is a flowchart illustrating a data migration method according to an exemplary embodiment, where as shown in fig. 3, the data migration method is applied to a second terminal in the implementation environment shown in fig. 1, and includes the following steps:
in step 301, migration data transmitted by the first terminal is acquired.
The migration data is data corresponding to target content in an operating environment of the first terminal, and the target content includes at least one application and/or at least one webpage which are currently opened by the first terminal.
In step 302, the operating environment of the first terminal is restored at the second terminal based on the migration data.
In summary, in the data migration method provided in the embodiment of the present disclosure, the migration data acquired and sent by the first terminal is received by the second terminal, and the operating environment of the first terminal is recovered according to the migration data. The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.
Fig. 4 is a flowchart illustrating a data migration method according to an exemplary embodiment, where the data migration method is applied to the first terminal and the second terminal in the implementation environment shown in fig. 1, as shown in fig. 4, and includes the following steps:
in step 401, the first terminal obtains migration data.
The running environment of the first terminal comprises a plurality of contents, each content corresponds to one application or webpage, the migration data is data corresponding to target content in the running environment of the first terminal, the target content comprises at least one application and/or at least one webpage which are currently started by the first terminal, and the target content is content which a user desires to migrate to the second terminal.
When the first terminal cannot continue to work normally due to insufficient electric quantity, weak signals or other reasons, the user can transfer the operating environment of the first terminal to the second terminal and continue to work through the second terminal. Therefore, when the first terminal transfers the operating environment of the first terminal to the second terminal, the first terminal needs to first acquire data corresponding to the operating environment, and use the data corresponding to the target content in the operating environment as migration data.
In the process of acquiring the migration data by the first terminal, step 401 may be step 401a or step 401 b:
step 401a, the first terminal obtains an opened application list according to an SDK (Software Development Kit), obtains application data of each opened application according to an application identifier of each application in the opened application list, and determines each application identifier and application data of an application corresponding to each application identifier as migration data.
The system of the first terminal may include an opened application list, where the opened application list may include an application identifier of each currently opened application of the first terminal, where the application identifier is used to indicate an application of the first terminal, and the application identifier may be a package name corresponding to the application or other identifiers, which is not limited in this embodiment.
In the case that the target content includes at least one application that the first terminal has currently opened, the first terminal may obtain the opened application list in the system of the first terminal according to the SDK, obtain an application identifier of each application that the first terminal has currently opened, obtain application data of a corresponding application according to the application identifier of each application, and finally determine each application identifier and the application data of the application corresponding to each application identifier as migration data.
The application data of the application may include various data such as text data, message record, and play record, which is not limited in this embodiment.
For example, the currently opened application of the first terminal includes a social contact application, a reading application, a video playing application, and the like, the application data of the social contact application may be a message record, the application data of the reading application may be a text material, and the application data of the video playing application may be a playing record.
Step 401b, the first terminal obtains at least one URL (Uniform Resource Location) recorded in the web page control according to a preset API (Application Programming Interface), obtains an Application identifier corresponding to an Application that starts each URL according to each URL, establishes a corresponding relationship between each URL and a corresponding Application identifier, and determines the corresponding relationship as migration data.
Each URL corresponds to a webpage and is a character string used for describing information resources on the Internet.
In the case that the target content includes at least one webpage that the first terminal has currently opened, the first terminal may obtain at least one URL temporarily stored in the webpage control according to a preset API, so that the at least one URL becomes a persistently stored URL without being overwritten.
The first terminal further needs to determine, according to the URL, an application identifier corresponding to an application that opens the corresponding web page, that is, which application the web page corresponding to each URL is opened by, then establishes a correspondence between each URL and the corresponding application identifier, and finally determines the correspondence as migration data, so that the second terminal can open the web page corresponding to each application in different applications according to the correspondence in subsequent steps.
For example, the applications that the first terminal can browse the web pages include a and B, the user opens web pages X and Y using a, and opens web page Z using B, and then in the process of acquiring the migration data, the corresponding relationship shown in table 1 is established, where the application identifier a1 of application a corresponds to the URL-X of web page X and the URL-Y of Y, and the application identifier B2 of application B corresponds to the URL-Z of web page Z.
TABLE 1
Application identification URL
A1 URL-X
A1 URL-Y
B2 URL-Z
In practical application, in an Android system, a webpage is usually opened by calling a loadURL in a webpage control WebView, and a URL corresponding to the webpage is cached in the loadURL, so that the URL cached in the loadURL can be obtained by modifying a relevant API of an Android frame.
It should be noted that, in practical applications, the first terminal may simultaneously open a plurality of applications for browsing a web page, reading a text material, performing social interaction with other users, and the like, and the first terminal not only needs to execute step 401a, but also needs to execute step 401b, that is, step 401 may further include step 401a and step 401 b.
Moreover, the first terminal may execute step 401a first and then step 401b, may execute step 401b first and then step 401a, and may also execute step 401a and step 401b at the same time, which is not limited in this embodiment.
In addition, before the first terminal acquires the migration data, the first terminal may receive a migration instruction triggered by a user, then acquire, according to the migration instruction, data corresponding to the target content by using each content in the current operating environment of the first terminal as the target content, and finally acquire the acquired data as the migration data.
Moreover, after receiving a migration instruction triggered by a user, the first terminal may first display a migration button corresponding to each content in an operating environment of the first terminal according to the migration instruction, and when the first terminal receives a selection instruction generated by triggering at least one migration button by the user again, determine a content indicated by the at least one migration button corresponding to the selection instruction as a target content, and determine data corresponding to the target content as the migration data.
When the migration button is selected, the user wants to migrate the application corresponding to the migration button to the second terminal.
For example, referring to fig. 5, the first terminal presents currently opened applications A, B and C to the user, and provides the user with a migration button 501 corresponding to each application and a determination option 502 for determining migration, and after the user selects any migration button, and after the first terminal detects the selection of the determination option 502 by the user, the first terminal may use the selected application as a target content and acquire corresponding application data.
In step 402, the first terminal encapsulates the migration data according to a preset protocol to obtain the encapsulated migration data.
In order that the second terminal can identify the operating environment corresponding to the migration data after receiving the migration data sent by the first terminal, after obtaining the migration data, the first terminal needs to encapsulate the migration data according to a preset protocol to obtain the encapsulated migration data, so that the second terminal can identify the encapsulated migration data according to the preset protocol in subsequent steps, and thus the operating environment of the first terminal is recovered.
In step 403, the first terminal transmits the migration data to the second terminal.
Wherein the migration data is used for instructing the second terminal to restore the operating environment.
After the migration data is encapsulated, the first terminal can transmit the encapsulated migration data to the second terminal. Moreover, before the first terminal transmits the migration data to the second terminal, the first terminal may provide a plurality of transmission modes for the user, and after detecting that the user selects one transmission mode, the first terminal transmits the migration data to the second terminal according to the selection of the user.
The transmission mode may include a two-dimensional code mode, a wireless connection mode, and an NFC (Near field communication) mode, and may also include other modes, which are not limited in this embodiment.
For example, after detecting that the two-dimensional code mode is selected by the user, the first terminal may generate the two-dimensional code according to the migration data, and then display the generated two-dimensional code on the interface of the first terminal, and the second terminal may acquire the migration data by scanning the two-dimensional code.
Or, after detecting that the user selects the wireless connection mode, the first terminal may start a bluetooth function and search for surrounding bluetooth devices, and may establish a bluetooth connection between the first terminal and the second terminal when the second terminal also starts bluetooth, and then the first terminal transmits the migration data to the second terminal. The first terminal may also establish a wireless connection with the second terminal by using other wireless connection manners, which is not limited in this embodiment.
In step 404, the second terminal obtains the migration data transmitted by the first terminal.
When the first terminal transmits the encapsulated migration data to the second terminal, the second terminal can receive the migration data in a mode corresponding to the sending mode of the first terminal. The process of receiving the migration data by the second terminal is similar to the process of sending the migration data by the first terminal in step 403, and is not described herein again.
It should be noted that, if the first terminal transmits the encapsulated migration data in the two-dimensional code manner, the second terminal needs to scan the two-dimensional code generated by the first terminal and perform identification according to the two-dimensional code, so as to obtain the encapsulated migration data.
In step 405, the second terminal identifies the migration data according to a preset protocol.
After the second terminal acquires the migration data, the encapsulated data can be identified according to a preset protocol, and at least one application identifier and/or at least one URL carried in the encapsulated migration data are determined, so that corresponding applications and/or webpages can be started in subsequent steps.
In step 406, the second terminal restores the operating environment of the first terminal at the second terminal according to the migration data.
After the second terminal identifies the migration data, corresponding applications and/or webpages can be opened according to at least one application identifier and/or at least one URL in the migration data, so that the operating environment of the first terminal is recovered, and a user can continue to work through the second terminal.
When the migration data includes at least one application identifier, the first terminal may open an application corresponding to each application identifier according to the at least one application identifier; when the migration data includes at least one URL, the first terminal may open a webpage corresponding to each URL according to the at least one URL.
In the process of restoring the operating environment of the first terminal by the second terminal, step 406 may be step 406a or step 406 b:
step 406a, determining, for each application identifier, whether the second terminal includes an application corresponding to the application identifier, when the second terminal includes an application corresponding to the application identifier, acquiring application data corresponding to the application identifier, and opening the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier.
In the process of starting the application by the second terminal, the second terminal further needs to restore the interface displayed on the first terminal by each application, and therefore the migration data further includes application data of the application corresponding to each application identifier in the at least one application identifier.
For each application identifier in at least one application identifier identified by the second terminal, the second terminal may first determine whether an application corresponding to the application identifier is included, and if the application corresponding to the application identifier is included, obtain the application data corresponding to the application identifier from the migration data according to the application identifier, and finally open the application corresponding to the application identifier according to each application identifier and the corresponding application data.
However, when the second terminal does not include the application corresponding to the application identifier, the user may be prompted to download the application corresponding to the application identifier, and the application may be continuously started after the download is completed, so as to recover the operating environment of the first terminal.
Step 406b, determining whether the second terminal includes the application corresponding to the first application identifier, and when the second terminal includes the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier in the corresponding relationship.
Wherein, the first application identifier is any application identifier recorded in the corresponding relationship.
In the process of opening the web page by the second terminal, the web page needs to be opened by the corresponding application, so the migration data may further include a correspondence between each URL and the corresponding application identifier, where the correspondence records at least one URL and the application identifier corresponding to the application that opened each URL.
Correspondingly, the second terminal needs to determine whether the second terminal includes the application corresponding to the first application identifier before opening the webpage, and if the second terminal includes the application corresponding to the first application identifier, at least one URL corresponding to the first application identifier is acquired according to the corresponding relationship between each URL and the corresponding application identifier, and finally, the first application corresponding to the first application identifier is opened, and at least one webpage corresponding to the first application identifier is opened in the first application.
However, when the second terminal does not include the application corresponding to the first application identifier, the user may be prompted to download the application corresponding to the first application identifier, or when it is determined that the second terminal includes other applications for opening a web page, the user is asked whether to open the corresponding web page using the other applications, so as to recover the operating environment of the first terminal.
For example, referring to table 1 in step 401B, if the first terminal has opened web page X and web page Y using application a, has opened web page Z using application B, and the second terminal does not include application a, the second terminal may prompt the user to download application a, and open web page X and web page Y through application a after downloading application a; or inquiring whether the user adopts the application B to open the webpage X and the webpage Y, and if the user confirms that the application B is adopted to open the webpage X and the webpage Y, then opening the webpage X and the webpage Y on the basis that the application B opens the webpage Z.
It should be noted that, in practical applications, the first terminal may simultaneously open multiple applications, which are respectively used for browsing a web page, reading text materials, and performing social interaction with other users, and the like, and after the second terminal receives the migration data, the multiple applications need to be recovered, and the second terminal needs to perform not only step 406a but also step 406b, that is, step 406 may further include step 406a and step 406 b.
Moreover, the second terminal may execute step 406a first and then step 406b, may execute step 406b first and then step 406a, and may execute step 406a and step 406b at the same time, which is not limited in this embodiment.
It should be further noted that, before the second terminal starts the corresponding application and/or web page, the second terminal may first obtain at least one content in the operating environment corresponding to the migration data according to the migration data, and display a selection button of each content, and when the second terminal receives a selection instruction generated by triggering at least one selection button by the user again, may start the content indicated by the at least one selection button corresponding to the selection instruction.
For example, referring to fig. 6, the second terminal presents the identified applications A, B and C to the user, and provides the user with a migration option 602 determined by the selection button 601 corresponding to each application, and after the user selects any selection button 601 and detects the selection of the migration option 602 by the user, the second terminal may obtain the corresponding application identifier and application data, and restore the operating environment of the first terminal.
Moreover, if the user does not select the selection button corresponding to the application for opening the web page, the second terminal does not need to open the web page corresponding to the unselected application; or, if a certain application opens at least one web page, but the user does not select to open all web pages corresponding to the application, the second terminal does not need to open the application either.
Of course, the second terminal may also determine to open the application and/or the web page in other manners, which is not limited in this embodiment.
It should be noted that, the order of the steps of the data migration method provided in the embodiment of the present disclosure may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, and any method that can be easily conceived by a person skilled in the art within the technical scope of the present disclosure should be included in the protection scope of the present disclosure, and therefore, the details are not described again.
In summary, in the data migration method provided in the embodiment of the present disclosure, migration data is obtained by the first terminal, and the migration data is transmitted to the second terminal, and after the second terminal receives the migration data, the operating environment of the first terminal is recovered according to the migration data. The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 7 is a block diagram illustrating a data migration apparatus according to an exemplary embodiment, where, as shown in fig. 7, the data migration apparatus 70 is applied to a first terminal in the implementation environment shown in fig. 1, and the data migration apparatus 700 includes: an acquisition module 701 and a transmission module 702.
The obtaining module 701 is configured to obtain migration data, where the migration data is data corresponding to target content in an operating environment of the first terminal, and the target content includes at least one application and/or at least one webpage that the first terminal has currently opened;
the transmission module 702 is configured to transmit the migration data to the second terminal, where the migration data is used to instruct the second terminal to restore the operating environment.
In summary, the data migration apparatus provided in the embodiment of the present disclosure obtains the migration data through the first terminal, and transmits the migration data to the second terminal, so that the second terminal recovers the operating environment of the first terminal according to the migration data after receiving the migration data. The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.
Optionally, the target content includes at least one application that the first terminal has currently opened;
the obtaining module 701 is further configured to obtain an opened application list according to the software development kit SDK, obtain application data of each opened application according to each application identifier, and determine each application identifier and the application data of the application corresponding to each application identifier as the migration data, where the opened application list includes: and the first terminal identifies the application of each opened application currently.
Optionally, the target content includes at least one webpage that the first terminal has opened currently;
the obtaining module 701 is further configured to obtain at least one uniform resource locator URL recorded in the web page control according to a preset application programming interface API, obtain, according to each URL, an application identifier corresponding to an application that opens each URL, establish a correspondence between each URL and a corresponding application identifier, and determine the correspondence as the migration data, where each URL corresponds to one web page.
Optionally, the transmission module 702 is further configured to encapsulate the migration data according to a preset protocol to obtain encapsulated migration data, and transmit the encapsulated migration data to the second terminal.
Optionally, the transmission module 702 is further configured to generate a two-dimensional code according to the migration data, and display the two-dimensional code, and a second terminal can obtain the migration data by scanning the two-dimensional code;
or, establishing a wireless connection between the first terminal and the second terminal, and transmitting the migration data to the second terminal through the wireless connection;
or transmitting the migration data to the second terminal through a Near Field Communication (NFC) technology.
Optionally, the obtaining module 701 is further configured to receive a migration instruction, display a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction, receive a selection instruction generated by triggering at least one migration button by a user, determine a content indicated by the at least one migration button corresponding to the selection instruction as a target content, and determine data corresponding to the target content as the migration data.
Fig. 8 is a block diagram illustrating a data migration apparatus according to an exemplary embodiment, where, as shown in fig. 8, the data migration apparatus 80 is applied to a second terminal in the implementation environment shown in fig. 1, and the data migration apparatus 800 includes: an acquisition module 801 and a recovery module 802.
The obtaining module 801 is configured to obtain migration data transmitted by a first terminal, where the migration data is data corresponding to target content in an operating environment of the first terminal, and the target content includes at least one application and/or at least one webpage that the first terminal has currently opened;
the recovery module 802 is configured to recover the operating environment of the first terminal at the second terminal according to the migration data.
In summary, the data migration apparatus provided in the embodiment of the present disclosure receives, by the second terminal, the migration data acquired and sent by the first terminal, and recovers the operating environment of the first terminal according to the migration data. The migration data is data corresponding to target content in the running environment of the first terminal, and the target content includes at least one application and/or at least one webpage which is currently opened by the first terminal. By transmitting the currently opened application and/or webpage to the second terminal, the user does not need to open the corresponding application and/or webpage again when using the second terminal, so that the time spent by the user for restoring the operating environment of the first terminal by using the second terminal is reduced, and the efficiency of restoring the operating environment of the first terminal is improved.
Optionally, the recovery module 802 is further configured to identify the migration data according to a preset protocol, when the migration data includes at least one application identifier, open an application corresponding to each application identifier according to the at least one application identifier, and when the migration data includes at least one uniform resource locator URL, open a web page corresponding to each URL according to the at least one URL.
Optionally, the migration data further includes application data of an application corresponding to each application identifier in the at least one application identifier;
the recovery module 802 is further configured to determine, for each application identifier, whether the second terminal includes an application corresponding to the application identifier, obtain application data corresponding to the application identifier when the second terminal includes the application corresponding to the application identifier, open the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier, and prompt the user to download the application corresponding to the application identifier when the second terminal does not include the application corresponding to the application identifier.
Optionally, the migration data further includes a correspondence between each URL and a corresponding application identifier, where the correspondence records at least one URL and an application identifier corresponding to an application that opens each URL;
the recovery module 802 is further configured to determine whether the second terminal includes an application corresponding to the first application identifier, open at least one webpage according to at least one URL corresponding to the first application identifier in the corresponding relationship when the second terminal includes an application corresponding to the first application identifier, and prompt a user to download an application corresponding to the first application identifier when the second terminal does not include an application corresponding to the first application identifier, where the first application identifier is any application identifier recorded in the corresponding relationship.
Optionally, the recovery module 802 is further configured to display, according to the migration data, a selection button of each content in the execution environment corresponding to the migration data, receive a selection instruction generated by triggering at least one selection button by a user, and start the content indicated by the at least one selection button corresponding to the selection instruction.
Optionally, the obtaining module 801 is further configured to scan the two-dimensional code displayed by the first terminal, and obtain migration data corresponding to the two-dimensional code;
or receiving migration data transmitted by the first terminal according to the wireless connection established between the first terminal and the second terminal;
or receiving the migration data transmitted by the first terminal through a Near Field Communication (NFC) technology.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides a data migration apparatus, which can implement the data migration method provided by the present disclosure, and the data migration apparatus includes: a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring migration data, wherein the migration data is data corresponding to target content in an operating environment of a first terminal, and the target content comprises at least one application and/or at least one webpage which is started by the first terminal currently;
and transmitting the migration data to the second terminal, wherein the migration data is used for indicating the second terminal to restore the operating environment.
An exemplary embodiment of the present disclosure provides a data migration apparatus, which can implement the data migration method provided by the present disclosure, and the data migration apparatus includes: a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring migration data transmitted by a first terminal, wherein the migration data is data corresponding to target content in an operating environment of the first terminal, and the target content comprises at least one application and/or at least one webpage which is opened by the first terminal currently;
and restoring the operating environment of the first terminal at the second terminal according to the migration data.
FIG. 9 is a block diagram illustrating a data migration apparatus according to an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 9, apparatus 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing components 902 may include one or more processors 918 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the apparatus 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 906 provides power to the various components of the device 900. The power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 includes a screen that provides an output interface between the device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, sensor assembly 914 may detect an open/closed state of device 900, the relative positioning of components, such as a display and keypad of device 900, the change in position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration/deceleration of device 900, and the change in temperature of device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described data migration methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 904 comprising instructions, executable by the processor 918 of the device 900 to perform the data migration method described above, is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method of data migration, the method comprising:
acquiring migration data, wherein the migration data is data corresponding to target content in an operating environment of a first terminal, the target content comprises at least one application and at least one webpage which are started by the first terminal at present, and the migration data comprises application data of each application identifier and an application corresponding to each application identifier, and a corresponding relation between a Uniform Resource Locator (URL) corresponding to each webpage and a corresponding application identifier;
packaging the migration data according to a preset protocol to obtain packaged migration data; transmitting the encapsulated migration data to a second terminal, wherein the encapsulated migration data is used for indicating the second terminal to restore the operating environment, the second terminal is used for identifying the encapsulated migration data according to the preset protocol, displaying a selection button of each content in the operating environment corresponding to the encapsulated migration data, taking a selection instruction generated by triggering at least one selection button by a receiving user as a first selection instruction, and starting the content indicated by the at least one selection button corresponding to the first selection instruction;
the acquiring migration data includes:
when a migration instruction is received, displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction; taking a received selection instruction generated by triggering at least one migration button by a user as a second selection instruction, determining the content indicated by the at least one migration button corresponding to the second selection instruction as target content, and determining data corresponding to the target content as the migration data;
the second terminal is further configured to determine, for each application identifier included in the migration data, whether the second terminal includes an application corresponding to the application identifier; when the second terminal comprises the application corresponding to the application identifier, acquiring application data corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, and starting the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier; when the second terminal does not comprise the application corresponding to the application identifier, prompting a user to download the application corresponding to the application identifier;
the second terminal is further configured to determine whether the second terminal includes an application corresponding to a first application identifier, where the first application identifier is any application identifier recorded in the correspondence; when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier indicated by the at least one selection button corresponding to the first selection instruction in the corresponding relation; when the second terminal does not include the application corresponding to the first application identifier, prompting the user to download the application corresponding to the first application identifier, or when the second terminal does not include the application corresponding to the first application identifier and determines that the second terminal includes other applications for opening the webpage, inquiring whether the user adopts the other applications to open the webpage.
2. The method of claim 1, wherein the target content comprises at least one application that the first terminal has currently opened;
the acquiring migration data includes:
acquiring an opened application list according to a Software Development Kit (SDK), wherein the opened application list comprises: the first terminal identifies the application of each opened application at present;
acquiring application data of each opened application according to each application identifier;
and determining the application identification indicated by the at least one migration button corresponding to the second selection instruction and the application data of the application corresponding to the application identification as the migration data.
3. The method of claim 1, wherein the target content comprises at least one webpage that the first terminal has currently opened;
the acquiring migration data includes:
acquiring at least one Uniform Resource Locator (URL) recorded in a webpage control according to a preset Application Programming Interface (API), wherein each URL corresponds to a webpage;
acquiring an application identifier corresponding to the application for starting each URL according to each URL;
establishing a corresponding relation between each URL and a corresponding application identifier;
and determining the corresponding relation between the URL indicated by the at least one migration button corresponding to the second selection instruction in the corresponding relation and the corresponding application identifier as the migration data.
4. The method of claim 1, wherein the transmitting the encapsulated migration data to the second terminal comprises:
generating a two-dimensional code according to the encapsulated migration data, displaying the two-dimensional code, and scanning the two-dimensional code to enable the second terminal to obtain the encapsulated migration data;
or, establishing a wireless connection between the first terminal and the second terminal, and transmitting the encapsulated migration data to the second terminal through the wireless connection;
or transmitting the packaged migration data to the second terminal through a Near Field Communication (NFC) technology.
5. A method of data migration, the method comprising:
acquiring encapsulated migration data transmitted by a first terminal, wherein the first terminal is used for acquiring the encapsulated migration data transmitted by the first terminal, displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction, taking a received selection instruction generated by triggering at least one migration button by a user as a second selection instruction, determining the content indicated by the at least one migration button corresponding to the second selection instruction as target content, encapsulating the data corresponding to the target content according to a preset protocol to obtain the encapsulated migration data, the target content comprises at least one application and at least one webpage which are opened by the first terminal currently, the migration data includes application data for each application identification and the application to which each application identification corresponds, and the corresponding relation between the uniform resource locator URL corresponding to each webpage and the corresponding application identifier;
identifying the encapsulated migration data according to a preset protocol, and recovering the operating environment of the first terminal at the second terminal according to the encapsulated migration data;
the restoring, at the second terminal, the operating environment of the first terminal according to the migration data includes:
displaying a selection button of each content in the operating environment corresponding to the encapsulated migration data, and taking a selection instruction generated by receiving at least one selection button triggered by the user as a first selection instruction; opening the content indicated by the at least one selection button corresponding to the first selection instruction so as to recover the operating environment of the first terminal at the second terminal;
according to at least one application identifier included in the migration data, opening an application corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, including:
for each application identifier, determining whether the second terminal comprises an application corresponding to the application identifier; when the second terminal comprises the application corresponding to the application identifier, acquiring application data corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, and starting the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier; when the second terminal does not comprise the application corresponding to the application identifier, prompting a user to download the application corresponding to the application identifier;
according to at least one URL included in the migration data, opening a webpage corresponding to the URL indicated by the at least one selection button corresponding to the first selection instruction, wherein the webpage comprises:
judging whether the second terminal comprises an application corresponding to a first application identifier, wherein the first application identifier is any application identifier recorded in the corresponding relation; when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier indicated by the at least one selection button corresponding to the first selection instruction in the corresponding relation; when the second terminal does not include the application corresponding to the first application identifier, prompting a user to download the application corresponding to the first application identifier, or when the second terminal does not include the application corresponding to the first application identifier and determines that the second terminal includes other applications for opening the webpage, inquiring whether the user adopts the other applications to open the webpage.
6. The method according to claim 5, wherein the obtaining the encapsulated migration data transmitted by the first terminal comprises:
scanning the two-dimensional code displayed by the first terminal to obtain the encapsulated migration data corresponding to the two-dimensional code;
or receiving the encapsulated migration data transmitted by the first terminal according to the wireless connection established between the first terminal and the second terminal;
or, receiving the encapsulated migration data transmitted by the first terminal through a Near Field Communication (NFC) technology.
7. An apparatus for data migration, the apparatus comprising:
the mobile terminal comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is configured to acquire migration data, the migration data is data corresponding to target content in an operating environment of a first terminal, the target content comprises at least one application and at least one webpage which are started by the first terminal currently, the migration data comprises application data of each application identifier and an application corresponding to each application identifier, and a corresponding relation between a Uniform Resource Locator (URL) corresponding to each webpage and the corresponding application identifier;
the transmission module is configured to package the migration data according to a preset protocol to obtain the packaged migration data; transmitting the encapsulated migration data to a second terminal, wherein the encapsulated migration data is used for indicating the second terminal to restore the operating environment, the second terminal is used for identifying the encapsulated migration data according to the preset protocol, displaying a selection button of each content in the operating environment corresponding to the encapsulated migration data, taking a selection instruction generated by triggering at least one selection button by a receiving user as a first selection instruction, and starting the content indicated by the at least one selection button corresponding to the first selection instruction;
the acquisition module is further configured to:
when a migration instruction is received, displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction; taking a received selection instruction generated by triggering at least one migration button by a user as a second selection instruction, determining the content indicated by the at least one migration button corresponding to the second selection instruction as target content, and determining data corresponding to the target content as the migration data;
the second terminal is further configured to determine, for each application identifier included in the migration data, whether the second terminal includes an application corresponding to the application identifier; when the second terminal comprises the application corresponding to the application identifier, acquiring application data corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, and starting the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier; when the second terminal does not comprise the application corresponding to the application identifier, prompting a user to download the application corresponding to the application identifier;
the second terminal is further configured to determine whether the second terminal includes an application corresponding to a first application identifier, where the first application identifier is any application identifier recorded in the correspondence; when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier indicated by the at least one selection button corresponding to the first selection instruction in the corresponding relation; when the second terminal does not include the application corresponding to the first application identifier, prompting the user to download the application corresponding to the first application identifier, or when the second terminal does not include the application corresponding to the first application identifier and determines that the second terminal includes other applications for opening the webpage, inquiring whether the user adopts the other applications to open the webpage.
8. The apparatus of claim 7, wherein the target content comprises at least one application that the first terminal has currently opened;
the obtaining module is further configured to obtain an opened application list according to the software development kit SDK, obtain application data of each opened application according to each application identifier, and determine, as the migration data, the application identifier indicated by the at least one migration button corresponding to the second selection instruction and the application data of the application corresponding to the application identifier, where the opened application list includes: and the application identifier of each opened application currently of the first terminal.
9. The apparatus according to claim 7, wherein the target content comprises at least one webpage that the first terminal has currently opened;
the obtaining module is further configured to obtain at least one Uniform Resource Locator (URL) recorded in the web page control according to a preset Application Programming Interface (API), obtain, according to each URL, an application identifier corresponding to an application for starting each URL, establish a corresponding relationship between each URL and the corresponding application identifier, determine, as the migration data, a corresponding relationship between a URL indicated by the at least one migration button corresponding to the second selection instruction in the corresponding relationship and the corresponding application identifier, and determine that each URL corresponds to one web page.
10. The apparatus according to claim 7, wherein the transmission module is further configured to generate a two-dimensional code according to the encapsulated migration data, and display the two-dimensional code, and the second terminal can obtain the encapsulated migration data by scanning the two-dimensional code;
or, establishing a wireless connection between the first terminal and the second terminal, and transmitting the encapsulated migration data to the second terminal through the wireless connection;
or transmitting the packaged migration data to the second terminal through a Near Field Communication (NFC) technology.
11. An apparatus for data migration, the apparatus comprising:
an obtaining module configured to obtain encapsulated migration data transmitted by a first terminal, the first terminal being configured to, when receiving a migration instruction, displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction, taking a received selection instruction generated by triggering at least one migration button by a user as a second selection instruction, determining the content indicated by the at least one migration button corresponding to the second selection instruction as target content, encapsulating the data corresponding to the target content according to a preset protocol to obtain the encapsulated migration data, the target content comprises at least one application and at least one webpage which are opened by the first terminal currently, the migration data includes application data for each application identification and the application to which each application identification corresponds, and the corresponding relation between the uniform resource locator URL corresponding to each webpage and the corresponding application identifier;
the recovery module is configured to identify the encapsulated migration data according to a preset protocol, and recover the operating environment of the first terminal at the second terminal according to the encapsulated migration data;
the recovery module is further configured to display a selection button of each content in the operating environment corresponding to the encapsulated migration data, and take a selection instruction generated by triggering at least one selection button by a receiving user as a first selection instruction; opening the content indicated by the at least one selection button corresponding to the first selection instruction so as to recover the operating environment of the first terminal at the second terminal;
the recovery module is further configured to determine, for each application identifier included in the migration data, whether the second terminal includes an application corresponding to the application identifier, obtain, when the second terminal includes the application corresponding to the application identifier, application data corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, open the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier, and prompt a user to download the application corresponding to the application identifier when the second terminal does not include the application corresponding to the application identifier, or, after it is determined that the second terminal includes another application for opening the web page, ask the user whether to open the web page using the another application;
the recovery module is further configured to determine whether the second terminal includes an application corresponding to a first application identifier, where the first application identifier is any application identifier recorded in the correspondence; when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier indicated by the at least one selection button corresponding to the first selection instruction in the corresponding relation, when the second terminal does not comprise the application corresponding to the first application identifier, prompting a user to download the application corresponding to the first application identifier, or when the second terminal does not comprise the application corresponding to the first application identifier and determines that the second terminal comprises other applications for opening the webpage, inquiring whether the user adopts the other applications to open the webpage.
12. The apparatus according to claim 11, wherein the obtaining module is further configured to scan a two-dimensional code displayed by the first terminal, and obtain the encapsulated migration data corresponding to the two-dimensional code;
or receiving the encapsulated migration data transmitted by the first terminal according to the wireless connection established between the first terminal and the second terminal;
or, receiving the encapsulated migration data transmitted by the first terminal through a Near Field Communication (NFC) technology.
13. An apparatus for data migration, the apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
acquiring migration data, wherein the migration data is data corresponding to target content in an operating environment of a first terminal, the target content comprises at least one application and at least one webpage which are started by the first terminal at present, and the migration data comprises application data of each application identifier and an application corresponding to each application identifier, and a corresponding relation between a Uniform Resource Locator (URL) corresponding to each webpage and a corresponding application identifier;
packaging the migration data according to a preset protocol to obtain packaged migration data; transmitting the encapsulated migration data to a second terminal, wherein the encapsulated migration data is used for indicating the second terminal to restore the operating environment, the second terminal is used for identifying the encapsulated migration data according to the preset protocol, displaying a selection button of each content in the operating environment corresponding to the encapsulated migration data, taking a selection instruction generated by triggering at least one selection button by a receiving user as a first selection instruction, and starting the content indicated by the at least one selection button corresponding to the first selection instruction;
the acquiring migration data includes:
when a migration instruction is received, displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction; taking a received selection instruction generated by triggering at least one migration button by a user as a second selection instruction, determining the content indicated by the at least one migration button corresponding to the second selection instruction as target content, and determining data corresponding to the target content as the migration data;
the second terminal is further configured to determine, for each application identifier included in the migration data, whether the second terminal includes an application corresponding to the application identifier; when the second terminal comprises the application corresponding to the application identifier, acquiring application data corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, and starting the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier; when the second terminal does not comprise the application corresponding to the application identifier, prompting a user to download the application corresponding to the application identifier;
the second terminal is further configured to determine whether the second terminal includes an application corresponding to a first application identifier, where the first application identifier is any application identifier recorded in the correspondence; when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier indicated by the at least one selection button corresponding to the first selection instruction in the corresponding relation; when the second terminal does not include the application corresponding to the first application identifier, prompting the user to download the application corresponding to the first application identifier, or when the second terminal does not include the application corresponding to the first application identifier and determines that the second terminal includes other applications for opening the webpage, inquiring whether the user adopts the other applications to open the webpage.
14. An apparatus for data migration, the apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
acquiring encapsulated migration data transmitted by a first terminal, wherein the first terminal is used for acquiring the encapsulated migration data transmitted by the first terminal, displaying a migration button corresponding to each content in the operating environment of the first terminal according to the migration instruction, taking a received selection instruction generated by triggering at least one migration button by a user as a second selection instruction, determining the content indicated by the at least one migration button corresponding to the second selection instruction as target content, encapsulating the data corresponding to the target content according to a preset protocol to obtain the encapsulated migration data, the target content comprises at least one application and at least one webpage which are opened by the first terminal currently, the migration data includes application data for each application identification and the application to which each application identification corresponds, and the corresponding relation between the uniform resource locator URL corresponding to each webpage and the corresponding application identifier;
identifying the encapsulated migration data according to a preset protocol, and recovering the operating environment of the first terminal at the second terminal according to the encapsulated migration data;
the restoring, at the second terminal, the operating environment of the first terminal according to the migration data includes:
displaying a selection button of each content in the operating environment corresponding to the encapsulated migration data, and taking a selection instruction generated by triggering at least one selection button by a receiving user as a first selection instruction; opening the content indicated by the at least one selection button corresponding to the first selection instruction so as to recover the operating environment of the first terminal at the second terminal;
according to at least one application identifier included in the migration data, opening an application corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, including:
for each application identifier, determining whether the second terminal comprises an application corresponding to the application identifier; when the second terminal comprises the application corresponding to the application identifier, acquiring application data corresponding to the application identifier indicated by the at least one selection button corresponding to the first selection instruction, and starting the application corresponding to the application identifier according to the application identifier and the application data corresponding to the application identifier; when the second terminal does not comprise the application corresponding to the application identifier, prompting a user to download the application corresponding to the application identifier;
according to at least one URL included in the migration data, opening a webpage corresponding to the URL indicated by the at least one selection button corresponding to the first selection instruction, wherein the webpage comprises:
judging whether the second terminal comprises an application corresponding to a first application identifier, wherein the first application identifier is any application identifier recorded in the corresponding relation; when the second terminal comprises the application corresponding to the first application identifier, opening at least one webpage according to at least one URL corresponding to the first application identifier indicated by the at least one selection button corresponding to the first selection instruction in the corresponding relation; when the second terminal does not include the application corresponding to the first application identifier, prompting a user to download the application corresponding to the first application identifier, or when the second terminal does not include the application corresponding to the first application identifier and determines that the second terminal includes other applications for opening the webpage, inquiring whether the user adopts the other applications to open the webpage.
CN201611088748.7A 2016-11-30 2016-11-30 Data migration method and device Active CN106792442B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611088748.7A CN106792442B (en) 2016-11-30 2016-11-30 Data migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611088748.7A CN106792442B (en) 2016-11-30 2016-11-30 Data migration method and device

Publications (2)

Publication Number Publication Date
CN106792442A CN106792442A (en) 2017-05-31
CN106792442B true CN106792442B (en) 2020-07-03

Family

ID=58915203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611088748.7A Active CN106792442B (en) 2016-11-30 2016-11-30 Data migration method and device

Country Status (1)

Country Link
CN (1) CN106792442B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133161A (en) * 2017-12-25 2018-06-08 横琴国际知识产权交易中心有限公司 A kind of mobile terminal reads the method and system of data information
CN109922368B (en) * 2019-02-18 2021-09-21 海信视像科技股份有限公司 Picture display method based on webpage and smart television
CN114205365B (en) * 2020-08-31 2023-06-20 华为技术有限公司 Application interface migration system, method and related equipment
CN113259523B (en) * 2021-05-31 2023-09-29 Oppo广东移动通信有限公司 Connection method, equipment to be migrated, system and medium
CN117675881A (en) * 2022-08-22 2024-03-08 华为技术有限公司 Application data storage method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279485A (en) * 2013-04-24 2013-09-04 华为技术有限公司 Method and device for resource sharing
CN103457964A (en) * 2012-05-28 2013-12-18 联想(北京)有限公司 Synchronization method and electronic equipment
CN103984579A (en) * 2014-05-30 2014-08-13 满金标 Method for multiple equipment rooms to share current application program real-time running state
CN104079597A (en) * 2013-03-26 2014-10-01 华为终端有限公司 Transfer method of media stream and user equipment
CN104980326A (en) * 2014-04-03 2015-10-14 联想移动通信软件(武汉)有限公司 Method and device for sharing application content between terminal equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457964A (en) * 2012-05-28 2013-12-18 联想(北京)有限公司 Synchronization method and electronic equipment
CN104079597A (en) * 2013-03-26 2014-10-01 华为终端有限公司 Transfer method of media stream and user equipment
CN103279485A (en) * 2013-04-24 2013-09-04 华为技术有限公司 Method and device for resource sharing
CN104980326A (en) * 2014-04-03 2015-10-14 联想移动通信软件(武汉)有限公司 Method and device for sharing application content between terminal equipment
CN103984579A (en) * 2014-05-30 2014-08-13 满金标 Method for multiple equipment rooms to share current application program real-time running state

Also Published As

Publication number Publication date
CN106792442A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106792442B (en) Data migration method and device
JP6286105B2 (en) Cloud card transmission method, apparatus, program, and recording medium
CN108037863B (en) Method and device for displaying image
US20170171321A1 (en) Methods and devices for managing accounts
CN108702763B (en) Method and device for sending lead code and scheduling request
CN107239351B (en) Pasting method and device
CN108011990B (en) Contact management method and device
CN113259226A (en) Information synchronization method and device, electronic equipment and storage medium
CN113596175A (en) Scene synchronization method, terminal, server and system
CN108984098B (en) Information display control method and device based on social software
US11265924B2 (en) Method and device for data transmission
CN106506808B (en) Method and device for prompting communication message
CN104780256A (en) Address book management method and device and intelligent terminal
CN112328330A (en) iOS component calling method, device, middleware, electronic equipment and medium
EP3128722A1 (en) File transmission method and apparatus, computer program and recording medium
CN110764847A (en) User information processing method and device, electronic equipment and storage medium
CN107193446B (en) Image processing method, device, terminal and storage medium
CN107169042B (en) Method and device for sharing pictures and computer readable storage medium
CN106919332B (en) Information transmission method and equipment
KR102095666B1 (en) Information input methods, devices, programs and storage media
CN112651012B (en) Information processing method and device
CN115278139A (en) Video processing method and device, electronic equipment and storage medium
CN107483605A (en) Document down loading method and device, storage medium
CN111049732B (en) Push message display method and device, electronic equipment and medium
CN108011882B (en) Method, device and system for data synchronization

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