|Publication number||US6742018 B1|
|Application number||US 09/477,981|
|Publication date||May 25, 2004|
|Filing date||Jan 5, 2000|
|Priority date||Jan 8, 1999|
|Also published as||CN1260546A, CN100334582C|
|Publication number||09477981, 477981, US 6742018 B1, US 6742018B1, US-B1-6742018, US6742018 B1, US6742018B1|
|Inventors||Song Song, Leo Y. Liu, Hong Cai|
|Original Assignee||International Business Machines Corporation|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (7), Non-Patent Citations (4), Referenced by (16), Classifications (11), Legal Events (7)|
|External Links: USPTO, USPTO Assignment, Espacenet|
The present invention relates to a method of storing and retrieving data from handheld devices, and in particular to a method of storing and retrieving data from handheld devices by key word.
There are various kinds of handheld devices, from low-end electronic notebooks and cellular phones to high-end palm and handheld computers. PalmPilot by 3COM, as an example of a handheld device, has more than 63% of the worldwide market share of handheld devices. Today, there are more than 10,000 developers on the PalmPilot platform and over 2000 third party manufacturers developing various applications including communications, games, etc.
Although there are many kinds of handheld devices, they have one thing in common, they are small to keep them lightweight. So, the hardware resources for handheld devices are very limited.
Compared with a desktop system, handheld devices have no large capacity storage, such as a magnetic disc. Additionally, there is usually only an internal memory module which is usually less than one megabyte (MB). Although the memory can be expanded using a PCMCIA card, it usually will still only be several more MB, not nearly comparable with magnetic and optical discs, which are widely used in desktop systems.
Due to a requirement for low power consumption, the computing speed of handheld devices is also very limited, and is not nearly comparable with the speed of desktop systems.
Because of the limited memory space on handheld devices, how to store data to save more memory is always a problem worth discussion. Also, because of the limited computing speed on handheld devices, how to rapidly search data stored in them is another problem worth discussion.
The operating system used on handheld devices has to be considered to solve the above problems. There are various operating systems for resource limited handheld devices. Some of them are Palm OS by 3COM, Windows CE by Microsoft, Newton Intelligence by Apple, GEOS by Geoworks, Magic Cap by Magic, PenPoint by Co, etc. The present invention uses Palm OS based handheld devices as an example to discuss and solve the above problems.
WorkPad by IBM and PalmPilot by 3COM are typical products based on Palm OS. Currently, WorkPad has only 1 to 2 MB of memory and the computing speed is limited by its 16 MHZ Motorola 68000 series processor.
In WorkPad, the memory space is divided into ROM and RAM, which are on the same memory module. The capacity of ROM is 0.5 to 1.5 MB. The capacity of RAM is 1 MB minimum. Palm OS main applications are preloaded into ROM. Other applications or substitute applications and system extensions can be loaded into RAM. However, this is not always possible due to the limitation of the RAM capacity. Applications can be upgraded by replacing the ROM. Whole system and applications can be upgraded by installing a new memory module.
Palm OS is designed as a 32 bit system, the address is 32 bits, supports 4 GB address space to store code and data, and works efficiently with little RAM. Palm OS divides the RAM into two virtual parts, dynamic RAM and storage RAM. Dynamic RAM is 32 KB, used as the working space of Palm OS for stack, global variable, and temporary memory. Dynamic RAM is similar to the internal RAM in a desktop system. The other RAM is storage RAM, used to store user data such as is found in Appointments, Todo Lists, MemoPad, and an Address Book. The user data can be WorkPad applications developed by third party developers. The storage RAM is similar to disc storage in a normal desktop system. The memory is powered all the time, even when the handheld device is “turned off” (in low power sleeping mode), and the data in the two RAM areas is preserved. All the memory is protected when the handheld device is reset, but the dynamic RAM may be re-initialized as a part of a booting procedure.
Because the Palm OS device has a limited amount of dynamic memory available and uses nonvolatile RAM instead of disk storage, a traditional file system is not optimal for storing and retrieving user data such as meetings or address book entries.
Traditional file systems work by first reading all or a portion of a file into a memory buffer from disk, using or updating the information in the memory buffer, and then writing the updated information back to disk. Because of the high latency involved in reading or writing to disk, it is not practical to use small memory buffers, and, typically, many kilobytes of data are read from or written to disk at a time.
On the Palm OS device, it makes more sense to access and update data directly in place, because all nonvolatile information on the Palm OS device is stored in memory. This eliminates the extra overhead involved in a file system of transferring the data to and from another memory buffer and also reduces the dynamic memory requirements.
Current database techniques cannot be used on Palm OS based handheld devices without using the file system. For example, in current database techniques, an index file is set up for a keyword and the database is searched using the keyword as an index. But on Palm OS based handheld devices, the records have to be compared with a keyword one by one using a pre-written program. Writing such a program is not only complicated and time consuming, but the searching speed is also very slow due to the large amount of string comparison computing that is necessary.
The problem solved by the present invention is how to efficiently store and rapidly search data in the limited storage space of Palm OS based handheld devices.
The first object of the present invention is to provide a method of storing data in a Palm OS based handheld device.
The second object of the present invention is to provide a method of retrieving data by keyword from a Palm OS based handheld device.
The third object of the present invention is to provide an apparatus for storing data in a Palm OS based handheld device.
The forth object of the present invention is to provide an apparatus for retrieving data by keyword from a Palm OS based handheld devices.
In order to achieve the first object, the present invention provides a method of storing data into a Palm OS based handheld device, the data including at least one record, each one of the records containing a keyword used for identifying the record, the method characterized by the step of:
storing each record as a resource into a resource database in the handheld device, wherein the keyword contained in each record is converted into a long integer, then divided into two parts, and the two parts are stored respectively as a resource type and a resource ID into a resource information entry included in a header of the resource database, which corresponds to the record.
In order to achieve the second object, the present invention provides a method of retrieving data with a keyword from a Palm OS based hand-held device where the data has been stored by using the method of the present invention, characterized by the steps of:
converting the keyword into a long integer;
dividing the long integer into two parts, respectively, as a resource type and a resource ID, and retrieving a resource which uniquely corresponds to the resource type and the resource ID from a respective resource database by using Palm OS; and
obtaining all data in the resource, as retrieved data.
In order to achieve the third object, the present invention provides an apparatus for storing data into a Palm OS based handheld device, the data including at least one record, each one of the records containing a keyword used for identifying the record, the apparatus comprising:
means for converting the keyword contained in the record from a string into a long integer;
means for dividing the long integer into two parts, respectively, as a resource type and a resource ID;
means for forming a new resource by combining the resource type, the resource ID and contents of the record; and
means for adding the new resource into a resource database in the handheld device in order to update the database.
In order to achieve the fourth object, the present invention provides an apparatus for retrieving data with a keyword from a Palm OS based handheld device where the data has been stored by using the apparatus of the present invention, characterized by comprising:
means for converting the keyword from a string into a long integer;
means for dividing the long integer into two parts, respectively, as a resource type and a resource ID; and
means for retrieving a resource which uniquely corresponds to the resource type and the resource ID from a respective resource database with the Palm OS, and obtaining all data in the resource.
In this invention, when the data containing a keyword is stored, the keyword is converted into a long integer to be used as the resource type and resource ID. Then the functions of the OS itself can be used directly. The space to store the keyword and index can be saved. Furthermore, integer operations are much faster than string operations. Compared with the normal searching method by keywords, the searching method in this invention is much faster.
For more general use, string data can be converted into an integer before it is stored to save storage space. If n is the number of the kinds of characters in the string data to be stored, this invention can save the space of (1−log(n)/log(256))×100%. Another advantage is the data being stored has some kind of encryption, which is not easy to read in the normal way.
For a more complete understanding of the present invention and for further advantages thereof, reference is now made to the following Detailed Description taken in conjunction with the accompanying Drawings, in which:
FIG. 1 is a flow chart illustrating a first embodiment of the present invention for storing data on Palm OS based handheld devices;
FIG. 2 is a flow chart illustrating a second embodiment of the present invention for storing data on Palm OS based handheld devices;
FIG. 3 is a flow chart for illustrating a search of data according to the present invention by a keyword on Palm OS based handheld devices;
FIG. 4 is a block diagram illustrating an apparatus for storing data on Palm OS based handheld devices according to the present invention; and
FIG. 5 is a block diagram of an apparatus for retrieving data by a keyword on Palm OS based handheld devices according to the present invention.
To understand the methods and devices in this invention better, the data storage and management in a Palm Os environment is introduced first. In the Palm OS environment, all data is stored in memory as chunks. Palm OS provides a set of resource management programs, which can be used to get and store data conveniently. Each data block has a local ID which is a card-relative reference to a data chunk and remains valid no matter which slot on the handheld device the card is in. Once the base address of the card is determined at runtime, a local ID can be quickly converted to a real pointer or handle.
Each chunk can be tagged with a unique resource type and a unique resource ID. These tagged data chunks, called resources, are stored in resource databases. Resources are typically used to store the application's user interface elements, such as images, fonts, or dialog layouts. In the Palm OS environment, an application is, in fact, simply a resource database with the executable code stored as one or more code resources with the graphics elements and other miscellaneous data stored in the same database as other resource types.
For any resource, the resource type and the resource ID are saved in a header of the resource database. The resource data is saved in the memory chunks. The resource database header includes some general database information followed by a resource table. The resource table includes some resource information table items. Every resource information item in the table is 10 bytes long including the resource type (4 bytes), resource ID (2 bytes) and a local ID of memory chunks which save the resource data.
Because the resource type and the resource ID of a particular resource are unique, any resource can be located by its resource type and resource ID. There are several APIs in Palm OS that can be used to manage the resource database. One of the APIs is DmGetResource. Given the resource type and the resource ID as input parameters, it can return a pointer that points to the specified resource data. As a result of this feature, it was discovered that when storing some data that can be identified by keywords in memory, the keyword can be split into two parts: resource type and resource ID, respectively, and store them in the header of the resource database. At the same time the related data can be stored in the same resource database as a resource. By doing so, the speed of access to the data can be greatly improved using the embedded feature of quick accessing resource data in Palm OS.
However, this brings about a problem of uniqueness if the keyword is simply split into two part as resource type and resource ID. Because in this way, the keyword that can be represented (only 6 bytes) will be very limited. It's apt to be confused with the system resource types like “CODE” and “ADDR” etc. So some kind of transformation is needed to transform the keywords into a 4 byte part and a 2 byte part. The transformation should ensure that the value of the combination of these two parts is unique.
In typical prior art storing methods each character is stored as 8 bits of ASCII code. For example, in the case of storing alphanumeric characters, up to 30 percent of space can be saved if only 5-6 bits is used. However, this kind of transformation may increase the computation of Palm OS.
In the present invention, a compromise method is used: the character data will be transformed into an integer in the radix of N where N is the kind of character used in the character set.
For better understanding, the following example is provided for a character set that only includes 26 alphabetic characters and a space character, and thus, N equals 27. In the first step, each character will be transformed into the corresponding integer in table A and the space transformed into 0:
In the second step, each integer will be multiplied by the corresponding exponential of 27. The order of the exponential relates to the position of the characters in the string. In the third step, all the multiplication will be summed and an integer in the radix of 27 will be obtained.
To summarize the above transformation:
Suppose a keyword is “accelerate”. First transform the 10 characters into 10 integers (refer to table 1):
Then multiple each of these integers with the exponential of 27 with an order decided by the position in the keyword from left to right (0 to 9). So there are 10 multiplications:
Finally, sum up all the 10 multiplications and get an integer in the radix of 27: 43,794,090,299,071. The integer is a long integer. In handheld devices, it can be stored in only 6 bytes. However, when using the normal method “accelerate” must be stored using 10 bytes. Thus, up to 4 bytes can be saved.
Extending the above idea to more general conditions, a keyword B can be represented with an integer m in the radix of N through the following equations:
L is the length of keyword B,
N is the number of components in the transformation table A,
bi is the ASCII value of the I th character in keyword B,
a(bi) is the corresponding transformed value in transform table A.
The value of s(I) relates to the coding sequence of the character in the keyword, for example:
(1) Coding from left to right, s(1), . . . , s(L) will take the value of 1, . . . , L;
(2) Coding from right to left, s(1), . . . , s(L) will take the value of L, . . . , 1;
(3) First coding the characters at the odd position and then coding the characters in the even position, then s (1), . . . , s(L) will take the value of 1,1+L/2,2,2+L/2, . . . , L/2, L.
The above mentioned three coding methods are only examples to help understand the algorithm used in the present invention. In a real environment, any one of the above three methods or any other methods (other coding sequence) can be used.
For keyword “accelerate”, L=10, b(1), . . . , b(L) correspond to a,c,c,e,l,e,r,a,t,e. s(1), . . . , s(10) corresponding to the above three methods are:
(1) 1,2, . . . , 10
(2) 10,9, . . . , 1
(3) 1,6,2,7, . . . , 5,10
When we the English words are transformed, take the order from right (end) to left (begin) and select the 10 characters as keyword B. Then the keyword will be different for different English words even if the length of the word exceeds 10 characters. So each word can be uniquely identified.
Following the above transformation method, the invention of storing data in Palm OS devices can be easily implemented. Here the data includes at least one record, and each record has a unique keyword that can be used to identify itself. The storing method comprises the following steps:
Store each record into one resource database of a handheld device as a resource; and
Transform the keyword of each record into a long integer, divide the long integer into two parts and use them as resource type and resource ID in one of the items of the header of the resource database, respectively.
In the above method, only the content of each record, excluding the keyword can be stored. Thus, a lot of memory can be saved.
No coding detail is given here, because the program can be easily coded without creative work. For example, a new resource database can be created in the Palm OS based device. Then the records of data are processed sequentially, keywords are transformed into long integers, then into resource type and resource ID. Then, make the contents of the data resource data. After that the resource can be added to the resource database through the APIs provided by Palm OS.
FIG. 1 illustrates a flow chart of a first embodiment implementing the storing method of the present invention. In step 120, it is determined if there is a new data record to be stored in the handheld device. If not, the process ends. If yes, the present invention goes to step 130. In step 130, a keyword will be extracted from the record. In step 140, the keyword will be transformed into a 6 byte long integer. In step 150, the contents of data are filled into a resource record, using the first 4 bytes of the long integer as resource type, using the last 2 bytes of long integer as resource ID and using the data indexed by the keyword as resource data. In step 160, the new resource is added to the resource database. Then the present invention returns to step 120.
The above steps are implemented directly in the Palm devices. In another more convenient way, a resource database template can be constructed using the desktop's develop tools in accordance with the specification of Palm OS resource databases. Then keywords and contents of the data are filled into the resource database with the method described in this invention. At last, through HotSync, this resource database can be transferred into Palm devices.
HotSync is a way of synchronizing the data between a desktop computer and a Palm OS device. The modification in the Palm device can be synchronized in the corresponding component of the desktop and vice versa. The HotSync method is integrated into handheld linkage function with a desktop. A cradle is used to communicate between the handheld device and the desktop PC. Through one-touch HotSync, the backup of handheld data and synchronization between the handheld device and the desktop can be easily implemented.
FIG. 2 illustrates a flowchart of a second embodiment implementing the storing method of the present invention. In step 210, on a desktop a resource database template is constructed based on a format required by Palm OS. In step 220, it is judged whether or not a new record will be added to the handheld device. If not, the process will go to 270, otherwise it will go to 230. In step 230, a keyword is extracted from data. In step 240, a keyword is transformed into a 6 byte long integer. In step 250, the contents of data are
VoidHand DmGetResource (ULong type, Int ID)
Here “type” refers to resource type and “ID” refers to resource ID. A pointer to the resource data will be returned if successful.
FIG. 3 shows the kernel flow chart of retrieving data from a Palm OS device. In step 330, a keyword is obtained. In step 340, the keyword will be converted into a 6 byte integer. In step 350, the first four bytes of this integer is assigned to the resource type and the last two bytes will be assigned to the resource ID. In step 380, by using a Palm OS API a resource pointer corresponding to the resource type and the resource ID is obtained. In step 390 a pointer to the memory block with resource data is returned, if not empty.
The above mentioned data storage and retrieval method can be widely used. It can be used any place where a keyword is used to index the stored items, e.g. in various dictionaries, in address books, in expense books, etc. The method can also be used in automatic spell checking and modification.
FIG. 4 shows the apparatus for storing data on a Palm OS based handheld device according to this invention. The apparatus includes a character to integer converter 401, a resource assembler 402 and a resource database update device 403. Reference numeral 404 denotes a resource database in a Palm OS device. In operation, character to integer converter 401 converts a keyword into a long integer and outputs the long integer to resource assembler 402. Then the long integer is divided by the resource assembler 402 into two parts as filled into a resource record, using the first 4 bytes of the long integer as resource type and the last 2 bytes of long integer as resource ID and using the data that indexed by the keyword as resource data. In step 260, the new resource is added to the resource database. Then the present invention will go back to step 220. In step 270, the database will be transferred into a Palm device through HotSync (or other ways).
The present invention also provides a data retrieval method that corresponds with the data storage method mentioned above. This is a method that retrieves data from Palm OS devices using keywords. The data is stored in a handheld device using the storage method of this invention.
The retrieval method comprises the following steps:
converting the keywords into a long integer;
dividing the integer into two parts and using them as resource type and resource ID, respectively; and
getting the resource from a resource database that uniquely corresponds to the resource type and resource ID combination in the database.
For example, a keyword can be converted into an integer and split into two parts, giving the values to resource type and resource ID. Then the corresponding resource can be obtained from a database using the following API:
a resource type and a resource ID, respectively, and assembled into a new resource with the contents of the record. Finally, the resource update device 403 uses the system API to add the new resource into resource database 404.
FIG. 5 shows the apparatus for retrieving data from a Palm OS handheld device. It includes a character to integer converter 501 and a resource database retrieval device 502. Numeral 404 denotes a resource database in a handheld device, as previously shown in FIG. 4. In operation, the character to integer converter 501 converts an input keyword into a long integer, and then inputs the long integer into the database retrieval device 502. The long integer is divided by the database retrieval device 502 into a resource type and a resource ID, and finally a unique resource block is fetched from the resource database 404 using the resource type and resource ID combination.
While the preferred embodiments of the present invention have been described in detail with reference to the drawings, various amendments and changes can be made by persons skilled in the art, without departing from the scope and spirit of the present invention. Thus, the scope of the present invention is limited only by the appended claims.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US5168565 *||Jan 13, 1989||Dec 1, 1992||Ricoh Company, Ltd.||Document retrieval system|
|US5704060 *||May 22, 1995||Dec 30, 1997||Del Monte; Michael G.||Text storage and retrieval system and method|
|US6101537 *||Jun 8, 1998||Aug 8, 2000||Edelstein; Matthew||Universal electronic resource denotation, request and delivery system|
|US6119101 *||Jan 17, 1997||Sep 12, 2000||Personal Agents, Inc.||Intelligent agents for electronic commerce|
|US6430618 *||Mar 13, 1998||Aug 6, 2002||Massachusetts Institute Of Technology||Method and apparatus for distributing requests among a plurality of resources|
|US6457060 *||Apr 30, 1998||Sep 24, 2002||Openwave Systems Inc.||Method and apparatus for flexibly linking to remotely located content on a network server through use of aliases|
|JPH1063675A *||Title not available|
|1||Masaaki Takahashi, "Inside Macintosh", Nikkei Mac, Kikkei BP, May 17, 1994, Vol. 14, pp. 212-219. Tomohiko Uematsu et al, "Comprehension of Reversible Compression Algorithm for Program and Text Data", INTERFACE, Aug. 1, 1992, vol. 183, p. 88-123.|
|2||Toshiyuki Masui, "Program Development of Personal Digital Assistance Pilot", UNIX Magazine, ASCII, Dec. 1, 1997, vol. 12, pp. 109-114. Mizuo Nishibayashi , "Macintosh", Kyoritsu Shuppan, 1998, 1<st >Edition, pp. 30-43.|
|3||Toshiyuki Masui, "Program Development of Personal Digital Assistance Pilot", UNIX Magazine, ASCII, Dec. 1, 1997, vol. 12, pp. 109-114. Mizuo Nishibayashi , "Macintosh", Kyoritsu Shuppan, 1998, 1st Edition, pp. 30-43.|
|4||*||Wayner, Peter, "Finding Text Fast," Sep. 1993, Byte, p. 128-129.*|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US7167905 *||Jan 31, 2003||Jan 23, 2007||Sierra Wireless, Inc.||Token-based Web browsing with visual feedback of disclosure|
|US7249158 *||Jan 27, 2003||Jul 24, 2007||Canon Kabushiki Kaisha||Address information editing apparatus and method, program, and storage medium|
|US7310662||Aug 15, 2006||Dec 18, 2007||Sierra Wireless, Inc.||Token-based web browsing with visual feedback of disclosure|
|US7894986 *||Aug 7, 2003||Feb 22, 2011||Navteq North America, Llc||Method and system for forming a keyword database for referencing physical locations|
|US8032612||Nov 21, 2007||Oct 4, 2011||Sierra Wireless, Inc.||Token-based web browsing with visual feedback of disclosure|
|US8543617||Aug 5, 2008||Sep 24, 2013||Navteq B.V.||Method and system for forming a keyword database for referencing physical locations|
|US20020181060 *||Aug 1, 2001||Dec 5, 2002||Chiang-Lung Huang||Beamcast (continuous infrared data beaming system)|
|US20030236868 *||Jan 27, 2003||Dec 25, 2003||Yoshiko Naitou||Address information editing apparatus and method, program, and storage medium|
|US20040030490 *||Aug 7, 2003||Feb 12, 2004||Ildiko Hegedus||Method and system for forming a keyword database for referencing physical locations|
|US20040153527 *||Jan 31, 2003||Aug 5, 2004||Sierra Wireless, Inc., A Canadian Corporation||Token-based Web browsing with visual feedback of disclosure|
|US20050125482 *||Dec 5, 2003||Jun 9, 2005||Lyles Lawrence E.||Telecommunications assignment system|
|US20080140959 *||Feb 15, 2008||Jun 12, 2008||Oqo, Inc.||One-touch backup system|
|US20080288545 *||Aug 5, 2008||Nov 20, 2008||Navteq North America, Llc||Method and System for Forming a Keyword Database for Referencing Physical Locations|
|US20100004851 *||Jun 18, 2009||Jan 7, 2010||Aisin Aw Co., Ltd.||Navigation devices, methods, and programs|
|EP2479663A1 *||Jun 4, 2010||Jul 25, 2012||ZTE Corporation||Resource management method and system|
|EP2479663A4 *||Jun 4, 2010||Aug 7, 2013||Zte Corp||Resource management method and system|
|U.S. Classification||709/212, 707/999.003, 707/999.101|
|International Classification||G06F5/00, G06F12/00, G06F17/30, G06F15/16|
|Cooperative Classification||Y10S707/99942, Y10S707/99933, G06F17/30321|
|Jan 5, 2000||AS||Assignment|
Owner name: IBM CORPORATION, NEW YORK
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:SONG, SONG;LIU, LEO Y.;CAL, HONG;REEL/FRAME:010488/0743;SIGNING DATES FROM 19991213 TO 19991214
|Sep 19, 2007||FPAY||Fee payment|
Year of fee payment: 4
|Sep 13, 2011||AS||Assignment|
Owner name: GOOGLE INC., CALIFORNIA
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:INTERNATIONAL BUSINESS MACHINES CORPORATION;REEL/FRAME:026894/0001
Effective date: 20110817
|Sep 23, 2011||FPAY||Fee payment|
Year of fee payment: 8
|Dec 31, 2015||REMI||Maintenance fee reminder mailed|
|May 25, 2016||LAPS||Lapse for failure to pay maintenance fees|
|Jul 12, 2016||FP||Expired due to failure to pay maintenance fee|
Effective date: 20160525