Data registration method and apparatus

A data registration apparatus sets first data compression and second data compression, acquires the limit of the data amount of data to be registered in a database, and inputs data to be registered in the database. The data registration apparatus performs the first data compression and the second data compression for the inputted data. When the data amount of data compressed on the basis of the first data compression exceeds the acquired limit, the data registration apparatus registers data compressed on the basis of the second data compression in the database.

This application claims the benefit of Japanese Patent Application No. 2006-212243, filed Aug. 3, 2006, which is hereby incorporated by reference herein in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a data registration method and apparatus.

2. Description of the Related Art

A technique of registering data in a database has been generally known in services using a database on a network, like a CRM (Customer Relationship Management) system provided by the ASP (Application Service Provider) method.

When registering data in a network database, a technique of reducing the data amount is also generally known as a technique of reducing the data transfer traffic amount on a network in data transfer (US Patent Publication No. 2006/044601).

According to the conventional techniques, if the database limits the data format or the maximum size registrable in the database, the user must know the limitation when registering form data in the database via a network. As a result, the user must make and register settings under the limitation.

SUMMARY OF THE INVENTION

It is an object of the present invention to more easily register data in a database.

According to one aspect of the present invention, a data registration method comprises the steps of: setting first data compression and second data compression; acquiring a limit of a data amount of data to be registered in a database; inputting data to be registered in the database; performing the first data compression for the inputted data; performing the second data compression for the inputted data; and registering data compressed on the basis of the second data compression in the database, when a data amount of data compressed on the basis of the first data compression exceeds the acquired limit.

According to another aspect of the present invention, a data registration apparatus comprises: a setting unit adapted to set first data compression and second data compression; an acquisition unit adapted to acquire a limit of a data amount of data to be registered in a database; an input unit adapted to input data to be registered in the database; a compression unit adapted to perform the first data compression and the second data compression for the inputted data; and a registration unit adapted to register data compressed on the basis of the second data compression in the database, when a data amount of data compressed on the basis of the first data compression exceeds the acquired limit.

According to one another aspect of the present invention, a storage medium stores a computer program for data registration, the computer program comprising a program instructing the computer to perform a method comprising the steps of: setting first data compression and second data compression; acquiring a limit of a data amount of data to be registered in a database; inputting data to be registered in the database; performing the first data compression for the inputted data; performing the second data compression for the inputted data; and registering data compressed on the basis of the second data compression in the database, when a data amount of data compressed on the basis of the first data compression exceeds the acquired limit.

DESCRIPTION OF THE EMBODIMENTS

First Embodiment

FIG. 1is a block diagram showing the functional arrangement of a system according to the first embodiment. As shown inFIG. 1, the system according to the first embodiment comprises a multifunctional peripheral (MFP)100, database111, and database capability storage unit110. The multifunctional peripheral100, database111, and database capability storage unit110are connected to a network120such as a LAN or the Internet, and can communicate data with each other via the network120.

The multifunctional peripheral100will be described. The multifunctional peripheral100includes constituent elements101to108as functions. InFIG. 1, the data structure definition information acquisition unit101acquires data structure definition information (to be described later). The data structure definition information will be explained in detail with reference toFIG. 3.

The database capability acquisition unit102acquires device capability information representing the capability of the database111from the database capability storage unit110. This device capability information will also be described later.

The data processing apparatus capability acquisition unit103acquires device capability information representing the capability of the multifunctional peripheral100. This device capability information will also be described later.

The data compression method priority definition unit104defines priority levels for respective types of compression methods applicable as a compression method for data to be registered in the database111.

The data compression method selection unit105selects one of compression methods used for data to be registered in the database111.

The data reading unit106acquires (in this case, acquires by reading) data to be registered in the database111.

The data compression unit107compresses data to be registered in the database111by using a compression method selected by the data compression method selection unit105.

The data registration unit108transmits (registers) compressed data as a result of compression by the data compression unit107to the database111via the network120.

The database111will be described. The database111is a device serving as a data registration destination. The database111may be the hard disk of an apparatus such as a server apparatus, or the hard disk of the multifunctional peripheral100.

The database capability storage unit110will be explained. As described above, the database capability storage unit110holds device capability information representing the capability of the database111. The database capability storage unit110may be the hard disk of an apparatus such as a server apparatus, or the hard disk of the multifunctional peripheral100.

InFIG. 1, the multifunctional peripheral100, database111, and database capability storage unit110are separate devices, but two or more of them may be housed in a single apparatus.

FIG. 2is a block diagram showing the hardware configuration of the multifunctional peripheral100.

A CPU201controls the overall multifunctional peripheral100using programs and data stored in a ROM202, RAM203, and flash ROM206. In addition, the CPU201executes processes to be described later as those performed by the multifunctional peripheral100.

The ROM202stores programs and data which cause the CPU201to execute processes to be described later as those performed by the multifunctional peripheral100. The ROM202also stores a startup program, setting data, and the like for the multifunctional peripheral100. The CPU201implements the constituent elements101to108inFIG. 1by executing programs stored in the ROM202.

The RAM203has an area for temporarily storing programs and data read out from the ROM202and flash ROM206, data externally received via a network I/F207, and the like. The RAM203also has an area for temporarily storing programs and data loaded from a hard disk208. Further, the RAM203has even a work area used when the CPU201executes various processes. That is, the RAM203can provide various areas, as needed.

A display device204is formed from, e.g., a touch panel type liquid crystal display. When the operator of the multifunctional peripheral100designates a desired position on the display screen of the display device204, the CPU201executes a function corresponding to a button image displayed at the designated position.

An input device205is made up of physical buttons. The operator of the multifunctional peripheral100can operate the input device205to input various instructions to the CPU201.

The flash ROM206stores various setting data files and the like.

The network I/F207connects the multifunctional peripheral100to the network120. The multifunctional peripheral100can communicate data with the database111and database capability storage unit110via the network I/F207.

The hard disk208saves data such as data externally received via the network I/F207, data structure definition information (to be described later), and device capability information representing the capability of the multifunctional peripheral100.

A printer209prints on a print medium such as paper on the basis of acquired data to be printed by the multifunctional peripheral100.

A scanner210scans, as an image, information printed on a print medium such as paper.

A process executed by the multifunctional peripheral100in the above-described system in order to register data in the database111will be described with reference toFIG. 5showing the flowchart of this process. The ROM202stores programs and data which cause the CPU201to execute the process according to the flowchart ofFIG. 5. The programs and data are loaded into the RAM203under the control of the CPU201, as needed. The CPU201executes the process using the loaded programs and data, and the multifunctional peripheral100executes the following process.

When the operator of the multifunctional peripheral100turns on the multifunctional peripheral100, the CPU201activates the respective units of the multifunctional peripheral100in step S501.

In step S502, the CPU201collects capabilities of the multifunctional peripheral100for a plurality of matters defined in advance as priority matters used when compressing data to be registered in the database111. In the first embodiment, capabilities to be collected are outputtable file formats, possible color settings, and settable resolutions of the multifunctional peripheral100.

Capabilities collected for the output file format are registered in a field401of data compression definition information400shown inFIG. 4A. The data compression definition information400is registered in the RAM203or hard disk208.FIG. 4Bis a view showing the field401in detail. InFIG. 4B, this field is denoted as field410and comprises “PDF standard” and “PDF high compression”, which are registered. In this case, the matter “output file format” includes two sub-matters “PDF standard” and “PDF high compression”. The priority order of “PDF standard” is higher than that of “PDF high compression”. The priority order may be set by the user or set in advance.

Capabilities collected for the color setting are registered in a field402of the data compression definition information400.FIG. 4Cis a view showing the field402in detail. InFIG. 4C, this field is denoted as field420and comprises “color” and “monochrome”, which are registered. In this case, the matter “color setting” includes two sub-matters “color” and “monochrome”. The priority order of “color” is higher than that of “monochrome”. The priority order may be set by the user or set in advance.

Capabilities collected for the resolution are registered in a field403of the data compression definition information400.FIG. 4Dis a view showing the field403in detail. InFIG. 4D, this field is denoted as field430and comprises “600 dpi”, “400 dpi”, “300 dpi”, “200 dpi”, and “100 dpi”, which are registered. In this case, the matter “resolution” includes five sub-matters “600 dpi”, “400 dpi”, “300 dpi”, “200 dpi”, and “100 dpi”. The priority order of each sub-matter is highest for “600 dpi”, and descends in the order of “400 dpi”, “300 dpi”, “200 dpi”, and “100 dpi”. The priority order may be set by the user or set in advance.

In step S502, capabilities (sub-matters) for the matters “output file format”, “color setting”, and “resolution” are registered in the data compression definition information400.

In step S503, the CPU201controls to display a setting GUI (Graphical User Interface) on the display screen of the display device204. The setting GUI is used to set the reference values of the output file format, the color setting, and the resolution serving as a plurality of types of matters set in advance as priority matters used when compressing data to be registered in the database111.

In setting the reference value of each matter, one of sub-matters of the matter is selected as a reference value. For example, “PDF standard” is selected as the reference value of the output file format, “color” is selected as that of the color setting, and “300 dpi” is selected as that of the resolution.

An operation to actually select the reference value of each matter via the GUI is as follows. For example, when setting the reference value of the output file format, the operator of the multifunctional peripheral100designates a portion displayed as “output file format”. Then, the CPU201displays a menu of the two sub-matters shown inFIG. 4B, and the operator designates either sub-matter. By the series of operations, the designated sub-matter can be set as the reference value of the matter “output file format”. This operation also applies to the remaining matters. However, the operation to set a reference value is not limited to this.

Sub-matters selected for the respective matters are stored in the RAM203or hard disk208.

In step S504, the CPU201loads data structure definition information saved in the hard disk208into the RAM203.FIG. 3is a view showing a structure of the data structure definition information.

As shown inFIG. 3, the data structure definition information has a portion302describing information on a database available as a data registration destination, and a portion304describing information on data to be registered.

The portion302describes the name (inFIG. 3, “database A”) of a database available as a data registration destination, and the address (inFIG. 3, “database.com”) of the database on the network120. When a plurality of databases are available as a data registration destination, the portion302describes a set of the name and address of each database by the number of available databases.

The portion304describes registration of data as a data list “Kaiin” having a “name” element and “card” element. The “name” element is defined by “item type=“inputstring””, which means that a value input from the input device205is to be registered. The “card” element is defined by “item type=“scanImage””, which means that data scanned by the scanner210is to be registered as an image.

A line303describes the use of a compression method corresponding to a sub-matter designated by “colorsetting=“color”” when compressing data to be registered.

This data structure definition information is acquired by the multifunctional peripheral100by any method and saved in the hard disk208before performing the process according to the flowchart ofFIG. 5.

In step S505, the CPU201refers to the portion302in the data structure definition information loaded into the PAM203in step S504. The CPU201extracts all database names described at the portion302, and displays them on the display screen of the display device204. When the portion302describes a plurality of database names, the CPU201extracts all database names, and displays a list of them on the display screen of the display device204.

For example, five database names (databases A, B, C, D, and E) are extracted from the data structure definition information and listed.

The operator of the multifunctional peripheral100selects one of the listed database names. As the selection method, for example, the operator designates with his finger or the like an area where a desired database name is displayed on the display screen of the display device204. In response to this, the CPU201specifies the database name displayed at the designated portion as a designated database name.

In step S506, the CPU201acquires the designated database name. In step S507, the CPU201accesses the designated database using an address which is paired with the designated database name and described at the portion302. In the following description, the accessed database is the database111shown inFIG. 1.

The CPU201acquires, from the database111, device capability information representing the capability of the database111. Upon receiving the device capability information acquisition request from the multifunctional peripheral100, the database111acquires its device capability information from the database capability storage unit110via the network120, and transmits it to the multifunctional peripheral100. The device capability information of the database111contains a maximum data size and file format registrable in the database111.

In step S508, the CPU201checks whether the output file format (sub-matter shown inFIG. 4B) collected in step S502corresponds to file format of data registered in the database111. If the CPU201determines that the collected output file format does not correspond to file format of data registered in the database111, the process ends.

If the CPU201determines that the collected output file format corresponds to file format of data registered in the database111, the process advances to step S509. In step S509, priority levels are set for respective types of matters set in advance as priority matters used when compressing data to be registered in the database111. For this purpose, the CPU201displays a priority setting GUI on the display screen of the display device204. The priority setting GUI is used to set the priority order of a plurality of types of matters set in advance as priority matters used when compressing data to be registered in the database111. As described above, these matters are the output file format, color setting, and resolution. For example, priority is the highest for the output file format, the second highest for the color setting, and the lowest for the resolution.

The operator of the multifunctional peripheral100designates the priority level of a desired matter by moving the desired matter to a desired position while designating the display position of the desired matter.

In step S510, the CPU201controls the scanner210to scan information printed on a print medium as an image in order to acquire data to be registered in the database111. The CPU201saves the scanned image data in the hard disk208. Data to be registered in the database111can be acquired by various methods, so the process in step S510is not limited to this.

In step S511, the CPU201acquires a reference value set in step S503.

The CPU201compresses the image data acquired in step S510by a compression method corresponding to the acquired reference value.

In step S512, the CPU201compares size X of the compressed data as a result of compression with “maximum data size registrable in the database111” Y acquired in step S507. If X≦Y, the process advances to step S515.

In step S515, the CPU201transmits the compressed data to the database111via the network I/F207in order to register the compressed data in the database111.

If X>Y, the process advances to step S513. In step S513, the CPU201selects a sub-matter whose priority is the next highest priority with respect to a currently selected sub-matter in a currently selected matter. If no such sub-matter exists, the CPU201determines whether a matter of the second highest priority exists. If the CPU201determines that a matter of the second highest priority does not exist, the process ends. If the CPU201determines that a matter of the second highest priority exists, the CPU201selects a sub-matter serving as the reference value of the matter of the second highest priority. That is, if a compression method (output file format, color setting, or resolution) of the second highest priority exists, the CPU201selects it, and the process advances to step S514. The CPU201changes the matter in accordance with the priority set in step S509.

In step S514, the CPU201checks whether original data before compression in step S511is held in the RAM203or hard disk208. If the CPU201determines that no original data is held, the process returns to step S510. The CPU201controls the scanner210to obtain image data in order to acquire the original data again. In step S511, the CPU201compresses the image data acquired in step S510by a compression method corresponding to the sub-matter selected in step S513.

If the CPU201determines that original data is held, the process returns to step S511. The CPU201compresses the image data acquired in step S510by a compression method corresponding to the sub-matter selected in step S513.

When “color” is designated for the matter “color setting” as represented by the line303inFIG. 3, the sub-matter selected for the matter “color setting” is fixed to “color”. When a sub-matter is defined in the data structure definition information, it is adopted.

Assume that priority is set in the order of the output file format, color setting, and resolution, the sub-matters of the respective matters have priority levels as shown inFIGS. 4B to 4D, and the reference values of the respective matters are “PDF standard”, “color”, and “300 dpi”

In this case, the CPU201compresses original data (image data) by a compression method corresponding to “PDF standard” in step S511. If the data size obtained as a result of compression exceeds the maximum data size registrable in the database111, the CPU201selects a compression method corresponding to the sub-matter “PDF high compression” of the second highest priority in the matter “output file format”. The CPU201compresses the original data (image data) again using the selected compression method.

If the data size obtained as a result of compression exceeds the maximum data size registrable in the database111, a sub-matter of the third highest priority does not exist in the matter “output file format”. In this case, a matter of the second highest priority is “color setting” Since “color” is designated for the matter “color setting” as represented by the line303inFIG. 3, a sub-matter selected for the matter “color setting” is fixed to “color”.

If the sub-matter selected for the matter “color setting” is not fixed to “color”, the CPU201converts data on the basis of the sub-matter “monochrome” of the second highest priority in the matter “color setting” (or scans data again in the monochrome mode). The CPU201compresses the data by “PDF high compression”.

Then, the CPU201converts the data on the basis of the sub-matter “200 dpi” of the second highest priority in the matter “resolution” of the third highest priority (or scans data again at 200 dpi). The CPU201compresses the data by “PDF high compression”.

If the data size obtained as a result of compression exceeds the maximum data size registrable in the database111, the CPU201converts the data on the basis of the sub-matter “100 dpi” of the third highest priority in the matter “resolution” (or scans data again at 100 dpi). The CPU201compresses the data by “PDF high compression”.

In this way, as long as the size of the compressed data exceeds the maximum data size registrable in the database111, sub-matters are selected in the descending order of priority, the compression method is switched to one corresponding to the selected sub-matter, and compressed data is generated again. Finally, the obtained compressed data has a size registrable in the database111, and a compression method considering the priority set in the multifunctional peripheral100is employed.

As described above, according to the first embodiment, data can be registered in a database at a database-registrable size or smaller. Even if a user who is to register data does not have technical knowledge about the database specifications, a data processing method, and the like, he or she can easily register data in the database.

Second Embodiment

The first embodiment has described a technique of compressing image data scanned by the scanner210and registering it in the database111. The second embodiment will describe a technique of registering, in a database, a result of OCR-processing text information printed on a print medium. The arrangement of a system and those of apparatuses which form the system in the second embodiment are the same as those in the first embodiment.

A process executed by a multifunctional peripheral100according to the second embodiment in order to register text data as an OCR process result in a database111will be described with reference toFIG. 6showing the flowchart of this process. A ROM202stores programs and data which cause a CPU201to execute the process according to the flowchart ofFIG. 6. The programs and data are loaded into a RAM203under the control of the CPU201, as needed. The CPU201executes the process using the loaded programs and data, and the multifunctional peripheral100executes the following process.

When the operator of the multifunctional peripheral100turns on the multifunctional peripheral1001the CPU201activates the respective units of the multifunctional peripheral100in step S1001.

In step S1002, the CPU201collects the capabilities of the multifunctional peripheral100for a plurality of matters defined in advance as priority matters used when compressing data to be registered in the database111. In the second embodiment, the capabilities to be collected are compression methods available in the multifunctional peripheral100as a text data compression method.

Collected compression methods are registered in the RAM203. In this case, compression methods (e.g., three, text compression methods A, B, and C) available in the multifunctional peripheral100are registered as a text data compression method. The priority levels of text compression methods A, B, and C are set to high, middle, and low, respectively. Concrete examples of the text compression methods are a method of compressing successive characters in a text, a method of converting text data into designated character codes, and a method of converting text data into, e.g., EUC codes, Unicodes, JIS codes, or shift JIS codes.

In step S1003, the CPU201causes the display screen of a display device204to display a GUI for setting priority levels for the three compression methods collected in step S1002.

The operator of the multifunctional peripheral100designates the priority level of a desired matter by moving the desired matter to a desired position while designating the display position of the desired matter. For example, priority is set in the order of text compression method A, text compression method B, and text compression method C.

In step S1004, the CPU201loads data structure definition information saved in a hard disk208into the RAM203.FIG. 7is a view showing a structure of the data structure definition information used in the second embodiment. As shown inFIG. 7, the data structure definition information has a portion802describing information on a database available as a data registration destination, and a portion804describing information on data to be registered.

The portion802describes the name (inFIG. 7, “database C”) of a database available as a data registration destination, and the address (inFIG. 7, “databaseC.com”) of the database on a network120. When a plurality of databases are available as a data registration destination, the portion802describes a set of the name and address of each database by the number of available databases.

The portion804describes registration of data as a data list “Book” having a “bunsho” element.

This data structure definition information is acquired by the multifunctional peripheral100by any method and saved in the hard disk208before performing the process according to the flowchart ofFIG. 6.

In step S1005, the CPU201refers to the portion802in the data structure definition information loaded into the RAM203in step S1004. The CPU201extracts all database names described at the portion802, and displays them on the display screen of the display device204. When the portion802describes a plurality of database names, the CPU201extracts all database names, and displays a list of them on the display screen of the display device204. This display is achieved similarly to the first embodiment.

In step S1006, the CPU201acquires a database name designated by the operator from the list. In step S1007, the CPU201accesses the designated database using an address which is paired with the designated database name and described at the portion802. In the following description, the accessed database is the database111shown inFIG. 1.

The CPU201acquires, from the database111, device capability information representing the capability of the database111. Upon receiving the device capability information acquisition request from the multifunctional peripheral100, the database111acquires its device capability information from a database capability storage unit110via the network120, and transmits it to the multifunctional peripheral100. The device capability information of the database111contains a maximum data size and file format registrable in the database111.

In step S1008, the CPU201controls a scanner210to scan information printed on a print medium in order to acquire data to be registered in the database111. The CPU201OCR-processes the scanned text to obtain text data representing the result of recognizing characters. The CPU201saves the text data in the hard disk208. Data to be registered in the database111can be acquired by various methods, so the process in step S1008is not limited to this.

In step S1009, the CPU201selects a compression method of the highest priority by referring to the data compression definition information. The CPU201compresses the text data acquired in step S1008using the selected compression method. Assume that priority is set in the order of compression method A, compression method B, and compression method C. In step S1009, first, the CPU201compresses text data using compression method A.

In step S1010, the CPU201compares size X of the compressed data as a result of compression with “maximum data size registrable in the database111” Y acquired in step S1007. If X≦Y, the process advances to step S1013.

In step S1013, the CPU201transmits the compressed data to the database111via a network I/F207in order to register the compressed data in the database111.

If X>Y, the process advances to step S1011. In step S1011, the CPU201selects a compression method of the second highest priority. Then, the process advances to step S1012. If there is no compression method of the second highest priority, the process ends.

In step S1012, the CPU201checks whether original data before compression in step S1009is held in the RAM203or hard disk208. If the CPU201determines that no original data is held, the process returns to step S1008. The CPU201controls the scanner210to obtain text data in order to acquire the original data again.

If the CPU201determines that original data is held, the process returns to step S1009. The CPU201compresses the text data acquired in step S1008using a compression method selected in step S1011.

Hence, finally obtained compressed data has a size registrable in the database111, and a compression method considering priority set in the multifunctional peripheral100is employed.

Other Embodiments

The object of the present invention is also achieved as follows. More specifically, a recording medium (or storage medium) which records software program codes for implementing the functions of the above-described embodiments is supplied to a system or apparatus. The computer (or the CPU or MPU) of the system or apparatus reads out and executes the program codes stored in the recording medium. In this case, the program codes read out from the recording medium implement the functions of the above-described embodiments, and the recording medium which records the program codes constitutes the present invention.

Also, the present invention includes a case where the computer executes the readout program codes, and an OS (Operating System) or the like running on the computer performs some or all of actual processes on the basis of the instructions of the program codes, thereby implementing the functions of the above-described embodiments.

Furthermore, the present invention includes a case where the program codes read out from the recording medium are written in the memory of a function expansion card inserted into the computer or the memory of a function expansion unit connected to the computer, and the CPU of the function expansion card or function expansion unit performs some or all of actual processes on the basis of the instructions of the program codes, thereby implementing the functions of the above-described embodiments.

When the present invention is applied to the recording medium, program codes corresponding to the above-described flowcharts are stored.