Patent Publication Number: US-6707892-B2

Title: Application terminal

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2000-395291, filed Dec. 26, 2000, the entire contents of which are incorporated herein by reference. 
     BACKGROUND OF THE INVENTION 
     The present invention relates to an application terminal for processing a portable electronic device such as an IC card used for providing various services, also to a processing system using the application terminal for processing the portable electronic device, and to a method for processing the portable electronic device. 
     Currently available application terminals of this type (hereinafter referred to as “IC card terminal devices”) have only a predetermined function, and execute processing only when the IC card inserted therein is suitable for the function. On the other hand, in recent years, IC cards each have come to be provided with a plurality of functions, and therefore to demand an IC card terminal device for each function thereof. 
     To meet this demand, Japanese Patent Application KOKAI Publication No. 9-259239 discloses an IC card terminal device for processing IC cards having a plurality of functions. This device has a plurality of applications and executes selected processing on IC cards corresponding to the applications. 
     Although this IC card terminal device can execute the predetermined plurality of applications, it cannot process an IC card having a function (application) that is not included in them. 
     In light of, for example, the memory capacity, it is difficult to provide an IC card terminal device with all applications. Further, the installation of a large-capacity memory in the terminal device makes it expensive. Accordingly, it is necessary to prepare a plurality of IC card terminal devices each having selected applications. As a result, the owner of an IC card has to find an IC card terminal device that corresponds to their requested application. 
     BRIEF SUMMARY OF THE INVENTION 
     It is the object of the invention to provide a terminal device capable of executing various processes corresponding to different purposes, a system for processing various types of portable electronic devices, and a method for processing the portable electronic devices. 
     In order to achieve the object, according to one aspect of the invention, there is provided a terminal device for processing a portable electronic device having at least one function, comprising: reading means for reading the function from the portable electric device; determination means for determining whether or not the terminal device has an application corresponding to the function read by the reading means; first execution means for executing the application if the determination means determines that the terminal device has the application; download means for downloading the application from an external apparatus connected to the terminal device if the determination means determines that the terminal device does not have the application; and second execution means for executing the application downloaded by the download means. 
     The terminal device of the invention further comprises selection means for selecting a desired one of a plurality of functions when the reading means has read the plurality of functions from the portable electronic device, and wherein the termination means determines whether or not the terminal device has an application corresponding to the desired function selected by the selection means. 
     In other words, if the terminal device does not have an application for executing the function of the IC card inserted therein, it downloads the application from an external apparatus via a telephone line or the Internet, etc. The terminal device processes the function by executing the downloaded application. 
     Further, when the IC card inserted in the terminal device has a plurality of functions, the terminal device displays the functions and the card user selects a desired one of the functions. If the terminal device does not have an application for executing the selected function, it downloads the application from an external apparatus via a telephone line or the Internet, etc. 
     When downloading the application, the terminal device transmits a download request to the external apparatus. Upon receiving the download request, the external apparatus supplies the IC card via the terminal device with a confirmation request that contains information for confirming whether or not the IC card is valid. The IC card, in turn, processes the information contained in the confirmation request, and transmits the process result to the external apparatus via the terminal device. The external apparatus judges the validity of the IC card on the basis of the process result. If the IC card is determined valid, the external apparatus allows the terminal device to download the application. 
     Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter. 
    
    
     BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING 
     The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate presently preferred embodiments of the invention, and together with the general description given above and the detailed description of the preferred embodiments given below, serve to explain the principles of the invention. 
     FIG. 1 is a schematic view illustrating an IC card processing system according to the embodiment of the invention; 
     FIG. 2 is a block diagram illustrating functions of an IC card; 
     FIG. 3 is a schematic block diagram illustrating the structure of the IC card; 
     FIGS. 4A,  4 B and  4 C are views illustrating AID tables stored in the IC card; 
     FIG. 5 is a view showing examples of information pieces related to AID information; 
     FIG. 6 is a schematic block diagram showing the structure of an IC card terminal device; 
     FIG. 7 is a flowchart useful in explaining the operation of the IC card terminal device; 
     FIG. 8 is a flowchart useful in explaining a process of reading AID information; 
     FIG. 9 is a flowchart useful in explaining a process of downloading a function; and 
     FIG. 10 is a flowchart useful in explaining a modification of the operation of the IC card terminal device. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The embodiment of the invention will be described with reference to the accompanying drawings. 
     FIG. 1 schematically shows an IC card processing system, according to the embodiment of the invention, for processing an IC card as a portable electronic device. In FIG. 1, an IC card  1  as a portable electronic device is usually carried by the user. The IC card is used to utilize various services (i.e. used as credit card and a debit card, etc.), and hence has a plurality of functions (applications). Thus, the IC card  1  can function as a credit card, a debit card, a prepaid card, a rental-shop card and a golf-members card, etc. An IC card terminal device  2  for processing the IC card  1  is installed in a place where the users usually use the IC cards  1 . The IC card terminal device  2  can be connected, via a telephone line  3  or the Internet, etc., to a service-providing server (host apparatus)  4   a ,  4   b , . . . for providing a service to the IC card  1 , which is an external apparatus of the IC card terminal device  2 . 
     As shown in the block diagram of FIG. 2, the IC card  1  comprises a section for executing basic functions, which includes a read/write section  7 , a password setting/identifying section  8 , and an encoding/decoding section  9 , and a supervisor section  10  for managing the basic functions. 
     The read/write section  7  executes data reading, writing and erasure on, for example, a data memory. 
     The password setting/identifying section  8  executes storage of a password set by the user and a process of inhibiting the reading of it. This section also has a function of executing password identification after setting the password, thereby determining whether or not a subsequent process should be allowed. 
     The encoding/decoding section  9  has a function of executing encoding for preventing leakage or forgery of data when transmitting the data to an external apparatus via, for example, a communication line, and decoding encoded data. 
     The supervisor section  10  has a function of decoding a function code or a function code with data input from the IC card terminal device  2 , and executing the function code. 
     To realize the above functions, the IC card  1  further comprises, as shown in FIG. 3, a control element (control section)  11  such as a CPU, a data memory (EEPROM)  12 , a program memory (ROM)  13 , a work memory (RAM)  14  and a contact section  15  to be electrically connected to the IC card terminal device  2 . The control element  11 , the data memory  12 , the program memory  13  and the work memory  14  are formed in a single IC chip (or a plurality of IC chips) and buried in the main body of the IC card. 
     The program memory  13  is formed of, for example, a mask ROM, and designed to store, for example, a control program for the control element  11 , which includes sub-routines for realizing the basic functions. 
     The data memory  12  is used to store various types of data, and formed of a non-volatile programmable memory such as the shown EEPROM or a flash EEPROM, etc. For example, the data memory  12  stores an application-identifying-data table (hereinafter referred to simply as an “AID table”) as shown in FIG. 4A,  4 B or  4 C. The AID tables store AID information (function identifying information) indicative of functions included in the IC card  1 . FIG. 4A shows a case where the data memory  12  stores AID information related to a credit function and a debit function. FIG. 4B shows another case where the data memory  12  stores AID information related to only the credit function, and FIG. 4C shows a further case where the data memory  12  stores AID information related to only the debit function. Hereinafter, a description will be given of the case where the data memory  12  of the IC card  1  stores AID information related to both the credit function and the debit function. 
     The data memory  12  also stores information associated with the AID information, as shown in FIG. 5, linking it with the AID information. The information associated with the AID information includes the name of a service provider, a contact name of the service provider (telephone number or an address on the Internet), a communication protocol, a login name, a login password and an application name, etc. 
     The work memory  14  is formed of, for example, a volatile memory such as a RAM. 
     FIG. 6 schematically shows the structure of the IC card terminal device  2 . The IC card terminal device  2  comprises a CPU  21  for controlling the entire device, a ROM  22  storing a control program for the CPU  21 , ID information of installed applications, a RAM  23  for temporarily storing data, a keyboard  24 , a liquid crystal display unit  25 , a contact section  26  to be electrically connected to the IC card  1 , a communication control section  27  enabling communication with a host apparatus  4   a ,  4   b , . . . , as an external apparatus, and a hard disk drive (HDD)  28 . 
     Referring now to the flowchart of FIG. 7, the operation of the IC card terminal device  2  constructed as above will be described. 
     The CPU  21  of the IC card terminal device  2  waits for the insertion of the IC card  1  (step S 1 ). When the user of the card  1  has inserted the IC card  1  into a card slot (not shown) incorporated in the device  2 , the CPU  21  activates the inserted IC card  1 , thereby reads the functions of the IC card  1  (step S 2 -S 4 ). In this case, the CPU  21  reads AID information stored in the AID table of the inserted IC card  1 . The process at the step S 4  corresponds to reading means employed in the invention. Between the step S 3  and S 4 , there may be provided a process of requesting the card user to input their password. If, in this case, the input password is invalid, a warning message may be generated to the card user, thereby requesting them to re-input the password. Only if the password is valid, the program proceeds to the step S 4 . 
     Referring then to the flowchart of FIG. 8, the AID information reading process will be described in detail. After the IC card terminal device  2  activates the IC card  1 , the IC card  1  transmits ATR (Answer-To-Reset) data to the IC card terminal device  2 . The IC card terminal device  2 , in turn, transmits a DF (Directory File) select command (Select-DF) to the IC card  1 , thereby selects the AID table shown in FIG. 4A (step S 41 ). 
     Subsequently, the IC card terminal device  2  receives normal status data from the IC card  1  (step S 42 ), thereby transmits thereto a read command (Read Record), and instructs the card  1  to select and read an information item stored in the AID table (step S 43 ). Then, the IC card  1  transmits a first AID information item to the terminal device  2  (step S 44 ). All AID information items can be read by repeating the above process a number of times corresponding to the number of the AID information items. 
     Thereafter, each AID information item read from the IC card  1  is displayed on the liquid crystal display unit  25  (step S 5 ). At this time, the user selects that one of the displayed functions (AID information items), which they intend to execute, using the keyboard  24  (step S 6 ). The CPU  21  of the IC card terminal device  2  retrieves the application ID information stored in the ROM  22 , thereby comparing the selected AID information item with the retrieved ID information, and determines whether or not the IC card terminal device  2  contains an application corresponding to the selected AID information item (step S 7 ). 
     The AID information read from the IC card  1  has contents, for example, as shown in FIG. 4A, i.e. an AID information item indicative of a credit function and an AID information item indicative of a debit function. If, on the other hand, the IC card terminal device  2  has only the credit function, it determines “exist” when the credit function is selected by the IC card, and determines “non-exist” when the debit function is selected. 
     The process at the steps S 5  and S 6  corresponds to selective means employed in the invention, while the process at the step S 7  corresponds to determination means in the invention. 
     If it is determined at the step S 7  that the selected function exists, the function (application) is executed (step S 8 ). In the above case, the credit function is executed. As a result, the card user can execute the process desired. The process at the step S 8  corresponds to first execution means in the invention. 
     If it is determined at the step S 7  that the selected function does not exist, the IC card terminal device  2  reads information (supplementary information) associated with the AID information (step S 9 ). As shown in FIG. 5, this associated information is needed to download a target application and includes the name of a service provider, a contact name of the service provider, a communication protocol, a login name, a login password and the name of the application, etc. 
     On the basis of the associated information read from the IC card  1 , the IC card terminal device  2  telephones a host apparatus as the service provider, for example, the host apparatus  4   a , whereby they are connected to each other (step S 10 ). 
     After that, the login name and the password included in the associated information are transmitted to the host apparatus  4   a  (step S 11 ). After the information items are identified by the host apparatus  4   a  as the service provider, the application name is transmitted to the host apparatus  4   a , whereby the IC card terminal device  2  receives a corresponding application from the host apparatus  4   a  and downloads it (i.e. stores it in the RAM) (step S 12 ). The process at the steps S 9 -S 12  corresponds to download means employed in the invention. 
     The function downloading process at the steps S 10 -S 12  will be described in more detail with reference to the flowchart of FIG.  9 . First, the IC card terminal device  2  telephones the host apparatus  4   a  as the service provider, whereby they are connected to each other (step S 71 ). The protocol used for the connection corresponds to that included in the associated information. In the case of FIG. 5, the protocol is TCP/IP. 
     Thereafter, in response to a request from the host apparatus  4   a , the IC card terminal device  2  transmits the login name included in the associated information to the host apparatus  4   a  (step S 72 ). Further, in response to a request from the host apparatus  4   a , the IC card terminal device  2  transmits the login password included in the associated information to the host apparatus  4   a  (step S 73 ). 
     After the IC card  1  is identified by the host apparatus  4   a  on the basis of the login name and the login password (step S 74 ), the IC card terminal device  2  transmits the application name included in the associated information to the host apparatus  4   a , thereby the IC card terminal device  2  requests a desired application (step S 75 ). 
     Upon receiving a request for the desired application, the host apparatus  4   a  transmits a confirmation card command to the IC card terminal device  2  in order to confirm whether or not the IC card  1  is valid. The IC card terminal device, in turn, transmits the card command to the IC card  1  (step S 76 ). 
     Upon receiving the card command, the IC card  1  processes the command, and returns information indicative of its status to the IC card terminal device  2 . The IC card terminal device  2 , in turn, transmits the card status information to the host apparatus  4   a  (step S 77 ). The card command transmitted from the service provider requires an encoding process. The command consists of, for example, an Internal Authentication Command prescribed in the ISO, which is used for confirming whether or not the IC card  1  is a valid one. 
     More specifically, a command to encode a random number is supplied from the host apparatus  4   a  to the IC card  1  via the IC card terminal device  2 . The IC card  1 , in turn, encodes the random number, using a predetermined algorithm, and transmits the encoded random number as status information to the host apparatus  4   a  via the IC card terminal device  2 . Upon receiving the status information, the host apparatus  4   a  decodes the encoded random number, using a decoding algorithm corresponding to the encoding algorithm of the IC card  1 , thereby confirms whether or not the IC card  1  is a valid one. 
     In this system, the validity of the IC card terminal device  2  is not confirmed when downloading an application. 
     After the request for an application from the IC card terminal device  2  is confirmed valid (i.e. the IC card  1  is confirmed valid), the host apparatus  4   a  transmits the requested application to the IC card terminal device  2  (step S 78 ). The IC card terminal device  2  downloads the application from the host apparatus  4   a.    
     After that, the IC card terminal device  2  executes the downloaded application, thereby executes a function desired by the card user (step S 13 ). The process at the step S 22  corresponds to second execution means in the invention. 
     After executing the downloaded application, the inserted IC card  1  is ejected (step S 14 ), and the IC card terminal device  2  determines whether or not the memory residual amount of the HDD  28  is not less than a predetermined value (step S 15 ). If the residual amount is not less than the predetermined value, the application downloaded in the RAM  23  is stored in the HDD  28  (step S 16 ), whereas if it is less than the predetermined value, the application downloaded in the RAM  23  is erased (step S 17 ). 
     The downloaded application may be erased irrespective of the memory residual amount of the HDD  28 , after the desired function is executed. The flowchart of FIG. 10 shows this operation. In this case, unauthorized analysis and/or alteration of the downloaded application is prevented. For example, the remainder of the money stored in a prepaid card can be prevented from being illegally changed. 
     As described above, the IC card terminal device reads functions stored in an IC card inserted therein, and displays them on its display device. The card user selects that one of the displayed functions, which they intend to execute. The IC card terminal device determines whether or not it has the selected function and can execute it. If the function is executable, the terminal device executes it instantly. If, on the other hand, the terminal device does not have the selected function, it reads function information (associated information) stored in the IC card, and is connected to a host apparatus as a service provider on the basis of the read information, thereby downloading and executing a necessary function. 
     Thus, a single IC card terminal device can execute any one of functions belonging to an IC card. In other words, it is not necessary to prepare a plurality of IC card terminal devices having different functions as in the prior art. 
     It is a matter of course that where the IC card has only one function, and the IC card terminal device does not have the function, the IC card terminal device can execute the function by downloading an application corresponding to the function from a service provider. 
     In addition, although the above-described embodiment employs a card-shaped portable electronic device, the present invention is not limited to this. The invention is also applicable to an electronic device in the form of a block, such as a GSM (Global System for Mobile communication). 
     Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.