CN111953722B - Synchronization method and device for terminal address book - Google Patents

Synchronization method and device for terminal address book Download PDF

Info

Publication number
CN111953722B
CN111953722B CN201910411085.5A CN201910411085A CN111953722B CN 111953722 B CN111953722 B CN 111953722B CN 201910411085 A CN201910411085 A CN 201910411085A CN 111953722 B CN111953722 B CN 111953722B
Authority
CN
China
Prior art keywords
address book
contact information
cloud
difference
terminal
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
CN201910411085.5A
Other languages
Chinese (zh)
Other versions
CN111953722A (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.)
Wuhan Hikstorage Technology Co ltd
Original Assignee
Wuhan Hikstorage 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 Wuhan Hikstorage Technology Co ltd filed Critical Wuhan Hikstorage Technology Co ltd
Priority to CN201910411085.5A priority Critical patent/CN111953722B/en
Publication of CN111953722A publication Critical patent/CN111953722A/en
Application granted granted Critical
Publication of CN111953722B publication Critical patent/CN111953722B/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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/27453Directories allowing storage of additional subscriber data, e.g. metadata
    • H04M1/27457Management thereof, e.g. manual editing of data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/2753Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips providing data content
    • H04M1/2757Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips providing data content by data transmission, e.g. downloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Library & Information Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides a method and a device for synchronizing a terminal address book, which can acquire all difference items if at least one difference item exists in a first difference item of a preset address book and the terminal address book and a second difference item of the preset address book and the cloud address book; updating the preset address book according to all the obtained difference items to obtain a latest address book; and synchronizing the terminal address book and the cloud address book to be the same as the latest address book respectively, so that the intercommunication management and synchronization of the address books can be carried out on each terminal of the user through the method.

Description

Synchronization method and device for terminal address book
Technical Field
The application relates to the technical field of mobile phone applications, in particular to a method and a device for synchronizing a terminal address book.
Background
The mobile phone address book is used as a basic function of the mobile phone, plays a vital role in the use of the mobile phone, and the existing backup method of the address book of the single mobile phone is usually that a mobile phone system backs up the mobile phone address book or a user considers that the mobile phone address book is uploaded to a network cloud disk for storage.
However, in the present day when mobile devices are updated rapidly, a user can often replace a mobile phone or a user can use multiple mobile phones at the same time, especially when mobile phone systems used by the users are different, address book synchronization between the multiple mobile phones of the user becomes very difficult, and the existing method for backing up the address book of a single mobile phone cannot meet the synchronous requirement of multiple mobile phone address books of the user.
Disclosure of Invention
In view of this, the present application provides a method and apparatus for synchronizing terminal address books, which can solve the problem that in the prior art, multiple terminal address books cannot be synchronized.
Specifically, the application is realized by the following technical scheme:
according to a first aspect of an embodiment of the present application, there is provided a method for synchronizing a terminal address book, where the method includes:
if at least one difference item exists in a first difference item of a preset address book and a terminal address book and a second difference item of the preset address book and the cloud address book, acquiring all the difference items;
updating the preset address book according to all the obtained difference items to obtain a latest address book;
and synchronizing the terminal address book and the cloud address book to be the same as the latest address book respectively.
According to a second aspect of embodiments of the present application, there is provided a synchronization apparatus for a terminal address book, the apparatus including:
the acquisition unit is used for acquiring all difference items if at least one difference item exists in a first difference item of a preset address book and a terminal address book and a second difference item of the preset address book and the cloud address book;
the updating unit is used for updating the preset address book according to all the acquired difference items to obtain the latest address book;
and the synchronization unit is used for synchronizing the terminal address book and the cloud address book to be the same as the latest address book respectively.
According to a third aspect of the embodiments of the present application, there is provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of the synchronization method of any one of the terminal address books.
According to a fourth aspect of embodiments of the present application, there is provided a computer device comprising a memory, a processor, a communication interface, and a communication bus; the memory, the processor and the communication interface communicate with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory, where the processor implements a step of the synchronization method of any terminal address book when executing the computer program.
According to the embodiment, the difference item can be obtained by comparing the cache preset address book with the terminal address book and the cloud address book respectively, the latest address book is obtained by updating the preset address book through the difference item, and the terminal address book and the cloud address book are respectively synchronized to be the same as the latest address book, so that when a plurality of terminals are used by a user, each terminal can be bound with cloud equipment and address book synchronization is carried out, one or more address books can be managed among the plurality of terminals of different platforms, the effect of data intercommunication is achieved, and the management efficiency of the address books of the plurality of terminals can be improved for the user.
Drawings
Fig. 1 is a flowchart of an embodiment of a method for synchronizing a terminal address book of the present application;
fig. 2-1 is an exemplary synchronization diagram of a mobile phone a according to the present application;
fig. 2-2 is a schematic diagram illustrating synchronization of a mobile phone B according to an exemplary embodiment of the present application;
fig. 3 is a schematic diagram of synchronous interaction of an exemplary terminal address book of the present application;
fig. 4-1 is a schematic diagram illustrating first synchronization of a mobile phone a according to an exemplary embodiment of the present application;
fig. 4-2 is a schematic diagram illustrating first synchronization of a mobile phone B according to an exemplary embodiment of the present application;
fig. 4-3 are schematic diagrams illustrating a second synchronization of the mobile phone B according to the present application;
fig. 4-4 are schematic diagrams illustrating a second synchronization of the mobile phone a according to the present application;
fig. 5 is a block diagram of an embodiment of a synchronization device for a terminal address book according to an exemplary embodiment of the present application;
FIG. 6 is a block diagram of one embodiment of a computer device of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In order to solve the problems of the prior art, the application provides a synchronization method and a synchronization device for a terminal address book, which can obtain a difference item by comparing a cache preset address book with the terminal address book and a cloud address book respectively, update the preset address book through the difference item to obtain a latest address book, and synchronize the terminal address book and the cloud address book to be the same as the latest address book respectively.
The following embodiments are shown to illustrate a method for synchronizing a terminal address book provided in the present application.
Referring to fig. 1, a flowchart of an embodiment of a method for synchronizing a terminal address book is shown, which can be applied to application software on a terminal (hereinafter referred to as a terminal App), and includes the following steps:
step 101, if at least one difference item exists in a first difference item of a preset address book and a terminal address book and a second difference item of the preset address book and the cloud address book, acquiring all the difference items;
in this embodiment, the terminal App may be installed on an operating system of the terminal, and the user may trigger synchronization with an address book of a cloud device according to a requirement, where the cloud device may be a personal private network disk or an enterprise network disk storage device. When an address book synchronization instruction is received, a request can be sent to cloud equipment corresponding to a terminal, and a cloud address book corresponding to the terminal in the cloud equipment is requested.
As an embodiment, the cloud device may establish a corresponding relationship with a plurality of terminals of a plurality of users, so that a cloud address book corresponding to the plurality of terminals is also stored. The terminal App can send a request to the cloud device corresponding to the terminal according to the pre-stored corresponding relation between the terminal and the cloud device and the address book identification of the cloud address book corresponding to the terminal in the cloud device, so that the cloud device searches and feeds back the cloud address book corresponding to the terminal according to the address book identification carried in the request, and the terminal App can acquire the cloud address book.
The terminal App can compare the acquired cloud address book and the terminal address book with preset address books in the terminal App respectively, and if at least one difference item exists in a first difference item of the preset address book and the terminal address book and a second difference item of the preset address book and the cloud address book, all the difference items are acquired. It should be noted that, the preset address book may be a stored result of last address book synchronization; or a blank address book, when the terminal address book and the cloud address book are compared with the preset address book, if the two address books are the same as the preset address book, the comparison result is that no difference item exists; if one address book is different from the preset address book, a difference item exists; if the two address books are different from the preset address book, two difference items exist, and in this embodiment, as long as at least one difference item exists, the difference item can be obtained.
As one embodiment, the contact information of the preset address book is added with the information of the modification time, the contact identification of the same equipment, the contact identification of different equipment and the like besides the common name and telephone number. The same-equipment contact person identification is identification for distinguishing different contact persons in the same terminal, and the same-equipment contact person identification can be reused in different terminals; the different device contact identification is an identification that distinguishes different contacts in different devices, which identification is not duplicated across multiple terminals. The terminal App can compare the contact information in the terminal address book with the contact information in the preset address book by using the same equipment contact identification in the contact information of the terminal address book as an index, and uses the contact information with difference as a first difference item; and comparing the contact information in the cloud address book with the contact information in the preset address book by taking the different device contact identification in the contact information in the cloud address book as an index, and taking the contact information with difference as a second difference item. In an alternative embodiment, the contact identifier of the different device may be spliced by adding a 32-bit random code to the timestamp of the current time, and once the contact identifier is generated, the contact identifier cannot be changed, so that the uniqueness of the contact identifier can be ensured. By indexing the contact identifiers, the rate of contact comparison can be increased, and because the contact identifiers are relatively unique, the result of the comparison is more accurate than directly comparing names and telephone numbers.
102, updating the preset address book according to all the obtained difference items to obtain the latest address book;
as an embodiment, when the first address book is synchronized, in the case that it is determined that the first difference item and the second difference item exist, and names and telephone numbers in the first contact information in the first difference item and the second contact information in the second difference item are different, it is described that the first contact information and the second contact information are different newly added contact information, so that the first contact information and the second contact information can be added into the latest address book; or when the names or telephone numbers in the first contact information and the second contact information are different, or the names and the numbers are the same, the same contact information is modified on different devices, so that the contact information with the latest modification time in the first contact information and the second contact information can be updated into the latest address book; when the address book is not synchronized for the first time, under the condition that the first difference item and the second difference item are determined to exist, the first difference item and the second difference item can be updated into the latest address book, and in addition, if only one difference item exists, all contact information in the difference item can be updated into the latest address book. According to the method for updating the difference item to the latest address book by comparing the contact information, the synchronous rate can be further improved on the premise of guaranteeing the uniqueness of the contact.
Further, the terminal App can add different modification tags to the contact information according to the difference type of the contact information with the difference, and update the preset address book according to the modification tag of the contact information in the difference item, wherein the modification tag comprises one or more of a new tag, a deletion tag or an update tag. For example, when the contact information is determined to be the new information, a new tag can be added to the contact information, and when the preset address list is updated, the contact information with the new tag can be added to the latest address list; when the contact information is determined to be modified information, a modification tag can be added for the contact information, and when a preset address list is updated, the contact information with the modification tag can be modified on the basis of the original contact information to obtain the latest contact information; when the contact information is determined to be the deletion information, a deletion tag can be added for the contact information, and when the preset address list is updated, the contact information with the deletion tag can be deleted in the latest address list. The above is merely exemplary, and the specific label classification method is not limited.
Step 103, synchronizing the terminal address book and the cloud address book to be the same as the latest address book.
In this embodiment, the terminal App may synchronize the terminal address book and the cloud address book with the same address book according to the latest address book, so as to achieve the purpose of synchronizing the address books.
For example, when the user mobile phone a needs to synchronize with the address book of the user mobile phone B and the cloud device, the user mobile phone a and the cloud device may be synchronized first, and for a specific process, please refer to fig. 2-1. Assuming that the contact information in the terminal address book of the mobile phone A of the user comprises a contact B, a contact C and a contact D, and the contact information in the App preset address book of the mobile phone A comprises a contact B and a contact C, comparing the three address books to obtain a first difference item of the terminal address book of the mobile phone A and the preset address book, wherein the first difference item of the terminal address book of the mobile phone A and the preset address book is a new contact D of the mobile phone, and a second difference item of the cloud address book and the preset address book is a new contact A of the cloud, and the contact A and the contact D belong to different contacts, so that the new contact is added into the preset address book as new added items; and finally, synchronizing the address book of the mobile phone A and the address book of the cloud according to the latest address book, thereby ensuring the consistency of the information of the mobile phone A, the cloud and the address book.
Suppose that after the synchronization of the terminal address book of the mobile phone a is completed, the terminal address book of the mobile phone B needs to be synchronized, and the specific process is shown in fig. 2-2. Assuming that the contact information in the terminal address book of the user mobile phone B comprises a contact F, no contact exists in an App preset address book of the mobile phone B, the contact information in the cloud address book comprises a contact A, a contact B, a contact C and a contact D according to the synchronization result with the mobile phone A, after the three address books are compared, the obtained first difference item between the terminal address book of the mobile phone B and the preset address book is a new contact F of the mobile phone, and the obtained second difference item between the cloud address book and the preset address book is the new contact A, the contact B, the contact C and the contact D of the cloud; and finally, synchronizing the terminal address book and the cloud address book of the mobile phone B according to the latest address book, so that the consistency of the information of the terminal address book and the cloud address book of the mobile phone A and the cloud address book of the user in the cloud equipment can be realized, and the terminal address book and the cloud address book of the user in the cloud equipment are synchronized into the terminal address book of the mobile phone B.
For a further explanation of the processing methods of the present application, please refer to the detailed description of the present application in connection with the following examples.
Referring to fig. 3, a flowchart of an embodiment of a method for synchronizing a terminal address book is shown, which is applied to a terminal and includes the following steps.
Step 301, entering an App page of a mobile phone;
step 302, inquiring whether a preset address book is cached locally;
step 303, assuming that the terminal address book of the mobile phone a is not synchronized before, displaying that the cache preset address book is empty, and displaying a first synchronous button prompt in a page;
step 304, the terminal address book of the mobile phone A is changed;
step 305, if the user triggers the first synchronization button, a preset address book needs to be established in the cache;
step 306, acquiring cloud address book information corresponding to the user from the cloud, wherein the cloud address book information comprises a cloud address book identifier, address book names and the number of contacts;
step 307, displaying options of a preset address book, including a new option and a synchronous option, wherein the new option is to newly establish a blank address book as the preset address book; the synchronization option is to take a cloud address book acquired from a cloud as a preset address book;
step 308, assuming that a new address book is selected, a blank preset address book is newly built;
step 309, the mobile phone App requests a new identifier and name of a preset address book from the cloud; and starting a first synchronization process;
step 310, acquiring a terminal address book of a mobile phone A;
step 311, acquiring a cloud address book corresponding to a user stored in a cloud;
step 312, performing a synchronization operation according to a user selection, where options may be: merging and de-duplicating the terminal address book and the cloud address book, or covering the cloud end by the terminal or covering the terminal by the cloud end; the user can select according to the actual demand, so that the App realizes the address book synchronization of the terminal and the cloud according to the result selected by the user;
step 313, the first synchronization is completed.
For example, in the first synchronization process, as shown in fig. 4-1, it may be assumed that the App of the mobile phone a determines that there is no synchronization record in the current App, at this time, the App locally adds the contact A, B, C, D to the App cache by using the Person identifier of the different device, for example, the Person identifier, and then reads the contact in the cloud to the App cache, and therefore, since there is no contact in the cloud at the time of first synchronization, at this time, the contacts in the App cache are Person a and B, C, D, and if the user selects the operation of merging and deduplicating the terminal and the cloud, the App may merge and deduplicate the contacts in the mobile phone and the cloud according to the synchronization rule, and the obtained result is that the latest address book includes Person a and B, C, D, and then stores the cached contacts in the App sandbox as synchronization records, and synchronizes to the mobile phone a and the cloud respectively, so that the first synchronization operation can be completed, and the terminal address book of the mobile phone, the preset address book of the App and the cloud device are all contacts A, B, C, D after the synchronization.
Step 314, the terminal address book of the mobile phone A is changed;
step 315, a cloud address book corresponding to the user in the cloud is changed;
step 316, the user enters the mobile phone App page again, at this time, the last synchronization time, the number of contacts in the address book of the mobile phone a terminal, the number of the latest contacts in the cloud address book, and the synchronization button are displayed in the page, and when the user determines that synchronization needs to be performed again according to the display information, the synchronization button can be triggered to start the non-first synchronization process;
step 317, obtaining the latest terminal address book of the mobile phone A;
step 318, requesting and obtaining the identifier, name, index path, modification time and number of contacts of the cloud address book corresponding to the user in the cloud;
step 319, obtaining a latest cloud address book corresponding to the user in the cloud;
step 320, comparing the preset address book with the terminal address book and the cloud address book of the mobile phone A respectively to obtain a difference item;
step 321, updating a preset address book according to the difference item to obtain an up-to-date address book;
step 322, synchronizing the terminal address book of the mobile phone A according to the latest address book;
step 323, synchronizing the cloud address book according to the latest address book.
Assuming that when the user uses the mobile phone a and the mobile phone B, as shown in the foregoing embodiment, after the mobile phone a has synchronized the contact A, B, C, D to the cloud, but the other mobile phone B has not been synchronized, the first synchronization flow of the mobile phone B is shown in fig. 4-2, where:
before synchronization, only contact F is in the terminal address book of the mobile phone B, contact A, B, C, D is in the terminal address book of the mobile phone B, the contact in the terminal address book of the mobile phone B is combined with the contact in the terminal address book of the cloud, the App of the mobile phone B firstly adds a Person identifier to the local contact of the mobile phone B to read into a preset address book of the App, then adds a Person identifier to the contact A, B, C, D in the terminal address book of the cloud to read into the preset address book of the App, five contacts of Person A and B, C, D, F are in the terminal address book of the mobile phone B and the preset address book of the App at the moment, then the terminal address book of the mobile phone B is compared with the preset address book of the App of the mobile phone, the comparison result is that Person A and Person B, C, D in the App preset address book are not in the terminal address book of the mobile phone B, the four contacts are considered to be newly added contacts relative to the mobile phone B, then the four contacts are newly added in the terminal address book of the mobile phone B, and similarly, the cloud address book is compared with the App preset address book of the mobile phone B, and as a result, person F is considered to be the newly added contact relative to the cloud address book if Person F is not found in the cloud address book, then the contact is newly added in the cloud address book, and finally, the terminal address book of the mobile phone B, the App preset address book of the mobile phone B and the cloud address book are all provided with contacts A, B, C, D, F, so that the first synchronization of the terminal address book of the mobile phone B is completed.
Then, assuming that the mobile phone B changes the terminal address book, modifies the contact C to be the contact C3, and deletes the contact D, a second synchronization flow of the mobile phone B is shown in fig. 4-3, where:
firstly, comparing a terminal address book of a mobile phone B with an App preset address book of the mobile phone B, and if a Person identifier of a Person C in a mobile phone cache is the same as a Person identifier of a contact Person C3 of the terminal address book of the mobile phone B but the latest modification time is different, considering that the contact Person C of the mobile phone B is modified, converting the contact Person C3 into the Person C3 and storing the Person C3 in the App preset address book; then, the Person identifier of Person D in the App preset address book of the mobile phone B is found out, if the Person identifier of Person D is not found in the terminal address book of the mobile phone B, the mobile phone B is considered to delete the contact Person D locally, and the contact Person D is converted into Person D to be stored in the App preset address book; comparing the cloud address book with a preset address book of the mobile phone App, and considering that the cloud contact is unchanged if no change is found; and finally, synchronizing the locally modified contact of the mobile phone B in the cloud according to the App preset address book, namely modifying the contact C in the cloud into a contact C3, and deleting the contact D in the cloud.
Then, under the condition that the mobile phone B finishes synchronizing the terminal address book for the second time, assuming that the mobile phone a changes the terminal address book, deletes the contact B, modifies the contact C to be the contact C2, and adds the contact E, the second synchronization process of the mobile phone a is as shown in fig. 4-4, wherein:
comparing the address book of the mobile phone A terminal with the App preset address book of the mobile phone A, and if the Person identifier of Person C in the App preset address book of the mobile phone is the same as the Person identifier of contact C2 of the terminal address book of the mobile phone A but the latest modification time is different, considering that the local contact C of the mobile phone is modified, converting the contact C2 into Person C2 and storing the Person C2 in the App preset address book of the mobile phone A; then, the Person identifier of Person B in the App preset address book of the mobile phone A is found out, if the Person identifier of Person B is not found in the address book of the mobile phone A terminal, the mobile phone A is considered to delete the contact B locally, and the contact B is converted into Person B to be stored in the App preset address book; then, the Person identifier of the contact E in the terminal address book of the mobile phone A is found out and cannot be found in the App preset address book of the mobile phone A, if the contact E is considered to be newly added in the local area of the mobile phone A, the contact E is converted into the Person E and stored in the App preset address book;
comparing the cloud address book with an App preset address book of the mobile phone A, and converting the contact Person C3 into a Person C3 to be stored in the App preset address book if the Person identifier of the Person C in the App preset address book of the mobile phone A is the same as the Person identifier of the contact Person C3 in the cloud address book but the latest modification time is different; then, finding that the Person identifier of Person D in the App preset address book cannot be found in the cloud address book, and if the cloud address book is considered to delete the contact Person D, converting the contact Person D into Person D and storing the Person D in the App preset address book; then, the Person identifier of the contact Person F in the cloud address book is found out and cannot be found in the App preset address book, if the contact Person F is considered to be newly added in the cloud address book, the contact Person F is converted into the Person F and stored in the App preset address book;
therefore, person E and Person F can be newly added in an App preset address book of the mobile phone A, a contact E is newly added in a cloud address book, and a contact F is newly added in a terminal address book of the mobile phone; deleting Person B and Person D in an App cache of the mobile phone A, deleting the contact Person B in a cloud end, and deleting the contact Person D in an address book of a mobile phone terminal; and comparing the modification time of the Person C2 with the modification time of the Person C3, and modifying the Person C in the App preset address book into the Person C2 and modifying the contact Person C3 in the cloud address book into the contact Person C2 on the assumption that the modification time of the Person C2 is newer, thereby completing synchronization.
The above is a scenario that a plurality of mobile phones operate one address book, because each mobile phone is bound with the unique identifier of the address book when the user newly builds the address book, when the user synchronizes again later, the cloud end can automatically find the address book to be synchronized according to the unique identifier of the address book stored in the mobile phone to perform synchronous operation, thereby realizing synchronization of the plurality of mobile phones, improving the synchronization efficiency and simplifying the user operation. In addition, different mobile phones can bind different address books for synchronization, so that the address books among a plurality of mobile phones are not mutually influenced.
Corresponding to the embodiment of the method for synchronizing the terminal address book, the application also provides an embodiment of a device for synchronizing the terminal address book.
Referring to fig. 5, which is a block diagram of an embodiment of a synchronization apparatus for a terminal address book of the present application, the apparatus 50 may include:
the obtaining unit 51 is configured to obtain all the difference items if at least one difference item exists in a first difference item of a preset address book and a terminal address book and a second difference item of the preset address book and the cloud address book;
an updating unit 52, configured to update the preset address book according to all the obtained difference items to obtain an updated address book;
and the synchronizing unit 53 is configured to synchronize the terminal address book and the cloud address book to be the same as the latest address book.
As an embodiment, the apparatus further comprises:
the request unit 54 is configured to send a request to the cloud device corresponding to the terminal according to a pre-stored correspondence between the terminal and the cloud device and an address book identifier of a cloud address book corresponding to the terminal in the cloud device, so that the cloud device searches for and feeds back the cloud address book corresponding to the terminal according to the address book identifier carried in the request.
As an embodiment, the obtaining unit 51 is specifically configured to compare, by using, as an index, a contact identifier of a same device in contact information of the terminal address book, contact information in the terminal address book with contact information in the preset address book, and use, as a first difference item, contact information having a difference; and comparing the contact information in the cloud address book with the contact information in the preset address book by taking the different device contact identification in the contact information in the cloud address book as an index, and taking the contact information with difference as a second difference item.
As an embodiment, the updating unit 52 is configured to add different modification tags to the contact information according to the difference type of the contact information with the difference, and update the preset address book according to the modification tags of the contact information in the difference item, where the modification tags include one or more of a new tag, a delete tag, and an update tag.
As an embodiment, the updating unit 52 is further configured to, when the first address book is synchronized, add, in the case where the first difference item and the second difference item exist, and the name and the phone number in the first contact information in the first difference item and the second contact information in the second difference item are different, both the first contact information and the second contact information to the latest address book; or updating the contact information with the latest modification time in the first contact information and the second contact information to the latest address list under the condition that the names or telephone numbers in the first contact information and the second contact information are different or the names and the numbers are the same; when the address book is not synchronized for the first time, under the condition that the first difference item and the second difference item exist, the first difference item and the second difference item are updated into the latest address book.
According to the embodiment, the difference item can be obtained by comparing the cache preset address book with the terminal address book and the cloud address book respectively, the latest address book is obtained by updating the preset address book through the difference item, and the terminal address book and the cloud address book are respectively synchronized to be the same as the latest address book, so that when a plurality of terminals are used by a user, each terminal can be bound with cloud equipment and address book synchronization is carried out, one or more address books can be managed among the plurality of terminals of different platforms, the effect of data intercommunication is achieved, and the management efficiency of the address books of the plurality of terminals can be improved for the user.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Corresponding to the embodiment of the method for synchronizing the terminal address book, the application also provides an embodiment of a computer device for executing the method for synchronizing the terminal address book.
As an embodiment, please refer to fig. 6, a computer device includes a processor 61, a communication interface 62, a memory 63, and a communication bus 64;
wherein the processor 61, the communication interface 62 and the memory 63 communicate with each other through the communication bus 64;
the memory 63 is used for storing a computer program;
the processor 61 is configured to execute a computer program stored in the memory 63, where the processor 61 implements a step of the synchronization method of any one of the terminal address books when executing the computer program.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the computer apparatus, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the description of the method embodiments in part.
Corresponding to the foregoing embodiments of the method for synchronizing a terminal address book, the present application further provides embodiments of a computer readable storage medium for executing the method for synchronizing a terminal address book.
As an embodiment, the present application further includes a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps of the method for synchronizing address books of any one of the terminals.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments and computer-readable storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the partial description of method embodiments being relevant.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (8)

1. The method for synchronizing the terminal address book is characterized by comprising the following steps:
if at least one difference item exists in a first difference item of a preset address book and a terminal address book and a second difference item of the preset address book and a cloud address book, acquiring all the difference items;
updating the preset address book according to all the obtained difference items to obtain a latest address book;
synchronizing the terminal address book and the cloud address book to be the same as the latest address book respectively;
the method for obtaining the first difference item of the preset address book and the terminal address book comprises the following steps: comparing the contact information in the terminal address book with the contact information in the preset address book by using the same-equipment contact identification in the contact information of the terminal address book as an index, and taking the contact information with difference as a first difference item;
the obtaining a second difference item between the preset address book and the cloud address book comprises the following steps: and comparing the contact information in the cloud address book with the contact information in the preset address book by taking the different device contact identification in the contact information in the cloud address book as an index, and taking the contact information with difference as a second difference item.
2. The method according to claim 1, wherein the method further comprises:
according to the pre-stored corresponding relation between the terminal and the cloud device and the address book identification of the corresponding cloud address book of the terminal in the cloud device, a request is sent to the cloud device corresponding to the terminal, so that the cloud device searches the corresponding cloud address book of the terminal according to the address book identification carried in the request and feeds back the address book.
3. The method of claim 1, wherein updating the preset address book to obtain the latest address book according to all the obtained difference items comprises:
adding different modification labels for the contact information according to the difference types of the contact information with the difference, and updating the preset address book according to the modification labels of the contact information in the difference item, wherein the modification labels comprise one or more of a new label, a deletion label or an update label.
4. The method of claim 1, wherein updating the preset address book to obtain the latest address book according to all the obtained difference items comprises:
when the first address book is synchronous, under the condition that the first difference item and the second difference item exist, and the name and the telephone number in the first contact information in the first difference item and the name and the telephone number in the second contact information in the second difference item are different, adding the first contact information and the second contact information into the latest address book; or updating the contact information with the latest modification time in the first contact information and the second contact information to the latest address list under the condition that the names or telephone numbers in the first contact information and the second contact information are different or the names and the numbers are the same;
when the address book is not synchronized for the first time, under the condition that the first difference item and the second difference item exist, the first difference item and the second difference item are updated into the latest address book.
5. A synchronization device for a terminal address book, the device comprising:
the acquisition unit is used for acquiring all difference items if at least one difference item exists in a first difference item of a preset address book and a terminal address book and a second difference item of the preset address book and a cloud address book;
the updating unit is used for updating the preset address book according to all the acquired difference items to obtain the latest address book;
the synchronization unit is used for synchronizing the terminal address book and the cloud address book to be the same as the latest address book respectively;
the acquiring unit is specifically configured to compare contact information in the terminal address book with contact information in the preset address book by using a same-device contact identifier in the contact information in the terminal address book as an index, and use the contact information with difference as a first difference item; and comparing the contact information in the cloud address book with the contact information in the preset address book by taking the different device contact identification in the contact information in the cloud address book as an index, and taking the contact information with difference as a second difference item.
6. The apparatus of claim 5, wherein the apparatus further comprises:
the request unit is used for sending a request to the cloud equipment corresponding to the terminal according to the pre-stored corresponding relation between the terminal and the cloud equipment and the address book identification of the cloud address book corresponding to the terminal in the cloud equipment, so that the cloud equipment searches the cloud address book corresponding to the terminal according to the address book identification carried in the request and feeds back the address book.
7. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the updating unit is used for adding different modification labels to the contact information according to the difference type of the contact information with the difference, updating the preset address book according to the modification labels of the contact information in the difference item, wherein the modification labels comprise one or more of a new label, a deletion label and an update label.
8. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the updating unit is further configured to, when the first address book is synchronized, add, when the first difference item and the second difference item exist and the name and the phone number in the first contact information in the first difference item and the name and the phone number in the second contact information in the second difference item are different, both the first contact information and the second contact information to the latest address book; or updating the contact information with the latest modification time in the first contact information and the second contact information to the latest address list under the condition that the names or telephone numbers in the first contact information and the second contact information are different or the names and the numbers are the same; when the address book is not synchronized for the first time, under the condition that the first difference item and the second difference item exist, the first difference item and the second difference item are updated into the latest address book.
CN201910411085.5A 2019-05-16 2019-05-16 Synchronization method and device for terminal address book Active CN111953722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910411085.5A CN111953722B (en) 2019-05-16 2019-05-16 Synchronization method and device for terminal address book

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910411085.5A CN111953722B (en) 2019-05-16 2019-05-16 Synchronization method and device for terminal address book

Publications (2)

Publication Number Publication Date
CN111953722A CN111953722A (en) 2020-11-17
CN111953722B true CN111953722B (en) 2023-06-30

Family

ID=73336057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910411085.5A Active CN111953722B (en) 2019-05-16 2019-05-16 Synchronization method and device for terminal address book

Country Status (1)

Country Link
CN (1) CN111953722B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039987A (en) * 2021-11-05 2022-02-11 光大科技有限公司 Address book synchronization method and device, computer storage medium and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017202020A1 (en) * 2016-05-26 2017-11-30 乐视控股(北京)有限公司 Method and device for managing contact in contact list, and mobile terminal

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038537A (en) * 2014-05-27 2014-09-10 小米科技有限责任公司 Contact list information management method and device and mobile terminal
CN104935714B (en) * 2015-06-15 2018-09-07 北京奇虎科技有限公司 Linkman state setting method in address list and device
CN105872168A (en) * 2015-11-09 2016-08-17 乐视致新电子科技(天津)有限公司 Address list update method and device
CN105656985A (en) * 2015-11-13 2016-06-08 乐视移动智能信息技术(北京)有限公司 Method and apparatus for updating contact information synchronously
CN105530353A (en) * 2016-02-05 2016-04-27 冯泽 Mobile phone contact intelligent management method and system independent of mobile phone
CN105847336A (en) * 2016-03-18 2016-08-10 周奇 Address book synchronization method and device
CN107948220B (en) * 2016-10-12 2021-01-08 百度在线网络技术(北京)有限公司 Method and device for synchronizing address book cloud service
CN107613024A (en) * 2017-10-31 2018-01-19 维沃移动通信有限公司 A kind of method of data synchronization and mobile terminal
CN108551515A (en) * 2018-03-29 2018-09-18 中国联合网络通信集团有限公司 Address book updating method and address list more new system
CN109379431A (en) * 2018-10-29 2019-02-22 上海爱优威软件开发有限公司 A kind of contact person information updating method, cloud server and terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017202020A1 (en) * 2016-05-26 2017-11-30 乐视控股(北京)有限公司 Method and device for managing contact in contact list, and mobile terminal

Also Published As

Publication number Publication date
CN111953722A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CN108038114B (en) Path query method, terminal and computer readable storage medium
EP2706719B1 (en) File synchronization method and device
CN107045422B (en) Distributed storage method and device
US6374262B1 (en) Relational database synchronization method and a recording medium storing a program therefore
AU2014369911A1 (en) Providing access to a cloud based content management system on a mobile device
CN1954317A (en) Method, system, computer programs and devices for management of media items
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN111177144B (en) Table synchronization method, apparatus, device, storage medium and system
CN110619226A (en) Platform-based data processing method, system, equipment and storage medium
CN102223361A (en) Communication systems and data synchronization methods
CN109684270B (en) Database archiving method, device, system, equipment and readable storage medium
KR101201680B1 (en) Method of synchronizing a personal information for different types terminal and sever system thereof
CN105915636B (en) A kind of synchronous method and device of contact information
CN111953722B (en) Synchronization method and device for terminal address book
CN110958287B (en) Operation object data synchronization method, device and system
JP4719732B2 (en) Backup server, mobile device, communication system using these, and backup method
CN114610680A (en) Method, device and equipment for managing metadata of distributed file system and storage medium
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN102946403B (en) A kind of method of the solution file conflict for cloud storage system and device
KR20120073799A (en) Data synchronizing and servicing apparatus and method based on cloud storage
CN109325057B (en) Middleware management method, device, computer equipment and storage medium
US20140372375A1 (en) Contact data sharing
CN109857719B (en) Distributed file processing method, device, computer equipment and storage medium
CN114547184A (en) Personnel information synchronization method, terminal device and storage medium
CN111506646A (en) Data synchronization method, device, system, storage medium and processor

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