JP2018194995A - Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program - Google Patents

Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program Download PDF

Info

Publication number
JP2018194995A
JP2018194995A JP2017097113A JP2017097113A JP2018194995A JP 2018194995 A JP2018194995 A JP 2018194995A JP 2017097113 A JP2017097113 A JP 2017097113A JP 2017097113 A JP2017097113 A JP 2017097113A JP 2018194995 A JP2018194995 A JP 2018194995A
Authority
JP
Japan
Prior art keywords
data
storage
external device
position data
storage area
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.)
Granted
Application number
JP2017097113A
Other languages
Japanese (ja)
Other versions
JP7005934B2 (en
Inventor
正和 遠山
Masakazu Tooyama
正和 遠山
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 JP2017097113A priority Critical patent/JP7005934B2/en
Publication of JP2018194995A publication Critical patent/JP2018194995A/en
Application granted granted Critical
Publication of JP7005934B2 publication Critical patent/JP7005934B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

To provide an electronic information storage medium and the like capable of shortening processing time of a reading process targeting a plurality of data stored in a storage unit based on a read command from an external device.SOLUTION: A storage unit stores position data including storage area information which indicates respective storage areas of the plurality of data stored in the storage unit. A processing unit collectively transmits the data stored in each of the plurality of storage areas to the external device when the processing unit receives a data read command including identification information for identifying the position data from the external device. The data stored in each of the plurality of storage areas is indicated by the storage area information included in the position data identified by the identification information.SELECTED DRAWING: Figure 5

Description

IC(Integrated Circuit)チップ等の電子情報記憶媒体の技術分野に関する。   The present invention relates to the technical field of electronic information storage media such as IC (Integrated Circuit) chips.

ICチップにおける一般的なファイル構造は、Master File(MF)を頂点とした木構造になっており、MFの配下にDedicated File(DF)が配置され、DFの配下にElementary File(EF)が配置される(EFはMFの配下に配置されることもある)。   A general file structure in an IC chip is a tree structure with a Master File (MF) as a vertex, a Dedicated File (DF) is placed under the MF, and an Elementary File (EF) is placed under the DF. (EF may be placed under MF).

EFはアプリケーションで利用される各種データを格納するためのデータファイルであって、外部機器がEFに格納されたデータにアクセスするためには、データの位置を特定してアクセスする必要があり、如何に効率的にデータにアクセスするかが重要となる。特許文献1には、効率的にデータにアクセスするための技術が開示されている。   The EF is a data file for storing various data used in the application. In order for the external device to access the data stored in the EF, it is necessary to specify and access the data position. It is important to access data efficiently. Patent Document 1 discloses a technique for efficiently accessing data.

特許5259513号公報Japanese Patent No. 5259513

ところで、EFが一又は複数のレコード(データ)を含むレコード編成ファイルである場合において、外部機器が当該レコードにアクセスするためには、まず何れのファイルにアクセスするかを選択してから、当該ファイルに含まれるレコードを選択しなければならない。   By the way, in the case where the EF is a record organization file including one or more records (data), in order for the external device to access the record, first, which file is to be accessed is selected, and then the file You must select a record that is contained in.

国際規格ISO/IEC 7816−4に定義されているレコード操作用コマンドでは、外部機器はそのコマンドに含まれるパラメータによってファイルを指定し、更に別のパラメータによってレコードを指定することができる。ファイル指定用パラメータに設定可能なファイルは常に単一であり(カレントファイル、又はShort file identifierによる指定)、レコード指定用パラメータに設定可能なレコードは単一か、あるいは指定したレコードを起点にした連続する複数のレコードである(例えば、指定したレコードから最終レコードまで、等)。   In the record operation command defined in the international standard ISO / IEC 7816-4, the external device can specify a file by a parameter included in the command, and can further specify a record by another parameter. The file that can be set for the file specification parameter is always single (specified by the current file or the Short file identifier), and the record that can be set for the record specification parameter is single, or continuous starting from the specified record A plurality of records (for example, from a specified record to the last record, etc.).

そのため、外部機器が単一のファイルに配置され、かつ連続していない複数のレコードを操作(読み出しや書き込み)する場合や、複数のファイルに配置されたレコードを操作する場合には、パラメータを変更しながら複数のコマンドを送信しなければならず、全ての操作を完了するまでの処理時間が著しく長くなるという問題がある。   Therefore, when external devices are placed in a single file and multiple records that are not consecutive are manipulated (read or write), or when records placed in multiple files are manipulated, the parameters are changed. However, there is a problem that a plurality of commands must be transmitted, and the processing time until all the operations are completed becomes extremely long.

そこで、本発明は、外部機器からの読み出しコマンド又は書き込みコマンドに基づく、記憶部に記憶された複数のデータを対象とする読み出す処理又は書き込む処理の処理時間を短縮することができる電子情報記憶媒体等を提供することを目的とする。   Therefore, the present invention provides an electronic information storage medium capable of shortening the processing time of a read process or a write process for a plurality of data stored in a storage unit based on a read command or a write command from an external device. The purpose is to provide.

上記課題を解決するために、請求項1に記載の発明は、処理部と記憶部を備える電子情報記憶媒体であって、前記記憶部は、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶し、前記処理部は、外部機器から前記位置データを識別する識別情報を含むデータ読み出しコマンドを受信した場合に、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域のそれぞれに記憶されているデータをまとめて前記外部機器に送信することを特徴とする。   In order to solve the above-described problem, the invention according to claim 1 is an electronic information storage medium including a processing unit and a storage unit, wherein the storage unit is a plurality of pieces of data stored in the storage unit. Position data including storage area information indicating a storage area is stored, and when the processing unit receives a data read command including identification information for identifying the position data from an external device, the position identified by the identification information The data stored in each of the plurality of storage areas indicated by the storage area information included in the data is collectively transmitted to the external device.

請求項2に記載の発明は、処理部と記憶部を備える電子情報記憶媒体であって、前記記憶部は、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶し、前記処理部は、外部機器から前記位置データを識別する識別情報と、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含むデータ書き込みコマンドを受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込むことを特徴とする。   The invention according to claim 2 is an electronic information storage medium including a processing unit and a storage unit, and the storage unit stores storage area information indicating each storage area of a plurality of data stored in the storage unit. The processing unit is configured to correspond to identification information for identifying the position data from an external device and a plurality of storage areas indicated by the storage area information included in the position data identified by the identification information. When the data write command including the write data to be written is received, the corresponding write data is written to the plurality of storage areas, respectively.

請求項3に記載の発明は、請求項1又は2に記載の電子情報記憶媒体であって、前記処理部は、前記外部機器から前記位置データの追加、変更又は削除を行うことを示すコマンドを受信した場合に、当該コマンドに応じて前記位置データの追加、変更又は削除を行うことを特徴とする。   A third aspect of the present invention is the electronic information storage medium according to the first or second aspect, wherein the processing unit receives a command indicating that the position data is added, changed, or deleted from the external device. When received, the position data is added, changed or deleted according to the command.

請求項4に記載の発明は、請求項1乃至3の何れか一項に記載の電子情報記憶媒体を備えるICカードである。   A fourth aspect of the present invention is an IC card including the electronic information storage medium according to any one of the first to third aspects.

請求項5に記載の発明は、処理部と記憶部を備える電子情報記憶媒体におけるデータ送信方法であって、前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する工程と、前記処理部が、外部機器から前記位置データを識別する識別情報を含むデータ読み出しコマンドを受信した場合に、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域のそれぞれに記憶されているデータをまとめて前記外部機器に送信する工程と、を含むことを特徴とする。   The invention according to claim 5 is a data transmission method in an electronic information storage medium including a processing unit and a storage unit, wherein the storage unit indicates each storage area of a plurality of data stored in the storage unit A step of storing position data including storage area information; and when the processing unit receives a data read command including identification information for identifying the position data from an external device, the position data identified by the identification information And storing the data stored in each of the plurality of storage areas indicated by the included storage area information to the external device.

請求項6に記載の発明は、処理部と記憶部を備える電子情報記憶媒体におけるデータ書き込み方法であって、前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する工程と、前記処理部が、外部機器から前記位置データを識別する識別情報と、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含むデータ書き込みコマンドを受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込む工程と、を含むことを特徴とする。   The invention according to claim 6 is a data writing method in an electronic information storage medium including a processing unit and a storage unit, wherein the storage unit indicates each storage area of a plurality of data stored in the storage unit A step of storing position data including storage area information; identification information for identifying the position data from the external device by the processing unit; and a plurality of storage area information included in the position data identified by the identification information And a step of writing the corresponding write data to the plurality of storage areas when receiving a data write command including the write data to be written corresponding to each of the storage areas. .

請求項7に記載の発明は、処理部と記憶部を備え、前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する電子情報記憶媒体における前記処理部を、外部機器から前記位置データを識別する識別情報を含むデータ読み出しコマンドを受信した場合に、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域のそれぞれに記憶されているデータをまとめて前記外部機器に送信する送信手段、として機能させることを特徴とする。   The invention according to claim 7 is an electronic device comprising a processing unit and a storage unit, wherein the storage unit stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit. When the processing unit in the information storage medium receives a data read command including identification information for identifying the position data from an external device, a plurality of storage area information indicated by the position data identified by the identification information It is characterized by functioning as transmission means for collectively transmitting data stored in each storage area to the external device.

請求項8に記載の発明は、処理部と記憶部を備え、前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する電子情報記憶媒体における前記処理部を、外部機器から前記位置データを識別する識別情報と、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含むデータ書き込みコマンドを受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込む書き込み手段、として機能させることを特徴とする。   According to an eighth aspect of the present invention, there is provided an electronic device comprising a processing unit and a storage unit, wherein the storage unit stores position data including storage region information indicating each storage region of a plurality of data stored in the storage unit. A writing in which the processing unit in the information storage medium is written in association with identification information for identifying the position data from an external device and a plurality of storage areas indicated by the storage area information included in the position data identified by the identification information. When a data write command including embedded data is received, the write function is configured to function as write means for writing the corresponding write data in the plurality of storage areas.

本発明によれば、外部機器は、データ読み出しコマンド又はデータ書き込みコマンドにおいて、読み出し又は書き込みの対象となる複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを識別する識別情報を設定することにより、記憶部に記憶された複数のデータを一括して読み出す又は書き込むことができ、これらの処理に要する処理時間を短縮することができる。   According to the present invention, in the data read command or the data write command, the external device sets identification information for identifying position data including storage area information indicating each storage area of a plurality of data to be read or written. By doing so, a plurality of data stored in the storage unit can be read or written in a lump, and the processing time required for these processes can be reduced.

本実施形態に係るICカード1に搭載されるICチップ1aのハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of IC chip 1a mounted in the IC card 1 which concerns on this embodiment. (A)は、本実施形態に係るICチップ1aのファイル構造の一例を示す図であり、(B)は、本実施形態に係るEF203bの一例を示す図であり、(C)は、本実施形態に係るEF203cの一例を示す図である。(A) is a figure which shows an example of the file structure of IC chip 1a which concerns on this embodiment, (B) is a figure which shows an example of EF203b which concerns on this embodiment, (C) is this figure It is a figure which shows an example of EF203c which concerns on a form. 本実施形態に係るEF203aの一例を示す図である。It is a figure which shows an example of EF203a which concerns on this embodiment. (A)は、従来の読み出しコマンドの例を示す図であり、(B)、(C)は、本実施形態に係る一括読み出しコマンドの例を示す図である。(A) is a figure which shows the example of the conventional read command, (B), (C) is a figure which shows the example of the batch read command which concerns on this embodiment. 本実施形態に係るCPU10による一括読み出しコマンド受信時処理を示すフローチャートの一例である。It is an example of the flowchart which shows the process at the time of the batch read command reception by CPU10 which concerns on this embodiment. (A)は、従来の書き込みコマンドの例を示す図であり、(B)、(C)は、変形例1に係る一括書き込みコマンドの例を示す図である。(A) is a figure which shows the example of the conventional write command, (B), (C) is a figure which shows the example of the batch write command which concerns on the modification 1. FIG. 変形例1に係るCPU10による一括書き込みコマンド受信時処理を示すフローチャートの一例である。10 is an example of a flowchart illustrating a batch write command reception process performed by a CPU according to a first modification. 変形例5に係るEF203aの一例を示す図である。It is a figure which shows an example of EF203a which concerns on the modification 5.

以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態は、ICチップを搭載するICカードに対して本発明を適用した場合の実施の形態である。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiment described below is an embodiment when the present invention is applied to an IC card on which an IC chip is mounted.

[1.ICチップ1aの構成及び機能概要]
まず、図1を参照して、本実施形態に係るICカード1に搭載されるICチップ1aの構成及び機能概要について説明する。図1は、ICカード1に搭載されるICチップ1aのハードウェア構成例を示す図である。ICカード1は、キャッシュカード、クレジットカード、ポイントカード、社員カード等として使用される。或いは、ICカード1は、スマートフォンや携帯電話機等の通信機器に組み込まれる。或いは、ICチップ1aが通信機器の回路基板上に直接組み込まれて構成されるようにしてもよい。なお、ICチップ1aは、本発明の電子情報記憶媒体の一例である。
[1. Outline of Configuration and Function of IC Chip 1a]
First, with reference to FIG. 1, the configuration and functional outline of the IC chip 1a mounted on the IC card 1 according to the present embodiment will be described. FIG. 1 is a diagram illustrating a hardware configuration example of an IC chip 1 a mounted on the IC card 1. The IC card 1 is used as a cash card, credit card, point card, employee card or the like. Alternatively, the IC card 1 is incorporated into a communication device such as a smartphone or a mobile phone. Alternatively, the IC chip 1a may be directly incorporated on the circuit board of the communication device. The IC chip 1a is an example of the electronic information storage medium of the present invention.

図1に示すように、ICチップ1aは、CPU(Central Processing Unit)10、RAM(Random Access Memory)11、ROM(Read Only Memory)12、不揮発性メモリ13、及びI/O回路14を備えて構成される。CPU10は、ROM12又は不揮発性メモリ13に記憶された各種プログラムを実行するプロセッサ(コンピュータ)である。なお、I/O回路14は、外部機器2とのインターフェイスを担う。これにより、ICチップ1aは、ICリーダ・ライタを備える外部機器2との間で接触又は非接触で通信を行うことができる。接触式のICチップ1aの場合、I/O回路14には、例えば、C1〜C8の8個の端子が備えられている。例えば、C1端子は電源端子(ICチップ1aへ電源供給する端子)、C2端子はリセット端子、C3端子はクロック端子、C5端子はグランド端子、C7端子は外部機器2との間で通信を行うための端子である。一方、非接触式のICチップ1aの場合、I/O回路14には、例えば、アンテナ、及び変復調回路が備えられている。なお、外部機器2の例としては、ICカード発行機、ATM、改札機、認証用ゲート等が挙げられる。或いは、ICチップ1aが通信機器に組み込まれる場合、外部機器2には通信機器の機能を担う制御部が該当する。   As shown in FIG. 1, the IC chip 1 a includes a CPU (Central Processing Unit) 10, a RAM (Random Access Memory) 11, a ROM (Read Only Memory) 12, a nonvolatile memory 13, and an I / O circuit 14. Composed. The CPU 10 is a processor (computer) that executes various programs stored in the ROM 12 or the nonvolatile memory 13. The I / O circuit 14 serves as an interface with the external device 2. As a result, the IC chip 1a can communicate with or without contact with the external device 2 including the IC reader / writer. In the case of the contact type IC chip 1a, the I / O circuit 14 includes, for example, eight terminals C1 to C8. For example, the C1 terminal communicates with the power supply terminal (terminal for supplying power to the IC chip 1a), the C2 terminal with the reset terminal, the C3 terminal with the clock terminal, the C5 terminal with the ground terminal, and the C7 terminal with the external device 2. Terminal. On the other hand, in the case of the non-contact type IC chip 1a, the I / O circuit 14 includes, for example, an antenna and a modulation / demodulation circuit. Examples of the external device 2 include an IC card issuing machine, ATM, ticket gate, and authentication gate. Alternatively, when the IC chip 1a is incorporated in a communication device, the external device 2 corresponds to a control unit responsible for the function of the communication device.

不揮発性メモリ13には、例えばフラッシュメモリが適用される。不揮発性メモリ13に記憶される各種プログラム及びデータの一部は、ROM12に記憶されてもよい。なお、不揮発性メモリ13は、「Electrically Erasable Programmable Read-Only Memory」であってもよい。本実施形態において、ROM12と不揮発性メモリ13との何れかに記憶されるプログラムには、オペレーティングシステム(Operating System、以下、「OS」という)、アプリケーションプログラム等が含まれる。   For example, a flash memory is applied to the nonvolatile memory 13. A part of various programs and data stored in the nonvolatile memory 13 may be stored in the ROM 12. The nonvolatile memory 13 may be “Electrically Erasable Programmable Read-Only Memory”. In the present embodiment, the programs stored in either the ROM 12 or the nonvolatile memory 13 include an operating system (hereinafter referred to as “OS”), application programs, and the like.

ここで、アプリケーションプログラムは、ICカード1においてアプリケーションインスタンスの機能(言い換えれば、モジュール)を実現するためのプログラムである。これにより、CPU10は、アプリケーションの機能を実現する。   Here, the application program is a program for realizing an application instance function (in other words, a module) in the IC card 1. Thereby, the CPU 10 realizes the function of the application.

また、不揮発性メモリ13には、種々のアプリケーションやデータを格納するファイルを記憶する。具体的には、図2(A)に示すように、MF201、DF202a、202b(総称してDF202という場合がある)及びEF203a〜203e(総称してEF203という場合がある)を記憶する。MF201は、ICチップ1aのファイル構造の根幹となるファイルである。DF202は、MF201の下位に配置され、アプリケーションなどを格納するファイルである。EF203は、DF202の下位に配置され、様々なデータを格納するためのファイルである。なお、MFの直下にEFが配置される場合もある(例えば、EF203a)。また、各データファイルには識別子が付与されている(図2(A)では「MF」、「DF」、「EF」の右横に識別子を記載している)。   The nonvolatile memory 13 stores files for storing various applications and data. Specifically, as shown in FIG. 2A, MF201, DF202a, 202b (collectively referred to as DF202) and EF203a to 203e (collectively referred to as EF203) are stored. The MF 201 is a file that is the basis of the file structure of the IC chip 1a. The DF 202 is a file that is arranged below the MF 201 and stores applications and the like. The EF 203 is a file that is arranged below the DF 202 and stores various data. In some cases, an EF is arranged directly under the MF (for example, EF203a). Each data file is given an identifier (in FIG. 2A, identifiers are written to the right of “MF”, “DF”, and “EF”).

次に、図2(B)、(C)を参照して、識別子「6F01」、「6F02」が付与されたEF203b及びEF203cについて説明する。EF203b及びEF203cはレコード編成ファイルであって、複数のレコードにより編成されている(EFは1のレコードのみにより編成される場合もある)。   Next, the EF 203b and the EF 203c to which the identifiers “6F01” and “6F02” are assigned will be described with reference to FIGS. The EF 203b and the EF 203c are record organization files and are organized by a plurality of records (the EF may be organized by only one record).

図2(B)に示すように、EF203bは4つのレコードにより編成されている。第1レコード(レコード番号「1」のレコード)301には「個人ID」、第2レコード(レコード番号「2」のレコード)302には「氏名」、第3レコード(レコード番号「3」のレコード)303には「出生地(都道府県)」、第4レコード(レコード番号「4」のレコード)304には「生年月日」を示す情報がそれぞれ格納される。なお、第1レコード301−第4レコード304のレコード長(Length)は全て10バイトである。   As shown in FIG. 2B, the EF 203b is organized by four records. The first record (record number “1”) 301 has “personal ID”, the second record (record number “2” record) 302 has “name”, and the third record (record number “3” record). ) 303 stores “Birthplace (prefecture)”, and the fourth record (record with record number “4”) 304 stores information indicating “date of birth”. Note that the record lengths (Length) of the first record 301 to the fourth record 304 are all 10 bytes.

また、図2(C)に示すように、EF203cは4つのレコードにより編成されている。第1レコード311には「自宅住所」、第2レコード312には「自宅電話番号」、第3レコード313には「勤務先住所」、第4レコード314には「勤務先電話番号」を示す情報がそれぞれ格納される。なお、第1レコード311−第4レコード314のレコード長(Length)は全て20バイトである。   Further, as shown in FIG. 2C, the EF 203c is organized by four records. Information indicating “home address” in the first record 311, “home phone number” in the second record 312, “work address” in the third record 313, and “work phone number” in the fourth record 314 Are stored respectively. The record lengths (Length) of the first record 311 to the fourth record 314 are all 20 bytes.

このように、EF203b及びEF203cには、例えば、ICカード1の所有者の個人情報が格納される。また、それぞれの情報はファイルの識別子及びレコード番号の組み合わせにより特定することができる。例えば、識別子「6F01」及びレコード番号「2」の組み合わせにより、「氏名」という情報を特定することができる。   Thus, for example, personal information of the owner of the IC card 1 is stored in the EF 203b and the EF 203c. Each information can be specified by a combination of a file identifier and a record number. For example, the information “name” can be specified by the combination of the identifier “6F01” and the record number “2”.

次に、図3を参照して、識別子「2F01」が付与されたEF203aについて説明する。EF203aもEF203b及びEF203cと同様に複数のレコード351−353により編成される。図3に示すように、EF203aの各レコードには、ファイルの識別子及びレコード番号の組み合わせが一組以上記述されている。例えば、EF203aの第1レコード351には「6F01 01 6F02 03 6F02 04」という情報が格納されており、このうち、「6F01 01」は、EF203b(6F01)の第1レコードである「個人ID」を示しており、同様に、「6F02 03」は、EF203c(6F02)の第3レコードである「勤務先住所」を示しており、「6F02 04」は、EF203c(6F02)の第4レコードである「勤務先電話番号」を示している。EF203a(2F01)に含まれる各レコード351−353は、ICカード1の発行時に発行者が設定する。   Next, the EF 203a to which the identifier “2F01” is assigned will be described with reference to FIG. The EF 203a is organized by a plurality of records 351 to 353 similarly to the EF 203b and the EF 203c. As shown in FIG. 3, each record of the EF 203a describes one or more combinations of file identifiers and record numbers. For example, information “6F01 01 6F02 03 6F02 04” is stored in the first record 351 of the EF 203a, and among these, “6F01 01” indicates the “personal ID” that is the first record of the EF 203b (6F01). Similarly, “6F02 03” indicates “work address” which is the third record of EF203c (6F02), and “6F0204” is the fourth record of EF203c (6F02) “ "Work phone number". Each of the records 351 to 353 included in the EF 203a (2F01) is set by the issuer when the IC card 1 is issued.

なお、以下、EF203a(2F01)を「一括指示ファイル」といい、「一括指示ファイル」に含まれる各レコードを「一括指示データ」という。   Hereinafter, the EF 203a (2F01) is referred to as a “batch instruction file”, and each record included in the “batch instruction file” is referred to as “batch instruction data”.

[2.読み出しコマンド]
次に、外部機器2からICカード1に送信される読み出しコマンド(ICカード1が記憶するデータを読み出すためのコマンド)について説明する。ここでは、外部機器2が次の(1)−(3)のレコードを読み出す場合を具体例として用いる。
(1)EF203b(6F01)の第1レコード
(2)EF203c(6F02)の第3レコード
(3)EF203c(6F02)の第4レコード
[2. Read command]
Next, a read command (command for reading data stored in the IC card 1) transmitted from the external device 2 to the IC card 1 will be described. Here, a case where the external device 2 reads the following records (1) to (3) is used as a specific example.
(1) EF203b (6F01) first record (2) EF203c (6F02) third record (3) EF203c (6F02) fourth record

従来の国際規格ISO/IEC 7816−4準拠のコマンドを利用して(1)−(3)のデータを読み出す場合、次の(A)−(E)の手順を踏む必要がある。
(A)EF203b(6F01)の選択
(B)第1レコードの読み出し
(C)EF203c(6F02)の選択
(D)第3レコードの読み出し
(E)第4レコードの読み出し
When data (1)-(3) is read using a command conforming to the conventional international standard ISO / IEC 7816-4, it is necessary to take the following steps (A)-(E).
(A) Selection of EF203b (6F01) (B) Reading of the first record (C) Selection of EF203c (6F02) (D) Reading of the third record (E) Reading of the fourth record

このように従来の手法では、(A)、(C)で選択コマンドを送信し、(B)、(D)、(E)で読み出しコマンドを送信する必要があり、合計5つのコマンドを送信することとなる。また、仮にEF203b(6F01)及びEF203c(6F02)に国際規格で定められている短縮ファイルIDが割り当てられている場合は、ファイルとレコードを同時に指定できるため(A)及び(C)の処理が不要となるが、それでも(B)、(D)、(E)の3つの読み出しコマンドを送信する必要がある。   As described above, in the conventional method, it is necessary to transmit a selection command in (A) and (C), and to transmit a read command in (B), (D), and (E), and a total of five commands are transmitted. It will be. In addition, if the EF 203b (6F01) and the EF 203c (6F02) are assigned a shortened file ID defined in the international standard, the file and the record can be specified at the same time, so the processes (A) and (C) are unnecessary. However, it is still necessary to transmit three read commands (B), (D), and (E).

これに対して、本実施形態では、新たに一括読み出しコマンドを設け、(A)−(E)の処理を一つの処理として実現する。   On the other hand, in this embodiment, a batch read command is newly provided, and the processes (A) to (E) are realized as one process.

図4(A)は、従来の読み出しコマンドの例を示す図である。「INS」(1バイト)には「READ RECORD」コマンドを示す値が格納され、「P1(パラメータ1)」(1バイト)には読み出し対象のレコードのレコード番号が格納され、「P2(パラメータ2)」(1バイト)にはレコード番号で読み出し対象を指定することを示す値が格納される。   FIG. 4A is a diagram illustrating an example of a conventional read command. A value indicating a “READ RECORD” command is stored in “INS” (1 byte), a record number of a record to be read is stored in “P1 (parameter 1)” (1 byte), and “P2 (parameter 2) ) "(1 byte) stores a value indicating that a read target is designated by a record number.

図4(B)は、一括読み出しコマンドの一例(例1)である。「INS」には「READ RECORD」コマンドを示す値が格納され、「P1(パラメータ1)」には一括読み出しに用いる一括指示データ(レコード)のレコード番号が格納され、「P2(パラメータ2)」には一括読み出しすることを示す値が格納される。   FIG. 4B is an example (example 1) of the batch read command. “INS” stores a value indicating a “READ RECORD” command, “P1 (parameter 1)” stores a record number of batch instruction data (record) used for batch reading, and “P2 (parameter 2)”. Stores a value indicating batch reading.

例1におけるICチップ1aのCPU10は、外部機器2から、「P2」に一括読み出しすることを示す値が格納された一括読み出しコマンドを受信すると、図3のEF203a(2F01)に含まれる一括指示データ(ファイルの識別子及びレコード番号の組み合わせが一組以上記述されているレコード)であって、「P1」に格納されているレコード番号で特定される一括指示データを取得する。次いで、CPU10は、取得した当該一括指示データに記述されているファイルの識別子及びレコード番号の組み合わせのそれぞれに基づいて、該当レコードを全て取得し、これらを連結して、外部機器2に対して一括読み出しコマンドのレスポンスとして送信する。   When the CPU 10 of the IC chip 1a in Example 1 receives a batch read command storing a value indicating that batch reading is performed in “P2” from the external device 2, the batch instruction data included in the EF 203a (2F01) in FIG. Collective instruction data specified by the record number stored in “P1” is acquired (a record in which one or more combinations of file identifiers and record numbers are described). Next, the CPU 10 acquires all the corresponding records based on each combination of the identifier and the record number of the file described in the acquired batch instruction data, concatenates them, and batches them to the external device 2. Sent as a response to a read command.

図4(C)は、一括読み出しコマンドの一例(例2)である。「INS」には一括読み出しコマンドを示す値が格納され、「P1(パラメータ1)」には一括読み出しに用いる一括指示データ(レコード)のレコード番号が格納され、「P2(パラメータ2)」は使用しない。   FIG. 4C is an example (example 2) of the batch read command. “INS” stores a value indicating a batch read command, “P1 (parameter 1)” stores a record number of batch instruction data (record) used for batch reading, and “P2 (parameter 2)” is used. do not do.

例2におけるICチップ1aのCPU10は、外部機器2から、「INS」に一括読み出しコマンドを示す値が格納されたコマンドを受信すると、例1の場合と同様に、図3のEF203a(2F01)に含まれる一括指示データ(ファイルの識別子及びレコード番号の組み合わせが一組以上記述されているレコード)であって、「P1」に格納されているレコード番号で特定されるレコードを取得する。次いで、CPU10は、取得した当該一括指示データに記述されているファイルの識別子及びレコード番号の組み合わせのそれぞれに基づいて、該当レコードを全て取得し、これらを連結して、外部機器2に対して一括読み出しコマンドのレスポンスとして送信する。   When the CPU 10 of the IC chip 1a in Example 2 receives a command in which a value indicating a batch read command is stored in “INS” from the external device 2, the CPU 10 stores the EF 203a (2F01) in FIG. Collected batch instruction data (records in which one or more combinations of file identifiers and record numbers are described) that are identified by the record number stored in “P1” are acquired. Next, the CPU 10 acquires all the corresponding records based on each combination of the identifier and the record number of the file described in the acquired batch instruction data, concatenates them, and batches them to the external device 2. Sent as a response to a read command.

[3.CPU10による一括読み出しコマンド受信時処理]
次に、図5を用いて、ICチップ1aのCPU10による一括読み出しコマンド受信時処理について説明する。一括読み出しコマンド受信時処理は、ICチップ1aが外部機器2から一括読み出しコマンド(図4の(B)又は(C)に示すコマンド)を受信した場合に実行される。
[3. Processing when batch read command is received by CPU 10]
Next, the batch read command reception process by the CPU 10 of the IC chip 1a will be described with reference to FIG. The batch read command reception process is executed when the IC chip 1a receives a batch read command (the command shown in FIG. 4B or FIG. 4C) from the external device 2.

まず、CPU10は、一括読み出しコマンドを受信すると、一括指示ファイル(図3のEF203a(2F01))を選択する(ステップS101)。   First, when receiving a batch read command, the CPU 10 selects a batch instruction file (EF203a (2F01) in FIG. 3) (step S101).

次に、CPU10は、ステップS101の処理で選択した一括指示ファイルに含まれるレコードのうち、一括読み出しコマンドの「P1」で指定されたレコード(一括指示データ)を読み出す(ステップS102)。   Next, the CPU 10 reads a record (batch instruction data) designated by “P1” of the batch read command among the records included in the batch instruction file selected in the process of step S101 (step S102).

次に、CPU10は、ステップS102の処理で読み出した一括指示データからファイルの識別子及びレコード番号の組み合わせを取得する(ステップS103)。なお、ステップS103の処理は、ステップS103〜ステップS109のループ処理において、一括指示データに記述された組み合わせの数分だけ実行されるが、CPU10はステップS103の処理を実行する度に、一括指示データに記述されたファイルの識別子及びレコード番号の組み合わせを先頭から順に一組ずつ取得する。   Next, the CPU 10 acquires a combination of a file identifier and a record number from the batch instruction data read out in the process of step S102 (step S103). The process of step S103 is executed for the number of combinations described in the batch instruction data in the loop process of steps S103 to S109. However, every time the CPU 10 executes the process of step S103, the batch instruction data is executed. Each combination of the file identifier and record number described in (1) is acquired in order from the top.

次に、CPU10は、ステップS103の処理で取得したファイルの識別子に対応するファイルを選択する(ステップS104)。   Next, the CPU 10 selects a file corresponding to the file identifier acquired in the process of step S103 (step S104).

次に、CPU10は、ステップS104の処理でファイルを選択できたか否かを判定する(ステップS105)。このとき、CPU10は、ファイルを選択できなかったと判定した場合には(ステップS105:NO)、エラーレスポンスを外部機器2に出力し(ステップS111)、一括読み出しコマンド受信時処理を終了する。   Next, the CPU 10 determines whether or not the file has been selected in the process of step S104 (step S105). At this time, if the CPU 10 determines that the file could not be selected (step S105: NO), it outputs an error response to the external device 2 (step S111), and ends the batch read command reception process.

一方、CPU10は、ファイルを選択できたと判定した場合には(ステップS105:YES)、当該ファイルに含まれるレコードであって、ステップS103の処理で取得したレコード番号に対応するレコードを選択する(ステップS106)。   On the other hand, if the CPU 10 determines that the file has been selected (step S105: YES), the CPU 10 selects a record that is included in the file and that corresponds to the record number acquired in step S103 (step S103). S106).

次に、CPU10は、ステップS106の処理でレコードを選択できたか否かを判定する(ステップS107)。このとき、CPU10は、レコードを選択できなかったと判定した場合には(ステップS107:NO)、エラーレスポンスを外部機器2に出力し(ステップS111)、一括読み出しコマンド受信時処理を終了する。   Next, the CPU 10 determines whether or not a record has been selected in the process of step S106 (step S107). At this time, if the CPU 10 determines that the record could not be selected (step S107: NO), it outputs an error response to the external device 2 (step S111), and ends the batch read command reception process.

一方、CPU10は、レコードを選択できたと判定した場合には(ステップS107:YES)、選択したレコードを読み出して、RAM11又は不揮発性メモリ13に一時保存する(ステップS108)。   On the other hand, if it is determined that the record can be selected (step S107: YES), the CPU 10 reads the selected record and temporarily stores it in the RAM 11 or the nonvolatile memory 13 (step S108).

次に、CPU10は、一括指示データに記述されたファイルの識別子及びレコード番号の組み合わせを全て取得したか否かを判定する(ステップS109)。このとき、CPU10は、ファイルの識別子及びレコード番号の組み合わせを全て取得していないと判定した場合には(ステップS109:NO)、ステップS103の処理に移行する。   Next, the CPU 10 determines whether or not all combinations of file identifiers and record numbers described in the batch instruction data have been acquired (step S109). At this time, if the CPU 10 determines that all combinations of file identifiers and record numbers have not been acquired (step S109: NO), the process proceeds to step S103.

一方、CPU10は、ファイルの識別子及びレコード番号の組み合わせを全て取得したと判定した場合には(ステップS109:YES)、ステップS108の処理で一時保存したレコードを連結してレスポンスとして外部機器2に出力し(ステップS110)、一括読み出しコマンド受信時処理を終了する。   On the other hand, if the CPU 10 determines that all the combinations of file identifiers and record numbers have been acquired (step S109: YES), the CPU 10 concatenates the records temporarily stored in the process of step S108 and outputs them as a response to the external device 2. (Step S110), the batch read command reception process is terminated.

以上のように、本実施形態のICチップ1aは、CPU10(「処理部」の一例)と不揮発性メモリ13(「記憶部」の一例)を備え、不揮発性メモリ13は、不揮発性メモリ13に記憶される複数のレコード(「データ」の一例)のそれぞれの記憶領域を示すファイルの識別子及びレコード番号の組み合わせ(「記憶領域情報」の一例)を含む一括指示データ(「位置データ」の一例)を記憶し、CPU10は、外部機器2から一括読み出しに用いる一括指示データのレコード番号(「識別情報」の一例)を含む一括読み出しコマンド(「データ読み出しコマンド」の一例)を受信した場合に、当該レコード番号により識別される一括指示データに含まれるファイルの識別子及びレコード番号の組み合わせが示す複数の記憶領域のそれぞれに記憶されているレコードをまとめて外部機器2に送信する。   As described above, the IC chip 1a of the present embodiment includes the CPU 10 (an example of a “processing unit”) and the nonvolatile memory 13 (an example of a “storage unit”), and the nonvolatile memory 13 is included in the nonvolatile memory 13. Batch instruction data (an example of “location data”) including a combination of a file identifier and a record number (an example of “storage area information”) indicating each storage area of a plurality of stored records (an example of “data”) When the CPU 10 receives a batch read command (an example of “data read command”) including a record number (an example of “identification information”) of batch instruction data used for batch read from the external device 2, Each of a plurality of storage areas indicated by a combination of a file identifier and a record number included in the batch instruction data identified by the record number Collectively records stored and transmits to the external device 2.

したがって、本実施形態のICチップ1aによれば、外部機器2は、一括読み出しコマンドにおいて、読み出し対象となる複数のレコードのそれぞれの記憶領域を示すファイルの識別子及びレコード番号の組み合わせを含む一括指示データを識別するレコード番号を設定することにより、不揮発性メモリ13に記憶された複数のレコードを一括して読み出すことができ、この処理に要する処理時間を短縮することができる。   Therefore, according to the IC chip 1a of the present embodiment, the external device 2 uses the batch read command to collect batch instruction data including a combination of a file identifier and a record number indicating each storage area of a plurality of records to be read. By setting the record number for identifying the plurality of records, a plurality of records stored in the nonvolatile memory 13 can be read at once, and the processing time required for this processing can be shortened.

[4.変形例]
次に、上記実施形態の変形例について説明する。なお、以下に説明する変形例は上記実施形態や他の変形例と適宜組み合わせることができる。
[4. Modified example]
Next, a modification of the above embodiment will be described. Note that the modifications described below can be combined with the above-described embodiment and other modifications as appropriate.

[4.1.変形例1]
上記実施形態では、一括読み出しコマンドを設け、複数のレコードを一括して読み出す場合について説明したが、これに代えて又は加えて、一括書き込みコマンドを設け、複数のレコードに一括して書き込みを行うこととしてもよい。
[4.1. Modification 1]
In the above-described embodiment, a case has been described in which a batch read command is provided and a plurality of records are read in batch. It is good.

[4.1.1.書き込みコマンド]
まず、外部機器2が次の(1)−(3)のレコードに書き込みする場合を具体例として用いて説明する。
(1)EF203b(6F01)の第1レコード
(2)EF203c(6F02)の第3レコード
(3)EF203c(6F02)の第4レコード
[4.1.1. Write command]
First, the case where the external device 2 writes in the following records (1) to (3) will be described as a specific example.
(1) EF203b (6F01) first record (2) EF203c (6F02) third record (3) EF203c (6F02) fourth record

従来の国際規格ISO/IEC 7816−4準拠のコマンドを利用して(1)−(3)のデータに書き込みを行う場合、次の(A)−(E)の手順を踏む必要がある。
(A)EF203b(6F01)の選択
(B)第1レコードの書き込み
(C)EF203c(6F02)の選択
(D)第3レコードの書き込み
(E)第4レコードの書き込み
When writing data (1)-(3) using a command conforming to the conventional international standard ISO / IEC 7816-4, the following steps (A)-(E) must be taken.
(A) Selection of EF203b (6F01) (B) Writing of the first record (C) Selection of EF203c (6F02) (D) Writing of the third record (E) Writing of the fourth record

このように従来の手法では、(A)、(C)で選択コマンドを送信し、(B)、(D)、(E)で書き込みコマンドを送信する必要があり、合計5つのコマンドを送信することとなる。また、仮にEF203b(6F01)及びEF203c(6F02)に国際規格で定められている短縮ファイルIDが割り当てられている場合は、ファイルとレコードを同時に指定できるため(A)及び(C)の処理が不要となるが、それでも(B)、(D)、(E)の3つの読み出しコマンドを送信する必要がある。   As described above, in the conventional method, it is necessary to transmit a selection command in (A) and (C), and to transmit a write command in (B), (D), and (E), so a total of five commands are transmitted. It will be. In addition, if the EF 203b (6F01) and the EF 203c (6F02) are assigned a shortened file ID defined in the international standard, the file and the record can be specified at the same time, so the processes (A) and (C) are unnecessary. However, it is still necessary to transmit three read commands (B), (D), and (E).

これに対して、変形例1では、新たに一括書き込みコマンドを設け、(A)−(E)の処理を一つのコマンドで実現する。   On the other hand, in Modification 1, a new batch write command is provided, and the processes (A) to (E) are realized with one command.

図6(A)は、従来の書き込みコマンドの例を示す図である。「INS」には、「UPDATE RECORD」コマンドを示す値が格納され、「P1(パラメータ1)」には書き込み対象のレコードのレコード番号が格納され、「P2(パラメータ2)」にはレコード番号で書き込み対象を指定することを示す値が格納される。   FIG. 6A shows an example of a conventional write command. “INS” stores a value indicating the “UPDATE RECORD” command, “P1 (parameter 1)” stores the record number of the record to be written, and “P2 (parameter 2)” stores the record number. Stores a value indicating that a write target is specified.

図6(B)は、一括書き込みコマンドの一例(例1)である。「INS」には、「UPDATE RECORD」コマンドを示す値が格納され、「P1(パラメータ1)」には一括書き込みに用いる一括指示データ(レコード)のレコード番号が格納され、「P2(パラメータ2)」には一括書き込みすることを示す値が格納される。また、「Lc(レコード長)」には「DATA」の長さが記述される。更に、「DATA」には、書き込み対象となる各レコードに書き込むべきデータ(書き込みデータ)がそれぞれ連続して記述されている。例えば、EF203b(6F01)の第1レコード301(個人ID)と、EF203c(6F02)の第3レコード313(勤務先住所)を書き込み対象とする場合には、「DATA」の先頭から10バイト目までに書き込むべき個人IDが記述され、「DATA」の11バイト目から30バイト目までに書き込むべき勤務先住所が記述される。   FIG. 6B is an example (Example 1) of a batch write command. “INS” stores a value indicating an “UPDATE RECORD” command, “P1 (parameter 1)” stores a record number of batch instruction data (record) used for batch writing, and “P2 (parameter 2)”. ”Stores a value indicating batch writing. In “Lc (record length)”, the length of “DATA” is described. In “DATA”, data (write data) to be written in each record to be written is described continuously. For example, in the case where the first record 301 (personal ID) of EF203b (6F01) and the third record 313 (working address) of EF203c (6F02) are to be written, the first byte from “DATA” is the 10th byte. The personal ID to be written in is described, and the work address to be written in the 11th to 30th bytes of “DATA” is described.

ICチップ1aのCPU10は、外部機器2から、「P2」に一括書き込みすることを示す値が格納された一括書き込みコマンドを受信すると、一括指示ファイルであるEF203a(2F01)に含まれる一括指示データであって、「P1」に格納されているレコード番号で特定される一括指示データを取得する。次いで、CPU10は、取得した当該一括指示データに記述されているファイルの識別子及びレコード番号の組み合わせを示す情報に基づいて、該当レコードをそれぞれ選択して、一括書き込みコマンドの「DATA」に記述された書き込みデータを書き込む。   When the CPU 10 of the IC chip 1a receives a batch write command storing a value indicating batch write to “P2” from the external device 2, the batch command data included in the batch instruction file EF203a (2F01) is used. Therefore, collective instruction data specified by the record number stored in “P1” is acquired. Next, the CPU 10 selects each corresponding record based on the information indicating the combination of the identifier and record number of the file described in the acquired batch instruction data, and is described in “DATA” of the batch write command. Write the write data.

図6(C)は、一括書き込みコマンドの一例(例2)である。「INS」には、一括書き込みコマンドを示す値が格納され、「P1(パラメータ1)」には一括書き込みに用いる一括指示データ(レコード)のレコード番号が格納され、「P2(パラメータ2)」は使用しない。また、「Lc(レコード長)」には「DATA」の長さが記述される。更に、「DATA」には、書き込み対象となる各レコードに書き込むべきデータ(書き込みデータ)がそれぞれ連続して記述されている。   FIG. 6C is an example (example 2) of the batch write command. “INS” stores a value indicating a batch write command, “P1 (parameter 1)” stores a record number of batch instruction data (record) used for batch writing, and “P2 (parameter 2)” do not use. In “Lc (record length)”, the length of “DATA” is described. In “DATA”, data (write data) to be written in each record to be written is described continuously.

ICチップ1aのCPU10は、外部機器2から、「INS」に一括書き込みコマンドを示す値が格納されたコマンドを受信すると、例1の場合と同様に、一括指示ファイルであるEF203a(2F01)に含まれる一括指示データであって、「P1」に格納されているレコード番号で特定される一括指示データを取得する。次いで、CPU10は、取得した当該一括指示データに記述されているファイルの識別子及びレコード番号の組み合わせを示す情報に基づいて、該当レコードをそれぞれ選択して、一括書き込みコマンドの「DATA」に記述された書き込みデータを書き込む。   When the CPU 10 of the IC chip 1a receives a command in which a value indicating a batch write command is stored in “INS” from the external device 2, it is included in the batch instruction file EF203a (2F01) as in the case of Example 1. Collective instruction data specified by the record number stored in “P1” is acquired. Next, the CPU 10 selects each corresponding record based on the information indicating the combination of the identifier and record number of the file described in the acquired batch instruction data, and is described in “DATA” of the batch write command. Write the write data.

[4.1.2.CPU10による一括書き込みコマンド受信時処理]
次に、図7を用いて、ICチップ1aのCPU10による一括書き込みコマンド受信時処理について説明する。一括書き込みコマンド受信時処理は、ICチップ1aが外部機器2から一括書き込みコマンド(図6の(B)又は(C)に示すコマンド)を受信した場合に実行される。
[4.1.2. Processing when batch write command is received by CPU 10]
Next, the batch write command reception process by the CPU 10 of the IC chip 1a will be described with reference to FIG. The batch write command reception process is executed when the IC chip 1a receives a batch write command (command shown in FIG. 6B or FIG. 6C) from the external device 2.

まず、CPU10は、一括書き込みコマンドを受信すると、一括指示ファイル(図3のEF203a(2F01))を選択する(ステップS201)。   First, when receiving a batch write command, the CPU 10 selects a batch instruction file (EF203a (2F01) in FIG. 3) (step S201).

次に、CPU10は、ステップS201の処理で選択した一括指示ファイルに含まれるレコードのうち、一括読み出しコマンドの「P1」で指定されたレコード(一括指示データ)を読み出す(ステップS202)。   Next, the CPU 10 reads a record (batch instruction data) designated by “P1” of the batch read command among the records included in the batch instruction file selected in the process of step S201 (step S202).

次に、CPU10は、ステップS202の処理で読み出した一括指示データからファイルの識別子及びレコード番号の組み合わせを取得する(ステップS203)。なお、ステップS203の処理は、ステップS203〜ステップS210のループ処理において、一括指示データに記述された組み合わせの数分だけ実行されるが、CPU10はステップS203の処理を実行する度に、一括指示データに記述されたファイルの識別子及びレコード番号の組み合わせを先頭から順に一組ずつ取得する。   Next, the CPU 10 acquires a combination of a file identifier and a record number from the batch instruction data read out in the process of step S202 (step S203). The process of step S203 is executed by the number of combinations described in the batch instruction data in the loop process of steps S203 to S210, but the CPU 10 executes the batch instruction data every time the process of step S203 is executed. Each combination of the file identifier and record number described in (1) is acquired in order from the top.

次に、CPU10は、ステップS203の処理で取得したファイルの識別子に対応するファイルを選択する(ステップS204)。   Next, the CPU 10 selects a file corresponding to the file identifier acquired in the process of step S203 (step S204).

次に、CPU10は、ステップS204の処理でファイルを選択できたか否かを判定する(ステップS205)。このとき、CPU10は、ファイルを選択できなかったと判定した場合には(ステップS205:NO)、エラーレスポンスを外部機器2に出力し(ステップS212)、一括書き込みコマンド受信時処理を終了する。   Next, the CPU 10 determines whether or not a file has been selected in the process of step S204 (step S205). At this time, if the CPU 10 determines that the file could not be selected (step S205: NO), it outputs an error response to the external device 2 (step S212), and ends the batch write command reception process.

一方、CPU10は、ファイルを選択できたと判定した場合には(ステップS205:YES)、選択したファイルのレコード長を取得する(ステップS206)。例えば、選択したファイルがEF203b(6F01)である場合にはレコード長「10バイト」を取得する。   On the other hand, if the CPU 10 determines that the file has been selected (step S205: YES), the CPU 10 acquires the record length of the selected file (step S206). For example, when the selected file is EF203b (6F01), the record length “10 bytes” is acquired.

次に、CPU10は、ステップS204の処理で選択したファイルに含まれるレコードであって、ステップS203の処理で取得したレコード番号に対応するレコードを選択する(ステップS207)。   Next, the CPU 10 selects a record included in the file selected in step S204 and corresponding to the record number acquired in step S203 (step S207).

次に、CPU10は、ステップS207の処理でレコードを選択できたか否かを判定する(ステップS208)。このとき、CPU10は、レコードを選択できなかったと判定した場合には(ステップS208:NO)、エラーレスポンスを外部機器2に出力し(ステップS212)、一括書き込みコマンド受信時処理を終了する。   Next, the CPU 10 determines whether or not a record has been selected in the process of step S207 (step S208). At this time, if the CPU 10 determines that the record could not be selected (step S208: NO), it outputs an error response to the external device 2 (step S212), and ends the batch write command reception process.

一方、CPU10は、レコードを選択できたと判定した場合には(ステップS208:YES)、一括書き込みコマンドの「DATA」に記述された書き込みデータを書き込む(ステップS209)。なお、上述したように、一括書き込みコマンドの「DATA」には、各レコードに書き込む書き込みデータが、当該レコードのレコード長で連続して記述されている。ステップS209の処理は、ステップS203〜ステップS210のループ処理において、一括指示データに記述された組み合わせの数分だけ実行されるが、CPU10はステップS209の処理を実行する度に、一括書き込みコマンドの「DATA」に記述された複数の書き込みデータを先頭から順に、直前のステップS206の処理で取得したレコード長分ずつ書き込む。   On the other hand, when it is determined that the record has been selected (step S208: YES), the CPU 10 writes the write data described in “DATA” of the batch write command (step S209). As described above, in the “DATA” of the batch write command, the write data to be written to each record is described continuously with the record length of the record. The processing of step S209 is executed by the number of combinations described in the batch instruction data in the loop processing of step S203 to step S210, but each time the CPU 10 executes the processing of step S209, “10” of the batch write command is executed. A plurality of write data described in “DATA” are written in order from the top for each record length acquired in the process of the previous step S206.

次に、CPU10は、一括指示データに記述されたファイルの識別子及びレコード番号の組み合わせを全て取得したか否かを判定する(ステップS210)。このとき、CPU10は、ファイルの識別子及びレコード番号の組み合わせを全て取得していないと判定した場合には(ステップS210:NO)、ステップS203の処理に移行する。   Next, the CPU 10 determines whether or not all combinations of file identifiers and record numbers described in the batch instruction data have been acquired (step S210). At this time, if the CPU 10 determines that all combinations of file identifiers and record numbers have not been acquired (step S210: NO), the process proceeds to step S203.

一方、CPU10は、ファイルの識別子及びレコード番号の組み合わせを全て取得したと判定した場合には(ステップS210:YES)、正常終了レスポンスを外部機器2に出力し(ステップS211)、一括書き込みコマンド受信時処理を終了する。   On the other hand, when it is determined that all combinations of file identifiers and record numbers have been acquired (step S210: YES), the CPU 10 outputs a normal end response to the external device 2 (step S211), and receives a batch write command. The process ends.

以上のように、本実施形態のICチップ1aは、CPU10(「処理部」の一例)と不揮発性メモリ13(「記憶部」の一例)を備え、不揮発性メモリ13は、不揮発性メモリ13に記憶される複数のレコード(「データ」の一例)のそれぞれの記憶領域を示すファイルの識別子及びレコード番号の組み合わせ(「記憶領域情報」の一例)を含む一括指示データ(「位置データ」の一例)を記憶し、CPU10は、外部機器2から一括読み出しに用いる一括指示データのレコード番号(「識別情報」の一例)と、当該レコード番号により識別される一括指示データに含まれるファイルの識別子及びレコード番号の組み合わせが示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含む一括書き込みコマンド(「データ書き込みコマンド」の一例)を受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込む。   As described above, the IC chip 1a of the present embodiment includes the CPU 10 (an example of a “processing unit”) and the nonvolatile memory 13 (an example of a “storage unit”), and the nonvolatile memory 13 is included in the nonvolatile memory 13. Batch instruction data (an example of “location data”) including a combination of a file identifier and a record number (an example of “storage area information”) indicating each storage area of a plurality of stored records (an example of “data”) The CPU 10 stores the record number (an example of “identification information”) of the batch instruction data used for batch reading from the external device 2, and the identifier and record number of the file included in the batch instruction data identified by the record number. A batch write command (“data write”) that includes write data to be written in association with each of the plurality of storage areas indicated by When receiving one example) of a command ", to the plurality of storage areas, and writes the corresponding the write data.

したがって、本実施形態のICチップ1aによれば、外部機器2は、一括書き込みコマンドにおいて、書き込み対象となる複数のレコードのそれぞれの記憶領域を示すファイルの識別子及びレコード番号の組み合わせを含む一括指示データを識別するレコード番号を設定することにより、不揮発性メモリ13に記憶された複数のレコードに一括して書き込むことができ、この処理に要する処理時間を短縮することができる。   Therefore, according to the IC chip 1a of the present embodiment, the external device 2 uses the batch write command to include batch instruction data including a combination of a file identifier and a record number indicating each storage area of a plurality of records to be written. By setting the record number for identifying the data, it is possible to write in a plurality of records stored in the non-volatile memory 13 at a time, and the processing time required for this processing can be shortened.

[4.2.変形例2]
上記実施形態では、一括指示ファイルが図3のEF203a(2F01)の一つだけ存在し、一括読み出しコマンドを受信したCPU10は、EF203a(2F01)に含まれるレコードに基づいて一括読み出しを行うこととした。これに代えて、変形例2では、一括指示ファイルを複数設ける。
[4.2. Modification 2]
In the above embodiment, there is only one batch instruction file EF203a (2F01) in FIG. 3, and the CPU 10 receiving the batch read command performs batch read based on the records included in EF203a (2F01). . Instead, in Modification 2, a plurality of batch instruction files are provided.

具体的には、まず、ISO/IEC 7816−4に定義されている短縮ファイルID(5ビット)を複数の一括指示ファイルのそれぞれに割り当てる。そして、図4(C)の一括読み出しコマンドでは、「P2」(上記実施形態では使用しないこととした)に短縮ファイルIDを記述して、何れの一括指示ファイルを用いるか指定する。そして、CPU10は、図5のステップS101の処理で、「P2」に記述された短縮ファイルIDで識別される一括指示ファイルを選択することとする。   Specifically, first, a shortened file ID (5 bits) defined in ISO / IEC 7816-4 is assigned to each of a plurality of batch instruction files. In the batch read command of FIG. 4C, the shortened file ID is described in “P2” (not used in the above embodiment) to specify which batch instruction file is used. Then, the CPU 10 selects the batch instruction file identified by the shortened file ID described in “P2” in the process of step S101 in FIG.

上記実施形態では、ICチップ1aは一括指示ファイルを一つしか保持できなかったため、当該一括指示ファイルが記憶することのできるレコード数(255個)以上の一括指示データを記憶させることができなかった。変形例2では、短縮ファイルIDを採用することにより、最大30の一括指示ファイルを設けることができる(短縮ファイルIDは5ビットの情報であり、使用することのできない「00000」と「11111」を除くと最大30となる)ことから、ICチップ1aが記憶することのできるレコード数は7650と飛躍的に増加し、一括読み出しコマンドの汎用性を向上させることができる。   In the above embodiment, since the IC chip 1a can hold only one collective instruction file, it is not possible to store collective instruction data that is more than the number of records (255) that can be stored in the collective instruction file. . In the second modification, a maximum of 30 batch instruction files can be provided by adopting the shortened file ID (the shortened file ID is 5-bit information, and “00000” and “11111” which cannot be used). Therefore, the number of records that can be stored in the IC chip 1a is greatly increased to 7650, and the versatility of the batch read command can be improved.

[4.3.変形例3]
EF203a(2F01)に含まれる各レコードは、外部機器2が所定のルールに則って追加・変更・削除することとしてもよい。EF203a(2F01)に含まれるレコードの追加・変更・削除は、CPU10が外部機器2から受信したコマンドに基づいて実行する。変形例3によれば、一括読み出し又は一括書き込みしたいレコードを外部機器2側で設定することができ、利便性が向上する。
[4.3. Modification 3]
Each record included in the EF 203a (2F01) may be added, changed, or deleted by the external device 2 in accordance with a predetermined rule. The addition / change / deletion of the record included in the EF 203a (2F01) is executed based on a command received from the external device 2 by the CPU 10. According to the third modification, records that are desired to be batch read or batch write can be set on the external device 2 side, and convenience is improved.

[4.4.変形例4]
上記実施形態では、図3のEF203a(2F01)のように、一括指示ファイルはレコード構造のファイルであったが、一括指示データを一つだけ設定する場合には、一括指示ファイルを透過構造としてもよい。
[4.4. Modification 4]
In the above embodiment, the batch instruction file is a record structure file as in EF203a (2F01) of FIG. 3, but when only one batch instruction data is set, the batch instruction file may be a transparent structure. Good.

[4.5.変形例5]
上記実施形態では、図3のEF203a(2F01)のように、第1レコード351には「6F01 01 6F02 03 6F02 04」というように、ファイルの識別子及びレコード番号の組み合わせを3組記述したが、「6F02 03」と「6F02 04」については同じファイルに含まれるレコードであるので、省略形の記述方法を採用することとしてもよい。例えば、「6F02 03」と「6F02 04の組み合わせを、図8に示すように、「6F02 03 04」というように記載することとしてもよい。
[4.5. Modification 5]
In the above embodiment, as shown in EF 203a (2F01) in FIG. Since “6F02 03” and “6F02 04” are records included in the same file, an abbreviated description method may be adopted. For example, a combination of “6F02 03” and “6F02 04” may be described as “6F02 03 04” as shown in FIG.

1 ICカード
1a ICチップ
10 CPU
11 RAM
12 ROM
13 不揮発性メモリ
14 I/O回路
2 外部機器
1 IC card 1a IC chip 10 CPU
11 RAM
12 ROM
13 Nonvolatile Memory 14 I / O Circuit 2 External Device

Claims (8)

処理部と記憶部を備える電子情報記憶媒体であって、
前記記憶部は、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶し、
前記処理部は、外部機器から前記位置データを識別する識別情報を含むデータ読み出しコマンドを受信した場合に、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域のそれぞれに記憶されているデータをまとめて前記外部機器に送信することを特徴とする電子情報記憶媒体。
An electronic information storage medium comprising a processing unit and a storage unit,
The storage unit stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit,
When the processing unit receives a data read command including identification information for identifying the position data from an external device, each of the plurality of storage areas indicated by the storage area information included in the position data identified by the identification information An electronic information storage medium characterized in that the data stored in is collectively transmitted to the external device.
処理部と記憶部を備える電子情報記憶媒体であって、
前記記憶部は、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶し、
前記処理部は、外部機器から前記位置データを識別する識別情報と、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含むデータ書き込みコマンドを受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込むことを特徴とする電子情報記憶媒体。
An electronic information storage medium comprising a processing unit and a storage unit,
The storage unit stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit,
The processing unit includes identification information for identifying the position data from an external device, write data to be written in correspondence with each of a plurality of storage areas indicated by storage area information included in the position data identified by the identification information, An electronic information storage medium that writes the corresponding write data to each of the plurality of storage areas when a data write command including is received.
請求項1又は2に記載の電子情報記憶媒体であって、
前記処理部は、前記外部機器から前記位置データの追加、変更又は削除を行うことを示すコマンドを受信した場合に、当該コマンドに応じて前記位置データの追加、変更又は削除を行うことを特徴とする電子情報記憶媒体。
The electronic information storage medium according to claim 1 or 2,
When the processing unit receives a command indicating that the position data is added, changed, or deleted from the external device, the processing unit adds, changes, or deletes the position data according to the command. Electronic information storage medium.
請求項1乃至3の何れか一項に記載の電子情報記憶媒体を備えるICカード。   An IC card comprising the electronic information storage medium according to any one of claims 1 to 3. 処理部と記憶部を備える電子情報記憶媒体におけるデータ送信方法であって、
前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する工程と、
前記処理部が、外部機器から前記位置データを識別する識別情報を含むデータ読み出しコマンドを受信した場合に、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域のそれぞれに記憶されているデータをまとめて前記外部機器に送信する工程と、
を含むことを特徴とするデータ送信方法。
A data transmission method in an electronic information storage medium comprising a processing unit and a storage unit,
The storage unit stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit;
When the processing unit receives a data read command including identification information for identifying the position data from an external device, each of the plurality of storage areas indicated by the storage area information included in the position data identified by the identification information Sending the data stored in the above to the external device together;
A data transmission method comprising:
処理部と記憶部を備える電子情報記憶媒体におけるデータ書き込み方法であって、
前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する工程と、
前記処理部が、外部機器から前記位置データを識別する識別情報と、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含むデータ書き込みコマンドを受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込む工程と、
を含むことを特徴とするデータ書き込み方法。
A data writing method in an electronic information storage medium comprising a processing unit and a storage unit,
The storage unit stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit;
The processing unit writes identification data for identifying the position data from an external device, and write data to be written corresponding to each of a plurality of storage areas indicated by the storage area information included in the position data identified by the identification information; And writing the corresponding write data to the plurality of storage areas when receiving a data write command including:
A data writing method comprising:
処理部と記憶部を備え、前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する電子情報記憶媒体における前記処理部を、
外部機器から前記位置データを識別する識別情報を含むデータ読み出しコマンドを受信した場合に、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域のそれぞれに記憶されているデータをまとめて前記外部機器に送信する送信手段、
として機能させることを特徴とするデータ送信プログラム。
A processing unit and a storage unit, wherein the storage unit in the electronic information storage medium stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit;
When a data read command including identification information for identifying the position data is received from an external device, the data is stored in each of a plurality of storage areas indicated by the storage area information included in the position data identified by the identification information. Transmitting means for collectively transmitting data to the external device;
A data transmission program characterized in that it functions as
処理部と記憶部を備え、前記記憶部が、当該記憶部に記憶される複数のデータのそれぞれの記憶領域を示す記憶領域情報を含む位置データを記憶する電子情報記憶媒体における前記処理部を、
外部機器から前記位置データを識別する識別情報と、当該識別情報により識別される位置データに含まれる記憶領域情報が示す複数の記憶領域にそれぞれ対応させて書き込む書込データと、を含むデータ書き込みコマンドを受信した場合に、当該複数の記憶領域に、それぞれ対応する当該書込データを書き込む書き込み手段、
として機能させることを特徴とするデータ書き込みプログラム。
A processing unit and a storage unit, wherein the storage unit in the electronic information storage medium stores position data including storage area information indicating each storage area of a plurality of data stored in the storage unit;
A data write command including identification information for identifying the position data from an external device, and write data to be written in association with a plurality of storage areas indicated by the storage area information included in the position data identified by the identification information Writing means for writing the corresponding write data in the plurality of storage areas, respectively,
A data writing program characterized by functioning as:
JP2017097113A 2017-05-16 2017-05-16 Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program Active JP7005934B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017097113A JP7005934B2 (en) 2017-05-16 2017-05-16 Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017097113A JP7005934B2 (en) 2017-05-16 2017-05-16 Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program

Publications (2)

Publication Number Publication Date
JP2018194995A true JP2018194995A (en) 2018-12-06
JP7005934B2 JP7005934B2 (en) 2022-01-24

Family

ID=64569103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017097113A Active JP7005934B2 (en) 2017-05-16 2017-05-16 Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program

Country Status (1)

Country Link
JP (1) JP7005934B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200250653A1 (en) * 2019-01-31 2020-08-06 Mastercard International Incorporated Data processing apparatuses and methods

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04217088A (en) * 1990-12-17 1992-08-07 Toppan Printing Co Ltd Ic card
JP2011198106A (en) * 2010-03-19 2011-10-06 Toshiba Corp Portable electronic device
JP2014182639A (en) * 2013-03-19 2014-09-29 Toshiba Corp Ic card and portable electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04217088A (en) * 1990-12-17 1992-08-07 Toppan Printing Co Ltd Ic card
JP2011198106A (en) * 2010-03-19 2011-10-06 Toshiba Corp Portable electronic device
JP2014182639A (en) * 2013-03-19 2014-09-29 Toshiba Corp Ic card and portable electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200250653A1 (en) * 2019-01-31 2020-08-06 Mastercard International Incorporated Data processing apparatuses and methods

Also Published As

Publication number Publication date
JP7005934B2 (en) 2022-01-24

Similar Documents

Publication Publication Date Title
JP5843674B2 (en) IC card, portable electronic device, and control method of IC card
US20120067947A1 (en) Ic card, mobile electronic device and data processing method in ic card
JP5259513B2 (en) Portable electronic device, IC card, and portable electronic device control method
US8977824B2 (en) Portable electronic apparatus and method of controlling a portable electronic apparatus
JP7005934B2 (en) Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program
US7343452B2 (en) Apparatus for direct access to only specific lower hierarchy data in a nest structure
US20120234926A1 (en) Portable electronic apparatus
JP5301018B2 (en) Portable electronic device
JP4590201B2 (en) Data carrier and data carrier program
JP2010211516A (en) Portable electronic device and access control method in the same
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP2012133656A (en) Portable electronic apparatus and ic card
JP7468757B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RESPONSE TRANSMISSION METHOD, AND PROGRAM
JP6092342B2 (en) Non-contact portable electronic device and method for issuing non-contact portable electronic device
JP7439847B2 (en) Electronic information storage medium, key data setting method, and program
JP5932588B2 (en) IC card, portable electronic device, and IC card processing device
US20070124530A1 (en) Portable electronic device and control method of portable electronic device
JP6984328B2 (en) Electronic information storage medium, IC card, external device, data writing method and data writing program
JP6750450B2 (en) Electronic information storage medium, data transmission method, IC card, and data transmission program
JP5971687B2 (en) IC card, portable electronic device, and IC card command processing method
JP5998767B2 (en) IC card system and IC card
JP5085055B2 (en) IC card and IC module
JP2007114979A (en) Ic card and ic card program for sharing data file
JP6039036B2 (en) IC card, portable electronic device, and control method of IC card
JP2017072932A (en) IC card, IC module, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200330

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210325

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210406

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210607

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211220

R150 Certificate of patent or registration of utility model

Ref document number: 7005934

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150