This application claims priority under 35 U.S.C. §119(a) to a Korean Patent Application filed in the Korean Intellectual Property Office on May 3, 2013 and assigned Serial No. 10-2013-0049935, the entire disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention generally relates to an apparatus and method for synchronizing data, and more particularly, to a data synchronization apparatus and method for performing data synchronization between a plurality of Databases (DBs) of a terminal and one DB of a server.
2. Description of the Related Art
Client-server data synchronization refers to data synchronization between two or more different DBs.
In a typical mobile device, a client has a predetermined number of DBs such as a phonebook, a calendar, a task list, and the like. In order for the client to perform data synchronization with a server using Synchronization Markup Language (SyncML), which is one of the most typical standards, the server needs to define the same DBs as those of the client. For example, phonebook data stored in a phonebook DB of the client is stored in a phonebook DB of the server.
However, if the client has two DBs (for example, a phonebook 1 and a phonebook 2), data synchronization between the two DBs of the client and the single DB of the server may suffer from an inconsistency problem, so the user needs to select one of the two DBs of the client, for which he or she wants to perform data synchronization with the single DB of the server.
For example, the client may have a Subscriber Identification Module (SIM) card and an internal memory. The SIM card, as a first DB, may store data record—1_db1, record—2_db1 and record—3_db1, and the data record—1_db1, record—2_db1 and record—3_db1 may have unique local Identifiers (IDs) 1, 2 and 3, respectively. The internal memory, as a second DB, may store data record—1_db2 and record—2_db2, and the data record—1_db2 and record—2_db2 may have unique local IDs 1 and 2, respectively. In this case, if data synchronization is performed between the two DBs of the client and the single DB of the server, two data corresponding to the same local ID 1 may be written in the single DB of the server in a duplicated manner and two data corresponding to the same local ID 2 may also be written in the single DB of the server in a duplicated manner, causing data collision.
If record—1_db1 having a local ID 1 is changed in the single DB of the server and then the server transmits the changed record—1_db1 having the local ID 1 to the client, the client may not determine with the local ID 1 whether the changed data is record—1_db1 in the first DB or record—1_db2 in the second DB.
For this reason, therefore, the client needs to undesirably select any one of its plurality of DBs, and perform data synchronization between the selected DB and the single DB of the server.
An aspect of the present invention is to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below.
Accordingly, an aspect of the present invention is to provide a data synchronization apparatus and method for performing data synchronization between a plurality of Databases (DBs) of a terminal and one DB of a server without data collision.
Another aspect of the present invention is to provide a data synchronization apparatus and method for performing data synchronization between a plurality of DBs of a terminal and one DB of a server without duplicate data entry.
In accordance with an aspect of the present invention, an apparatus for synchronizing data in a terminal is provided. The apparatus includes a memory including an integrated Database (DB) that stores data of each of a plurality of DBs and a new integrated Identifier (ID) obtained by changing a local ID of the data; and a controller configured to transmit data having an integrated ID in the integrated DB to a server upon request for data synchronization with the server, thereby performing data synchronization.
In accordance with another aspect of the present invention, a method for synchronizing data in a terminal is provided. The method includes configuring an integrated Database (DB) that stores data of each of a plurality of DBs and a new integrated Identifier (ID) obtained by changing a local ID of the data; and transmitting data having an integrated ID in the integrated DB to a server upon request for data synchronization with the server, thereby performing data synchronization.
The above and other aspects, features and advantages of certain embodiments of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings, in which:
Throughout the drawings, like reference numerals will be understood to refer to like parts, components, and structures.
The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of embodiments of the present invention as defined by the claims and their equivalents. It includes various specific details to assist in that understanding but these are to be regarded as merely examples. Accordingly, those of ordinary skilled in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions may be omitted for clarity and conciseness.
The terms and words used in the following description and claims are not limited to their dictionary meanings, but, are merely used to enable a clear and consistent understanding of the invention. Accordingly, it should be apparent to those skilled in the art that the following description of embodiments of the present invention is provided for illustration purposes only and not for the purpose of limiting the invention as defined by the appended claims and their equivalents.
It is to be understood that the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “a component surface” includes reference to one or more of such surfaces.
Terminals, to which embodiments of the present invention are applicable, may include mobile terminals and fixed terminals. The mobile terminals, easy-to-carry portable electronic devices, may include video phones, cellular phones, smart phones, Wideband Code Division Multiple Access (WCDMA) terminals, Universal Mobile Telecommunication Service (UMTS) terminals, Personal Digital Assistants (PDAs), Portable Multimedia Players (PMPs), Digital Multimedia Broadcasting (DMB) terminals, E-Book readers, portable computers (for example, laptop computers, tablet computers and the like), digital cameras and the like. The fixed terminals may include desktop Personal Computers (PCs) and the like.
Referring to
A key input unit 127 includes numeric/character keys for allowing a user to enter numeric and character information, and function keys for setting various functions.
A memory 130 may be comprised of a program memory and a data memory. The program memory may store programs for controlling the overall operation of the terminal, and programs for synchronizing data stored in a single integrated DB configured by integrating a plurality of DBs of the terminal with data in a single DB of a server. The data memory may temporarily store the data generated during execution of the programs.
In accordance with embodiments of the present invention, the memory 130 stores a single integrated DB configured by integrating a plurality of DBs. The integrated DB stores multiple data of each of the plurality of DBs and new integrated Identifiers (IDs) determined by changing local IDs of the multiple data. The integrated DB will be described in detail below with reference to
A first Subscriber Identification Module (SIM) card SIM1 171 may be inserted into a first SIM card socket 170, and a second SIM card SIM2 181 may be inserted into a second SIM card socket 180.
In accordance with embodiments of the present invention, the first and second SIM cards 171 and 181 will be assumed as first and second DBs, respectively, and the memory 130 will be assumed as a third DB. Although three DBs will be considered in embodiments of the present invention, the number of DBs is subject to change. The memory 130 may be classified into a DB for storing data corresponding to a phonebook application, a DB for storing data corresponding to a calendar application, and a DB for storing data corresponding to a camera application.
A controller 110 controls the overall operation of the terminal.
In accordance with embodiments of the present invention, upon a request for data synchronization with a server, the controller 110 may create one integrated DB configured by integrating the first, second and third DBs 171, 181 and 130.
Alternatively, before requesting data synchronization with a server, the controller 110 may create one integrated DB configured by integrating the first, second and third DBs 171, 181 and 130.
The controller 110 stores, in the integrated DB, multiple data stored in each of the first, second and third DBs 171, 181 and 130, and integrated IDs corresponding to the multiple data. As to the integrated IDs, the controller 110 changes local IDs of the multiple data stored in each DB to new integrated IDs.
The controller 110 may create the integrated IDs by delimiting locations corresponding to the first, second and third DBs 171, 181 and 130 using delimiters, and writing local IDs of multiple data stored in a specific DB in a specific location among the delimited locations.
The controller 110 may create the integrated DB by delimiting three locations corresponding to the first, second and third DBs 171, 181 and 130 using the delimiters, writing local IDs of multiple data stored in the first DB 171 in a first location, writing local IDs of multiple data stored in the second DB 181 in a second location, and writing local IDs of multiple data stored in the third DB 130 in a third location.
If local IDs of multiple data stored in each of the first, second and third DBs 171, 181 and 130 are each written as a number, the controller 110 may create the integrated IDs by sequentially writing intact local IDs of multiple data stored in the first DB 171, and changing (or shifting) local IDs of multiple data stored in the second and third DBs 181 and 130 by an offset. For example, if ten data are stored in each of the first, second and third DBs 171, 181 and 130, the controller 110 may change local IDs 1 to 10 corresponding to ten data stored in the first DB 171 to integrated IDs 1 to 10, change local IDs 1 to 10 corresponding to ten data stored in the second DB 181 to integrated IDs 11 to 20, and change local IDs 1 to 10 corresponding to ten data stored in the third DB 130 to integrated IDs 21 to 30.
Upon receiving changed data from the server, the controller 110 may detect an ID of the received data from the integrated DB, and replace data corresponding to the detected ID with the changed data received from the server in the integrated DB.
In accordance with embodiments of the present invention, the server may include a single DB, in which multiple data and their integrated IDs may be stored to be the same as those stored in the integrated DB of the terminal.
A camera unit 140 includes a camera sensor for capturing image data and converting the captured optical image signals into electrical image signals, and a signal processor for converting analog image signals captured by the camera sensor into digital image data. The camera sensor may be a Charge-Coupled Device (CCD) or Complementary Metal-Oxide Semiconductor (CMOS) sensor, and the signal processor may be implemented with a Digital Signal Processor (DSP). The camera sensor and the signal processor may be implemented either integrally or separately.
An image processor 150 performs Image Signal Processing (ISP) to display the image signals output from the camera unit 140 on a display 160. The ISP may include functions such as gamma correction, interpolation, spatial variation, image effects, image scaling, Automatic White Balance (AWB), Automatic Exposure (AE), Automatic Focus (AF) and the like. The image processor 150 handles the image signals output from the camera unit 140 on a frame basis, and outputs frame image data to match with the characteristics and size of the display 160. The image processor 150, which includes a video codec, may compress frame image data display on the display 160 and decompress the compressed frame image data into its original frame image data, using a predetermined coding/decoding scheme. The video codec may be a Joint Photographic Experts Group (JPEG) codec, a Moving Picture Experts Group 4 (MPEG4) codec, a Wavelet codec, or the like. The image processor 150 is assumed to have an On-Screen Display (OSD) function, and may output OSD data depending on the size of the display screen, under control of the controller 110.
The display 160 displays, on its screen, the image signals output from the image processor 150 and the user data output from the controller 110. A Liquid Crystal Display (LCD) may be used as the display 160. In this case, the display 160 may include an LCD controller, a video memory capable of storing image data, and an LCD panel. When implemented as a touch screen, the LCD may also serve as an input unit. In this case, the same keys as those on the key input unit 127 may be displayed on the display 160.
If the display 160 is used as a touch screen unit when it is implemented as a touch screen, the touch screen unit may be comprised of a Touch Screen Panel (TSP) including a plurality of sensor panels. The plurality of sensor panels may include a capacitive sensor panel capable of detecting fingertip touches, and an electromagnetic induction sensor panel capable of detecting fine touches such as touches by a stylus pen.
The data synchronization operation performed in the above-described terminal will be described in detail with reference to
The data synchronization operation will now be described in detail below with reference to
Referring to
Referring to
Although it is assumed in
Next, as illustrated in
Although it is assumed in
Referring back to
The data synchronization operation will now be described in detail below with reference to
Referring to
Upon receiving the changed data from the server, the controller 110 detects the reception of the changed data in step 601, and detects an integrated ID of the received data from the integrated DB, in step 602.
In step 603, the controller 110 replaces the data corresponding to the detected integrated ID with the changed data received from the server in the integrated DB, completing the data synchronization.
The embodiments of the present invention may be implemented as computer-readable codes in computer-readable recording media. The computer-readable recording media may include all kinds of recording devices that store computer-readable data. Typical examples of the recording media may include Read Only Memory (ROM), Random Access Memory (RAM), optical discs, magnetic tapes, floppy discs, hard discs, non-volatile memories and the like, and may also include recording media implemented in the form of carrier waves (for example, transmission over the Internet). The computer-readable recording media may be distributed over computer systems connected by a network, and the computer-readable codes may be stored and executed in a distributed manner.
As is apparent from the foregoing description, the data synchronization apparatus and method of the present invention may freely perform data synchronization between a plurality of DBs of the terminal and one DB of the server without data collision and/or duplicate data entry.
While the invention has been shown and described with reference to certain embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
10-2013-0049935 | May 2013 | KR | national |