FIELD OF THE INVENTION
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
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 ofpalmtops 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.
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. Theseprograms 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.
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 moreflags 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, donot 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.
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 amethod 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 databasehas 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 betweentheir palmtops and their PCs.
SUMMARY OF THE INVENTION
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 fie present invention to present a method that reconciles twochangeable 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 thepalmtop and PC files with the records in a backup file in a backup directory from the previous synchronization.
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 directoryto 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 todetermine 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 fileshave 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 filesare identical after the synchronization. The reconcile file is then deleted.
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
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.
FIG. 1 illustrates a palmtop connected to a PC containing a backup file from the previous palmtop-PC synchronization.
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.
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.
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.
DETAILEDDESCRIPTION
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, specificnomenclature 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 presentinvention 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, theteachings of the present invention can be used to synchronize to-do lists, address lists, phone lists, and any other record oriented database file.
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 dataline 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 201have been altered with new, modified, and deleted records since the last synchronization.
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 storedon 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 thecorresponding file in the PC.
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 backupcalendar 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 202in 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 calendarfile 101, PC calendar file 201, and the backup calendar file 202.
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 backupdirectory 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 therecords 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 allthe 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). Allthree calendar files are thus synchronized. Finally reconcile file 204 is then deleted as illustrated in FIG. 4.
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 ofthe 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.
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.
______________________________________ CONDITIQN 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 with exactly the same exactly a record in contents. the other file. Record was deleted Neither record is Record was found in one from onefile but still copied into the file and the backup file exists in the other. reconcile file. but not the other file. Record was deleted Copy changed record The record that was from one file but the into the reconcile deleted is gone in both same record in other file. files so it cannot be file has been changed. copied. The changed record acts like a new record since it does not exist in the backup file. Record was deleted Neither record is The record that was from both files. copied into reconcile deleted is gone from file. both files so it should not be copied. Record was modified Copy changed record Changed record is not in one file. into the reconcile found in backup file file. making it appear 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 changed in both files the reconcile file. but since theymatch exactly the same way. exactly only one record is created in the reconcile file for them. Same record was Both records are Both records appear as changed in both files, copied into the new records since but not in the exact reconcilefile. neither match any same way. records in the backup file. ______________________________________
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 columnexplains how each condition is recognized by the present invention.
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 copyboth 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 anyrecords 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.
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 thesame record. The preferred embodiment uses these key contents to reduce the time to find matching records and perform the compare.
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 thepresent 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 whererecords 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.
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 scopeof the invention as set forth in the following claims.
* * * * *