JP4212296B2 - Command control method, IC card terminal device and memory card - Google Patents

Command control method, IC card terminal device and memory card Download PDF

Info

Publication number
JP4212296B2
JP4212296B2 JP2002121709A JP2002121709A JP4212296B2 JP 4212296 B2 JP4212296 B2 JP 4212296B2 JP 2002121709 A JP2002121709 A JP 2002121709A JP 2002121709 A JP2002121709 A JP 2002121709A JP 4212296 B2 JP4212296 B2 JP 4212296B2
Authority
JP
Japan
Prior art keywords
command
card
identification
memory card
terminal
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
JP2002121709A
Other languages
Japanese (ja)
Other versions
JP2003317039A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2002121709A priority Critical patent/JP4212296B2/en
Publication of JP2003317039A publication Critical patent/JP2003317039A/en
Application granted granted Critical
Publication of JP4212296B2 publication Critical patent/JP4212296B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、処理装置と記憶装置を有するメモリカードに記憶される複数のカードアプリケーションの実行方法に係り、特に複数同時起動の際に自分宛ではないコマンドを受け取ってしまい誤動作が起こったり、コマンドの返答先もマルチタスクによりタイミング次第で本来返すべきアプリケーションに返せない可能性が出てくるのを回避して正常に実行できる仕組みを記述したものである。
【0002】
【従来の技術】
カード上に大容量の記憶装置をもち、さらにカード上での計算処理を可能としたICカードと呼ばれるデバイスが実用化されている。
このICカードは近年ますます性能が向上してカード上に軽量のOSを持つことにより、1枚のカードに一つのアプリケーションだけではなく種類の異なる複数のアプリケーションを持てるマルチアプリケーションカードの作成が可能となった。
マルチアプリケーションの実現により、例えば銀行のキャッシュカードアプリケーションや信販会社のクレジットカードアプリケーションを一枚のカードに相乗りさせることが可能となり、ユーザが複数枚のカードを管理するという手間をなくすことができるようになった。
一方で、ICカードはアプリケーションこそ複数持つことは可能となったが、PC上で現在当然のごとく行われているマルチタスクによる複数同時実行は性能上不具合が出る可能性がある。
従来のICカードマルチアプリケーションの実行方式として、クレジットカードアプリケーションやポイントカードシステムアプリケーションの両方に対してコマンド送信を考えたとき、一方のクレジットアプリケーションのタスク実行中にもう一方のポイントアプリケーションへのコマンド送信要求が来ると実行中のセキュリティステータスを一時的に安全な領域に退避させておき、要求のあったアプリケーションの実行を許可する。
その実行が完了すれば、退避させておいたセキュリティステータスを復帰させて元のアプリケーションを実行状態に戻す。
これにより、一からアプリケーションの再実行とならずに途中段階のセキュリティ認証を終えた状態からの再実行が可能となる特開2001−307043号公報記載のマルチアプリケーション実行方式がある。
【0003】
【発明が解決しようとする課題】
上記のように1枚のメモリカード上に複数のアプリケーションが搭載され、かつ同時に起動されるケースを考える。
メモリカードの性能上、一つのアプリケーションのタスクが終了するまではメモリカード上にある他のアプリケーションの処理を開始することはできない。
メモリカード一つのタスクは数個のコマンドを順番に実行することにより処理されることが知られている。
しかし、複数同時起動のように1つのタスクを実行中に他のカードアプリケーションに送信するコマンドが送られると、メモリカードは現在実行中のタスクに送られたものと誤認しエラーが発生したり、万一エラーとならなくても誤動作することは確実であるという問題がある。
また、カードアプリケーションがICカード利用端末側から送信されたコマンドの処理をしている最中に、ICカード利用端末上のマルチタスクによりICカード利用端末側のアプリケーションが切り替わった場合、メモリカードがそのコマンドの処理を終わりそのコマンドに対する何らかの応答を返す場合、アプリケーションが切り替わってしまっているため、本来返すべきアプリケーションに応答が返らないことになリ、ここでもエラーを発生するという可能性があるという問題がある。
本発明の目的は、上記の問題を解決し、コマンドの送信ミスおよびレスポンスのあて先間違いをなくすことにある。
【0004】
【課題を解決するための手段】
上記目的を達成するために、本発明は、リーダライタを介してメモリカードと接続される、処理装置と記憶装置を有するICカード利用端末におけるコマンド制御方法であり、
メモリカードに送るコマンドを一時的に蓄積するコマンドキューを有し、メモリカードに送るコマンド及びメモリカードから送られたコマンドに対する制御を行うミドルウェアを記憶装置に格納し、
記憶装置に格納されている端末アプリケーションからメモリカードに送るコマンドが発生したとき、他の端末アプリケーションからメモリカードに送られたコマンドが実行中であるかミドルウェアにより判定し、実行中の場合、ミドルウェアにより端末アプリケーションから発生したコマンドをコマンドキューに蓄積し、
実行中のコマンドが終了したとき、コマンドキューに蓄積されたコマンドをメモリカードに送信する。
さらに、ミドルウェアはコマンドの送信元と送信先の関係を示す識別IDを蓄積するID管理DBを有し、
記憶装置に格納されている端末アプリケーションからメモリカードに送るコマンドが発生したとき、ミドルウェアにより該コマンドに割り当てられた識別IDがID管理DBに存在するか判定し、存在するとき、該コマンドに割り当てられた識別IDをコマンドに付加して該コマンドを該メモリカードに送信し、存在しないとき、一意な識別IDを作成し、該識別IDと、送信元と送信先の関係とを前記ID管理DBに登録し、該識別IDをコマンドに付加して該コマンドを該メモリカードに送信する。
また、リーダライタを介してICカード利用端末と接続される、処理装置と記憶装置を有するメモリカードにおけるコマンド制御方法であり、
ICカード利用端末から送られたコマンドに付加された送信元と送信先の関係を示す識別IDを蓄積するID管理DBを有し、ICカード利用端末から送られたコマンド及びICカード利用端末に送るコマンドに対する制御を行うミドルウェアを記憶装置に格納し、
ICカード利用端末から送られたコマンドを受信したとき、ミドルウェアにより該コマンドに割り当てられた識別IDがID管理DBに存在するか判定し、存在するとき、該コマンドに付加された識別IDを除去して該コマンドを送信先の記憶装置に格納されているカードアプリケーションに対して送信し、存在しないとき、該コマンドに付加された識別IDをID管理DBに蓄積し、該コマンドに付加された識別IDを除去して該コマンドを該コマンドに付された送信先の記憶装置に格納されているカードアプリケーションに対して送信する。
【0005】
【発明の実施の形態】
以下、本発明の実施の形態を詳細に説明する。
図1は、本発明の概略構成を示す図である。
カードアプリケーションの複数同時起動処理は、セキュリティアプリケーションやクレジットアプリケーションなど複数のICカード利用端末側アプリケーションを同時に動作させることが可能であり、更にカードマルチタスクを補助するためのミドルウェアを組み込んだICカード利用端末1と、それに接続されたメモリカードとICカード利用端末間のデータ通信を行うカードリーダライター2と、複数のカードアプリケーションを搭載して、さらにICカード利用端末と同様にマルチタスクを補助するためのミドルウェアを組み込んだ媒体であるメモリカード3からなる。
【0006】
図2は図1の1で示した本実施形態でのカードアプリケーションを複数同時に呼び出すICカード利用端末の構造を示している。
ICカード利用端末1は処理装置11、記憶装置12、カードとやり取りを行うリーダライタ2やディスプレイなどの外部出力装置14とのデータ通信を行うユーザI/O部13を有する。
記憶装置12にはカードアプリケーションを利用するアプリケーションが格納されているアプリケーションプログラム格納部121と、本発明でカードアプリケーションの複数同時起動の処理を実現するのに必要なマルチタスク補助ミドルウェア122と、OSとして機能する制御プログラム123が格納され、アプリケーションプログラム格納部121には1以上の端末アプリケーションが格納される。
マルチタスク補助ミドルウェア122には、ICカードに送るコマンドを一時的に蓄積するためのコマンドキュー1222と、識別IDに関連するICカード利用端末アプリケーションとカードアプリケーションを記述したテーブルであるID管理DB1221を持つ。
処理装置11は、端末アプリケーション、マルチタスク補助ミドルウェア、制御プログラムにしたがつて処理を行う。
【0007】
図3では図1に示したメモリカード3の構造を示す。
本実施形態のメモリカード3は、マイクロプロセッサのような処理装置31と、EEPROM、フラッシュメモリなどの記憶装置32と、図1に示したリーダライタ2のような機器との間でデータ、メッセージなどの転送を行うためのインタフェース部33を持つ。
記憶装置32にはセキュリティやクレジット、ポイントサービスといった各種の機能を実現するためのカードアプリケーションを格納するためのアプリケーションプログラム格納部321と、本発明でカードアプリケーションの複数同時起動を実現するためのマルチタスク補助ミドルウェア322と、メモリカードのOSとも言うべき制御プログラム323が格納され、アプリケーションプログラム格納部321には1以上のカードアプリケーションが格納される。
処理装置31は、アプリケーションプログラム格納部321に格納されたアプリケーション処理を実行し、これらのアプリケーションにより達成される各種の機能を実現し、また、マルチタスク補助ミドルウェア、制御プログラムにしたがって処理を行う。
アプリケーションプログラム格納部321は記憶装置のメモリ容量の許す限り、複数のアプリケーションを格納することができる。
【0008】
図4は本発明における実施形態であるカードアプリケーション複数同時起動におけるシステム処理方法のフローチャートの例である。
まず、処理装置により起動され実行中のICカード利用端末1上のアプリケーションA1211からメモリカード上のアプリケーションa3211に対するタスクを構成するコマンドが発生する(ステップ100)。タスクを構成するコマンドのうち、最初のコマンドと最後のコマンドには、それぞれ最初であることを示す情報と最後であることを示す情報が付されている。
次に本実施形態では、メモリカードへのコマンド要求は、処理装置11において全てICカード利用端末側マルチタスク補助ミドルウェア122を用いて処理され、このミドルウェア122のID管理DB1221を参照して送られてきたコマンドの送信元と送信先の関係を示す識別IDを検索し、識別IDが既に存在するかどうか判定する(ステップ101)。
存在した場合は、既に割り当てられている識別IDをコマンドに付加し、メモリカード3にカード側マルチタスク補助ミドルウェア322に対するコマンドとして送信する。
【0009】
存在しない場合は、一意な識別IDを作成し、この識別IDと、送信元と送信先の関係とをDB1221へ新たに登録し、この識別IDをコマンドに付加し、メモリカードにカード側マルチタスク補助ミドルウェア322に対するコマンドとして送信する(ステップ102)。
ICカード利用端末1上の端末アプリケーションA1211からのカードアプリケーションa3211に対する最初のコマンドには送信先が記述されており、送信元はコマンド受取時にICカード利用端末側マルチタスク補助ミドルウェア122により認識されるため、識別IDの送信元と送信先の関係を取得できる。
【0010】
メモリカード3に送られてきたメモリカードへのコマンド要求は、処理装置において全てメモリカード側マルチタスク補助ミドルウェア322を用いて処理され、このミドルウェア322のID管理DB3221を参照して送られてきたコマンドに付された識別IDを検索し、識別IDが既に存在するかどうか判定する(ステップ103)。
存在しなければ、この識別IDをID管理DB3221に新たに登録し、最初のコマンドに付された送信先をこの識別IDに対応する送信先として登録する(ステップ104)。
コマンドに付加されてきた識別番号はカードアプリケーションには不要なのでここで除去する(ステップ105)。
除去した後の本来のコマンドを搭載されている複数のカードアプリケーションのうち該当するアプリケーションに対して送信する。
メモリカード内の処理装置31はコマンド送信先のカードアプリケーションードによりコマンドの処理を行う。
【0011】
この際、ICカード利用端末1のマルチタスクシステムによりコマンドaが実行中であるにもかかわらず、ICカード利用端末1上のアプリケーションB1212からメモリカード上のアプリケーションB3211に対するコマンドbの送信要求が発生する可能性もある(ステップ106)。
このときICカード利用端末1の処理装置11は前コマンドがまだ実行中であることから、ICカード利用端末側マルチタスク補助ミドルウェア122により、このコマンドの実行を一時保留するためにコマンドキュー1222にコマンドbをプールする(ステップ107)。
コマンドaのメモリカード内での処理が終わると、処理をしたカードアプリケーションによる処理結果をカード側マルチタスク補助ミドルウェア322に対して返信する(ステップ108)。
処理装置31は、カード側マルチタスク補助ミドルウェア322によって管理DB3221と処理結果を返信したカードアプリケーションを照合し、ICカード利用端末1への返信情報に入力時と同じ識別IDを付加し、ICカード利用端末側マルチタスク補助ミドルウェア122に対する返信情報として処理装置11に送る(ステップ109)。
処理装置11は、ICカード利用端末側マルチタスク補助ミドルウェア122により付属された識別IDから返信先の端末アプリケーションを特定し、返信情報を送る(ステップ110)。
返信まで済んだことが確認されれば、コマンドキュー1222にプールされていたコマンドbが実行状態に移され、コマンドaと同様の処理が行われる(ステップ111)。
【0012】
図5では、タスク中に異なるカードアプリケーションへのコマンド要求が起こった場合のコマンドの処理と時間の関係を表したものである。
図では、まずICカード利用端末アプリケーションA1211からのコマンドa1を処理装置11がメモリカードに送信してその返答をもらうまでの時間が矢印で表されている(ステップ500)。
次にコマンドa1終了後にコマンドa2が送信され、処理が行われる(ステップ501)。
このa2処理最中にICカード利用端末アプリケーションB1212からコマンドb1が送信されると(ステップ502)、コマンドa2の処理が終わるまでコマンドキュー1222にプールされ、実行は遅延されて、終わり次第処理される(ステップ503)。
コマンドb2が処理されている最中にICカード利用端末アプリケーションA1211よりコマンドa3が送信されてもコマンドキュー1222にプールされ(ステップ504)、コマンドb2が処理終わってからコマンドa3は処理される(ステップ505)。
【0013】
図6はICカード利用端末アプリケーションA1211からコマンドのメモリカード3への送信時に両側のマルチタスク補助ミドルウェア122、および322のフローを描いた図である。
まずICカード利用端末側アプリケーションA1211より新規にコマンドを送信する(ステップ600)。
ICカード利用端末側マルチタスク補助ミドルウェア122内のコマンドキュー1222にコマンドが残されているかの判別をする(ステップ601)。
もし残っているならばコマンドキュー1222内のコマンドが優先なので、新規コマンドはコマンドキュー1222の最後尾に回される。
コマンドキュー1222内にコマンドが残ってなければ次に処理が終わっていないコマンドがあるかどうかの判別を行う。
これは、メモリカードからの応答待ちがあるかどうかで判断する(ステップ603)。
コマンドキュー1222内のコマンドがなく、応答待ちもなければこの新規コマンドは処理ができるとしてステップ800に進む。
【0014】
また、新規のコマンドが発生しなくてもコマンドの応答が終了した時点でコマンドキュー1222にコマンドが残っていればその処理を行わなければいけないので、まず応答待ち処理があるかどうか判別する(ステップ700)。
応答待ちがなければコマンドキュー1222にコマンドが残っているかどうかを調べる(ステップ701)。
コマンドが残っていれば、コマンドキュー1222内の最も古いコマンドを処理可能コマンドとして選択し、ステップ800に飛ぶ。
処理の可能なコマンドが選択されるとICカード利用端末側マルチタスク補助ミドルウェア122によりコマンド内容から送信先と送信元アプリケーションを特定して、識別IDが付与されているかどうかをID管理DB1221を用い判定する(ステップ800)。
なければ新たな識別IDをキーとして送信先アプリケーション名と送信元アプリケーション名を登録する(ステップ801)。
登録が済んだか、もともと識別IDを持っているならばその識別IDをコマンドに付加してメモリカード3に送信する(ステップ802)。
メモリカード3の処理装置31は、カード側マルチタスク補助ミドルウェア322により、コマンドに付加されてきた識別IDが新規であるならばID管理DB3221に登録する(ステップ803)。
送信先カードアプリケーションにコマンドを送る場合は、識別用IDは必要なくなるのではずしてから送られる(ステップ804)。
【0015】
図7は、カードアプリケーションでのコマンド処理の終了後から、ICカード利用端末側アプリケーションへの応答までのカード側マルチタスク補助ミドルウェア322とICカード利用端末側マルチタスク補助ミドルウェア122による処理を表した図である。
処理結果を受け取った後、アプリケーション送信時の識別IDを付加する(ステップ900)。
その際に、終了したコマンドがタスクを構成するコマンドの最後のコマンドであればタスク終了であり、その識別IDは使用されなくなるのでID管理DB3221からその識別IDを削除する(ステップ901)。
ICカード利用端末1では、ICカード利用端末側マルチタスク補助ミドルウェア122により、返信されてきた識別IDから返信すべきICカード利用端末側アプリケーションを特定する(ステップ902)。
同じくタスク終了ならばこちら側のID管理DB1221からも識別IDを削除する(ステップ903)。
最後に処理結果を返すべき端末アプリケーションに送信して終了となる(ステップ904)。
【0016】
【発明の効果】
以上述べたように、本発明により、ICカード利用端末1上とメモリカード3上にマルチタスク補助ミドルウェアを持たせることで、ICカード利用端末1上のマルチタスクシステムから複数のカードアプリケーションへの起動の要求が同時に来てもそれを制御して不具合無く実行することが可能である。
【図面の簡単な説明】
【図1】本発明が対象とするシステムの基本的な構成を示した図である。
【図2】ICカード利用端末の内部構造を示す図である。
【図3】メモリカードの構造を示す図である。
【図4】ICカード利用端末とメモリカード間の処理のフローチャートを示す図である。
【図5】コマンドの処理と時間軸の関係を表した図である。
【図6】 ICカード利用端末からコマンド送信が行われ、メモリカード内のアプリが受け取るまでに行われる各ミドルウェアに係る処理のフローチャートを示す図である。
【図7】メモリカードからICカード利用端末へ応答結果が返るまでに行われる各ミドルウェアに係る処理のフローチャートを示す図である。
【符号の説明】
1 ICカード利用端末
11 処理装置
12 記憶装置
121 アプリケーションプログラム格納部
1211、1212 端末アプリケーション
122 マルチタスク補助ミドルウェア
1222 コマンドキュー
1221 ID管理DB
123 制御プログラム
13 ユーザI/O
14 出力装置
2 リーダライタ
3 メモリカード
31 処理装置
32 記憶装置
321 アプリケーションプログラム格納部
3211、3212 カードアプリケーション
322 マルチタスク補助ミドルウェア
3221 ID管理DB
323 制御プログラム
33 インタフェース部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method of executing a plurality of card applications stored in a memory card having a processing device and a storage device, and in particular, when a plurality of commands are started simultaneously, a command that is not addressed to the user is received and a malfunction occurs. The reply destination also describes a mechanism that can be executed normally by avoiding the possibility that it cannot be returned to the application that should be returned depending on the timing due to multitasking.
[0002]
[Prior art]
A device called an IC card that has a large-capacity storage device on a card and enables calculation processing on the card has been put into practical use.
In recent years, the performance of this IC card has been improved and it has a lightweight OS on the card, making it possible to create a multi-application card that can have not only one application but also multiple different types of applications on a single card. became.
With the realization of multi-applications, for example, a bank cash card application or a credit card company credit card application can be combined on a single card, so that the user has no need to manage multiple cards. became.
On the other hand, although it is possible for an IC card to have a plurality of applications, there is a possibility that a plurality of simultaneous executions by multitasking currently performed on a PC will cause a problem in performance.
When sending a command to both a credit card application and a point card system application as a conventional IC card multi-application execution method, a command transmission request to the other point application is being executed while one credit application task is being executed. When it comes, the security status being executed is temporarily saved in a safe area, and the requested application is allowed to be executed.
When the execution is completed, the saved security status is restored and the original application is returned to the execution state.
As a result, there is a multi-application execution method described in Japanese Patent Laid-Open No. 2001-307043 that enables re-execution from a state where security authentication in the middle stage is completed without re-executing the application from scratch.
[0003]
[Problems to be solved by the invention]
Consider a case where a plurality of applications are mounted on one memory card as described above and are activated simultaneously.
Due to the performance of the memory card, processing of another application on the memory card cannot be started until the task of one application is completed.
It is known that a task of a memory card is processed by sequentially executing several commands.
However, if a command to be sent to another card application is sent while one task is being executed, such as multiple simultaneous activations, the memory card will mistakenly be sent to the currently running task and an error will occur. There is a problem that it is certain that a malfunction will occur even if an error does not occur.
Also, if the application on the IC card user terminal is switched by multitasking on the IC card user terminal while the card application is processing the command transmitted from the IC card user terminal, the memory card When the command processing is finished and some response to the command is returned, the application is switched, so the response will not be returned to the application that should be returned, and there is a possibility that an error will occur again There is.
An object of the present invention is to solve the above-described problems and eliminate a command transmission error and a response destination error.
[0004]
[Means for Solving the Problems]
In order to achieve the above object, the present invention is a command control method in an IC card using terminal having a processing device and a storage device connected to a memory card via a reader / writer,
A command queue for temporarily storing commands to be sent to the memory card; storing commands sent to the memory card and middleware for controlling the commands sent from the memory card in a storage device;
When a command sent from the terminal application stored in the storage device to the memory card occurs, the middleware determines whether the command sent from the other terminal application to the memory card is being executed. Accumulate commands generated from the terminal application in the command queue,
When the command being executed is completed, the command stored in the command queue is transmitted to the memory card.
Furthermore, the middleware has an ID management DB for storing an identification ID indicating the relationship between the command transmission source and the transmission destination,
When a command to be sent to the memory card from the terminal application stored in the storage device occurs, the middleware determines whether the identification ID assigned to the command exists in the ID management DB. The identification ID is added to the command and the command is transmitted to the memory card. When the command does not exist, a unique identification ID is created, and the relationship between the identification ID and the transmission source and the transmission destination is stored in the ID management DB. Register, add the identification ID to the command, and send the command to the memory card.
Also, a command control method in a memory card having a processing device and a storage device connected to an IC card using terminal via a reader / writer,
It has an ID management DB that accumulates identification IDs indicating the relationship between the transmission source and the transmission destination added to the command sent from the IC card using terminal, and sends the command sent from the IC card using terminal and the IC card using terminal The middleware that controls the command is stored in the storage device,
When the command sent from the IC card using terminal is received, the middleware determines whether the identification ID assigned to the command exists in the ID management DB, and when it exists, removes the identification ID added to the command. The command is transmitted to the card application stored in the destination storage device, and when it does not exist, the identification ID added to the command is stored in the ID management DB, and the identification ID added to the command is stored. And the command is transmitted to the card application stored in the destination storage device attached to the command.
[0005]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail.
FIG. 1 is a diagram showing a schematic configuration of the present invention.
Multiple simultaneous activation processing of card applications can simultaneously operate a plurality of IC card using terminal side applications such as a security application and a credit application, and further, an IC card using terminal incorporating middleware for assisting card multitasking 1 and a card reader / writer 2 that performs data communication between a memory card connected to the IC card and a terminal using an IC card, and a plurality of card applications, and further assists multitasking in the same manner as an IC card terminal. The memory card 3 is a medium incorporating middleware.
[0006]
FIG. 2 shows the structure of an IC card using terminal for simultaneously calling a plurality of card applications in this embodiment shown by 1 in FIG.
The IC card using terminal 1 includes a processing device 11, a storage device 12, and a user I / O unit 13 that performs data communication with a reader / writer 2 that communicates with the card and an external output device 14 such as a display.
The storage device 12 stores an application program storage unit 121 in which an application that uses a card application is stored, multitasking auxiliary middleware 122 necessary for realizing a process for simultaneously starting a plurality of card applications in the present invention, and an OS A functioning control program 123 is stored, and the application program storage unit 121 stores one or more terminal applications.
The multitasking auxiliary middleware 122 has a command queue 1222 for temporarily storing commands to be sent to the IC card, and an ID management DB 1221 which is a table describing the IC card using terminal application and the card application related to the identification ID. .
The processing device 11 performs processing according to a terminal application, multitasking auxiliary middleware, and a control program.
[0007]
FIG. 3 shows the structure of the memory card 3 shown in FIG.
The memory card 3 of the present embodiment includes data, messages, etc. between a processing device 31 such as a microprocessor, a storage device 32 such as EEPROM and flash memory, and a device such as the reader / writer 2 shown in FIG. Has an interface unit 33 for performing the transfer.
The storage device 32 has an application program storage unit 321 for storing a card application for realizing various functions such as security, credit, and point service, and a multitask for realizing a plurality of simultaneous activations of the card application in the present invention. Auxiliary middleware 322 and a control program 323 that can be called an OS of a memory card are stored, and one or more card applications are stored in the application program storage unit 321.
The processing device 31 executes application processing stored in the application program storage unit 321, implements various functions achieved by these applications, and performs processing according to multitasking auxiliary middleware and control programs.
The application program storage unit 321 can store a plurality of applications as long as the memory capacity of the storage device permits.
[0008]
FIG. 4 is an example of a flowchart of a system processing method in simultaneous activation of a plurality of card applications according to the embodiment of the present invention.
First, a command constituting a task for the application a 3211 on the memory card is generated from the application A 1211 on the IC card using terminal 1 activated and executed by the processing device (step 100). Of the commands that make up the task, the first command and the last command have information indicating the beginning and information indicating the end, respectively.
Next, in this embodiment, all command requests to the memory card are processed by the processing device 11 using the IC card using terminal-side multitask auxiliary middleware 122 and sent by referring to the ID management DB 1221 of the middleware 122. The identification ID indicating the relationship between the transmission source and the transmission destination of the received command is searched to determine whether the identification ID already exists (step 101).
If it exists, the already assigned identification ID is added to the command and transmitted to the memory card 3 as a command for the card-side multitasking auxiliary middleware 322.
[0009]
If it does not exist, a unique identification ID is created, and this identification ID and the relationship between the transmission source and the transmission destination are newly registered in the DB 1221, this identification ID is added to the command, and the card side multitask is added to the memory card. This is transmitted as a command to the auxiliary middleware 322 (step 102).
Since the transmission destination is described in the first command for the card application a 3211 from the terminal application A 1211 on the IC card using terminal 1, and the transmission source is recognized by the IC card using terminal side multitasking auxiliary middleware 122 when the command is received. The relationship between the transmission source and the transmission destination of the identification ID can be acquired.
[0010]
All the command requests to the memory card sent to the memory card 3 are processed by the processing device using the memory card side multitasking auxiliary middleware 322, and the command sent by referring to the ID management DB 3221 of the middleware 322 The identification ID attached to is searched to determine whether the identification ID already exists (step 103).
If it does not exist, this identification ID is newly registered in the ID management DB 3221, and the transmission destination attached to the first command is registered as the transmission destination corresponding to this identification ID (step 104).
Since the identification number added to the command is unnecessary for the card application, it is removed here (step 105).
The original command after the removal is transmitted to the corresponding application among a plurality of card applications that are mounted.
The processing device 31 in the memory card processes the command according to the card application destination of the command transmission destination.
[0011]
At this time, even though the command a is being executed by the multitask system of the IC card using terminal 1, a transmission request for the command b is generated from the application B 1212 on the IC card using terminal 1 to the application B 3211 on the memory card. There is also a possibility (step 106).
At this time, since the previous command is still being executed by the processing device 11 of the IC card using terminal 1, the IC card using terminal side multitasking auxiliary middleware 122 sends a command to the command queue 1222 to temporarily hold the execution of this command. b is pooled (step 107).
When the processing of the command a in the memory card is completed, the processing result of the processed card application is returned to the card-side multitasking auxiliary middleware 322 (step 108).
The processing device 31 compares the management DB 3221 with the card application that returned the processing result by the card-side multitasking auxiliary middleware 322, adds the same identification ID as the input to the reply information to the IC card using terminal 1, and uses the IC card It is sent to the processing device 11 as reply information to the terminal-side multitasking auxiliary middleware 122 (step 109).
The processing device 11 identifies a terminal application as a reply destination from the identification ID attached by the IC card using terminal-side multitask auxiliary middleware 122, and sends reply information (step 110).
If it is confirmed that the reply has been completed, the command b pooled in the command queue 1222 is moved to the execution state, and the same processing as the command a is performed (step 111).
[0012]
FIG. 5 shows the relationship between command processing and time when a command request to a different card application occurs during a task.
In the figure, first, the time from when the processing device 11 sends a command a1 from the IC card using terminal application A 1211 to the memory card and receiving a response is indicated by an arrow (step 500).
Next, after the completion of the command a1, the command a2 is transmitted and processing is performed (step 501).
When the command b1 is transmitted from the IC card using terminal application B1212 during the a2 processing (step 502), the command is pooled in the command queue 1222 until the processing of the command a2 is completed, and the execution is delayed and processed as soon as the processing ends. (Step 503).
Even if the command a3 is transmitted from the IC card using terminal application A 1211 while the command b2 is being processed, it is pooled in the command queue 1222 (step 504), and the command a3 is processed after the command b2 is processed (step 504). 505).
[0013]
FIG. 6 is a diagram depicting the flow of the multitasking auxiliary middleware 122 and 322 on both sides when a command is transmitted from the IC card using terminal application A 1211 to the memory card 3.
First, a new command is transmitted from the IC card using terminal side application A 1211 (step 600).
It is determined whether a command remains in the command queue 1222 in the IC card using terminal side multitasking auxiliary middleware 122 (step 601).
If it remains, the command in the command queue 1222 has priority, so the new command is routed to the end of the command queue 1222.
If no command remains in the command queue 1222, it is determined whether there is a command that has not been processed next.
This is determined by whether or not there is a response from the memory card (step 603).
If there is no command in the command queue 1222 and there is no response waiting, this new command can be processed and the process proceeds to Step 800.
[0014]
Even if a new command does not occur, if the command remains in the command queue 1222 when the command response is completed, it must be processed, so first determine whether there is a response waiting process (step 700).
If there is no response waiting, it is checked whether or not a command remains in the command queue 1222 (step 701).
If a command remains, the oldest command in the command queue 1222 is selected as a processable command, and the process jumps to Step 800.
When a processable command is selected, the IC card using terminal side multitasking auxiliary middleware 122 identifies the transmission destination and the transmission source application from the command contents, and determines whether or not an identification ID is given using the ID management DB 1221 (Step 800).
If not, the destination application name and the source application name are registered using the new identification ID as a key (step 801).
If registration has been completed or if the user originally has an identification ID, the identification ID is added to the command and transmitted to the memory card 3 (step 802).
If the identification ID added to the command is new by the card-side multitasking auxiliary middleware 322, the processing device 31 of the memory card 3 registers it in the ID management DB 3221 (step 803).
When sending a command to the destination card application, the ID for identification is no longer necessary and is sent after being removed (step 804).
[0015]
FIG. 7 is a diagram showing processing by the card side multitasking auxiliary middleware 322 and the IC card using terminal side multitasking auxiliary middleware 122 from the end of command processing in the card application to the response to the IC card using terminal side application. It is.
After receiving the processing result, an identification ID at the time of application transmission is added (step 900).
At this time, if the finished command is the last command of the commands constituting the task, the task is finished and the identification ID is not used, so the identification ID is deleted from the ID management DB 3221 (step 901).
In the IC card using terminal 1, the IC card using terminal side multitask auxiliary middleware 122 specifies the IC card using terminal side application to be returned from the returned identification ID (step 902).
If the task is also completed, the identification ID is deleted from the ID management DB 1221 on this side (step 903).
Finally, the processing result is transmitted to the terminal application to be returned, and the process ends (step 904).
[0016]
【The invention's effect】
As described above, according to the present invention, by providing the multitasking auxiliary middleware on the IC card using terminal 1 and the memory card 3, the multitasking system on the IC card using terminal 1 can be activated to a plurality of card applications. Even if these requests come simultaneously, they can be controlled and executed without problems.
[Brief description of the drawings]
FIG. 1 is a diagram showing a basic configuration of a system targeted by the present invention.
FIG. 2 is a diagram showing an internal structure of an IC card using terminal.
FIG. 3 is a diagram showing a structure of a memory card.
FIG. 4 is a diagram showing a flowchart of processing between an IC card using terminal and a memory card.
FIG. 5 is a diagram illustrating a relationship between command processing and a time axis.
FIG. 6 is a diagram illustrating a flowchart of processing related to each middleware performed until a command is transmitted from an IC card using terminal and an application in a memory card is received.
FIG. 7 is a diagram illustrating a flowchart of processing related to each middleware performed until a response result is returned from the memory card to the IC card using terminal.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 IC card utilization terminal 11 Processing apparatus 12 Storage apparatus 121 Application program storage part 1211, 1212 Terminal application 122 Multitask auxiliary middleware 1222 Command queue 1221 ID management DB
123 Control program 13 User I / O
14 Output device 2 Reader / writer 3 Memory card 31 Processing device 32 Storage device 321 Application program storage unit 3211, 3212 Card application 322 Multitask auxiliary middleware 3221 ID management DB
323 Control program 33 Interface section

Claims (4)

リーダライタを介してメモリカードと接続される、処理装置と記憶装置を有するICカード利用端末におけるコマンド制御方法であって、
前記メモリカードに送るコマンドを一時的に蓄積するコマンドキューを有し、該メモリカードに送るコマンド及び該メモリカードから送られたコマンドに対する制御を行うミドルウェアを前記記憶装置に格納し、
前記記憶装置に格納されている端末アプリケーションから該メモリカードに送るコマンドが発生したとき、他の端末アプリケーションから該メモリカードに送られたコマンドが実行中であるか該ミドルウェアにより判定し、実行中の場合、該ミドルウェアにより該端末アプリケーションから発生したコマンドを該コマンドキューに蓄積し、
実行中のコマンドが終了したとき、該コマンドキューに蓄積されたコマンドを前記メモリカードに送信し、
前記ミドルウェアはコマンドの送信元と送信先の関係を示す識別IDを蓄積するID管理DBを有し、
前記記憶装置に格納されている端末アプリケーションから前記メモリカードに送るコマンドが発生したとき、前記ミドルウェアにより該コマンドに割り当てられた識別IDが前記ID管理DBに存在するか判定し、存在するとき、該コマンドに割り当てられた識別IDをコマンドに付加して該コマンドを該メモリカードに送信し、存在しないとき、一意な識別IDを作成し、該識別IDと、送信元と送信先の関係とを前記ID管理DBに登録し、該識別IDをコマンドに付加して該コマンドを該メモリカードに送信することを特徴とするコマンド制御方法。
A command control method in an IC card using terminal having a processing device and a storage device connected to a memory card via a reader / writer,
A command queue for temporarily accumulating commands to be sent to the memory card, storing commands to be sent to the memory card and middleware for controlling the commands sent from the memory card in the storage device;
When a command to be sent to the memory card from the terminal application stored in the storage device occurs, it is determined by the middleware whether the command sent to the memory card from another terminal application is being executed. The commands generated from the terminal application by the middleware are accumulated in the command queue,
When the command being executed is completed, the command stored in the command queue is transmitted to the memory card,
The middleware has an ID management DB for storing an identification ID indicating a relationship between a command transmission source and a transmission destination,
When a command to be sent from the terminal application stored in the storage device to the memory card occurs, it is determined whether the identification ID assigned to the command by the middleware exists in the ID management DB. The identification ID assigned to the command is added to the command, and the command is transmitted to the memory card. When the command does not exist, a unique identification ID is created, and the relationship between the identification ID and the transmission source and the transmission destination is A command control method comprising: registering in an ID management DB, adding the identification ID to a command, and transmitting the command to the memory card.
リーダライタを介してICカード利用端末と接続される、処理装置と記憶装置を有するメモリカードにおけるコマンド制御方法であって、
前記ICカード利用端末から送られたコマンドに付加された送信元と送信先の関係を示す識別IDを蓄積するID管理DBを有し、該ICカード利用端末から送られたコマンド及び該ICカード利用端末に送るコマンドに対する制御を行うミドルウェアを前記記憶装置に格納し、
該ICカード利用端末から送られたコマンドを受信したとき、該ミドルウェアにより該コマンドに割り当てられた識別IDが該ID管理DBに存在するか判定し、存在するとき、該コマンドに付加された識別IDを除去して該コマンドを送信先の前記記憶装置に格納されているカードアプリケーションに対して送信し、存在しないとき、該コマンドに付加された識別IDを該ID管理DBに蓄積し、該コマンドに付加された識別IDを除去して該コマンドを該コマンドに付された送信先の前記記憶装置に格納されているカードアプリケーションに対して送信することを特徴とするコマンド制御方法。
A command control method for a memory card having a processing device and a storage device connected to an IC card using terminal via a reader / writer,
An ID management DB for storing an identification ID indicating a relationship between a transmission source and a transmission destination added to a command sent from the IC card using terminal, and the command sent from the IC card using terminal and the IC card using Middleware for controlling the command sent to the terminal is stored in the storage device;
When a command sent from the IC card using terminal is received, it is determined whether or not the identification ID assigned to the command by the middleware exists in the ID management DB, and if present, the identification ID added to the command And the command is transmitted to the card application stored in the storage device of the transmission destination, and when it does not exist, the identification ID added to the command is accumulated in the ID management DB, and A command control method characterized by removing the added identification ID and transmitting the command to the card application stored in the storage device of the transmission destination attached to the command.
リーダライタを介してメモリカードと接続される、処理装置と記憶装置を有するICカード利用端末装置であって、
前記記憶装置に格納されている端末アプリケーションから該メモリカードに送るコマンドが発生したとき、他の端末アプリケーションから該メモリカードに送られたコマンドが実行中であるかを判定し、実行中の場合、該端末アプリケーションから発生したコマンドをコマンドキューに蓄積し、実行中のコマンドが終了したとき、該コマンドキューに蓄積されたコマンドを前記メモリカードに送信する手段を有し、
前記手段は、さらにコマンドの送信元と送信先の関係を示す識別IDを蓄積するID管理DBを有し、前記記憶装置に格納されている端末アプリケーションから前記メモリカードに送るコマンドが発生したとき、該コマンドに割り当てられた識別IDが前記ID管理DBに存在するか判定し、存在するとき、該コマンドに割り当てられた識別IDをコマンドに付加して該コマンドを該メモリカードに送信し、存在しないとき、一意な識別IDを作成し、該識別IDと、送信元と送信先の関係とを前記ID管理DBに登録し、該識別IDをコマンドに付加して該コマンドを該メモリカードに送信することを特徴とするICカード利用端末装置。
An IC card using terminal device having a processing device and a storage device connected to a memory card via a reader / writer,
When a command sent from the terminal application stored in the storage device to the memory card occurs, it is determined whether the command sent from the other terminal application to the memory card is being executed. The command generated from the terminal application is stored in a command queue, and when the command being executed is terminated, the command stored in the command queue is transmitted to the memory card,
The means further includes an ID management DB for storing an identification ID indicating a relationship between a transmission source and a transmission destination of a command, and when a command to be sent to the memory card from a terminal application stored in the storage device is generated. It is determined whether or not the identification ID assigned to the command exists in the ID management DB, and when it exists, the identification ID assigned to the command is added to the command and the command is transmitted to the memory card. A unique identification ID is created, the identification ID and the relationship between the transmission source and the transmission destination are registered in the ID management DB, the identification ID is added to the command, and the command is transmitted to the memory card. An IC card using terminal device.
リーダライタを介してICカード利用端末と接続される、処理装置と記憶装置を有するメモリカードであって、
前記ICカード利用端末から送られたコマンドに付加された送信元と送信先の関係を示す識別IDを蓄積するID管理DBを有し、該ICカード利用端末から送られたコマンドを受信し、該コマンドに割り当てられた識別IDが該ID管理DBに存在するか判定し、存在するとき、該コマンドに付加された識別IDを除去して該コマンドを送信先の前記記憶装置に格納されているカードアプリケーションに対して送信し、存在しないとき、該コマンドに付加された識別IDを該ID管理DBに蓄積し、該コマンドに付加された識別IDを除去して該コマンドを該コマンドに付された送信先の前記記憶装置に格納されているカードアプリケーションに対して送信する手段を有することを特徴とするメモリカード。
A memory card having a processing device and a storage device connected to an IC card using terminal via a reader / writer,
An ID management DB for storing an identification ID indicating a relationship between a transmission source and a transmission destination added to a command sent from the IC card using terminal, receiving the command sent from the IC card using terminal, It is determined whether or not the identification ID assigned to the command exists in the ID management DB, and when it exists, the identification ID added to the command is removed, and the card stored in the storage device of the transmission destination When it does not exist, the identification ID added to the command is stored in the ID management DB, the identification ID added to the command is removed, and the command is attached to the command. A memory card comprising means for transmitting to a card application stored in the storage device.
JP2002121709A 2002-04-24 2002-04-24 Command control method, IC card terminal device and memory card Expired - Fee Related JP4212296B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002121709A JP4212296B2 (en) 2002-04-24 2002-04-24 Command control method, IC card terminal device and memory card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002121709A JP4212296B2 (en) 2002-04-24 2002-04-24 Command control method, IC card terminal device and memory card

Publications (2)

Publication Number Publication Date
JP2003317039A JP2003317039A (en) 2003-11-07
JP4212296B2 true JP4212296B2 (en) 2009-01-21

Family

ID=29537529

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002121709A Expired - Fee Related JP4212296B2 (en) 2002-04-24 2002-04-24 Command control method, IC card terminal device and memory card

Country Status (1)

Country Link
JP (1) JP4212296B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4620418B2 (en) * 2004-09-27 2011-01-26 大日本印刷株式会社 Real-time command processing method, IC card, and embedded terminal
JP5304193B2 (en) * 2008-11-18 2013-10-02 富士電機株式会社 IC card payment terminal, its control device, program
JP2013069108A (en) * 2011-09-22 2013-04-18 Toshiba Corp Ic card, portable electronic device and ic card control method
JP6017379B2 (en) * 2013-07-12 2016-11-02 株式会社東芝 Memory system and host device

Also Published As

Publication number Publication date
JP2003317039A (en) 2003-11-07

Similar Documents

Publication Publication Date Title
US5940612A (en) System and method for queuing of tasks in a multiprocessing system
CN101484873B (en) Simultaneous interface use
US20070074214A1 (en) Event processing method in a computer system
US5369700A (en) Multi-function telephone apparatus and control method
CN110532106A (en) The means of communication, device, equipment and storage medium between process
JP4212296B2 (en) Command control method, IC card terminal device and memory card
US8250275B2 (en) Secure MMC standard smartcard with multi-application operation capability, process of operation
CN103246496A (en) Non-blocking coprocessor interface method and non-blocking coprocessor interface system
US7240043B2 (en) Method of controlling storage control apparatus, storage control apparatus, and computer readable program for controlling the same
WO2002005202A1 (en) Ic card terminal device
JP3516049B2 (en) Batch job control system
JP4476658B2 (en) Portable electronic device, electronic processing system, and electronic processing method
JP5066884B2 (en) Information recording medium with built-in CPU and program
JP5092370B2 (en) Portable information recording medium and program thereof
JP3074722B2 (en) IC card communication system
JP4156217B2 (en) Information processing terminal device
JPH0449146B2 (en)
KR100564759B1 (en) Method for Changing ATR Answer To Reset in Smart Card Systems
JP2907275B2 (en) Command transfer method
JPH11353197A (en) Shared pool resource control system
JPH10320345A (en) Bus controller
CN111212045A (en) Encryption and decryption transmission method and transmission system for asynchronous communication of driving layer
JPH03219357A (en) Program execution control system
JP2003187193A (en) Card reader and communication control method for card reader
JPH0756863A (en) Parallel control system for divided sequence description

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040318

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050419

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071023

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071220

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: 20081021

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: 20081028

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

Free format text: PAYMENT UNTIL: 20111107

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: 20111107

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121107

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121107

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131107

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees