JP4162786B2 - IC card - Google Patents

IC card Download PDF

Info

Publication number
JP4162786B2
JP4162786B2 JP35072698A JP35072698A JP4162786B2 JP 4162786 B2 JP4162786 B2 JP 4162786B2 JP 35072698 A JP35072698 A JP 35072698A JP 35072698 A JP35072698 A JP 35072698A JP 4162786 B2 JP4162786 B2 JP 4162786B2
Authority
JP
Japan
Prior art keywords
application
card
selection
external device
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP35072698A
Other languages
Japanese (ja)
Other versions
JP2000163539A (en
Inventor
昭雄 野澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP35072698A priority Critical patent/JP4162786B2/en
Publication of JP2000163539A publication Critical patent/JP2000163539A/en
Application granted granted Critical
Publication of JP4162786B2 publication Critical patent/JP4162786B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明はICカードに関し、特に、CPUとメモリとを有し、メモリ内に格納された複数のアプリケーションプログラムを、CPUによって選択的に実行することができるICカードに関する。
【0002】
【従来の技術】
キャッシュカードやクレジットカードとして利用されてきた磁気カードに代わって、光カードやICカードが普及し始めている。特に、CPUを内蔵したICカードは、高度なセキュリティを確保することができるため、高額な商取引にも利用することができる利点を有する。
【0003】
現在、一般に利用されているCPUを有するICカードには、メモリとして、ROM,EEPROM,RAMが内蔵されている。通常、ROMには、CPUに実行させるべき基本的なプログラムが格納され、EEPROMには、ユーザデータや種々のアプリケーションプログラムが格納され、RAMはCPUの作業領域として利用される。EEPROMは書換可能なメモリであるため、ここにユーザごとに必要なデータやアプリケーションプログラムを格納することができる。
【0004】
ICカードにデータやプログラムを書き込んだり、これらを読み出したりする際には、いわゆるリーダライタ装置と呼ばれる外部装置が用いられる。この外部装置とICカードとの間では、物理的な伝送線を介してまたは非接触な伝送路を介して、相互にデータやプログラムの伝送が行われる。通常、外部装置からICカードへの情報伝送は、コマンドという形式で与えられ、種々の指示やデータは、このコマンドの中の一情報としてICカード側へと伝えられる。これに対して、ICカードから外部装置への情報伝送は、レスポンスという形式で与えられ、処理結果やデータは、このレスポンスの中の一情報として外部装置側へと伝えられる。
【0005】
EEPROMなどのメモリの集積度は年々向上してきているため、現在の一般的なICカードでは、複数のアプリケーションプログラムをEEPROM内に格納することができる。たとえば、医療診断用プログラム、クレジット決済用プログラム、ガソリン代金支払用プログラムなど、用途に応じた複数のアプリケーションプログラムを、それぞれEEPROM内に格納しておけば、これらを選択的に実行することにより、同一のICカードを、診察カード、クレジットカード、ガソリン給油カードとして利用することが可能になる。
【0006】
【発明が解決しようとする課題】
ICカードの利用形態は、今後も益々多様化してゆくことが予想され、予め格納された複数のアプリケーションプログラムの中から、必要なアプリケーションプログラムを選択して実行するような利用形態が一般化するものと思われる。このため、ICカードを外部装置に接続して、アクセスを開始する際には、まず、いずれかのアプリケーションプログラムを選択する操作が必要になる。通常、この選択操作は、外部装置側からアプリケーション選択コマンドを与えることにより行われている。たとえば、上述のような3種類のアプリケーションプログラムが格納されたICカードを、病院に設置された外部装置(リーダライタ装置)に挿入した場合、まず、外部装置からICカードに対して、医療診断用プログラムを選択するためのアプリケーション選択コマンドを与える操作が必要になる。ICカード側では、このアプリケーション選択コマンドに基づいて、指定された特定のアプリケーションプログラムを選択状態にする処理が行われ、選択完了のレスポンスを外部装置側へ送信する処理が行われる。外部装置は、このレスポンスの送信を受けた後に、本来のコマンド(医療診断用プログラムに対するコマンド)をICカード側へ与えることが可能になる。
【0007】
このように、複数のアプリケーションプログラムを選択的に実行するタイプのICカードでは、外部からのアクセス開始時に、特定のアプリケーションプログラムを選択するための一連の操作が必要になっていた。ところが、このようなアプリケーションの選択手順は、必ずしも効率的ではない。特に、外部装置とICカードとの間の信号伝送には、1本の信号線を用いたシリアル伝送方式が用いられているため、コマンドの伝送、ICカード内部での選択処理、レスポンスの伝送、という処理には、ある程度の時間が必要となり、本来の作業を開始できるようになるまで、待ち時間が発生せざるを得ない。
【0008】
そこで本発明は、実行対象となるアプリケーションプログラムを効率的に選択することが可能なICカードを提供することを目的とする。
【0009】
【課題を解決するための手段】
(1) 本発明の第1の態様は、CPUとメモリとを有し、メモリ内に格納された複数のアプリケーションプログラムを、CPUによって選択的に実行することができるICカードにおいて、
CPUは、メモリ内に格納されているプログラムに基づいて、外部装置から与えられるコマンドを実行し、その結果をレスポンスとして外部装置に伝える機能を果たし、
メモリ内には、個々のアプリケーションプログラムを格納するアプリケーション格納区画と、個々のアプリケーションプログラムの選択履歴を格納する選択履歴格納区画と、が設けられており、
CPUが、
外部装置から、複数のアプリケーションプログラムの中の1つを指定するアプリケーション選択コマンドが与えられた場合に、指定されたアプリケーションプログラムを選択する処理と、
アプリケーションプログラムの選択が行われたときに、選択されたアプリケーションプログラムを起動させるとともに、その日時を当該選択されたアプリケーションプログラムの選択履歴格納区画内に選択履歴として記録する処理と、
外部装置から、リセット信号が与えられたときに、選択履歴格納区画に記録されている選択履歴を参照することにより、各アプリケーションについて所定期間内の選択回数をカウントし、カウント値が最大のアプリケーションプログラムを自動選択する処理と、
を行うようにしたものである。
【0010】
(2) 本発明の第2の態様は、上述の第1の態様に係るICカードにおいて、
リセット信号に対するレスポンス信号とともに、自動選択されたアプリケーションプログラムを特定する情報を外部装置に対して与えるようにしたものである。
【0011】
(3) 本発明の第3の態様は、上述の第1または第2の態様に係るICカードにおいて、
選択履歴格納区画内のスペースが飽和した場合には、最も古い日時から削除する処理を行うようにしたものである。
【0012】
(4) 本発明の第4の態様は、上述の第1〜第3の態様に係るICカードにおいて、
自動選択されたアプリケーションプログラムについてのコマンドを実行する前に、新たなアプリケーション選択コマンドが与えられた場合、新たに選択されたアプリケーションプログラムを起動させ、その選択履歴を記録するとともに、先に自動選択されたアプリケーションプログラムの選択履歴として記録されている日時を削除する処理を行うようにしたものである。
【0013】
(5) 本発明の第5の態様は、上述の第1〜第4の態様に係るICカードにおいて、
過去の選択履歴が全く記録されていない場合には、メモリ内の最も若いアドレスに格納されているアプリケーションプログラムを自動選択するようにしたものである。
【0014】
【発明の実施の形態】
以下、本発明を図示する実施形態に基づいて説明する。図1は、一般的なICカード10と、外部装置(リーダライタ装置)20との間で、情報の伝送を行っている状態を示すブロック図である。この例では、ICカード10は、種々の演算処理機能をもったCPU11と、外部装置20に対する情報の送受を行うI/Oインターフェイス12と、ROM13,EEPROM14,RAM15なるメモリとを備えている。ROM13は書換不能な不揮発性メモリであり、CPU11は、このROM13内に格納されている基本プログラムに基づいて所定の処理を実行する。EEPROM14は、書換可能な不揮発性メモリであり、ユーザデータや種々のアプリケーションプログラムが格納される。RAM15は、CPU11が種々の処理を実行する際の作業領域として利用される書換可能な揮発性メモリである。
【0015】
ICカード10と外部装置20とは、物理的な信号線による接続、赤外線による接続、電磁気を利用した非接触型接続、などの方法によって互いに接続され、情報の送受が行われる。外部装置20からICカード10へは、コマンドという形式で情報が送信される。送信されたこのコマンドは、I/Oインターフェイス12を介してCPU11に与えられる。逆に、ICカード10から外部装置20へは、与えられたコマンドに対するレスポンスという形式で情報が送信される。このレスポンスは、CPU11からI/Oインターフェイス12を介して、外部装置20へと送信される。
【0016】
この実施形態では、アプリケーションプログラムは、図2に示すように、EEPROM14内に設けられたアプリケーション格納領域140に格納される。図示の例では、アプリケーション格納領域140内の区画141A,142A,143Aに、それぞれアプリケーションプログラム1,2,3が格納されている。本発明の特徴のひとつは、更に、各アプリケーションプログラムの選択履歴を格納するための区画141B,142B,143Bを設け、選択履歴を記録するようにした点にある。これらの区画141B,142B,143Bには、それぞれアプリケーションプログラム1,2,3の選択履歴が記録されることになる。
【0017】
ここでは、一例として、アプリケーションプログラム1,2,3が、それぞれ医療診断用プログラム、クレジット決済用プログラム、ガソリン代金支払用プログラムであったとする。この場合、このICカード10は、診察カード、クレジットカード、ガソリン給油カードとして利用することができ、用途に応じて特定のアプリケーションプログラムが選択されることになる。
【0018】
従来は、この選択操作を、外部装置20側からの指示に基づいて行っていた。たとえば、病院に設置された外部装置20に、このICカード10を挿入すると、CPU11に対するリセット信号に続いて、医療診断用プログラムを選択するためのアプリケーション選択コマンドが与えられることになる。これにより、ICカード10の内部では、医療診断用プログラムが起動し、以後、この医療診断用プログラムについてのコマンドを受け付ける状態になる。また、この同じICカード10を、ショッピングセンターに設置された外部装置20に挿入すると、CPU11に対するリセット信号に続いて、クレジット決済用プログラムを選択するためのアプリケーション選択コマンドが与えられることになる。これにより、ICカード10の内部では、クレジット決済用プログラムが起動し、以後、このクレジット決済用プログラムを受け付ける状態になる。
【0019】
本発明に係るICカード10においても、もちろん、上述したようなアプリケーション選択コマンドを外部装置20側から与えることによって、起動すべきアプリケーションを選択することが可能である。ただ、本発明に係るICカード10は、外部装置20側からアプリケーション選択コマンドが与えられる前の段階で、選択される蓋然性の高いアプリケーションを自動選択する機能を有している。選択される蓋然性の高いアプリケーションがどれであるか、を決定する具体的な手法は後に述べるが、本発明に係るICカード10にアクセスを開始すると、その時点で、既に1つのアプリケーションが自動選択された状態になっている。ICカード10の内部で、どのアプリケーションが自動選択されたかは、レスポンスとして外部装置20側に伝達されるので、この自動選択されたアプリケーションが、実行対象となる正しいアプリケーションであった場合には、外部装置20は、直ちに当該アプリケーションに対するコマンドを送信することができる。すなわち、従来のように、アプリケーション選択コマンドを与える必要はなくなる。一方、自動選択されたアプリケーションが、実行対象となるアプリケーションではなかった場合は、従来どおり、アプリケーション選択コマンドを与え、改めて正しいアプリケーションの選択操作を行えばよい。
【0020】
本発明では、選択される蓋然性の高いアプリケーションを決定するための判断材料として、過去の選択履歴を用いるようにしている。このため、本発明に係るICカードでは、特定のアプリケーションが選択されるたびに、その日時を選択履歴として記録する処理が行われる。たとえば、図2に示す例の場合、アプリケーションプログラム1が選択されると、その日時が選択履歴として、区画141B内に記録されることになる。過去にn回選択された場合は、合計n個の日時が記録されることになる。もっとも、区画141Bの記憶容量は有限であるため、区画内の記憶スペースが飽和した場合には、最も古い日時から削除するような処理を行うようにする。同様に、区画142B,143Bには、それぞれアプリケーションプログラム2,3が選択された日時が、選択履歴として記録されることになる。
【0021】
外部装置20がICカード10に対するアクセスを開始すると、CPU11は、各アプリケーションプログラムについて記録されている選択履歴を参照し、この選択履歴に基づいて、特定のアプリケーションプログラム(選択される蓋然性の高いアプリケーション)を自動的に選択する処理を行う。具体的には、ここに示す実施形態では、CPU11に対してリセット信号が与えられたときに、この自動選択処理が実行されるようにしている。通常、ICカード10と外部装置20とを接続した直後には、外部装置20からICカード10内のCPU11に対して、リセット信号が送信される。そこで、このリセット信号を受信したときにICカード10内で行われる処理(通常は、種々の初期設定処理が行われる)に続いて、この自動選択処理を実行するようにすると都合がよい。
【0022】
選択される蓋然性の高いアプリケーションの候補のひとつは、最も最近に選択されたアプリケーションである。たとえば、ショッピングセンターで買い物をしているような状況の場合、買い物をするたびにICカードが利用され、その都度、クレジット決済用プログラムが選択されて実行されることになる。したがって、最も最近に選択されたアプリケーションが、クレジット決済用プログラムであったとしたら、次回の利用時に選択されるべきアプリケーションも、クレジット決済用プログラムである可能性は高い。したがって、最も最近に選択されたアプリケーションを常に自動選択する、というアプローチは、十分に意味のあるアプローチである。
【0023】
図3は、このようなアプローチを採った場合に、ICカード10内部で行われる自動選択処理の手順を示す流れ図である。まず、外部装置20側からリセット信号が与えられると、ステップS11において、リセット信号受信処理を行う。この処理は、RAM15内に種々のデータを設定したり、EEPROM14内の特定のデータに基づいて特定の設定を行ったりする処理であるが、本発明の本旨には直接関係しないため、詳しい説明は省略する。続いて、ステップS12において、各アプリケーションの履歴の読み取りが行われる。具体的には、図2に示す区画141B,142B,143B内の選択履歴(選択が行われた日時)が読み出されることになる。そして、ステップS13において、最新の選択履歴(すなわち、最新の日時)を有するアプリケーションが、自動選択され、続くステップS14において、この選択されたアプリケーションの選択履歴が更新される(現時点の日時が、選択履歴として新たに記録される)。
【0024】
最後に、ステップS15において、ATR信号が送信される。このATR(Answer To Reset )信号は、外部装置20側から与えられたリセット信号に対するレスポンスであり、外部装置20側に、リセット信号受信処理が完了し、コマンド受信の準備が整ったことを報知するための信号である。本実施形態では、このATR信号とともに、自動選択されたアプリケーションがどのアプリケーションであるかを特定する情報を、外部装置20に対して送信するようにしている。一般的なICカードの規格では、ATR信号には所定のデータビットの他、任意のデータビットを含ませることが可能である。本実施形態では、この任意のデータビットとして、自動選択されたアプリケーションを特定するための情報を外部装置20に伝達する方法を採っている。外部装置20は、このATR信号によって、ICカード10側がコマンドを受け付ける状態になったことを認識するとともに、特定のアプリケーションが自動選択されたことを認識することができる。このATR信号を送信した後、後述する通常のコマンド実行処理が行われる。
【0025】
一方、選択される蓋然性の高いアプリケーションを決定する別なアプローチは、所定期間内で最も選択頻度の高いアプリケーションプログラムを自動選択するという方法である。多数の用途に利用できるICカードであっても、これらの用途は均一に利用されるわけではなく、通常は、ユーザごとに特定の用途に偏った利用形態がなされることが多い。したがって、過去の利用頻度が最も高いアプリケーションは、次回に選択される蓋然性が高いと言える。そこで、たとえば過去1週間、あるいは過去1か月というように所定期間を予め設定しておき、この所定期間内で最も選択頻度の高いアプリケーションを自動選択する、というアプローチは、十分に意味のあるアプローチである。
【0026】
図4は、このようなアプローチを採った場合に、ICカード10内部で行われる自動選択処理の手順を示す流れ図である。まず、外部装置20側からリセット信号が与えられると、ステップS21において、リセット信号受信処理を行う。続いて、ステップS22において、各アプリケーションの履歴の読み取りが行われる。すなわち、図2に示す区画141B,142B,143B内の選択履歴(選択が行われた日時)が読み出されることになる。そして、ステップS23において、各アプリケーションごとに、所定期間内の選択回数がカウントされる。たとえば、過去1週間以内の日時が記録された回数などがカウントされることになる。そして、ステップS24において、カウント値が最大のアプリケーションが自動選択され、続くステップS25において、この選択されたアプリケーションの選択履歴が更新される(現時点の日時が、選択履歴として新たに記録される)。最後に、ステップS25において、ATR信号が送信される。このATR信号とともに、自動選択されたアプリケーションがどのアプリケーションであるかを特定する情報が送信される点は、前述の例と同様である。
【0027】
図5は、図3に示す手順あるいは図4に示す手順が完了した後に、ICカード10内で行われる通常のコマンド実行処理の手順を示す流れ図である。この4マンド実行処理が行われる時点では、既に、特定のアプリケーションが自動選択されており、外部装置20側には、どのアプリケーションが自動選択されたかが報知されていることになる。外部装置20は、自動選択されたアプリケーションが、本来実行すべきアプリケーションであった場合には、当該アプリケーションについてのコマンドを送信するが、本来実行すべきアプリケーションではなかった場合には、本来実行すべきアプリケーションを選択するためのアプリケーション選択コマンドを送信する。前者の場合は、アプリケーション選択コマンドを送信する手順を省くことができる。後者の場合は、アプリケーション選択コマンドを送信する操作が必要になるが、これは従来のICカードで行われていた通常の処理である。
【0028】
さて、ICカード10側では、ステップS31において、コマンド受信のための待機状態となる。外部装置20側からのコマンドが受信されると、ステップS32において、このコマンドがアプリケーション選択コマンドであるか否かが判断される。上述したように、自動選択されたアプリケーションが、本来実行すべきアプリケーションであった場合、外部装置20は、当該アプリケーションについてのコマンドを送信してくることになるので、ステップS32からステップS33へと進み、この与えられたコマンドが実行される。一方、自動選択されたアプリケーションが、本来実行すべきアプリケーションではなかった場合、外部装置20は、本来実行すべきアプリケーションを選択するためのアプリケーション選択コマンドを送信してくることになるので、ステップS32からステップS34へと進み、与えられたアプリケーション選択コマンドに基づいて、アプリケーションを選択する処理(自動選択されたアプリケーションから、新たに選択されたアプリケーションへ切り替える処理)を行い、更に、ステップS35において、選択履歴を更新する処理、すなわち、新たに選択されたアプリケーションについての選択履歴を記録する処理が行われる。このとき、必要なら、先に自動選択されたアプリケーションについての選択履歴を修正する処理(先に行われた自動選択は、誤った選択であったため、これを修正するために、たとえば、選択履歴の日時を削除するような処理)を行ってもよい。
【0029】
いずれの場合も、ステップS36において、所定のレスポンスが外部装置20に対して送信されることになる。同様の処理が、ステップS37を経て、繰り返し実行され、アプリケーションの実行を終了するコマンドが与えられた場合には、ステップS37を経て、この手順は終了する。
【0030】
このように、本発明において行われるアプリケーションの自動選択機能は、あくまでも、選択される蓋然性の高いアプリケーションを予測して選択する機能であるため、必ずしもこの自動選択が正しい選択であるとは限らない。しかしながら、上述したようなアプローチに基づく自動選択を行えば、正しい自動選択が行われる可能性はかなり高く、アプリケーション選択コマンドを省略できる可能性は高い。また、仮に自動選択が誤った選択であったとしても、アプリケーション選択コマンドを与えることにより、従来どおりの手法で正しいアプリケーションを選択することができるので、実用上、何らデメリットは生じない。
【0031】
以上、本発明を図示する実施形態に基づいて説明したが、本発明はこの実施形態に限定されるものではなく、この他にも種々の形態で実施可能である。たとえば、上述の実施形態では、アプリケーションプログラムをEEPROM14内に格納するようにしているが、本発明は、ROM13内にアプリケーションプログラムを格納したICカードについても適用可能である。ただし、この場合、選択履歴については、書き換え可能なEEPROM14内に記録するようにする必要がある。
【0032】
また、上述の実施形態では、既に選択履歴が記録されているという前提での処理動作を説明したが、ICカードを初めて使用する場合には、別な方法により自動選択を行う必要がある。すなわち、過去の選択履歴が全く記録されていない初回使用時には、選択履歴に基づく自動選択ができないので、たとえば、メモリ内の最も若いアドレスに格納されているアプリケーションを自動選択する、というような手法を採ればよい。あるいは、自動選択処理を実行せずに、外部装置20側から与えられるアプリケーション選択コマンドを待つ、という手法を採ってもよい。
【0033】
更に、上述の実施形態では、自動選択の対象となるアプリケーションの候補として、最も最近に選択されたアプリケーションプログラムを選択するアプローチと、所定期間内で最も選択頻度の高いアプリケーションプログラムを選択するアプローチと、を例示したが、自動選択のアプローチしては、両者を組み合わせた手法を用いてもよいし、他のアプローチを用いてもかまわない。
【0034】
【発明の効果】
以上のとおり本発明に係るICカードによれば、アクセス開始時に、過去の選択履歴に基づくアプリケーションの自動選択を行うようにしたため、実行対象となるアプリケーションプログラムを効率的に選択することが可能になる。
【図面の簡単な説明】
【図1】一般的なICカード10と、外部装置(リーダライタ装置)20との間で、情報の伝送を行っている状態を示すブロック図である。
【図2】本発明に係るICカードにおけるEEPROM14内のアプリケーション格納領域140の状態を示すメモリマップである。
【図3】最も最近に選択されたアプリケーションを選択する、というアプローチに基づく自動選択処理の手順を示す流れ図である。
【図4】最も選択頻度の高いアプリケーションを選択する、というアプローチに基づく自動選択処理の手順を示す流れ図である。
【図5】自動選択が行われた後の、通常のコマンド実施処理の手順を示す流れ図である。
【符号の説明】
10…ICカード
11…CPU
12…I/Oインターフェイス
13…ROM
14…EEPROM
15…RAM
20…外部装置(リーダライタ装置)
140…アプリケーション格納領域
141A,142A,143A…アプリケーションプログラムを格納する区画
141B,142B,143B…アプリケーションの選択履歴を格納する区画
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an IC card, and more particularly to an IC card that has a CPU and a memory and can selectively execute a plurality of application programs stored in the memory by the CPU.
[0002]
[Prior art]
Instead of magnetic cards that have been used as cash cards and credit cards, optical cards and IC cards have begun to spread. In particular, an IC card with a built-in CPU has an advantage that it can be used for expensive commercial transactions because it can ensure a high level of security.
[0003]
Currently, an IC card having a CPU that is generally used incorporates ROM, EEPROM, and RAM as memories. Usually, a basic program to be executed by the CPU is stored in the ROM, user data and various application programs are stored in the EEPROM, and the RAM is used as a work area of the CPU. Since the EEPROM is a rewritable memory, necessary data and application programs can be stored for each user.
[0004]
When data or programs are written to or read from an IC card, an external device called a so-called reader / writer device is used. Between the external device and the IC card, data and programs are transmitted to each other via a physical transmission line or a non-contact transmission path. Normally, information transmission from an external device to the IC card is given in the form of a command, and various instructions and data are transmitted to the IC card as one piece of information in the command. On the other hand, information transmission from the IC card to the external device is given in the form of a response, and the processing result and data are transmitted to the external device as one piece of information in the response.
[0005]
Since the degree of integration of memories such as EEPROM has been improved year by year, a current general IC card can store a plurality of application programs in the EEPROM. For example, if multiple application programs such as medical diagnosis programs, credit settlement programs, and gasoline price payment programs are stored in the EEPROM, they can be executed by selectively executing them. This IC card can be used as a medical card, a credit card, or a gasoline refueling card.
[0006]
[Problems to be solved by the invention]
IC card usage forms are expected to be increasingly diversified in the future, and usage forms that select and execute necessary application programs from a plurality of pre-stored application programs are becoming common. I think that the. For this reason, when an IC card is connected to an external device and access is started, first, an operation for selecting one of the application programs is required. Normally, this selection operation is performed by giving an application selection command from the external device side. For example, when an IC card storing the three types of application programs as described above is inserted into an external device (reader / writer device) installed in a hospital, first, the IC card from the external device is used for medical diagnosis. An operation for giving an application selection command for selecting a program is required. On the IC card side, based on the application selection command, processing for setting a specified specific application program is performed, and processing for transmitting a selection completion response to the external device side is performed. After receiving the response, the external device can give the original command (command for the medical diagnosis program) to the IC card side.
[0007]
As described above, in an IC card of a type that selectively executes a plurality of application programs, a series of operations for selecting a specific application program is required at the start of external access. However, such an application selection procedure is not always efficient. In particular, since a serial transmission method using one signal line is used for signal transmission between the external device and the IC card, command transmission, selection processing inside the IC card, response transmission, This process requires a certain amount of time, and a waiting time must be generated until the original work can be started.
[0008]
SUMMARY An advantage of some aspects of the invention is that it provides an IC card capable of efficiently selecting an application program to be executed.
[0009]
[Means for Solving the Problems]
(1) A first aspect of the present invention is an IC card having a CPU and a memory, and capable of selectively executing a plurality of application programs stored in the memory by the CPU.
The CPU executes a command given from the external device based on a program stored in the memory, and performs a function of transmitting the result to the external device as a response,
In the memory, an application storage section for storing individual application programs and a selection history storage section for storing selection history of individual application programs are provided.
CPU
Processing for selecting a designated application program when an application selection command for designating one of a plurality of application programs is given from an external device;
A process of starting the selected application program when the application program is selected and recording the date and time as a selection history in the selection history storage section of the selected application program;
When the reset signal is given from an external device, the selection history recorded in the selection history storage section is referred to count the number of selections within a predetermined period for each application, and the application program having the maximum count value The process of automatically selecting
Is to do.
[0010]
(2) According to a second aspect of the present invention, in the IC card according to the first aspect described above,
Information specifying the automatically selected application program is given to the external device together with a response signal to the reset signal.
[0011]
(3) A third aspect of the present invention is the IC card according to the first or second aspect described above,
When the space in the selection history storage section is saturated, the process of deleting from the oldest date and time is performed.
[0012]
(4) A fourth aspect of the present invention is the IC card according to the first to third aspects described above,
If a new application selection command is given before executing the command for the automatically selected application program, the newly selected application program is started, the selection history is recorded, and the automatic selection is performed first. The process of deleting the date and time recorded as the selected application program history is performed.
[0013]
(5) According to a fifth aspect of the present invention, in the IC card according to the first to fourth aspects described above,
When no past selection history is recorded, the application program stored at the youngest address in the memory is automatically selected.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described based on the illustrated embodiments. FIG. 1 is a block diagram showing a state in which information is transmitted between a general IC card 10 and an external device (reader / writer device) 20. In this example, the IC card 10 includes a CPU 11 having various arithmetic processing functions, an I / O interface 12 for transmitting / receiving information to / from the external device 20, and memories such as a ROM 13, an EEPROM 14, and a RAM 15. The ROM 13 is a non-rewritable nonvolatile memory, and the CPU 11 executes predetermined processing based on a basic program stored in the ROM 13. The EEPROM 14 is a rewritable nonvolatile memory and stores user data and various application programs. The RAM 15 is a rewritable volatile memory used as a work area when the CPU 11 executes various processes.
[0015]
The IC card 10 and the external device 20 are connected to each other by a method such as a connection using a physical signal line, a connection using infrared rays, or a non-contact connection using electromagnetics, and information is transmitted and received. Information is transmitted from the external device 20 to the IC card 10 in the form of a command. The transmitted command is given to the CPU 11 via the I / O interface 12. Conversely, information is transmitted from the IC card 10 to the external device 20 in the form of a response to a given command. This response is transmitted from the CPU 11 to the external device 20 via the I / O interface 12.
[0016]
In this embodiment, the application program is stored in an application storage area 140 provided in the EEPROM 14 as shown in FIG. In the illustrated example, application programs 1, 2, and 3 are stored in the sections 141A, 142A, and 143A in the application storage area 140, respectively. One of the features of the present invention is that partitions 141B, 142B, and 143B for storing the selection history of each application program are further provided and the selection history is recorded. In these sections 141B, 142B, and 143B, selection histories of the application programs 1, 2, and 3 are recorded, respectively.
[0017]
Here, as an example, it is assumed that the application programs 1, 2, and 3 are a medical diagnosis program, a credit settlement program, and a gasoline price payment program, respectively. In this case, the IC card 10 can be used as a diagnosis card, a credit card, or a gasoline refueling card, and a specific application program is selected according to the application.
[0018]
Conventionally, this selection operation is performed based on an instruction from the external device 20 side. For example, when the IC card 10 is inserted into the external device 20 installed in a hospital, an application selection command for selecting a medical diagnosis program is given following a reset signal to the CPU 11. As a result, the medical diagnosis program is activated inside the IC card 10, and thereafter, the IC card 10 enters a state of accepting commands for the medical diagnosis program. When the same IC card 10 is inserted into the external device 20 installed in the shopping center, an application selection command for selecting a credit settlement program is given following a reset signal to the CPU 11. As a result, the credit settlement program is activated inside the IC card 10, and thereafter the credit settlement program is accepted.
[0019]
Of course, in the IC card 10 according to the present invention, it is possible to select an application to be activated by giving the application selection command as described above from the external device 20 side. However, the IC card 10 according to the present invention has a function of automatically selecting an application having a high probability of being selected before an application selection command is given from the external device 20 side. A specific method for determining which application has a high probability of being selected will be described later. When access to the IC card 10 according to the present invention is started, one application is already automatically selected. It is in the state. Which application is automatically selected in the IC card 10 is transmitted as a response to the external device 20 side. Therefore, if this automatically selected application is a correct application to be executed, the external application 20 The device 20 can immediately send a command for the application. That is, there is no need to give an application selection command as in the prior art. On the other hand, if the automatically selected application is not the application to be executed, an application selection command may be given and a correct application selection operation may be performed as before.
[0020]
In the present invention, a past selection history is used as a judgment material for determining an application having a high probability of being selected. For this reason, in the IC card according to the present invention, every time a specific application is selected, a process of recording the date and time as a selection history is performed. For example, in the example shown in FIG. 2, when the application program 1 is selected, the date and time is recorded as a selection history in the section 141B. If n times have been selected in the past, a total of n dates and times will be recorded. However, since the storage capacity of the partition 141B is finite, when the storage space in the partition is saturated, a process of deleting from the oldest date and time is performed. Similarly, in the sections 142B and 143B, the dates and times when the application programs 2 and 3 are selected are recorded as selection histories.
[0021]
When the external device 20 starts accessing the IC card 10, the CPU 11 refers to the selection history recorded for each application program, and based on this selection history, a specific application program (an application with a high probability of being selected). The process of selecting automatically is performed. Specifically, in the embodiment shown here, this automatic selection process is executed when a reset signal is given to the CPU 11. Usually, immediately after the IC card 10 and the external device 20 are connected, a reset signal is transmitted from the external device 20 to the CPU 11 in the IC card 10. Therefore, it is convenient to execute this automatic selection process following the process performed in the IC card 10 when the reset signal is received (usually, various initial setting processes are performed).
[0022]
One candidate application that is likely to be selected is the most recently selected application. For example, in a situation where shopping is performed at a shopping center, an IC card is used every time shopping is performed, and a credit settlement program is selected and executed each time. Therefore, if the most recently selected application is a credit settlement program, the application to be selected at the next use is highly likely to be a credit settlement program. Therefore, the approach of always automatically selecting the most recently selected application is a sufficiently meaningful approach.
[0023]
FIG. 3 is a flowchart showing a procedure of automatic selection processing performed inside the IC card 10 when such an approach is adopted. First, when a reset signal is given from the external device 20 side, reset signal reception processing is performed in step S11. This process is a process for setting various data in the RAM 15 or performing a specific setting based on the specific data in the EEPROM 14, but is not directly related to the gist of the present invention. Omitted. Subsequently, in step S12, the history of each application is read. Specifically, the selection history (date and time of selection) in the sections 141B, 142B, and 143B shown in FIG. 2 is read out. In step S13, the application having the latest selection history (that is, the latest date and time) is automatically selected, and in the subsequent step S14, the selection history of the selected application is updated (current date and time is selected). Newly recorded as history).
[0024]
Finally, in step S15, an ATR signal is transmitted. This ATR (Answer To Reset) signal is a response to the reset signal given from the external device 20 side, and informs the external device 20 side that the reset signal reception processing has been completed and preparation for command reception is ready. It is a signal for. In the present embodiment, along with this ATR signal, information specifying which application is the automatically selected application is transmitted to the external device 20. In a general IC card standard, an ATR signal can include arbitrary data bits in addition to predetermined data bits. In the present embodiment, a method of transmitting information for specifying the automatically selected application to the external device 20 as the arbitrary data bits is adopted. The external device 20 can recognize from the ATR signal that the IC card 10 is ready to accept a command and can recognize that a specific application has been automatically selected. After transmitting this ATR signal, normal command execution processing described later is performed.
[0025]
On the other hand, another approach for determining an application having a high probability of being selected is a method of automatically selecting an application program having the highest selection frequency within a predetermined period. Even for an IC card that can be used for many applications, these applications are not uniformly used, and usually, there are many usage patterns that are biased to specific applications for each user. Therefore, it can be said that the application having the highest usage frequency in the past has a high probability of being selected next time. Therefore, for example, an approach that sets a predetermined period in advance such as the past week or the past month and automatically selects an application with the highest selection frequency within the predetermined period is a sufficiently meaningful approach. It is.
[0026]
FIG. 4 is a flowchart showing a procedure of automatic selection processing performed inside the IC card 10 when such an approach is adopted. First, when a reset signal is given from the external device 20 side, reset signal reception processing is performed in step S21. Subsequently, in step S22, the history of each application is read. That is, the selection history (date and time when the selection is made) in the sections 141B, 142B, and 143B shown in FIG. 2 is read out. In step S23, the number of selections within a predetermined period is counted for each application. For example, the number of times of recording the date and time within the past week is counted. In step S24, the application having the maximum count value is automatically selected, and in the subsequent step S25, the selection history of the selected application is updated (the current date and time is newly recorded as the selection history). Finally, in step S25, an ATR signal is transmitted. Along with this ATR signal, information specifying which application is the automatically selected application is transmitted as in the above example.
[0027]
FIG. 5 is a flowchart showing a procedure of normal command execution processing performed in the IC card 10 after the procedure shown in FIG. 3 or the procedure shown in FIG. 4 is completed. When the four-command execution process is performed, a specific application has already been automatically selected, and the external device 20 has been notified of which application has been automatically selected. When the automatically selected application is an application that should be executed, the external device 20 transmits a command for the application, but when the application is not an application that should be executed, the external device 20 should execute it. An application selection command for selecting an application is transmitted. In the former case, the procedure for transmitting the application selection command can be omitted. In the latter case, an operation for transmitting an application selection command is required, which is a normal process performed by a conventional IC card.
[0028]
On the IC card 10 side, in step S31, a standby state for command reception is set. When a command from the external device 20 is received, it is determined in step S32 whether or not this command is an application selection command. As described above, when the automatically selected application is an application that should be executed, the external device 20 transmits a command for the application, and thus the process proceeds from step S32 to step S33. This given command is executed. On the other hand, if the automatically selected application is not the application that should be executed, the external device 20 transmits an application selection command for selecting the application that should be executed originally. Proceeding to step S34, a process of selecting an application (a process of switching from the automatically selected application to the newly selected application) is performed based on the given application selection command. Further, in step S35, the selection history is selected. , I.e., a process of recording a selection history for the newly selected application. At this time, if necessary, a process of correcting the selection history for the application that has been automatically selected first (the automatic selection made earlier was an incorrect selection. To correct this, for example, Processing that deletes the date and time) may be performed.
[0029]
In either case, a predetermined response is transmitted to the external device 20 in step S36. If the same process is repeatedly executed through step S37 and a command for ending the execution of the application is given, this procedure is ended through step S37.
[0030]
As described above, the application automatic selection function performed in the present invention is a function of predicting and selecting an application having a high probability of being selected, and thus the automatic selection is not necessarily a correct selection. However, if automatic selection based on the above-described approach is performed, there is a high possibility that correct automatic selection is performed, and there is a high possibility that an application selection command can be omitted. Even if the automatic selection is wrong, by giving an application selection command, the correct application can be selected by the conventional method, so there is no practical disadvantage.
[0031]
As mentioned above, although this invention was demonstrated based on embodiment shown in figure, this invention is not limited to this embodiment, In addition, it can implement with a various form. For example, in the above-described embodiment, the application program is stored in the EEPROM 14, but the present invention can also be applied to an IC card in which the application program is stored in the ROM 13. However, in this case, the selection history needs to be recorded in the rewritable EEPROM 14.
[0032]
In the above-described embodiment, the processing operation on the premise that the selection history has already been recorded has been described. However, when the IC card is used for the first time, it is necessary to perform automatic selection by another method. That is, at the first use when no past selection history is recorded, automatic selection based on the selection history is not possible. For example, a method of automatically selecting an application stored at the youngest address in the memory is used. Take it. Or you may take the method of waiting for the application selection command given from the external apparatus 20 side, without performing an automatic selection process.
[0033]
Furthermore, in the above-described embodiment, as an application candidate to be automatically selected, an approach for selecting the application program selected most recently, an approach for selecting an application program with the highest selection frequency within a predetermined period, and However, as an automatic selection approach, a method combining both may be used, or another approach may be used.
[0034]
【The invention's effect】
As described above, according to the IC card according to the present invention, when an access is started, an application is automatically selected based on a past selection history, so that an application program to be executed can be efficiently selected. .
[Brief description of the drawings]
FIG. 1 is a block diagram showing a state in which information is transmitted between a general IC card 10 and an external device (reader / writer device) 20. FIG.
FIG. 2 is a memory map showing a state of an application storage area 140 in the EEPROM 14 in the IC card according to the present invention.
FIG. 3 is a flowchart showing a procedure of an automatic selection process based on an approach of selecting an application selected most recently.
FIG. 4 is a flowchart showing a procedure of automatic selection processing based on an approach of selecting an application with the highest selection frequency.
FIG. 5 is a flowchart showing a procedure of normal command execution processing after automatic selection is performed.
[Explanation of symbols]
10 ... IC card 11 ... CPU
12 ... I / O interface 13 ... ROM
14… EEPROM
15 ... RAM
20. External device (reader / writer device)
140: Application storage areas 141A, 142A, 143A ... Partitions for storing application programs 141B, 142B, 143B ... Partitions for storing application selection history

Claims (5)

CPUとメモリとを有し、メモリ内に格納された複数のアプリケーションプログラムを、CPUによって選択的に実行することができるICカードにおいて、
前記CPUは、前記メモリ内に格納されているプログラムに基づいて、外部装置から与えられるコマンドを実行し、その結果をレスポンスとして前記外部装置に伝える機能を果たし、
前記メモリ内には、個々のアプリケーションプログラムを格納するアプリケーション格納区画と、個々のアプリケーションプログラムの選択履歴を格納する選択履歴格納区画と、が設けられており、
前記CPUは、
前記外部装置から、前記複数のアプリケーションプログラムの中の1つを指定するアプリケーション選択コマンドが与えられた場合に、指定されたアプリケーションプログラムを選択する処理と、
アプリケーションプログラムの選択が行われたときに、選択されたアプリケーションプログラムを起動させるとともに、その日時を当該選択されたアプリケーションプログラムの選択履歴格納区画内に選択履歴として記録する処理と、
前記外部装置から、リセット信号が与えられたときに、前記選択履歴格納区画に記録されている選択履歴を参照することにより、各アプリケーションについて所定期間内の選択回数をカウントし、カウント値が最大のアプリケーションプログラムを自動選択する処理と、
を行うことを特徴とするICカード。
In an IC card that has a CPU and a memory and can selectively execute a plurality of application programs stored in the memory by the CPU,
The CPU executes a command given from an external device based on a program stored in the memory, and performs a function of transmitting the result to the external device as a response,
In the memory, an application storage section for storing individual application programs and a selection history storage section for storing selection history of individual application programs are provided.
The CPU
Processing for selecting a designated application program when an application selection command for designating one of the plurality of application programs is given from the external device;
A process of starting the selected application program when the application program is selected and recording the date and time as a selection history in the selection history storage section of the selected application program;
When a reset signal is given from the external device, by referring to the selection history recorded in the selection history storage section, the number of selections within a predetermined period is counted for each application, and the count value is the maximum. A process of automatically selecting an application program;
An IC card characterized by
請求項1に記載のICカードにおいて、In the IC card according to claim 1,
リセット信号に対するレスポンス信号とともに、自動選択されたアプリケーションプログラムを特定する情報を外部装置に対して与えるようにしたことを特徴とするICカード。  An IC card characterized in that information specifying an automatically selected application program is given to an external device together with a response signal to a reset signal.
請求項1または2に記載のICカードにおいて、In the IC card according to claim 1 or 2,
選択履歴格納区画内のスペースが飽和した場合には、最も古い日時から削除する処理を行うことを特徴とするICカード。  An IC card characterized in that when the space in the selection history storage section is saturated, a process of deleting from the oldest date and time is performed.
請求項1〜3のいずれかに記載のICカードにおいて、In the IC card according to any one of claims 1 to 3,
自動選択されたアプリケーションプログラムについてのコマンドを実行する前に、新たなアプリケーション選択コマンドが与えられた場合、新たに選択されたアプリケーションプログラムを起動させ、その選択履歴を記録するとともに、先に自動選択されたアプリケーションプログラムの選択履歴として記録されている日時を削除する処理を行うことを特徴とするICカード。  If a new application selection command is given before executing the command for the automatically selected application program, the newly selected application program is started, the selection history is recorded, and the automatic selection is performed first. An IC card that performs processing for deleting the date and time recorded as a selection history of the selected application program.
請求項1〜4のいずれかに記載のICカードにおいて、In the IC card according to any one of claims 1 to 4,
過去の選択履歴が全く記録されていない場合には、メモリ内の最も若いアドレスに格納されているアプリケーションプログラムを自動選択することを特徴とするICカード。  An IC card that automatically selects an application program stored at the youngest address in a memory when no past selection history is recorded.
JP35072698A 1998-11-25 1998-11-25 IC card Expired - Fee Related JP4162786B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35072698A JP4162786B2 (en) 1998-11-25 1998-11-25 IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35072698A JP4162786B2 (en) 1998-11-25 1998-11-25 IC card

Publications (2)

Publication Number Publication Date
JP2000163539A JP2000163539A (en) 2000-06-16
JP4162786B2 true JP4162786B2 (en) 2008-10-08

Family

ID=18412443

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35072698A Expired - Fee Related JP4162786B2 (en) 1998-11-25 1998-11-25 IC card

Country Status (1)

Country Link
JP (1) JP4162786B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044801A (en) * 2001-07-27 2003-02-14 Dainippon Printing Co Ltd Portable information processor provided with a plurality of information transmitting means
JP2003076958A (en) * 2001-09-03 2003-03-14 Sony Corp Portable terminal equipment, method for registering functional relation and method for displaying function selection picture
DE10337257A1 (en) * 2003-08-13 2005-04-14 Giesecke & Devrient Gmbh Method for operating a chip card, on which several applications are implemented
JP4660180B2 (en) * 2004-12-15 2011-03-30 テックファーム株式会社 Communication system, read / write device, read / write method, and read / write program

Also Published As

Publication number Publication date
JP2000163539A (en) 2000-06-16

Similar Documents

Publication Publication Date Title
KR970004106B1 (en) Ic card
US5896507A (en) Device having automatic process for upgrading the performance of mobile systems
KR100760275B1 (en) Chip card comprising means for managing a virtual memory, associated communication method and protocol
US6253163B1 (en) Portable object reader terminal and process for self-diagnosis and supervision of same
US7367047B2 (en) Portable information recording medium
JPH08263353A (en) Card type storage medium
CN102135891A (en) System capable of realizing bootload, bootload control device and method
JP4162786B2 (en) IC card
EP1306760A1 (en) Ic card
JP4080079B2 (en) IC card
JP4219455B2 (en) IC card
JP2004348234A (en) Portable electronic medium, issuing apparatus of portable electronic medium, issuing system of portable electronic medium, and issuing method of portable electronic medium
JPH0831122B2 (en) Command processing method in IC card
JPH0340165A (en) Portable recording medium terminal system
JP5092370B2 (en) Portable information recording medium and program thereof
JP2005011147A (en) Ic card and ic card program
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP4318494B2 (en) IC card and IC card program
JP4001652B2 (en) IC card
JP7452748B1 (en) Electronic information storage medium, IC chip, IC card, value recording method, and program
KR20000068374A (en) Security module comprising means generating links between main files and auxiliary files
JPH1027225A (en) Memory management system for non-contact ic card
JP2011034408A (en) Semiconductor device, method of controlling the same, and control program therefor
JPS6321197A (en) Ic card
JP4141261B2 (en) Reader / writer and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080409

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080422

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080620

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080722

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080723

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110801

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110801

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120801

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120801

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130801

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees