CN110968574A - Data migration method and terminal - Google Patents

Data migration method and terminal Download PDF

Info

Publication number
CN110968574A
CN110968574A CN201811158803.4A CN201811158803A CN110968574A CN 110968574 A CN110968574 A CN 110968574A CN 201811158803 A CN201811158803 A CN 201811158803A CN 110968574 A CN110968574 A CN 110968574A
Authority
CN
China
Prior art keywords
database
terminal
data
backup
backup database
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.)
Granted
Application number
CN201811158803.4A
Other languages
Chinese (zh)
Other versions
CN110968574B (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 CN201811158803.4A priority Critical patent/CN110968574B/en
Publication of CN110968574A publication Critical patent/CN110968574A/en
Application granted granted Critical
Publication of CN110968574B publication Critical patent/CN110968574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data migration method and a terminal, and the method comprises the following steps: receiving a backup database, and if the database of the first terminal is not empty, comparing the number of data in the database of the first terminal with the number of data in the backup database; if the number of the data in the database of the first terminal is less than that of the data in the backup database, inserting the data in the database of the first terminal into the backup database; covering the backup database with the database of the first terminal; and the database of the first terminal and the database of the second terminal have the same data type. By adopting the mode, compared with the mode that the data in the backup database is inserted into the database of the first terminal, the data insertion times are reduced, and further the data insertion time is reduced.

Description

Data migration method and terminal
Technical Field
The present application relates to the field of data migration technologies, and in particular, to a data migration method and a terminal.
Background
With the development of mobile phone technology, the performance of mobile phones affects the user experience. In order to meet the requirements of mobile phone use, a user can replace the mobile phone with the update of the mobile phone. The replaced mobile phone is not limited to a brand new mobile phone, mobile phone data such as short messages, contacts and call records which need to be reserved by a user may be stored in the replaced mobile phone, and mobile phone data on an old mobile phone need to be reserved by the user. Therefore, after the new mobile phone is replaced, in order to not affect the use of the user, the mobile phone data stored on the old mobile phone needs to be imported into the new mobile phone and merged with the original mobile phone data of the old mobile phone.
In the conventional technology, after a user replaces a mobile phone, a user usually uses a key-press software to transfer mobile phone data of the old mobile phone to a new mobile phone. The mobile phone data is stored in the mobile phone in a database mode, when the mobile phone is changed, the database corresponding to the mobile phone data on the old mobile phone is backed up firstly, then the backup database is transmitted to the new mobile phone, and then the mobile phone data in the backup database is inserted into the database of the new mobile phone. When the mobile phone data in the backup database is inserted into the new mobile phone database, the mobile phone data in the backup database is generally added to the database of the new mobile phone one by one. For example, 10000 pieces of short message data in the backup database need to be inserted into a new mobile phone database 10000 times, and it is very time-consuming to insert one piece of short message data into the database.
In order to solve the above problems, the prior art provides a scheme that a backup database is divided into a plurality of asynchronous queues, and the asynchronous queues are used for simultaneously inserting mobile phone data into the database. As shown in fig. 1, also taking 10000 pieces of short message data as an example, if 10 pieces of short message data can be stored in one asynchronous queue, 3 asynchronous queues are set, and the short message data is inserted into the 3 asynchronous queues at the same time, but the short message data is still the short message data in one operation backup database. And in order to ensure the normal insertion of the short message data, the crash can not occur, and the number of the asynchronous queues is limited. Although the speed of transferring the short message data by adopting the asynchronous queue is higher than that of inserting the short message data one by one in the prior art, when a large amount of short message data is stored, a long time still needs to be consumed.
Disclosure of Invention
The application provides a data migration method and a terminal, and aims to solve the problem that in the prior art, mobile phone data migration consumes long time.
In a first aspect, the present application provides a data migration method, applied to a first terminal, including: receiving a backup database, wherein the backup database is generated by backing up a database of a second terminal; if the database of the first terminal is not empty, comparing the number of data in the database of the first terminal with the number of data in the backup database; if the number of the data in the database of the first terminal is less than that of the data in the backup database, inserting the data in the database of the first terminal into the backup database; covering the backup database with the database of the first terminal; and the database of the first terminal and the database of the second terminal have the same data type.
When the database of the first terminal is not empty and the number of the data in the database of the first terminal is less than the number of the data in the backup database, by adopting the embodiment, compared with the case that the data in the backup database is inserted into the database of the first terminal, the number of data insertion times is reduced, and further the time for inserting the data is reduced.
In a second aspect, the present application provides a data migration method, applied to a first terminal, including: receiving a backup database, wherein the backup database is generated by backing up a database of a second terminal; if the database of the first terminal is empty, covering the database of the first terminal with the backup database; the database of the first terminal and the database of the second terminal are the same in data type.
By adopting the embodiment, when the database of the first terminal is empty, no data exists in the database of the first terminal, and at the moment, the received backup database directly covers the database of the first terminal, so that complex data insertion operation is skipped, the data migration speed is increased, and the data migration time is shortened.
In a third aspect, the present application provides a data migration apparatus, applied to a first terminal, including: the receiving module is used for receiving a backup database, and the backup database is generated by backing up the database of the second terminal; the comparison module is used for comparing the number of data in the database of the first terminal with the number of data in the backup database if the database of the first terminal is not empty; the data inserting module is used for inserting the data in the database of the first terminal into the backup database if the number of the data in the database of the first terminal is less than that of the data in the backup database; and the data migration module is used for covering the backup database with the database of the first terminal.
In a fourth aspect, the present application provides a data migration apparatus, applied to a first terminal, including: the receiving module is used for receiving a backup database, and the backup database is generated by backing up the database of the second terminal; and the data migration module is used for covering the database of the first terminal with the backup database if the database of the first terminal is empty.
In a fifth aspect, the present application provides a terminal, comprising: a processor; a memory for storing computer executable instructions; the memory is communicatively connected to the processor and when the processor executes the computer-executable instructions described above, performs the method of the first or second aspect.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 illustrates a conventional asynchronous queue data recovery method;
fig. 2 is a schematic flowchart of a data migration method according to an embodiment of the present application;
fig. 3 is a schematic diagram of generating an identification identifier by a first terminal according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a data migration apparatus according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another data migration method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another data migration apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions in the embodiments of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application are further described in detail below with reference to the accompanying drawings.
Example one
Fig. 2 is a schematic flow diagram of a data migration method according to an embodiment of the present application, and referring to fig. 2, the data migration method according to the embodiment of the present application includes:
s101, receiving the backup database.
In this embodiment, the first terminal is a terminal device that receives migration data, and the second terminal is a terminal device that migrates data. The backup database is generated by backing up the database of the second terminal. The data types in the databases of the first terminal and the second terminal may include short messages, contacts, call records, and the like. The backup database generated from the database backup of the second terminal may also comprise a plurality of databases, wherein the type of data in each backup database is unique. For example, 10 contacts, 30 messages and 40 call records, 10 pieces of contact data are stored in a backup database, the data type stored in the backup database is a contact, and correspondingly, 30 pieces of message data and 40 pieces of call record data are also stored in the corresponding backup databases respectively.
When data in the database of the second terminal needs to be migrated into the database of the first terminal, the data migration cannot be directly realized because the first terminal and the second terminal are two independent devices. In this embodiment, the first terminal may establish a connection with the second terminal through one identification identifier, so as to implement data transmission, and further enable the first terminal to receive the backup database stored on the second terminal.
Specifically, the identification mark in this embodiment may be a two-dimensional code. As shown in fig. 3, the first terminal obtains an IP address after establishing a WLAN hotspot by itself, sets a Port and a Service Set Identifier (SSID) of the WLAN according to the allocated IP address, and obtains a WLAN access point by using a character string "IP: port: and in the SSID mode, generating a corresponding two-dimensional code picture, and waiting for the second terminal to scan. The second terminal scans the two-dimensional code of the first terminal, then is automatically connected to the WLAN hotspot of the first terminal, establishes data connection with the first terminal, transmits the backup database to the directory appointed by the first terminal after establishing data connection, and the first terminal obtains the transmitted backup database from the appointed directory. Of course, in this embodiment, the second terminal may also generate a two-dimensional code, and the first terminal scans the two-dimensional code of the second terminal to establish a data connection between the first terminal and the second terminal, which is not described in detail again.
S102, if the database of the first terminal is not empty, comparing the number of the data in the database of the first terminal with the number of the data in the backup database.
In this embodiment, if the first terminal is a used terminal, the database of the first terminal may not be empty, and there is data.
In general, when the current user uses the first terminal used by another user, the data in the first terminal is irrelevant to the current user and can be deleted. However, there may also be cases where the data in the first terminal database needs to be retained. For example, there are user a, user B, and user C. The user A gives the used first terminal to the user B, and the first terminal of the user A stores data such as the contact way, the call record and the short message content of the user C. For the user B, the contact information, the call record, the short message content, and the like of the user C stored in the first terminal need to be retained, and at this time, the data in the database of the first terminal needs to be retained.
When the database of the first terminal is determined to be not empty and the data in the database of the first terminal needs to be reserved, the number of data in the database of the first terminal and the number of data in the backup database need to be respectively obtained, and then comparison is carried out to determine the database with a large number of data. S103, if the number of the data in the database of the first terminal is less than that of the data in the backup database, inserting the data in the database of the first terminal into the backup database.
According to the method in the conventional technology, data in the backup database is inserted into the database of the first terminal one by one, and if the number of data in the database of the first terminal is more than that of the backup database, the number of data in the database of the first terminal is more at the moment, the data can be inserted into the database of the first terminal according to an asynchronous queue, and the data in the backup database is inserted into the database of the first terminal.
However, if the number of data in the database of the first terminal is less than the number of data in the backup database, the data in the backup database is more. It takes a lot of time if the data in the backup database is inserted into the database of the first terminal one by one. In view of the above situation, in the embodiment of the present application, data in the database of the first terminal is inserted into the backup database, a field position corresponding to the data inserted into the database of the first terminal in the backup database is first determined, and the data in the database of the first terminal is inserted into the backup database according to the field position.
In an exemplary embodiment, if the number of data in the database of the first terminal is 100, and the number of data in the backup database is 10000, if the conventional data migration method is adopted, 10000 of data in the backup database need to be inserted into the database of the first terminal in terms of pieces, and the number of insertion times is 10000. However, by using the data migration method of the embodiment, 100 pieces of data in the database of the first terminal are inserted into the backup database, and the number of the data in the database of the first terminal is 100, so that only 100 times of insertion is needed, and compared with 10000 times of data insertion in the conventional method, 9900 times of data insertion operation is saved, and further, the data migration time is shortened.
As can be seen from S101, the data type stored in the backup database in this embodiment may be a short message, a contact, or a call record. According to different types of data stored in the backup database, the method for determining the field position corresponding to the data in the database of the first terminal inserted in the backup database in the embodiment is also different.
If the data type of the memory number in the backup database is the short message, respectively acquiring the receiving time corresponding to the short message data in the backup database and the short message data in the database of the first terminal, and determining the field position corresponding to the short message data inserted into the database of the first terminal in the backup database according to the sequence of the receiving time.
For example, there are 10 pieces of short message data in the backup database, the corresponding receiving times are t1 and t2 … t10, respectively, and t1 to t10 are arranged in chronological order. And two pieces of short message data exist in the database of the first terminal, the corresponding receiving time is T1 and T2, and T1 is between T1 and T2 according to the receiving time sequence, T2 is after T10, and finally the short message data insertion field position with the receiving time of T1 in the database of the first terminal is determined to be the position between the two pieces of short message data corresponding to the receiving time of T1 and T2 in the backup database, and the short message data insertion field position with the receiving time of T2 in the database of the first terminal is the position after the short message data corresponding to the receiving time of T10 in the backup database.
And if the data type of the number stored in the backup database is a contact, respectively acquiring the contact data in the backup database and the first surname of the contact in the contact data in the database of the first terminal, and determining the field position corresponding to the contact data inserted into the database of the first terminal in the backup database according to the arrangement sequence of the first surname.
For example, there are 5 contact data in the backup database, and the corresponding initials of the last names are a, b, d, h, and w, respectively. And if two pieces of contact data exist in the database of the first terminal, and the corresponding surname initials are c and f, the position of the contact data insertion field with the surname initials of c in the database of the first terminal is finally determined to be the position between the two pieces of contact data corresponding to the surname initials b and c in the backup database, and the position of the contact data insertion field with the surname initials of f in the database of the first terminal is the position between the two pieces of contact data corresponding to the surname initials d and h in the backup database.
If the data type of the number stored in the backup database is the call record, respectively acquiring the start time of the call record data in the backup database and the call record data in the database of the first terminal, and determining the field position corresponding to the call record data inserted into the database of the first terminal in the backup database according to the arrangement sequence of the start time.
For example, there are 10 pieces of call record data in the backup database, the corresponding start times are t1 and t2 … t10, respectively, and t1 to t10 are arranged in the chronological order of the start times. And two pieces of call record data exist in the database of the first terminal, the corresponding starting times are respectively T1 and T2, and the T1 is between T1 and T2, and the T2 is between T9 and T10 according to the starting time sequence. The location of the call record data insertion field with the start time of T1 in the database of the first terminal is finally determined as the location between two pieces of call record data corresponding to the start times of T1 and T2 in the backup database, and the location of the call record data insertion field with the start time of T2 in the database of the first terminal is determined as the location between two pieces of call record data corresponding to the start times of T9 and T10 in the backup database.
It should be noted that the above method for determining the field insertion position of the data in the database of the first terminal in the backup database is only illustrative, and the present application is not specifically limited, and other manners may also be adopted, which is not described again here.
And S104, covering the database of the first terminal with the backup database.
After the data in the database of the first terminal is inserted into the backup database, the data in the database of the first terminal and the data in the database of the second terminal simultaneously exist in the backup database. After the backup database is controlled to cover the database of the first terminal, although the data in the database of the first terminal is covered, the original data in the database of the first terminal exists in the backup database at the moment, so that the data in the database of the first terminal cannot be lost.
As can be seen from the foregoing embodiments, the present application provides a data migration method, when the database of the first terminal is not empty, and the number of data in the database of the first terminal is less than the number of data in the backup database, compared with the case where data in the backup database is inserted into the database of the first terminal, the number of data insertion times is reduced, and further, the time for inserting data is reduced.
Corresponding to the data migration method provided by the above embodiment, the embodiment of the present application further provides a data migration apparatus. Referring to fig. 4, the data migration apparatus 20 includes: a receiving module 201, a comparing module 202, a data inserting module 203 and a data migrating module 204.
The receiving module 201 is configured to receive a backup database, where the backup database is a database generated by backing up a database of a second terminal. A comparing module 202, configured to compare the number of data in the database of the first terminal and the number of data in the backup database if the database of the first terminal is not empty. The data inserting module 203 is configured to insert the data in the database of the first terminal into the backup database if the number of data in the database of the first terminal is less than the number of data in the backup database. And the data migration module 204 is configured to overwrite the database of the first terminal with the backup database.
Further, the receiving module 201 includes a connection establishing unit and a receiving unit. And the connection establishing unit is used for establishing the connection between the first terminal and the second terminal through the identification mark, wherein the identification mark is generated for the first terminal or the second terminal. And the receiving unit is used for receiving the backup database stored on the second terminal.
The data insertion module 203 includes a determination unit and a data insertion unit. And the determining unit is used for determining the field position corresponding to the data inserted into the database of the first terminal in the backup database.
The database of the first terminal and the database of the second terminal are the same in stored data type, and the data type comprises: short messages, contacts and call records.
If the data type is short message, the determining unit comprises: a first acquisition subunit and a first determination subunit.
And the first acquisition subunit is used for respectively acquiring the short message data in the backup database and the receiving time corresponding to the short message data in the database of the first terminal. And the first determining subunit is used for determining the field position corresponding to the short message data inserted into the database of the first terminal in the backup database according to the sequence of the receiving time.
If the data type is a contact, the determining unit includes: a second acquisition subunit and a second determination subunit.
And the second acquiring subunit is used for respectively acquiring the contact data in the backup database and the first name of the contact in the contact data in the database of the first terminal. And the second determining subunit is used for determining the field position corresponding to the contact data inserted into the database of the first terminal in the backup database according to the arrangement sequence of the first names.
If the data type is a call record, the determining unit includes: a third acquisition subunit and a third determination subunit.
And the third acquiring subunit is used for respectively acquiring the call record data in the backup database and the start time in the call record data in the database of the first terminal. And the third determining subunit is used for determining the field position corresponding to the call record data inserted into the database of the first terminal in the backup database according to the arrangement sequence of the starting time.
And the data inserting unit is used for inserting the data in the database of the first terminal into the backup database according to the field position.
As can be seen from the foregoing embodiments, the present embodiment provides a data migration apparatus including: a receiving module 201, a comparing module 202, a data inserting module 203 and a data migrating module 204. When the database of the first terminal is not empty and the comparison module 202 determines that the number of data in the database of the first terminal is less than the number of data in the backup database received by the receiving module 201, the data insertion module 203 inserts the data in the database of the first terminal into the backup database, and compared with the case that the data in the backup database is inserted into the database of the first terminal, the number of data insertion times is reduced, and further the time for inserting the data is reduced.
Example two
In a first embodiment, a first terminal is a terminal used by a user, and this embodiment provides another data migration method for a case where the first terminal is a brand-new terminal and a database of the first terminal is empty, with reference to fig. 5, where the method includes:
s301, receiving the backup database.
As in the foregoing embodiment, the method for receiving the backup database in this embodiment may still use the first terminal or the second terminal to obtain the IP address after establishing the WLAN hotspot, and according to the allocated IP address, the Set Port and the Service Set Identifier (SSID) of the WLAN, through a string "IP: port: and in the SSID mode, generating a corresponding two-dimensional code picture, and establishing connection between the first terminal and the second terminal through the two-dimensional code picture. And when the connection between the first terminal and the second terminal is successfully established, the second terminal transmits the backup database to the directory specified by the first terminal, and the first terminal can go to the specified directory to obtain the transmitted backup database.
S302, if the first terminal database is empty, the backup database is overwritten on the first terminal database.
When the database of the first terminal is empty, no data exists in the first terminal, and at the moment, the database of the first terminal is directly covered by the data in the backup database. The database is directly covered, data in the backup database does not need to be inserted into the database of the first terminal one by one, and the time for data migration is saved.
Similarly, in this embodiment, the database of the first terminal and the database of the second terminal have the same data type, where the data type includes: short messages, contacts and call records. Of course, the data migration method provided by the embodiment of the present application can be used to implement data migration as long as the data in the terminal is stored in the form of a database.
Corresponding to the other data migration method provided by the above embodiment, the embodiment of the present application further provides another data migration apparatus. Referring to fig. 6, the data migration apparatus 40 includes: a receiving module 401 and a data migration module 402.
A receiving module 401, configured to receive a backup database, where the backup database is a database generated by backing up a database of a second terminal; a data migration module 402, configured to overwrite the database of the first terminal with the backup database if the database of the first terminal is empty.
Further, the receiving module 401 includes a connection establishing unit and a receiving unit. And the connection establishing unit is used for establishing the connection between the first terminal and the second terminal through the identification mark, wherein the identification mark is generated for the first terminal or the second terminal. And the receiving unit is used for receiving the backup database stored on the second terminal.
In this embodiment, since the database of the first terminal is empty, and there is no data in the database of the first terminal, at this time, the data migration module 402 directly overlays the backup database received by the receiving module 401 on the database of the first terminal, and skips a complex data insertion operation, thereby increasing the data migration speed and shortening the data migration time.
EXAMPLE III
An embodiment of the present application further provides a terminal, referring to fig. 7, where the terminal 50 includes: a processor 501, a memory 502, and a communication interface 503. The processor 501, the memory 502, and the communication interface 503 may be connected to each other by a bus; the bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
The processor 501 generally controls the overall functions of the terminal, such as the startup of the terminal and the processing of terminal data after the terminal is started. Further, the processor 501 may be a general-purpose processor, such as a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. The processor may also be a Microprocessor (MCU). The processor may also include a hardware chip. The hardware chips may be Application Specific Integrated Circuits (ASICs), Programmable Logic Devices (PLDs), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a Field Programmable Gate Array (FPGA), or the like.
The memory 501 is configured to store computer-executable instructions to support the operation of terminal data. The memory 501 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
After the terminal is started, the processor 501 and the memory 502 are powered on, and the processor 501 reads and executes the computer-executable instructions stored in the memory 502 to complete all or part of the steps in the above-described data migration method embodiment.
The communication interface 503 is used for terminal transmission of data, and the communication interface 503 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface comprises a USB interface, a Micro USB interface and an Ethernet interface. The wireless communication interface may be a WLAN interface, a cellular network communication interface, a combination thereof, or the like.
In an exemplary embodiment, the terminal provided by the embodiment of the present application further includes a power supply component, and the power supply component provides power for various components of the terminal. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal.
A communication component configured to facilitate wired or wireless communication between the terminal and other devices. The terminal may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. The communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. The communication component also includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, processors, or other electronic components.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The same and similar parts among the various embodiments in the specification of the present application may be referred to each other. Especially, for the device and terminal embodiments, since the method therein is basically similar to the embodiment of the data recovery method, the description is relatively simple, and the relevant points can be referred to the description in the data recovery method embodiment.
The above-described embodiments of the present application do not limit the scope of the present application.

Claims (10)

1. A data migration method is applied to a first terminal, and is characterized by comprising the following steps:
receiving a backup database, wherein the backup database is generated by backing up a database of a second terminal;
if the database of the first terminal is not empty, comparing the number of the data in the database of the first terminal with the number of the data in the backup database;
if the number of the data in the database of the first terminal is less than that of the data in the backup database, inserting the data in the database of the first terminal into the backup database;
overlaying the backup database on the database of the first terminal;
the database of the first terminal and the database of the second terminal are the same in data type.
2. The method of claim 1, wherein receiving the backup database comprises:
establishing connection with the second terminal through an identification mark, wherein the identification mark is generated for the first terminal or the second terminal;
receiving the backup database stored on the second terminal.
3. The method according to claim 1 or 2, wherein the inserting the data in the database of the first terminal into the backup database comprises:
determining a field position corresponding to data inserted into a database of the first terminal in the backup database;
and inserting the data in the database of the first terminal into the backup database according to the field position.
4. The method of claim 3, wherein if the data type is short message, determining a field position corresponding to data inserted into the database of the first terminal in the backup database comprises:
respectively acquiring the short message data in the backup database and the receiving time corresponding to the short message data in the database of the first terminal;
and determining the field position corresponding to the short message data inserted into the database of the first terminal in a backup database according to the arrangement sequence of the receiving time.
5. The method of claim 3, wherein if the data type is a contact, the determining, in the backup database, a field position corresponding to data inserted into the database of the first terminal comprises:
respectively acquiring the contact person data in the backup database and the first name of the contact person in the contact person data in the database of the first terminal;
and determining the field position corresponding to the contact data inserted into the database of the first terminal in the backup database according to the arrangement sequence of the last names.
6. The method of claim 3, wherein if the data type is a call record, the determining, in the backup database, a field position corresponding to data inserted into the database of the first terminal comprises:
respectively acquiring the call record data in the backup database and the start time in the call record data in the database of the first terminal;
and determining the field position corresponding to the call record data inserted into the database of the first terminal in a backup database according to the arrangement sequence of the starting time.
7. A data migration method is applied to a first terminal, and is characterized by comprising the following steps:
receiving a backup database, wherein the backup database is generated by backing up a database of a second terminal;
if the database of the first terminal is empty, covering the database of the first terminal with the backup database;
the database of the first terminal and the database of the second terminal are the same in data type.
8. The method of claim 7, wherein receiving the backup database comprises:
establishing connection with the second terminal through an identification mark, wherein the identification mark is generated for the first terminal or the second terminal;
receiving the backup database stored on the second terminal.
9. The method of claim 7 or 8, wherein the data type is a short message, a contact, or a call record.
10. A terminal, comprising:
a processor;
a memory for storing computer executable instructions;
the memory is communicatively coupled to the processor and when the processor executes the computer-executable instructions, performs the method of any of claims 1-9.
CN201811158803.4A 2018-09-30 2018-09-30 Data migration method and terminal Active CN110968574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811158803.4A CN110968574B (en) 2018-09-30 2018-09-30 Data migration method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811158803.4A CN110968574B (en) 2018-09-30 2018-09-30 Data migration method and terminal

Publications (2)

Publication Number Publication Date
CN110968574A true CN110968574A (en) 2020-04-07
CN110968574B CN110968574B (en) 2023-09-22

Family

ID=70028965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811158803.4A Active CN110968574B (en) 2018-09-30 2018-09-30 Data migration method and terminal

Country Status (1)

Country Link
CN (1) CN110968574B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641533A (en) * 2020-04-27 2021-11-12 青岛海信移动通信技术股份有限公司 Terminal and short message processing method
WO2024104137A1 (en) * 2022-11-17 2024-05-23 华为技术有限公司 Data recovery method capable of supporting data fusion and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594413A (en) * 2012-02-27 2012-07-18 信源通科技(深圳)有限公司 short message backup method and device
CN102685659A (en) * 2011-03-11 2012-09-19 上海晨兴希姆通电子科技有限公司 Mobile terminal and method for associating areas with telephone directory
CN104750572A (en) * 2013-12-31 2015-07-01 ***通信集团设计院有限公司 Data back-up method, data back-up device and mobile terminal
CN106502824A (en) * 2016-10-12 2017-03-15 广东欧珀移动通信有限公司 Data back up method and Cloud Server
US20170344433A1 (en) * 2016-05-27 2017-11-30 Samsung Sds Co., Ltd. Apparatus and method for data migration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685659A (en) * 2011-03-11 2012-09-19 上海晨兴希姆通电子科技有限公司 Mobile terminal and method for associating areas with telephone directory
CN102594413A (en) * 2012-02-27 2012-07-18 信源通科技(深圳)有限公司 short message backup method and device
CN104750572A (en) * 2013-12-31 2015-07-01 ***通信集团设计院有限公司 Data back-up method, data back-up device and mobile terminal
US20170344433A1 (en) * 2016-05-27 2017-11-30 Samsung Sds Co., Ltd. Apparatus and method for data migration
CN106502824A (en) * 2016-10-12 2017-03-15 广东欧珀移动通信有限公司 Data back up method and Cloud Server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641533A (en) * 2020-04-27 2021-11-12 青岛海信移动通信技术股份有限公司 Terminal and short message processing method
CN113641533B (en) * 2020-04-27 2024-03-12 青岛海信移动通信技术有限公司 Terminal and short message processing method
WO2024104137A1 (en) * 2022-11-17 2024-05-23 华为技术有限公司 Data recovery method capable of supporting data fusion and apparatus

Also Published As

Publication number Publication date
CN110968574B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN102098812B (en) Data synchronization method and mobile terminal
US9398063B2 (en) Customizing distribution of an operating system based on detected network carrier by retrieving differences between the distributed operating system and an operating system currently installed on a computing device
CN106354840B (en) File processing method and device and distributed file system
CN103179531A (en) Method and device for updating contact numbers
CN110968574B (en) Data migration method and terminal
US11832349B2 (en) Nomination of a primary cell phone from a pool of cell phones
CN104158895B (en) The management method and remote server of a kind of mobile terminal and its contact head image
CN104253872A (en) Synchronous information updating method, system and terminal
CN107295500B (en) SIM card data control method and device and computer equipment
CN110856161A (en) SIM card setting method, terminal and computer storage medium
CN112312565B (en) Communication processing method, device, apparatus and storage medium
WO2017036051A1 (en) Method and system for querying for call transfer state
CN101112065A (en) Automatic internet connection device
CN111567073A (en) Terminal configuration method and device
CN111953722B (en) Synchronization method and device for terminal address book
WO2016169105A1 (en) Application menu processing method and device
KR20160144910A (en) Method for executing application
CN102378119B (en) Method and device for massively transmitting information
CN108574588B (en) Client, server and differentiated upgrading method
CN101106758B (en) Service subscription method and mobile terminal
CN112702728B (en) User profile management method and device, smart card and readable storage medium
CN108762985A (en) Data reconstruction method and Related product
JP2001326720A (en) Communication system
CN116321226A (en) Network configuration method, wireless communication device, and storage medium
CN114189528A (en) Cloud storage method, device, server, terminal, cloud storage system and 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
CB02 Change of applicant information

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

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

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

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

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant