[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106488392B - Data transfer method and device - Google Patents

Data transfer method and device Download PDF

Info

Publication number
CN106488392B
CN106488392B CN201610849507.3A CN201610849507A CN106488392B CN 106488392 B CN106488392 B CN 106488392B CN 201610849507 A CN201610849507 A CN 201610849507A CN 106488392 B CN106488392 B CN 106488392B
Authority
CN
China
Prior art keywords
terminal
data
installation package
file
specified 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
CN201610849507.3A
Other languages
Chinese (zh)
Other versions
CN106488392A (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 Anyun Century Technology Co Ltd
Original Assignee
Beijing Anyun Century Technology 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 Anyun Century Technology Co Ltd filed Critical Beijing Anyun Century Technology Co Ltd
Priority to CN201610849507.3A priority Critical patent/CN106488392B/en
Publication of CN106488392A publication Critical patent/CN106488392A/en
Application granted granted Critical
Publication of CN106488392B publication Critical patent/CN106488392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for transferring data, which are applied to a first terminal to transfer specified data to a second terminal and comprise the following steps: after a data transfer instruction is obtained, obtaining specified data needing to be transferred in a first terminal; the data transfer instruction is used for transferring specified data in the first terminal to the second terminal; packaging the specified data to generate an installation package; transmitting the installation package to the second terminal; and installing the installation package through the second terminal, and acquiring the specified data on the second terminal and recovering to the application catalog corresponding to the specified data. The data transfer method and device provided by the invention are convenient for data transfer between intelligent terminal devices, simple to operate and convenient to use, and improve user experience.

Description

Data transfer method and device
Technical Field
The present invention relates to the field of intelligent devices, and in particular, to a method and an apparatus for data transfer.
Background
At present, as the update rate of electronic equipment is increased, the service life of each piece of electronic equipment is shortened, and the problems caused by the service life are as follows: various data originally stored in the old electronic device needs to be transferred to the new electronic device. For example, after a user changes a mobile phone, the user needs to transfer an address book, a picture, configuration information, application data and the like in the original mobile phone to a new mobile phone; at present, no method which is simple to operate and convenient to use is used for transferring corresponding data, and user experience is poor.
Disclosure of Invention
The invention mainly aims to provide a data transfer method and device, which are convenient for data transfer between intelligent terminal devices, simple in operation and convenient to use, and improve user experience.
The invention provides a data transfer method, which is applied to a first terminal to transfer specified data to a second terminal and comprises the following steps:
after a data transfer instruction is obtained, obtaining specified data needing to be transferred in a first terminal; the data transfer instruction is used for transferring specified data in the first terminal to the second terminal;
packaging the specified data to generate an installation package;
transmitting the installation package to the second terminal;
and installing the installation package through the second terminal, and acquiring the specified data on the second terminal and recovering to the application catalog corresponding to the specified data.
Further, the first terminal and the second terminal are terminals based on an android system.
Further, the step of packaging the specified data and generating an installation package includes:
packing the specified data to generate an R.java file, and processing the AIDL file to generate a java file;
compiling R.java and.java files to generate class files;
convert the class file to a dex file;
and packaging the dex file to generate an APK file, wherein the APK file is an APK installation package.
Further, the step of packaging the dex file to generate an APK file, wherein the APK file is an APK installation package and the step of packaging the APK file comprises the following steps:
the apk file is signed.
Further, the step of transmitting the installation package to the second terminal includes:
and the first terminal transmits the installation package to a storage device and transmits the installation package to the second terminal through the storage device.
Further, the step of transmitting the installation package to the second terminal includes:
the first terminal sends the installation package to the second terminal through short-range communication; the short-range communication comprises Bluetooth communication, NFC communication, WIFI and WIFI hotspot communication.
Further, the step of transmitting the installation package to the second terminal includes:
the first terminal uploads the installation package to a cloud storage server, and the installation package is transmitted to the second terminal through the cloud storage server.
Further, the step of installing the installation package through the second terminal, acquiring the specified data on the second terminal, and restoring to the application catalog corresponding to the specified data includes:
and installing the installation package through the second terminal, detecting an installation directory by the second terminal to acquire the specified data, and restoring the specified data to the corresponding application directory.
Further, the specified data includes at least one of a contact, a short message, a call record, a picture, a setting, configuration information, an application installation package, and application data.
Further, the step of installing the installation package through the second terminal, detecting an installation directory by the second terminal to obtain the specified data, and restoring the specified data to the corresponding application directory by the second terminal includes:
and installing the installation package through the second terminal, detecting an installation directory by the second terminal to acquire one or more of contact persons, short messages, call records, pictures, setting and configuration information in the specified data, restoring the contact persons, the short messages, the call records and the pictures to corresponding application program directories, and configuring the setting and configuration information and the corresponding applications.
Further, the step of installing the installation package through the second terminal, detecting an installation directory by the second terminal to obtain the specified data, and restoring the specified data to the corresponding application directory by the second terminal includes:
installing the installation package through the second terminal, detecting an installation directory by the second terminal to obtain an application installation package and corresponding application data in the specified data, installing the application installation package and configuring the corresponding application data;
and installing the installation package through the second terminal, detecting an installation directory by the second terminal to acquire application data in the specified data, and configuring the application data and the corresponding application.
The invention also provides a data transfer device, which is applied to a first terminal to transfer specified data to a second terminal and comprises the following steps:
the acquisition unit is used for acquiring specified data needing to be transferred in the first terminal after the data transfer instruction is acquired; the data transfer instruction is used for transferring specified data in the first terminal to the second terminal;
the packaging unit is used for packaging the specified data to generate an installation package;
a transmission unit, configured to transmit the installation package to the second terminal;
and the installation unit is used for installing the installation package through the second terminal, acquiring the specified data on the second terminal and recovering the specified data to the application catalog corresponding to the specified data.
Further, the first terminal and the second terminal are terminals based on an android system.
Further, the packing unit includes:
the first packing subunit is used for packing the specified data to generate an R.java file and processing the AIDL file to generate a.java file;
the compiling subunit is used for compiling R.java and.java files to generate class files;
a transformation subunit for transforming the class file into a dex file;
and the second packing subunit is used for packing the dex file to generate an APK file, wherein the APK file is an APK installation package.
Further, the packing unit further includes:
and the signature subunit is used for signing the apk file.
Further, the transmission unit is configured to:
and transmitting the installation package to a storage device, and transmitting the installation package to the second terminal through the storage device.
Further, the transmission unit is configured to:
transmitting the installation package to the second terminal through short-range communication; the short-range communication comprises Bluetooth communication, NFC communication, WIFI and WIFI hotspot communication.
Further, the transmission unit is configured to:
uploading the installation package to a cloud storage server, and transmitting the installation package to the second terminal through the cloud storage server.
Further, the mounting unit specifically includes:
and the installation subunit is used for installing the installation package through the second terminal, and the second terminal detects an installation directory to acquire the specified data and restores the specified data to the corresponding application directory.
Further, the specified data includes at least one of a contact, a short message, a call record, a picture, a setting, configuration information, an application installation package, and application data.
Further, the mounting subunit is specifically configured to:
and installing the installation package through the second terminal, detecting an installation directory by the second terminal to acquire one or more of contact persons, short messages, call records, pictures, setting and configuration information in the specified data, restoring the contact persons, the short messages, the call records and the pictures to corresponding application program directories, and configuring the setting and configuration information and the corresponding applications.
Further, the mounting subunit is specifically configured to:
installing the installation package through the second terminal, detecting an installation directory by the second terminal to obtain an application installation package and corresponding application data in the specified data, installing the application installation package and configuring the corresponding application data;
and installing the installation package through the second terminal, detecting an installation directory by the second terminal to acquire application data in the specified data, and configuring the application data and the corresponding application.
The data transfer method and the data transfer device provided by the invention have the following beneficial effects:
according to the data transfer method and device provided by the invention, after the instruction for transferring the specified data in the first terminal to the second terminal is obtained, the specified data needing to be transferred in the first terminal is obtained; packaging the specified data to generate an installation package; then transmitting the installation package to a second terminal; installing the installation package through a second terminal, and acquiring the specified data and recovering to the application catalog corresponding to the specified data by the second terminal; therefore, the designated data can be transferred from the first terminal to the second terminal, the second terminal can acquire the designated data and import the designated data into the corresponding application directory, other operations are not needed by a user, the whole process is simple to operate, the use is convenient, and the user experience is improved.
Drawings
FIG. 1 is a schematic diagram of the method steps for data transfer in one embodiment of the present invention;
FIG. 2 is a diagram illustrating the detailed step of step S2 according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for data transfer according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a mounting unit according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a packing unit structure according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" include plural referents unless the content clearly dictates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, units, modules, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, units, modules, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used herein, "terminal," "smart terminal," "mobile terminal," "terminal device" includes both devices having wireless signal receivers, which are devices having only wireless signal receivers without transmit capability, and devices having receive and transmit hardware, which have devices having receive and transmit hardware capable of performing two-way communication over a two-way communication link, as will be understood by those skilled in the art. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal communications service), which may combine voice, data processing, facsimile and/or data communications capabilities; a PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, internet/intranet access, a web browser, a notepad, a calendar and/or a GPS (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal" or "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or situated and/or configured to operate locally and/or in a distributed fashion at any other location(s) on earth and/or in space. The "terminal", "smart terminal", "terminal Device" used herein may also be a communication terminal, a web-enabled terminal, and a music/video playing terminal, and may be, for example, a PDA, an MID (Mobile Internet Device) and/or a Mobile phone with music/video playing function, and may also be a smart television, a set-top box, and the like.
Referring to fig. 1, a method for data conversion according to an embodiment of the present invention is shown.
An embodiment of the present invention provides a data transfer method, which is applied to a first terminal to transfer designated data to a second terminal, and includes the following steps:
step S1, after the data transfer instruction is obtained, obtaining the specified data to be transferred in the first terminal; the data transfer instruction is used for transferring the specified data in the first terminal to the second terminal.
In step S2, the specified data is packaged to generate an installation package.
Step S3, transmitting the installation package to the second terminal.
Step S4, installing the installation package through the second terminal, obtaining the specified data on the second terminal, and restoring to the application catalog corresponding to the specified data.
In this embodiment, the first terminal and the second terminal are terminal devices of the same type held by the same user, and the first terminal and the second terminal may be terminal devices such as a mobile phone, a computer, a tablet, and a smart watch. When a user changes a first terminal to a second terminal, the data specified on the first terminal is generally required to be transferred to the second terminal, so that the user can use the second terminal directly; such as address book contacts, short messages, call records, pictures, settings, configuration information, application installation packages, and corresponding application data in the first terminal.
In this embodiment, when a user changes a terminal device to transfer data, an instruction for transferring specified data in a first terminal is issued, where the instruction for transferring data is to specifically transfer the specified data in the first terminal to a second terminal, and the instruction also specifies which specific data the user needs to transfer; specifically, a user can send a transfer instruction bound with the transfer icon by touching the transfer icon displayed on the interface of the first terminal, the first terminal pops up a selection box to list a data list which can be transferred after receiving the data transfer instruction, and the user can select data which is desired to be transferred to the second terminal by touching the interface of the first terminal. The first terminal obtains the appointed data needing to be transferred in the first terminal according to the selection command of the user for selecting the appointed data. The designated data not only can include address list contacts, short messages, call records and pictures, but also can include some setting parameters, configuration information, application installation packages and application data. The installation package is an installation program corresponding to one application in the first terminal, and after the application installation package is provided for the second terminal, the second terminal does not need to download the installation package again. The setting parameters are setting conditions of the system application on the first terminal by the user; the configuration information is information for configuring the application when the user installs the application in the first terminal; the application data is data generated during execution of an application installed in the first terminal, such as passing information in a passing game, using application data generated during the WeChat application.
After the first terminal acquires the specified data, the specified data are all packaged to generate an executable installation package program, and preferably, the specified data are all packaged in an installation package to be conveniently transferred to the second terminal. The installation package must be installable in the second terminal, and therefore, when the first terminal and the second terminal are based on different systems, the first terminal needs to package the specified data into a file format that can be supported by the second terminal when packaging the specified data into the installation package. When the first terminal and the second terminal are based on the same system, the installation package generated by packaging on the first terminal can be installed on the second terminal without fail.
After the installation is finished, the second terminal detects the installation catalog to obtain the specified data, and correspondingly, the specified data is restored to the corresponding application catalog.
Specifically, the installation package is installed through the second terminal, the second terminal detects an installation directory to obtain one or more of contact persons, short messages, call records, pictures, settings and configuration information in the specified data, restores the contact persons, the short messages, the call records and the pictures to corresponding application program directories, and configures the settings and the configuration information with corresponding applications. For example, the information such as the telephone number of the contact person is correspondingly restored to the address book of the second terminal, and the picture is correspondingly restored to the gallery of the second terminal; and setting the application software corresponding to the application software as the boot self-starting according to the attribute of the boot self-starting in the configuration information of the application software. Therefore, the corresponding application on the second terminal is configured according to the use habit of the user on the first terminal, and the user experience is improved.
Specifically, the installation package is installed through the second terminal, the second terminal detects an installation directory to obtain an application installation package and corresponding application data in the specified data, installs the application installation package, and configures the corresponding application data; for example, the QQ installation package on the first terminal and the application data in the QQ are packaged and transferred to the second terminal, the QQ installation package is installed on the second terminal, the application data corresponding to the QQ is automatically imported, the chat record, the setting attribute and the like of the QQ software are recorded in the application data, and the second terminal can recover the application data of the QQ. The user can check the previous chat records with the friends and the like through the QQ on the second terminal.
Specifically, the installation package is installed through the second terminal, and when the specified data does not include an application installation package of a certain specified application and only includes application data of the specified application, the second terminal detects the installation directory to obtain the application data in the specified data, and configures the application data and the corresponding application on the second terminal. The configuration is performed according to the application data, so that the application on the second terminal can have the same application data as the same application on the first terminal. For example, based on the configuration of the application data, the breakthrough information of the breakthrough game on the second terminal is the same as the breakthrough information of the same game on the first terminal.
In an embodiment, the first terminal and the second terminal are terminals based on an android system, and preferably, the first terminal and the second terminal are android phones.
Specifically, referring to fig. 2, a detailed step diagram of step S2 in an embodiment of the present invention is shown.
In this embodiment, in the step S2, the step of packaging the specified data and generating the installation package specifically includes:
step S21, packing the specified data to generate an r.java file, and processing an aid l (Android interface definition Language) file to generate a java file.
And step S22, compiling the R.java and the.java files to generate the class file.
Step S23, convert the class file into the dex file.
And step S24, packaging the dex file to generate an APK file, wherein the APK file is an APK installation package.
In this embodiment, the specified data is packaged and stored as an r.java file, and the aid dl file is packaged and stored as a JAVA file, where the r.java file and the JAVA file are source files compiled from JAVA language. The class file (Java class) is generated by compiling the R.java file and the Java file, the generated class file is converted into a dex file, the dex file is the type of an executable file on an Android platform and can run on a Dalvik (Virtual machine) VM (Virtual server) of the Android platform, and then the dex file is packaged and converted into an APK file, wherein the APK file is an APK installation package and can run and be installed on the Android platform. Generate all appointed data into APK installation package, be convenient for shift transmission, be difficult to appear in disorder phenomenon, and this APK installation package can be based on the arbitrary equipment of tall and erect platform of ann and install the operation, and the commonality is high.
In this embodiment, the packaging of the dex file generates an apk file, where the apk file is an unsigned file, and in order to make the apk file easily verified by the terminal device, the method includes, after the step S24:
and step S25, signing the apk file, wherein the apk signature is the identification code of the apk file. Before the APK installation package program is operated, the second terminal can verify whether the signature of the program is legal or not, and only the file which passes the verification can be operated. Therefore, the apk file is signed on the first terminal, the installation package is guaranteed to be verified as a legal file by the second terminal after being transferred to the second terminal, and the installation package is convenient to operate on the second terminal.
In the above embodiment of the present invention, in the step S3, the transmitting the installation package to the second terminal includes:
and the first terminal transmits the installation package to a storage device and transmits the installation package to the second terminal through the storage device. The storage device includes an SD (Secure Digital Memory Card/SD Card) Memory Card, a USB flash drive (USB flash drive), a removable hard disk, and the like. The first terminal and the second terminal can be connected through a data connecting line to transmit the installation package.
The first terminal can also send the installation package to the second terminal through short-range communication; the short-range Communication comprises Bluetooth Communication, NFC (Near Field Communication, Near Field Communication technology) Communication, WIFI and WIFI hotspot Communication, and the transmission speed is high. The first terminal and the second terminal can carry out Bluetooth communication through Bluetooth pairing connection or carry out communication through NFC; or the WIFI signal transmitted by the home router is used for communication; or communicate over a 2G/3G/4G network. The WIFI hotspot communication can be realized by starting a WIFI hotspot through a first terminal, and connecting a second terminal with the WIFI hotspot to perform data transmission with the first terminal; the WIFI hotspot can also be opened through the second terminal, and the first terminal is connected with the WIFI hotspot and performs data transmission with the second terminal.
The first terminal can also upload the installation package to a cloud storage server, and the installation package is transmitted to the second terminal through the cloud storage server. Or, the installation package can be transmitted through social software on the first terminal and the second terminal, and the transmission speed is high.
In order to further explain the technical scheme of the invention, the invention also provides a data transfer device.
Referring to fig. 3, an embodiment of the present invention further provides a data transfer apparatus, which is applied to a first terminal to transfer specified data to a second terminal, and specifically includes:
the acquiring unit 10 is configured to acquire specified data to be transferred in the first terminal after acquiring the data transfer instruction; the data transfer instruction is used for transferring the specified data in the first terminal to the second terminal;
a packing unit 20, configured to pack the specified data to generate an installation package;
a transmission unit 30 for transmitting the installation package to the second terminal;
an installing unit 40, configured to install the installation package through the second terminal, obtain the specified data on the second terminal, and restore the specified data to the application directory corresponding to the specified data.
In this embodiment, the first terminal and the second terminal are terminal devices of the same type held by the same user, and the first terminal and the second terminal may be terminal devices such as a mobile phone, a computer, a tablet, and a smart watch. When a user changes a first terminal to a second terminal, the data specified on the first terminal is generally required to be transferred to the second terminal, so that the user can use the second terminal directly; such as address book contacts, short messages, call records, pictures, settings, configuration information, application installation packages, and corresponding application data in the first terminal.
In this embodiment, when a user changes a terminal device to transfer data, an instruction for transferring specified data in a first terminal is issued, where the instruction for transferring data is to specifically transfer the specified data in the first terminal to a second terminal, and the instruction also specifies which specific data the user needs to transfer; specifically, a user can send a transfer instruction bound with the transfer icon by touching the transfer icon displayed on the interface of the first terminal, the first terminal pops up a selection box to list a data list which can be transferred after receiving the data transfer instruction, and the user can select data which is desired to be transferred to the second terminal by touching the interface of the first terminal. The acquisition unit 10 acquires the specified data to be transferred in the first terminal according to a selection command for selecting the specified data by the user. The designated data not only can include address list contacts, short messages, call records and pictures, but also can include some setting parameters, configuration information, application installation packages and application data. The installation package is an installation program corresponding to one application in the first terminal, and after the application installation package is provided for the second terminal, the second terminal does not need to download the installation package again. The setting parameters are setting conditions of the system application on the first terminal by the user; the configuration information is information for configuring the application when the user installs the application in the first terminal; the application data is data generated during execution of an application installed in the first terminal, such as passing information in a passing game, using application data generated during the WeChat application.
After the acquiring unit 10 acquires the specified data, the packaging unit 20 packages all the specified data to generate an executable installation package program, and preferably, packages all the specified data in an installation package for convenient transfer to a second terminal. The installation package must be installable in the second terminal, and therefore, when the first terminal and the second terminal are based on different systems, the first terminal needs to package the specified data into a file format that can be supported by the second terminal when packaging the specified data into the installation package. When the first terminal and the second terminal are based on the same system, the installation package generated by packaging on the first terminal can be installed on the second terminal without fail.
After the packaging unit 20 packages the specified data, the specified data is transmitted to the second terminal through the transmission unit 30, the installation unit 40 instructs the second terminal to obtain the installation package and execute installation, after the installation is completed, the second terminal detects the installation directory, so that the specified data can be obtained, and correspondingly, the specified data is restored to the corresponding application directory.
Specifically, referring to fig. 4, the installation sheet 40 includes an installation subunit 401, the installation subunit 401 installs the installation package through the second terminal, detects an installation directory through the second terminal to obtain one or more of the contact, the short message, the call record, the picture, the setting and the configuration information in the specified data, restores the contact, the short message, the call record and the picture to a corresponding application directory, and configures the setting and the configuration information with the corresponding application. For example, the information such as the telephone number of the contact person is correspondingly restored to the address book of the second terminal, and the picture is correspondingly restored to the gallery of the second terminal; and setting the application software corresponding to the application software as the boot self-starting according to the attribute of the boot self-starting in the configuration information of the application software. Therefore, the corresponding application on the second terminal is configured according to the use habit of the user on the first terminal, and the user experience is improved.
Specifically, the installation subunit 401 installs the installation package through the second terminal, and the second terminal detects an installation directory to obtain an application installation package and corresponding application data in the specified data, installs the application installation package, and configures the corresponding application data; for example, the QQ installation package on the first terminal and the application data in the QQ are packaged and transferred to the second terminal, the QQ installation package is installed on the second terminal, the application data corresponding to the QQ is automatically imported, the chat record, the setting attribute and the like of the QQ software are recorded in the application data, and the second terminal can recover the application data of the QQ. The user can check the previous chat records with the friends and the like through the QQ on the second terminal.
Specifically, the installation subunit 401 installs the installation package through the second terminal, and when there is no application installation package of a specific application in the specific data and only the application data of the specific application exists, the second terminal detects the installation directory to obtain the application data in the specific data, and configures the application data and the corresponding application on the second terminal. The configuration is performed according to the application data, so that the application on the second terminal can have the same application data as the same application on the first terminal. For example, based on the configuration of the application data, the breakthrough information of the breakthrough game on the second terminal is the same as the breakthrough information of the same game on the first terminal.
In an embodiment, the first terminal and the second terminal are terminals based on an android system, and preferably, the first terminal and the second terminal are android phones.
Fig. 5 is a schematic structural diagram of the packing unit 20 according to an embodiment of the present invention.
The above packing unit 20 includes:
the first packing subunit 201 is configured to pack the specified data to generate an r.java file, and process the aid dl file to generate the java file.
And the compiling subunit 202 is used for compiling the R.java and the.java files to generate the class file.
A transformation transformer unit 203 for transforming the class file into a dex file.
And the second packing subunit 204 is configured to pack the dex file to generate an APK file, where the APK file is an APK installation package.
In this embodiment, the first packetizing subunit 201 packetizes and stores the specified data as an r.java file, and the aid dl file packetizes and stores a JAVA file, where the r.java file and the JAVA file are source files compiled from JAVA language. Furthermore, the compiling subunit 202 compiles the r.java file and the java file to generate a class file, the transforming subunit 203 transforms the generated class file to generate a dex file, which is the type of an executable file on an Android platform and can be run on a Dalvik VM, and the second packing subunit 204 packs the dex file to an APK file, which is an APK installation package and can be run and installed on the Android platform. Generate all appointed data into APK installation package, be convenient for shift transmission, be difficult to appear in disorder phenomenon, and this APK installation package can be based on the arbitrary equipment of tall and erect platform of ann and install the operation, and the commonality is high.
In this embodiment, the second packaging sub-unit 204 packages the dex file to generate an apk file, where the apk file is an unsigned file, and in order to make the apk file easily verified by the terminal device, the packaging unit 20 further includes:
and a signature subunit 205, configured to sign the apk file, where the apk signature is an identification code of the apk file. Before the APK installation package program is operated, the second terminal can verify whether the signature of the program is legal or not, and only the file which passes the verification can be operated. Therefore, the apk file is signed on the first terminal, the installation package is guaranteed to be verified as a legal file by the second terminal after being transferred to the second terminal, and the installation package is convenient to operate on the second terminal.
In the above embodiment of the present invention, the transmission unit 30 is configured to:
and transmitting the installation package to a storage device, and transmitting the installation package to the second terminal through the storage device. The storage device comprises an SD memory card, a U disk, a mobile hard disk and the like. The first terminal and the second terminal can be connected through a data connecting line to transmit the installation package.
The transmission unit 30 is further configured to:
transmitting the installation package to the second terminal through short-range communication; the short-range communication comprises Bluetooth communication, NFC communication, WIFI and WIFI hotspot communication, and the transmission speed is high. The first terminal and the second terminal can carry out Bluetooth communication through Bluetooth pairing connection or carry out communication through NFC; or the WIFI signal transmitted by the home router is used for communication; or communicate over a 2G/3G/4G network. The WIFI hotspot communication can be realized by starting a WIFI hotspot through a first terminal, and connecting a second terminal with the WIFI hotspot to perform data transmission with the first terminal; the WIFI hotspot can also be opened through the second terminal, and the first terminal is connected with the WIFI hotspot and performs data transmission with the second terminal. .
The transmission unit 30 is further configured to:
and uploading the installation package to a cloud storage server, and transmitting the installation package to the second terminal through the cloud storage server. Or, the installation package can be transmitted through social software on the first terminal and the second terminal, and the transmission speed is high.
In summary, in the method and the apparatus for data transfer provided in the embodiments of the present invention, after an instruction to transfer specified data in a first terminal to a second terminal is obtained, specified data that needs to be transferred in the first terminal is obtained; packaging the specified data to generate an executable installation package; then transmitting the installation package to a second terminal; installing the installation package through a second terminal, and acquiring the specified data and recovering to the application catalog corresponding to the specified data by the second terminal; therefore, the designated data can be transferred from the first terminal to the second terminal, the second terminal can acquire the designated data and import the designated data into the corresponding application directory, other operations are not needed by a user, the whole process is simple to operate, the use is convenient, and the user experience is improved.
Those skilled in the art will appreciate that the present invention includes apparatus directed to performing one or more of the operations described in the present application. These devices may be specially designed and manufactured for the required purposes, or they may comprise known devices in general-purpose computers. These devices have stored therein computer programs that are selectively activated or reconfigured. Such a computer program may be stored in a device (e.g., computer) readable medium, including, but not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a bus. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the features specified in the block or blocks of the block diagrams and/or flowchart illustrations of the present disclosure.
Those of skill in the art will appreciate that various operations, methods, steps in the processes, acts, or solutions discussed in the present application may be alternated, modified, combined, or deleted. Further, various operations, methods, steps in the flows, which have been discussed in the present application, may be interchanged, modified, rearranged, decomposed, combined, or eliminated. Further, steps, measures, schemes in the various operations, methods, procedures disclosed in the prior art and the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A data transfer method is applied to a first terminal to transfer specified data to a second terminal, and is characterized by comprising the following steps:
after a data transfer instruction is obtained, obtaining specified data needing to be transferred in a first terminal; the data transfer instruction is used for transferring specified data in the first terminal to the second terminal; the acquiring of the specified data to be transferred in the first terminal includes: the method comprises the steps that a first terminal pops up a selection box to list a data list which can be transferred, a user selects data which are to be transferred to a second terminal by touching a first terminal interface, and the first terminal obtains designated data which need to be transferred in the first terminal according to a selection command of the user for selecting the designated data; the designated data comprises an address list, short messages, pictures, setting parameters, configuration information, an installation package and installation data;
packaging the specified data to generate an installation package;
transmitting the installation package to the second terminal;
installing the installation package through the second terminal, acquiring the specified data on the second terminal and recovering to the application catalog corresponding to the specified data;
the step of packaging the specified data and generating an installation package comprises:
packing the specified data to generate an R.java file, and processing the AIDL file to generate a java file;
compiling R.java and.java files to generate class files;
convert the class file to a dex file;
packing the dex file to generate an APK file, wherein the APK file is an APK installation package;
the step of packaging the dex file to generate an APK file, wherein the step of packaging the APK file as an APK installation package comprises the following steps: the apk file is signed.
2. The data transfer method according to claim 1, wherein the first terminal and the second terminal are terminals based on an android system.
3. The method of data transfer according to claim 1, wherein the step of transmitting the installation package to the second terminal comprises: and the first terminal transmits the installation package to a storage device and transmits the installation package to the second terminal through the storage device.
4. An apparatus for transferring data, applied to a first terminal to transfer specified data to a second terminal, comprising:
the acquisition unit is used for acquiring specified data needing to be transferred in the first terminal after the data transfer instruction is acquired; the data transfer instruction is used for transferring specified data in the first terminal to the second terminal; the acquiring of the specified data to be transferred in the first terminal includes: the method comprises the steps that a first terminal pops up a selection box to list a data list which can be transferred, a user selects data which are to be transferred to a second terminal by touching a first terminal interface, and the first terminal obtains designated data which need to be transferred in the first terminal according to a selection command of the user for selecting the designated data; the designated data comprises an address list, short messages, pictures, setting parameters, configuration information, an installation package and installation data;
the packaging unit is used for packaging the specified data to generate an installation package;
a transmission unit, configured to transmit the installation package to the second terminal;
the installation unit is used for installing the installation package through the second terminal, acquiring the specified data on the second terminal and recovering the specified data to the application catalog corresponding to the specified data;
the packing unit includes:
the first packing subunit is used for packing the specified data to generate an R.java file and processing the AIDL file to generate a.java file;
the compiling subunit is used for compiling R.java and.java files to generate class files;
a transformation subunit for transforming the class file into a dex file;
the second packing subunit is used for packing the dex file to generate an APK file, wherein the APK file is an APK installation package;
wherein the packing unit further includes: and the signature subunit is used for signing the apk file.
5. The data transfer device according to claim 4, wherein the first terminal and the second terminal are android-based terminals.
6. The apparatus for data transfer according to claim 4, wherein the transmission unit is configured to:
and transmitting the installation package to a storage device, and transmitting the installation package to the second terminal through the storage device.
CN201610849507.3A 2016-09-23 2016-09-23 Data transfer method and device Active CN106488392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610849507.3A CN106488392B (en) 2016-09-23 2016-09-23 Data transfer method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610849507.3A CN106488392B (en) 2016-09-23 2016-09-23 Data transfer method and device

Publications (2)

Publication Number Publication Date
CN106488392A CN106488392A (en) 2017-03-08
CN106488392B true CN106488392B (en) 2020-06-16

Family

ID=58267637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610849507.3A Active CN106488392B (en) 2016-09-23 2016-09-23 Data transfer method and device

Country Status (1)

Country Link
CN (1) CN106488392B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122208A (en) * 2017-04-18 2017-09-01 深圳市金立通信设备有限公司 A kind of method and terminal of data transfer
CN109815047B (en) * 2019-01-04 2023-03-14 平安科技(深圳)有限公司 Data processing method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123199A (en) * 2014-07-03 2014-10-29 可牛网络技术(北京)有限公司 Method and device for recovering application program and mobile terminal
CN105279047A (en) * 2015-11-02 2016-01-27 广东欧珀移动通信有限公司 Data backup device and method and data recovery method and device
CN105468417A (en) * 2015-11-27 2016-04-06 小米科技有限责任公司 Application software installation method and device
CN105607965A (en) * 2015-11-09 2016-05-25 深圳前海达闼科技有限公司 Application data backup and backup transmission method, apparatus and system
CN105912421A (en) * 2016-04-06 2016-08-31 广东欧珀移动通信有限公司 Backup method and device for storing data in mobile terminals, mobile terminals and terminals

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105119991A (en) * 2015-08-20 2015-12-02 深圳市金立通信设备有限公司 Application sharing method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123199A (en) * 2014-07-03 2014-10-29 可牛网络技术(北京)有限公司 Method and device for recovering application program and mobile terminal
CN105279047A (en) * 2015-11-02 2016-01-27 广东欧珀移动通信有限公司 Data backup device and method and data recovery method and device
CN105607965A (en) * 2015-11-09 2016-05-25 深圳前海达闼科技有限公司 Application data backup and backup transmission method, apparatus and system
CN105468417A (en) * 2015-11-27 2016-04-06 小米科技有限责任公司 Application software installation method and device
CN105912421A (en) * 2016-04-06 2016-08-31 广东欧珀移动通信有限公司 Backup method and device for storing data in mobile terminals, mobile terminals and terminals

Also Published As

Publication number Publication date
CN106488392A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN106021023B (en) Application program recovery method and device and terminal
CN105763723B (en) Mobile terminal and method for upgrading system
CN104866336B (en) Silent in-vehicle software update
CN104765627A (en) Smart device, and wearable device and application program installing and uninstalling method thereof
CN104866389A (en) Data recovery method as well as data backup method, device and system based on mobile operating system
CN106055328B (en) For the subject replacement device and method of third-party application
CN106487811B (en) Method and device for communication among multiple containers
CN111357255B (en) Building a trusted application common to multiple applications
US20080027945A1 (en) Methods, systems and computer program products for downloading a Java application based on identification of supported classes
CN107918880B (en) Control method and device for advertisement putting
CN102981914A (en) Synchronized method and electronic device
CN112817634B (en) COTA package downloading method and device
CN104468947B (en) A kind of information processing method and electronic equipment
JP5812915B2 (en) Mobile terminal, data management method and data management program
CN106488392B (en) Data transfer method and device
CN108108173A (en) A kind of information processing method and device
CN103944805A (en) Information updating method and system based on Wechat platform
CN106155842A (en) A kind of data migration method and device
WO2013170801A1 (en) Device management method and apparatus
CN113741925A (en) Software upgrading method and device
CN106250455B (en) Mobile terminal file management method and system
CN104023073A (en) Resource pushing method, system and device
CN104079610A (en) Cloud server, and method and system for cloud synchronization of application software
CN104506616A (en) Method, device and system for sending information by browser client side
CN102469109A (en) Display method of browser homepage in mobile terminal and apparatus thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20170801

Address after: 100102, 18 floor, building 2, Wangjing street, Beijing, Chaoyang District, 1801

Applicant after: BEIJING ANYUN SHIJI SCIENCE AND TECHNOLOGY CO., LTD.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: Beijing Qihu Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant