Abstract:
Many users of handheld computing devices or “palmtops” also own personal computers (PCs) running applications that manage data similar to the data carried in the palmtops. In such cases, users are likely to want the data on the palmtop to be synchronized with the data on the PC. The present invention discloses a method and apparatus for reconciling database files on a palmtop with corresponding database files on a PC.

Description:
FIELD OF THE INVENTION  
         [0001]    This invention relates to the field of handheld computing devices. Specifically, the present invention discloses a method and apparatus for synchronizing information between a desktop computing system and a handheld computing device.  
         BACKGROUND OF THE INVENTION  
         [0002]    Handheld computing devices or “palmtops” typically weigh less than a pound and fit in a pocket. These palmtops generally provide some combination of personal information management, database functions, word processing and spreadsheets. Users of palmtops may also own personal computers (PCs) running applications that manage data similar to the data carried in the palmtops. In such cases, the user normally would want the data on their palmtop to be easily synchronized with the data on their PC.  
           [0003]    A number of programs today transfer data between palmtops and PCs, but they are currently limited in functionality. Some programs transfer all the information from the palmtop to the PC without regard for the prior content on the PC. These programs assume that changes to that particular data are only made on the palmtop, and that the changes made on the palmtop take precedence over any changes made on the PC. As a result, any independent updates made directly on the PC will be lost.  
           [0004]    Other methods use ‘flags’ to facilitate synchronization. These methods create update ‘flags’ in each record that has changed, both on the palmtop and the PC. Corresponding files on the palmtop and the PC are then compared, and if one or more flags are set in a file, the file is recognized as having changed. If both the palmtop and PC files have changed, the flags are used to determine which records need to be updated in the other file. The databases of most existing programs, however, do not contain such flags since the databases of most existing programs were not designed to be synchronized. Thus, a different method must be used to synchronize data from programs that are already on the market.  
           [0005]    Some programs attempt to synchronize the data on the PC with the palmtop by comparing the information in each application and prompting the user for answers to determine which data to overwrite. For example, U.S. Pat. No. 5,392,390 describes a method for reconciling information between two calendar database files by interrogating the user about which file to update when a difficult case arises. Although these types of programs provide an advantage over programs that assume only one database has changed since they do not indiscriminately overwrite data, they are cumbersome and time consuming. Using these methods, users may have to spend an inordinate amount of time answering questions whenever they attempt to synchronize information between their palmtops and their PCs.  
         SUMMARY OF THE INVENTION  
         [0006]    It is therefore an object of the present invention to provide a solution to the problem of synchronizing records on two different computer systems. It is a further object of the present invention to present a method that reconciles two changeable databases without any user interactions. Specifically, the present invention discloses a method and apparatus for automatically reconciling records in corresponding files on palmtop and a personal computer (PC) by comparing the records in the palmtop and PC files with the records in a backup file in a backup directory from the previous synchronization.  
           [0007]    When a user is ready to synchronize information on the two computer systems, the palmtop is connected to the PC. The present invention then compares each record of a file on the palmtop with the records in the backup file in the backup directory to determine whether each record on the palmtop file is new, updated or if it has been deleted from the palmtop file. Next, a comparison is performed between the contents of the corresponding file on the PC and the backup file in the backup directory to determine whether each record on the PC is new, updated or if it has been deleted from the PC file. The results of both compares are stored, e.g., in a new file called a reconcile file, or a temporary data structure. After all the records in both files have been checked, the results of the compare, whether stored in a reconcile file or temporary data structure, are copied over the selected files on the palmtop, the PC and the backup file in the backup directory, thus guaranteeing that all three files are identical after the synchronization. The reconcile file is then deleted.  
           [0008]    Other objects, features and advantages of the present invention will be apparent from the accompanying drawings, and from the detailed description.  
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0009]    The objects, features, and advantages of the present invention will be apparent from the following detailed description of the preferred embodiment of the invention with references to the following drawings.  
         [0010]    [0010]FIG. 1 illustrates a palmtop connected to a PC containing a backup file from the previous palmtop-PC synchronization.  
         [0011]    [0011]FIG. 2 illustrates the comparison of a current palmtop calendar file and a current PC calendar file with the backup calendar file in the backup directory on the PC, and the writing of the results to a reconcile file.  
         [0012]    [0012]FIG. 3 illustrates the copying of the updated information in the reconciled calendar file to the backup calendar file in the backup directory, the PC and the palmtop.  
         [0013]    [0013]FIG. 4 illustrates the final result of the present invention, with the deletion of the reconcile file, leaving the backup calendar file in the backup directory, the PC calendar file and the palmtop calendar file synchronized.  
     
    
     DETAILED DESCRIPTION  
       [0014]    The present invention discloses a method and apparatus for automatically reconciling records in a file on a palmtop with records in a corresponding file on a personal computer. In the following description, for purposes of explanation, specific nomenclature is set forth to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that these specific details are not required to practice the present invention. Furthermore, the present invention is described using one possible embodiment. For example, the present invention is described with reference to calendar files. However, any type of data files can be synchronized using the teachings of the present invention. Thus, the teachings of the present invention can be used to synchronize to-do lists, address lists, phone lists, and any other record oriented database file.  
         [0015]    Referring to FIG. 1, when a user is ready to synchronize information on the two computer systems, palmtop computer  100  is connected to personal computer (PC)  200  with a communication link  10 . The communication link may consist of a serial data line or any other type of data communication line between the palmtop computer  100  and PC  200 . Palmtop computer  100  and PC  200  each contain versions of corresponding files,  101  and  201 . It is possible and likely that corresponding files  101  and  201  have been altered with new, modified, and deleted records since the last synchronization.  
         [0016]    The synchronization process is conceptually illustrated in FIG. 2. The synchronization process is controlled by computer instructions that can be stored on magnetic media on the PC  200 . The present invention uses a backup directory  203  stored on the PC. Backup directory  203  contains a backup file that stores the file state from a previous synchronization of the PC  200  and the palmtop  100 . The backup file is used to reconcile the records in a file on the palmtop computer  100  with the corresponding file in the PC.  
         [0017]    To create an initial backup directory  203 , the palmtop and PC files are merged. For example, if the PC  200  starts with a calendar file and the palmtop  100  does not have a calendar file, then PC calendar file  201  will be copied into a backup calendar file  202  in the backup directory  203 . Backup calendar file  202  in backup directory  203  will be used to create the same records on palmtop  100 , thus synchronizing palmtop calendar file  101  and PC calendar file  201  with backup calendar file  202  in backup directory  203 . If both PC  200  and palmtop  100  start out with calendar files, then the two calendar files will be merged, and exact duplicate records will be filtered out. The resulting merged file will then be used for the palmtop calendar file  101 , PC calendar file  201 , and the backup calendar file  202 .  
         [0018]    [0018]FIG. 2 illustrates the record synchronization process where a PC calendar file  201  and a palmtop calendar file  101  each contain a plurality of records that have been modified. The PC also contains backup calendar file  202  stored in backup directory  203 , comprising a calendar file from the previous synchronization between palmtop computer  100  and PC  200 . The plurality of records in the PC calendar file  201  and the corresponding palmtop calendar file  101  are then each compared to the records in the corresponding backup calendar file  202  in backup directory  203  to determine new, updated or deleted records. In one embodiment, the results of the compare operations are then used to create a single reconcile file  204  that contains all the new records, modified records, and unmodified records. The deleted records are removed. The contents of the reconcile file  204  are then copied to PC file  201 , palmtop file  101 , and backup calendar file  202  in backup directory  203  (FIG. 3). All three calendar files are thus synchronized. Finally reconcile file  204  is then deleted as illustrated in FIG. 4.  
         [0019]    In another embodiment, the intermediate results of the compare operations may be stored in a temporary data structure that contains all the new records, modified records, and unmodified records. The deleted records are removed. The contents of the data structure are then copied to PC file  201 , palmtop file  101 , and backup calendar file  202  in backup directory  203  (FIG. 3). All three calendar files are thus synchronized. The temporary data structure is no longer used.  
         [0020]    To fully describe what occurs during the comparison process, Table 1 lists all the possible cases and what occurs during the record synchronization process, according to one embodiment.  
                       TABLE 1                       CONDITION   RESULT   METHOD                   Record was added to a   Record is copied into   Record was not found in       file.   reconcile file.   backup file or other file.       Record was added   Record is copied into   Record was not found in       into both files and   reconcile file.   backup file but matched exactly       with exactly the same contents.       a record in the other file.       Record was deleted   Neither record is   Record was found in one file       from one file but still   copied into the   and the backup file but not the       exists in the other.   reconcile file.   other file.       Record was deleted   Copy changed record   The record that was deleted is       from one file but the   into the reconcile   gone in both files so it cannot       same record in other   file.   be copied. The changed record       file has been changed.       acts like a new record since it               does not exist in the backup file.       Record was deleted   Neither record is   The record that was deleted is       from both files.   copied into reconcile   gone from both files so it           file.   should not be copied.       Record was modified   Copy changed record   Changed record is not found       in one file.   into the reconcile   in backup file making it appear           file.   as a new record. The original               record in the other file               matches a record in the backup               but not in the original file               making it a deleted record.       Same record was   Record is copied into   Both records are new but since       changed in both files   the reconcile file.   they match exactly only one       exactly the same way.       record is created in the               reconcile file for them.       Same record was   Both records are   Both records appear as new       changed in both files,   copied into the   records since neither match       but not in the exact same way.   reconcile file.   any records in the backup file.                  
 
         [0021]    The first column of Table 1 lists the possible conditions of the records in the files to be reconciled. The second column of Table 1 describes how each type of record condition is handled during the reconciliation process. The third column explains how each condition is recognized by the present invention.  
         [0022]    For example, in one embodiment, if a record is added into the calendar file on the palmtop  100  and a different record is added into the corresponding calendar file on the PC  200 , then the synchronization system of the present invention will copy both records into the reconcile file. The reconcile file will later be copied back into the backup calendar file in the backup directory, the palmtop calendar file and the PC calendar file, synchronizing the records in the three calendar files. Similarly, if the same record is changed in one way in the palmtop calendar file and changed a different way in the PC calendar file, then both changed records will be copied into the reconcile file. Given that neither altered record will match any records in the backup file, both records will then appear as new records in the backup calendar file in the backup directory, the palmtop calendar file and the PC calendar file.  
         [0023]    In the preferred embodiment of the present invention, key contents of a record are identified. Key contents consist of an index field or a group of fields that can be used for record compares. Matching key contents indicate that this is the same record. The preferred embodiment uses these key contents to reduce the time to find matching records and perform the compare.  
         [0024]    The embodiment of the present invention as described above assumes that the palmtop files and the PC files have records with identical field order and field names. However, this is not necessary to practice the synchronization method of the present invention. In cases where file formats are non-identical, prior art methods exist to perform translations or conversions of file formats, thus allowing the present invention to function after the non-identical file formats are in a format where records can be compared. This flexibility in file formats is an important feature of the present invention because it allows information to be synchronized between palmtop and PC applications that use different file systems and file formats.  
         [0025]    Although the present invention has been described in terms of specific exemplary embodiments, it will be appreciated that various modifications and alterations might be made by those skilled in the art without departing from the spirit and scope of the invention as set forth in the following claims.