CN106850862B - Method and device for migrating data from sending end to receiving end - Google Patents

Method and device for migrating data from sending end to receiving end Download PDF

Info

Publication number
CN106850862B
CN106850862B CN201710205373.6A CN201710205373A CN106850862B CN 106850862 B CN106850862 B CN 106850862B CN 201710205373 A CN201710205373 A CN 201710205373A CN 106850862 B CN106850862 B CN 106850862B
Authority
CN
China
Prior art keywords
network
receiving
sending
receiving end
sending end
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
CN201710205373.6A
Other languages
Chinese (zh)
Other versions
CN106850862A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201710205373.6A priority Critical patent/CN106850862B/en
Publication of CN106850862A publication Critical patent/CN106850862A/en
Application granted granted Critical
Publication of CN106850862B publication Critical patent/CN106850862B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for migrating data from a sending end to a receiving end, and belongs to the technical field of terminals. The method comprises the following steps: if the network identification of the network currently connected with the sending end is consistent with the network identification of the network currently connected with the receiving end, establishing a File Transfer Protocol (FTP) connection with the receiving end by utilizing a network protocol (IP) address and a port number used by the network currently connected with the receiving end; and sending the target data to be migrated to the receiving end through the FTP connection. In the embodiment of the invention, the sending end can directly establish FTP connection with the receiving end connected with the same network based on the IP address and the port number of the receiving end so as to migrate data without other terminals, thereby simplifying the data migration process and simultaneously reducing the risk of data leakage by other terminals in the migration process.

Description

Method and device for migrating data from sending end to receiving end
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a method and an apparatus for migrating data from a sending end to a receiving end.
Background
With the rapid development of terminal technology, the upgrading and upgrading speed of terminals is faster and faster, and accordingly, the frequency of terminal replacement for people is higher and higher, for example, people may eliminate old mobile phones and replace new mobile phones every two years or so. When a new mobile phone is replaced, some data stored in the old mobile phone can be migrated to the new mobile phone, so that the data, such as contact numbers, short messages, application software, multimedia files and the like, can be continuously used on the new mobile phone.
For convenience of description, a terminal such as an old mobile phone for transmitting data to be migrated is referred to as a transmitting end, and a terminal such as a new mobile phone for receiving data to be migrated is referred to as a receiving end. At present, a commonly adopted method for migrating data from a sending end to a receiving end is as follows: the sending end copies the data to be migrated to a terminal such as a computer through a data line, and then sends the data to be migrated to the receiving end through the data line so as to realize data migration.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the data migration process, the sending end needs to send the data to be migrated to other terminals, such as a computer, and then the other terminals send the data to be migrated to the receiving end, the data migration process is complicated, and the data needs to be migrated by means of other terminals, so that the risk of data leakage in the migration process is increased.
Disclosure of Invention
In order to solve the problem in the prior art, embodiments of the present invention provide a method and an apparatus for migrating data from a sending end to a receiving end. The technical scheme is as follows:
in a first aspect, a method for migrating data from a sending end to a receiving end is provided, where the method includes:
if the network identifier of the network currently connected with the sending end is consistent with the network identifier of the network currently connected with the receiving end, establishing FTP (File Transfer Protocol) connection with the receiving end by using the IP (Internet Protocol) address and the port number used by the network currently connected with the receiving end;
and sending the target data to be migrated to the receiving end through the FTP connection.
Optionally, the IP address and the port number of the network protocol used by the receiving end currently connected to the network, and the network identifier of the network to which the receiving end is currently connected are obtained by the following steps:
scanning a two-dimensional code displayed by the receiving terminal, wherein the two-dimensional code is generated based on an IP address and a port number used by a network currently connected with the receiving terminal and a network identifier of the network currently connected with the receiving terminal;
and identifying the scanned two-dimensional code to obtain the IP address and the port number used by the current connection network of the receiving terminal and the network identification of the current connection network of the receiving terminal.
Optionally, the method further comprises:
and dividing the size of the transmitted data by the total size of the target data to be used as a transmission progress, and displaying the transmission progress in the process of transmitting the target data.
In a second aspect, a method for migrating data from a sending end to a receiving end is provided, where the method includes:
when a data migration instruction is received, establishing FTP connection with the sending end based on an IP address and a port number used by a current connection network;
and receiving the data sent by the sending end through the FTP connection.
Optionally, the receiving, through the FTP connection, data sent by the sending end includes:
receiving a progress file sent by the sending end, wherein the progress file comprises the total size of target data to be migrated by the sending end;
and dividing the size of the received data by the total size of the target data to be used as a receiving progress, and displaying the receiving progress in the process of receiving the target data.
In a third aspect, an apparatus for migrating data from a sending end to a receiving end is provided, where the apparatus includes:
the connection establishing module is used for establishing FTP connection with the receiving end by using the IP address and the port number used by the receiving end for the current network connection if the network identification of the current network connected with the transmitting end is consistent with the network identification of the current network connected with the receiving end;
and the data sending module is used for sending the target data to be migrated to the receiving end through the FTP connection.
Optionally, the connection establishing module is configured to obtain a network protocol IP address and a port number used by a current network to which the receiving end is connected, and a network identifier of the current network to which the receiving end is connected, through the following steps:
scanning a two-dimensional code displayed by the receiving terminal, wherein the two-dimensional code is generated based on an IP address and a port number used by a network currently connected with the receiving terminal and a network identifier of the network currently connected with the receiving terminal;
and identifying the scanned two-dimensional code to obtain the IP address and the port number used by the current connection network of the receiving terminal and the network identification of the current connection network of the receiving terminal.
Optionally, the apparatus further comprises:
and the sending progress display module is used for dividing the size of the sent data by the total size of the target data to be used as sending progress, and displaying the sending progress in the process of sending the target data.
In a fourth aspect, an apparatus for migrating data from a sending end to a receiving end is provided, where the apparatus includes:
the connection establishing module is used for establishing FTP connection with the sending end based on the IP address and the port number used by the current connection network when receiving the data migration instruction;
and the data receiving module is used for receiving the data sent by the sending end through the FTP connection.
Optionally, the data receiving module includes:
a receiving unit, configured to receive a progress file sent by the sending end, where the progress file includes a total size of target data to be migrated by the sending end;
and the receiving progress display unit is used for dividing the size of the received data by the total size of the target data to be used as a receiving progress, and displaying the receiving progress in the process of receiving the target data.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: in the embodiment of the invention, if the network identifier of the network currently connected with the sending end is consistent with the network identifier of the network currently connected with the receiving end, the sending end and the receiving end are determined to be currently connected to the same network, at the moment, the FTP connection can be directly established with the receiving end, the target data to be migrated is sent to the receiving end through the established FTP connection, and the data does not need to be migrated by other terminals, so that the data migration process is simplified, and the risk of data leakage by other terminals in the migration process is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for migrating data from a sending end to a receiving end according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for migrating data from a sending end to a receiving end according to an embodiment of the present invention;
fig. 3A is a block diagram of an apparatus for migrating data from a sending end to a receiving end according to an embodiment of the present invention;
fig. 3B is a block diagram of another apparatus for migrating data from a sending end to a receiving end according to an embodiment of the present invention;
fig. 4A is a block diagram of an apparatus for migrating data from a sending end to a receiving end according to an embodiment of the present invention;
fig. 4B is a block diagram of a data receiving module according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
An embodiment of the present invention provides a method for migrating data from a sending end to a receiving end, and referring to fig. 1, the method includes:
step 101: and if the network identification of the network currently connected with the sending end is consistent with the network identification of the network currently connected with the receiving end, establishing FTP connection with the receiving end by using the IP address and the port number used by the network currently connected with the receiving end.
Specifically, the sending end may obtain a network identifier of a network to which the receiving end is currently connected, and an IP address and a port number used by the receiving end to which the network is currently connected, and then compare the network identifier of the network to which the receiving end is currently connected with the network identifier of the network to which the sending end is currently connected, and if the network identifier of the network to which the sending end is currently connected is consistent with the network identifier of the network to which the receiving end is currently connected, establish FTP connection with the receiving end using the IP address and the port number used by the network to which the receiving end is currently connected.
When data migration is performed, the receiving end may receive a data migration instruction, and at this time, the receiving end may generate a two-dimensional code from the network identifier of the currently connected network, and the IP address and the port number used by the currently connected network, and display the two-dimensional code. Then, the sending end can scan the two-dimensional code displayed by the receiving end, so as to obtain the network identifier of the current network connected by the receiving end, and the IP address and the port number used by the current network.
It should be noted that, acquiring the network identifier of the network currently connected to the receiving end in the two-dimensional code manner, and acquiring the IP address and the port number used by the currently connected network are only one implementation manner, and in practical application, the sending end may also acquire the network identifier of the network currently connected to the receiving end in the bluetooth manner, and the IP address and the port number used by the currently connected network in the bluetooth manner.
Step 102: and the sending end sends the target data to be migrated to the receiving end through the established FTP connection.
After the FTP connection is established between the sending end and the receiving end, the sending end can send the target data to be migrated to the receiving end. Then, the receiving end can receive the data sent by the sending end through the established FTP connection, so as to realize the purpose of migrating the data from the sending end to the receiving end.
In the embodiment of the invention, if the network identifier of the network currently connected with the sending end is consistent with the network identifier of the network currently connected with the receiving end, the sending end and the receiving end are determined to be currently connected to the same network, at the moment, the FTP connection can be directly established with the receiving end, the target data to be migrated is sent to the receiving end through the established FTP connection, and the data does not need to be migrated by other terminals, so that the data migration process is simplified, and the risk of data leakage by other terminals in the migration process is reduced.
An embodiment of the present invention provides a method for migrating data from a sending end to a receiving end, referring to fig. 2, where the method includes:
step 201: and when the receiving end receives the data migration instruction, generating and displaying the two-dimensional code based on the IP address and the port number used by the current connection network and the network identifier of the current connection network.
Specifically, when the receiving end receives the data migration instruction, it may be determined whether a network is currently connected. And if the network is connected currently, the receiving end generates and displays the two-dimensional code based on the IP address and the port number used by the currently connected network and the network identifier of the currently connected network.
Because data migration needs to be performed between the receiving end and the sending end through the network, when the receiving end receives a data migration instruction, whether the receiving end is currently connected with the network needs to be judged, and when the receiving end is currently connected with the network, it is determined that data migration can be performed between the receiving end and the sending end through the network. At this time, the receiving end generates and displays the two-dimensional code based on the IP address and the port number used by the currently connected network and the network identifier of the currently connected network.
It should be noted that the data migration instruction is used to instruct the sending end to migrate data to the receiving end, and the data migration instruction may be triggered in the receiving end by a user who currently uses the receiving end through a specified operation, where the specified operation may be a click operation on a data migration option of the receiving end, a sliding operation on a preset track, a voice operation, and the like.
In addition, the same key exchange application can be installed in both the receiving end and the sending end, the FTP connection can be established between the receiving end and the sending end through the FTP protocol by the key exchange application, and the data can be migrated through the FTP connection between the receiving end and the sending end, so that the switch is performed. For example, when a user needs to migrate data of an old mobile phone to a new mobile phone, that is, when the user needs to change the mobile phone, because both the old mobile phone and the new mobile phone can be installed with a one-touch switch application, and the application can provide a new and old mobile phone selection interface for the user, when the user opens the new and old mobile phone selection interface of the application in the new mobile phone, the new mobile phone can be selected, so that the new mobile phone is set as a receiving end, and when the user opens the new and old mobile phone selection interface of the application in the old mobile phone, the old mobile phone can be selected, so that the old mobile phone is set as a sending end. And then the new mobile phone as the receiving end and the old mobile phone as the sending end can execute the method for migrating data from the sending end to the receiving end by using a key switch.
The receiving end may combine the IP address and the port number allocated to the receiving end by the currently connected network and the network identifier of the currently connected network in a preset format to generate a group of character strings, and convert the character strings into a two-dimensional code in a Bitmap format through an SDK (Software Development Kit) interface and display the two-dimensional code. The network Identifier may be an SSID (Service Set Identifier) of a currently connected network.
For example, the IP address allocated by the currently connected network to the receiving end may be 192.168.225.46, the port number may be 8899, the network identifier of the currently connected network may be an SSID of the network, the SSID may be abcd, and the preset format may be "transmission protocol:// IP address: port number: network SSID", then the character string generated by the receiving end may be ftp://192.168.225.46:8899: abcd, and the receiving end may convert the character string into a two-dimensional code in a Bitmap format and display the two-dimensional code.
Further, before the receiving end generates the two-dimensional code, the receiving end may also generate and display a sending end networking prompt message, where the sending end networking prompt message is used to prompt a user to connect the sending end to a network to which the receiving end is currently connected.
When the sending end is connected to the network to which the receiving end is currently connected, namely the receiving end and the sending end are currently connected to the same network, and then when the sending end and the receiving end perform data migration, the sending end can directly send data to the receiving end without migrating the data by means of other terminals, so that the data migration process can be simplified, and meanwhile, the risk of data leakage in the migration process is reduced.
Further, if the receiving end is not currently connected to the network, the receiving end may generate and display a network connection prompting message, where the network connection prompting message is used to prompt the user to connect the receiving end to the network; after the network connection prompting message is displayed, until the connected network is detected, a step of generating and displaying a two-dimensional code based on the IP address and the port number used by the current connected network and the network identification of the current connected network is executed. The receiving end may display the Network connection prompting message by popping up a prompting box, and then the user may connect the receiving end to a hotspot or a WLAN (Wireless Local Area Network) to connect the receiving end to the Network, thereby continuing to execute the method of migrating data from the transmitting end to the receiving end.
Step 202: the sending end scans the two-dimensional code displayed by the receiving end and identifies the scanned two-dimensional code to obtain the IP address and the port number used by the current connection network of the receiving end and the network identification of the current connection network of the receiving end.
The sending end identifies the scanned two-dimensional code to obtain a character string corresponding to the two-dimensional code, so that the character string can be analyzed according to a preset format to obtain an IP address and a port number of the receiving end and a network identifier of a currently connected network.
In the embodiment of the present invention, the receiving end can not only ensure that the sending end can obtain the IP address and the port number used by the receiving end in the current connection network and the network identifier of the network to which the receiving end is currently connected in a two-dimensional code manner, but also determine that the sending end can obtain the IP address and the port number used by the receiving end in the current connection network and the network identifier of the network to which the receiving end is currently connected in practical application by other methods, for example, the receiving end can broadcast the IP address and the port number used by the current connection network and the network identifier of the network to which the receiving end is currently connected, and then the sending end can obtain the IP address and the port number used by the receiving end in the current connection network and the network identifier of the network to which the receiving end. For another example, the receiving end may display the IP address and the port number used by the currently connected network and the network identifier of the currently connected network of the receiving end, and after the user currently using the sending end sees the IP address, the port number, and the network identifier displayed by the receiving end, the user may manually input the IP address, the port number, and the network identifier displayed by the receiving end into the IP address input box, the port number input box, and the network identifier input box of the sending end, so that the sending end may obtain the IP address and the port number used by the currently connected network of the receiving end and the network identifier of the currently connected network of the receiving end.
Step 203: and if the network identification of the network currently connected with the sending end is consistent with the network identification of the network currently connected with the receiving end, establishing FTP connection with the receiving end by using the IP address and the port number used by the network currently connected with the receiving end.
Specifically, the sending end may determine that a network identifier of a network to which the sending end is currently connected is consistent with a network identifier of a network to which the receiving end is currently connected, and if the network identifiers are consistent, it is determined that the sending end and the receiving end are currently connected to the same network. Then, the sender can establish an FTP connection with the receiver using the IP address and port number currently used by the receiver to connect to the network.
The method comprises the steps that a sending end sends a connection request to a receiving end through a network connected at present, the connection request carries a user name and a password required by the connection of the receiving end, when the receiving end receives the connection request, the user name and the password carried in the connection request are compared with the stored user name and the stored password, and when the user name and the password are consistent with each other, the fact that the sending end can establish FTP connection with the receiving end through an FTP protocol based on an IP address and a port number used by the network connected at present at the receiving end is determined. That is, the FTP connection established between the sending end and the receiving end may be an FTP connection. The receiving end can authenticate the sending end through the steps, and then the sending end and the receiving end establish FTP connection, so that the process that the sending end logs in the receiving end is realized. The user name and the password carried in the connection request are the user name and the password which are preset in the one-key switch application installed at the sending end, and the user name and the password are used for connecting the receiving ends provided with the same one-key switch application so as to distinguish the receiving ends provided with other one-key switch applications.
Further, after the FTP connection is established between the sending end and the receiving end, the receiving end may monitor operations of the sending end in real time, such as operations of connecting or disconnecting the sending end to the receiving end, and operations of uploading files and the like by the sending end.
Further, when the network identifier of the network to which the sending end is currently connected is not consistent with the network identifier of the network to which the receiving end is currently connected, it is determined that the sending end and the receiving end are not currently connected to the same network, and at this time, the sending end may generate and display a network connection abnormality prompting message, where the network connection abnormality prompting message is used to prompt a user that the receiving end and the sending end are not currently connected to the same network, and prompt the user to connect the sending end to the network to which the receiving end is currently connected.
Step 204: and the sending end sends the target data to be migrated to the receiving end through the established FTP connection.
The sending end compresses and packs the target data according to a preset file format, and then sends the compressed and packed data to the receiving end through the FTP connection.
Further, before the sending end sends the target data to the receiving end through the FTP connection, the sending end may also generate a progress file based on the total size of the target data, and send the progress file to the receiving end. The progress file may be a txt format file, that is, a text file, and in practical application, the progress file may also be a file in another format.
Because the target data can be a plurality of types of data files, such as system-type data files of contacts, call records, short messages, multimedia messages, schedules, multimedia and the like, and application-type data files of application software, alarm clock data, wireless network passwords, bluetooth data, desktop icon layout and the like, before the sending end sends the progress files to the receiving end, the name, type and size of each data file can be added to the progress files and then sent to the receiving end.
In addition, the sending end may display the total sending progress of all the data files, and of course, since the progress file may further include the name, type, and size of each data file, for each data file of the plurality of data files, the sending end may further determine the size of the data sent by the data file, and divide the size of the data sent by the data file by the total size of the data file to obtain the sending progress of the data file.
Moreover, before the sending end sends the target data to the receiving end, the sending end can also back up the target data, so that after the target data is sent to the receiving end, the sending end can continue to use the target data, and therefore the calling of the sending end to the target data is not affected.
In the process that the sending end sends the target data to the receiving end, when the FTP connection between the sending end and the receiving end is interrupted, the sending end can also determine the current sending progress and the sent data, so that when the FTP connection between the sending end and the receiving end is recovered, the sending end can directly send the unsent data to the receiving end without sending all the target data, thereby saving the data migration time, and simultaneously avoiding the receiving end from receiving repeated data and occupying the memory of the receiving end.
Step 205: and the receiving end receives the data sent by the sending end through the established FTP connection.
Further, the receiving end may receive a progress file sent by the sending end, where the progress file includes a total size of the target data of the sending end. And in the process that the receiving end receives the data sent by the sending end through the FTP connection, determining the size of the received data, dividing the size of the received data by the total size of the target data to obtain a receiving progress, and displaying the receiving progress.
Further, the receiving end may display the total receiving progress of all the data files, and certainly, the progress file sent by the sending end may further include names, types, and sizes of the data files to be transmitted, so that, for each of the data files, the receiving end may determine the size of the data received by the data file, and divide the size of the data received by the data file by the total size of the data file to obtain the receiving progress of the data file.
Because the data sent by the sending end can include system data of the sending end or application data of an application installed on the sending end, after the receiving end receives the data sent by the sending end, when a data recovery instruction is detected, the received data can be decompressed in a preset file format, and then the data are restored to a system or respective corresponding applications, so that the receiving end can call the received data. That is, when the receiving end is a new handset and the transmitting end is an old handset, a key switch can be implemented through the above steps 201 to 205.
It should be noted that the data recovery instruction is used to restore the received data to the system or the respective corresponding application, and the data recovery instruction may be triggered by a user currently using the receiving end through a specified operation, where the specified operation may be a click operation on a data recovery option of the receiving end, a sliding operation on a preset track, a voice operation, and the like.
In the embodiment of the invention, when the receiving end receives a data migration instruction and is currently connected with a network, a two-dimensional code comprising an IP address and a port number of the receiving end and a network identifier of the currently connected network can be generated, and the sending end can acquire the IP address and the port number of the receiving end by scanning and identifying the two-dimensional code, so that when the sending end determines that the receiving end is currently connected with the same network based on the network identifier of the currently connected network of the receiving end, the sending end and the receiving end can establish FTP connection, and directly perform data migration through the established FTP connection without using other terminals to migrate data, thereby simplifying the process of data migration and simultaneously reducing the risk of data leakage by other terminals in the migration process.
Referring to fig. 3A, an embodiment of the present invention provides an apparatus 300 for migrating data from a sending end to a receiving end, where the apparatus includes: a connection establishing module 301 and a data sending module 302.
A connection establishing module 301, configured to establish an FTP connection with a receiving end by using an IP address and a port number used by the receiving end for currently connecting to a network if a network identifier of a network currently connected to the sending end is consistent with a network identifier of a network currently connected to the receiving end;
a data sending module 302, configured to send the target data to be migrated to the receiving end through the FTP connection.
Optionally, the connection establishing module 301 is configured to obtain the IP address and the port number used by the receiving end currently connected to the network, and the network identifier of the network to which the receiving end currently connected, by the following steps:
scanning a two-dimensional code displayed by a receiving end, wherein the two-dimensional code is generated based on an IP address and a port number used by a current connection network of the receiving end and a network identifier of the current connection network of the receiving end;
and identifying the scanned two-dimensional code to obtain the IP address and the port number used by the current connection network of the receiving terminal and the network identification of the current connection network of the receiving terminal.
Optionally, referring to fig. 3B, the apparatus further comprises:
a transmission progress display module 303, configured to divide the size of the transmitted data by the total size of the target data to obtain a transmission progress, and display the transmission progress in the process of transmitting the target data.
In the embodiment of the invention, if the network identifier of the network currently connected with the sending end is consistent with the network identifier of the network currently connected with the receiving end, the sending end and the receiving end are determined to be currently connected to the same network, at the moment, the FTP connection can be directly established with the receiving end, the target data to be migrated is sent to the receiving end through the established FTP connection, and the data does not need to be migrated by other terminals, so that the data migration process is simplified, and the risk of data leakage by other terminals in the migration process is reduced.
Referring to fig. 4A, an embodiment of the present invention provides an apparatus 400 for migrating data from a sending end to a receiving end, where the apparatus includes: a data establishing module 401 and a data receiving module 402.
A connection establishing module 401, configured to establish an FTP connection with a sending end based on an IP address and a port number used by a current connection network when receiving a data migration instruction sent by the sending end;
a data receiving module 402, configured to receive data sent by the sending end through the FTP connection.
Optionally, referring to fig. 4B, the data receiving module 402 includes:
a receiving unit 4021, configured to receive a progress file sent by a sending end, where the progress file includes a total size of target data to be migrated by the sending end;
a reception progress display unit 4022 for dividing the size of the received data by the total size of the target data as a reception progress and displaying the reception progress in the process of receiving the target data.
In summary, in the embodiment of the present invention, if the network identifier of the network to which the sending end is currently connected is consistent with the network identifier of the network to which the receiving end is currently connected, it is determined that the sending end and the receiving end are currently connected to the same network, at this time, an FTP connection may be directly established with the receiving end, and the target data to be migrated is sent to the receiving end through the established FTP connection without migrating the data by using other terminals, so that the process of data migration is simplified, and meanwhile, the risk of data leakage by other terminals in the migration process is reduced.
It should be noted that: in the apparatus for migrating data from a sending end to a receiving end provided in the foregoing embodiment, when migrating data, only the division of each functional module is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for migrating data from a sending end to a receiving end provided in the foregoing embodiment and the method embodiment for migrating data from a sending end to a receiving end belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method for migrating data from a sending end to a receiving end is applied to the sending end, and the method comprises the following steps:
scanning a two-dimensional code displayed by the receiving terminal, wherein the two-dimensional code is generated based on an IP address and a port number used by a network currently connected with the receiving terminal and a network identifier of the network currently connected with the receiving terminal; the receiving terminal is used for generating and displaying a sending terminal networking prompt message before the two-dimension code is generated, wherein the sending terminal networking prompt message is used for prompting a user to connect the sending terminal to a network to which the receiving terminal is currently connected;
identifying the scanned two-dimensional code to obtain an IP address and a port number used by a current connection network of the receiving terminal and a network identifier of the current connection network of the receiving terminal;
if the network identification of the network currently connected with the sending end is inconsistent with the network identification of the network currently connected with the receiving end, generating and displaying a network connection abnormity prompting message, wherein the network connection abnormity prompting message is used for prompting a user that the receiving end and the sending end are not currently connected to the same network and prompting the user to connect the sending end to the network currently connected with the receiving end;
if the network identification of the network currently connected with the sending end is consistent with the network identification of the network currently connected with the receiving end, sending a connection request carrying a user name and a password to the receiving end through the currently connected network, when the user name and the password carried in the connection request are respectively consistent with the user name and the password stored by the receiving end, the authentication process of the receiving end to the sending end is successful, and the sending end establishes a File Transfer Protocol (FTP) connection with the receiving end by utilizing a network protocol IP address and a port number used by the receiving end for currently connecting the network;
and sending the target data to be migrated to the receiving end through the FTP connection.
2. The method of claim 1, wherein the method further comprises:
and dividing the size of the transmitted data by the total size of the target data to be used as a transmission progress, and displaying the transmission progress in the process of transmitting the target data.
3. A method for migrating data from a sending end to a receiving end, which is applied to the receiving end, and comprises the following steps:
when a data migration instruction is received, generating and displaying a sending end networking prompt message, wherein the sending end networking prompt message is used for prompting a user to connect a sending end to a network to which a receiving end is currently connected; generating and displaying a two-dimensional code based on a network protocol IP address and a port number used by a current connection network and a network identifier of the current connection network, so that the sending end scans and identifies the two-dimensional code to obtain the IP address and the port number used by the current connection network of the receiving end and the network identifier of the current connection network of the receiving end;
if the network identification of the current network connected with the sending end is consistent with the network identification of the current network connected with the receiving end, receiving a connection request which is sent by the sending end and carries a user name and a password, when the user name and the password carried in the connection request are respectively consistent with the user name and the password stored by the receiving end, successfully authenticating the sending end, and establishing a File Transfer Protocol (FTP) connection with the sending end through a network protocol (IP) address and a port number used by the current network connected with the sending end; the sending end is further used for generating and displaying a network connection abnormity prompting message if the network identification of the network currently connected with the sending end is inconsistent with the network identification of the network currently connected with the receiving end, wherein the network connection abnormity prompting message is used for prompting a user that the receiving end and the sending end are not currently connected to the same network and prompting the user to connect the sending end to the network currently connected with the receiving end;
and receiving the data sent by the sending end through the FTP connection.
4. The method of claim 3, wherein the receiving the data sent by the sender over the FTP connection comprises:
receiving a progress file sent by the sending end, wherein the progress file comprises the total size of target data to be migrated by the sending end;
and dividing the size of the received data by the total size of the target data to be used as a receiving progress, and displaying the receiving progress in the process of receiving the target data.
5. An apparatus for migrating data from a sending end to a receiving end, applied to the sending end, the apparatus comprising:
the connection establishing module is used for scanning the two-dimensional code displayed by the receiving end, wherein the two-dimensional code is generated based on the IP address and the port number used by the current connection network of the receiving end and the network identifier of the current connection network of the receiving end; the receiving terminal is used for generating and displaying a sending terminal networking prompt message before the two-dimension code is generated, wherein the sending terminal networking prompt message is used for prompting a user to connect the sending terminal to a network to which the receiving terminal is currently connected; identifying the scanned two-dimensional code to obtain an IP address and a port number used by a current connection network of the receiving terminal and a network identifier of the current connection network of the receiving terminal; if the network identification of the network currently connected with the sending end is inconsistent with the network identification of the network currently connected with the receiving end, generating and displaying a network connection abnormity prompting message, wherein the network connection abnormity prompting message is used for prompting a user that the receiving end and the sending end are not currently connected to the same network and prompting the user to connect the sending end to the network currently connected with the receiving end; if the network identification of the network currently connected with the sending end is consistent with the network identification of the network currently connected with the receiving end, sending a connection request carrying a user name and a password to the receiving end through the currently connected network, when the user name and the password carried in the connection request are respectively consistent with the user name and the password stored by the receiving end, the authentication process of the receiving end to the sending end is successful, and the sending end establishes a File Transfer Protocol (FTP) connection with the receiving end by utilizing a network protocol IP address and a port number used by the receiving end for currently connecting the network;
and the data sending module is used for sending the target data to be migrated to the receiving end through the FTP connection.
6. The apparatus of claim 5, wherein the apparatus further comprises:
and the sending progress display module is used for dividing the size of the sent data by the total size of the target data to be used as sending progress, and displaying the sending progress in the process of sending the target data.
7. An apparatus for migrating data from a sending end to a receiving end, the apparatus being applied to the receiving end, the apparatus comprising:
the device comprises a connection establishing module, a data migration module and a data migration module, wherein the connection establishing module is used for generating and displaying a sending end networking prompt message when receiving a data migration instruction, and the sending end networking prompt message is used for prompting a user to connect a sending end to a network currently connected with a receiving end; generating and displaying a two-dimensional code based on a network protocol IP address and a port number used by a current connection network and a network identifier of the current connection network, so that the sending end scans and identifies the two-dimensional code to obtain the IP address and the port number used by the current connection network of the receiving end and the network identifier of the current connection network of the receiving end; if the network identification of the current network connected with the sending end is consistent with the network identification of the current network connected with the receiving end, receiving a connection request which is sent by the sending end and carries a user name and a password, when the user name and the password carried in the connection request are respectively consistent with the user name and the password stored by the receiving end, successfully authenticating the sending end, and establishing a File Transfer Protocol (FTP) connection with the sending end through a network protocol (IP) address and a port number used by the current network connected with the sending end; the sending end is further used for generating and displaying a network connection abnormity prompting message if the network identification of the network currently connected with the sending end is inconsistent with the network identification of the network currently connected with the receiving end, wherein the network connection abnormity prompting message is used for prompting a user that the receiving end and the sending end are not currently connected to the same network and prompting the user to connect the sending end to the network currently connected with the receiving end;
and the data receiving module is used for receiving the data sent by the sending end through the FTP connection.
8. The apparatus of claim 7, wherein the data receiving module comprises:
a receiving unit, configured to receive a progress file sent by the sending end, where the progress file includes a total size of target data to be migrated by the sending end;
and the receiving progress display unit is used for dividing the size of the received data by the total size of the target data to be used as a receiving progress, and displaying the receiving progress in the process of receiving the target data.
CN201710205373.6A 2017-03-31 2017-03-31 Method and device for migrating data from sending end to receiving end Active CN106850862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710205373.6A CN106850862B (en) 2017-03-31 2017-03-31 Method and device for migrating data from sending end to receiving end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710205373.6A CN106850862B (en) 2017-03-31 2017-03-31 Method and device for migrating data from sending end to receiving end

Publications (2)

Publication Number Publication Date
CN106850862A CN106850862A (en) 2017-06-13
CN106850862B true CN106850862B (en) 2021-05-25

Family

ID=59141886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710205373.6A Active CN106850862B (en) 2017-03-31 2017-03-31 Method and device for migrating data from sending end to receiving end

Country Status (1)

Country Link
CN (1) CN106850862B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115665470A (en) * 2022-10-21 2023-01-31 四川长虹电器股份有限公司 Method for rapidly changing machine through data migration of smart television

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789463A (en) * 2011-05-16 2012-11-21 洛阳磊石软件科技有限公司 Data sharing method between electronic devices and electronic devices
CN103648180A (en) * 2013-12-04 2014-03-19 北京奇虎科技有限公司 Method and device for sharing files between terminal devices

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2659390A1 (en) * 2006-07-31 2008-02-07 Asubio Pharma Co., Ltd. Liquid preparation
CN102148845B (en) * 2010-02-08 2015-06-10 中兴通讯股份有限公司 File transfer protocol (FTP) data transmission method and system
CN106454975A (en) * 2016-09-14 2017-02-22 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789463A (en) * 2011-05-16 2012-11-21 洛阳磊石软件科技有限公司 Data sharing method between electronic devices and electronic devices
CN103648180A (en) * 2013-12-04 2014-03-19 北京奇虎科技有限公司 Method and device for sharing files between terminal devices

Also Published As

Publication number Publication date
CN106850862A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
JP5897137B2 (en) Wireless local area network authentication method and mobile terminal
KR100414926B1 (en) System and method for provisioning or updating a mobile station using over-the-air transfer of interpreted byte-code program
CN108810123B (en) Method and apparatus for provisioning mobile cellular network services
KR100585781B1 (en) File transfer method for mobile instant messaging service
CN108282846B (en) Service request processing method and device
US8503998B2 (en) Wireless communication terminal and wireless communication method
CN104580343A (en) Data transmission method, device and system as well as terminal
KR20100033843A (en) Mobile terminal and method for switching data call by connection of terminal thereof
KR20110051351A (en) Method for controlling remote of portable terminal and system for the same
CN112346751B (en) Application program installation method and device, electronic equipment and storage medium
CN104333643A (en) Method and system for adding contacts, and terminal
CN105827740A (en) Method, equipment and system for contact person information backup
WO2016123822A1 (en) Data transmission method and device, and terminal
CN106850862B (en) Method and device for migrating data from sending end to receiving end
WO2002017656A2 (en) Methods, mobile user terminal and system for controlling access to mobile user terminal location information
KR101416339B1 (en) Method and apparatus for providing service using user identification in portable communication system
CN111371896A (en) Network acceleration method, terminal and storage medium
CN105827715A (en) Information sharing method and apparatus
CN113438083B (en) Signature adding and checking method and device based on interface automatic test
KR20100037263A (en) Method for remotely controlling user data and system therefor
CN105704291A (en) Operation prompting method and device
CN113507750A (en) Terminal control method and device, terminal and storage medium
JP3226855B2 (en) E-mail sending and receiving device system
WO2018072463A1 (en) Information sharing method, apparatus, and storage medium
CN115209510B (en) Wireless network connection method and device, electronic equipment and storage medium

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.